From a8fc561ea18260ab36b19bd5c997bcccebb68c4f Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期一, 09 十月 2023 09:58:51 +0800 Subject: [PATCH] feat: 首页删除客户货物描述,增加通道号展示 --- src/views/visualization.vue | 92 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 72 insertions(+), 20 deletions(-) diff --git a/src/views/visualization.vue b/src/views/visualization.vue index 4a0d6f3..a6dd135 100644 --- a/src/views/visualization.vue +++ b/src/views/visualization.vue @@ -90,7 +90,7 @@ </span> --> </div> <div class="gongx"> - <el-steps v-if="taskData.AllProcedures" :active="taskData.CurrentProcedureIndex?taskData.CurrentProcedureIndex:0" finish-status="success" class="steps"> + <el-steps v-if="taskData.AllProcedures" :active="taskData.CurrentProcedureIndex ?? 0" finish-status="success" class="steps"> <el-step icon="" :title="item" v-for="(item,index) in taskData.AllProcedures" :key="index"></el-step> </el-steps> </div> @@ -147,10 +147,10 @@ - {{ formatDate(taskData.Order.endTime) }}</el-descriptions-item > - <el-descriptions-item label="璐х墿鎻忚堪">{{ - taskData.Order.orderAttr || "--" - }}</el-descriptions-item> - <el-descriptions-item label="瀹㈡埛鍚嶇О">{{ + <el-descriptions-item label="閫氶亾"> + {{ channelNameConfig[taskData.Channel] || "--" }} + </el-descriptions-item> + <el-descriptions-item label="瀹㈡埛缂栫爜">{{ taskData.Order.customer || "--" }}</el-descriptions-item> <el-descriptions-item label="鍙傛暟瑕佹眰">{{ @@ -639,6 +639,7 @@ import AddIssue from "../components/AddIssue.vue"; import ProcessModel from "../components/ProcessModel.vue"; import TaskControlModal from "@/components/TaskControlModal.vue"; +import {channelNameConfig} from "@/common/constants"; export default { components: { TaskControlModal, @@ -773,6 +774,7 @@ listData:[], resResult:null, resprocInfoTimer:null, + channelNameConfig: channelNameConfig }; }, mounted() { @@ -787,7 +789,11 @@ this.getDate3(); this.getDate2(); }, 5000); - this.getTaskInfo(); + + let channelType = this.getChannelTypeFromUrl() + channelType = channelType ?? 1 + this.activeName = channelType + this.getTaskInfo(channelType); this.getTaskCountStatistics() }, beforeDestroy() { @@ -803,7 +809,6 @@ // } }, methods: { - getModelList(){ this.resResult=null for (let i in this.TasksCopy){ @@ -822,10 +827,10 @@ this.isUpdateIcon=true; break; } - } + } } } - this.resResult=res; + this.resResult=res; }) } } @@ -839,7 +844,6 @@ } } this.$message.error('褰撳墠宸ュ簭鏃犵紪鍙凤紝鏃犳硶鏌ョ湅宸ュ簭!') - }, getProcessModelList(){ this.getModelList() @@ -873,6 +877,7 @@ }, cutClick(val) { this.activeName = val; + this.updateChannelTypeToUrl(val) if(this.activeName==2){ this.Tasks=this.TasksCopy.slice(0,2) if(this.Tasks.length<2){ @@ -915,9 +920,6 @@ } }); }, - - - getDateObj(date, fmt) { if (/(y+)/.test(fmt)) { fmt = fmt.replace( @@ -1161,6 +1163,27 @@ } }) }, + /** + * 鍚慤RL涓缃綋鍓嶉�氶亾灞曠ず绫诲瀷 + * @param {number} type 閫氶亾灞曠ず绫诲瀷 + */ + updateChannelTypeToUrl(type){ + const activeName = this.getChannelTypeFromUrl(); + if (activeName === type){ + return + } + let path = this.$router.history.current.path + this.$router.push({path, query: {activeName: `${type ?? 1}`}}) + }, + /** + * 浠嶶RL鑾峰彇褰撳墠閫氶亾灞曠ず绫诲瀷 + * @return {number} + */ + getChannelTypeFromUrl(){ + let activeName = new URLSearchParams(location.search).get('activeName') + activeName = activeName ? +activeName : undefined + return activeName + }, getProgressInfo() { this.resprocInfoTimer=null for (let i in this.TasksCopy){ @@ -1352,19 +1375,47 @@ } } } - .el-step__head.is-process{ - color: #00cc66 !important; - border-color:#00cc66; - } - .el-step__title.is-process{ - color: #00cc66 !important; - } .el-step__head.is-wait{ color:#fff; border-color:#fff; } .el-step__title.is-wait{ color:#fff; + } + + // 浣挎楠ゆ潯鑺傜偣鐘舵�佹垚鍔熸椂,鍓嶉潰鐨勭嚎鍚屾鏇存敼棰滆壊 + .steps{ + /* 杩涜涓姸鎬侊細鍦堢嚎 */ + & .el-step__head.is-process { + color: #00cc66; + border-color: #00cc66; + } + /* 杩涜涓姸鎬侊細鍦堝唴 */ + & .el-step__head.is-process > .el-step__icon { + background: #00cc66; + color: #00cc66; + } + /* 杩涜涓姸鎬侊細title锛堟枃瀛楋級 */ + & .el-step__title.is-process { + color: #00cc66; + } + + /* 瀹屾垚鐘舵�侊細鍦堢嚎 */ + & .el-step__head.is-success { + color: #00cc66; + border-color: #00cc66; + } + /* 瀹屾垚鐘舵�侊細title锛堟枃瀛楋級 */ + & .el-step__title.is-success { + color: #00cc66; + } + /* 瀹屾垚鐘舵�侊細line + * 鎻忚堪锛氱涓�姝ュ畬鎴愶紝绗簩姝ヨ繘琛屾椂锛屼箣闂寸殑杩涘害鏉℃湁棰滆壊 + */ + & .el-step__head.is-success > .el-step__line > .el-step__line-inner { + width: 100% !important; + border-width: 1px !important; + } } } .set-title { @@ -1692,6 +1743,7 @@ top:10px; width:35px; vertical-align: middle; + cursor:pointer; img{ width:100%; } -- Gitblit v1.8.0