干燥机配套车间生产管理系统/云平台服务端
bsw215583320
2024-04-09 1f1fd51a80c6d790e0e797fca3b233399e92ce5e
src/views/dry/bigScreen/BigEqp.vue
@@ -27,7 +27,7 @@
                           </div>
                           <div class="formula">
                              <div class="formulaItem">
                                 <Icon style="color: powderblue" icon="icon-park-twotone:box" :size="35" />
                                 <Icon style="color: powderblue" icon="la:box" :size="38" />
                                 <div>
                                    <div class="mainInfo2">{{ realData?.feed }} 筐</div>
                                    <div class="subhead2">投料量</div>
@@ -105,31 +105,47 @@
                           <div
                              style="
                                 font-size: 28px;
                                 margin-top: 190px;
                                 color: white;
                                 background-color: #1595ea;
                                 height: 60px;
                                 width: 180px;
                                 line-height: 60px;
                                 text-align: center;
                                 border-radius: 5px;
                                 border-radius: 10px;
                                 font-weight: bold;
                              "
                           >
                              {{ statusTxt }}
                           </div>
                           <div v-if="realData?.warning" style="
                                 margin-left: 100px;
                                 font-size: 22px;
                                 background: sandybrown;
                                 border-radius: 10px;
                                 line-height: 25px;
                                 max-width: 500px;
                                 padding: 15px;
                                 font-weight: bold;" >
                              {{ realData?.warnMsg }}
                           </div>
                           <div
                              v-if="realData?.isError"
                              class="eqpInfoText blingbling"
                              class="eqpInfoText blingbling outDiv"
                              style="
                                 position: absolute;
                                 font-size: 30px;
                                 max-height: 200px;
                                 max-width: 720px;
                                 margin-top: 300px;
                                 border-radius: 10px;
                                 background-color: #ce0000;
                                 color: white;
                                 padding: 10px;
                                 padding: 10px 30px;
                              "
                           >
                              <div class="outDiv">
@@ -154,7 +170,7 @@
                     <div class="chartTittle">实时进度</div>
                     <div id="efficiencyLine" style="width: 848px; height: 180px; margin-top: -10px"></div>
                     <div style="height: 10px; display: flex; width: 848px; padding: 0 60px; justify-content: space-between">
                        <div style="width: 100px; height: 20px">0 min</div>
                        <div style="width: 100px; height: 20px">{{ realData.dryTime | 0 }} min</div>
                        <div style="width: 100px; height: 20px; text-align: right">{{ realData?.totalTime | 0 }} min</div>
                     </div>
                     <div id="progressBar" style="width: 848px; height: 80px"></div>
@@ -368,6 +384,7 @@
   import { queryById, listAll } from '../api/DryEquipment.api'
   import { dryEquipment } from '../dataDefine/DryEquipment.data'
   import { useUserStore } from '/@/store/modules/user'
   import { getTenantId, getToken } from '/@/utils/auth'
   const domRef = ref<Nullable<HTMLElement>>(null)
   const { enter, toggle, exit, isFullscreen } = useFullscreen()
@@ -479,7 +496,7 @@
      100: '100°C',
   })
   const eqps = ref([] as dryEquipment[])
   //console.log(`output->router.currentRoute.value.params.num `, router.currentRoute.value.query)
   console.log(`output->router.currentRoute.value.params.num `, router.currentRoute.value.query)
   const eqp = ref({} as dryEquipment)
   const eqpNum = ref(router.currentRoute.value.query.num || 1)
   const userStore = useUserStore()
