licp
2024-08-06 5b4acf22b23079c1f689e217f55780f864ac79c6
完成定时更新
已修改3个文件
33 ■■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/timer.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -1572,10 +1572,19 @@
              isHaveBushing = false
            }
          })
          console.log('isHaveBushing===', this.totalArr)
          // inspectionItem
          let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('松套管'))
          // console.log('isHaveBushing===', isHaveBushing)
          if (productListSelected && select[2] === '光缆' && isHaveBushing === false) {
            this.$message.error('光缆温度循环项目必须进行光纤配置')
            this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
            this.rowClick(this.currentMethod)
            this.sampleIds = [this.currentMethod.id]
            this.openConfig()
            return
          }else if(spcialItem&& isHaveBushing === false){
            this.$message.error('松套管项目必须进行光纤配置')
            this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
            this.rowClick(this.currentMethod)
            this.sampleIds = [this.currentMethod.id]
@@ -1821,7 +1830,6 @@
      },
      saveMethod(sampleList){
        this.saveLoad = true
        console.log(333333,sampleList)
        this.$axios.post(this.$api.insOrder.addInsOrder, {
          str: JSON.stringify({
            insOrder: this.addObj,
src/main.js
@@ -20,14 +20,14 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
// const javaApi = 'http://192.168.92.2:8001';
const javaApi = 'http://192.168.92.249:8001';
//云
// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
// const javaApi = 'http://114.132.189.42:1234';
// //检测中心正式库
// Vue.prototype.LOCATIONVUE = "http://10.1.200.86:8080";
const javaApi = 'http://10.1.200.86:8001';
// const javaApi = 'http://10.1.200.86:8001';
//装备电缆测试库
// Vue.prototype.LOCATIONVUE = "http://10.16.173.59";
src/view/timer.vue
@@ -3,12 +3,11 @@
    <el-dialog
    title="提示"
    :visible.sync="dialogVisible"
    width="30%"
    :before-close="handleClose">
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :show-close="false"
    width="30%">
      <div style="display: flex;align-items: center;"><i class="el-icon-warning" style="color: red;font-size: 40px;margin-right: 20px;"></i><span>代码正在部署,请30分钟后重新进入系统!</span></div>
    </el-dialog>
  </div>
</template>
@@ -36,7 +35,7 @@
      const hours = now.getHours();
      const minutes = now.getMinutes();
      if (hours === 22 && minutes === 0) {
      if (hours === 20 && minutes === 0) {
        this.performTask();
        // 设置20分钟后提示关闭
        this.closeTimeout = setTimeout(() => {
@@ -47,11 +46,13 @@
    performTask() {
      // 在这里执行你想要的定时任务
      console.log("任务执行了!");
      this.dialogVisible = true;
      // 这里可以触发一个 Vuex 动作、发起一个 HTTP 请求,或者其他操作
    },
    promptToClose() {
      // 提示用户关闭
      alert("请记得在20分钟后关闭任务!");
      // alert("请记得在20分钟后关闭任务!");
      this.dialogVisible = true;
    }
  },
  beforeDestroy() {