| | |
| | | <p class="title"> |
| | | <span |
| | | class="font set-title" |
| | | style="float: left; margin-right: 15px" |
| | | style="float: left; margin-right: 15px;" |
| | | @click="cutClick(1)" |
| | | > |
| | | <img v-if="activeName == 1" src="../../public/one-blue.png" /> |
| | | <img v-else src="../../public/one.png" /> |
| | | <img style="width:32px;" v-if="activeName == 1" src="../../public/one-blue.png" /> |
| | | <img style="width:32px;" v-else src="../../public/one.png" /> |
| | | </span> |
| | | <span class="font set-title" style="float: left" @click="cutClick(2)"> |
| | | <img v-if="activeName == 2" src="../../public/two-blue.png" /> |
| | | <img v-else src="../../public/two.png" /> |
| | | <img style="width:32px;" v-if="activeName == 2" src="../../public/two-blue.png" /> |
| | | <img style="width:32px;" v-else src="../../public/two.png" /> |
| | | </span> |
| | | 生产管理看板 |
| | | <span |
| | |
| | | style="float: right;margin-right:20px;font-size:28px;line-height:25px;" |
| | | @click="taskClick" |
| | | > |
| | | <el-badge :value="TaskCount" class="item"> |
| | | <i class="el-icon-chat-round"/> |
| | | <el-badge :value="TaskCount" :class="TaskCount==0?'item color_666':'item color_fff'"> |
| | | <i class="el-icon-chat-dot-round" /> |
| | | </el-badge> |
| | | </span> |
| | | </p> |
| | |
| | | v-for="(taskData, index) in Tasks" |
| | | :key="index" |
| | | > |
| | | <div class="gong-date"> |
| | | 工序运行时间:{{ getFormatTime(taskData.Procedure.startTime) }} |
| | | </div> |
| | | <div class="statelist"> |
| | | <span class="title-item" |
| | | >工单编号: |
| | |
| | | {{ taskData.Procedure.procedure.nextProcedureName || "--" }} |
| | | </span> |
| | | </span> |
| | | <span class="title-item" |
| | | <!-- <span class="title-item" |
| | | >工作人数: |
| | | <span class="color_4efefa"> |
| | | <span |
| | |
| | | <span v-else>0</span> |
| | | 人 |
| | | </span> |
| | | </span> |
| | | </span> --> |
| | | </div> |
| | | <div class="gongx" v-if="taskData.AllProcedures"> |
| | | <el-steps :active="taskData.CurrentProcedureIndex?taskData.CurrentProcedureIndex:0" finish-status="success" simple> |
| | | <el-step :title="item" v-for="(item,index) in taskData.AllProcedures" :key="index"></el-step> |
| | | <el-steps :active="taskData.CurrentProcedureIndex?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> |
| | | <div class="content"> |
| | |
| | | <div class="content_leftBttom"> |
| | | <dl> |
| | | <dd |
| | | style="font-size: 26px; font-weight: 600" |
| | | style="font-size: 35px; font-weight: 600" |
| | | class="color_green" |
| | | > |
| | | {{ taskData.finishNumber }}{{ taskData.Order.unit }} |
| | |
| | | <div class="content_leftBttom"> |
| | | <dl> |
| | | <dd |
| | | style="font-size: 26px; font-weight: 600" |
| | | style="font-size: 35px; font-weight: 600" |
| | | class="color_green" |
| | | > |
| | | {{ taskData.Order.amount || 0 }}{{ taskData.Order.unit }} |
| | |
| | | <el-descriptions-item label="工时"> |
| | | {{ taskData.Procedure.procedure.workHours || "" }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="起止时间" |
| | | <el-descriptions-item label="计划时间" |
| | | >{{ formatDate(taskData.Order.startTime) || "" }} |
| | | - |
| | | {{ formatDate(taskData.Order.endTime) }}</el-descriptions-item |
| | |
| | | </div> |
| | | <div class="right-top-m"> |
| | | 设备状态: |
| | | <!-- 1断开2生产3待机 --> |
| | | <span style="position: relative" |
| | | >正常 |
| | | <span class="yuandian"></span> |
| | | > |
| | | <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> |
| | | </div> |
| | | <div class="right-top-m-btn"> |
| | |
| | | countDownMinute: 0, |
| | | Arr: [], |
| | | // 记录定时器状态 |
| | | procInfoTimer: [null, null], |
| | | procInfoTimer: null, |
| | | cutdownTimer: null, |
| | | TaskCount:0, |
| | | plcStatus:1, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | return ""; |
| | | } |
| | | }, |
| | | // 格式化时间 ==> yyyy-mm-dd |
| | | formatDate2(value) { |
| | | if (value) { |
| | | const now = value ? new Date(value * 1000) : new Date(); |
| | | let time = this.getDateObj(now, "yyyy/MM/dd hh:mm:ss"); |
| | | return time; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }, |
| | | getDate3() { |
| | | let now = new Date(); |
| | | this.formatTime3 = this.getDateObj(now, "hh:mm"); |
| | |
| | | getDate2() { |
| | | let now = new Date(); |
| | | this.formatTime2 = this.getDateObj(now, "yyyy年MM月dd日"); |
| | | }, |
| | | getFormatTime(date){ |
| | | const getCha=()=>{ |
| | | let now=new Date().getTime() |
| | | let String=now-date*1000; |
| | | let seconds=Math.floor(String/1000) |
| | | let minutes=Math.floor(seconds/60) |
| | | |
| | | let days=Math.floor(String/1000/60/60/24) |
| | | let hours=Math.floor(minutes/60)-days*24 |
| | | let m=minutes-days*24*60-hours*60 |
| | | return days+'天'+hours+'时'+m+'分' |
| | | } |
| | | let d= getCha() |
| | | setInterval(() => { |
| | | d= getCha(); |
| | | }, 6000); |
| | | return d; |
| | | }, |
| | | setInterCard(value, name, i) { |
| | | if (this.Tasks[i].Procedure.procedure[value]) { |
| | |
| | | }; |
| | | this.Tasks = []; |
| | | getTaskInfo({ page: 1, pageSize: this.activeName }).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200&&res.data) { |
| | | let arr=[] |
| | | if(res.data.Tasks){ |
| | | arr.sort(function(a,b){ |
| | |
| | | ...this.Tasks[i].Procedure.procedure, |
| | | }, |
| | | ]); |
| | | |
| | | if (this.Tasks[i].Procedure.ID) { |
| | | startTask({ id: this.Tasks[i].Procedure.ID }).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | this.Tasks[i].procedureList[0].push({ |
| | | number: res.data.Number, |
| | | name: "工艺", |
| | | Arr:res.data.Params ? res.data.Params : [], |
| | | }); |
| | | if (i == 0) { |
| | | this.Arr = res.data.Params ? res.data.Params : []; |
| | | this.taskData=this.Tasks[i] |
| | | } |
| | | } |
| | | }); |
| | | this.getProgressInfo(i); |
| | | if (!this.procInfoTimer[i]) { |
| | | this.procInfoTimer[i] = setInterval(() => { |
| | | this.getProgressInfo(i); |
| | | }, 6000); |
| | | } |
| | | } |
| | | this.setInterCard("inputMaterials", "cardBox1&" + i, i); |
| | | this.setInterCard("outputMaterials", "cardBox3&" + i, i); |
| | | } |
| | | this.getStartArr() |
| | | this.getProgressInfo(); |
| | | if (!this.procInfoTimer) { |
| | | this.procInfoTimer = setInterval(() => { |
| | | this.getProgressInfo(); |
| | | }, 9000); |
| | | } |
| | | } |
| | | if (res.code != 200 || this.Tasks.length == 0) { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getProgressInfo(i) { |
| | | getProgress({ |
| | | position: Number(i), |
| | | procedureId: this.Tasks[i].Procedure.ID, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.Tasks[i].finishNumber = res.data.finishNumber |
| | | ? res.data.finishNumber |
| | | : 0; |
| | | getStartArr(){ |
| | | for (let i in this.Tasks) { |
| | | if (this.Tasks[i].Procedure.Status==1) { |
| | | this.Arr = this.Tasks[i].procedureList[0].Arr ?this.Tasks[i].procedureList[0].Arr: []; |
| | | this.taskData=this.Tasks[i]; |
| | | break; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | getProgressInfo() { |
| | | for (let i in this.Tasks){ |
| | | getProgress({ |
| | | position: Number(i), |
| | | procedureId: this.Tasks[i].Procedure.ID, |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.Tasks[i].finishNumber = res.data.finishNumber |
| | | ? res.data.finishNumber |
| | | : 0; |
| | | this.plcStatus=res.data.plcStatus?res.data.plcStatus:1 |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | // 设置 |
| | | setUrl() { |
| | |
| | | // 右侧控制 |
| | | controlClick() { |
| | | if (this.Tasks.length > 0) { |
| | | this.$refs.control.islook = true; |
| | | for(let i in this.Tasks){ |
| | | if(this.Tasks[i].Procedure.Status==1){ |
| | | this.$refs.control.islook = true; |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | this.$message.error("当前设备没有工序!"); |
| | | } |
| | |
| | | <style lang="scss"> |
| | | .active-one { |
| | | width: 100%; |
| | | height: 100%; |
| | | height: calc(100% - 100px); |
| | | .statelist { |
| | | height: 50px; |
| | | } |
| | | .small_title { |
| | | margin-bottom: 20px; |
| | | } |
| | | .content { |
| | | height: 240px; |
| | | } |
| | | .bottom { |
| | | height: calc(100% - 500px - 30px); |
| | | height: calc(100% - 410px); |
| | | } |
| | | } |
| | | .active-two { |
| | | width: calc(50% - 10px); |
| | | height: 100%; |
| | | height: calc(100% - 100px); |
| | | float: left; |
| | | padding-left: 10px; |
| | | &:nth-of-type(1) { |
| | |
| | | box-sizing: border-box; |
| | | border-right: 1px solid #eee; |
| | | } |
| | | .small_title { |
| | | margin-bottom: 30px; |
| | | } |
| | | .statelist { |
| | | height: 60px; |
| | | .title-item{ |
| | | font-size:14px!important; |
| | | } |
| | | } |
| | | .title-item > span { |
| | | display: block; |
| | |
| | | height: 370px; |
| | | |
| | | .content-top { |
| | | height: calc(50% - 60px) !important; |
| | | padding-top: 50px !important; |
| | | height: calc(50% - 20px) !important; |
| | | padding-top: 10px !important; |
| | | } |
| | | .el-descriptions__body { |
| | | font-size: 16px !important; |
| | | } |
| | | } |
| | | .bottom { |
| | | height: calc(100% - 630px - 50px); |
| | | height: calc(100% - 560px); |
| | | } |
| | | .bottom_list .bottom-title { |
| | | font-size: 18px; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | .gong-date{ |
| | | width:100%; |
| | | height:20px; |
| | | line-height:20px; |
| | | margin-bottom:10px; |
| | | font-size:16px; |
| | | } |
| | | .gongx{ |
| | | width:100%; |
| | | height:30px; |
| | | margin-bottom:10px; |
| | | .el-steps--simple{ |
| | | background:transparent; |
| | | padding:5px 10px; |
| | | height:50px; |
| | | overflow-x:auto; |
| | | // overflow-y:hidden; |
| | | margin-top:-5px; |
| | | .steps{ |
| | | height:100%; |
| | | .el-step__icon{ |
| | | width:16px; |
| | | height:16px; |
| | | } |
| | | .el-step__title{ |
| | | line-height:25px; |
| | | font-size:14px; |
| | | } |
| | | } |
| | | |
| | | .el-step{ |
| | | .el-step__icon{ |
| | | background:#00cc66; |
| | | } |
| | | .is-wait{ |
| | | .el-step__icon{ |
| | | background:#fff; |
| | | } |
| | | } |
| | | } |
| | | .el-step__head.is-process{ |
| | | color: #00cc66 !important; |
| | |
| | | font-size: 30px; |
| | | font-weight: 700; |
| | | } |
| | | |
| | | .color_666{ |
| | | color:#666!important; |
| | | } |
| | | .color_fff{ |
| | | color:#fff!important; |
| | | } |
| | | .color_4efefa { |
| | | color: #4efefa; |
| | | } |
| | |
| | | position: relative; |
| | | padding: 10px; |
| | | width: 30%; |
| | | height: 100%; |
| | | height: calc(100% - 20px); |
| | | border-radius: 6px; |
| | | background: rgb(22 72 173); |
| | | // float:left; |
| | |
| | | font-size: 22px; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | margin-bottom: 30px; |
| | | margin-bottom: 5px; |
| | | .el-button--primary { |
| | | color: #fff; |
| | | float: right; |
| | |
| | | .card-box { |
| | | width: 100%; |
| | | height: calc(100% - 50px - 50px); |
| | | // overflow:auto; |
| | | // height:300px; |
| | | .el-carousel__container{ |
| | | overflow-y:auto; |
| | | } |
| | | // .el-carousel__item{ |
| | | // min-height:116px; |
| | | // } |
| | | } |
| | | } |
| | | |
| | | .small_title { |
| | | font-size: 24px; |
| | | margin-bottom: 10px; |
| | | font-size: 20px; |
| | | } |
| | | .right-small-btn { |
| | | margin-top: 10px; |
| | |
| | | .title { |
| | | font-size: 30px; |
| | | font-weight: 600; |
| | | |
| | | height:40px; |
| | | margin:10px 0 30px; |
| | | text-align: center; |
| | | .el-badge__content, .el-progress.is-exception .el-progress-bar__inner{ |
| | | background-color:green; |
| | | } |
| | | } |
| | | |
| | | .statelist { |
| | | width: 100%; |
| | | margin: 0 auto 20px; |
| | | margin: 0 auto 10px; |
| | | flex-wrap: nowrap; |
| | | align-content: center; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | .title-item { |
| | | width: calc(25% - 50px); |
| | | width: calc(33.333% - 50px); |
| | | float: left; |
| | | margin-right: 10px; |
| | | padding: 15px 20px; |
| | |
| | | } |
| | | .content { |
| | | width: 100%; |
| | | margin: 0px 0px 30px; |
| | | margin: 0px 0px 20px; |
| | | overflow: hidden; |
| | | .content_left { |
| | | width: 24%; |
| | |
| | | // padding:2%; |
| | | .content-top { |
| | | background: rgb(22 72 173); |
| | | height: calc(50% - 30px); |
| | | padding-top: 20px; |
| | | height: calc(50% - 20px); |
| | | padding-top: 10px; |
| | | text-align: center; |
| | | line-height: 30px; |
| | | border-radius: 6px; |
| | |
| | | line-height: 50px; |
| | | font-weight: 700; |
| | | font-size: 18px; |
| | | padding: 0 4%; |
| | | padding: 0 3%; |
| | | overflow-x: hidden; |
| | | margin-left: -4%; |
| | | margin-left: -3%; |
| | | span{ |
| | | display:inline-block; |
| | | img{ |
| | | width:23px; |
| | | vertical-align: middle; |
| | | // float:left; |
| | | display:inline-block; |
| | | } |
| | | } |
| | | |
| | | .yuandian { |
| | | width: 25px; |
| | | height: 25px; |
| | |
| | | } |
| | | } |
| | | .right_dutyLst { |
| | | width: calc(100% - 20px); |
| | | width: calc(106% - 20px); |
| | | // height: 270px; |
| | | height: 310px; |
| | | border-radius: 4px; |
| | | line-height: 30px; |
| | | overflow: hidden; |
| | | // background: #00cc66; |
| | | background: #4565c9; |
| | | margin-top: 10px; |
| | | padding: 5px 10px; |
| | | margin-left:-3%; |
| | | position: relative; |
| | | .right-small-title { |
| | | width: auto; |