| | |
| | | <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> --> |
| | |
| | | <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;`" |
| | |
| | | <td style="text-align: left;"> |
| | | <el-checkbox-group |
| | | v-model="getDataIndex" :max="item.child[0].maxNum"> |
| | | <el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j+'ppppppppp'">{{n}}</el-checkbox> |
| | | <el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j">{{n}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | |
| | | <td style="text-align: left;"> |
| | | <el-checkbox-group |
| | | v-model="getDataIndex" :max="m.maxNum"> |
| | | <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'">{{n}}</el-checkbox> |
| | | <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j">{{n}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </td> |
| | | </tr> |
| | |
| | | import file from '../../../util/file' |
| | | import excelFunction from '../../../util/excelFountion' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state'], |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList'], |
| | | components: { |
| | | ValueTable, |
| | | }, |
| | |
| | | getDataIndex:[], |
| | | getDataIndexLoading:false, |
| | | changeType:null, |
| | | getDataTypeId:'' |
| | | getDataTypeId:'', |
| | | getDataType:null |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }, |
| | | handleDataAcquisition(data){ |
| | | if(this.dataAcquisitionEidtAble){ |
| | | this.getDataType = 1; |
| | | }else{ |
| | | this.getDataType = 2; |
| | | } |
| | | this.dataAcquisitionInfo = {} |
| | | this.getData = [] |
| | | for (let i in data){ |
| | |
| | | child:[] |
| | | } |
| | | for(let j in data[i]){ |
| | | let str0 = '' |
| | | if(i==j){ |
| | | str0 = i+',' |
| | | }else{ |
| | | str0 = i+','+j |
| | | } |
| | | if(j!='frequency'&&data[i][j]&&typeof data[i][j].result == 'string'){ |
| | | this.dataAcquisitionInfo[i+','+j] = { |
| | | this.dataAcquisitionInfo[str0] = { |
| | | value:data[i][j].result, |
| | | frequency:data[i].frequency |
| | | } |
| | |
| | | list.forEach((item,index)=>{ |
| | | let num0 = 0; |
| | | let str = '' |
| | | let str0 = i+','+j |
| | | item.forEach(m=>{ |
| | | if(m.v.ps&&(m.v.ps.value=='检验子项'||m.v.ps.value=='检验项')){ |
| | | if(m.v.ps&&m.v.ps.value=='检验项'){ |
| | |
| | | }) |
| | | }) |
| | | }else if(j!='frequency'&&data[i][j]&&Array.isArray(data[i][j].result)){ |
| | | let str0 = i+','+j |
| | | let str0 = '' |
| | | if(i==j){ |
| | | str0 = i+',' |
| | | }else{ |
| | | str0 = i+','+j |
| | | } |
| | | let list = this.tableList[0].arr |
| | | let maxNum = 0 |
| | | list.forEach((item,index)=>{ |
| | |
| | | } |
| | | }) |
| | | }) |
| | | // let arr3 = [] |
| | | // for (let l=0 ;i<data[i][j].result.length;i++){ |
| | | // arr3.push({ |
| | | // id:, |
| | | // value: |
| | | // }) |
| | | // } |
| | | let obj0 = { |
| | | name:j, |
| | | arr:data[i][j].result, |
| | |
| | | if(data[i][j].result&&Array.isArray(data[i][j].result)&&data[i][j].result.length>maxNum){ |
| | | obj.child.push(obj0) |
| | | }else{ |
| | | this.dataAcquisitionInfo[i+','+j] = { |
| | | this.dataAcquisitionInfo[str0] = { |
| | | value:data[i][j].result |
| | | } |
| | | } |
| | |
| | | } |
| | | if(this.getData.length>0){ |
| | | this.dataGetDia = true |
| | | this.getDataIndex = [] |
| | | }else{ |
| | | try { |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | |
| | | } catch (e) {} |
| | | try { |
| | | let equipName = JSON.parse(a.insProductResult.equipName) |
| | | // console.log(2222222,equipName) |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){ |
| | | this.param[a.id].equipName = [] |
| | | for (let i = 0; i < equipName.length; i++) { |
| | |
| | | } |
| | | } |
| | | for (let i = 0; i < equipName.length; i++) { |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='热循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温升试验原始记录模板')){ |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='温度循环检验原始记录'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('热循环')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('温升试验'))){ |
| | | console.log(2222222,equipName) |
| | | // 温度循环赋值 |
| | | this.$set(this.equipForm,`value`+i,equipName[i].v) |
| | | this.param[a.id].equipName[i].v.v = equipName[i].v |
| | |
| | | }) |
| | | 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){ |
| | |
| | | } 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(()=>{ |
| | |
| | | } |
| | | } |
| | | } |
| | | 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': |
| | |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | let userName = JSON.parse(localStorage.getItem("user")).name; |
| | | // let userName = JSON.parse(localStorage.getItem("user")).name; |
| | | res.data.forEach(a => { |
| | | if(a.name !== userName) { |
| | | if(!this.inspectorList.includes(a.name)) { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |