From ea060b235ed0f28f6dfd39133a5ea4e15d0bcc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Sat, 12 Oct 2024 16:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E5=B1=95=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/setup.js | 7 ++++ src/views/home/console/index.vue | 59 +++++++++++++++++++++----------- src/views/order/create-order.vue | 17 ++++++++- 3 files changed, 62 insertions(+), 21 deletions(-) diff --git a/src/api/model/setup.js b/src/api/model/setup.js index f5556c5..0e8fc8d 100644 --- a/src/api/model/setup.js +++ b/src/api/model/setup.js @@ -190,6 +190,13 @@ export default { return await http.post(this.url, data); }, }, + select:{ + url: `${config.API_URL}/customer.select.list`, + name: "客户下拉", + post: async function (data) { + return await http.post(this.url, data); + }, + } }, bom:{ list:{ diff --git a/src/views/home/console/index.vue b/src/views/home/console/index.vue index e1cbfe7..4ce9e18 100644 --- a/src/views/home/console/index.vue +++ b/src/views/home/console/index.vue @@ -22,7 +22,7 @@ {{item.status}} {{item.title}} -
{{item.text}}
+
{{item.content}}
@@ -108,7 +108,7 @@ import barBox from "./components/bar"; import ringBox from "./components/ring"; import pointBox from "./components/point"; import shortcuts from "./components/shortcuts"; - +import {eventBus} from "@/utils/eventBus" export default { name: "index", components:{ @@ -120,35 +120,54 @@ export default { }, data(){ return{ - briefing:[ - {num:189376,name:'数据采集条数',icon:'sc-icon-Gather'}, - {num:12496,name:'维保待维修',icon:'sc-icon-HomeSetup'}, - {num:756,name:'已维修工单',icon:'sc-icon-Repaired'}, - {num:97662,name:'预警工单',icon:'sc-icon-EarlyWarn'}, + {num:189376,name:'待提交数',icon:'sc-icon-Gather'}, + {num:12496,name:'计划维修数',icon:'sc-icon-HomeSetup'}, + {num:756,name:'正在维修数',icon:'sc-icon-Repaired'}, + {num:97662,name:'待审核数',icon:'sc-icon-EarlyWarn'}, {num:3553,name:'个人中心',icon:'sc-icon-HomeUser'}, {num:253,name:'个人中心',icon:'sc-icon-HomeChart'}, ], newList:[ - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审',status:'紧急'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审,在今晚九点之前一定操作,配合财务打款。',status:'紧急'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审 在今晚九点之前一定操作,配合财务打款。',status:'紧急'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, - {title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审',status:'紧急'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审,在今晚九点之前一定操作,配合财务打款。',status:'紧急'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审 在今晚九点之前一定操作,配合财务打款。',status:'紧急'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, + {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'}, ], } }, mounted() { - this.$emit('on-mounted') + this.$emit('on-mounted'); + // 获取新消息 + eventBus.$on('sockBack', this.getWsResult); + }, + unmounted() { + eventBus.$off('sockBack', this.getWsResult); }, methods:{ - + getWsResult(res){ + if(res.data && (res.data.type == 21 || res.data.type == 22)){ + if(res.data.type == 21){ + this.briefing.forEach(item=>{ + res.data.list_count_info.forEach(em=>{ + if(item.name == em.title){ + item.num = em.value + } + }) + }) + } + if(res.data.type == 22){ + this.newList = res.data.list_backlog_info + } + } + } } } diff --git a/src/views/order/create-order.vue b/src/views/order/create-order.vue index 8a205a0..3b6a1cd 100644 --- a/src/views/order/create-order.vue +++ b/src/views/order/create-order.vue @@ -9,7 +9,9 @@ - + + + @@ -313,6 +315,19 @@ export default { this.setMap[name] = res.data; } }, + async getCustomerSelect(name){ + let params = { + field:"customer_name", + id:{ + operator:"in", + value:"" + } + } + const res = await this.$API.setup.customer.select.post(params); + if(res.code == 200){ + this.setMap[name] = res.data; + } + }, addOrder(){ this.form.component_info.push({ component_serial_no:"",