From cd2282e36bee4156c446aaadd5962e7efebb88d8 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Fri, 19 Aug 2022 19:03:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=94=BB=E5=83=8F=E8=A7=A6?= =?UTF-8?q?=E8=BE=BE=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Customer/CompanyRecord.vue | 63 +------ src/views/Customer/SalesStage.vue | 125 ++++++++++---- src/views/Customer/index.vue | 170 ++++++------------ src/views/Customer/table.js | 137 +++++++++++++++ src/views/ReceivingRecords/index.vue | 126 +++++++------- src/views/ReceivingRecords/table.js | 85 +++++++++ src/views/Scheduling/index.vue | 89 ++++++++-- src/views/Scheduling/table.js | 59 +++++++ src/views/Statistics/BuildingContrast.vue | 20 --- src/views/Statistics/table.js | 81 +++++++++ src/views/Template/PinspeakwordsList.vue | 109 +++++++----- src/views/Template/table.js | 115 +++++++++++++ src/views/Template/taboo.vue | 174 +++++++++++-------- src/views/Template/wrongword.vue | 200 +++++++++------------- src/views/inspection/ProhibitedList.vue | 49 +++++- src/views/inspection/table.js | 67 ++++++++ 16 files changed, 1130 insertions(+), 539 deletions(-) create mode 100644 src/views/ReceivingRecords/table.js create mode 100644 src/views/Scheduling/table.js create mode 100644 src/views/Statistics/table.js create mode 100644 src/views/Template/table.js create mode 100644 src/views/inspection/table.js diff --git a/src/views/Customer/CompanyRecord.vue b/src/views/Customer/CompanyRecord.vue index d420bfb..dd914af 100644 --- a/src/views/Customer/CompanyRecord.vue +++ b/src/views/Customer/CompanyRecord.vue @@ -151,68 +151,7 @@ - - +
- 新增
@@ -38,7 +35,23 @@
- + + + +
- + - + - + - + --> @@ -422,6 +400,20 @@ import { exportMethodPost } from "@/util/util"; export default { data() { return { + tableIdName: "ReceivingRecordsIndex", // 当前页面需要的变量 + tableOption: this.$tableOption.ReceivingRecordsIndex, // 当前table配置项 + tableLoading: false, // 是否显示加载中 + showColumn: [], // 监听的显示列的变量 + page: { + total: 0, // 总页数 + currentPage: 1, // 当前页数 + pageSize: 10, // 每页显示多少条 + }, + + currentPage: 1, + size: 10, + total: 10, + isOpen: false, TimetoAhoose: 2, time: [], @@ -551,9 +543,6 @@ export default { }, ], - currentPage: 1, - size: 10, - total: 10, value: "", input: "", tableData: [], @@ -639,6 +628,8 @@ export default { }, created() { + // 获取显隐的列表 + this.setTableOption(); if (this.$route.query.types) { if (this.$route.query.types.indexOf("&") != -1) { let arr = this.$route.query.types.split("&"); @@ -698,6 +689,14 @@ export default { }, methods: { + // 获取当前页面的显隐 + setTableOption() { + this.$db.getDataByKey(this.tableIdName).then((res) => { + if (res.tableIdName == this.tableIdName) { + this.showColumn = res.optionData; + } + }); + }, isSystoleForm() { this.isOpen = !this.isOpen; }, @@ -742,8 +741,8 @@ export default { // 接待记录列表 findbypage() { let obj = { - current: this.currentPage, - size: this.size, + current: this.page.currentPage, + size: this.page.pageSize, type: 1, ...this.searchForm, }; @@ -753,17 +752,17 @@ export default { obj.keywordIds = obj.keywordsId.join(","); obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType; this.$api.api.findbypage(obj).then((res) => { - // console.log(res) + console.log(res); this.tableData = res.data.records; - this.total = res.data.total; - // 表格中设置ref属性,在数据渲染之后或者updated()之后 - this.$nextTick(() => { - this.$refs.table.doLayout(); - }); + this.page.total = res.data.total; + // 表格中设置ref属性,在数据渲染之后或者updated()之后 + this.$nextTick(() => { + this.$refs.crud.doLayout(); + }); }); }, clearScreen() { - this.currentPage = 1; + this.page.currentPage = 1; this.searchForm = { name: "", keywordsId: [], @@ -809,7 +808,7 @@ export default { this.houseChange(); }, screen() { - this.currentPage = 1; + this.page.currentPage = 1; console.log(this.searchForm); this.findbypage(); }, @@ -858,12 +857,12 @@ export default { }, handleSizeChange(val) { console.log(`每页 ${val} 条`); - this.size = val; + this.page.pageSize = val; this.findbypage(); }, handleCurrentChange(val) { console.log(`当前页: ${val}`); - this.currentPage = val; + this.page.currentPage = val; this.findbypage(); }, tabtimetap(idx) { @@ -907,6 +906,15 @@ export default { this.searchForm.endDate = this.time[1]; } }, + + + showColumn(nowV) { + let params = { + tableIdName: this.tableIdName, + optionData: nowV, + }; + this.$db.upDate(params); + }, }, }; diff --git a/src/views/ReceivingRecords/table.js b/src/views/ReceivingRecords/table.js new file mode 100644 index 0000000..64eface --- /dev/null +++ b/src/views/ReceivingRecords/table.js @@ -0,0 +1,85 @@ +export default { + ReceivingRecordsIndex: { + border: true, + index: false, + height: 572, + indexLabel: "序号", + stripe: true, + menuAlign: "center", + menuWidth: 146, + menu: true, + align: "center", + refreshBtn: false, + searchSize: "mini", + searchMenuSpan: 9, + delBtn: false, + addBtn: false, + editBtn: false, + viewBtn: false, + size: "small", + column: [ + { + sortable: true, + label: '接待开始时间', + prop: 'staTime', + width: '200px', + }, + { + label: "顾问", + prop: "agentName", + }, + + { + label: "客户", + prop: "name", + }, + + { + sortable: true, + label: "录音时长", + prop: "mm", + width: "100px", + }, + + { + label: "录音类型", + prop: "recording", + formatter: data => { + return data.recording == 0 ? "没有录音" : data.recording == 1 ? "部分录音" : '完整录音' + } + }, + + { + label: "标记顾问", + prop: "markAdvisor", + formatter: data => { + return data.markAdvisor == 0 ? "未标记" : '已标记' + } + }, + + { + sortable: true, + label: "画像标签触达次数", + prop: "total", + width: '150px', + }, + + { + sortable: true, + label: "执行率", + prop: "total", + width: '150px', + formatter: data => { + return `${data.fraction || 0}%` + } + }, + + { + sortable: true, + label: "接待标识", + prop: "validInvalidName", + }, + + ] + } +} \ No newline at end of file diff --git a/src/views/Scheduling/index.vue b/src/views/Scheduling/index.vue index 5edfb73..359f30d 100644 --- a/src/views/Scheduling/index.vue +++ b/src/views/Scheduling/index.vue @@ -82,7 +82,38 @@
- + + + + +
@@ -192,6 +224,16 @@ export default { return data; }; return { + tableIdName: "SchedulingIndex", // 当前页面需要的变量 + tableOption: this.$tableOption.SchedulingIndex, // 当前table配置项 + tableLoading: false, // 是否显示加载中 + showColumn: [], // 监听的显示列的变量 + page: { + total: 0, // 总页数 + currentPage: 1, // 当前页数 + pageSize: 10, // 每页显示多少条 + }, + transferdata: generateData(), draggingKey : null, transfervalue: [], @@ -217,9 +259,6 @@ export default { { label: "有排班", value: 1 }, ], schedulingoptseid: "", - Page: 1, - size: 10, - total: 0, roleId:'', arr1:[], showFlag:false, @@ -232,7 +271,19 @@ export default { components: { Calendar, }, + + watch: { + showColumn(nowV) { + let params = { + tableIdName: this.tableIdName, + optionData: nowV, + }; + this.$db.upDate(params); + }, + }, created() { + // 获取显隐的列表 + this.setTableOption(); this.sch_index_add = this.permissions["sch_index_add"]; this.sch_index_del = this.permissions["sch_index_del"]; this.sch_index_sort = this.permissions["sch_index_sort"]; @@ -248,6 +299,14 @@ export default { console.log(this.timeAcc,'sadasdasdas') }, methods: { + // 获取当前页面的显隐 + setTableOption() { + this.$db.getDataByKey(this.tableIdName).then((res) => { + if (res.tableIdName == this.tableIdName) { + this.showColumn = res.optionData; + } + }); + }, changeArr(arr) { this.arr = arr }, @@ -490,7 +549,7 @@ export default { // 项目选择 houseChange(e) { this.houseid = e; - this.Page = 1; + this.page.currentPage = 1; this.stateoptseid = ""; this.schedulingoptseid = ""; this.name = ""; @@ -513,8 +572,8 @@ export default { }, AgentPoollist() { let obj = { - current: this.Page, - size: this.size, + current: this.page.currentPage, + size: this.page.pageSize, itemId: this.houseid, status: this.stateoptseid, hasSchedule: this.schedulingoptseid, @@ -523,7 +582,7 @@ export default { this.$api.http.AgentPoollist(obj).then((res) => { console.log(res); this.tableData = res.data.records; - this.total = res.data.total; + this.page.total = res.data.total; // 表格中设置ref属性,在数据渲染之后或者updated()之后 this.$nextTick(() => { this.$refs.table.doLayout(); @@ -531,11 +590,11 @@ export default { }); }, screening(){ - this.Page = 1; + this.page.currentPage = 1; this.AgentPoollist(); }, reset(){ - this.Page = 1; + this.page.currentPage = 1; this.stateoptseid = ""; this.schedulingoptseid = ""; this.name = ""; @@ -558,7 +617,7 @@ export default { type: 'success', message: '删除成功!' }); - this.Page=1; + this.page.currentPage=1; this.AgentPoollist() }else{ this.$message.error(res.message); @@ -596,7 +655,7 @@ export default { type: 'success', message: '删除成功!' }); - this.Page=1; + this.page.currentPage=1; this.AgentPoollist() }else{ this.$message.error(res.message); @@ -634,12 +693,12 @@ export default { }, handleSizeChange(val) { console.log(`每页 ${val} 条`); - this.size = val; + this.page.pageSize = val; this.AgentPoollist() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); - this.Page = val; + this.page.currentPage = val; this.AgentPoollist() } }, diff --git a/src/views/Scheduling/table.js b/src/views/Scheduling/table.js new file mode 100644 index 0000000..e14bf90 --- /dev/null +++ b/src/views/Scheduling/table.js @@ -0,0 +1,59 @@ +export default { + SchedulingIndex: { + border: true, + height: 572, + indexLabel: "序号", + stripe: true, + menuAlign: "center", + menuWidth: 146, + menu: true, + align: "center", + refreshBtn: false, + searchSize: "mini", + selection: true, + searchMenuSpan: 9, + delBtn: false, + addBtn: false, + editBtn: false, + viewBtn: false, + size: "small", + column: [ + { + label: "顾问名", + prop: "name", + }, + + { + label: "状态", + prop: "status", + formatter: data => { + let str = '' + switch(Number(data.status)) { + case 0: + str = '空闲' + break; + case 1: + str = '接待中' + break; + case 2: + str = '暂停接待' + break; + default: + str = '' + break; + } + return str + } + }, + { + label: "有无排班", + prop: "hasSchedule", + formatter: data => { + return data.hasSchedule == 1 ? "有排班" : "无排班" + } + }, + + + ] + } +} \ No newline at end of file diff --git a/src/views/Statistics/BuildingContrast.vue b/src/views/Statistics/BuildingContrast.vue index 5810b4d..f7c9426 100644 --- a/src/views/Statistics/BuildingContrast.vue +++ b/src/views/Statistics/BuildingContrast.vue @@ -45,21 +45,6 @@ start-placeholder="开始日期" end-placeholder="结束日期"> - -
导出
@@ -147,12 +132,7 @@ {{ item.name }} -
-
diff --git a/src/views/Statistics/table.js b/src/views/Statistics/table.js new file mode 100644 index 0000000..33e7b54 --- /dev/null +++ b/src/views/Statistics/table.js @@ -0,0 +1,81 @@ +export default { + StatisticsBuildingContrast: { + border: true, + index: true, + height: 572, + indexLabel: "序号", + stripe: true, + menuAlign: "center", + menuWidth: 146, + menu: true, + align: "center", + refreshBtn: false, + searchSize: "mini", + searchMenuSpan: 9, + delBtn: false, + addBtn: false, + editBtn: false, + viewBtn: false, + size: "small", + column: [ + { + label: '项目', + prop: 'houseName', + width: '200px', + }, + { + label: "平均执行率", + prop: "fraction", + formatter: data => { + return `${data.fraction || 0}%` + } + }, + + { + label: "顾问数", + prop: "accountNum", + }, + + { + label: "接待量", + prop: "receptionCount", + }, + + { + label: "有效接待", + prop: "activeCustomer", + width: '100px', + }, + + { + label: "违禁接待次数", + prop: "prohibitedCustomer", + width: '140px', + }, + + { + label: "接待时长(分钟)", + prop: "sumDuration", + width: '140px', + formatter: data => { + return Math.floor(data.sumDuration/60) || 0 + } + }, + + { + label: "违禁接待占比", + prop: "prohibitedZb", + width: '140px', + formatter: data => { + return `${data.prohibitedZb || 0}%` + } + }, + + { + label: "优秀案例数", + prop: "addtodigestCount", + }, + + ] + } +} \ No newline at end of file diff --git a/src/views/Template/PinspeakwordsList.vue b/src/views/Template/PinspeakwordsList.vue index 3b41cf7..bc015e8 100644 --- a/src/views/Template/PinspeakwordsList.vue +++ b/src/views/Template/PinspeakwordsList.vue @@ -31,47 +31,36 @@
- - - - - - - - - - - - - + +
@@ -108,11 +97,18 @@ import { exportMethodPost } from "@/util/util"; export default { data() { return { + tableIdName: "TemplatePinspeakwordsList", // 当前页面需要的变量 + tableOption: this.$tableOption.TemplatePinspeakwordsList, // 当前table配置项 + tableLoading: false, // 是否显示加载中 + showColumn: [], // 监听的显示列的变量 + page: { + total: 0, // 总页数 + currentPage: 1, // 当前页数 + pageSize: 10, // 每页显示多少条 + }, + tableData: [], currentPage4: 1, - total: 0,//总条数 - pageNum: 1, - pageSize: 10, houseList: [], projectId: "", orgType: localStorage.getItem('orgType'), @@ -129,7 +125,19 @@ export default { computed: { ...mapGetters(["permissions"]), }, + + watch: { + showColumn(nowV) { + let params = { + tableIdName: this.tableIdName, + optionData: nowV, + }; + this.$db.upDate(params); + }, + }, created() { + // 获取显隐的列表 + this.setTableOption(); this.tem_pwl_add = this.permissions["tem_pwl_add"]; this.tem_pwl_edit = this.permissions["tem_pwl_edit"]; this.tem_pwl_stop = this.permissions["tem_pwl_stop"]; @@ -140,6 +148,15 @@ export default { this.zkhousePage() }, methods: { + + // 获取当前页面的显隐 + setTableOption() { + this.$db.getDataByKey(this.tableIdName).then((res) => { + if (res.tableIdName == this.tableIdName) { + this.showColumn = res.optionData; + } + }); + }, downLoad() { let parmest = { houseId: this.projectId, @@ -281,7 +298,7 @@ export default { }, //筛选 Screening() { - this.pageNum = 1; + this.page.currentPage = 1; this.getcompanyList() }, //获取项目 @@ -301,26 +318,26 @@ export default { }, //切换项目 houseChange() { - this.pageNum = 1; + this.page.currentPage = 1; this.getcompanyList() }, // 获取列表 getcompanyList() { this.tableData = []; let parmest = { - current: this.pageNum, - size: this.pageSize, + current: this.page.currentPage, + size: this.page.pageSize, houseId: this.projectId, status: this.statetest } this.$api.http.templatefindByPage(parmest).then((res) => { this.tableData = res.data.records; - this.total = res.data.total; + this.page.total = res.data.total; - // 表格中设置ref属性,在数据渲染之后或者updated()之后 - this.$nextTick(() => { - this.$refs.table.doLayout(); - }); + // 表格中设置ref属性,在数据渲染之后或者updated()之后 + this.$nextTick(() => { + this.$refs.crud.doLayout(); + }); }); }, //templatedel删除模板 @@ -352,11 +369,11 @@ export default { }); }, handleSizeChange(val) { - this.pageSize = val; + this.page.pageSize = val; this.getcompanyList() }, handleCurrentChange(val) { - this.pageNum = val; + this.page.currentPage = val; this.getcompanyList() }, diff --git a/src/views/Template/table.js b/src/views/Template/table.js new file mode 100644 index 0000000..d33037e --- /dev/null +++ b/src/views/Template/table.js @@ -0,0 +1,115 @@ +export default { + TemplatePinspeakwordsList: { + border: true, + index: false, + height: 572, + indexLabel: "序号", + stripe: true, + menuAlign: "center", + menuWidth: 146, + menu: true, + align: "center", + refreshBtn: false, + searchSize: "mini", + searchMenuSpan: 9, + delBtn: false, + addBtn: false, + editBtn: false, + viewBtn: false, + size: "small", + column: [ + { + label: "项目名称", + prop: "houseName", + width: "120px", + }, + { + label: "状态", + prop: "status", + formatter: (data) => { + if(data.status == 0) return '启用' + if(data.status == 1) return '停用' + } + }, + { + label: "大类个数", + prop: "count", + }, + + { + label: "创建时间", + prop: "createTime", + }, + ] + }, + TemplateWrongword: { + border: true, + index: true, + height: 572, + indexLabel: "序号", + stripe: true, + menuAlign: "center", + menuWidth: 146, + menu: true, + align: "center", + refreshBtn: false, + searchSize: "mini", + searchMenuSpan: 9, + delBtn: false, + addBtn: false, + editBtn: false, + viewBtn: false, + size: "small", + column: [ + { + label: "正确词", + prop: "correctWord", + }, + { + label: "错误词", + prop: "wrongWord", + }, + { + label: "创建时间", + prop: "createTime", + }, + ] + }, + TemplateTaboo: { + border: true, + index: false, + height: 572, + indexLabel: "序号", + stripe: true, + menuAlign: "center", + menuWidth: 146, + menu: true, + align: "center", + refreshBtn: false, + searchSize: "mini", + searchMenuSpan: 9, + delBtn: false, + addBtn: false, + editBtn: false, + viewBtn: false, + size: "small", + column: [ + { + label: '敏感词', + prop: "words" + }, + { + label: "项目名称", + prop: "houseName", + }, + { + label: "创建时间", + prop: "createDate", + }, + { + label: "修改时间", + prop: "updateDate", + }, + ] + } +} \ No newline at end of file diff --git a/src/views/Template/taboo.vue b/src/views/Template/taboo.vue index c58189e..409d9c4 100644 --- a/src/views/Template/taboo.vue +++ b/src/views/Template/taboo.vue @@ -28,7 +28,12 @@
敏感词:
- +
筛选 @@ -37,7 +42,7 @@ style="margin-left: auto; margin-right: 10px" v-if="tem_tab_downLoad" > - 新增 导出 @@ -47,48 +52,31 @@
- - - - - - - - - - - - - - - -
- - -
+ + +
@@ -101,10 +89,24 @@ style="width: 100%; margin: 0 auto" > - + -