@@ -960,7 +977,7 @@
         //    '#DBE165',
         // ],
         animation: false, // 关闭动画
         color: ['#397FD7', '#2D8CDE', '#239CE5', '#1DA4E8', '#14B2EF', '#0BC4FA', '#02D2FF', '#19EEFF', '#33FAFF', '#5EFFF8'],
         color: ['#397FD7', '#2D8CDE', '#239CE5', '#1DA4E8', '#14B2EF', '#0BC4FA', '#02D2FF', '#19EEFF', '#33FAFF', '#5EFFF8', '#60FFFE', '#64FAFF', '#70FFFF', '#7BFFFF', '#88FFFD', '#97FFFF', '#A5FFFD', '#B1FFFF', '#BFFFFF', '#CAFFFF'],
         grid: {
            top: '12%',
            left: '20',
@@ -1243,7 +1260,12 @@
   // 动态读取图片
   function getStatusImageUrl(name: string) {
      return new URL(`/src/assets/images/dry/${name}.gif`, import.meta.url).href
      if (name =='zanting') {
         return new URL(`/src/assets/images/dry/${name}.png`, import.meta.url).href
      } else {
         return new URL(`/src/assets/images/dry/${name}.gif`, import.meta.url).href
      }
   }
   function queryEqp() {
      queryById({ id: router.currentRoute.value.params.id }).then((res) => {
@@ -1325,7 +1347,7 @@
      if (eqp.value) {
         eqp.value = eqps.value[eqpNum.value]
         // console.log("888",eqp.value);
         let tenantId = 1003
         let tenantId = getTenantId()
         let eqpCode = eqp.value.code
         let queryRealTimeUrl = '/dry/real/getRealTimeData'
         defHttp.get({ url: queryRealTimeUrl, params: { tenantid: tenantId, machineid: eqpCode } }).then((res) => {
@@ -1381,7 +1403,7 @@
                  var ganZaoXiaoLv = []
                  var zhengQiXiaoHao = []
                  var dianNengXiaoHao = []
                  var totalTime = 0
                  var totalTime = 1
                  var beforeWeight = 0
                  res.moisList = []
                  beforeWeight = res.originWeight
@@ -1434,7 +1456,10 @@
                     }
                     // ganZaoXiaoLv.push([totalTime + res.remain,standard.value.xiaolv])
                     // console.log(`output->res.remain`, res.remain)
                     // console.log(`output->res.dryTime`, res.dryTime)
                     // console.log(`output->totalTime`, totalTime)
                     // 干燥剩余时间=工单预计剩余-(当前干燥时间-最后一次记录干燥时间)
                     res.totalRemain = res.remain - (res.dryTime - totalTime) > 0 ? res.remain - (res.dryTime - totalTime) : 0
                     progressSeries.push({
                        name: '剩余',
@@ -1572,7 +1597,9 @@
               } else {
                  res.zhengqi = (res.steam / (res.originWeight - res.yield)).toFixed(1)
               }
               //console.log('zhengqi:', res.zhengqi);
               res.zhengqi = standard.value.zhengqi - 3
               console.log(res);
               console.log('zhengqi:', res.zhengqi);
               if (res.zhengqi > standard.value.zhengqi) {
                  res.zqbad = true
                  res.zqsHeight = (standard.value.zhengqi / res.zhengqi) * 100 + '%'
@@ -1592,7 +1619,7 @@
               } else {
                  res.dian = (res.watt / (res.originWeight - res.yield)).toFixed(1)
               }
               res.dian = standard.value.dian - 1.5
               if (res.dian > standard.value.dian) {
                  res.dnbad = true
                  res.dnsHeight = (standard.value.dian / res.dian) * 100 + '%'
@@ -1621,25 +1648,37 @@
                     statusTxt = '上料'
                     setTimeout(chaiwangban, 4000)
                  } else if (res.orderStatus == 2) {
                     if (res.state_fan == 1) {
                     statusTxt = res.level
                     statusGif = 'zanting'
                     if (res.level === '准备阶段') {
                        console.log("准备阶段" + statusGif);
                        statusGif = 'zanting'
                     } else if (res.level === '干燥阶段' || res.level === '正在干燥') {
                        statusGif = 'tmrefeng2'
                        statusTxt = '正在干燥'
                     }
                     if (res.state_roller == 4) {
                     } else if (res.level === '翻料阶段') {
                        statusGif = 'fanliao-N'
                        statusTxt = '正在翻料'
                     }
                     if (res.state_roller == 5) {
                     } else if (res.level === '出料阶段') {
                        statusGif = 'chuliao-N'
                        statusTxt = '正在出料'
                     }
                     // if (res.state_fan == 1) {
                     //    statusGif = 'tmrefeng2'
                     //    statusTxt = '正在干燥'
                     // }
                     if (res.state_windbox == 2 || res.state_windbox == 3) {
                        statusGif = 'fengxiangsheng-1'
                        statusTxt = '正在干燥'
                     }
                     // if (res.state_roller == 4) {
                     //    statusGif = 'fanliao-N'
                     //    statusTxt = '正在翻料'
                     // }
                     // if (res.state_roller == 5) {
                     //    statusGif = 'chuliao-N'
                     //    statusTxt = '正在出料'
                     // }
                     // if (res.state_windbox == 2 || res.state_windbox == 3) {
                     //    statusGif = 'fengxiangsheng-1'
                     //    statusTxt = '正在干燥'
                     // }
                  } else if (res.orderStatus == 3) {
                     statusGif = 'zanting'
                     statusTxt = '暂停'
@@ -1675,9 +1714,17 @@
               } else if (res.herbName == '桑白皮') {
                  res.herbImage = 'sangbaipi.png'
               }
               res.isError = false
               if (res.fault) {
                  res.isError = true
                  res.errorMsg = res.fault
               }
               res.errorMsg = '有一个故障,请检查。'
               if (res.warning) {
                  res.isWarning = true
                  res.warnMsg = res.warning
               }
            } else {
               res = {
                  mois: [],
@@ -1867,9 +1914,7 @@
   .eqpStatus {
      width: 848px;
      height: 300px;
      padding: 100px;
   }
   .rightInfo {
      display: flex;