haoxuan
2023-09-22 0ff14f558473544c9145735524fb671743c716bb
看板改版
3个文件已添加
6个文件已修改
102 ■■■■■ 已修改文件
public/agin.png 补丁 | 查看 | 原始文档 | blame | 历史
public/confirm1.png 补丁 | 查看 | 原始文档 | blame | 历史
public/confirm2.png 补丁 | 查看 | 原始文档 | blame | 历史
public/confirm3.png 补丁 | 查看 | 原始文档 | blame | 历史
public/loading.png 补丁 | 查看 | 原始文档 | blame | 历史
public/queren.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/AddIssue.vue 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/visualization.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/agin.png
public/confirm1.png

public/confirm2.png

public/confirm3.png

public/loading.png
public/queren.png
src/components/AddIssue.vue
@@ -119,21 +119,28 @@
                "
                :class="showBtn == 3&&isLoading?'margin-top-10px':'margin-top-40px'"
              >
              <template v-if="showBtn == 2">
              <div class="gif-box" v-if="showBtn == 2||(showBtn == 3&&!isLoading)">
                <template v-if="showBtn == 2">
                  <div class="gif">
                    <img  src="../../public/shan.gif" />
                  </div>
                </template>
                <template v-if="showBtn == 3&&!isLoading">
                  <div class="gif">
                    <span class="yuandian"></span>
                  </div>
                </template>
                <div class="gif-right">
                  ----- 剩余时间 -----
                  <span>00:00:{{30 - Number(num)<10?0:''}}{{ 30 - Number(num) }}</span>
                </div>
              </div>
                {{ message }}
              </div>
              <template v-if="showBtn == 3&&isLoading">
                <div class="progress-item">
                    <span>{{ parseInt((num / 60) * 100) }}%</span>
                    <span>{{ parseInt((num / 30) * 100) }}%</span>
                    <el-progress
                      style="width: calc(100% - 50px); float: right"
                      define-back-color="#CDC6C6"
@@ -141,7 +148,7 @@
                      text-color="#fff"
                      :text-inside="true"
                      :stroke-width="20"
                      :percentage="parseInt((num / 60) * 100)"
                      :percentage="parseInt((num / 30) * 100)"
                    ></el-progress>
                </div>
              </template>
@@ -158,7 +165,7 @@
      <div slot="footer" class="dialog-footer tac" style="overflow: hidden">
        <template v-if="messageError">
          <div class="btn"  @click="confirmClick2">
            <img src="../../public/confirm3.png" />
            <img src="../../public/agin.png" />
          </div>
        </template>
        <template v-else>
@@ -178,7 +185,8 @@
            @click="onSubmit()"
          >
            <i class="el-icon-loading icon-loading" v-if="isLoading"/>
            <img src="../../public/confirm1.png" />
            <img src="../../public/loading.png"  v-if="isLoading"/>
            <img src="../../public/confirm3.png" v-if="!isLoading"/>
          </div>
        </template>
      </div>
