From aa89c9ff1ee7144f5632de8aa2e8a14dc978c85a Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 27 九月 2023 14:13:29 +0800 Subject: [PATCH] 修改是否可以下发的按钮的参数 --- src/views/visualization.vue | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/views/visualization.vue b/src/views/visualization.vue index aa8ee94..96bb49c 100644 --- a/src/views/visualization.vue +++ b/src/views/visualization.vue @@ -344,7 +344,9 @@ ></p> <div class="right-small-btn bottom-box-btn"> <el-button type="primary"> 鎵撳嵃</el-button> + <el-button v-if="taskData.Procedure.Status==3" type="primary" class="huise"> 瀹屾垚</el-button> <el-popover + v-else placement="top-end" width="160" class="button-finish" @@ -359,7 +361,6 @@ <el-button type="primary" size="mini" - :disabled="taskData.Procedure.Status==3?true:false" class="color_f70f83" @click="finishClick(index, taskData)" > @@ -448,12 +449,25 @@ <div class="right-top-m"> 璁惧鐘舵��: <!-- 1鏂紑2鐢熶骇3寰呮満 --> - <span style="position: relative" - v-if="plcStatus" > - <img v-if="plcStatus == 1" src="../../public/duan.png" /> - <img v-else src="../../public/lian.png" /> - <!-- <span class="yuandian"></span> --> - {{ plcStatus==1?'鏂紑':(plcStatus==2?'鐢熶骇涓�':'寰呮満') }} + <span style="position: relative" v-if="plcStatus" > + <el-popover + v-if="plcStatus == 1&&plcNotConnected" + width="180" + :content="plcNotConnected" + placement="top-end" + trigger="click" + > + <span slot="reference"> + <img src="../../public/duan.png" /> + 鏂紑 + </span> + </el-popover> + <span v-else> + <img v-if="plcStatus == 1&&!plcNotConnected" src="../../public/duan.png" /> + <img v-else src="../../public/lian.png" /> + <!-- <span class="yuandian"></span> --> + {{ plcStatus==1?'鏂紑':(plcStatus==2?'鐢熶骇涓�':'寰呮満') }} + </span> </span> </div> <div class="right-top-m-btn"> @@ -687,6 +701,8 @@ isTipShow:false, // isFinsh:0, safeProduce:'', + // 璁惧鏂紑鐨勫師鍥� + plcNotConnected:'', ChannelAmount:0, }; }, @@ -896,7 +912,7 @@ }; this.Tasks = []; this.TasksCopy=[] - getTaskInfo({ }).then((res) => { + getTaskInfo({taskMode:2}).then((res) => { if (res.code == 200&&res.data) { let arr=[] if(res.data.Tasks){ @@ -907,6 +923,7 @@ this.activeName=1; this.TasksCopy = res.data.Tasks ? res.data.Tasks : []; this.safeProduce=res.data.Prompt.safeProduce?res.data.Prompt.safeProduce:'' + this.plcNotConnected=res.data.Prompt.plcNotConnected?res.data.Prompt.plcNotConnected:'' this.ChannelAmount=res.data.ChannelAmount?res.data.ChannelAmount:1 // if(this.ChannelAmount>1 &&this.TasksCopy.length<2){ // this.TasksCopy.push(object) @@ -985,7 +1002,7 @@ // break; // } // } - getTaskUnStarted({page:1,pageSize:1}).then(res=>{ + getTaskInfo({taskMode:1}).then(res=>{ if(res.code==200){ this.taskData=res.data.Tasks?res.data.Tasks[0]:{}; if (this.taskData.Procedure.ID) { @@ -1407,6 +1424,15 @@ border: 0; } } + .huise{ + width: 46%; + float: right; + } + .huise.el-button--primary { + background: #CCE8E8; + color: #AAAAAA; + border: 0; + } } .home { width: 100%; -- Gitblit v1.8.0