| | |
| | | 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 |
| | |
| | | tableLists.find((m) => m.templateId == currentTable) |
| | | .templateName == '温度循环检验原始记录' && |
| | | temDataAcquisition)) && |
| | | PROJECT == '检测中心' && |
| | | state == 1 |
| | | " |
| | | @click="getDataAcquisitionDevice" |
| | |
| | | (tableLists.find((m) => m.templateId == currentTable) && |
| | | tableLists.find((m) => m.templateId == currentTable) |
| | | .templateName == '温度循环检验原始记录' && |
| | | PROJECT == '检测中心' && |
| | | collected && |
| | | state == 1) |
| | | " |
| | |
| | | :disabled=" |
| | | (getInspectionItemType(n.i) == 1 && |
| | | !dataAcquisitionEidtAble) || |
| | | (n.u != userId && n.u != undefined && n.u != '') |
| | | (n.u != loginUserInfo.userId && |
| | | n.u != undefined && |
| | | n.u != '') |
| | | " |
| | | @input="handleInput(n)" |
| | | @change=" |
| | |
| | | v-model="n.v.v" |
| | | :disabled=" |
| | | getInspectionItemType(n.i) == 1 || |
| | | (n.u != userId && n.u != undefined && n.u != '') |
| | | (n.u != loginUserInfo.userId && |
| | | n.u != undefined && |
| | | n.u != '') |
| | | " |
| | | @change=" |
| | | (m) => |
| | |
| | | :disabled=" |
| | | state > 1 || |
| | | getInspectionItemType(n.i) == 1 || |
| | | (n.u != userId && n.u != undefined && n.u != '') |
| | | (n.u != loginUserInfo.userId && |
| | | n.u != undefined && |
| | | n.u != '') |
| | | " |
| | | @visible-change="(e) => getDic(e, n.i)" |
| | | @change=" |
| | |
| | | <el-option |
| | | v-for="(e, i) in enumList" |
| | | :key="i" |
| | | :label="e.label" |
| | | :value="e.value" |
| | | :label="e.dictLabel" |
| | | :value="e.dictValue" |
| | | ></el-option> |
| | | </el-select> |
| | | <span |
| | |
| | | <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(n.i)" |
| | | > |
| | | <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) |
| | | " |
| | | > |
| | | <template> |
| | | <span |
| | | v-if="n.v.v === 1" |
| | | :style="`font-family:${n.v.ff} !important;color: green;`" |
| | |
| | | <el-select |
| | | v-model="n.v.v" |
| | | placeholder="设备" |
| | | :disabled="n.u != userId && n.u != undefined && n.u != ''" |
| | | :disabled=" |
| | | n.u != loginUserInfo.userId && |
| | | n.u != undefined && |
| | | n.u != '' |
| | | " |
| | | class="table_input" |
| | | @visible-change="(e) => getEquipOptions(e, n.i)" |
| | | remote |
| | |
| | | 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> |
| | | <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v" |
| | | :disabled="state>1" @visible-change="e=>getDic(e,n.i)" @change="saveInsContext()"> |
| | | <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;`">{{ |
| | | toFixed(n.v.v, n.v.ct) |
| | | }}</span> |
| | |
| | | >附件上传</el-button |
| | | > |
| | | </el-upload> |
| | | <ValueTable |
| | | <!-- <ValueTable |
| | | class="value-table" |
| | | ref="fileList" |
| | | :url="$api.insOrderPlan.getFileList" |
| | |
| | | :delUrl="$api.insOrderPlan.delfile" |
| | | :key="upIndex" |
| | | style="height: 100%; margin-top: 16px" |
| | | /> |
| | | /> --> |
| | | </div> |
| | | <el-drawer title="光纤切换" :visible.sync="fiberOpticVisible" :size="500"> |
| | | <el-table |
| | |
| | | <el-tag |
| | | v-for="(item, i) in typeList" |
| | | :key="i" |
| | | v-if="item.value == scope.row.insState" |
| | | :type="item.type" |
| | | v-if="item.dictValue == scope.row.insState" |
| | | :type="item.listClass" |
| | | size="medium" |
| | | style="margin-right: 5px" |
| | | >{{ item.label }}</el-tag |
| | | >{{ item.dictLabel }}</el-tag |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="任务切换" :visible.sync="taskVisible" :size="500"> |
| | | <ValueTable |
| | | <!-- <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"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | doInsOrder, |
| | | upPlanUser2, |
| | | upPlanUser, |
| | | saveInsContext2, |
| | | getSagTemperatureProducts, |
| | | temCycle, |
| | | write, |
| | | getInsProduct, |
| | | getReportModel, |
| | | verifyPlan, |
| | | checkSubmitPlan, |
| | | getEquipName, |
| | | submitPlan, |
| | | saveInsContext, |
| | | downFile, |
| | | } from "@/api/business/inspectionTask"; |
| | | import { |
| | | temDataAcquisition, |
| | | temDataAcquisition2, |
| | | determineWhetherToCollectData, |
| | | selectDeviceByCategory, |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import { getLaboratoryPersonList } from "@/api/system/user"; |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import { selectDictDataByName } from "@/api/system/dict/type"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import file from "@/utils/file"; |
| | | import excelFunction from "@/utils/excelFountion"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import Big from "big.js"; |
| | | import InspectionWorker from "../../../workers/InspectionWorker.worker"; |
| | | import InspectionWorkerAsData from "../../../workers/InspectionWorkerAsData.worker"; |
| | | export default { |
| | | props: ["sonLaboratory", "orderId", "state", "inspectorList", "handover"], |
| | | name: "Inspection", |
| | | components: { |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | sonLaboratory: null, |
| | | orderId: null, |
| | | state: null, |
| | | inspectorList: [], |
| | | handover: [], |
| | | equipName: [], |
| | | insFibersId: null, //光纤带id |
| | | insOrderState: null, |
| | |
| | | componentData: { |
| | | entity: { |
| | | sonLaboratory: null, |
| | | userId: 0, |
| | | }, |
| | | isIndex: false, |
| | | showSelect: false, |
| | |
| | | comparisonList: [], |
| | | excelMethodList: [], |
| | | equipOptions: [], |
| | | userId: 0, |
| | | reviewLoading: false, |
| | | reviewDia: false, |
| | | noReason: "", |
| | |
| | | }, |
| | | // 用于上传文件的信息 |
| | | computed: { |
| | | ...mapGetters(["loginUserInfo"]), |
| | | headers() { |
| | | return { |
| | | token: sessionStorage.getItem("token"), |
| | | }; |
| | | return { Authorization: "Bearer " + getToken() }; |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.insOrderPlan.uploadFile; |
| | | return this.javaApi + "/insOrderPlan/uploadFile"; |
| | | }, |
| | | }, |
| | | created() { |
| | | console.log("检验人员---", this.inspectorList); |
| | | this.componentData.entity.sonLaboratory = this.sonLaboratory; |
| | | this.id = this.orderId; |
| | | this.getUserInfo(); |
| | | console.log(this.$route.params); |
| | | this.sonLaboratory = this.$route.params.sonLaboratory; |
| | | this.orderId = this.$route.params.orderId; |
| | | this.state = this.$route.params.state; |
| | | this.inspectorList = this.$route.params.inspectorList; |
| | | this.handover = this.$route.params.handover; |
| | | // this.componentData.entity.sonLaboratory = this.sonLaboratory; |
| | | this.id = this.$route.params.orderId; |
| | | }, |
| | | mounted() { |
| | | this.getSonLaboratoryList(); |
| | |
| | | this.getComparisonList(); |
| | | this.getAuthorizedPerson(); |
| | | this.scrollInit(); |
| | | this.getPower(); |
| | | this.startWorker(); |
| | | }, |
| | | watch: { |
| | | // 监听任务id,获取任务信息 |
| | | id(val) { |
| | | this.loading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.doInsOrder, { |
| | | id: val, |
| | | laboratory: this.sonLaboratory, |
| | | }) |
| | | doInsOrder({ |
| | | id: val, |
| | | laboratory: this.sonLaboratory, |
| | | }) |
| | | .then(async (res) => { |
| | | this.insOrder = res.data.insOrder; |
| | | this.insOrderState = res.data.insState; |
| | | this.componentData0.entity.insOrderId = val; |
| | | this.$refs.fileList.selectList(); |
| | | this.urgentList.forEach((m) => { |
| | | if (m.value == this.insOrder.type) { |
| | | this.insOrder.typeName = m.label; |
| | | if (res.code === 200) { |
| | | this.insOrder = res.data.insOrder; |
| | | this.insOrderState = res.data.insState; |
| | | this.componentData0.entity.insOrderId = val; |
| | | // this.$refs.fileList.selectList(); |
| | | this.urgentList.forEach((m) => { |
| | | if (m.dictValue == this.insOrder.type) { |
| | | this.insOrder.typeName = m.dictLabel; |
| | | } |
| | | }); |
| | | this.loading = false; |
| | | if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) { |
| | | return this.$message.error("该任务没有样品信息"); |
| | | } |
| | | }); |
| | | this.loading = false; |
| | | if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) { |
| | | return this.$message.error("该任务没有样品信息"); |
| | | } |
| | | // 赋值当前样品列表 |
| | | this.sampleProduct = res.data.sampleProduct; |
| | | this.fileterSampleProducts = JSON.parse( |
| | | JSON.stringify(res.data.sampleProduct) |
| | | ); |
| | | this.currentSample = this.HaveJson(this.sampleProduct[0]); |
| | | let insProduct = this.HaveJson(this.currentSample.insProduct); |
| | | // 温度、湿度赋值 |
| | | if (insProduct && insProduct.length > 0) { |
| | | const filterList = insProduct.filter( |
| | | (ele) => ele.temperature || ele.humidity |
| | | // 赋值当前样品列表 |
| | | this.sampleProduct = res.data.sampleProduct; |
| | | this.fileterSampleProducts = JSON.parse( |
| | | JSON.stringify(res.data.sampleProduct) |
| | | ); |
| | | if (filterList && filterList.length > 0) { |
| | | let { temperature, humidity } = filterList[0]; |
| | | this.otherForm = { |
| | | temperature: temperature ? temperature : null, |
| | | humidity: humidity ? humidity : null, |
| | | }; |
| | | this.currentSample = this.HaveJson(this.sampleProduct[0]); |
| | | let insProduct = this.HaveJson(this.currentSample.insProduct); |
| | | // 温度、湿度赋值 |
| | | if (insProduct && insProduct.length > 0) { |
| | | const filterList = insProduct.filter( |
| | | (ele) => ele.temperature || ele.humidity |
| | | ); |
| | | if (filterList && filterList.length > 0) { |
| | | let { temperature, humidity } = filterList[0]; |
| | | this.otherForm = { |
| | | temperature: temperature ? temperature : null, |
| | | humidity: humidity ? humidity : null, |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | // 获取当前样品的检验项 |
| | | let list = await this.getCurrentProduct(this.currentSample.id, 0); |
| | | console.log(888, list); |
| | | if (list) { |
| | | this.currentSample.insProduct = this.HaveJson(list); |
| | | } |
| | | // 初始化传递到后端的参数 |
| | | this.param = {}; |
| | | this.changeType = 0; |
| | | this.currentSample.insProduct.forEach((a, j) => { |
| | | 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(); //处理模板列表信息 |
| | | // 获取当前样品的检验项 |
| | | let list = await this.getCurrentProduct(this.currentSample.id, 0); |
| | | console.log(888, list); |
| | | if (list) { |
| | | this.currentSample.insProduct = this.HaveJson(list); |
| | | } |
| | | // 初始化传递到后端的参数 |
| | | this.param = {}; |
| | | this.changeType = 0; |
| | | this.currentSample.insProduct.forEach((a, j) => { |
| | | 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.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; |
| | | this.componentData.currentId = val; |
| | | this.currentKey = 1; |
| | | // 清空光纤配置相关数据---下面信息暂时可忽略 |
| | | 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; |
| | | } |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.worker.postMessage( |
| | | JSON.stringify({ |
| | | modelType: this.sampleProduct[0].model, |
| | | type: "saveData", |
| | | tableList: this.tableList, |
| | | param: this.param, |
| | | currentTable: this.currentTable, |
| | | }) |
| | | ); |
| | | } |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.worker.postMessage( |
| | | JSON.stringify({ |
| | | modelType: this.sampleProduct[0].model, |
| | | type: "saveData", |
| | | tableList: this.tableList, |
| | | param: this.param, |
| | | currentTable: this.currentTable, |
| | | }) |
| | | ); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 监听当前模板变化 |
| | | currentTable(val1, val0) { |
| | | if (val0 != null && val1 != val0) { |
| | | // if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='成品缆检验原始记录')){ |
| | | // if(this.casing.length>0){ |
| | | // this.handleChange(this.casing[0].id,3) |
| | | // } |
| | | // return |
| | | // } |
| | | //76:疲劳试验检验原始记录不执行下面的操作 |
| | | if (this.changeType && this.changeType > 0) { |
| | | // 如果是光纤、光纤带,则不执行下面操作 |
| | | return; |
| | |
| | | }); |
| | | }, |
| | | getSonLaboratoryList() { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.upPlanUser2, { |
| | | orderId: this.orderId, |
| | | }) |
| | | upPlanUser2({ |
| | | orderId: this.orderId, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200 && res.data.length > 0) { |
| | | this.sonLaboratoryList = []; |
| | |
| | | }); |
| | | this.connect.sonLaboratory = this.sonLaboratoryList[0].value; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 内部交接 |
| | |
| | | return; |
| | | } |
| | | this.loading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.upPlanUser, { |
| | | orderId: this.orderId, |
| | | userId: this.connect.connectPerson, |
| | | sonLaboratory: this.connect.sonLaboratory, |
| | | }) |
| | | upPlanUser({ |
| | | orderId: this.orderId, |
| | | userId: this.connect.connectPerson, |
| | | sonLaboratory: this.connect.sonLaboratory, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.loading = false; |
| | | this.$message.success("操作成功"); |
| | | if (res.code === 200) { |
| | | this.loading = false; |
| | | this.$message.success("操作成功"); |
| | | } |
| | | this.connectVisible = false; |
| | | this.$emit("goback"); |
| | | } |
| | | this.connectVisible = false; |
| | | this.$emit("goback"); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | |
| | | delete obj.model; |
| | | delete obj.methodS; |
| | | delete obj.sampleType; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrderPlan.saveInsContext2, |
| | | { |
| | | id: this.fatigueTestInfo.insProductResult |
| | | ? this.fatigueTestInfo.insProductResult.id |
| | | : "", |
| | | insProductId: this.fatigueTestInfo.id, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.currentSample.insOrderId, |
| | | insValue: JSON.stringify(obj), |
| | | templateName: "疲劳试验", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | saveInsContext2({ |
| | | id: this.fatigueTestInfo.insProductResult |
| | | ? this.fatigueTestInfo.insProductResult.id |
| | | : "", |
| | | insProductId: this.fatigueTestInfo.id, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.currentSample.insOrderId, |
| | | insValue: JSON.stringify(obj), |
| | | templateName: "疲劳试验", |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) { |
| | | this.$message.error("保存失败"); |
| | |
| | | } |
| | | this.$message.success("保存成功"); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 疲劳试验特性---结束 |
| | |
| | | let obj1 = {}; |
| | | obj1.arr2 = this.powerCharacteristicsInfo.arr2; |
| | | obj1.arr3 = this.powerCharacteristicsInfo.arr3; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrderPlan.saveInsContext2, |
| | | { |
| | | id: this.powerCharacteristicsInfo.insProductResult |
| | | ? this.powerCharacteristicsInfo.insProductResult.id |
| | | : "", |
| | | insProductId: this.powerCharacteristicsInfo.id, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.currentSample.insOrderId, |
| | | insValue: JSON.stringify(obj0), |
| | | comValue: JSON.stringify(obj1), |
| | | templateName: "防振锤功率特性", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | saveInsContext2({ |
| | | id: this.powerCharacteristicsInfo.insProductResult |
| | | ? this.powerCharacteristicsInfo.insProductResult.id |
| | | : "", |
| | | insProductId: this.powerCharacteristicsInfo.id, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.currentSample.insOrderId, |
| | | insValue: JSON.stringify(obj0), |
| | | comValue: JSON.stringify(obj1), |
| | | templateName: "防振锤功率特性", |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) { |
| | | this.$message.error("保存失败"); |
| | |
| | | } |
| | | this.$message.success("保存成功"); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 防振锤功率特性---结束 |
| | |
| | | } |
| | | } |
| | | obj.elasticityModulus = this.stressStrainInfo.elasticity; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrderPlan.saveInsContext2, |
| | | { |
| | | id: this.stressStrainInfo.insProductResult |
| | | ? this.stressStrainInfo.insProductResult.id |
| | | : "", |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.currentSample.insOrderId, |
| | | insProductId: this.stressStrainInfo.id, |
| | | insValue: JSON.stringify(obj), |
| | | templateName: "架空地线应力应变", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | saveInsContext2({ |
| | | id: this.stressStrainInfo.insProductResult |
| | | ? this.stressStrainInfo.insProductResult.id |
| | | : "", |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.currentSample.insOrderId, |
| | | insProductId: this.stressStrainInfo.id, |
| | | insValue: JSON.stringify(obj), |
| | | templateName: "架空地线应力应变", |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) { |
| | | this.$message.error("保存失败"); |
| | |
| | | } |
| | | this.$message.success("保存成功"); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 删除记录 |
| | |
| | | return; |
| | | } |
| | | this.stressStrainInfo.elasticity = e; |
| | | // else { |
| | | // this.$axios |
| | | // .post( |
| | | // this.$api.insOrderPlan.write2 + |
| | | // "?id=" + |
| | | // this.stressStrainInfo.id + |
| | | // "&elasticityModulus=" + |
| | | // e |
| | | // ) |
| | | // .then((res) => { |
| | | // if (res.code == 201) { |
| | | // this.$message.error("保存失败"); |
| | | // return; |
| | | // } |
| | | // this.$message.success("已保存"); |
| | | // }); |
| | | // } |
| | | } |
| | | }, |
| | | // 架空导地线应力应变---结束 |
| | |
| | | )[0]; |
| | | // 获取设备列表 |
| | | this.getEquipOptions(true, obj.id); |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.getSagTemperatureProducts, { |
| | | sampleId: this.currentSample.id, |
| | | }) |
| | | getSagTemperatureProducts({ |
| | | sampleId: this.currentSample.id, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | let { productVos, sampleVo } = res.data; |
| | |
| | | } |
| | | }); |
| | | }) |
| | | .catch((err) => {}); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 保存数据 |
| | | saveSageInfo(type, value) { |
| | |
| | | temperature = temperature + "℃"; |
| | | } |
| | | this.dataAcquisitionLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.deviceScope.temDataAcquisition, |
| | | { |
| | | entrustCode: this.insOrder.entrustCode, |
| | | sampleCode: this.currentSample.sampleCode, |
| | | model: this.wareForm0.model, |
| | | cycles: this.wareForm.inspectionItem, |
| | | temperature: temperature, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | noQs: true, |
| | | } |
| | | ) |
| | | temDataAcquisition({ |
| | | entrustCode: this.insOrder.entrustCode, |
| | | sampleCode: this.currentSample.sampleCode, |
| | | model: this.wareForm0.model, |
| | | cycles: this.wareForm.inspectionItem, |
| | | temperature: temperature, |
| | | }) |
| | | .then((res) => { |
| | | this.dataAcquisitionLoading = false; |
| | | if (res.code != 200) { |
| | |
| | | } |
| | | // 赋值回显PK8000的数据 |
| | | this.wareFormChange(); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } else { |
| | | const _than = this; |
| | | // 一般的数据采集 |
| | | _than.dataAcquisitionLoading = true; |
| | | let urlStr = |
| | | this.$api.deviceScope.dataCollection + |
| | | "?entrustCode=" + |
| | | this.insOrder.entrustCode + |
| | | "&sampleCode=" + |
| | | this.currentSample.sampleCode + |
| | | "&id=" + |
| | | this.currentSample.id; |
| | | // let urlStr = |
| | | // this.$api.deviceScope.dataCollection + |
| | | // "?entrustCode=" + |
| | | // this.insOrder.entrustCode + |
| | | // "&sampleCode=" + |
| | | // this.currentSample.sampleCode + |
| | | // "&id=" + |
| | | // this.currentSample.id; |
| | | let data = { |
| | | entrustCode: this.insOrder.entrustCode, |
| | | sampleCode: this.currentSample.sampleCode, |
| | | id: this.currentSample.id, |
| | | }; |
| | | console.log(_than.fibers); |
| | | if (_than.fibers && _than.fibers.length > 0) { |
| | | //当前选中的光纤带 |
| | |
| | | if (null == currentFibers || currentFibers.length == 0) { |
| | | currentFibers = _than.fibers[0]; |
| | | } |
| | | urlStr += |
| | | "&fiberOpticRibbon=" + |
| | | currentFibers.bushingColor + |
| | | "-" + |
| | | currentFibers.code; |
| | | // urlStr += |
| | | // "&fiberOpticRibbon=" + |
| | | // currentFibers.bushingColor + |
| | | // "-" + |
| | | // currentFibers.code; |
| | | data.fiberOpticRibbon = |
| | | currentFibers.bushingColor + "-" + currentFibers.code; |
| | | } |
| | | let replaceUrlStr = urlStr |
| | | .split("") |
| | | .map((s) => s.replace("#", "%23")) |
| | | .join(""); |
| | | this.$axios.get(replaceUrlStr).then((res) => { |
| | | this.dataAcquisitionLoading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.dataAcquisitionInfoNew = this.HaveJson(res.data); |
| | | // 对数采回来的值进行处理 |
| | | this.handleDataAcquisition(res.data); |
| | | }); |
| | | // let replaceUrlStr = urlStr |
| | | // .split("") |
| | | // .map((s) => s.replace("#", "%23")) |
| | | // .join(""); |
| | | dataCollection(data) |
| | | .then((res) => { |
| | | this.dataAcquisitionLoading = false; |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | this.dataAcquisitionInfoNew = this.HaveJson(res.data); |
| | | // 对数采回来的值进行处理 |
| | | this.handleDataAcquisition(res.data); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }, |
| | | handleDataAcquisition(data) { |
| | |
| | | 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 InspectionWorkerAsData(); |
| | | }, |
| | | // 停止多线程 |
| | | stopWorker() { |
| | |
| | | // 当循环次数、温度点变化、PK8000数采时会调用,主要是获取信息进行回显 |
| | | wareFormChange(m, type) { |
| | | if ( |
| | | this.PROJECT != "检测中心" || |
| | | !this.tableLists.find((m) => m.templateId == this.currentTable) || |
| | | this.tableLists.find((m) => m.templateId == this.currentTable) |
| | | .templateName != "温度循环检验原始记录" |
| | |
| | | wareForm.inspectionItemSubclass = wareForm.inspectionItemSubclass + "℃"; |
| | | } |
| | | this.wareTableDataLoading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.temCycle, { |
| | | sampleId: this.currentSample.id, |
| | | ...wareForm, |
| | | }) |
| | | temCycle({ |
| | | sampleId: this.currentSample.id, |
| | | ...wareForm, |
| | | }) |
| | | .then((res) => { |
| | | this.wareTableDataLoading = false; |
| | | if (res.code == 201) return; |
| | |
| | | }); |
| | | // 这是页面最终呈现的格式 |
| | | this.wareTableData = arr2; |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | // 获取设备列表 |
| | | this.getEquipOptions(true, this.currentSample.insProduct[0].id); |
| | |
| | | // 循环次数切换时调用 |
| | | thermalCyclingChange() { |
| | | this.thermalCyclingLoading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.temCycle, { |
| | | sampleId: this.currentSample.id, |
| | | inspectionItem: this.thermalCyclingInfo.inspectionItem, |
| | | }) |
| | | temCycle({ |
| | | sampleId: this.currentSample.id, |
| | | inspectionItem: this.thermalCyclingInfo.inspectionItem, |
| | | }) |
| | | .then((res) => { |
| | | this.thermalCyclingLoading = false; |
| | | if (res.code == 201) return; |
| | | let { productVos, sampleVo } = res.data; |
| | | this.thermalCyclingInfo = { ...this.thermalCyclingInfo, ...sampleVo }; |
| | | // if(this.thermalCyclingInfo.inspectionItem>1){ |
| | | // for(let i in this.param){ |
| | | // if(this.param[i].inspectionItemSubclass){ |
| | | // delete this.param[i] |
| | | // } |
| | | // } |
| | | // } |
| | | for (let i in this.param) { |
| | | if (this.param[i].inspectionItemSubclass) { |
| | | delete this.param[i]; |
| | |
| | | } |
| | | // 获取设备列表 |
| | | this.getEquipOptions(true, this.currentSample.insProduct[0].id); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 添加检验值 |
| | |
| | | // 单根垂直燃烧---结束 |
| | | // 保存湿度、温度数据 |
| | | subOtherForm(m, type) { |
| | | // let ids = [] |
| | | // for (let i in this.param) { |
| | | // ids.push(i) |
| | | // } |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrderPlan.write, |
| | | { |
| | | [type]: Number(m), |
| | | insOrderId: this.currentSample.insOrderId, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | noQs: true, |
| | | } |
| | | ) |
| | | write({ |
| | | [type]: Number(m), |
| | | insOrderId: this.currentSample.insOrderId, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("保存成功"); |
| | | if (res.code === 200) { |
| | | this.$message.success("保存成功"); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 权限获取 |
| | |
| | | this.temDataAcquisition = temDataAcquisition; |
| | | }, |
| | | uploadSample() { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.doInsOrder, { |
| | | id: this.id, |
| | | laboratory: this.sonLaboratory, |
| | | doInsOrder({ |
| | | id: this.id, |
| | | laboratory: this.sonLaboratory, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.sampleProduct = res.data.sampleProduct; |
| | | } |
| | | }) |
| | | .then(async (res) => { |
| | | this.sampleProduct = res.data.sampleProduct; |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 根据类型、任务id、实验室来获取样品的检验项信息 |
| | | async getCurrentProduct(id, type) { |
| | | this.tableLoading = true; |
| | | let res = await this.$axios.post( |
| | | this.$api.insOrderPlan.getInsProduct + |
| | | "?id=" + |
| | | id + |
| | | "&type=" + |
| | | type + |
| | | "&laboratory=" + |
| | | this.sonLaboratory |
| | | ); |
| | | let res = await getInsProduct({ |
| | | id: id, |
| | | type: type, |
| | | laboratory: this.sonLaboratory, |
| | | }); |
| | | this.tableLoading = false; |
| | | console.log("getCurrentProduct-->", res.data); |
| | | return res.data; |
| | | }, |
| | | handleChangeBushing(row, column, event) { |
| | |
| | | }, |
| | | // 获取套管,光纤带,光纤数据 |
| | | getReportModel(id) { |
| | | if (this.PROJECT != "检测中心") { |
| | | return; |
| | | } |
| | | this.getReportModelLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.insOrderPlan.getReportModel + |
| | | "?sampleId=" + |
| | | id + |
| | | "&sonLaboratory=" + |
| | | this.sonLaboratory, |
| | | {} |
| | | ) |
| | | getReportModel({ |
| | | sampleId: id, |
| | | sonLaboratory: this.sonLaboratory, |
| | | }) |
| | | .then((res) => { |
| | | this.getReportModelLoading = false; |
| | | this.fibers = res.data["光纤带"]; |
| | | this.fiber = res.data["光纤"]; |
| | | this.casing = res.data["套管"]; |
| | | if (res.code === 200) { |
| | | this.getReportModelLoading = false; |
| | | this.fibers = res.data["光纤带"]; |
| | | this.fiber = res.data["光纤"]; |
| | | this.casing = res.data["套管"]; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 套管,光纤带,光纤等切换,对应原始记录模板也要切换 |
| | |
| | | }, |
| | | // 字典获取信息 |
| | | getTypeDicts() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "紧急程度", |
| | | }) |
| | | getDicts("urgency_level") |
| | | .then((res) => { |
| | | let data = res.data; |
| | | data.forEach((ele) => { |
| | | if (ele.value === "0") { |
| | | ele.type = "success"; |
| | | } else if (ele.value === "1") { |
| | | ele.type = "warning"; |
| | | } else if (ele.value === "2") { |
| | | ele.type = "danger"; |
| | | } |
| | | }); |
| | | this.urgentList = data; |
| | | this.componentData.tagField.type.select = data; |
| | | }); |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "载荷", |
| | | if (res.code === 200) { |
| | | this.urgentList = res.data; |
| | | } |
| | | }) |
| | | .then((res) => { |
| | | this.loadList = res.data; |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | // getDicts("").then(res=>{ |
| | | // if(res.status===200){ |
| | | // console.log(res) |
| | | // } |
| | | // }).catch(error=>{ |
| | | // console.error(error) |
| | | // }) |
| | | // this.$axios |
| | | // .post(this.$api.enums.selectEnumByCategory, { |
| | | // category: "载荷", |
| | | // }) |
| | | // .then((res) => { |
| | | // this.loadList = res.data; |
| | | // }); |
| | | }, |
| | | // 字典获取信息 |
| | | getInsStateDicts() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "检验任务状态", |
| | | }) |
| | | getDicts("inspection_task_state") |
| | | .then((res) => { |
| | | let data = res.data; |
| | | data.forEach((ele) => { |
| | | //0:待检验 1:检验中 2:已检验 3:待复核 4:复核未通过 5:复核通过 |
| | | if (["2", "5"].includes(ele.value)) { |
| | | ele.type = "success"; |
| | | } else if (["1", "3"].includes(ele.value)) { |
| | | ele.type = "warning"; |
| | | } else if (["0", "4"].includes(ele.value)) { |
| | | ele.type = "danger"; |
| | | } |
| | | }); |
| | | this.typeList = data; |
| | | this.componentData.tagField.insState.select = data; |
| | | if (res.code === 200) { |
| | | this.typeList = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 字典获取信息 |
| | | getComparisonList() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "表格坐标转换", |
| | | }) |
| | | getDicts("coordinate_transformation") |
| | | .then((res) => { |
| | | let data = res.data; |
| | | this.comparisonList = data; |
| | | if (res.code === 200) { |
| | | this.comparisonList = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // 获取检验值为下拉时的下拉列表 |
| | |
| | | if (val === undefined || val === null) { |
| | | return; |
| | | } |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: val, |
| | | }) |
| | | selectDictDataByName(val) |
| | | .then((res) => { |
| | | this.enumList = res.data; |
| | | if (res.code === 200) { |
| | | this.enumList = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | |
| | | }); |
| | | // 初始化页面数据 |
| | | this.wareTableDataLoading = true; |
| | | this.$axios |
| | | .post( |
| | | this.$api.deviceScope.temDataAcquisition2, |
| | | { |
| | | entrustCode: this.insOrder.entrustCode, |
| | | sampleCode: this.currentSample.sampleCode, |
| | | model: this.currentSample.model, |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | noQs: true, |
| | | } |
| | | ) |
| | | temDataAcquisition2({ |
| | | entrustCode: this.insOrder.entrustCode, |
| | | sampleCode: this.currentSample.sampleCode, |
| | | model: this.currentSample.model, |
| | | }) |
| | | .then((res) => { |
| | | this.wareFormChange(); |
| | | if (res.code === 200) { |
| | | this.wareFormChange(); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | // 温度循环检验原始记录---结束 |
| | |
| | | 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 |
| | | this.comparisonList.find( |
| | | (j) => j.dictValue == finalList[i].c |
| | | ).dictLabel |
| | | }${finalList[i].r + 1})`; |
| | | } |
| | | }); |
| | |
| | | } |
| | | }); |
| | | // 以下是样式处理逻辑 |
| | | set = Array.sort(set); |
| | | set = Array.from(set).sort((a, b) => a - b); |
| | | set.forEach((b) => { |
| | | let arr = []; |
| | | a.template.forEach((c) => { |
| | |
| | | }, |
| | | // 检验值输入后触发的函数 |
| | | changeInput(m, code, n, getDataType) { |
| | | console.log("---->999"); |
| | | // 为数采定义一个逻辑参数 |
| | | if (getDataType == "getDataType") { |
| | | this.getDataType = 2; |
| | |
| | | if (n) { |
| | | currentInsItemId = JSON.parse(JSON.stringify(n.i)); |
| | | // 需要科学计数法的可以走这里 |
| | | if (this.PROJECT === "检测中心") { |
| | | if ( |
| | | this.currentSample.insProduct.find( |
| | | (ele) => |
| | | ele.id == currentInsItemId && ele.inspectionItem == "体积电阻率" |
| | | ) |
| | | ) { |
| | | if (parseFloat(n.v.v) >= 100000) { |
| | | let num2 = new this.$Big(n.v.v); |
| | | n.v.v = num2.toExponential(); |
| | | } |
| | | if ( |
| | | this.currentSample.insProduct.find( |
| | | (ele) => |
| | | ele.id == currentInsItemId && ele.inspectionItem == "体积电阻率" |
| | | ) |
| | | ) { |
| | | if (parseFloat(n.v.v) >= 100000) { |
| | | let num2 = new Big(n.v.v); |
| | | n.v.v = num2.toExponential(); |
| | | } |
| | | } |
| | | // 定义一个函数来验证分数是否有效 |
| | |
| | | excelMethodList: this.excelMethodList, |
| | | comparisonList: this.comparisonList, |
| | | currentSample: this.currentSample, |
| | | PROJECT: this.PROJECT, |
| | | param: this.param, |
| | | currentTable: this.currentTable, |
| | | getDataTypeId: this.getDataTypeId, |
| | |
| | | switch (this.result.method) { |
| | | case "saveInsContext": |
| | | this.$nextTick(() => { |
| | | // this.$delete(this.tableList[0],'arr') |
| | | this.$set( |
| | | this.tableList[0], |
| | | "arr", |
| | |
| | | } |
| | | } |
| | | this.saveInsContext(currentInsItemId); |
| | | // 如果是数采可编辑输入的情况,可以直接保存数据 |
| | | // if(this.getDataType==2){ |
| | | // console.log("aaaaaa--->>>",currentInsItemId); |
| | | // this.saveInsContext() |
| | | // }else{ |
| | | // if(this.isGet&&!this.dataAcquisitionEidtAble){ |
| | | // // if(this.result.value.getDataTypeId==''){ |
| | | // // // 如果是数采不可编辑输入的情况,且最后一个数采没有完成,则不保存数据 |
| | | // // return |
| | | // // } |
| | | // // 保存数据 |
| | | // this.saveInsContext() |
| | | // // setTimeout(()=>{ |
| | | // // },2000) |
| | | // }else if(this.isGet&&this.dataAcquisitionEidtAble){ |
| | | // if(this.getDataType==1){ |
| | | // // if(this.result.value.getDataTypeId==''){ |
| | | // // // 如果是数采可编辑输入的情况,且最后一个数采没有完成,则不保存数据 |
| | | // // return |
| | | // // } |
| | | // this.saveInsContext() |
| | | // }else{ |
| | | // this.saveInsContext() |
| | | // } |
| | | // }else{ |
| | | // this.saveInsContext() |
| | | // } |
| | | // } |
| | | }); |
| | | break; |
| | | case "tableList": |
| | |
| | | }, |
| | | // 是否需要数采 |
| | | async determineWhetherToCollectData() { |
| | | let res = await this.$axios.get( |
| | | this.$api.deviceScope.determineWhetherToCollectData + |
| | | "?managementNumber=''" |
| | | ); |
| | | let res = await determineWhetherToCollectData({ |
| | | managementNumber: "", |
| | | }); |
| | | this.isGet = res.data; |
| | | if ( |
| | | this.currentSample.insProduct.filter( |
| | |
| | | if (e) { |
| | | this.equipOptions = []; |
| | | let product = this.currentSample.insProduct.find((m) => m.id == id); |
| | | console.log(product); |
| | | this.$axios |
| | | .post(this.$api.deviceScope.selectDeviceByCategory, { |
| | | inspectionItem: product.inspectionItem, |
| | | inspectionItemSubclass: product.inspectionItemSubclass, |
| | | sonLaboratory: product.sonLaboratory, |
| | | }) |
| | | selectDeviceByCategory({ |
| | | inspectionItem: product.inspectionItem, |
| | | inspectionItemSubclass: product.inspectionItemSubclass, |
| | | sonLaboratory: product.sonLaboratory, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200 && res.data) { |
| | | this.equipOptions = res.data.map((m) => { |
| | |
| | | } |
| | | } |
| | | }, |
| | | getUserInfo() { |
| | | this.$axios.get(this.$api.user.getUserInfo).then((res) => { |
| | | this.userId = res.data.id; |
| | | this.componentData.entity.userId = res.data.id; |
| | | // console.log(1111,this.userId) |
| | | }); |
| | | }, |
| | | // 复核 |
| | | upInsReview(e) { |
| | | if (e == 1) { |
| | | // 通过 |
| | | this.reviewLoading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId: this.orderId, |
| | | type: 1, |
| | | laboratory: this.sonLaboratory, |
| | | tell: null, |
| | | }) |
| | | verifyPlan({ |
| | | orderId: this.orderId, |
| | | type: 1, |
| | | laboratory: this.sonLaboratory, |
| | | tell: null, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | |
| | | handleReviewDia() { |
| | | if (this.noReason) { |
| | | this.reviewLoading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.verifyPlan, { |
| | | orderId: this.orderId, |
| | | type: 0, |
| | | laboratory: this.sonLaboratory, |
| | | tell: this.noReason, |
| | | }) |
| | | verifyPlan({ |
| | | orderId: this.orderId, |
| | | type: 0, |
| | | laboratory: this.sonLaboratory, |
| | | tell: this.noReason, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | |
| | | } |
| | | this.addVerifyDia = false; |
| | | this.submitLoading = true; |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.checkSubmitPlan, { |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | humidity: this.otherForm.humidity, |
| | | temperature: this.otherForm.temperature, |
| | | }) |
| | | checkSubmitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | humidity: this.otherForm.humidity, |
| | | temperature: this.otherForm.temperature, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | if (!res.data || res.data.length == 0) { |
| | | this.$axios |
| | | .get( |
| | | this.$api.insOrderPlan.getEquipName + |
| | | "?orderId=" + |
| | | this.orderId + |
| | | "&sonLaboratory=" + |
| | | this.sonLaboratory |
| | | ) |
| | | getEquipName({ |
| | | orderId: this.orderId, |
| | | sonLaboratory: this.sonLaboratory, |
| | | }) |
| | | .then((response) => { |
| | | console.log(typeof response.data, response.data.length); |
| | | if (response.data.length > 0) { |
| | | let newData = []; |
| | | const h = this.$createElement; |
| | |
| | | type: "", |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.submitPlan, { |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | }) |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.$emit("goback"); |
| | | } |
| | | this.submitLoading = false; |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | this.submitLoading = false; |
| | | }); |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.submitPlan, { |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | }) |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.$emit("goback"); |
| | | } |
| | | this.submitLoading = false; |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | |
| | | // this.$axios |
| | | // .post(this.$api.insOrderPlan.submitPlan, { |
| | | // orderId: this.orderId, |
| | | // laboratory: this.sonLaboratory, |
| | | // verifyUser: this.verifyUser, |
| | | // entrustCode: this.insOrder.entrustCode, |
| | | // }) |
| | | // .then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.$message.success("操作成功"); |
| | | // this.$emit("goback"); |
| | | // } |
| | | // this.submitLoading = false; |
| | | // }) |
| | | } else { |
| | | this.$axios |
| | | .get( |
| | | this.$api.insOrderPlan.getEquipName + |
| | | "?orderId=" + |
| | | this.orderId + |
| | | "&sonLaboratory=" + |
| | | this.sonLaboratory |
| | | ) |
| | | getEquipName({ |
| | | orderId: this.orderId, |
| | | sonLaboratory: this.sonLaboratory, |
| | | }) |
| | | .then((response) => { |
| | | console.log(typeof response.data, response.data.length); |
| | | if (response.data.length > 0) { |
| | | let newData = []; |
| | | const h = this.$createElement; |
| | |
| | | type: "", |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.submitPlan, { |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | }) |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | |
| | | type: "", |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.submitPlan, { |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | }) |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | |
| | | .catch(() => {}); |
| | | this.submitLoading = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | |
| | | // let newData = []; |
| | | // const h = this.$createElement; |
| | | // // 去重不合格处理 |
| | | // let set = new Set(); |
| | | // res.data.forEach((item) => { |
| | | // if (!set.has(item)) { |
| | | // set.add(item); |
| | | // } |
| | | // }); |
| | | // res.data = Array.from(set); |
| | | // for (let i in res.data) { |
| | | // const lastChar = res.data[i].slice(-1); |
| | | // if (lastChar == "-") { |
| | | // res.data[i] = res.data[i].slice(0, -1); |
| | | // } |
| | | // newData.push( |
| | | // h( |
| | | // "p", |
| | | // { style: "font-size: 14px;color: red;" }, |
| | | // Number(i) + 1 + "、" + res.data[i] |
| | | // ) |
| | | // ); |
| | | // } |
| | | // newData.push( |
| | | // h( |
| | | // "p", |
| | | // { |
| | | // style: |
| | | // "font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh", |
| | | // }, |
| | | // "以上项目不合格,确定提交?" |
| | | // ) |
| | | // ); |
| | | // this.$confirm("提示", { |
| | | // title: "提示", |
| | | // message: h("div", null, newData), |
| | | // confirmButtonText: "确定", |
| | | // cancelButtonText: "取消", |
| | | // type: "", |
| | | // }) |
| | | // .then(() => { |
| | | // this.$axios |
| | | // .post(this.$api.insOrderPlan.submitPlan, { |
| | | // orderId: this.orderId, |
| | | // laboratory: this.sonLaboratory, |
| | | // verifyUser: this.verifyUser, |
| | | // }) |
| | | // .then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.$message.success("操作成功"); |
| | | // this.$emit("goback"); |
| | | // } |
| | | // }) |
| | | // .catch((error) => { |
| | | // console.error(error); |
| | | // }); |
| | | // }) |
| | | // .catch(() => {}); |
| | | } |
| | | } |
| | | this.submitLoading = false; |
| | |
| | | }, |
| | | // 统一在这里保存数据 |
| | | saveInsContext(currentInsItemId, isDelete = false) { |
| | | // console.log("saveInsContext-->",this.param); |
| | | try { |
| | | if (this.param) { |
| | | let param = null; |
| | |
| | | } else { |
| | | param = this.param; |
| | | } |
| | | console.log("param-->", param); |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.saveInsContext, { |
| | | param: JSON.stringify(param), |
| | | currentTable: this.currentTable, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.orderId, |
| | | sonLaboratory: this.sonLaboratory, |
| | | isDelete: isDelete, |
| | | }) |
| | | saveInsContext({ |
| | | param: param, |
| | | currentTable: this.currentTable, |
| | | sampleId: this.currentSample.id, |
| | | orderId: this.orderId, |
| | | sonLaboratory: this.sonLaboratory, |
| | | isDelete: isDelete, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code == 201) { |
| | | this.$message.error("保存失败"); |
| | | return; |
| | | } |
| | | this.$message.success("已保存"); |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.worker.postMessage( |
| | |
| | | //this.saveInsContext(ids[i]); |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => { |
| | | // let data = [] |
| | | // // let userName = JSON.parse(localStorage.getItem("user")).name; |
| | | // res.data.forEach(a => { |
| | | // if(!this.inspectorList.includes(a.name)) { |
| | | // data.push({ |
| | | // label: a.name, |
| | | // value: a.id |
| | | // }) |
| | | // } |
| | | // }) |
| | | this.personList = res.data; |
| | | }); |
| | | getLaboratoryPersonList() |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | this.personList = res.data; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | scrollInit() { |
| | | // 获取要绑定事件的元素 |
| | |
| | | this.$refs.upload.clearFiles(); |
| | | }, |
| | | handleDown(row) { |
| | | this.$axios |
| | | .post(this.$api.insOrderPlan.downFile, { |
| | | id: row.id, |
| | | }) |
| | | downFile({ |
| | | id: row.id, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | let url = ""; |
| | |
| | | } |
| | | } |
| | | }) |
| | | .catch((error) => {}); |
| | | .catch((error) => { |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | /** |
| | | * 将数值v保留ct.fa中'##'后的指定小数位数,并返回格式化后的字符串。 |