@@ -235,7 +243,7 @@
      this.getInfo();
    },
    num() {
      if (this.num == 60) {
      if (this.num == 30) {
        clearInterval(this.timer);
        this.showBtn = 3;
      }
@@ -271,6 +279,7 @@
      this.shutdown();
    },
    getInfo() {
      // 1 未生产 2生产中 3生产完成
      if (
        Object.keys(this.taskData).length > 0 &&
        this.taskData.Procedure.ID &&
@@ -325,13 +334,12 @@
    },
    onSubmit() {
      if (this.taskData.Procedure.ID) {
        (this.message = "工艺参数下发中..."), (this.num = 0);
        this.timer = setInterval(() => {
          this.num = this.num + 1;
          if (this.num == 60 || this.resParams) {
            this.num = 60;
          if (this.num == 30 || this.resParams) {
            this.num = 30;
            this.getCode(this.resParams);
          }
        }, 1000);
@@ -355,10 +363,10 @@
    },
    getCode(res) {
      if (res.code == 200) {
        if (this.num == 60) {
        if (this.num == 30) {
          this.messageError = "下发成功!";
          clearInterval(this.timer);
          // this.num = 60;
          // this.num = 30;
          // this.showBtn = 2;
          this.message = "请确认生产安全!";
@@ -371,7 +379,7 @@
      } else {
        this.messageError = res.msg ? res.msg : "抱歉,工序下发失败!";
        clearInterval(this.timer);
        this.num = 60;
        this.num = 30;
        this.showBtn = 2;
        this.message = "请确认生产安全!";
      }
@@ -479,11 +487,11 @@
    width: 100%;
  }
  .icon-loading{
    font-size:19px;
    font-size:32px;
    color:#333;
    position:absolute;
    line-height:3.4;
    left:15%;
    line-height:2.0;
    left:38%;
  }
  &:nth-of-type(1) {
    // margin-right: 30px;
@@ -572,7 +580,7 @@
    overflow: hidden;
  }
  .title-auto-box {
    height: calc(100% - 160px);
    height: calc(100% - 220px);
    overflow: auto;
    width:calc(100% - 140px);
    margin: 0 auto; 
@@ -582,17 +590,31 @@
      width:calc(100% - 20px);
    }
  }
  .gif{
    width:35px;
  .gif-box{
    width:230px;
    margin:0 auto;
    display:inline-block;
    .gif-right{
      width:210px;
      font-size:14px;
      color:#fff;
      line-height:28px;
      span{
        font-weight: 700;
        font-size:18px;
      }
    }
  }
  .gif{
    width:56px;
    vertical-align: middle;
    float:left;
    margin-right:20px;
    img{
      width:100%;
    }
    .yuandian {
        width: 35px;
        height: 35px;
        width: 56px;
        height: 56px;
        display: inline-block;
        // background: #15d815;
        background:red;
src/views/visualization.vue
@@ -13,9 +13,17 @@
            <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)">
          <span class="font set-title" style="float: left;margin-right: 15px;" @click="cutClick(2)">
            <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
            class="font set-title"
            style="float: left; "
            @click="cutClick(3)"
          >
            <img style="width:32px;" v-if="activeName == 3" src="../../public/one-blue.png" />
            <img style="width:32px;" v-else src="../../public/one.png" />
          </span>
          生产管理看板
          <span
@@ -33,7 +41,7 @@
        </span>
        </p>
        <div
          :class="activeName == 1 ? 'active-one' : 'active-two'"
          :class="(activeName == 1||activeName == 3) ? 'active-one' : 'active-two'"
          v-for="(taskData, index) in Tasks"
          :key="index"
        >
@@ -110,7 +118,7 @@
              </div>
            </div>
            <div class="content_right">
              <el-descriptions :column="activeName == 1 ? 2 : 1" :colon="true">
              <el-descriptions :column="(activeName == 1||activeName == 3) ? 2 : 1" :colon="true">
                <el-descriptions-item label="产品名称">{{
                  taskData.Order.productName || ""
                }}</el-descriptions-item>
@@ -308,7 +316,7 @@
                      <!-- <div class="card_content">
                        
                      </div> -->
                      <div :class="activeName==1?'card_top-4 font_size_20px':'card_top-4'">
                      <div :class="(activeName==1||activeName == 3)?'card_top-4 font_size_20px':'card_top-4'">
                        <div>工艺编号:<div >{{ list.number }}</div></div>
                        <!-- <div
                          style="
@@ -408,7 +416,7 @@
        </template>
          <!-- 2个任务的时候,第二个任务为空的时候显示 -->
          <template
              v-if="activeName == 2 &&(!taskData||Object.keys(taskData).length==0)"
              v-if="activeName == 2 &&(!taskData||Object.keys(taskData).length==0||(Tasks.length<2))"
            >
            <el-empty description="暂无任务..."></el-empty>
          </template>
@@ -883,7 +891,6 @@
            this.Tasks[i].procedureList = [];
            this.Tasks[i].inputMaterials = [];
            this.Tasks[i].outputMaterials = [];
            this.Tasks[i].finishNumber = 0;
            this.finishShow['finishShow&'+i]=false
            this.Tasks[i].Procedure.procedure.workers = this.Tasks[i].Procedure
              .procedure.workers
@@ -946,6 +953,7 @@
    getProgressInfo() {
      for (let i in this.Tasks){
        if(this.Tasks[i].Procedure.ID){
          this.Tasks[i].finishNumber = 0;
          getProgress({
            position: Number(i),
            procedureId: this.Tasks[i].Procedure.ID,
@@ -971,19 +979,7 @@
        path: "/set",
      });
    },
    // 右侧控制
    controlClick() {
      if (this.Tasks.length > 0) {
        for(let i in this.Tasks){
          if(this.Tasks[i].Procedure.Status==1){
            this.$refs.control.islook = true;
            break;
          }
        }
      } else {
        this.$message.error("当前设备没有工序!");
      }
    },
    // 右侧完成
    finishClick(i, taskData) {
      if (Object.keys(taskData).length > 0 && taskData.Procedure.ID) {
vue.config.js
@@ -67,9 +67,9 @@
        changeOrigin: true,
      },
      "/v1/": {
        target: "http://127.0.0.1:8003",
        // target: "http://127.0.0.1:8003",
       
        // target: "http://192.168.20.120:8003",
        target: "http://192.168.20.120:8003",
        ws: true,
        changeOrigin: true,
      },