haoxuan
2023-08-24 a36a95ee0962af12a40e471cd706f2880f439887
src/views/visualization.vue
@@ -27,9 +27,9 @@
          <span class="title-item"
            >后道工序:
            <span class="color_4efefa">
              <!-- {{
                taskData.NextProcedure.procedure.procedureName || "--"
              }} -->
              {{
                taskData.Procedure.procedure.nextProcedureName || "--"
              }}
            </span>
          </span>
          <span class="title-item"
@@ -343,10 +343,10 @@
          <div class="right-top-l">作业状态</div>
          <div class="time">
            <dl>
              <dd><span style="font-size: 32px">{{ formatDate3() }}</span></dd>
              <dd><span style="font-size: 32px">{{ formatTime3 }}</span></dd>
              <dd>
                <span style="font-size: 12px; "
                  >{{ formatDate2() }}</span
                  >{{ formatTime2 }}</span
                >
                <!--margin-right: 10px <span style="font-size: 14px">星期四</span> -->
              </dd>
@@ -420,7 +420,7 @@
        <div class="bg-title">
          <img src="../../public/bg-title.png" />
          <span class="bg-title-span">设备实时生产看板</span>
          <div class="bg-date"><span>{{ formatDate3() }}</span><br/>{{formatDate2()}}</div>
          <div class="bg-date"><span>{{ formatTime3 }}</span><br/>{{formatTime2}}</div>
          <span
            class="font el-icon-setting set-title bg-set"
            @click="setUrl"
@@ -467,6 +467,8 @@
      production: 25, //生产中
      finishNumber: 0,
      finishPercent: 0,
      formatTime2:'',
      formatTime3:'',
      // 右侧完成
      finishShow: false,
      inputMaterials: [],
@@ -521,6 +523,10 @@
    //   this.passrate = this.getRandomNumber(1, 100);
    //   this.production = this.getRandomNumber(1, 100);
    // }, 3000);
    setInterval(()=>{
       this.getDate3()
       this.getDate2()
    },5000)
    this.getTaskInfo();
    setInterval(() => {
      this.getProgressInfo();
@@ -529,7 +535,8 @@
  methods: {
    reloadPage() {
      window.location.reload();
      // window.location.reload();
      this.getTaskInfo();
    },
    getProgressInfo() {
      getProgress().then((res) => {
@@ -579,15 +586,13 @@
        return "";
      }
    },
    formatDate3() {
        const now =  new Date();
        let time = this.getDateObj(now, "hh:mm");
        return time;
    getDate3(){
      let  now=  new Date();
      this.formatTime3 = this.getDateObj(now, "hh:mm");
    },
    formatDate2(){
      const now =  new Date();
        let time = this.getDateObj(now, "yyyy年MM月dd日");
        return time;
    getDate2(){
      let now =  new Date();
      this.formatTime2 = this.getDateObj(now, "yyyy年MM月dd日");
    },
    setInterCard(value, name) {
      let height = 200;
@@ -658,7 +663,7 @@
              if (res.code == 200) {
                // res.data.number
                this.procedureList[0].push({
                  number: res.data.number,
                  number: res.data.Number,
                  name: "工艺",
                });
              }
@@ -675,10 +680,13 @@
    },
    // 设置
    setUrl() {
      const { href } = this.$router.resolve({
      // const { href } = this.$router.resolve({
      //   path: "/set",
      // });
      // window.open(href, "_blank");
      this.$router.push({
        path: "/set",
      });
      window.open(href, "_blank");
    },
    // 右侧控制
    controlClick() {
@@ -731,24 +739,24 @@
    }
    .bg-title-span {
      position: absolute;
      width: 400px;
      height: 100px;
      line-height: 100px;
      width: 30%;
      height: 4rem;
      line-height:2.4;
      font-size: 26px;
      font-weight: 700;
      text-align: center;
      left: 39%;
      top: 5%;
      left: 36%;
      top: 1.5rem;
      display: inline-block;
    }
    .bg-set{
      position:absolute;
      right:10%;
      height: 100px;
      line-height: 100px;
      height: 4rem;
      line-height:2.4;
      font-size: 40px;
      font-weight: 700;
      top: 5%;
      top: 1rem;
    }
    .bg-date{
      position:absolute;
@@ -780,7 +788,7 @@
      margin: 0 auto;
      text-align: center;
      position: absolute;
      top: 21%;
      top: 9rem;
    }
  }
}