| | |
| | | claimInsOrderPlan: "/insOrderPlan/claimInsOrderPlan", //è®¤é¢æ£éªä»»å¡ |
| | | doInsOrder: "/insOrderPlan/doInsOrder", //æ§è¡æ£éªæä½ |
| | | saveInsContext: "/insOrderPlan/saveInsContext", //ä¿åæ£éªå
容 |
| | | saveInsContext2: "/insOrderPlan/saveInsContext2", //ä¿åæ£éªå
容 |
| | | deleteInsContext: "/insOrderPlan/deleteInsContext", //å é¤é¢æ®µ |
| | | deleteInsContext2: "/insOrderPlan/deleteInsContext2", //å é¤é¢ç¹ |
| | | upPlanUser: "/insOrderPlan/upPlanUser", //ä»»å¡äº¤æ¥ |
| | | upPlanUser2: "/insOrderPlan/upPlanUser2", //ä»»å¡äº¤æ¥ |
| | | verifyPlan: "/insOrderPlan/verifyPlan", //夿 ¸æ£éªä»»å¡ |
| | |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;" >æ£éªå详æ
|
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- <el-button size="small" type="primary" @click="fiberOpticVisible=true" v-if="fiberOptic.length>0">å
çº¤åæ¢</el-button> |
| | | <el-button size="small" type="primary" @click="fiberOpticTapeVisible=true" v-if="fiberOpticTape.length>0">å
çº¤å¸¦åæ¢</el-button> |
| | | <el-button size="small" type="primary" @click="bushingVisible=true" v-if="bushing.length>0">å¥ç®¡åæ¢</el-button> --> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">æ ·å忢</el-button> |
| | | <el-button size="small" type="primary" @click="taskVisible=true">ä»»å¡åæ¢</el-button> |
| | | <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åç¼å·:"> |
| | | <el-tooltip :disabled="!currentSample.sampleCode" :content="currentSample.sampleCode"> |
| | | <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="请è¾å
¥" ></el-input> |
| | | <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="请è¾å
¥" tooltip></el-input> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°:"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åæ°é:"> |
| | | <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请è¾å
¥" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è¯éªæ å:"> |
| | | <span>{{ insOrder.testRequirements?insOrder.testRequirements:'-' }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åæ¶é´:"> |
| | | <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="请è¾å
¥"></el-input> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨:"> |
| | | <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span> |
| | | <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | <el-radio-group v-model="currentTable" size="small"> |
| | | <el-radio-button :label="item.templateId" v-for="(item,index) in tableLists" :key="index" |
| | | size="small">{{ item.templateName }}</el-radio-button> |
| | | </el-radio-group> |
| | | <span style="margin-left: 20px;margin-right: 10px;">模æ¿çæ¬:</span> |
| | | <el-radio-group v-model="currentTableState" size="small"> |
| | | <el-radio-button label="0" size="small">çæ¬ä¸</el-radio-button> |
| | | <el-radio-button label="1" size="small">çæ¬äº</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div style="display: flex;align-items: center;"> |
| | |
| | | <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-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" :disabled="state>1" size="small" placeholder="" style="width: 90px;" @change="m=>subOtherForm(m,'temperature')" ></el-input> |
| | | <span style="margin-left: 4px;">â</span> |
| | | </el-form-item> |
| | | <el-form-item label="湿度:" style="margin-bottom: 0;"> |
| | | <el-input v-model="otherForm.humidity" :disabled="state>1" size="small" placeholder="" style="width: 90px;" @change="m=>subOtherForm(m,'humidity')"></el-input> |
| | | <span style="margin-left: 4px;">%</span> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-button type="primary" size="small" v-if="(isGet||tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='æ¸©åº¦å¾ªç¯æ£éªåå§è®°å½'&&temDataAcquisition)&&PROJECT=='æ£æµä¸å¿'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">æ°æ®éé</el-button> |
| | | <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(isGet||(tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='æ¸©åº¦å¾ªç¯æ£éªåå§è®°å½'))&&PROJECT=='æ£æµä¸å¿'&&collected&&state==1" @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!='æ¸©åº¦å¾ªç¯æ£éªåå§è®°å½'&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('ç循ç¯')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('温åè¯éª'))&&(tableLists.find(m=>m.templateId==currentTable).templateName!='å¼§åç¹æ§æ£éªåå§è®°å½')"> |
| | | <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(!tableLists.find(m=>m.templateId==currentTable).templateName.includes('çµè·¯è¯éª'))"> |
| | | <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index+currentTable+currentSample.id"> |
| | | <tbody> |
| | | <tr v-for="(m,i) in item.arr" :key="i"> |
| | |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <!-- çµè·¯è¯éª --> |
| | | <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"></CircuitParameters1> |
| | | <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state"></CircuitParameters2> |
| | | </div> |
| | | <el-upload :action="action" |
| | | :data="{ |
| | | orderId:id |
| | |
| | | :delUrl="$api.insOrderPlan.delfile" |
| | | :key="upIndex" style="height: 100%;margin-top: 16px;"/> |
| | | </div> |
| | | <el-drawer title="å
çº¤åæ¢" :visible.sync="fiberOpticVisible" :size="500"> |
| | | <el-table class="el-table" ref="fiberOpticTable" :data="fiberOptic" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeOptic" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey2" :row-key="record=>record.index" v-if="fiberOpticVisible"> |
| | | <el-table-column type="index" align="center" label="åºå·" width="70px" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="bushColor" label="管å¥è²æ " min-width="100px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="color" label="å
çº¤è²æ " min-width="100px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="model" label="å
çº¤è§æ ¼" min-width="130px" show-overflow-tooltip |
| | | ></el-table-column> |
| | | <el-table-column prop="standard" label="åèæ å" width="100px" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="å
çº¤å¸¦åæ¢" :visible.sync="fiberOpticTapeVisible" :size="500"> |
| | | <el-table class="el-table" ref="fiberOpticTapeTable" :data="fiberOpticTape" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeTape" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey1" :row-key="record=>record.index" v-if="fiberOpticTapeVisible"> |
| | | <el-table-column type="index" align="center" label="åºå·" width="70px" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="å
纤带ç¼å·" min-width="110px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="model" label="å
çº¤å¸¦è§æ ¼" min-width="110px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="standard" label="åèæ å" width="90px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="num" label="å
çº¤æ£æµé" min-width="110px" show-overflow-tooltip |
| | | ></el-table-column> |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="å¥ç®¡åæ¢" :visible.sync="bushingVisible" :size="500"> |
| | | <el-table class="el-table" ref="bushingTable" :data="bushing" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeBushing" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey0" :row-key="record=>record.index" v-if="bushingVisible"> |
| | | <el-table-column type="index" align="center" label="åºå·" width="70px" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="color" label="ç®¡è²æ " min-width="100px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="standNum" label="æ é" min-width="100px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="testNum" label="æµè¯é" min-width="100px" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="æ ·å忢" :visible.sync="sampleVisible" :size="500"> |
| | | <el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName" |
| | |
| | | |
| | | <script> |
| | | import ValueTable from '../../tool/value-table.vue' |
| | | import Circuit from './circuit.vue' |
| | | import file from '../../../util/file' |
| | | import excelFunction from '../../../util/excelFountion' |
| | | import CircuitParameters1 from './circuit-parameters1.vue' |
| | | import CircuitParameters2 from './circuit-parameters2.vue' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList'], |
| | | components: { |
| | | ValueTable, |
| | | Circuit, |
| | | CircuitParameters1, |
| | | CircuitParameters2 |
| | | }, |
| | | data() { |
| | | return { |
| | | currentTableState:0, |
| | | sagData: [], |
| | | sagForm: { |
| | | sampleCode: null, |
| | |
| | | verifyUser: null, |
| | | personList: [], |
| | | enumList: [], |
| | | fiberOpticVisible:false, |
| | | fiberOpticTapeVisible:false, |
| | | bushingVisible:false, |
| | | fiberOpticTape:[],//å
纤带å表 |
| | | fiberOptic:[],//å
纤å表 |
| | | bushing:[],//å¥ç®¡å表 |
| | |
| | | numOptions:[], |
| | | temperatureOptions:[], |
| | | wareTableData:[], |
| | | otherForm:{ |
| | | humidity:null, |
| | | temperature:null, |
| | | }, |
| | | equipForm:{ |
| | | value0:null, |
| | | code0:null, |
| | |
| | | }, |
| | | thermalCyclingLoading:false, |
| | | temDataAcquisition:false, |
| | | getData:[ |
| | | { |
| | | faName:'æ³¢é¿éå è¡°å', |
| | | child:[ |
| | | { |
| | | name:'1285nm~1330nm', |
| | | arr:[12,13,14,15], |
| | | }, |
| | | { |
| | | name:'1525nm~1575nm', |
| | | arr:[12,13,14,15], |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | faName:'æªè³æ³¢é¿', |
| | | child:[ |
| | | { |
| | | name:'æªè³æ³¢é¿', |
| | | arr:[12,13,14,15], |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | getData:[], |
| | | getDataIndex:[], |
| | | getDataIndexLoading:false, |
| | | changeType:null, |
| | |
| | | this.sampleProduct = res.data.sampleProduct |
| | | this.currentSample = this.HaveJson(this.sampleProduct[0]) |
| | | let insProduct = this.HaveJson(this.currentSample.insProduct) |
| | | // æ¸©åº¦ãæ¹¿åº¦èµå¼ |
| | | if(insProduct&&insProduct.length>0){ |
| | | let {temperature,humidity} = insProduct[0]; |
| | | this.otherForm = { |
| | | temperature:temperature?temperature:null, |
| | | humidity:humidity?humidity:null, |
| | | } |
| | | } |
| | | // è·åå½åæ ·åçæ£éªé¡¹ |
| | | let list = await this.getCurrentProduct(this.currentSample.id,0) |
| | | this.currentSample.insProduct = this.HaveJson(list) |
| | |
| | | this.saveInsContext() |
| | | }, |
| | | // ç循ç¯---ç»æ |
| | | // ä¿åæ¹¿åº¦ãæ¸©åº¦æ°æ® |
| | | subOtherForm(m,type){ |
| | | let ids = [] |
| | | for (let i in this.param) { |
| | | ids.push(i) |
| | | } |
| | | this.$axios.post(this.$api.insOrderPlan.write,{ |
| | | [type]:Number(m), |
| | | ids |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true |
| | | }).then(res => { |
| | | if (res.code == 201) return |
| | | this.$message.success('ä¿åæå') |
| | | }) |
| | | }, |
| | | // æéè·å |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | |
| | | let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory) |
| | | this.tableLoading = false; |
| | | return res.data |
| | | }, |
| | | handleChangeBushing(row, column, event){ |
| | | this.currentBushing = row; |
| | | this.fiberOpticTape = [] |
| | | this.currentFiberOpticTape = null; |
| | | this.fiberOptic = [] |
| | | this.currentFiberOptic = null; |
| | | if(row.fiber&&row.fiber.length>0){ |
| | | // ç´æ¥é
ç½®å
纤 |
| | | this.fiberOptic = row.fiber; |
| | | }else if(row.fibers&&row.fibers.length>0){ |
| | | // é
ç½®å
纤带åï¼åé
ç½®å
纤 |
| | | this.fiberOpticTape = row.fibers; |
| | | } |
| | | this.bushingVisible = false; |
| | | this.currentKey0 = row.index |
| | | }, |
| | | async handleChangeOptic(row, column, event){ |
| | | this.currentFiberOptic = row; |
| | | this.currentFiberOptic.productList.forEach(a => { |
| | | this.param[a.id] = { |
| | | insValue: [], |
| | | comValue: [], |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | } |
| | | }) |
| | | this.fiberOpticVisible = false; |
| | | let list = await this.getCurrentProduct(row.id,2) |
| | | this.getTableLists0(list) |
| | | this.currentKey2 = row.index |
| | | }, |
| | | async handleChangeTape(row, column, event){ |
| | | this.currentFiberOpticTape = row; |
| | | this.param = {} |
| | | this.fiberOptic = [] |
| | | this.currentFiberOptic = null; |
| | | this.currentFiberOpticTape.productList.forEach(a => { |
| | | this.param[a.id] = { |
| | | insValue: [], |
| | | comValue: [], |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | } |
| | | }) |
| | | this.fiberOpticTapeVisible = false; |
| | | let list = await this.getCurrentProduct(row.id,1) |
| | | this.getTableLists0(list) |
| | | if(row.fiber&&row.fiber.length>0){ |
| | | // é
ç½®å
纤 |
| | | this.fiberOptic = row.fiber; |
| | | } |
| | | this.currentKey1 = row.index |
| | | }, |
| | | // åæ¢æ ·å |
| | | async handleChangeSample(row, column, event) { |
| | |
| | | this.$message.error("请æå®å¤æ ¸äººå") |
| | | return |
| | | } |
| | | if(!this.otherForm.humidity){ |
| | | this.$message.error("请è¾å
¥æ¹¿åº¦") |
| | | return |
| | | } |
| | | if(!this.otherForm.temperature){ |
| | | this.$message.error("请è¾å
¥æ¸©åº¦") |
| | | return |
| | | } |
| | | this.addVerifyDia = false |
| | | this.submitLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.checkSubmitPlan, { |
| | |
| | | insResult: null |
| | | } |
| | | }) |
| | | this.fiberOpticTapeVisible = false; |
| | | let list = await this.getCurrentProduct(this.currentFiberOpticTape.id,1) |
| | | this.getTableLists0(list) |
| | | if(this.currentFiberOpticTape.fiber&&this.currentFiberOpticTape.fiber.length>0){ |
| | |
| | | }else{ |
| | | return v |
| | | } |
| | | }, |
| | | async getCurrentItem(){ |
| | | let list = await this.getCurrentProduct(this.currentSample.id,0) |
| | | this.currentSample.insProduct = this.HaveJson(list) |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="circuit-parameters"> |
| | | <el-divider></el-divider> |
| | | <el-row :gutter="5" style="width: calc(100% - 1px);margin-bottom: 10px;"> |
| | | <el-col :span="17"> |
| | | <el-row> |
| | | <el-col :span="23" style="display: flex;flex-wrap: wrap;"> |
| | | <table border="1" cellpadding="10" style="margin: 0 10px 10px 0;" v-for="(item,index) in insProductNew" :key="index + 'ppp'" v-show="isMore?true:(index<3?true:false)"> |
| | | <tr> |
| | | <td style="text-align: center;background: #F0F1F5;"> |
| | | <el-tooltip effect="dark" :content="item.inspectionItemSubclass" placement="top-start"><span style="display: inline-block;width: 95px;" class="single-line-ellipsis">{{ item.inspectionItemSubclass }}</span> |
| | | </el-tooltip> |
| | | </td> |
| | | <td> |
| | | <el-input size="small" placeholder="设å¤åç§°" v-model="item.equipName" style="width: 95px;" readonly></el-input> |
| | | </td> |
| | | <td> |
| | | <el-select v-model="item.equipValue" placeholder="设å¤ç¼ç " size="small" style="width: 95px;" :disabled="state>1" @focus="methodFocus(item)" @change="m=>handleEquip(m,item)"> |
| | | <el-option |
| | | v-for="m in item.equipOptions" |
| | | :key="m.value" |
| | | :label="m.value" |
| | | :value="m.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </el-col> |
| | | <el-col :span="1" v-show="insProductNew.length>3"> |
| | | <el-button icon="el-icon-arrow-down" type="text" @click="isMore=true" v-if="!isMore">æ´å¤</el-button> |
| | | <el-button icon="el-icon-arrow-up" type="text" @click="isMore=false" v-if="isMore">æ¶èµ·</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns"> |
| | | <el-button type="primary" size="small" @click="addList(allBandList)" :disabled="state>1">æ·»å 颿®µ</el-button> |
| | | <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'å é¤é¢æ®µ')" :disabled="state>1">å é¤é¢æ®µ</el-button> |
| | | <el-button type="primary" size="small" @click="addList(angleList)" :disabled="state>1">æ·»å è§åº¦</el-button> |
| | | <el-button size="small" @click="deleteList(angleList.length-1,angleList)" :disabled="state>1">å é¤è§åº¦</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="5" style="font-size: 18px;font-weight: 700;background: #F0F1F5;padding: 16px 0;box-sizing: border-box;width: 100%;"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">æ£éªé¡¹ç®</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">åä½</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">æ åè¦æ±</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div style="text-align: center;">æ£éªç»æ</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">ç»è®º</div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="circuit-parameters-item" v-for="(h,y) in allBandList" :key="y+'ooo'"> |
| | | <div class="circuit-parameters-item-title"> |
| | | <span>颿®µï¼</span> |
| | | <el-select v-model="h.band" placeholder="è¯·éæ©" size="small" style="width: 200px;" :disabled="state>1"> |
| | | <el-option |
| | | v-for="item in bandList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button type="primary" size="small" @click="addList(h.projectList,'äºè°')" style="margin-left: 16px;" :disabled="state>1">æ·»å äºè°</el-button> |
| | | <el-button size="small" @click="deleteList(0,h.projectList,'äºè°')" :disabled="state>1">å é¤äºè°</el-button> |
| | | <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]">ä¿ å</el-button> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <div class="circuit-parameters-item-content"> |
| | | <template v-for="(n,j) in h.projectList"> |
| | | <!-- çµåé©»æ³¢æ¯ --> |
| | | <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" v-if="n.inspectionItemSubclass.includes('驻波æ¯')||n.inspectionItemSubclass.includes('é离度')"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>端å£</td> |
| | | <td v-for="(item,index) in n.portList" :key="index+'aaa'"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="端å£" v-model="item.value" :disabled="state>1"></el-input> |
| | | </div> |
| | | </td> |
| | | <td :rowspan="n.angleList.length+1"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> |
| | | <td> |
| | | <el-input size="small" placeholder="è§åº¦" v-model="item.value" @blur="handleAngle(item.value,index)" :disabled="state>1"></el-input> |
| | | </td> |
| | | <td v-for="(m,i) in n.portList" :key="i+'ggg'"> |
| | | <el-input size="small" placeholder="æå·®å¼" v-model="n.value[index][i]" v-if="n.value[index]" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'ä¸åæ ¼':(n.result===1?'åæ ¼':'å¾
å®') }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- äºè° --> |
| | | <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" v-if="n.inspectionItemSubclass.includes('äºè°')"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>é¢ç¹</td> |
| | | <td :colspan="n.portList.length+1"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="é¢ç¹" v-model="n.often" :disabled="state>1" @blur="handlePort(n)"></el-input> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>è§åº¦</td> |
| | | <td v-for="(item,index) in n.portList" :key="index+'fff'"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="端å£" v-model="item.value" :disabled="state>1"></el-input> |
| | | </div> |
| | | </td> |
| | | <td :rowspan="n.angleList.length+1"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> |
| | | <td> |
| | | <el-input size="small" placeholder="è§åº¦" v-model="item.value" :disabled="state>1" @blur="handleAngle(item.value,index)"></el-input> |
| | | </td> |
| | | <td v-for="(m,i) in n.portList" :key="i+'ggg'"> |
| | | <el-input size="small" placeholder="æå·®å¼" v-model="n.value[index][i]" v-if="n.value[index]" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'ä¸åæ ¼':(n.result===1?'åæ ¼':'å¾
å®') }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- å¹
度åå·®/æå¤§ç¸ä½åå·® --> |
| | | <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" v-if="n.inspectionItemSubclass.includes('åå·®')"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>颿®µ</td> |
| | | <td v-for="(item,index) in n.portList" :key="index+'aaa'"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="端å£" v-model="item.value" :disabled="state>1"></el-input> |
| | | </div> |
| | | </td> |
| | | <td :rowspan="n.angleList.length+1"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> |
| | | <td> |
| | | <el-input size="small" placeholder="è§åº¦" v-model="item.value" :disabled="state>1" @blur="handleAngle(item.value,index)"></el-input> |
| | | </td> |
| | | <td v-for="(m,i) in n.portList" :key="i+'ggg'"> |
| | | <el-input size="small" placeholder="æå·®å¼" v-model="n.value[index][i]" v-if="n.value[index]" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'ä¸åæ ¼':(n.result===1?'åæ ¼':'å¾
å®') }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- æå¤§è¦å度/æå°è¦å度 --> |
| | | <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" v-if="n.inspectionItemSubclass.includes('è¦å度')"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>è§åº¦</td> |
| | | <td> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="é¢ç¹" v-model="n.often" :disabled="state>1" @blur="handlePort(n)"></el-input> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> |
| | | <td> |
| | | <el-input size="small" placeholder="è§åº¦" v-model="item.value" :disabled="state>1" @blur="handleAngle(item.value,index)"></el-input> |
| | | </td> |
| | | <td> |
| | | <el-input size="small" placeholder="æå·®å¼" v-model="n.value[index][0]" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'ä¸åæ ¼':(n.result===1?'åæ ¼':'å¾
å®') }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider v-if="j!=h.projectList.length-1"></el-divider> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props:['insProduct','orderId','sampleId','state'], |
| | | data() { |
| | | return { |
| | | value: "", |
| | | bandList:[], |
| | | portList:[ |
| | | { |
| | | value:'1', |
| | | }, |
| | | { |
| | | value:'2', |
| | | }, |
| | | { |
| | | value:'3', |
| | | }, |
| | | { |
| | | value:'4', |
| | | }, |
| | | ], |
| | | angleList:[ |
| | | { |
| | | value:'' |
| | | } |
| | | ], |
| | | projectList:[ |
| | | { |
| | | name:'çµå驻波æ¯', |
| | | unit:'/', |
| | | tell:'â¤1.45', |
| | | result:'', |
| | | conclusion:'åæ ¼', |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | { |
| | | name:'åæåé离度', |
| | | unit:'dB', |
| | | tell:'â¤1.45', |
| | | result:'', |
| | | conclusion:'åæ ¼', |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | { |
| | | name:'äºè°', |
| | | band:'2100MHz', |
| | | unit:'dB', |
| | | tell:'â¤1.45', |
| | | result:'', |
| | | conclusion:'åæ ¼', |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | { |
| | | name:'åå·®', |
| | | unit:'dB', |
| | | tell:'â¤1.45', |
| | | result:'', |
| | | conclusion:'åæ ¼', |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | { |
| | | name:'æå¤§è¦å度', |
| | | unit:'dB', |
| | | band:'2100MHz', |
| | | tell:'â¤1.45', |
| | | result:'', |
| | | conclusion:'åæ ¼', |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | resValue:'' |
| | | }, |
| | | ], |
| | | allBandList:[],//颿®µ |
| | | insProductNew:[], |
| | | isMore:false, |
| | | loading:{} |
| | | }; |
| | | }, |
| | | watch: { |
| | | // è§åº¦æ°éååæ¶ï¼æ´æ°ææé¢æ®µä¸é¢çææé¡¹ç®ä¸çææç«¯å£åè§åº¦ |
| | | angleList(val) { |
| | | this.allBandList.forEach(item => { |
| | | item.projectList.forEach(m => { |
| | | if(m.angleList.length!==val.length){ |
| | | m.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | | } |
| | | if(m.inspectionItemSubclass.includes('è¦å度')){ |
| | | for(let i = 0;i<m.angleList.length;i++){ |
| | | if(!m.value[i]){ |
| | | this.$set(m.value,i, []) |
| | | } |
| | | if(!m.value[i][0]){ |
| | | m.value[i][0] = '' |
| | | } |
| | | } |
| | | }else{ |
| | | for(let i = 0;i<m.angleList.length;i++){ |
| | | if(!m.value[i]){ |
| | | this.$set(m.value,i, []) |
| | | } |
| | | for(let j=0;j<m.portList.length;j++){ |
| | | if(!(m.value[i][j]===''||m.value[i][j])){ |
| | | m.value[i].push('') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | console.log(this.allBandList) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTypeDicts() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | // åå
¸è·åæ°æ® |
| | | getTypeDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "çµè·¯è¯éªæ³¢æ®µ" |
| | | }).then(res => { |
| | | this.bandList = res.data |
| | | }) |
| | | }, |
| | | // åå§åæ°æ® |
| | | initData(){ |
| | | // å¤çé¡¹ç® |
| | | this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)) |
| | | this.insProductNew.forEach(async item => { |
| | | // è·å设å¤å表 |
| | | item.equipOptions = await this.getEquipOptions(item) |
| | | }) |
| | | if(this.insProductNew[0].insProductResult2&&this.insProductNew[0].insProductResult2.length>0){ |
| | | // å·²ç»åå¨å¼æ¶ï¼èµå¼ |
| | | let bandList = this.insProductNew[0].insProductResult2.map(m=>m.frequency) |
| | | bandList = Array.from(new Set(bandList)) |
| | | this.allBandList = [] |
| | | for(let i = 0;i<bandList.length;i++){ |
| | | let arr = [] |
| | | this.insProductNew.forEach(item => { |
| | | let equipNameList = [] |
| | | let equipValueList = [] |
| | | item.insProductResult2.forEach(n => { |
| | | if(n.frequency===bandList[i]){ |
| | | // èµå¼é¡µé¢è®¾å¤åç§°åå¼ |
| | | if(n.equipValue){ |
| | | equipNameList.push(n.equipName) |
| | | equipValueList.push(n.equipValue) |
| | | } |
| | | // 以ä¸ä¸ºèµå¼åè¡¨ä¿¡æ¯ |
| | | let portList = [] |
| | | let angleList = [] |
| | | if(n.port&&n.port.split(',').length>0){ |
| | | n.port.split(',').forEach(m=>{ |
| | | portList.push({value:m}) |
| | | }) |
| | | } |
| | | if(n.angle&&n.angle.split(',').length>0){ |
| | | n.angle.split(',').forEach(m=>{ |
| | | angleList.push({value:m}) |
| | | }) |
| | | this.angleList = angleList |
| | | } |
| | | let obj = { |
| | | inspectionItemSubclass: item.inspectionItemSubclass, |
| | | unit:item.unit, |
| | | tell:item.tell, |
| | | result:n.result, |
| | | id:item.id, |
| | | often:n.often, |
| | | equipName:n.equipName, |
| | | equipValue:n.equipValue, |
| | | frequency:n.frequency |
| | | } |
| | | this.$set(obj,'portList', n.port?portList:[]) |
| | | this.$set(obj,'angleList', n.angle?angleList:[]) |
| | | this.$set(obj,'value', JSON.parse(n.value)) |
| | | arr.push(obj) |
| | | } |
| | | }) |
| | | if(equipValueList.length>0){ |
| | | this.$delete(item,'equipName') |
| | | this.$delete(item,'equipValue') |
| | | this.$set(item,'equipName',equipNameList[equipNameList.length-1]) |
| | | this.$set(item,'equipValue',equipValueList[equipValueList.length-1]) |
| | | } |
| | | }) |
| | | this.$set(this.allBandList,i, { |
| | | band: bandList[i], |
| | | projectList: arr |
| | | }) |
| | | } |
| | | }else{ |
| | | // 没æå¼æ¶ï¼åå§åé¡µé¢ |
| | | this.insProductNew.forEach(async item => { |
| | | // èµå¼è®¾å¤ |
| | | item.equipName = '' |
| | | item.equipValue = '' |
| | | // èµå¼ç«¯å£åè§åº¦ |
| | | item.portList = JSON.parse(JSON.stringify(this.portList)) |
| | | item.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | | // èµå¼ç»è®º |
| | | item.result = '' |
| | | // èµå¼æå·®å¼ |
| | | item.value = [] |
| | | if(item.inspectionItemSubclass.includes('è¦å度')){ |
| | | for(let i = 0;i<item.angleList.length;i++){ |
| | | item.value.push(['']) |
| | | } |
| | | }else{ |
| | | for(let i = 0;i<item.angleList.length;i++){ |
| | | item.value.push([]) |
| | | for(let j=0;j<item.portList.length;j++){ |
| | | item.value[i].push('') |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | // åå§å颿®µ |
| | | this.allBandList.push( |
| | | { |
| | | band:'', |
| | | projectList: JSON.parse(JSON.stringify(this.insProductNew)) |
| | | } |
| | | ) |
| | | } |
| | | }, |
| | | // å 餿°ç» |
| | | deleteList(index,list,type){ |
| | | if(list.length>1){ |
| | | if(type=='äºè°'){ |
| | | let index = null; |
| | | let num = 0; |
| | | list.forEach((m,i)=>{ |
| | | if(m.inspectionItemSubclass.includes('äºè°')){ |
| | | index = i; |
| | | num++ |
| | | } |
| | | }) |
| | | if(num==1){ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'ä¸è½å 餿åä¸ä¸ªäºè°' |
| | | }); |
| | | }else{ |
| | | if(list[index].frequency){ |
| | | this.$confirm(`æ¯å¦ç¡®å®å é¤ ${list[index].often} é¢ç¹æ°æ®?`, "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.deleteInsContext2, { |
| | | frequency:list[index].frequency, |
| | | productId:list[index].id, |
| | | often:list[index].often |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | return |
| | | } |
| | | this.$message.success('å·²å é¤') |
| | | list.splice(index, 1) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | list.splice(index, 1) |
| | | } |
| | | } |
| | | }else if(type=='å é¤é¢æ®µ'){ |
| | | this.$confirm(`æ¯å¦ç¡®å®å é¤ ${list[index].band} 颿®µæ°æ®?`, "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.deleteInsContext, { |
| | | frequency:list[index].band, |
| | | productIds:list[index].projectList.map(m=>m.id) |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true}).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | return |
| | | } |
| | | this.$message.success('å·²å é¤') |
| | | list.splice(index, 1) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | list.splice(index, 1) |
| | | } |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'ä¸è½å 餿åä¸ä¸ª' |
| | | }); |
| | | } |
| | | }, |
| | | // æ·»å æ°ç» |
| | | addList(list,type){ |
| | | if(type=='äºè°'){ |
| | | let obj = null; |
| | | let index = null; |
| | | list.forEach((m,i)=>{ |
| | | if(m.inspectionItemSubclass.includes('äºè°')){ |
| | | obj = JSON.parse(JSON.stringify(m)); |
| | | index = i; |
| | | } |
| | | }) |
| | | list.splice(index+1, 0, obj) |
| | | }else{ |
| | | let obj = JSON.parse(JSON.stringify(list[0])); |
| | | list.push(obj) |
| | | } |
| | | }, |
| | | // è·å设å¤é项 id:为æ£éªé¡¹id |
| | | async getEquipOptions(m) { |
| | | let arr = [] |
| | | let res = await this.$axios.post(this.$api.deviceScope.selectDeviceByCategory, { |
| | | inspectionItem: m.inspectionItem, |
| | | inspectionItemSubclass: m.inspectionItemSubclass |
| | | }) |
| | | if (res.code === 200 && res.data) { |
| | | arr = res.data.map(m => { |
| | | m.value = m.managementNumber |
| | | m.label = m.deviceName |
| | | return m |
| | | }) |
| | | } |
| | | return arr |
| | | }, |
| | | async methodFocus(item){ |
| | | this.$delete(item, 'equipOptions') |
| | | this.$set(item, 'equipOptions', await this.getEquipOptions(item)) |
| | | }, |
| | | handleEquip(m,item){ |
| | | this.$delete(item, 'equipValue') |
| | | this.$set(item, 'equipValue', m) |
| | | this.$delete(item, 'equipName') |
| | | this.$set(item, 'equipName', item.equipOptions.find(m=>m.value==item.equipValue).label) |
| | | }, |
| | | // ç»ä¸ä¿®æ¹è§åº¦ï¼å¦æè§åº¦æ²¡æå¸¦Â°ï¼åæ¼æ¥ä¸ä¸ª |
| | | handleAngle(e,index){ |
| | | if(!e){ |
| | | return |
| | | } |
| | | let val = e |
| | | if(!val.includes('°')){ |
| | | val = val + '°' |
| | | } |
| | | this.allBandList.forEach(item=>{ |
| | | item.projectList.forEach(m=>{ |
| | | m.angleList.forEach((n,i)=>{ |
| | | if(index==i){ |
| | | n.value = val |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | handlePort(n){ |
| | | if(!n.often){ |
| | | return |
| | | } |
| | | if(!n.often.includes('MHz')){ |
| | | n.often = n.often + 'MHz' |
| | | } |
| | | }, |
| | | save(h,y) { |
| | | let arr = h.projectList.map(item=>{ |
| | | let obj = { |
| | | insProductId:item.id, |
| | | equipValue:this.insProductNew.find(m=>m.id==item.id).equipValue, |
| | | equipName:this.insProductNew.find(m=>m.id==item.id).equipName, |
| | | port:item.portList.map(m=>m.value).join(','), |
| | | angle:item.angleList.map(m=>m.value).join(','), |
| | | value:JSON.stringify(item.value), |
| | | often:item.often |
| | | } |
| | | return obj |
| | | }) |
| | | this.$delete(this.loading, y) |
| | | this.$set( this.loading, y, true) |
| | | this.$axios.post(this.$api.insOrderPlan.saveInsContext2, { |
| | | orderId:this.orderId, |
| | | sampleId:this.sampleId, |
| | | sonLaboratory:h.projectList[0].sonLaboratory, |
| | | frequency:h.band, |
| | | insProductResult2s:arr |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true}).then(res => { |
| | | this.$set( this.loading, y, false) |
| | | // this.loading[y] = false |
| | | if (res.code === 201) { |
| | | this.$message.error('ä¿å失败') |
| | | return |
| | | } |
| | | for(let i=0;i<res.data.length;i++){ |
| | | h.projectList[i].result = res.data[i] |
| | | } |
| | | this.$message.success('å·²ä¿å') |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .circuit-parameters{ |
| | | position: relative; |
| | | overflow: visible; |
| | | } |
| | | .circuit-parameters-item{ |
| | | margin-bottom: 10px; |
| | | border: 1px solid #eee; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | border-radius: 8px; |
| | | } |
| | | .circuit-parameters-item-title{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .thermal-table{ |
| | | min-width: calc(100% - 10px); |
| | | table-layout: fixed; |
| | | } |
| | | .thermal-table td,.thermal-table th { |
| | | min-width: 70px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 5px; |
| | | } |
| | | .thermal-table .el-input{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .equip{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .red{ |
| | | color: red; |
| | | } |
| | | .green{ |
| | | color: green; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="circuit-parameters"> |
| | | <el-divider></el-divider> |
| | | <el-row :gutter="5" style="width: calc(100% - 1px);margin-bottom: 10px;"> |
| | | <el-col :span="17"> |
| | | <el-row> |
| | | <el-col :span="23" style="display: flex;flex-wrap: wrap;"> |
| | | <table border="1" cellpadding="10" style="margin: 0 10px 10px 0;" v-for="(item,index) in insProductNew" :key="index + 'ppp'" v-show="isMore?true:(index<3?true:false)"> |
| | | <tr> |
| | | <td style="text-align: center;background: #F0F1F5;"> |
| | | <el-tooltip effect="dark" :content="item.inspectionItemSubclass" placement="top-start"><span style="display: inline-block;width: 95px;" class="single-line-ellipsis">{{ item.inspectionItemSubclass }}</span> |
| | | </el-tooltip> |
| | | </td> |
| | | <td> |
| | | <el-input size="small" placeholder="设å¤åç§°" v-model="item.equipName" style="width: 95px;" readonly></el-input> |
| | | </td> |
| | | <td> |
| | | <el-select v-model="item.equipValue" placeholder="设å¤ç¼ç " size="small" style="width: 95px;" :disabled="state>1" @focus="methodFocus(item)" @change="m=>handleEquip(m,item)"> |
| | | <el-option |
| | | v-for="m in item.equipOptions" |
| | | :key="m.value" |
| | | :label="m.value" |
| | | :value="m.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </el-col> |
| | | <el-col :span="1" v-show="insProductNew.length>3"> |
| | | <el-button icon="el-icon-arrow-down" type="text" @click="isMore=true" v-if="!isMore">æ´å¤</el-button> |
| | | <el-button icon="el-icon-arrow-up" type="text" @click="isMore=false" v-if="isMore">æ¶èµ·</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns"> |
| | | <el-button type="primary" size="small" @click="addList(allBandList)" :disabled="state>1">æ·»å 颿®µ</el-button> |
| | | <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'å é¤é¢æ®µ')" :disabled="state>1">å é¤é¢æ®µ</el-button> |
| | | <el-button type="primary" size="small" @click="addList(angleList)" v-if="!(state>1)&&intermodulationNum>0">æ·»å è§åº¦</el-button> |
| | | <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0">å é¤è§åº¦</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="5" style="font-size: 18px;font-weight: 700;background: #F0F1F5;padding: 16px 0;box-sizing: border-box;width: 100%;"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">æ£éªé¡¹ç®</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">åä½</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">æ åè¦æ±</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div style="text-align: center;">æ£éªç»æ</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">ç»è®º</div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="circuit-parameters-item" v-for="(h,y) in allBandList" :key="y+'ooo'"> |
| | | <div class="circuit-parameters-item-title"> |
| | | <span>颿®µï¼</span> |
| | | <el-select v-model="h.band" placeholder="è¯·éæ©" size="small" style="width: 200px;" :disabled="state>1"> |
| | | <el-option |
| | | v-for="item in bandList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button type="primary" size="small" @click="addList(h.projectList,'äºè°')" style="margin-left: 16px;" v-if="intermodulationNum>0&&!(state>1)">æ·»å äºè°</el-button> |
| | | <el-button size="small" @click="deleteList(0,h.projectList,'äºè°')" v-if="intermodulationNum>0&&!(state>1)">å é¤äºè°</el-button> |
| | | <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;">ä¿ å</el-button> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <div class="circuit-parameters-item-content"> |
| | | <template v-for="(n,j) in h.projectList"> |
| | | <!-- çµå驻波æ¯/åæåé离度/弿åé离度 --> |
| | | <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" v-if="n.inspectionItemSubclass.includes('驻波æ¯')||n.inspectionItemSubclass.includes('é离度')"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>端å£</td> |
| | | <td v-for="(item,index) in n.portList" :key="index+'aaa'"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="端å£" v-model="item.value" :disabled="state>1"></el-input> |
| | | </div> |
| | | </td> |
| | | <td :rowspan="n.angleList.length+1"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <span>æå·®å¼</span> |
| | | </td> |
| | | <td v-for="(m,i) in n.portList" :key="i+'ggg'"> |
| | | <el-input size="small" placeholder="æå·®å¼" v-model="n.value[0][i]" v-if="n.value" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'ä¸åæ ¼':(n.result===1?'åæ ¼':'å¾
å®') }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- äºè° --> |
| | | <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" v-if="n.inspectionItemSubclass.includes('äºè°')"> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.unit }}</div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;">{{ n.tell }}</div> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td>é¢ç¹</td> |
| | | <td :colspan="n.portList.length+1"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="é¢ç¹" v-model="n.often" :disabled="state>1" @blur="handlePort(n)"></el-input> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>è§åº¦</td> |
| | | <td v-for="(item,index) in n.portList" :key="index+'fff'"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-input size="small" placeholder="端å£" v-model="item.value" :disabled="state>1"></el-input> |
| | | </div> |
| | | </td> |
| | | <td :rowspan="n.angleList.length+1"> |
| | | <el-button icon="el-icon-minus" circle size="mini" type="danger" |
| | | @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1"></el-button> |
| | | <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1"></el-button> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> |
| | | <td> |
| | | <el-input size="small" placeholder="è§åº¦" v-model="item.value" :disabled="state>1" @blur="handleAngle(item.value,index)"></el-input> |
| | | </td> |
| | | <td v-for="(m,i) in n.portList" :key="i+'ggg'"> |
| | | <el-input size="small" placeholder="æå·®å¼" v-model="n.value[index][i]" v-if="n.value[index]" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'ä¸åæ ¼':(n.result===1?'åæ ¼':'å¾
å®') }} |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider v-if="j!=h.projectList.length-1"></el-divider> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props:['insProduct','orderId','sampleId','state'], |
| | | data() { |
| | | return { |
| | | value: "", |
| | | bandList:[], |
| | | portList:[ |
| | | { |
| | | value:'1', |
| | | }, |
| | | { |
| | | value:'2', |
| | | }, |
| | | { |
| | | value:'3', |
| | | }, |
| | | { |
| | | value:'4', |
| | | }, |
| | | ], |
| | | angleList:[ |
| | | { |
| | | value:'' |
| | | } |
| | | ], |
| | | projectList:[ |
| | | { |
| | | inspectionItemSubclass:'çµå驻波æ¯', |
| | | unit:'/', |
| | | tell:'â¤1.45', |
| | | result:0, |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | { |
| | | inspectionItemSubclass:'åæåé离度', |
| | | unit:'dB', |
| | | tell:'â¤1.45', |
| | | result:0, |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | { |
| | | inspectionItemSubclass:'äºè°', |
| | | often:'',//äºè°ç¹æå段 |
| | | unit:'dB', |
| | | tell:'â¤1.45', |
| | | result:0, |
| | | portList:[], |
| | | angleList:[], |
| | | value:[],//å屿°ç» |
| | | }, |
| | | ], |
| | | allBandList:[],//颿®µ |
| | | isMore:false, |
| | | insProductNew:[], |
| | | intermodulationNum:0,//äºè°æ£éªé¡¹ç®çæ°é |
| | | loading:{} |
| | | }; |
| | | }, |
| | | watch: { |
| | | // è§åº¦æ°éååæ¶ï¼æ´æ°ææé¢æ®µä¸é¢çææé¡¹ç®ä¸çææç«¯å£åè§åº¦ |
| | | angleList(val) { |
| | | this.allBandList.forEach(item => { |
| | | item.projectList.forEach(m => { |
| | | if(m.angleList.length!==val.length){ |
| | | m.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | | } |
| | | if(m.inspectionItemSubclass.includes('äºè°')){ |
| | | for(let i = 0;i<m.angleList.length;i++){ |
| | | if(!m.value[i]){ |
| | | this.$set(m.value,i, []) |
| | | } |
| | | for(let j=0;j<m.portList.length;j++){ |
| | | if(!m.value[i][j]){ |
| | | m.value[i].push('') |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | for(let j=0;j<m.portList.length;j++){ |
| | | if(!m.value[0][j]){ |
| | | m.value[0].push('') |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTypeDicts() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | // åå
¸è·åæ°æ® |
| | | getTypeDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "çµè·¯è¯éªæ³¢æ®µ" |
| | | }).then(res => { |
| | | this.bandList = res.data |
| | | }) |
| | | }, |
| | | // åå§åæ°æ® |
| | | initData(){ |
| | | // å¤çé¡¹ç® |
| | | this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)) |
| | | this.insProductNew.forEach(async item => { |
| | | // è·å设å¤å表 |
| | | item.equipOptions = await this.getEquipOptions(item) |
| | | }) |
| | | if(this.insProductNew[0].insProductResult2&&this.insProductNew[0].insProductResult2.length>0){ |
| | | // å·²ç»åå¨å¼æ¶ï¼èµå¼ |
| | | let bandList = this.insProductNew[0].insProductResult2.map(m=>m.frequency) |
| | | bandList = Array.from(new Set(bandList)) |
| | | this.allBandList = [] |
| | | for(let i = 0;i<bandList.length;i++){ |
| | | let arr = [] |
| | | this.insProductNew.forEach(item => { |
| | | if(item.inspectionItemSubclass.includes('äºè°')){ |
| | | this.intermodulationNum++ |
| | | } |
| | | let equipNameList = [] |
| | | let equipValueList = [] |
| | | item.insProductResult2.forEach(n => { |
| | | if(n.frequency===bandList[i]){ |
| | | // èµå¼é¡µé¢è®¾å¤åç§°åå¼ |
| | | if(n.equipValue){ |
| | | equipNameList.push(n.equipName) |
| | | equipValueList.push(n.equipValue) |
| | | } |
| | | // 以ä¸ä¸ºèµå¼åè¡¨ä¿¡æ¯ |
| | | let portList = [] |
| | | let angleList = [] |
| | | if(n.port&&n.port.split(',').length>0){ |
| | | n.port.split(',').forEach(m=>{ |
| | | portList.push({value:m}) |
| | | }) |
| | | } |
| | | if(n.angle&&n.angle.split(',').length>0){ |
| | | n.angle.split(',').forEach(m=>{ |
| | | angleList.push({value:m}) |
| | | }) |
| | | this.angleList = angleList |
| | | } |
| | | let obj = { |
| | | inspectionItemSubclass: item.inspectionItemSubclass, |
| | | unit:item.unit, |
| | | tell:item.tell, |
| | | result:n.result, |
| | | id:item.id, |
| | | often:n.often, |
| | | equipName:n.equipName, |
| | | equipValue:n.equipValue, |
| | | frequency:n.frequency |
| | | } |
| | | this.$set(obj,'portList', n.port?portList:[]) |
| | | this.$set(obj,'angleList', n.angle?angleList:[]) |
| | | this.$set(obj,'value', JSON.parse(n.value)) |
| | | arr.push(obj) |
| | | } |
| | | }) |
| | | if(equipValueList.length>0){ |
| | | this.$delete(item,'equipName') |
| | | this.$delete(item,'equipValue') |
| | | this.$set(item,'equipName',equipNameList[equipNameList.length-1]) |
| | | this.$set(item,'equipValue',equipValueList[equipValueList.length-1]) |
| | | } |
| | | }) |
| | | this.$set(this.allBandList,i, { |
| | | band: bandList[i], |
| | | projectList: arr |
| | | }) |
| | | } |
| | | }else{ |
| | | // 没æå¼æ¶ï¼åå§åé¡µé¢ |
| | | this.insProductNew.forEach(async item => { |
| | | // æ¯å¦åå¨äºè°æ£éªé¡¹ç® |
| | | if(item.inspectionItemSubclass.includes('äºè°')){ |
| | | this.intermodulationNum++ |
| | | } |
| | | // èµå¼è®¾å¤ |
| | | item.equipName = '' |
| | | item.equipValue = '' |
| | | // èµå¼ç«¯å£åè§åº¦ |
| | | item.portList = JSON.parse(JSON.stringify(this.portList)) |
| | | item.angleList = JSON.parse(JSON.stringify(this.angleList)) |
| | | // èµå¼ç»è®º |
| | | item.result = '' |
| | | // èµå¼æå·®å¼ |
| | | item.value = [] |
| | | if(item.inspectionItemSubclass.includes('äºè°')){ |
| | | for(let i = 0;i<item.angleList.length;i++){ |
| | | item.value.push([]) |
| | | for(let j=0;j<item.portList.length;j++){ |
| | | item.value[i].push('') |
| | | } |
| | | } |
| | | }else{ |
| | | item.value.push([]) |
| | | for(let j=0;j<item.portList.length;j++){ |
| | | item.value[0].push('') |
| | | } |
| | | } |
| | | }) |
| | | // åå§å颿®µ |
| | | this.allBandList.push( |
| | | { |
| | | band:'', |
| | | projectList: JSON.parse(JSON.stringify(this.insProductNew)) |
| | | } |
| | | ) |
| | | } |
| | | }, |
| | | // å 餿°ç» |
| | | deleteList(index,list,type){ |
| | | if(list.length>1){ |
| | | if(type=='äºè°'){ |
| | | let index = null; |
| | | let num = 0; |
| | | list.forEach((m,i)=>{ |
| | | if(m.inspectionItemSubclass.includes('äºè°')){ |
| | | index = i; |
| | | num++ |
| | | } |
| | | }) |
| | | if(num==1){ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'ä¸è½å 餿åä¸ä¸ªäºè°' |
| | | }); |
| | | }else{ |
| | | if(list[index].frequency){ |
| | | this.$confirm(`æ¯å¦ç¡®å®å é¤ ${list[index].often} é¢ç¹æ°æ®?`, "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.deleteInsContext2, { |
| | | frequency:list[index].frequency, |
| | | productId:list[index].id, |
| | | often:list[index].often |
| | | }).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | return |
| | | } |
| | | this.$message.success('å·²å é¤') |
| | | list.splice(index, 1) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | list.splice(index, 1) |
| | | } |
| | | } |
| | | }else if(type=='å é¤é¢æ®µ'){ |
| | | this.$confirm(`æ¯å¦ç¡®å®å é¤ ${list[index].band} 颿®µæ°æ®?`, "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.insOrderPlan.deleteInsContext, { |
| | | frequency:list[index].band, |
| | | productIds:list[index].projectList.map(m=>m.id) |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true}).then(res => { |
| | | if (res.code === 201) { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | return |
| | | } |
| | | this.$message.success('å·²å é¤') |
| | | list.splice(index, 1) |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }).catch(() => {}) |
| | | }else{ |
| | | list.splice(index, 1) |
| | | } |
| | | }else{ |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: 'ä¸è½å 餿åä¸ä¸ª' |
| | | }); |
| | | } |
| | | }, |
| | | // æ·»å æ°ç» |
| | | addList(list,type){ |
| | | if(type=='äºè°'){ |
| | | let obj = null; |
| | | let index = null; |
| | | list.forEach((m,i)=>{ |
| | | if(m.inspectionItemSubclass.includes('äºè°')){ |
| | | obj = JSON.parse(JSON.stringify(m)); |
| | | index = i; |
| | | } |
| | | }) |
| | | list.splice(index+1, 0, obj) |
| | | }else{ |
| | | let obj = JSON.parse(JSON.stringify(list[0])); |
| | | list.push(obj) |
| | | } |
| | | }, |
| | | // è·å设å¤é项 id:为æ£éªé¡¹id |
| | | async getEquipOptions(m) { |
| | | let arr = [] |
| | | let res = await this.$axios.post(this.$api.deviceScope.selectDeviceByCategory, { |
| | | inspectionItem: m.inspectionItem, |
| | | inspectionItemSubclass: m.inspectionItemSubclass |
| | | }) |
| | | if (res.code === 200 && res.data) { |
| | | arr = res.data.map(m => { |
| | | m.value = m.managementNumber |
| | | m.label = m.deviceName |
| | | return m |
| | | }) |
| | | } |
| | | return arr |
| | | }, |
| | | // ç»ä¸ä¿®æ¹è§åº¦ï¼å¦æè§åº¦æ²¡æå¸¦Â°ï¼åæ¼æ¥ä¸ä¸ª |
| | | handleAngle(e,index){ |
| | | if(!e){ |
| | | return |
| | | } |
| | | let val = e |
| | | if(!val.includes('°')){ |
| | | val = val + '°' |
| | | } |
| | | this.allBandList.forEach(item=>{ |
| | | item.projectList.forEach(m=>{ |
| | | if(m.inspectionItemSubclass.includes('äºè°')){ |
| | | m.angleList.forEach((n,i)=>{ |
| | | if(index==i){ |
| | | n.value = val |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | handlePort(n){ |
| | | if(!n.often){ |
| | | return |
| | | } |
| | | if(!n.often.includes('MHz')){ |
| | | n.often = n.often + 'MHz' |
| | | } |
| | | }, |
| | | async methodFocus(item){ |
| | | this.$delete(item, 'equipOptions') |
| | | this.$set(item, 'equipOptions', await this.getEquipOptions(item)) |
| | | }, |
| | | handleEquip(m,item){ |
| | | this.$delete(item, 'equipValue') |
| | | this.$set(item, 'equipValue', m) |
| | | this.$delete(item, 'equipName') |
| | | this.$set(item, 'equipName', item.equipOptions.find(m=>m.value==item.equipValue).label) |
| | | }, |
| | | save(h,y) { |
| | | let arr = h.projectList.map(item=>{ |
| | | let obj = { |
| | | insProductId:item.id, |
| | | equipValue:this.insProductNew.find(m=>m.id==item.id).equipValue, |
| | | equipName:this.insProductNew.find(m=>m.id==item.id).equipName, |
| | | port:item.portList.map(m=>m.value).join(','), |
| | | angle:item.angleList.map(m=>m.value).join(','), |
| | | value:JSON.stringify(item.value), |
| | | often:item.often |
| | | } |
| | | return obj |
| | | }) |
| | | this.$delete(this.loading, y) |
| | | this.$set( this.loading, y, true) |
| | | // this.loading[y] = true |
| | | this.$axios.post(this.$api.insOrderPlan.saveInsContext2, { |
| | | orderId:this.orderId, |
| | | sampleId:this.sampleId, |
| | | sonLaboratory:h.projectList[0].sonLaboratory, |
| | | frequency:h.band, |
| | | insProductResult2s:arr |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs:true}).then(res => { |
| | | this.$set( this.loading, y, false) |
| | | // this.loading[y] = false |
| | | if (res.code === 201) { |
| | | this.$message.error('ä¿å失败') |
| | | return |
| | | } |
| | | for(let i=0;i<res.data.length;i++){ |
| | | h.projectList[i].result = res.data[i] |
| | | } |
| | | this.$message.success('å·²ä¿å') |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .circuit-parameters-item{ |
| | | margin-bottom: 10px; |
| | | border: 1px solid #eee; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | border-radius: 8px; |
| | | } |
| | | .circuit-parameters-item-title{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .thermal-table{ |
| | | min-width: calc(100% - 10px); |
| | | table-layout: fixed; |
| | | } |
| | | .thermal-table td,.thermal-table th { |
| | | min-width: 70px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 5px; |
| | | } |
| | | .thermal-table .el-input{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .equip{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .red{ |
| | | color: red; |
| | | } |
| | | .green{ |
| | | color: green; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="circuit"> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <th :colspan="typeList0.length+4" style="font-size: 18px;">室å¤åå¸100-D宽é¢å°ç¯å¤©çº¿</th> |
| | | </tr> |
| | | <tr> |
| | | <td class="title">æ ·åç¼å·</td> |
| | | <td>1111</td> |
| | | <td class="title">æ ·ååå·</td> |
| | | <td>22222</td> |
| | | <td class="title">è¯éªæ å</td> |
| | | <td :colspan="typeList0.length">çµä¿¡</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="title">æ£éªé¡¹ç®</td> |
| | | <td class="title">åä½</td> |
| | | <td class="title">æ åè¦æ±</td> |
| | | <td :colspan="typeList0.length+1" class="title">æ£éªç»æ</td> |
| | | </tr> |
| | | <!-- é©»æ³¢æ¯ --> |
| | | <template> |
| | | <tr> |
| | | <td :rowspan="roadList0.length+2">çµå驻波æ¯</td> |
| | | <td :rowspan="roadList0.length+2">/</td> |
| | | <td :rowspan="roadList0.length+2">â¤1.5</td> |
| | | <td class="title">æå·®å¼</td> |
| | | <td v-for="(item,index) in typeList0" :key="index+'ooo'"><span style="display: inline-block;width: 40%;">{{ item.label }}</span><el-button icon="el-icon-minus" circle size="mini" type="danger" style="margin-left: 4px;" @click="deleteList(index,'端å£')"></el-button><el-button icon="el-icon-plus" circle size="mini" type="primary" v-if="index==typeList0.length-1" @click="addInfo('端å£')"></el-button></td> |
| | | </tr> |
| | | <tr v-for="(item,index) in roadList0" :key="index+'iiii'"> |
| | | <td><span style="display: inline-block;width: 70%;">{{ item.label }}</span><el-button icon="el-icon-minus" circle size="mini" type="danger" @click="deleteList(index,'波段')"></el-button></td> |
| | | <td v-for="(m,i) in typeList0" :key="i+'aaa'"> |
| | | <el-input clearable size="small" placeholder="" v-model="value" :disabled="state>1"></el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td><span style="display: inline-block;width: 70%;" class="title">é©»æ³¢æ¯æå·®å¼</span><el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addInfo('波段')"></el-button></td> |
| | | <td v-for="(m,i) in typeList0" :key="i+'bbb'"> |
| | | <span>0</span> |
| | | </td> |
| | | </tr> |
| | | </template> |
| | | <!-- é离 --> |
| | | <template> |
| | | <tr> |
| | | <td :rowspan="roadList0.length+2">é离</td> |
| | | <td :rowspan="roadList0.length+2">dB</td> |
| | | <td :rowspan="roadList0.length+2">â¤-25</td> |
| | | </tr> |
| | | <tr v-for="(item,index) in roadList0" :key="index+'eee'"> |
| | | <td>{{ item.label }}</td> |
| | | <td :colspan="index<isolationList.length-1?2:(typeList0.length/2>0?3:2)" v-for="(item,index) in isolationList" :key="index+'sss'"><el-input clearable size="small" placeholder="" v-model="item.value" :disabled="state>1"></el-input></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="title">é离æå·®å¼</td> |
| | | <td :colspan="index<isolationList.length-1?2:(typeList0.length/2>0?3:2)" v-for="(item,index) in isolationList" :key="index+'ggg'">{{ item.compValue }}</td> |
| | | </tr> |
| | | </template> |
| | | <!-- äºè° --> |
| | | <template> |
| | | <tr> |
| | | <td :rowspan="bandList0.length+2">äºè°37dBm</td> |
| | | <td :rowspan="bandList0.length+2">dBm</td> |
| | | <td :rowspan="bandList0.length+2">â¤-107</td> |
| | | </tr> |
| | | <tr v-for="(item,index) in bandList0" :key="index+'yyy'"> |
| | | <td><span style="display: inline-block;width: 70%;">{{ item.label }}</span><el-button icon="el-icon-minus" circle size="mini" type="danger" @click="deleteList(index,'颿®µ')"></el-button></td> |
| | | <td v-for="(m,i) in typeList0" :key="i+'ccc'"><el-input clearable size="small" placeholder="" v-model="value" :disabled="state>1"></el-input></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="title"><span style="display: inline-block;width: 70%;">äºè°æå·®å¼</span><el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addInfo('颿®µ')"></el-button></td> |
| | | <td v-for="(m,i) in typeList0" :key="i+'hhh'">0</td> |
| | | </tr> |
| | | </template> |
| | | </table> |
| | | <el-dialog |
| | | :title="'éæ©æ·»å '+currentType" |
| | | :visible.sync="dialogVisible" |
| | | width="20%"> |
| | | <el-checkbox-group v-model="checkList" v-if="currentType=='波段'"> |
| | | <el-checkbox :label="item.label" v-for="(item,index) in roadList1" :key="index+'lll'">{{ item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-checkbox-group v-model="checkList" v-if="currentType=='颿®µ'"> |
| | | <el-checkbox :label="item.label" v-for="(item,index) in bandList1" :key="index+'tttt'">{{ item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | <el-checkbox-group v-model="checkList" v-if="currentType=='端å£'"> |
| | | <el-checkbox :label="item.label" v-for="(item,index) in typeList1" :key="index+'uuuu'">{{ item.label }}</el-checkbox> |
| | | </el-checkbox-group> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleSure">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | roadList:[], |
| | | typeList:[], |
| | | bandList:[], |
| | | typeList0:[], |
| | | roadList0:[], |
| | | bandList0:[], |
| | | typeList1:[], |
| | | roadList1:[], |
| | | bandList1:[], |
| | | isolationList:[ |
| | | { |
| | | compValue:'', |
| | | value:'' |
| | | } |
| | | ], |
| | | state: 1, |
| | | value:'', |
| | | dialogVisible:false, |
| | | currentType:'',//波段,颿®µ,ç«¯å£ |
| | | checkList:[], |
| | | } |
| | | }, |
| | | watch:{ |
| | | roadList0(val){ |
| | | this.roadList1 = this.roadList.filter(item=>{ |
| | | return !val.find(m=>m.id==item.id) |
| | | }) |
| | | }, |
| | | typeList0(val){ |
| | | this.typeList1 = this.typeList.filter(item=>{ |
| | | return !val.find(m=>m.id==item.id) |
| | | }) |
| | | this.isolationList = [] |
| | | if(val.length<2){ |
| | | this.isolationList = [{compValue:'',value:''}] |
| | | }else{ |
| | | let num = Math.floor(val.length/2) |
| | | for(let i=0;i<num;i++){ |
| | | this.isolationList.push({compValue:'',value:''}) |
| | | } |
| | | } |
| | | console.log(this.isolationList) |
| | | }, |
| | | bandList0(val){ |
| | | this.bandList1 = this.bandList.filter(item=>{ |
| | | return !val.find(m=>m.id==item.id) |
| | | }) |
| | | }, |
| | | dialogVisible(val){ |
| | | if(!val){ |
| | | this.checkList = [] |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTypeDicts() |
| | | }, |
| | | methods: { |
| | | getTypeDicts() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "çµè·¯è¯éªæ³¢æ®µ" |
| | | }).then(res => { |
| | | this.roadList = res.data |
| | | this.roadList0 = this.HaveJson(this.roadList) |
| | | }) |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "çµè·¯è¯éªç«¯å£" |
| | | }).then(res => { |
| | | this.typeList = res.data |
| | | this.typeList0 = this.HaveJson(this.typeList) |
| | | }) |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "çµè·¯è¯éªé¢æ®µ" |
| | | }).then(res => { |
| | | this.bandList = res.data |
| | | this.bandList0 = this.HaveJson(this.bandList) |
| | | }) |
| | | }, |
| | | deleteList(index,type) { |
| | | switch(type){ |
| | | case '波段': |
| | | if(this.roadList0.length>1){ |
| | | this.roadList0.splice(index, 1) |
| | | }else{ |
| | | this.$message.error('è³å°ä¿ç䏿¡æ°æ®') |
| | | } |
| | | break; |
| | | case '颿®µ': |
| | | if(this.bandList0.length>1){ |
| | | this.bandList0.splice(index, 1) |
| | | }else{ |
| | | this.$message.error('è³å°ä¿ç䏿¡æ°æ®') |
| | | } |
| | | break; |
| | | case '端å£': |
| | | if(this.typeList0.length>1){ |
| | | this.typeList0.splice(index, 1) |
| | | }else{ |
| | | this.$message.error('è³å°ä¿ç䏿¡æ°æ®') |
| | | } |
| | | break; |
| | | } |
| | | }, |
| | | handleSure(){ |
| | | switch(this.currentType){ |
| | | case '波段': |
| | | this.roadList.forEach((item,index)=>{ |
| | | let obj = this.checkList.find(m=>m==item.label) |
| | | if(obj){ |
| | | this.roadList0.push(item) |
| | | } |
| | | }) |
| | | this.roadList0 = this.handleSortById(this.roadList0) |
| | | break; |
| | | case '颿®µ': |
| | | this.bandList.forEach((item,index)=>{ |
| | | let obj = this.checkList.find(m=>m==item.label) |
| | | if(obj){ |
| | | this.bandList0.push(item) |
| | | } |
| | | }) |
| | | this.bandList0 = this.handleSortById(this.bandList0) |
| | | break; |
| | | case '端å£': |
| | | this.typeList.forEach((item,index)=>{ |
| | | let obj = this.checkList.find(m=>m==item.label) |
| | | if(obj){ |
| | | this.typeList0.push(item) |
| | | } |
| | | }) |
| | | this.typeList0 = this.handleSortById(this.typeList0) |
| | | break; |
| | | } |
| | | this.dialogVisible = false |
| | | }, |
| | | // æ ¹æ®Idæåº |
| | | handleSortById(arr){ |
| | | return arr.sort((a,b)=>{ |
| | | if(a.id>b.id){ |
| | | return 1; |
| | | }else if(a.id<b.id){ |
| | | return -1; |
| | | }else { |
| | | return 0; |
| | | } |
| | | }) |
| | | }, |
| | | addInfo(type){ |
| | | this.currentType = type |
| | | this.dialogVisible = true |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .thermal-table{ |
| | | min-width: calc(100% - 10px); |
| | | margin: 5px 5px 20px; |
| | | table-layout: fixed; |
| | | } |
| | | .thermal-table td,.thermal-table th { |
| | | min-width: 150px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 5px; |
| | | } |
| | | .thermal-table .el-input{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .title{ |
| | | color: #000 !important; |
| | | font-weight: 700 !important; |
| | | } |
| | | </style> |
| | |
| | | width="100px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="typeList.find(m=>m.value==scope.row.insState).type" size="small">{{ typeList.find(m=>m.value==scope.row.insState).label }}</el-tag> |
| | | <el-tag :type="insStateList.find(m=>m.value==scope.row.insState).type" size="small">{{ insStateList.find(m=>m.value==scope.row.insState).label }}</el-tag> |
| | | </template></el-table-column> |
| | | <el-table-column |
| | | prop="userName" |
| | |
| | | loading:false, |
| | | currentTime: null, |
| | | sonLaboratoryList:[], |
| | | tableData: null, |
| | | tableData: [], |
| | | page:{ |
| | | current:1, |
| | | size:20, |
| | |
| | | //æ¬å° |
| | | // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; |
| | | // const javaApi = 'http://127.0.0.1:8001'; |
| | | const javaApi = 'http://192.168.212.249:8001'; |
| | | const javaApi = 'http://192.168.159.249:8001'; |
| | | |
| | | // //éä¿¡æµè¯åº |
| | | // Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080"; |
| | |
| | | |
| | | //äº |
| | | // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; |
| | | // const javaApi = 'http://114.132.189.42:1234'; |
| | | // const javaApi = 'http://10.1.13.77/:1234'; |
| | | |
| | | // //æ£æµä¸å¿æ£å¼åº |
| | | // Vue.prototype.LOCATIONVUE = "http://10.1.200.86:8080"; |