licp
2024-08-10 975e6dfbd9688eb3767fc6d1febd18a360df84aa
修改
已修改3个文件
53 ■■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/Inspection.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/worker.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -358,7 +358,7 @@
                    <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v"
                              :disabled="(getInspectionItemType(n.i) == 1 && !dataAcquisitionEidtAble )|| (n.u != userId && n.u != undefined && n.u != '')"
                              @input="handleInput(n)"
                              @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`, n)" @mousewheel.native.prevent :key="'abc-'+'000'+index+'000'+i+'000'+j"
                              @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`, n,'getDataType')" @mousewheel.native.prevent :key="'abc-'+'000'+index+'000'+i+'000'+j"
                              @keydown.enter="changeInput('',`${item.templateId}-${n.r}-${n.c}-${n.i}`, n)">
                      <!-- <el-button slot="append" type="primary" icon="el-icon-edit" size="mini"
                        v-if="getInspectionItemType(n.i) == 1" @click="getSystemValue(n)"></el-button> -->
@@ -366,10 +366,10 @@
                    <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea"
                      v-model="n.v.v"
                      :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
                      @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
                      @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`,'getDataType')" />
                    <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v"
                      :disabled="state>1||getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" @visible-change="e=>getDic(e,n.i)"
                       @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)">
                       @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`,'getDataType')">
                      <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>
                    </el-select>
                    <span :style="`font-family:${n.v.ff} !important;`"
@@ -1057,7 +1057,8 @@
        getDataIndex:[],
        getDataIndexLoading:false,
        changeType:null,
        getDataTypeId:''
        getDataTypeId:'',
        getDataType:null
      }
    },
    computed: {
@@ -1296,6 +1297,11 @@
        }
      },
      handleDataAcquisition(data){
        if(this.dataAcquisitionEidtAble){
          this.getDataType = 1;
        }else{
          this.getDataType = 2;
        }
        this.dataAcquisitionInfo = {}
        this.getData = []
        for (let i in data){
@@ -2653,7 +2659,10 @@
        })
        this.handleExcelMethod()
      },
      changeInput(m, code, n) {
      changeInput(m, code, n,getDataType) {
        if(getDataType=='getDataType'){
          this.getDataType = 2;
        }
        // let str = code.split('-')
        // let pId = str[3]
        // if(!this.param[pId].equipValue||this.param[pId].equipValue.length==0||!this.param[pId].equipValue[0].v.v){
@@ -2732,14 +2741,10 @@
        } catch (error) {
          console.log(444,error);
        }
        let getDataType = false
        // 监听 Worker 返回的结果
        this.worker.onmessage = (event) => {
          this.result = JSON.parse(event.data);
          if(this.result.value.getDataTypeId){
            getDataType = true
          }
          switch (this.result.method){
            case 'saveInsContext':
              this.$nextTick(()=>{
@@ -2755,13 +2760,28 @@
                    }
                  }
                }
                if(this.isGet&&!this.dataAcquisitionEidtAble&&!getDataType){
                  return
                }
                setTimeout(()=>{
                console.log(99999,this.result.value.getDataTypeId)
                if(this.isGet&&!this.dataAcquisitionEidtAble){
                  if(this.result.value.getDataTypeId==''){
                    return
                  }
                  setTimeout(()=>{
                    this.saveInsContext()
                  },2000)
                }else if(this.isGet&&this.dataAcquisitionEidtAble){
                  if(this.getDataType==1){
                    if(this.result.value.getDataTypeId==''){
                      return
                    }
                    setTimeout(()=>{
                      this.saveInsContext()
                    },2000)
                  }else{
                    this.saveInsContext()
                  }
                }else{
                  this.saveInsContext()
                },2000)
                // this.saveInsContext()
                }
              })
              break;
            case 'tableList':
src/main.js
@@ -20,7 +20,7 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.92.249:8001';
const javaApi = 'http://192.168.0.104:8001';
//云
// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
// const javaApi = 'http://114.132.189.42:1234';
static/js/worker.js
@@ -300,7 +300,6 @@
          // console.log('1234567789', tableList,getParam())
          // console.log('1234567789', item)
          let getDataType0 = false
          console.log('1234567789', item.i,getDataTypeId)
          if(item.i==getDataTypeId){
            getDataType0 = true
          }