| | |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情 |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;height: 60px;"> |
| | | <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')">电调/非电调模板切换</el-button> |
| | | <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')&&insOrder.sampleType!='无源器件'">电调/非电调模板切换</el-button> |
| | | <el-select v-model="template" size="medium" placeholder="电路预设模板" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" |
| | | @change="selectInsProductTemplateById"> |
| | | <el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name"> |
| | |
| | | <!-- 电路试验 --> |
| | | <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" style="width: 100%;overflow-x: auto;overflow-y: visible;"> |
| | | <!-- <Circuit></Circuit> --> |
| | | <!-- 电调 --> |
| | | <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum" ref="CircuitParameters"></CircuitParameters1> |
| | | <!-- 非电调 --> |
| | | <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum" ref="CircuitParameters"></CircuitParameters2> |
| | | <!-- 无源器件 --> |
| | | <CircuitParameters3 v-if="this.insOrder.sampleType=='无源器件' " :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum" ref="CircuitParameters"></CircuitParameters3> |
| | | </div> |
| | | <!-- 温湿度试验 --> |
| | | <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('温湿度试验')"> |
| | |
| | | import excelFunction from '../../../util/excelFountion' |
| | | import CircuitParameters1 from './circuit-parameters1.vue' |
| | | import CircuitParameters2 from './circuit-parameters2.vue' |
| | | import CircuitParameters3 from './circuit-parameters3.vue' |
| | | import Humidity from './humidity.vue' |
| | | import PowerCapacity from './power-capacity.vue' |
| | | import filePreview from '../../tool/file-preview.vue' |
| | |
| | | ValueTable, |
| | | CircuitParameters1, |
| | | CircuitParameters2, |
| | | CircuitParameters3, |
| | | filePreview, |
| | | Humidity, |
| | | PowerCapacity, |
| | |
| | | this.scrollInit() |
| | | this.getPower() |
| | | this.startWorker() |
| | | this.selectInsProductTemplate() |
| | | }, |
| | | watch: { |
| | | // 监听任务id,获取任务信息 |
| | |
| | | this.componentData0.entity.insSampleId = val; |
| | | this.componentData0.entity.insOrderId = this.orderId0; |
| | | this.$refs.fileList.selectList() |
| | | this.selectInsProductTemplate() |
| | | this.urgentList.forEach(m => { |
| | | if (m.value == this.insOrder.type) { |
| | | this.insOrder.typeName = m.label |
| | |
| | | this.tableList = null; |
| | | this.tableList = [this.tableLists[0]] |
| | | this.currentTable = this.tableLists[0].templateId; |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')&&this.currentTableState!=0&&this.currentTableState!=1){ |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')&&this.currentTableState!=0&&this.currentTableState!=1&&this.insOrder.sampleType!='无源器件'){ |
| | | this.versionDialogVisible = true |
| | | } |
| | | // 处理页面列表数据 |
| | |
| | | } |
| | | }, |
| | | selectInsProductTemplate(){ |
| | | this.$axios.post(this.$api.insProductTemplate.chooseInsProductTemplate).then(res => { |
| | | this.$axios.post(this.$api.insProductTemplate.chooseInsProductTemplate,{ |
| | | version:this.insOrder.sampleType=='无源器件'?2:'' |
| | | }).then(res => { |
| | | if (res.code == 201) return |
| | | this.templates = res.data |
| | | }) |
| | |
| | | this.$axios.post(this.$api.insProductTemplate.getInsProductTemplate + '?id=' + e).then(res => { |
| | | if (res.code == 201) return |
| | | let obj = JSON.parse(res.data.message) |
| | | if(this.currentTableState!=res.data.version){ |
| | | if(this.currentTableState!=res.data.version&&this.insOrder.sampleType!='无源器件'){ |
| | | this.$message.error('电调/非电调模板版本不一致,请重新选择') |
| | | this.template = null |
| | | return |
| | |
| | | this.templateLoading = true; |
| | | this.$axios.post(this.$api.insProductTemplate.addInsProductTemplate, { |
| | | name: this.templateName, |
| | | version:this.currentTableState, |
| | | version:this.insOrder.sampleType=='无源器件'?2:this.currentTableState, |
| | | message:JSON.stringify(obj) |
| | | }, { |
| | | headers: { |