From 2beadb3879986120cb8ddf9ec660175d5b17911e Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 20 二月 2025 14:42:35 +0800 Subject: [PATCH] 检验任务搬迁40% --- src/views/business/inspectionTask/inspection.vue | 645 +++++++++++++++++++++++++--------------------------------- 1 files changed, 280 insertions(+), 365 deletions(-) diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue index f6c7d33..6ae2972 100644 --- a/src/views/business/inspectionTask/inspection.vue +++ b/src/views/business/inspectionTask/inspection.vue @@ -1,9 +1,7 @@ <template> <div v-loading="loading" class="inspection"> <el-row class="title"> - <el-col :span="4" style="padding-left: 20px; text-align: left">妫�楠屽崟璇︽儏 - </el-col> - <el-col :span="20" style="text-align: right"> + <el-col :span="8" style="text-align: left"> <el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px" style="text-align: right; padding-top: 0; display: inline"> <el-form-item label="娓╁害:" style="margin-bottom: 0"> @@ -17,7 +15,9 @@ <span style="margin-left: 4px">%</span> </el-form-item> </el-form> - <el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button> + </el-col> + <el-col :span="16" style="text-align: right"> + <!-- <el-button size="small" type="primary" @click="refreshView">鍒锋柊</el-button> --> <el-button v-if="typeSource === 1" size="small" type="primary" @click="openPurchase">杩涜揣楠岃瘉</el-button> <el-button v-if="state === 1 && typeSource === 1" size="small" type="primary" @click="openUnPassDialog('add')">涓嶅悎鏍煎鐞�</el-button> @@ -68,7 +68,7 @@ <el-form-item v-if="typeSource === 1" label="鍘傚瀵嗗害:"> <el-input v-model="supplierDensity" clearable disabled placeholder="璇疯緭鍏�" size="small"></el-input> </el-form-item> - <el-form-item label="褰撳墠鏍峰搧浣嶆暟:"> + <el-form-item label="褰撳墠鏍峰搧浣嶆暟:" label-width="120px"> <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag> </el-form-item> <el-form-item label="澶囨敞:"> @@ -78,6 +78,7 @@ <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> --> </el-form-item> </el-form> + <el-divider></el-divider> </div> <div class="center"> <div class="search" style=" @@ -149,74 +150,64 @@ </div> </div> <!-- 甯歌妫�楠屽師濮嬭褰� --> - <div 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 != - '寮у瀭鐗规�ф楠屽師濮嬭褰�') - " id="nav" v-loading="tableLoading" class="center-box"> - <table v-for="(item, index) in tableList" :key="index + currentTable + currentSample.id" border="1" - cellpadding="10" class="tables" id="myTable"> - <tbody> - <tr style="white-space: nowrap"> - 濮旀墭缂栧彿锛歿{ - insOrder.entrustCode - }} - </tr> - <tr v-for="(m, i) in item.arr" :key="i"> - <td v-for="(n, j) in m" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4" - :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" :key="j" - :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;font-wight:${n.v.bl ? 'bold' : '' - };`"> - <div :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;`" class="content"> - <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" - :key="'abc-' + '000' + index + '000' + i + '000' + j" v-model="n.v.v" :disabled="(getInspectionItemType(n.i) == 1 && - !dataAcquisitionEidtAble) || + <div id="nav" v-loading="tableLoading" class="center-box"> + <template v-if=" + tableLists.find((m) => m.templateId == currentTable)"> + <table v-for="(item, index) in tableList" :key="index + currentTable + currentSample.id" border="1" + cellpadding="10" class="tables" id="myTable"> + <tbody> + <tr style="white-space: nowrap"> + 濮旀墭缂栧彿锛歿{ + insOrder.entrustCode + }} + </tr> + <tr v-for="(m, i) in item.arr" :key="i"> + <td v-for="(n, j) in m" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4" + :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" :key="j" + :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;font-wight:${n.v.bl ? 'bold' : '' + };`"> + <div :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;`" class="content"> + <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" + :key="'abc-' + '000' + index + '000' + i + '000' + j" v-model="n.v.v" :disabled="(getInspectionItemType(n.i) == 1 && + !dataAcquisitionEidtAble) || + (n.u != userId && n.u != undefined && n.u != '') + " class="table_input" @change="(m) => + changeInput( + m, + `${item.templateId}-${n.r}-${n.c}-${n.i}`, + n, + 'getDataType' + ) + " @input="handleInput(n)" @mousewheel.native.prevent @keydown.enter=" + changeInput( + '', + `${item.templateId}-${n.r}-${n.c}-${n.i}`, + n, + 'getDataType' + ) + "> + </el-input> + <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '') - " class="table_input" @change="(m) => + " class="table_input" type="textarea" @change="(m) => changeInput( m, `${item.templateId}-${n.r}-${n.c}-${n.i}`, n, 'getDataType' ) - " @input="handleInput(n)" @mousewheel.native.prevent @keydown.enter=" - changeInput( - '', - `${item.templateId}-${n.r}-${n.c}-${n.i}`, - n, - 'getDataType' - ) - "> - </el-input> - <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 || - (n.u != userId && n.u != undefined && n.u != '') - " class="table_input" type="textarea" @change="(m) => - changeInput( - m, - `${item.templateId}-${n.r}-${n.c}-${n.i}`, - n, - 'getDataType' - ) - " /> - <!-- <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state > 1 || + " /> + <!-- <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state > 1 || getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '') " class="table_input" @change="(m) => @@ -229,136 +220,131 @@ " @visible-change="(e) => getDic(e, n.i)"> <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option> </el-select> --> - <span v-else-if="getInspectionValueType(n.i) == 4" - :style="`font-family:${n.v.ff} !important;`">/</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) && + <span v-else-if="getInspectionValueType(n.i) == 4" + :style="`font-family:${n.v.ff} !important;`">/</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 + " v-model="n.v.v" class="table_input" @change="(m) => + changeInput( + m, + `${item.templateId}-${n.r}-${n.c}-${n.i}`, + n, + 'getDataType', + 'changeSelect' + ) + "> + <el-option :value="1" label="鍚堟牸"></el-option> + <el-option :value="0" label="涓嶅悎鏍�"></el-option> + <el-option :value="3" label="涓嶅垽瀹�"></el-option> + <el-option :value="2" label="寰呭畾"></el-option> + </el-select> + <template v-if="state > 1"> + <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 v-if="getInspectionValueType(n.i) != 2 && + state == 1"> + <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 - " v-model="n.v.v" class="table_input" @change="(m) => - changeInput( - m, - `${item.templateId}-${n.r}-${n.c}-${n.i}`, - n, - 'getDataType', - 'changeSelect' - ) - "> - <el-option :value="1" label="鍚堟牸"></el-option> - <el-option :value="0" label="涓嶅悎鏍�"></el-option> - <el-option :value="3" label="涓嶅垽瀹�"></el-option> - <el-option :value="2" label="寰呭畾"></el-option> - </el-select> - <template v-if="state > 1"> - <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 v-if=" - PROJECT == '妫�娴嬩腑蹇�' || - (PROJECT == '瑁呭鐢电紗' && - getInspectionValueType(n.i) != 2 && - state == 1) "> - <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> + <span>{{ n.v.v }}</span> </template> - </template> - <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 === '璁惧鍚嶇О' - "> - <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple - placeholder="璁惧" remote @change="(val) => changeEquip(val, n)" - @visible-change="(e) => getEquipOptions(e, n.i)"> - <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" :value="item.value"> - {{ item.label + "--" + item.value }} - </el-option> - </el-select> - </template> - <template v-else-if=" - n.v.ps != undefined && - n.v.ps.value === '瑕佹眰鍊�' && - state == 1 - "> - <span :style="`font-family:${n.v.ff} !important;`">{{ - getTell(n.i) - }}</span> - </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 - "> - <span :style="`font-family:${n.v.ff} !important;`">{{ + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '璁惧鍚嶇О' + "> + <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple + placeholder="璁惧" remote @change="(val) => changeEquip(val, n)" + @visible-change="(e) => getEquipOptions(e, n.i)"> + <el-option v-for="item in equipOptions" :key="item.value" :label="item.label" + :value="item.value"> + {{ item.label + "--" + item.value }} + </el-option> + </el-select> + </template> + <template v-else-if=" + n.v.ps != undefined && + n.v.ps.value === '瑕佹眰鍊�' && + state == 1 + "> + <span :style="`font-family:${n.v.ff} !important;`">{{ + getTell(n.i) + }}</span> + </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 === '鏍峰搧缂栧彿' - "> - <div :title="currentSample.sampleCode" style=" + }}</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 === '鏍峰搧缂栧彿' + "> + <div :title="currentSample.sampleCode" style=" display: flex; flex-wrap: nowrap; align-items: center; width: 100%; "> - <i v-if="!currentFiberOpticTape && !currentFiberOptic" class="el-icon-caret-left table_caret" - style="width: 16px" @click="caretSample(-1)"></i> - <div - :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`"> - {{ currentSample.sampleCode }} + <i class="el-icon-caret-left table_caret" style="width: 16px" @click="caretSample(-1)"></i> + <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" @click="caretSample(1)"></i> </div> - <i v-if="!currentFiberOpticTape && !currentFiberOptic" class="el-icon-caret-right table_caret" - style="width: 16px" @click="caretSample(1)"></i> - </div> - </template> - <template v-else-if=" - n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿' - "> - <div v-if=" - currentSample.model !== undefined && - currentSample.model !== null - " :style="`font-family:${n.v.ff} !important;`"> - {{ currentSample.model }} - </div> - </template> - <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span> - </div> - </td> - </tr> - </tbody> - </table> + </template> + <template v-else-if=" + n.v.ps != undefined && n.v.ps.value === '鏍峰搧鍨嬪彿' + "> + <div v-if=" + currentSample.model !== undefined && + currentSample.model !== null + " :style="`font-family:${n.v.ff} !important;`"> + {{ currentSample.model }} + </div> + </template> + <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span> + </div> + </td> + </tr> + </tbody> + </table> + </template> </div> <el-upload v-if="state == 1" ref="upload" :action="action" :before-upload="beforeUpload" :data="{ orderId: id, }" :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" - accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar" style="width: 80px !important"> + accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar" + style="width: 80px !important;margin-top: 10px;"> <el-button v-if="state == 1" size="small" type="primary">闄勪欢涓婁紶</el-button></el-upload> <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" - :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table> - <!-- <ValueTable :key="upIndex" ref="fileList" :componentData="componentData0" :delUrl="$api.insOrderPlan.delfile" - :url="$api.insOrderPlan.getFileList" class="value-table" style="height: 100%; margin-top: 16px" /> --> + :height="'calc(100vh - 290px)'" @pagination="pagination" style="height: 100%; margin-top: 16px"></lims-table> </div> <el-drawer :size="550" :visible.sync="sampleVisible" title="鏍峰搧鍒囨崲"> <el-table v-if="sampleVisible" ref="productTable" :current-row-key="currentKey" :data="sampleProduct" @@ -390,8 +376,8 @@ </el-table> </el-drawer> <el-drawer :size="500" :visible.sync="taskVisible" title="浠诲姟鍒囨崲"> - <!-- <ValueTable :key="upIndex" ref="insOrderPlan" :componentData="componentData" - :url="$api.insOrderPlan.inspectionOrderDetailsTaskSwitching" class="value-table" style="height: 100%" /> --> + <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0" + :height="'calc(100vh - 90px)'" :currentChange="handleChangeTask"></lims-table> </el-drawer> <el-dialog :visible.sync="reviewDia" title="妫�楠屽鏍�" width="500px"> <div v-if="reviewDia" class="body" style="display: flex; padding: 10px"> @@ -519,8 +505,8 @@ <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">纭� 瀹�</el-button> </span> </el-dialog> - <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog" - @resetAddUnPass="resetAddUnPass"></add-un-pass> + <!-- <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog" + @resetAddUnPass="resetAddUnPass"></add-un-pass> --> <!-- <UnPassDialog v-if="unPassDialog" ref="unPassDialog" @@ -565,8 +551,6 @@ dataCollection, write, getInsProduct, - getReportModel, - determineWhetherToCollectData, search, verifyPlan, checkSubmitPlan, @@ -575,8 +559,11 @@ selectUserCondition, downFile, getFileList, - delfile + delfile, + inspectionOrderDetailsTaskSwitching } from "@/api/business/inspectionTask.js"; +import InspectionWorker from '../../../InspectionWorker.worker'; +import DataWorker from '../../../DataWorker.worker'; import html2canvas from "html2canvas"; import { mapGetters } from "vuex"; export default { @@ -606,7 +593,6 @@ load: null, }, dataGetDia: false, - wareTableDataLoading: false, fileAdd: false, sampleVisible: false, taskVisible: false, @@ -616,34 +602,7 @@ state: null, }, id: null, - componentData: { - entity: { - sonLaboratory: null, - userId: 0, - }, - isIndex: false, - showSelect: false, - select: false, - selectMethod: "handleChangeTask", - sort: false, - do: [], - isPage: false, - linkEvent: {}, - tagField: { - type: { - select: [], - }, - insState: { - select: [], - }, - }, - currentId: "", - selectField: {}, - requiredAdd: [], - requiredUp: [], - }, changeType: null, - getReportModelLoading: false, insOrder: {}, sampleProduct: [], supplierDensity: "", // 鍘傚瀵嗗害 @@ -672,30 +631,14 @@ verifyUser: null, personList: [], enumList: [], - fiberOpticVisible: false, - fiberOpticTapeVisible: false, - bushingVisible: false, - fiberOpticTape: [], //鍏夌氦甯﹀垪琛� - fiberOptic: [], //鍏夌氦鍒楄〃 - bushing: [], //濂楃鍒楄〃 - currentFiberOpticTape: null, //褰撳墠鍏夌氦甯� - currentFiberOptic: null, //褰撳墠鍏夌氦 - currentBushing: null, //褰撳墠濂楃 tableLoading: false, upLoading: false, temptList: null, - fiber: [], - fibers: [], - casing: [], currentTab: null, wareForm: { inspectionItem: 1, inspectionItemSubclass: "20(甯告俯)", }, - wareForm0: {}, - numOptions: [], - temperatureOptions: [], - wareTableData: [], otherForm: { humidity: null, temperature: null, @@ -713,18 +656,8 @@ dataAcquisitionInfo: {}, dataAcquisitionInfoNew: {}, dataAcquisitionEidtAble: false, - isGet: false, dataAcquisitionLoading: false, collected: false, - // 鐑惊鐜�---寮�濮� - thermalCyclingInfo: { - max: 0, - inspectionItem: 1, - arr: [], - length: 1, - inspectionItemClass: null, - }, - thermalCyclingLoading: false, temDataAcquisition: false, getData: [ { @@ -781,7 +714,7 @@ } else { return '鏂囦欢' } - }, + } }, { label: "闄勪欢鍚嶇О", prop: "fileName" }, { label: "涓婁紶浜�", prop: "name" }, @@ -818,6 +751,39 @@ }, tableLoading: false, // 鏂囦欢鍒楄〃鐩稿叧--缁撴潫 + // 浠诲姟鍒囨崲鍒楄〃--寮�濮� + tableData0: [], + column0: [ + { label: "濮旀墭缂栧彿", prop: "entrustCode", width: '160px' }, + { label: "妫�楠屽璞�", prop: "sampleType", width: '140px' }, + { + label: "绱ф�ョ▼搴�", prop: "type", dataType: "tag", + formatData: (params) => { + return this.urgentList.find(m => m.value == params).label + }, + formatType: (params) => { + return this.urgentList.find(m => m.value == params).type + } + }, + { + label: "鐘舵��", prop: "insState", dataType: "tag", + formatData: (params) => { + return this.typeList.find(m => m.value == params).label + }, + formatType: (params) => { + return this.typeList.find(m => m.value == params).type + } + }, + { label: "绾﹀畾鏃堕棿", prop: "appointed", width: '140px' }, + { label: "涓嬪彂鏃堕棿", prop: "sendTime", width: '140px' }, + ], + page0: { + total: 0, + size: -1, + current: -1, + }, + tableLoading0: false, + // 浠诲姟鍒囨崲鍒楄〃--缁撴潫 }; }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� @@ -833,8 +799,6 @@ }, }, created() { - this.componentData.entity.sonLaboratory = this.sonLaboratory; - this.getUserInfo(); let { sonLaboratory, orderId, state, inspectorList, typeSource } = this.$route.query; this.sonLaboratory = sonLaboratory; @@ -849,9 +813,10 @@ this.getInsStateDicts(); this.getComparisonList(); this.getAuthorizedPerson(); - this.scrollInit(); // this.getPower(); this.startWorker(); + this.getList0() + this.scrollInit(); }, watch: { // 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭� @@ -897,40 +862,23 @@ this.param = {}; this.changeType = 0; this.currentSample.insProduct.forEach((a) => { - // 鏄惁涓烘垚鍝佺數缂嗕笅鐨勬澗濂楃椤圭洰锛屼笉鏄垯鎵ц鍒濆鍖� - if (this.handleCasing(a.inspectionItem)) { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null, - }; - } + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null, + }; }); - this.determineWhetherToCollectData(); //鏄惁闇�瑕佹暟閲� - this.getReportModel(this.currentSample.id); //鑾峰彇濂楃銆佸厜绾ゅ甫銆佸厜绾や俊鎭� if (this.currentSample.index == undefined) this.currentSample["index"] = 1; let bushing = this.currentSample.bushing; this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅 - this.componentData.currentId = val; this.currentKey = 1; this.getCableTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎澶氭妫�楠岀殑鐢电紗閰嶇疆 this.getRepetitionTag(this.currentSample.id); // 鏌ヨ鏄惁鏈夎閲嶅妫�楠岄」 - // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁---涓嬮潰淇℃伅鏆傛椂鍙拷鐣� - this.fiberOpticTape = []; - this.currentFiberOpticTape = null; - this.fiberOptic = []; - this.currentFiberOptic = null; - this.bushing = []; - this.currentBushing = null; - this.currentTab = null; - if (bushing && bushing.length > 0) { - this.bushing = bushing; - } }); }, // 鐩戝惉褰撳墠妯℃澘鍙樺寲 @@ -946,18 +894,15 @@ this.currentSample.insProduct = this.HaveJson(list); //璧嬪�煎綋鍓嶆牱鍝佺殑妫�楠岄」 this.param = {}; //鍒濆鍖栦紶鍒板悗绔殑鍙傛暟 this.currentSample.insProduct.forEach((a, j) => { - if (this.handleCasing(a.inspectionItem)) { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null, - }; - } + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null, + }; }); - this.getReportModel(this.currentSample.id); //鑾峰彇濂楃銆佸厜绾ゅ甫銆佸厜绾や俊鎭� // 鍘婚噸妯℃澘锛岃繑鍥炴湁鍑犱釜妯℃澘 const mySet1 = new Set(); this.tableLists = this.currentSample.insProduct.filter((m) => { @@ -1041,14 +986,32 @@ }, // 鏂囦欢绠$悊--缁撴潫 + // 浠诲姟鍒囨崲--寮�濮� + getList0() { + this.tableLoading0 = true; + let param = { userId: this.userId, sonLaboratory: this.sonLaboratory, ...this.page0 }; + delete param.total; + inspectionOrderDetailsTaskSwitching({ ...param }) + .then((res) => { + this.tableLoading0 = false; + if (res.code === 200) { + this.tableData0 = res.data.records; + } + }) + .catch((err) => { + this.tableLoading0 = false; + }); + }, + // 浠诲姟鍒囨崲--缁撴潫 + closeAddVerifyDia() { this.addCheck = false; this.checkUser = ""; }, // 鍒锋柊椤甸潰 - refreshView() { - this.$emit("refreshView"); - }, + // refreshView() { + // this.$emit("refreshView"); + // }, closeUnPassCheckDialog() { this.unPassCheck = false; }, @@ -1336,11 +1299,11 @@ n.v.ps.value.includes("妫�楠屽��") ) { num++; + if (str0 == str) { + maxNum = num; + } } }); - if (str0 == str) { - maxNum = num; - } } // 缁戝畾璁惧 if ( @@ -1510,12 +1473,12 @@ this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝� } // 鍒涘缓 Worker 瀹炰緥 - this.worker = new Worker("/static/js/worker.js"); + this.worker = new InspectionWorker(); if (this.worker0) { this.stopWorker(); // 纭繚涔嬪墠鐨� Worker 宸插仠姝� } // 鍒涘缓 Worker 瀹炰緥 - this.worker0 = new Worker("/static/js/worker0.js"); + this.worker0 = new DataWorker(); }, // 鍋滄澶氱嚎绋� stopWorker() { @@ -1528,7 +1491,6 @@ this.worker0 = null; } }, - // 鐑惊鐜�---缁撴潫 // 淇濆瓨婀垮害銆佹俯搴︽暟鎹� subOtherForm(m, type) { console.log("m---", m); @@ -1617,13 +1579,6 @@ async handleChangeSample(row, column, event) { // 鍒濆鍖栨暟鎹� this.param = {}; - // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁 - this.fiberOpticTape = []; - this.currentFiberOpticTape = null; - this.fiberOptic = []; - this.currentFiberOptic = null; - this.bushing = []; - this.currentBushing = null; this.sampleVisible = false; // 璧嬪�兼牱鍝� this.currentSample = this.HaveJson(row); @@ -1634,23 +1589,15 @@ this.param = {}; this.changeType = 0; this.currentSample.insProduct.forEach((a, j) => { - if (this.handleCasing(a.inspectionItem)) { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null, - }; - } + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null, + }; }); - // 鑾峰彇濂楃,鍏夌氦甯�,鍏夌氦鏁版嵁 - this.getReportModel(row.id); - let bushing = this.currentSample.bushing; - if (bushing && bushing.length > 0) { - this.bushing = bushing; - } // 澶勭悊椤甸潰鍒楄〃鏁版嵁 this.getTableLists(); this.currentKey = row.index; @@ -1665,33 +1612,6 @@ currentTable: this.currentTable, }) ); - }, - // 鏉惧绠$殑鍒ゆ柇\濡傛灉changeType涓嶇瓑浜�3閭d箞椤甸潰涓嶅睍绀烘澗濂楃妫�楠岄」 - handleCasing(inspectionItem) { - if (this.changeType != 3) { - if (inspectionItem.includes("鏉惧绠�")) { - return false; - } else { - return true; - } - } else { - return true; - } - }, - // 鑾峰彇濂楃,鍏夌氦甯�,鍏夌氦鏁版嵁 - getReportModel(id) { - if (this.PROJECT != "妫�娴嬩腑蹇�") { - return; - } - this.getReportModelLoading = true; - getReportModel({ - sampleId: id - }).then((res) => { - this.getReportModelLoading = false; - this.fibers = res.data["鍏夌氦甯�"]; - this.fiber = res.data["鍏夌氦"]; - this.casing = res.data["濂楃"]; - }); }, async handleChangeCableTag(m, type, num, m2) { let cableTag = ""; @@ -1724,7 +1644,6 @@ }; }); this.getTableLists0(list); - this.getReportModel(this.currentSample.id); this.worker.postMessage( JSON.stringify({ type: "saveData", @@ -1743,21 +1662,19 @@ }, // 鏀瑰彉浠诲姟 handleChangeTask(row) { - if (row.length > 0) this.id = row[0].id; + if (row) this.id = row.id; this.taskVisible = false; }, // 瀛楀吀鑾峰彇淇℃伅 getTypeDicts() { this.getDicts("urgency_level").then((response) => { this.urgentList = this.dictToValue(response.data); - this.componentData.tagField.type.select = this.urgentList; }); }, // 瀛楀吀鑾峰彇淇℃伅 getInsStateDicts() { this.getDicts("inspection_task_state").then((response) => { this.typeList = this.dictToValue(response.data); - this.componentData.tagField.insState.select = this.typeList; }); }, // 瀛楀吀鑾峰彇淇℃伅 @@ -2196,7 +2113,8 @@ } }); // 浠ヤ笅鏄牱寮忓鐞嗛�昏緫 - set = Array.sort(set); + set = [...set] + // set = set.sort(); set.forEach((b) => { let arr = []; a.template.forEach((c) => { @@ -2406,11 +2324,6 @@ this.saveInsContext(currentInsItemId); } }, 200); - }, - // 鏄惁闇�瑕佹暟閲� - async determineWhetherToCollectData() { - let res = await determineWhetherToCollectData({ managementNumber: '' }) - this.isGet = res.data; }, // 鏍规嵁鍚庣浼犲弬鏇存柊椤甸潰鏁版嵁 param => this.tableList[0].insProductResult getCurrentInsProduct(pId) { @@ -2635,9 +2548,6 @@ // } // } // }, - getUserInfo() { - this.componentData.entity.userId = this.userId; - }, openAddCheck() { this.addCheck = true; }, @@ -2806,6 +2716,8 @@ param: JSON.stringify(param), currentTable: this.currentTable, sampleId: this.currentSample.id, + orderId: this.orderId, + sonLaboratory: this.sonLaboratory }).then((res) => { if (res.code == 201) { this.$message.error("淇濆瓨澶辫触"); @@ -2936,16 +2848,14 @@ this.param = {}; this.changeType = 0; this.currentSample.insProduct.forEach((a, j) => { - if (this.handleCasing(a.inspectionItem)) { - this.param[a.id] = { - insValue: [], - comValue: [], - resValue: null, - equipValue: [], - equipName: [], - insResult: null, - }; - } + this.param[a.id] = { + insValue: [], + comValue: [], + resValue: null, + equipValue: [], + equipName: [], + insResult: null, + }; }); // 椤甸潰鏁版嵁澶勭悊 this.getTableLists(); @@ -3020,6 +2930,10 @@ }; </script> <style scoped> +>>>.el-divider { + margin: 0 !important; +} + .custom-table .el-table__header-wrapper th { background-color: #87ceeb; /* 鍙甯︽湁my-custom-table绫荤殑琛ㄦ牸鐢熸晥 */ @@ -3048,11 +2962,11 @@ .title { height: 60px; line-height: 60px; + padding: 0 16px; } .search { width: 100%; - margin-bottom: 10px; background-color: #fff; border-radius: 3px; } @@ -3064,7 +2978,7 @@ } .center { - width: calc(100% - 40px); + width: 100%; /* max-height: 580px; */ background-color: #fff; border-radius: 3px; @@ -3091,6 +3005,7 @@ .tables { table-layout: fixed; margin: 5px 5px 16px; + border-collapse: collapse; } .tables td { -- Gitblit v1.9.3