From 4436c040d89980c8624f88cd4876c808806c414f Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期一, 28 八月 2023 19:52:46 +0800 Subject: [PATCH] 下发参数 弹框修改 2023-8-28 --- src/views/visualization.vue | 56 ++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 38 insertions(+), 18 deletions(-) diff --git a/src/views/visualization.vue b/src/views/visualization.vue index 5e63f08..657e20a 100644 --- a/src/views/visualization.vue +++ b/src/views/visualization.vue @@ -1,6 +1,7 @@ <template> <div class="home"> + <!-- --> <template v-if="Object.keys(taskData).length > 0 && taskData.Procedure.ID"> <div class="left"> <p class="title"> @@ -106,15 +107,17 @@ <el-progress define-back-color="#133EAF" color="#09E5ED" + text-color="#fff" :text-inside="true" :stroke-width="30" - :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount):0" + :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount*100):0" ></el-progress> </el-descriptions-item> <!-- <el-descriptions-item label="鍚堟牸鐜�" style="width: 100%"> <el-progress define-back-color="#007101" color="#00CC66" + text-color="#fff" :text-inside="true" :stroke-width="30" :percentage="passrate" @@ -196,15 +199,16 @@ </div> <div class="card_top-3"> <span class="card-top-r-t" - >瀹屾垚杩涘害锛歿{ taskData.Order?parseInt(finishNumber/taskData.Order.amount):0}}</span + >瀹屾垚杩涘害锛歿{ taskData.Order?parseInt(finishNumber/taskData.Order.amount*100):0}}</span > <span class="card-top-r-b"> <el-progress define-back-color="#133EAF" color="#09E5ED" + text-color="#fff" :text-inside="true" :stroke-width="10" - :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount):0" + :percentage="taskData.Order?parseInt(finishNumber/taskData.Order.amount*100):0" :show-text="false" ></el-progress> </span> @@ -361,7 +365,7 @@ </span> </div> <div class="right-top-m-btn"> - <el-button type="primary" @click="controlClick"> 鎺у埗</el-button> + <!-- <el-button type="primary" @click="controlClick"> 鎺у埗</el-button> --> </div> <div class="right_dutyLst"> <div class="right-small-title">褰撳墠鍊肩彮</div> @@ -415,6 +419,7 @@ </div> </div> </template> + <!-- --> <template v-else> <div class="home-img-box"> <div class="bg-title"> @@ -439,9 +444,9 @@ </div> </template> <!-- 鎺у埗鐨勫脊妗� --> - <AddControl ref="control" :id="taskData.Procedure.ID" /> + <AddControl ref="control" :Arr="Arr" /> <!-- 鎺у埗鐨勫脊妗� --> - <AddIssue ref="control" :taskData="taskData" :Order="taskData.Order" @getSetProductNumber="getTaskInfo" /> + <AddIssue ref="control" :Arr="Arr" :taskData="taskData" :Order="taskData.Order" @getSetProductNumber="getTaskInfo" /> </div> </template> @@ -525,6 +530,10 @@ showCountDown:false, countDownHour:0, countDownMinute:0, + Arr:[], + // 璁板綍瀹氭椂鍣ㄧ姸鎬� + procInfoTimer:null, + cutdownTimer: null }; }, mounted() { @@ -542,6 +551,7 @@ this.getTaskInfo(); }, methods: { + reloadPage() { // window.location.reload(); this.getTaskInfo(); @@ -651,6 +661,7 @@ }; getTaskInfo().then((res) => { if (res.code == 200) { + this.procedureList=[] this.taskData = res.data ? res.data : { @@ -683,12 +694,15 @@ number: res.data.Number, name: "宸ヨ壓", }); + this.Arr=res.data.Params?res.data.Params:[]; } }); this.getProgressInfo(); - setInterval(() => { - this.getProgressInfo(); - }, 6000); + if (!this.procInfoTimer) { + this.procInfoTimer = setInterval(() => { + this.getProgressInfo(); + }, 6000); + } } console.log(this.procedureList, "===1111procedureList"); // setTimeout(() => { @@ -699,9 +713,12 @@ } if(res.code!=200||!this.taskData.Procedure.ID){ this.getcountdown(); - setInterval(() => { - this.getcountdown(); - }, 60000); + // 鎺у埗閲嶆柊璇锋眰getTaskInfo, 鍙紑鍚竴涓畾鏃跺櫒 + if (!this.cutdownTimer) { + this.cutdownTimer = setInterval(() => { + this.getcountdown(); + }, 60000); + } } }); }, @@ -721,6 +738,7 @@ this.$refs.control.islook = true; } else { this.$message.error("褰撳墠璁惧娌℃湁宸ュ簭锛�"); + } }, // 鍙充晶瀹屾垚 @@ -823,11 +841,7 @@ font-size: 30px; font-weight: 700; } -.el-button--primary { - border: 0; - font-weight: 700 !important; - font-size: 16px !important; -} + .color_4efefa { color: #4efefa; } @@ -1254,7 +1268,8 @@ } .right_dutyLst { width: calc(100% - 20px); - height: 270px; + // height: 270px; + height: 310px; border-radius: 4px; line-height: 30px; overflow: hidden; @@ -1339,4 +1354,9 @@ } } } +.el-button--primary { + border: 0; + font-weight: 700 !important; + font-size: 16px; +} </style> -- Gitblit v1.8.0