haoxuan
2023-08-28 38e0e2b39714aa29aacf9636097e464c50fcc1c3
面板的提示 报错 换成弹框
4个文件已修改
72 ■■■■ 已修改文件
src/assets/style/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/AddControl.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/visualization.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/style/index.scss
@@ -444,6 +444,7 @@
}
.el-button.el-button--small{
  padding:6px 6px;
  font-size:12px!important;
}
.el-form--label-left .el-form-item__label{
  font-size: 13px;
src/components/AddControl.vue
@@ -104,7 +104,14 @@
          }
        }) 
      }else{
        this.$message.error("当前设备没有工序!");
        this.$confirm( "当前设备没有工序!", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {})
          .catch(() => {});
      }
    },
    shutdown() {
src/utils/request.js
@@ -1,6 +1,6 @@
import axios from "axios";
import util from "@/libs/util.js";
import { Message } from "element-ui";
import { Message,MessageBox } from "element-ui";
// import router from '@/router'
@@ -38,12 +38,20 @@
      return res.data ? res.data : {};
    } else {
      if(!res.config.loadingFlag){
        Message({
          // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data,
          message: res.data.msg,
          type: 'error',
          duration: 5 * 1000
        // Message({
        //   // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data,
        //   message: res.data.msg,
        //   type: 'error',
        //   duration: 5 * 1000
        // })
        MessageBox.confirm( res.data.msg+"?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
          })
          .catch(() => {});
      }
      return res.data ? res.data : {};
    }
@@ -57,11 +65,18 @@
    } else if (message.includes('Request failed with status code')) {
      message = '系统接口' + message.substr(message.length - 3) + '异常'
    }
    Message({
      message: message,
      type: 'error',
      duration: 5 * 1000
    // Message({
    //   message: message,
    //   type: 'error',
    //   duration: 5 * 1000
    // })
    MessageBox.confirm( message+"?", "提示", {
      confirmButtonText: "确定",
      cancelButtonText: "取消",
      type: "warning",
    })
      .then(() => {})
      .catch(() => {});
    return Promise.reject(error)
  }
)
src/views/visualization.vue
@@ -729,7 +729,13 @@
      if (Object.keys(this.taskData).length > 0 && this.taskData.Procedure.ID) {
        this.$refs.control.islook = true;
      } else {
        this.$message.error("当前设备没有工序!");
        this.$confirm( "当前设备没有工序!", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {})
          .catch(() => {});
      }
    },
    // 右侧完成
@@ -743,7 +749,13 @@
          }
        });
      } else {
        this.$message.error("当前设备没有工序!");
        this.$confirm( "当前设备没有工序!", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {})
          .catch(() => {});
      }
    },
    getRandomNumber(min, max) {
@@ -832,11 +844,7 @@
  font-size: 30px;
  font-weight: 700;
}
.el-button--primary {
  border: 0;
  font-weight: 700 !important;
  font-size: 16px !important;
}
.color_4efefa {
  color: #4efefa;
}
@@ -1349,4 +1357,9 @@
    }
  }
}
.el-button--primary {
  border: 0;
  font-weight: 700 !important;
  font-size: 16px;
}
</style>