From c3b53e3dd1923e851e8c618b13e428422376bc60 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期四, 28 九月 2023 13:42:39 +0800
Subject: [PATCH] feat: 服务回访单列表配置列显隐控制
---
src/views/service/serviceFollowup/index.vue | 38 ++++++++++++++++++++++++++++----------
1 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/src/views/service/serviceFollowup/index.vue b/src/views/service/serviceFollowup/index.vue
index 1dcf881..59f60ca 100644
--- a/src/views/service/serviceFollowup/index.vue
+++ b/src/views/service/serviceFollowup/index.vue
@@ -32,6 +32,7 @@
@selContactsClick="selContactsClick"
@selServiceOrderClick="selServiceOrderClick"
@getSelectArray="getSelectArray"
+ @selTableCol="selTableCol"
>
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="60">
@@ -137,7 +138,17 @@
},
selValueList: [],
keyword: "",
- keywordType: ""
+ keywordType: "",
+ tableColumn: [
+ { label: "鍥炶鍗曠紪鍙�", prop: "number", min: 80, isCommonClick: true, default: true }, // 鍥炶鍗曠紪鍙�
+ { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О
+ { label: "鑱旂郴浜哄鍚�", prop: "contact_name", isContactClick: true }, // 鑱旂郴浜哄鍚�
+ { label: "瀹㈡埛鏈嶅姟鍗�", prop: "client_service_order", isServiceOrder: true }, // 瀹㈡埛鏈嶅姟鍗�
+ { label: "鍥炶浜�", prop: "member_name" }, // 鍥炶浜�
+ { label: "婊℃剰搴�", prop: "satisfaction_name" } // 婊℃剰搴�
+ // { label: "淇敼鏃堕棿", prop: "modifyTime" } // 淇敼鏃堕棿
+ ],
+ showCol:["鍥炶鍗曠紪鍙�", "瀹㈡埛鍚嶇О", "鑱旂郴浜哄鍚�", "瀹㈡埛鏈嶅姟鍗�", "鍥炶浜�", "婊℃剰搴�"]
}
},
created() {
@@ -153,16 +164,11 @@
setTable() {
this.tableList = {
tableInfomation: [],
- tableColumn: [
- { label: "鍥炶鍗曠紪鍙�", prop: "number", min: 80, isCommonClick: true }, // 鍥炶鍗曠紪鍙�
- { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О
- { label: "鑱旂郴浜哄鍚�", prop: "contact_name", isContactClick: true }, // 鑱旂郴浜哄鍚�
- { label: "瀹㈡埛鏈嶅姟鍗�", prop: "client_service_order", isServiceOrder: true }, // 瀹㈡埛鏈嶅姟鍗�
- { label: "鍥炶浜�", prop: "member_name" }, // 鍥炶浜�
- { label: "婊℃剰搴�", prop: "satisfaction_name" } // 婊℃剰搴�
- // { label: "淇敼鏃堕棿", prop: "modifyTime" } // 淇敼鏃堕棿
- ]
+ 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
@@ -170,6 +176,18 @@
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() {
this.loading = true
--
Gitblit v1.8.0