| | |
| | | @selContactsClick="selContactsClick" |
| | | @selClientClick="selClientClick" |
| | | @getSelectArray="getSelectArray" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="60" fixed="right"> |
| | |
| | | value: "topic", |
| | | label: "" |
| | | }, |
| | | search_map: {} |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "主题", prop: "topic", min: 120 ,default:true}, // 主题 |
| | | { label: "客户名称", prop: "client_name", min: 190, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", min: 100, isContactClick: true }, // 联系人姓名 |
| | | { label: "客户状态", prop: "client_status", min: 100 }, // 客户状态 |
| | | { label: "联系方式", prop: "contact_information_name", min: 100 }, // 联系方式 |
| | | { label: "联系日期", prop: "follow_time", min: 130 }, // 联系人日期 |
| | | { label: "下次回访日期", prop: "next_follow_time", min: 130 }, // 下次回访日期 |
| | | { label: "负责人", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "跟进记录", prop: "record", min: 130 } // 跟进记录 |
| | | ], |
| | | showCol:['主题','客户名称','联系人姓名','联系人姓名','客户状态','联系方式','联系日期','下次回访日期','负责人','跟进记录'] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "主题", prop: "topic", min: 120 }, // 主题 |
| | | { label: "客户名称", prop: "client_name", min: 190, isClientClick: true }, // 客户名称 |
| | | { label: "联系人姓名", prop: "contact_name", min: 100, isContactClick: true }, // 联系人姓名 |
| | | { label: "客户状态", prop: "client_status", min: 100 }, // 客户状态 |
| | | { label: "联系方式", prop: "contact_information_name", min: 100 }, // 联系方式 |
| | | { label: "联系日期", prop: "follow_time", min: 130 }, // 联系人日期 |
| | | { label: "下次回访日期", prop: "next_follow_time", min: 130 }, // 下次回访日期 |
| | | { label: "负责人", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "跟进记录", prop: "record", 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 |
| | |
| | | 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 |