|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ {{listStyle}}
|
|
|
<div style="width: 100%;height: 40px;">
|
|
|
<div style="margin: 0 12px;float: left;">
|
|
|
<el-button
|
|
@@ -33,13 +34,16 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
:row-class-name="rowClassName"
|
|
|
>
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
<el-table-column
|
|
|
v-for="(item,index) in setRowList"
|
|
|
:key="index"
|
|
|
:prop="item.label"
|
|
|
:label="item.name"
|
|
|
:width="item.width"
|
|
|
+ :fixed="item.fixed"
|
|
|
align="center"
|
|
|
+ sortable
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="item.name === '操作'">
|
|
@@ -126,6 +130,11 @@
|
|
|
<el-button type="primary" @click="save()">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+<!-- {{listStyle}}-->
|
|
|
+ <br>
|
|
|
+ {{queryList.columnList}}
|
|
|
+ <br>
|
|
|
+ {{setRowList}}
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -134,20 +143,34 @@ import { addSet, resetModule } from "@/api/system/set";
|
|
|
import Cookies from "js-cookie";
|
|
|
export default {
|
|
|
name: 'listComponent',
|
|
|
- props: ['tableData', 'listStyle','queryList','customButton'],
|
|
|
+ props: ['tableData', 'listStyle','queryList','customButton','arrow'],
|
|
|
data() {
|
|
|
return {
|
|
|
- setRowList:this.queryList.columnList.length !== 0?this.queryList.columnList:this.listStyle,
|
|
|
+ setRowList:this.queryList.columnList,
|
|
|
showSetting: false,
|
|
|
allCheck: false,
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ // 'queryList.columnList':(newValue,oldValue){
|
|
|
+ // console.log(setRowList)
|
|
|
+ // // this.initData()
|
|
|
+ // }
|
|
|
+ queryList: function (newValue,oldValue) {
|
|
|
+ console.log(newValue,oldValue)
|
|
|
+ this.setRowList = newValue.columnList
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
console.log(this.listStyle)
|
|
|
console.log(this.queryList)
|
|
|
console.log(this.queryList.columnList.length)
|
|
|
},
|
|
|
methods: {
|
|
|
+ initData(){
|
|
|
+ this.setRowList = this.queryList.columnList
|
|
|
+ console.log(this.setRowList)
|
|
|
+ },
|
|
|
//行号设置
|
|
|
rowClassName({row, rowIndex}) {
|
|
|
console.log(row,rowIndex)
|
|
@@ -234,8 +257,17 @@ export default {
|
|
|
//选择
|
|
|
handleSelectionChange(selection){
|
|
|
this.$emit('selectionbox', selection)
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleQuery(){
|
|
|
+
|
|
|
+ },
|
|
|
+ resetQuery(){
|
|
|
+
|
|
|
+ },
|
|
|
+ handleClick(){
|
|
|
+ this.$emit('handleClick')
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|