| | |
| | | <el-tag :type="item.state==1?'success':'danger'" style="float: right;margin-top: 5px;" size="small">{{ item.state==1?'已检':'未检' }}</el-tag> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-radio-group v-model="currentTab" size="small" v-if="fibers.length>0" @input="m=>handleChange(m,1)"> |
| | | <el-radio-button :label="item.id" v-for="(item,index) in fibers" :key="index" |
| | | size="small">{{ item.code }}</el-radio-button> |
| | | </el-radio-group> --> |
| | | <span v-if="fiber.length>0"> 光纤:</span> |
| | | <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,2)" v-if="fiber.length>0" size="small"> |
| | | <el-option |
| | |
| | | <el-tag :type="item.state==1?'success':'danger'" style="float: right;margin-top: 5px;" size="small">{{ item.state==1?'已检':'未检' }}</el-tag> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-radio-group v-model="currentTab" size="small" v-if="fiber.length>0" @input="m=>handleChange(m,2)"> |
| | | <el-radio-button :label="item.id" v-for="(item,index) in fiber" :key="index" |
| | | size="small">{{ item.bushColor+'-'+item.color }}</el-radio-button> |
| | | </el-radio-group> --> |
| | | <el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px" style="padding-top: 0;padding-left: 10px;" v-if="PROJECT=='检测中心'"> |
| | | <el-form-item label="温度:" style="margin-bottom: 0;"> |
| | | <el-input v-model="otherForm.temperature" size="small" placeholder="" style="width: 90px;" @change="m=>subOtherForm(m,'temperature')"></el-input> |
| | |
| | | <span style="margin-left: 4px;">%</span> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- <el-button type="primary" size="small">编辑数采</el-button> --> |
| | | <el-button type="primary" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='检测中心'" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">数据采集</el-button> |
| | | <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="dataAcquisitionEidt>0&&PROJECT=='检测中心'" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'关闭编辑':'编辑数采'}}</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'"> |
| | |
| | | :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]}px;`"> |
| | | <template v-if="n.v.ps!=undefined && typeof n.v.ps.value ==='string'&& n.v.ps.value.includes('检验值') && state==1"> |
| | | <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v" |
| | | :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" |
| | | :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"> |
| | | <el-button slot="append" type="primary" icon="el-icon-edit" size="mini" |
| | | v-if="getInspectionItemType(n.i) == 1" @click="getSystemValue(n)"></el-button> |
| | | <!-- <el-button slot="append" type="primary" icon="el-icon-edit" size="mini" |
| | | v-if="getInspectionItemType(n.i) == 1" @click="getSystemValue(n)"></el-button> --> |
| | | </el-input> |
| | | <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea" |
| | | v-model="n.v.v" |
| | |
| | | <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button type="primary" icon="el-icon-document-copy" size="small" circle title="数采" v-if="n.isItADataAcquisitionDevice&&PROJECT=='检测中心'" @click="getDataAcquisitionDevice(n.v.v)"></el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-document-copy" size="small" circle title="数采" v-if="n.isItADataAcquisitionDevice&&PROJECT=='检测中心'" @click="getDataAcquisitionDevice(n.v.v)"></el-button> --> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='要求值' && state==1"> |
| | | <span :style="`font-family:${n.v.ff} !important;`">{{getTell(n.i)}}</span> |
| | |
| | | }, |
| | | result: null, |
| | | worker: null, |
| | | dataAcquisitionBtn:{}, |
| | | wareLength:[] |
| | | wareLength:[], |
| | | dataAcquisitionInfo:{}, |
| | | dataAcquisitionEidt:0, |
| | | dataAcquisitionEidtAble:false, |
| | | dataAcquisitionLoading:false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | this.getAuthorizedPerson() |
| | | this.scrollInit() |
| | | this.getPower() |
| | | this.startWorker() |
| | | }, |
| | | watch: { |
| | | id(val) { |
| | |
| | | this.saveInsContext() |
| | | } |
| | | } |
| | | }, |
| | | param:{ |
| | | deep:true, |
| | | handler(val){ |
| | | this.dataAcquisitionEidt = 0 |
| | | if(val){ |
| | | for (let key in val) { |
| | | val[key].equipValue.forEach(m=>{ |
| | | if(m.isItADataAcquisitionDevice){ |
| | | this.dataAcquisitionEidt++ |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | this.stopWorker(); |
| | | }, |
| | | methods: { |
| | | getDataAcquisitionDevice(managementNumber){ |
| | | this.$axios.get(this.$api.deviceScope.dataCollection+'?managementNumber='+managementNumber+'&entrustCode='+this.insOrder.entrustCode+'&sampleCode='+this.currentSample.sampleCode).then(res=>{ |
| | | console.log(111,res) |
| | | getDataAcquisitionDevice(){ |
| | | this.dataAcquisitionLoading = true |
| | | this.$axios.get(this.$api.deviceScope.dataCollection+'?entrustCode='+this.insOrder.entrustCode+'&sampleCode='+this.currentSample.sampleCode).then(res=>{ |
| | | this.dataAcquisitionLoading = false |
| | | if(res.code!=200){ |
| | | return |
| | | } |
| | | this.dataAcquisitionInfo = res.data |
| | | let list = this.currentSample.insProduct[0].arr |
| | | list.forEach((item,index)=>{ |
| | | item.forEach(m=>{ |
| | | if(m.v.ps&&(m.v.ps.value=='检验子项'||m.v.ps.value=='检验项')){ |
| | | if(this.dataAcquisitionInfo[m.v.m]){ |
| | | let num = 0; |
| | | list[index].forEach(n=>{ |
| | | if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('检验值')){ |
| | | num++ |
| | | } |
| | | }) |
| | | list[index].forEach(n=>{ |
| | | if(n.v.ps&&n.v.ps.value&&typeof n.v.ps.value == 'string'&&n.v.ps.value.includes('检验值')){ |
| | | if(n.v.ps.value.includes(this.dataAcquisitionInfo.frequency)){ |
| | | setTimeout(()=>{ |
| | | n.v.v = this.dataAcquisitionInfo[m.v.m] |
| | | this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) |
| | | },1000) |
| | | }else if(this.dataAcquisitionInfo.frequency>num){ |
| | | if(n.v.ps.value.includes(num)){ |
| | | setTimeout(()=>{ |
| | | n.v.v = this.dataAcquisitionInfo[m.v.m] |
| | | this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) |
| | | },200) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | startWorker() { |
| | |
| | | } catch (e) {} |
| | | try { |
| | | let insValue = JSON.parse(a.insProductResult.insValue) |
| | | console.log(2222,insValue) |
| | | for (let i = 0; i < insValue.length; i++) { |
| | | if(this.param[a.id].insValue.find(m=>m.c==insValue[i].c&&m.r==insValue[i].r)){ |
| | | this.param[a.id].insValue.find(m=>m.c==insValue[i].c&&m.r==insValue[i].r).v.v = insValue[i].v |
| | |
| | | if(equipValue[i].v){ |
| | | let isItADataAcquisitionDevice = await this.determineWhetherToCollectData(equipValue[i].v) |
| | | this.param[a.id].equipValue[i].isItADataAcquisitionDevice = isItADataAcquisitionDevice |
| | | this.dataAcquisitionEidt = 0 |
| | | if(this.param){ |
| | | for (let key in this.param) { |
| | | this.param[key].equipValue.forEach(m=>{ |
| | | if(m.isItADataAcquisitionDevice){ |
| | | this.dataAcquisitionEidt++ |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }else{ |
| | | this.param[a.id].equipValue[i].isItADataAcquisitionDevice = false |
| | | } |
| | |
| | | this.handleExcelMethod() |
| | | }, |
| | | changeInput(m, code, n) { |
| | | console.log(m, code) |
| | | if (n) { |
| | | // if (this.PROJECT === '装备电缆') { |
| | | // let num2 = new this.$Big(n.v.v) |
| | |
| | | n.v.v = n.v.v.replace('/', '') |
| | | } |
| | | } |
| | | this.startWorker() |
| | | |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.worker.postMessage(JSON.stringify({ |
| | | code: code, |
| | |
| | | } |
| | | } |
| | | } |
| | | console.log(2222,this.param) |
| | | this.saveInsContext() |
| | | }) |
| | | break; |