From 5d0120d2e8a6e5cd2e1e95d4c5ffeecf5fc1c4a6 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期二, 10 十月 2023 15:35:58 +0800 Subject: [PATCH] Merge branch 'dev' into songshankun/adjust-style --- src/views/client/salesLead/index.vue | 62 ++++++++++++++---------------- 1 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/views/client/salesLead/index.vue b/src/views/client/salesLead/index.vue index f456ce9..014a51c 100644 --- a/src/views/client/salesLead/index.vue +++ b/src/views/client/salesLead/index.vue @@ -28,6 +28,7 @@ :table-list="tableList" @selSalesLeadClick="selSalesLeadClick" @getSelectArray="getSelectArray" + @selTableCol="selTableCol" > <template slot="tableButton"> <el-table-column label="鎿嶄綔" width="120"> @@ -134,7 +135,18 @@ // 鍒嗛厤 visible: false, infomation: {} - } + }, + tableColumn:[ + { label: "瀹㈡埛鍚嶇О", prop: "name", min: 190, isSalesLeadClick: true ,default:true}, // 瀹㈡埛鍚嶇О + { label: "閿�鍞嚎绱㈢紪鍙�", prop: "number", min: 130 }, // 閿�鍞嚎绱㈢紪鍙� + { label: "鑱旂郴浜哄鍚�", prop: "contact_name", min: 130 }, // 鑱旂郴浜哄鍚� + { label: "鎵嬫満鍙风爜", prop: "contact_phone", min: 130 }, // 鎵嬫満鍙风爜 + { label: "鍟嗘満鏉ユ簮", prop: "sales_resources", min: 130 }, // 鍟嗘満鏉ユ簮 + { label: "鐪佷唤", prop: "province", min: 130 }, // 鐪佷唤 + { label: "鍩庡競", prop: "city", min: 130 }, // 鍩庡競 + { label: "璐熻矗浜�", prop: "member_name", min: 130 } // 璐熻矗浜� + ], + showCol:["瀹㈡埛鍚嶇О","閿�鍞嚎绱㈢紪鍙�","鑱旂郴浜哄鍚�","鎵嬫満鍙风爜","鍟嗘満鏉ユ簮","鐪佷唤","鍩庡競","璐熻矗浜�"] } }, created() { @@ -145,23 +157,29 @@ setTable() { this.tableList = { tableInfomation: [], - tableColumn: [ - { label: "瀹㈡埛鍚嶇О", prop: "name", min: 190, isSalesLeadClick: true }, // 瀹㈡埛鍚嶇О - { label: "閿�鍞嚎绱㈢紪鍙�", prop: "number", min: 130 }, // 閿�鍞嚎绱㈢紪鍙� - { label: "鑱旂郴浜哄鍚�", prop: "contact_name", min: 130 }, // 鑱旂郴浜哄鍚� - { label: "鎵嬫満鍙风爜", prop: "contact_phone", min: 130 }, // 鎵嬫満鍙风爜 - { label: "鍟嗘満鏉ユ簮", prop: "sales_resources", min: 130 }, // 鍟嗘満鏉ユ簮 - { label: "鐪佷唤", prop: "province", min: 130 }, // 鐪佷唤 - { label: "鍩庡競", prop: "city", min: 130 }, // 鍩庡競 - { label: "璐熻矗浜�", prop: "member_name", min: 130 } // 璐熻矗浜� - ] + allcol: [], + showcol: this.showCol, + tableColumn:this.setColumnVisible(this.showCol) } + this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); this.searchOptions = [] for (let i = 0; i < this.tableList.tableColumn.length; i++) { const label = this.tableList.tableColumn[i].label const value = this.tableList.tableColumn[i].prop this.searchOptions.push({ value: value, label: label }) } + }, + setColumnVisible(showCol){ + return this.tableColumn.map(ele=>{ + return { + ...ele, + isShowColumn:showCol.includes(ele.label) + } + }) + }, + selTableCol(val) { + this.showcol = val; + this.tableList.tableColumn = this.setColumnVisible(val); }, // 璇锋眰鏁版嵁 async getData() { @@ -274,19 +292,6 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> -//.sales-lead { -// .top { -// margin-bottom: 20px; -// .btn-pager { -// display: flex; -// .page { -// margin-left: auto; -// } -// } -// } -//} - - .sales-lead{ height: 100%; overflow: hidden; @@ -316,15 +321,6 @@ border-radius: 12px; height: 100%; overflow: hidden; - } - - .supplier-search { - display: flex; - align-items: center; - .add-view { - margin-left: auto; - margin-right: 20px; - } } .list-view { height: calc(100% - 60px); -- Gitblit v1.8.0