From 3671ac8bd0d291335fd423d035e8d81954162919 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期五, 28 二月 2025 13:05:41 +0800 Subject: [PATCH] 检验任务实验结果必填 --- src/components/do/b1-inspect-order-plan/Inspection.vue | 1853 +++++++++++++++++----------------------------------------- 1 files changed, 556 insertions(+), 1,297 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index eeeb86d..b197167 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -1,16 +1,20 @@ <style scoped> .custom-table .el-table__header-wrapper th { - background-color: #87ceeb; /* 鍙甯︽湁my-custom-table绫荤殑琛ㄦ牸鐢熸晥 */ + background-color: #87ceeb; + /* 鍙甯︽湁my-custom-table绫荤殑琛ㄦ牸鐢熸晥 */ color: #fff; } + .container { - overflow: auto; /* 纭繚瀹瑰櫒鑳藉寘瑁规诞鍔ㄥ厓绱� */ + overflow: auto; + /* 纭繚瀹瑰櫒鑳藉寘瑁规诞鍔ㄥ厓绱� */ margin-bottom: 10px; } .right-button { float: right; } + .inspection { height: 100%; overflow-y: auto; @@ -76,11 +80,13 @@ word-wrap: break-word; white-space: normal; } + .thermal-table { min-width: calc(100% - 10px); margin: 5px 5px 0; table-layout: fixed; } + .thermal-table td { min-width: 70px; text-align: center; @@ -89,9 +95,12 @@ white-space: normal; padding: 5px; } + .table-container { - overflow-x: auto; /* 浣垮鍣ㄦ敮鎸佹í鍚戞粴鍔� */ - max-width: 100%; /* 闄愬埗瀹瑰櫒鐨勬渶澶у搴� */ + overflow-x: auto; + /* 浣垮鍣ㄦ敮鎸佹í鍚戞粴鍔� */ + max-width: 100%; + /* 闄愬埗瀹瑰櫒鐨勬渶澶у搴� */ margin-bottom: 16px; } @@ -138,7 +147,8 @@ width: 100%; height: 100%; } -.table_input >>> .el-input__inner { + +.table_input>>>.el-input__inner { border-color: rgba(0, 0, 0, 0.5) !important; } @@ -156,11 +166,13 @@ .collection:active { opacity: 0.7; } + .table_caret { font-size: 16px; margin: 0 5px; color: rgba(0, 0, 0, 0.5); } + .table_caret:hover { color: #409eff; cursor: pointer; @@ -169,22 +181,29 @@ .table_caret:active { opacity: 0.8; } ->>> input::-webkit-inner-spin-button { - -webkit-appearance: none !important; /* 闅愯棌寰皟鎸夐挳 */ - margin: 0 !important; /* 绉婚櫎寰皟鎸夐挳鐨勮竟璺� */ + +>>>input::-webkit-inner-spin-button { + -webkit-appearance: none !important; + /* 闅愯棌寰皟鎸夐挳 */ + margin: 0 !important; + /* 绉婚櫎寰皟鎸夐挳鐨勮竟璺� */ } ->>> input[type="number"] { - -moz-appearance: textfield !important; /* 閽堝 Firefox */ +>>>input[type="number"] { + -moz-appearance: textfield !important; + /* 閽堝 Firefox */ } ->>> .el-form-item__content { + +>>>.el-form-item__content { display: inline-flex; align-items: center; } + .history-btn { display: flex; align-items: center; } + .noShow { opacity: 0; } @@ -246,166 +265,84 @@ display: flex; align-items: center; } + .thermal-table .el-input { display: flex; align-items: center; } + .custom-dialog .el-dialog__body { - max-width: 1000px; /* 璁剧疆鏈�澶у搴� */ + max-width: 1000px; + /* 璁剧疆鏈�澶у搴� */ } </style> <template> <div v-loading="loading" class="inspection"> <el-row class="title"> - <el-col - :span="12" - style="padding-left: 20px;text-align: left;" - :class="{ noShow: noBack }" - >妫�楠屽崟璇︽儏 + <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" + <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('鐢佃矾璇曢獙') && + 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('鐢佃矾璇曢獙') && - 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" - > + 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"> <span style="float: left">{{ a.name }}</span> - <i - class="el-icon-delete" - style="float: right; color: #66b1ff; font-size: 16px;line-height: 34px;" - @click.stop="handleDelete(a)" - v-if="addInsProductTemplatePower" - ></i> + <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px;line-height: 34px;" + @click.stop="handleDelete(a)" v-if="addInsProductTemplatePower"></i> </el-option> </el-select> - <el-button - size="medium" - @click="templateDia = true" - v-if=" - state == 1 && - tableLists.find(m => m.templateId == currentTable) && - tableLists - .find(m => m.templateId == currentTable) - .templateName.includes('鐢佃矾璇曢獙') && - addInsProductTemplatePower - " - > + <el-button size="medium" @click="templateDia = true" v-if=" + state == 1 && + tableLists.find(m => m.templateId == currentTable) && + tableLists + .find(m => m.templateId == currentTable) + .templateName.includes('鐢佃矾璇曢獙') && + addInsProductTemplatePower + "> <span style="color: #3A7BFA;">淇濆瓨妯℃澘</span> </el-button> <!-- <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">鏍峰搧鍒囨崲</el-button> --> - <el-button - size="small" - type="primary" - @click="taskVisible = true" - v-show="!isLook" - >浠诲姟鍒囨崲</el-button - > - <el-button - size="small" - type="primary" - @click="handleSubmit" - v-if="state == 1" - :loading="submitLoading" - >鎻愪氦</el-button - > + <el-button size="small" type="primary" @click="taskVisible = true" v-show="!isLook">浠诲姟鍒囨崲</el-button> + <el-button size="small" type="primary" @click="handleSubmit" v-if="state == 1" + :loading="submitLoading">鎻愪氦</el-button> <!-- 澶嶆牳 --> <!-- <el-button size="small" type="primary" @click="upInsReview(1,'缁х画璇曢獙')" :loading="reviewLoading" v-if="state>1&&!isLook">缁х画娴嬭瘯涓嬩竴涓牱鍝�</el-button> <el-button size="small" @click="upInsReview(0,'鍐嶆璇曢獙')" v-if="state>1&&!isLook" type="danger">鍐嶆璇曢獙</el-button> <el-button size="small" @click="upInsReview(2,'缁撴潫璇曢獙')" v-if="state>1&&!isLook">姝ゅ鎵樺崟缁撴潫</el-button> --> - <el-button - size="small" - type="primary" - @click="upInsReviewDia = true" - v-if="state > 1 && !isLook" - >澶嶆牳</el-button - > - <el-button size="small" @click="handleBack" v-if="!noBack" - >杩斿洖</el-button - > + <el-button size="small" type="primary" @click="upInsReviewDia = true" v-if="state > 1 && !isLook">澶嶆牳</el-button> + <el-button size="small" @click="handleBack" v-if="!noBack">杩斿洖</el-button> </el-col> </el-row> <div class="search" v-show="!isLook"> - <el-form - :inline="true" - :model="searchForm" - class="form-inline" - label-width="100px" - label-position="right" - > + <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px" label-position="right"> <el-form-item label="濮旀墭缂栧彿:"> - <el-input - clearable - v-model="insOrder.entrustCode" - disabled - size="small" - placeholder="璇疯緭鍏�" - ></el-input> + <el-input clearable v-model="insOrder.entrustCode" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </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="璇疯緭鍏�" - tooltip - ></el-input> + <el-tooltip :disabled="!currentSample.sampleCode" :content="currentSample.sampleCode"> + <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="璇疯緭鍏�" + tooltip></el-input> </el-tooltip> </el-form-item> <el-form-item label="鏍峰搧鍚嶇О:"> - <el-input - clearable - v-model="currentSample.sample" - disabled - size="small" - placeholder="璇疯緭鍏�" - ></el-input> + <el-input clearable v-model="currentSample.sample" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </el-form-item> <el-form-item label="鏍峰搧鏁伴噺:"> - <el-input - clearable - v-model="sampleProduct.length" - disabled - size="small" - placeholder="璇疯緭鍏�" - ></el-input> + <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </el-form-item> <el-form-item label="璇曢獙鏍囧噯:"> <span>{{ @@ -415,31 +352,13 @@ }}</span> </el-form-item> <el-form-item label="涓嬪彂鏃堕棿:"> - <el-input - clearable - v-model="insOrder.sendTime" - disabled - size="small" - placeholder="璇疯緭鍏�" - ></el-input> + <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </el-form-item> <el-form-item label="绱ф�ョ▼搴�:"> - <el-input - clearable - v-model="insOrder.typeName" - disabled - size="small" - placeholder="璇疯緭鍏�" - ></el-input> + <el-input clearable v-model="insOrder.typeName" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </el-form-item> <el-form-item label="绾﹀畾鏃堕棿:"> - <el-input - clearable - v-model="insOrder.appointed" - disabled - size="small" - placeholder="璇疯緭鍏�" - ></el-input> + <el-input clearable v-model="insOrder.appointed" disabled size="small" placeholder="璇疯緭鍏�"></el-input> </el-form-item> <el-form-item label="褰撳墠鏍峰搧浣嶆暟:"> <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag> @@ -448,9 +367,9 @@ <el-tag>{{ !insOrder.rule.includes("涓嶈�冭檻涓嶇‘瀹氬害") ? insOrder.rule.split("-")[0] + - " " + - insOrder.rule.split("-")[1] + - "%" + " " + + insOrder.rule.split("-")[1] + + "%" : insOrder.rule }}</el-tag> </el-form-item> @@ -462,20 +381,12 @@ </el-form> </div> <div class="center"> - <div - class="search" - style="text-align: left;display: flex;align-items: center;justify-content: space-between;" - > + <div class="search" style="text-align: left;display: flex;align-items: center;justify-content: space-between;"> <div style="display: flex;align-items: center;"> <span v-if="tableList.length > 0">妫�楠屾ā鏉匡細</span> <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-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"> @@ -484,68 +395,38 @@ </el-radio-group> --> </div> <div style="display: flex;align-items: center;"> - <el-form - :inline="true" - :model="otherForm" - class="form-inline" - label-width="50px" - style="padding-top: 0;padding-left: 10px;" - v-if="PROJECT == '妫�娴嬩腑蹇�'" - > + <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> + <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> + <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 - > + <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 class="history-btn" v-if="isLook"> <el-button type="primary" icon="el-icon-arrow-left" size="small" @click="goHistory(-1)">涓婁竴鏉¤褰�</el-button> @@ -554,87 +435,50 @@ </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.includes('鐢佃矾璇曢獙') && - !tableLists - .find(m => m.templateId == currentTable) - .templateName.includes('娓╂箍搴﹁瘯楠�') && - !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" - > + <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('鐢佃矾璇曢獙') && + !tableLists + .find(m => m.templateId == currentTable) + .templateName.includes('娓╂箍搴﹁瘯楠�') && + !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"> - <td - :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" - v-for="(n, j) in m" - :key="j" + <td :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" v-for="(n, j) in m" :key="j" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4" - :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1" - :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1" - :style=" - `background:${n.v.bg ? n.v.bg : ''};color:${ - n.v.fc + :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1" :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1" :style="`background:${n.v.bg ? n.v.bg : ''};color:${n.v.fc };font-size:${n.v.fs}px;width:${handleWidth( n - )}px !important;height:${ - item.style.rowlen[n.r] + )}px !important;height:${item.style.rowlen[n.r] }px;font-wight:${n.v.bl ? 'bold' : ''};` - " - > - <div - class="content" - :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" - :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 && - !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, - 'getDataType' - ) - " - @mousewheel.native.prevent - :key="'abc-' + '000' + index + '000' + i + '000' + j" + "> + <div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :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 && + !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, + 'getDataType' + ) + " @mousewheel.native.prevent :key="'abc-' + '000' + index + '000' + i + '000' + j" @keydown.enter=" changeInput( '', @@ -642,172 +486,100 @@ n, 'getDataType' ) - " - > + "> <!-- <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" - :disabled=" + <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}`, + n, + '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 != '') - " - @change=" - m => + (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}`, n, '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}`, - n, - 'getDataType' - ) - " - > - <el-option - v-for="(e, i) in enumList" - :key="i" - :label="e.label" - :value="e.value" - ></el-option> + "> + <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;`" - v-else-if="getInspectionValueType(n.i) == 4" - >/</span - > + <span :style="`font-family:${n.v.ff} !important;`" + v-else-if="getInspectionValueType(n.i) == 4">/</span> </template> - <template - v-else-if="n.v.ps != undefined && n.v.ps.value === '缁撹'" - > - <el-select - v-if=" - (getInspectionValueType(n.i) == 2 || - getInspectionValueType(n.i) == 5) && - state == 1 && - PROJECT == '瑁呭鐢电紗' - " - class="table_input" - v-model="n.v.v" - @change="saveInsContext()" - > + <template v-else-if="n.v.ps != undefined && n.v.ps.value === '缁撹'"> + <el-select v-if=" + (getInspectionValueType(n.i) == 2 || + getInspectionValueType(n.i) == 5) && + state == 1 && + PROJECT == '瑁呭鐢电紗' + " class="table_input" v-model="n.v.v" @change="saveInsContext()"> <el-option label="鍚堟牸" :value="1"></el-option> <el-option label="涓嶅悎鏍�" :value="0"></el-option> </el-select> - <template - v-if=" - PROJECT == '妫�娴嬩腑蹇�' || - (PROJECT == '瑁呭鐢电紗' && - getInspectionValueType(n.i) != 2) - " - > - <span - v-if="n.v.v === 1" - :style=" - `font-family:${n.v.ff} !important;color: green;` - " - >鍚堟牸</span - > - <span - v-else-if="n.v.v === 0" - :style="`font-family:${n.v.ff} !important;color: red;`" - >涓嶅悎鏍�</span - > - <span - v-else-if="n.v.v === 3" - :style=" - `font-family:${n.v.ff} !important;color: #3A7BFA;` - " - >涓嶅垽瀹�</span - > - <span v-else :style="`font-family:${n.v.ff} !important;`" - >寰呭畾</span - > + <template v-if=" + PROJECT == '妫�娴嬩腑蹇�' || + (PROJECT == '瑁呭鐢电紗' && + getInspectionValueType(n.i) != 2) + "> + <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;` + ">鍚堟牸</span> + <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">涓嶅悎鏍�</span> + <span v-else-if="n.v.v === 3" :style="`font-family:${n.v.ff} !important;color: #3A7BFA;` + ">涓嶅垽瀹�</span> + <span v-else :style="`font-family:${n.v.ff} !important;`">寰呭畾</span> </template> </template> - <template - v-else-if=" - n.v.ps != undefined && - n.v.ps.value === '璁惧缂栫爜' && - state == 1 - " - > - <el-select - v-model="n.v.v" - placeholder="璁惧" - class="table_input" - @visible-change="e => getEquipOptions(e, n.i)" - remote - @change="val => changeEquip(val, n)" - > - <el-option - v-for="item in equipOptions" - :key="item.value" - :label="item.value" - :value="item.value" - > + <template v-else-if=" + n.v.ps != undefined && + n.v.ps.value === '璁惧缂栫爜' && + state == 1 + "> + <el-select v-model="n.v.v" placeholder="璁惧" class="table_input" + @visible-change="e => getEquipOptions(e, n.i)" remote @change="val => changeEquip(val, n)"> + <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> </el-option> </el-select> </template> - <template - v-else-if=" - n.v.ps != undefined && - n.v.ps.value === '璁惧鍚嶇О' && - state == 1 - " - > + <template v-else-if=" + n.v.ps != undefined && + n.v.ps.value === '璁惧鍚嶇О' && + state == 1 + "> <span>{{ n.v.v }}</span> </template> - <template - v-else-if=" - n.v.ps != undefined && - n.v.ps.value === '瑕佹眰鍊�' && - state == 1 - " - > + <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> </template> - <template - v-else-if=" - n.v.ps != undefined && - n.v.ps.value === '璁$畻鍊�' && - state == 1 - " - ><span :style="`font-family:${n.v.ff} !important;`">{{ - toFixed(n.v.v, n.v.ct) - }}</span></template - > - <template - v-else-if=" - n.v.ps != undefined && - n.v.ps.value === '鏈�缁堝��' && - state == 1 - " - > + <template v-else-if=" + n.v.ps != undefined && + n.v.ps.value === '璁$畻鍊�' && + state == 1 + "><span :style="`font-family:${n.v.ff} !important;`">{{ + toFixed(n.v.v, n.v.ct) + }}</span></template> + <template v-else-if=" + n.v.ps != undefined && + n.v.ps.value === '鏈�缁堝��' && + state == 1 + "> <!-- <el-input class="table_input" type="textarea" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" v-model="n.v.v" @change="saveInsContext()" v-if="getInspectionValueType(n.i) == 2"></el-input> @@ -819,63 +591,42 @@ toFixed(n.v.v, n.v.ct) }}</span> </template> - <template - v-else-if=" - n.v.ps != undefined && n.v.ps.value === '鏍峰搧缂栧彿' - " - > - <div - style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%" - :title="currentSample.sampleCode" - > + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '鏍峰搧缂栧彿' + "> + <div style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%" + :title="currentSample.sampleCode"> <!-- <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i> --> - <div - :style=" - `font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);` - " - > + <div :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);` + "> {{ currentSample.sampleCode }} </div> <!-- <i class="el-icon-caret-right table_caret" style="width: 16px;" v-if="!currentFiberOpticTape&&!currentFiberOptic" @click="caretSample(1)"></i> --> </div> </template> - <template - v-else-if=" - n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿' - " - > - <div - :style="`font-family:${n.v.ff} !important;`" - v-if=" - currentSample.model !== undefined && - currentSample.model !== null - " - > + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿' + "> + <div :style="`font-family:${n.v.ff} !important;`" v-if=" + currentSample.model !== undefined && + currentSample.model !== null + "> {{ currentSample.model }} </div> </template> - <template - v-else-if=" - n.v.ps != undefined && n.v.ps.value === '璇曢獙鏍囧噯' - " - > - <div - :style="`font-family:${n.v.ff} !important;`" - v-if=" - currentSample.testRequirements !== undefined && - currentSample.testRequirements !== null - " - > + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '璇曢獙鏍囧噯' + "> + <div :style="`font-family:${n.v.ff} !important;`" v-if=" + currentSample.testRequirements !== undefined && + currentSample.testRequirements !== null + "> {{ currentSample.testRequirements }} </div> </template> - <template - v-else-if="n.v.ps != undefined && n.v.ps.value === '濂楃'" - > - <div - style="display: flex;flex-wrap: nowrap;align-items: center;" - > + <template v-else-if="n.v.ps != undefined && n.v.ps.value === '濂楃'"> + <div style="display: flex;flex-wrap: nowrap;align-items: center;"> <!-- <i class="el-icon-caret-left table_caret" @click="caretBushing(-1)"></i> --> <div :style="`font-family:${n.v.ff} !important;`"> {{ currentBushing ? currentBushing.color : "" }} @@ -883,17 +634,9 @@ <!-- <i class="el-icon-caret-right table_caret" @click="caretBushing(1)"></i> --> </div> </template> - <template - v-else-if="n.v.ps != undefined && n.v.ps.value === '鍏夌氦甯�'" - > - <div - style="display: flex;flex-wrap: nowrap;align-items: center;" - > - <i - class="el-icon-caret-left table_caret" - @click="caretTape(-1)" - v-if="currentFiberOpticTape" - ></i> + <template v-else-if="n.v.ps != undefined && n.v.ps.value === '鍏夌氦甯�'"> + <div style="display: flex;flex-wrap: nowrap;align-items: center;"> + <i class="el-icon-caret-left table_caret" @click="caretTape(-1)" v-if="currentFiberOpticTape"></i> <div :style="`font-family:${n.v.ff} !important;`"> {{ currentFiberOpticTape @@ -901,75 +644,49 @@ : "" }} </div> - <i - class="el-icon-caret-right table_caret" - v-if="currentFiberOpticTape" - @click="caretTape(1)" - ></i> + <i class="el-icon-caret-right table_caret" v-if="currentFiberOpticTape" @click="caretTape(1)"></i> </div> </template> - <template - v-else-if="n.v.ps != undefined && n.v.ps.value === '鍏夌氦'" - > - <div - style="display: flex;flex-wrap: nowrap;align-items: center;" - > - <i - class="el-icon-caret-left table_caret" - @click="caretOptic(-1)" - v-if="currentFiberOptic" - ></i> + <template v-else-if="n.v.ps != undefined && n.v.ps.value === '鍏夌氦'"> + <div style="display: flex;flex-wrap: nowrap;align-items: center;"> + <i class="el-icon-caret-left table_caret" @click="caretOptic(-1)" v-if="currentFiberOptic"></i> <div :style="`font-family:${n.v.ff} !important;`"> {{ currentFiberOptic ? currentFiberOptic.color : "" }} </div> - <i - v-if="currentFiberOptic" - class="el-icon-caret-right table_caret" - @click="caretOptic(1)" - ></i> + <i v-if="currentFiberOptic" class="el-icon-caret-right table_caret" @click="caretOptic(1)"></i> </div> </template> - <template - v-else-if=" - n.v.ps != undefined && n.v.ps.value === '璇曢獙鍓嶆牱鍝佹鏌�' - " - > - <el-select - class="table_input" - v-model="n.v.v" - :disabled=" - state > 1 || - (n.u != userId && n.u != undefined && n.u != '') - " - @change="val => changeSampleCheck(val, n, '鍓�')" - > + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '璇曢獙鍓嶆牱鍝佹鏌�' + "> + <el-select class="table_input" v-model="n.v.v" :disabled="state > 1 || + (n.u != userId && n.u != undefined && n.u != '') + " @change="val => changeSampleCheck(val, n, '鍓�')"> <el-option label="瀹屽ソ" :value="'瀹屽ソ'"></el-option> <el-option label="鐮存崯" :value="'鐮存崯'"></el-option> </el-select> </template> - <template - v-else-if=" - n.v.ps != undefined && n.v.ps.value === '璇曢獙鍚庢牱鍝佹鏌�' - " - > - <el-select - class="table_input" - v-model="n.v.v" - :disabled=" - state > 1 || - (n.u != userId && n.u != undefined && n.u != '') - " - @change="val => changeSampleCheck(val, n, '鍚�')" - > + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '璇曢獙鍚庢牱鍝佹鏌�' + "> + <el-select class="table_input" v-model="n.v.v" :disabled="state > 1 || + (n.u != userId && n.u != undefined && n.u != '') + " @change="val => changeSampleCheck(val, n, '鍚�')"> <el-option label="瀹屽ソ" :value="'瀹屽ソ'"></el-option> <el-option label="鐮存崯" :value="'鐮存崯'"></el-option> </el-select> </template> - <span - v-else - :style="`font-family:${n.v.ff} !important;`" - v-html="getValue(n.v)" - ></span> + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '瀹為獙缁撴灉' + "> + <el-select class="table_input" v-model="n.v.v" :disabled="state > 1 || + (n.u != userId && n.u != undefined && n.u != '') + " @change="val => changeSampleCheck(val, n, '瀹為獙缁撴灉')"> + <el-option label="鏃犲紓甯�" :value="'鏃犲紓甯�'"></el-option> + <el-option label="涓嶅悎鏍�" :value="'涓嶅悎鏍�'"></el-option> + </el-select> + </template> + <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span> </div> </td> </tr> @@ -977,225 +694,104 @@ </table> </div> <!-- 娓╁害寰幆妫�楠屽師濮嬭褰� --> - <div - v-loading="tableLoading" - v-else-if=" - tableLists.find(m => m.templateId == currentTable).templateName == - '娓╁害寰幆妫�楠屽師濮嬭褰�' - " - > + <div v-loading="tableLoading" v-else-if=" + tableLists.find(m => m.templateId == currentTable).templateName == + '娓╁害寰幆妫�楠屽師濮嬭褰�' + "> <el-divider></el-divider> - <h4 - style="margin-bottom: 20px;font-size: 24px;font-weight: 400;text-align: center;" - > + <h4 style="margin-bottom: 20px;font-size: 24px;font-weight: 400;text-align: center;"> 娓╁害寰幆妫�楠屽師濮嬭褰� </h4> - <el-form - :inline="true" - :model="wareForm" - class="form-inline" - label-width="100px" - style="justify-content: flex-start;display: flex;align-items: center;width: 100%;" - > + <el-form :inline="true" :model="wareForm" class="form-inline" label-width="100px" + style="justify-content: flex-start;display: flex;align-items: center;width: 100%;"> <el-form-item label="鍨嬪彿:" style="margin-bottom: 0;"> - <el-input - clearable - v-model="wareForm0.model" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="wareForm0.model" disabled size="small" placeholder=""></el-input> </el-form-item> <el-form-item label="璇曢獙鏂规硶:" style="margin-bottom: 0;"> - <el-input - clearable - v-model="wareForm0.methodName" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="wareForm0.methodName" disabled size="small" placeholder=""></el-input> </el-form-item> <!-- <el-form-item label="妫�娴嬩緷鎹�:" style="margin-bottom: 0;"> <el-input clearable v-model="wareForm0.sample" disabled size="small" placeholder=""></el-input> </el-form-item> --> <el-form-item label="寰幆娆℃暟:" style="margin-bottom: 0;"> - <el-select - v-model="wareForm.inspectionItem" - placeholder="璇烽�夋嫨" - size="small" - @change="m => wareFormChange(m, 'inspectionItem')" - > - <el-option - v-for="item in numOptions" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="wareForm.inspectionItem" placeholder="璇烽�夋嫨" size="small" + @change="m => wareFormChange(m, 'inspectionItem')"> + <el-option v-for="item in numOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item label="娓╁害:" style="margin-bottom: 0;"> - <el-select - v-model="wareForm.inspectionItemSubclass" - placeholder="璇烽�夋嫨" - size="small" - @change="m => wareFormChange(m, 'inspectionItemSubclass')" - > - <el-option - v-for="item in temperatureOptions" - :key="item.value" - :label="item.label" - :value="item.value" - > + <el-select v-model="wareForm.inspectionItemSubclass" placeholder="璇烽�夋嫨" size="small" + @change="m => wareFormChange(m, 'inspectionItemSubclass')"> + <el-option v-for="item in temperatureOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> <span style="margin-left: 4px;">鈩�</span> </el-form-item> </el-form> <el-divider></el-divider> - <el-form - :inline="true" - :model="equipForm" - label-width="100px" - style="justify-content: flex-start;display: flex;align-items: center;width: 100%;" - > + <el-form :inline="true" :model="equipForm" label-width="100px" + style="justify-content: flex-start;display: flex;align-items: center;width: 100%;"> <el-form-item label="浠櫒鍚嶇О:"> - <el-input - clearable - v-model="equipForm.value0" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="equipForm.value0" disabled size="small" placeholder=""></el-input> </el-form-item> <el-form-item label="浠櫒缂栧彿:"> - <el-select - v-model="equipForm.code0" - :disabled="state > 1" - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in equipOptions" - :key="item.value" - :label="item.value" - :value="item.value" - > + <el-select v-model="equipForm.code0" :disabled="state > 1" placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item label="浠櫒鍚嶇О:"> - <el-input - clearable - v-model="equipForm.value1" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="equipForm.value1" disabled size="small" placeholder=""></el-input> </el-form-item> <el-form-item label="浠櫒缂栧彿:"> - <el-select - v-model="equipForm.code1" - :disabled="state > 1" - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in equipOptions" - :key="item.value" - :label="item.value" - :value="item.value" - > + <el-select v-model="equipForm.code1" :disabled="state > 1" placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> </el-option> </el-select> </el-form-item> </el-form> - <el-table - :data="wareTableData" - ref="wareTableData" - border - v-loading="wareTableDataLoading" - style="width: 100%;margin-bottom: 30px;" - align="center" - v-if=" + <el-table :data="wareTableData" ref="wareTableData" border v-loading="wareTableDataLoading" + style="width: 100%;margin-bottom: 30px;" align="center" v-if=" (wareForm.inspectionItemSubclass != '20(甯告俯)' && wareForm.inspectionItemSubclass != '20') || - (wareForm.inspectionItemSubclass == '20(甯告俯)' && - wareForm.inspectionItem == 1) || - (wareForm.inspectionItemSubclass == '20' && - wareForm.inspectionItem == numOptions.length) - " - > + (wareForm.inspectionItemSubclass == '20(甯告俯)' && + wareForm.inspectionItem == 1) || + (wareForm.inspectionItemSubclass == '20' && + wareForm.inspectionItem == numOptions.length) + "> <el-table-column label="搴忓彿" type="index" width="59" align="center"> </el-table-column> - <el-table-column - prop="bushColor" - label="绠¤壊鏍�" - width="75" - align="center" - > + <el-table-column prop="bushColor" label="绠¤壊鏍�" width="75" align="center"> </el-table-column> - <el-table-column - prop="code" - label="鍏夌氦甯︾紪鍙�" - width="105" - align="center" - > + <el-table-column prop="code" label="鍏夌氦甯︾紪鍙�" width="105" align="center"> </el-table-column> - <el-table-column - prop="color" - label="鍏夌氦鑹叉爣" - align="center" - width="90" - > + <el-table-column prop="color" label="鍏夌氦鑹叉爣" align="center" width="90"> </el-table-column> <template v-for="(item, index) in wareLength"> - <el-table-column - prop="value0" - label="澶栫" - align="center" - width="100" - :key="new Date().getTime() + '1234567'" - > + <el-table-column prop="value0" label="澶栫" align="center" width="100" + :key="new Date().getTime() + '1234567'"> <template slot="header"> {{ "澶栫" + (index + 1) }} </template> <template slot-scope="scope"> - <el-input - size="small" - v-model="scope.row.arr[index].value0" - placeholder="" + <el-input size="small" v-model="scope.row.arr[index].value0" placeholder="" :disabled="state > 1 || !dataAcquisitionEidtAble" - @change="m => changeItem(scope.row.arr[index])" - ></el-input> + @change="m => changeItem(scope.row.arr[index])"></el-input> </template> </el-table-column> - <el-table-column - prop="value1" - label="鍐呯" - align="center" - width="100" - :key="new Date().getTime() + '23333333'" - > + <el-table-column prop="value1" label="鍐呯" align="center" width="100" + :key="new Date().getTime() + '23333333'"> <template slot="header"> {{ "鍐呯" + (index + 1) }} </template> <template slot-scope="scope"> - <el-input - size="small" - :disabled="state > 1 || !dataAcquisitionEidtAble" - v-model="scope.row.arr[index].value1" - placeholder="" - @change="m => changeItem(scope.row.arr[index])" - ></el-input> + <el-input size="small" :disabled="state > 1 || !dataAcquisitionEidtAble" + v-model="scope.row.arr[index].value1" placeholder="" + @change="m => changeItem(scope.row.arr[index])"></el-input> </template> </el-table-column> - <el-table-column - prop="comValue" - align="center" - min-width="150" - :key="new Date().getTime() + '364654654'" - > + <el-table-column prop="comValue" align="center" min-width="150" :key="new Date().getTime() + '364654654'"> <template slot="header"> {{ "琛板噺绯绘暟" + item }} </template> @@ -1203,14 +799,9 @@ <span>{{ scope.row.arr[index].comValue }}</span> </template> </el-table-column> - <el-table-column - prop="resValue" - label="琛板噺宸�" - align="center" - v-if="wareForm.inspectionItemSubclass != '20(甯告俯)'" - min-width="90" - :key="new Date().getTime() + '434634634634'" - > + <el-table-column prop="resValue" label="琛板噺宸�" align="center" + v-if="wareForm.inspectionItemSubclass != '20(甯告俯)'" min-width="90" + :key="new Date().getTime() + '434634634634'"> <template slot="header"> {{ "琛板噺宸�" + (index + 1) }} </template> @@ -1218,33 +809,15 @@ <span>{{ scope.row.arr[index].resValue }}</span> </template> </el-table-column> - <el-table-column - prop="insResult" - label="缁撹" - align="center" - min-width="70" - v-if="wareForm.inspectionItemSubclass != '20(甯告俯)'" - :key="new Date().getTime() + '53457689809808-'" - > + <el-table-column prop="insResult" label="缁撹" align="center" min-width="70" + v-if="wareForm.inspectionItemSubclass != '20(甯告俯)'" :key="new Date().getTime() + '53457689809808-'"> <template slot="header"> {{ "缁撹" + (index + 1) }} </template> <template slot-scope="scope"> - <span - v-if="scope.row.arr[index].insResult === 1" - style="color: green;" - >鍚堟牸</span - > - <span - v-else-if="scope.row.arr[index].insResult === 0" - style="color: red;" - >涓嶅悎鏍�</span - > - <span - v-else-if="scope.row.arr[index].insResult === 3" - style="color: #3A7BFA;" - >涓嶅垽瀹�</span - > + <span v-if="scope.row.arr[index].insResult === 1" style="color: green;">鍚堟牸</span> + <span v-else-if="scope.row.arr[index].insResult === 0" style="color: red;">涓嶅悎鏍�</span> + <span v-else-if="scope.row.arr[index].insResult === 3" style="color: #3A7BFA;">涓嶅垽瀹�</span> <span v-else>寰呭畾</span> </template> </el-table-column> @@ -1252,135 +825,56 @@ </el-table> </div> <!-- 鐑惊鐜�/娓╁崌璇曢獙妫�楠屽師濮嬭褰� --> - <div - v-loading="tableLoading" - v-else-if=" - tableLists - .find(m => m.templateId == currentTable) - .templateName.includes('鐑惊鐜�') || - tableLists - .find(m => m.templateId == currentTable) - .templateName.includes('娓╁崌璇曢獙') - " - > + <div v-loading="tableLoading" v-else-if=" + tableLists + .find(m => m.templateId == currentTable) + .templateName.includes('鐑惊鐜�') || + tableLists + .find(m => m.templateId == currentTable) + .templateName.includes('娓╁崌璇曢獙') + "> <el-divider></el-divider> - <h4 - style="margin-bottom: 20px;font-size: 24px;font-weight: 400;text-align: center;" - > + <h4 style="margin-bottom: 20px;font-size: 24px;font-weight: 400;text-align: center;"> {{ tableLists.find(m => m.templateId == currentTable).templateName }} </h4> - <el-form - :inline="true" - :model="wareForm" - class="form-inline" - label-width="100px" - style="justify-content: flex-start;display: flex;align-items: center;width: 100%;" - > + <el-form :inline="true" :model="wareForm" class="form-inline" label-width="100px" + style="justify-content: flex-start;display: flex;align-items: center;width: 100%;"> <el-form-item label="浠櫒鍚嶇О:" style="margin-bottom: 0;"> - <el-input - clearable - v-model="equipForm.value0" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="equipForm.value0" disabled size="small" placeholder=""></el-input> </el-form-item> <el-form-item label="浠櫒鍚嶇О:" style="margin-bottom: 0;"> - <el-input - clearable - v-model="equipForm.value1" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="equipForm.value1" disabled size="small" placeholder=""></el-input> </el-form-item> <el-form-item label="鍨嬪彿:" style="margin-bottom: 0;"> - <el-input - clearable - v-model="thermalCyclingInfo.model" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="thermalCyclingInfo.model" disabled size="small" placeholder=""></el-input> </el-form-item> <el-form-item label="璇曢獙鏂规硶:" style="margin-bottom: 0;"> - <el-input - clearable - v-model="thermalCyclingInfo.methodName" - disabled - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="thermalCyclingInfo.methodName" disabled size="small" placeholder=""></el-input> </el-form-item> </el-form> <el-divider></el-divider> - <el-form - :inline="true" - :model="equipForm" - label-width="100px" - style="justify-content: flex-start;display: flex;align-items: center;width: 100%;" - > + <el-form :inline="true" :model="equipForm" label-width="100px" + style="justify-content: flex-start;display: flex;align-items: center;width: 100%;"> <el-form-item label="浠櫒缂栧彿:"> - <el-select - v-model="equipForm.code0" - :disabled="state > 1" - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in equipOptions" - :key="item.value" - :label="item.value" - :value="item.value" - > + <el-select v-model="equipForm.code0" :disabled="state > 1" placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item label="浠櫒缂栧彿:"> - <el-select - v-model="equipForm.code1" - :disabled="state > 1" - placeholder="璇烽�夋嫨" - size="small" - > - <el-option - v-for="item in equipOptions" - :key="item.value" - :label="item.value" - :value="item.value" - > + <el-select v-model="equipForm.code1" :disabled="state > 1" placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in equipOptions" :key="item.value" :label="item.value" :value="item.value"> </el-option> </el-select> </el-form-item> - <el-form-item - label="寰幆娆℃暟:" - v-if="thermalCyclingInfo.inspectionItemClass == '鐩存祦鐢甸樆'" - > - <el-input-number - v-model="thermalCyclingInfo.inspectionItem" - :min="1" - :max="thermalCyclingInfo.max" - label="" - style="margin-top:4px;width: 190px;" - size="small" - @change="thermalCyclingChange" - ></el-input-number> + <el-form-item label="寰幆娆℃暟:" v-if="thermalCyclingInfo.inspectionItemClass == '鐩存祦鐢甸樆'"> + <el-input-number v-model="thermalCyclingInfo.inspectionItem" :min="1" :max="thermalCyclingInfo.max" label="" + style="margin-top:4px;width: 190px;" size="small" @change="thermalCyclingChange"></el-input-number> </el-form-item> - <el-button - type="primary" - size="small" - style="margin-bottom: 22px;margin-left: 30px;" - @click="handleAddThermal" - v-if="state == 1" - >鏂板</el-button - > - <el-button - size="small" - style="margin-bottom: 22px;" - @click="handleDeleteThermal" - v-if="state == 1" - >鍒犻櫎</el-button - > + <el-button type="primary" size="small" style="margin-bottom: 22px;margin-left: 30px;" + @click="handleAddThermal" v-if="state == 1">鏂板</el-button> + <el-button size="small" style="margin-bottom: 22px;" @click="handleDeleteThermal" + v-if="state == 1">鍒犻櫎</el-button> </el-form> <div class="table-container" v-loading="thermalCyclingLoading"> <table border="1" cellpadding="10" class="thermal-table"> @@ -1391,69 +885,32 @@ </tr> <tr v-for="(item, index) in thermalCyclingInfo.arr"> <td style="width: 100px;text-align: center;">{{ item.name }}</td> - <td - v-for="(m, i) in thermalCyclingInfo.length" - style="min-width: 150px;" - > - <div - style="display: flex;align-items: center;margin-bottom: 5px;" - > - <label - style="width: 100px;white-space: nowrap;font-size: 12px;" - >娓╁害:</label - > - <el-input - clearable - size="small" - placeholder="" - v-model="item.arr[i].value0" - :disabled="state > 1" - @change="m => saveThermalCycling(m, item, 'value0')" - ></el-input> - <span - style="font-size: 12px;margin-left: 13px;margin-right: 13px;" - > - 鈩�</span - > + <td v-for="(m, i) in thermalCyclingInfo.length" style="min-width: 150px;"> + <div style="display: flex;align-items: center;margin-bottom: 5px;"> + <label style="width: 100px;white-space: nowrap;font-size: 12px;">娓╁害:</label> + <el-input clearable size="small" placeholder="" v-model="item.arr[i].value0" :disabled="state > 1" + @change="m => saveThermalCycling(m, item, 'value0')"></el-input> + <span style="font-size: 12px;margin-left: 13px;margin-right: 13px;"> + 鈩�</span> </div> - <div - style="display: flex;align-items: center;" - v-if=" - item.name != '鐜娓╁害' && - thermalCyclingInfo.inspectionItemClass == '鐩存祦鐢甸樆' - " - > - <label - style="width: 100px;white-space: nowrap;font-size: 12px;" - >鐩存祦鐢甸樆:</label - > - <el-input - clearable - size="small" - :disabled="state > 1" - placeholder="" - v-model="item.arr[i].value1" - @change="saveThermalCycling" - ></el-input> + <div style="display: flex;align-items: center;" v-if=" + item.name != '鐜娓╁害' && + thermalCyclingInfo.inspectionItemClass == '鐩存祦鐢甸樆' + "> + <label style="width: 100px;white-space: nowrap;font-size: 12px;">鐩存祦鐢甸樆:</label> + <el-input clearable size="small" :disabled="state > 1" placeholder="" v-model="item.arr[i].value1" + @change="saveThermalCycling"></el-input> <span style="margin-left: 5px;font-size: 12px;"> 惟/km</span> </div> </td> <td> - <template - v-if="item.name == '鐜娓╁害' || item.name == '瀵肩嚎娓╁害'" - > + <template v-if="item.name == '鐜娓╁害' || item.name == '瀵肩嚎娓╁害'"> <span>/</span> </template> <template v-else> - <span v-if="item.insResult === 1" style="color: green;" - >鍚堟牸</span - > - <span v-else-if="item.insResult === 0" style="color: red;" - >涓嶅悎鏍�</span - > - <span v-else-if="item.insResult === 3" style="color: #3A7BFA;" - >涓嶅垽瀹�</span - > + <span v-if="item.insResult === 1" style="color: green;">鍚堟牸</span> + <span v-else-if="item.insResult === 0" style="color: red;">涓嶅悎鏍�</span> + <span v-else-if="item.insResult === 3" style="color: #3A7BFA;">涓嶅垽瀹�</span> <span v-else>寰呭畾</span> </template> </td> @@ -1462,226 +919,88 @@ </div> </div> <!-- 鐢佃矾璇曢獙 --> - <div - v-else-if=" - tableLists - .find(m => m.templateId == currentTable) - .templateName.includes('鐢佃矾璇曢獙') - " - style="width: 100%;overflow-x: auto;overflow-y: visible;" - > + <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> + <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> + <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> + <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('娓╂箍搴﹁瘯楠�') - " - > - <Humidity - :insProduct="currentSample.insProduct" - :orderId="id" - :sampleId="currentSample.id" - :state="state" - :isLook="isLook" - :num="currentSample.num1" - /> + <div v-else-if=" + tableLists + .find(m => m.templateId == currentTable) + .templateName.includes('娓╂箍搴﹁瘯楠�') + "> + <Humidity :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" + :isLook="isLook" :num="currentSample.num1" /> </div> <!-- 鍔熺巼璇曢獙 --> - <div - v-else-if=" - tableLists - .find(m => m.templateId == currentTable) - .templateName.includes('鍔熺巼瀹归噺') - " - > - <PowerCapacity - :insProduct="currentSample.insProduct" - :orderId="id" - :sampleId="currentSample.id" - :state="state" - :isLook="isLook" - :num="currentSample.num1" - /> + <div v-else-if=" + tableLists + .find(m => m.templateId == currentTable) + .templateName.includes('鍔熺巼瀹归噺') + "> + <PowerCapacity :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" + :isLook="isLook" :num="currentSample.num1" /> </div> - <el-upload - :action="action" - :data="{ - orderId: this.orderId0, - sampleId: id, - sonLaboratory: sonLaboratory - }" - v-if="state == 1 && fileAdd" - :on-success="handleSuccessUp" - :show-file-list="false" - accept=".jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv" - :headers="headers" - :before-upload="beforeUpload" - style="width: 80px !important;" - :on-error="onError" - ref="upload" - > - <el-button size="small" type="primary" v-if="state == 1" - >闄勪欢涓婁紶</el-button - ></el-upload - > + <el-upload :action="action" :data="{ + orderId: this.orderId0, + sampleId: id, + sonLaboratory: sonLaboratory + }" v-if="state == 1 && fileAdd" :on-success="handleSuccessUp" :show-file-list="false" + accept=".jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv" :headers="headers" + :before-upload="beforeUpload" style="width: 80px !important;" :on-error="onError" ref="upload"> + <el-button size="small" type="primary" v-if="state == 1">闄勪欢涓婁紶</el-button></el-upload> <!-- <span v-if="sonLaboratory === '杩滃満'||sonLaboratory === '杩戝満'" style="color: red;font-size: 12px;">杈愬皠璇曢獙灏介噺涓婁紶璁惧瀵煎嚭鐨刢sv鏂囦欢锛屼笉鐒惰Е鍙戜笉浜嗘姤鍛婄敓鎴�</span> --> - <ValueTable - class="value-table" - ref="fileList" - :url="$api.insOrderPlan.getFileList" - :componentData="componentData0" - :delUrl="$api.insOrderPlan.delfile" - :key="upIndex" - style="height: 100%;margin-top: 16px;" - /> + <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList" + :componentData="componentData0" :delUrl="$api.insOrderPlan.delfile" :key="upIndex" + style="height: 100%;margin-top: 16px;" /> </div> - <el-drawer - title="鏍峰搧鍒囨崲" - :visible.sync="sampleVisible" - :size="500" - :modal="!noBack" - > - <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" - :current-row-key="currentKey" - :row-key="record => record.index" - v-if="sampleVisible" - > - <el-table-column - type="index" - align="center" - label="搴忓彿" - width="70px" - :key="Math.random()" - > + <el-drawer title="鏍峰搧鍒囨崲" :visible.sync="sampleVisible" :size="500" :modal="!noBack"> + <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" + :current-row-key="currentKey" :row-key="record => record.index" v-if="sampleVisible"> + <el-table-column type="index" align="center" label="搴忓彿" width="70px" :key="Math.random()"> </el-table-column> - <el-table-column - prop="sampleCode" - label="鏍峰搧缂栧彿" - min-width="100px" - show-overflow-tooltip - ></el-table-column> - <el-table-column - prop="model" - label="鏍峰搧鍨嬪彿" - min-width="100px" - show-overflow-tooltip - ></el-table-column> - <el-table-column - prop="insState" - label="妫�娴嬬姸鎬�" - width="100px" - show-overflow-tooltip - > + <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="100px" show-overflow-tooltip></el-table-column> + <el-table-column prop="model" label="鏍峰搧鍨嬪彿" min-width="100px" show-overflow-tooltip></el-table-column> + <el-table-column prop="insState" label="妫�娴嬬姸鎬�" width="100px" show-overflow-tooltip> <template slot-scope="scope"> - <el-tag - v-for="(item, i) in typeList" - :key="i" - v-if="item.value == scope.row.insState" - :type="item.type" - size="medium" - style="margin-right: 5px;" - >{{ item.label }}</el-tag - > + <el-tag v-for="(item, i) in typeList" :key="i" v-if="item.value == scope.row.insState" :type="item.type" + size="medium" style="margin-right: 5px;">{{ item.label }}</el-tag> </template> </el-table-column> - <el-table-column - prop="checkName" - label="妫�楠屼汉" - min-width="80px" - show-overflow-tooltip - ></el-table-column> - <el-table-column - prop="isLeave" - label="鏄惁鐣欐牱" - width="95px" - show-overflow-tooltip - align="center" - > + <el-table-column prop="checkName" label="妫�楠屼汉" min-width="80px" show-overflow-tooltip></el-table-column> + <el-table-column prop="isLeave" label="鏄惁鐣欐牱" width="95px" show-overflow-tooltip align="center"> <template slot-scope="scope"> <span>{{ scope.row.isLeave == 0 ? "鍚�" : "鏄�" }}</span> </template> </el-table-column> <!-- 妫�楠屽崟浼氭湁涓�涓槸鍚︽湁閰嶅鏍峰搧瀛楁鎺у埗鏄剧ず --> - <el-table-column - prop="joinModel" - label="閰嶅鏍峰搧鍨嬪彿" - min-width="130px" - show-overflow-tooltip - v-if="insOrder.mating > 0" - ></el-table-column> - <el-table-column - prop="joinName" - label="閰嶅鏍峰搧鍚嶇О" - min-width="130px" - show-overflow-tooltip - v-if="insOrder.mating > 0" - ></el-table-column> - <el-table-column - prop="joinNum" - label="閰嶅鏍峰搧鏁伴噺" - min-width="130px" - show-overflow-tooltip - v-if="insOrder.mating > 0" - ></el-table-column> + <el-table-column prop="joinModel" label="閰嶅鏍峰搧鍨嬪彿" min-width="130px" show-overflow-tooltip + v-if="insOrder.mating > 0"></el-table-column> + <el-table-column prop="joinName" label="閰嶅鏍峰搧鍚嶇О" min-width="130px" show-overflow-tooltip + v-if="insOrder.mating > 0"></el-table-column> + <el-table-column prop="joinNum" label="閰嶅鏍峰搧鏁伴噺" min-width="130px" show-overflow-tooltip + v-if="insOrder.mating > 0"></el-table-column> </el-table> </el-drawer> <el-drawer title="浠诲姟鍒囨崲" :visible.sync="taskVisible" :size="500"> - <ValueTable - class="value-table" - ref="insOrderPlan" - :url="$api.insOrderPlan.inspectionOrderDetailsTaskSwitching" - :componentData="componentData" - :key="upIndex" - style="height: 100%;" - /> + <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.inspectionOrderDetailsTaskSwitching" + :componentData="componentData" :key="upIndex" style="height: 100%;" /> </el-drawer> <el-dialog title="妫�楠屽鏍�" :visible.sync="reviewDia" width="500px"> <div class="body" style="display: flex;padding: 10px;" v-if="reviewDia"> @@ -1689,48 +1008,22 @@ <span class="required-span">* </span>鍐嶆璇曢獙鐨勭悊鐢憋細 </div> <div class="search_input" style="width: 100%;"> - <el-input - size="small" - clearable - v-model="noReason" - type="textarea" - :autosize="{ minRows: 4 }" - ></el-input> + <el-input size="small" clearable v-model="noReason" type="textarea" :autosize="{ minRows: 4 }"></el-input> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="reviewDia = false">鍙� 娑�</el-button> - <el-button - type="primary" - @click="handleReviewDia" - :loading="reviewLoading" - >纭� 瀹�</el-button - > + <el-button type="primary" @click="handleReviewDia" :loading="reviewLoading">纭� 瀹�</el-button> </span> </el-dialog> <el-dialog title="鎸囧畾澶嶆牳浜哄憳" :visible.sync="addVerifyDia" width="400px"> - <div - class="body" - style="display: flex;padding: 10px;align-items: center;" - > + <div class="body" style="display: flex;padding: 10px;align-items: center;"> <div class="search_label" style="width: 150px;"> <span class="required-span">*</span>澶嶆牳浜� </div> <div class="search_input" style="width: 100%;"> - <el-select - v-model="verifyUser" - placeholder="璇烽�夋嫨" - size="small" - style="width: 100%;" - clearable - filterable - > - <el-option - v-for="(item, i) in personList" - :key="i" - :label="item.label" - :value="item.value" - > + <el-select v-model="verifyUser" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" clearable filterable> + <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value"> </el-option> </el-select> </div> @@ -1740,14 +1033,8 @@ <el-button type="primary" @click="submit()">纭� 瀹�</el-button> </span> </el-dialog> - <el-dialog - title="鏁版嵁閲囬泦" - :visible.sync="dataGetDia" - :close-on-click-modal="false" - :close-on-press-escape="false" - :show-close="false" - custom-class="custom-dialog" - > + <el-dialog title="鏁版嵁閲囬泦" :visible.sync="dataGetDia" :close-on-click-modal="false" :close-on-press-escape="false" + :show-close="false" custom-class="custom-dialog"> <div> <table border="1" cellpadding="10" class="thermal-table"> <tr> @@ -1760,24 +1047,12 @@ <td :rowspan="item.child.length">{{ item.faName }}</td> <td>{{ item.child[0].name }}</td> <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" - >{{ n }}</el-checkbox - > + <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">{{ n }}</el-checkbox> </el-checkbox-group> </td> </tr> - <tr - v-for="(m, i) in item.child" - :key="i + 'bbbbbbbbbbbbbb'" - v-show="i > 0" - > + <tr v-for="(m, i) in item.child" :key="i + 'bbbbbbbbbbbbbb'" v-show="i > 0"> <td>{{ m.name }}</td> <td style="text-align: left;"> <el-checkbox-group v-model="getDataIndex" :max="m.maxNum"> @@ -1791,68 +1066,36 @@ </table> </div> <span slot="footer" class="dialog-footer"> - <el-button - type="primary" - @click="submitDataGet()" - :loading="getDataIndexLoading" - >纭� 瀹�</el-button - > + <el-button type="primary" @click="submitDataGet()" :loading="getDataIndexLoading">纭� 瀹�</el-button> </span> </el-dialog> - <el-dialog - title="閫夋嫨鐢佃矾妫�楠屾ā鏉跨増鏈�" - :visible.sync="versionDialogVisible" - width="30%" - :close-on-click-modal="false" - :close-on-press-escape="false" - :show-close="false" - > + <el-dialog title="閫夋嫨鐢佃矾妫�楠屾ā鏉跨増鏈�" :visible.sync="versionDialogVisible" width="30%" :close-on-click-modal="false" + :close-on-press-escape="false" :show-close="false"> <el-radio-group v-model="currentTableState"> <el-radio :label="0">鐢佃皟-鐢佃矾妫�楠屽師濮嬭褰�</el-radio> <el-radio :label="1">闈炵數璋�-鐢佃矾妫�楠屽師濮嬭褰�</el-radio> </el-radio-group> <span slot="footer" class="dialog-footer"> - <el-button type="primary" :loading="versionLoading" @click="saveVersion" - >纭� 瀹�</el-button - > + <el-button type="primary" :loading="versionLoading" @click="saveVersion">纭� 瀹�</el-button> </span> </el-dialog> <el-dialog title="璇曢獙淇℃伅" :visible.sync="experimentDia" width="50%"> <div style="height: 80vh;overflow-y: auto;"> - <div - class="body" - style="display: flex;padding: 10px;align-items: center;" - v-if="experimentDia0" - > + <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0"> <div class="search_label" style="width: 150px;"> <span class="required-span">*</span>瀹為獙闃舵 </div> <div class="search_input" style="width: 100%;"> - <el-input - clearable - v-model="experimentInfo.term" - size="small" - placeholder="" - ></el-input> + <el-input clearable v-model="experimentInfo.term" size="small" placeholder=""></el-input> </div> </div> - <div - class="body" - style="display: flex;padding: 10px;align-items: center;" - v-if="experimentDia0" - > + <div class="body" style="display: flex;padding: 10px;align-items: center;" v-if="experimentDia0"> <div class="search_label" style="width: 150px;"> <span class="required-span">*</span>瀹為獙鎿嶄綔 </div> <div class="search_input" style="width: 100%;"> - <el-input - clearable - v-model="experimentInfo.note" - size="small" - placeholder="" - type="textarea" - :rows="2" - ></el-input> + <el-input clearable v-model="experimentInfo.note" size="small" placeholder="" type="textarea" + :rows="2"></el-input> </div> </div> <template v-for="(x, y) in newUserInfo"> @@ -1861,8 +1104,7 @@ </p> <table border="1" cellpadding="10" class="thermal-table"> <tr - style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;" - > + style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;"> <td>鏍峰搧</td> <td>鏍峰搧缂栧彿</td> <td>鍨嬪彿</td> @@ -1882,13 +1124,7 @@ <td>{{ m.inspectionItem }}</td> <td>{{ m.inspectionItemSubclass }}</td> <td> - <el-input-number - v-model="x.timeArr[i]" - :min="0" - :max="100" - label="宸ユ椂" - size="small" - ></el-input-number> + <el-input-number v-model="x.timeArr[i]" :min="0" :max="100" label="宸ユ椂" size="small"></el-input-number> </td> </tr> </template> @@ -1900,26 +1136,12 @@ <el-button type="primary" @click="submit0">纭� 瀹�</el-button> </span> </el-dialog> - <el-dialog - title="鏂囦欢棰勮" - :visible.sync="lookFileVisible" - width="60%" - fullscreen - :modal="false" - > - <filePreview - v-if="lookFileVisible" - :fileUrl="currentFile.url" - :currentFile="currentFile" - style="max-height: 87vh;overflow-y: auto;" - /> + <el-dialog title="鏂囦欢棰勮" :visible.sync="lookFileVisible" width="60%" fullscreen :modal="false"> + <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" :currentFile="currentFile" + style="max-height: 87vh;overflow-y: auto;" /> </el-dialog> <el-dialog title="淇濆瓨妯℃澘" :visible.sync="templateDia" width="400px"> - <div - class="body" - style="display: flex;align-items: center;" - v-if="templateDia" - > + <div class="body" style="display: flex;align-items: center;" v-if="templateDia"> <div class="search_label" style="width: 90px;"> <span class="required-span">* </span>妯℃澘鍚嶇О锛� </div> @@ -1929,22 +1151,12 @@ </div> <span slot="footer" class="dialog-footer"> <el-button @click="templateDia = false">鍙� 娑�</el-button> - <el-button - type="primary" - @click="addTemplateDia" - :loading="templateLoading" - >纭� 瀹�</el-button - > + <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">纭� 瀹�</el-button> </span> </el-dialog> <el-dialog title="澶嶆牳" :visible.sync="upInsReviewDia" width="400px"> - <el-radio-group - v-model="upInsReviewType" - style="display: flex;flex-direction: column" - > - <el-radio :label="1" style="margin: 10px 0; " - >缁х画娴嬭瘯涓嬩竴涓牱鍝佹垨鍏朵粬绔欑偣浠诲姟</el-radio - > + <el-radio-group v-model="upInsReviewType" style="display: flex;flex-direction: column"> + <el-radio :label="1" style="margin: 10px 0; ">缁х画娴嬭瘯涓嬩竴涓牱鍝佹垨鍏朵粬绔欑偣浠诲姟</el-radio> <el-radio :label="0" style="margin: 10px 0; ">鍐嶆妫�楠岃鏍峰搧</el-radio> <el-radio :label="2" style="margin: 10px 0; ">姝ゅ鎵樺崟缁撴潫</el-radio> <p style="font-size: 12px;color:red"> @@ -1953,9 +1165,7 @@ </el-radio-group> <span slot="footer" class="dialog-footer"> <el-button @click="upInsReviewDia = false">鍙� 娑�</el-button> - <el-button type="primary" @click="upInsReview" :loading="reviewLoading" - >纭� 瀹�</el-button - > + <el-button type="primary" @click="upInsReview" :loading="reviewLoading">纭� 瀹�</el-button> </span> </el-dialog> </div> @@ -2279,7 +1489,8 @@ equipName: [], insResult: null, beforeCheck: null, - afterCheck: null + afterCheck: null, + testResult: null }; } }); @@ -2480,12 +1691,12 @@ this.$axios .get( this.$api.deviceScope.dataCollection + - "?entrustCode=" + - this.insOrder.entrustCode + - "&sampleCode=" + - this.currentSample.sampleCode + - "&id=" + - this.currentSample.id + "?entrustCode=" + + this.insOrder.entrustCode + + "&sampleCode=" + + this.currentSample.sampleCode + + "&id=" + + this.currentSample.id ) .then(res => { this.dataAcquisitionLoading = false; @@ -3391,24 +2602,24 @@ if (!this.isLook) { res = await this.$axios.post( this.$api.insOrderPlan.getInsProduct + - "?id=" + - id + - "&type=" + - type + - "&laboratory=" + - this.sonLaboratory + "?id=" + + id + + "&type=" + + type + + "&laboratory=" + + this.sonLaboratory ); } else { res = await this.$axios.post( this.$api.insOrderPlan.getInsProduct2 + - "?id=" + - id + - "&type=" + - type + - "&laboratory=" + - this.sonLaboratory + - "&num=" + - this.num + "?id=" + + id + + "&type=" + + type + + "&laboratory=" + + this.sonLaboratory + + "&num=" + + this.num ); } this.tableLoading = false; @@ -3445,7 +2656,8 @@ equipName: [], insResult: null, beforeCheck: null, - afterCheck: null + afterCheck: null, + testResult: null }; } }); @@ -3497,7 +2709,8 @@ equipName: [], insResult: null, beforeCheck: null, - afterCheck: null + afterCheck: null, + testResult: null }; }); // 椤甸潰鍒楄〃鏁版嵁澶勭悊 @@ -3873,30 +3086,30 @@ let inspectionItemClass = this.currentSample.insProduct[i].inspectionItemClass == null || - this.currentSample.insProduct[i].inspectionItemClass == + this.currentSample.insProduct[i].inspectionItemClass == undefined ? "" : this.currentSample.insProduct[i].inspectionItemClass; let inspectionItem = this.currentSample.insProduct[i].inspectionItem == null || - this.currentSample.insProduct[i].inspectionItem == undefined + this.currentSample.insProduct[i].inspectionItem == undefined ? "" : this.currentSample.insProduct[i].inspectionItem; let inspectionItemSubclass = this.currentSample.insProduct[i].inspectionItemSubclass == null || - this.currentSample.insProduct[i].inspectionItemSubclass == + this.currentSample.insProduct[i].inspectionItemSubclass == undefined ? "" : this.currentSample.insProduct[i].inspectionItemSubclass; // 濡傛灉鐩哥瓑,閭d箞璇存槑鎵惧埌浜�,骞朵笖鎶奿d瀛樿捣鏉�,鍚庣画妫�楠岄」涔熶細鍦ㄩ〉闈腑鏄剧ず鍑烘潵 if ( this.currentSample.insProduct[i].templateId === - a.templateId && + a.templateId && inspectionItemClass + - inspectionItem + - inspectionItemSubclass === - str + inspectionItem + + inspectionItemSubclass === + str ) { ids.push({ r: b.r, @@ -4042,10 +3255,9 @@ this.param[b.i].insResult = b; conclusionList.forEach((n, i) => { if (n.r == b.r && n.c == b.c) { - b.v.f = `(${ - this.comparisonList.find(j => j.value == finalList[i].c) - .label - }${finalList[i].r + 1})`; + b.v.f = `(${this.comparisonList.find(j => j.value == finalList[i].c) + .label + }${finalList[i].r + 1})`; } }); } @@ -4059,6 +3271,11 @@ // b.v.v = '' this.$set(b.v, "v", ""); this.param[b.i].afterCheck = b; + } + if (b.v.ps != undefined && b.v.ps.value === "瀹為獙缁撴灉") { + // b.v.v = '' + this.$set(b.v, "v", ""); + this.param[b.i].testResult = b; } set.add(b.r); // 濡傛灉妯℃澘鍒楄〃鐨勫嚱鏁板瓨鍦�,閭d箞鍔犲叆鍒癳xcel鍑芥暟鍒楄〃閲岄潰 @@ -4095,7 +3312,7 @@ this.param[a.id].comValue[i].v.ct ); } - } catch (e) {} + } catch (e) { } try { // 妫�楠屽�艰祴鍊� let insValue = JSON.parse(a.insProductResult.insValue); @@ -4120,7 +3337,7 @@ // this.param[a.id].insValue[i].u = insValue[i].u } } - } catch (e) {} + } catch (e) { } try { // 璁惧缂栧彿璧嬪�� let equipValue = JSON.parse(a.insProductResult.equipValue); @@ -4165,7 +3382,7 @@ this.param[a.id].equipValue[i].v.v = equipValue[i].v; } } - } catch (e) {} + } catch (e) { } try { // 璁惧鍚嶇О璧嬪�� let equipName = JSON.parse(a.insProductResult.equipName); @@ -4210,8 +3427,10 @@ this.param[a.id].equipName[i].v.v = equipName[i].v; } } - } catch (e) {} + } catch (e) { } try { + // 瀹為獙缁撴灉璧嬪�� + this.param[a.id].testResult.v.v = a.insProductResult.testResult; // 鏈�缁堝�艰祴鍊� this.param[a.id].resValue = { v: { v: a.lastValue } }; // this.param[a.id].resValue.v.v = this.toFixed(a.lastValue,this.param[a.id].resValue.v.ct) @@ -4334,7 +3553,7 @@ async determineWhetherToCollectData() { let res = await this.$axios.get( this.$api.deviceScope.determineWhetherToCollectData + - "?managementNumber=''" + "?managementNumber=''" ); this.isGet = res.data; }, @@ -4449,13 +3668,13 @@ let str = v.v ? v.v : v.v === 0 - ? v.v - : v.ct && v.ct.s - ? v.ct.s.length > 0 && - v.ct.s[0].v - .replace(new RegExp("\n", "g"), "<br/>") - .replace(new RegExp("@", "g"), "<br/>") - : ""; + ? v.v + : v.ct && v.ct.s + ? v.ct.s.length > 0 && + v.ct.s[0].v + .replace(new RegExp("\n", "g"), "<br/>") + .replace(new RegExp("@", "g"), "<br/>") + : ""; // 瀵规暟鎹繚鐣欏皬鏁扮偣杩涜澶勭悊 if (v.ct && v.ct.fa && v.ct.fa.includes(".") && str) { let num = 0; @@ -4701,6 +3920,37 @@ this.$message.error("璇疯緭鍏ユ箍搴�"); return; } + let name = this.tableLists + .find(m => m.templateId == this.currentTable) + .templateName + console.log(2222, name, this.param) + if (name == '妫�楠屽師濮嬭褰�' || name == '杈愬皠璇曢獙妫�娴嬪師濮嬭褰�') { + let num = 0 + for (let i in this.param) { + if (this.param[i].insResult.v.v != 0 && this.param[i].insResult.v.v != 1) { + num++; + } + } + console.log(3333, num) + if (num > 0) { + this.$message.error("璇疯緭鍏ュ疄楠岀粨鏋�"); + return; + } + } + if (name == '杈愬皠璇曢獙妫�娴嬪師濮嬭褰�') { + let num = 0 + for (let i in this.param) { + if (!this.param[i].insValue || this.param[i].insValue.length < 2) { + num = 1 + } else if (this.param[i].insValue.find(m => !m.v.v)) { + num++ + } + } + if (num > 0) { + this.$message.error("璇疯緭鍏ュ悎鏍兼暟閲忋�佷笉鍚堟牸閲�"); + return; + } + } this.loading = true; if ( this.sonLaboratory === "鐢佃矾璇曢獙" && @@ -4854,7 +4104,7 @@ console.error(error); }); }) - .catch(() => {}); + .catch(() => { }); } } }) @@ -4877,7 +4127,7 @@ if (res.code === 200) { } }) - .catch(error => {}); + .catch(error => { }); } }, // 缁熶竴鍦ㄨ繖閲屼繚瀛樻暟鎹� @@ -4984,6 +4234,14 @@ if (type == "鍓�") { // 妫�楠屽墠 this.saveInsContext(n.i); + } else if ('瀹為獙缁撴灉') { + // 瀹為獙缁撴灉 + if (val == '鏃犲紓甯�') { + this.param[n.i].insResult.v.v = 1 + } else if (val == '涓嶅悎鏍�') { + this.param[n.i].insResult.v.v = 0 + } + this.saveInsContext(n.i); } else { // 妫�楠屽悗 this.saveInsContext(n.i); @@ -5010,12 +4268,12 @@ var flag; // 榧犳爣鎸変笅 var downX; // 榧犳爣鐐瑰嚮鐨剎涓嬫爣 var scrollLeft; // 褰撳墠鍏冪礌婊氬姩鏉$殑鍋忕Щ閲� - nav.addEventListener("mousedown", function(event) { + nav.addEventListener("mousedown", function (event) { flag = true; downX = event.clientX; // 鑾峰彇鍒扮偣鍑荤殑x涓嬫爣 scrollLeft = this.scrollLeft; // 鑾峰彇褰撳墠鍏冪礌婊氬姩鏉$殑鍋忕Щ閲� }); - nav.addEventListener("mousemove", function(event) { + nav.addEventListener("mousemove", function (event) { if (flag) { // 鍒ゆ柇鏄惁鏄紶鏍囨寜涓嬫粴鍔ㄥ厓绱犲尯鍩� var moveX = event.clientX; // 鑾峰彇绉诲姩鐨剎杞� @@ -5024,11 +4282,11 @@ } }); // 榧犳爣鎶捣鍋滄鎷栧姩 - nav.addEventListener("mouseup", function() { + nav.addEventListener("mouseup", function () { flag = false; }); // 榧犳爣绂诲紑鍏冪礌鍋滄鎷栧姩 - nav.addEventListener("mouseleave", function(event) { + nav.addEventListener("mouseleave", function (event) { flag = false; }); }, @@ -5060,7 +4318,8 @@ equipName: [], insResult: null, beforeCheck: null, - afterCheck: null + afterCheck: null, + testResult: null }; } }); @@ -5224,7 +4483,7 @@ } } }) - .catch(error => {}); + .catch(error => { }); }, /** * 灏嗘暟鍊紇淇濈暀ct.fa涓�'##'鍚庣殑鎸囧畾灏忔暟浣嶆暟锛屽苟杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆� @@ -5445,7 +4704,7 @@ this.$message.error("鍒犻櫎澶辫触"); }); }) - .catch(() => {}); + .catch(() => { }); } } }; -- Gitblit v1.9.3