| | |
| | | <template> |
| | | <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);"> |
| | | <el-row class="title"> |
| | | <el-col :span="8" style="text-align: left"> |
| | | <el-col v-if="insOrder.ifsOrderType!=='02wg'" :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"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="16" style="text-align: right"> |
| | | <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right"> |
| | | <el-button v-if="insOrder.ifsOrderType" size="small" type="primary" @click="showMaterialPropsDialog">IFS物料属性更新</el-button> |
| | | <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" |
| | |
| | | @blur="subOtherForm(insOrder.remark, 'remark')"></el-input> |
| | | <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> --> |
| | | </el-form-item> |
| | | <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1"> |
| | | <el-form-item label="外护颜色:"> |
| | | <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="绝缘颜色:"> |
| | | <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="盘号:"> |
| | | <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | </el-form> |
| | | </div> |
| | | <div class="center"> |
| | |
| | | <el-button :loading="submitLoading" type="primary" @click="submit()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" |
| | | :visible.sync="dataGetDia" title="数据采集" width="80%"> |
| | | <div> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td style="width: 120px">检验项分类</td> |
| | | <td style="width: 120px">检验项</td> |
| | | <td style="width: 120px">检验子项</td> |
| | | <td>数采数据</td> |
| | | </tr> |
| | | <template v-for="(item, index) in getData"> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" |
| | | :visible.sync="dataGetDia" title="数据采集" width="80%"> |
| | | <div> |
| | | <table border="1" cellpadding="10" class="thermal-table"> |
| | | <tr> |
| | | <td :rowspan="item.child.length">{{ item.sortName }}</td> |
| | | <td :rowspan="item.child.length">{{ item.faName }}</td> |
| | | <td>{{ item.child[0].name }}</td> |
| | | <td style="text-align: left"> |
| | | <!-- 添加容器 div --> |
| | | <div class="data-collection-items"> |
| | | <td style="width: 120px">检验项分类</td> |
| | | <td style="width: 120px">检验项</td> |
| | | <td style="width: 120px">检验子项</td> |
| | | <td>数采数据</td> |
| | | </tr> |
| | | <template v-for="(item, index) in getData"> |
| | | <tr> |
| | | <td :rowspan="item.child.length">{{ item.sortName }}</td> |
| | | <td :rowspan="item.child.length">{{ item.faName }}</td> |
| | | <td>{{ item.child[0].name }}</td> |
| | | <td style="text-align: left"> |
| | | <!-- 添加容器 div --> |
| | | <div class="data-collection-items"> |
| | | <el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1" |
| | | :multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="请选择" |
| | | @change="setData(item)"> |
| | |
| | | :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification> |
| | | <!--查看工时弹框--> |
| | | <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia> |
| | | <button @click="sss">连接串口</button> |
| | | <!-- IFS物料属性编辑弹框--> |
| | | <el-dialog |
| | | title="更新IFS库存物料批次属性" |
| | | :visible.sync="ifsMaterialPropsVisible" |
| | | width="20%"> |
| | | <el-form style="width:100%" :model="ifsMaterialPropsForm"> |
| | | <el-form-item label="载具编号(Attr1):"> |
| | | <el-input size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="起始米标(Attr2):"> |
| | | <el-input size="small" v-model="ifsMaterialPropsForm.startMeterMark"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="截止米标(Attr3):"> |
| | | <el-input size="small" v-model="ifsMaterialPropsForm.endMeterMark"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="入库长度">--> |
| | | <!-- <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="绝缘颜色(Attr4):"> |
| | | <el-input size="small" v-model="ifsMaterialPropsForm.insulationColor"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="外护颜色(Attr5):"> |
| | | <el-input size="small" v-model="ifsMaterialPropsForm.outerColor"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="印字信息(Attr8):"> |
| | | <el-select size="small" v-model="ifsMaterialPropsForm.letteringInfo" placeholder="请选择"> |
| | | <el-option v-for="(item,index) in letteringInfoList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closePartPropDialog()">取 消</el-button> |
| | | <el-button type="primary" @click="saveOrUpdatePartProp()">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import DataWorker from '@/workers/DataWorker.worker.js'; |
| | | import html2canvas from "html2canvas"; |
| | | import { mapGetters } from "vuex"; |
| | | import { connect,disconnect,weightList } from "@/utils/connect.js"; |
| | | import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue"; |
| | | import {connect,disconnect,weightList} from "@/utils/connect"; |
| | | import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js"; |
| | | export default { |
| | | name: 'Inspection', |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | letteringInfoList: [], |
| | | ifsMaterialPropsForm:{ |
| | | id:null, |
| | | ifsOrderId: null, |
| | | drumNo: '', // 载具编号 |
| | | startMeterMark: '', // 起始米标 |
| | | endMeterMark: '', // 截止米标 |
| | | insulationColor: '', // 绝缘颜色 |
| | | outerColor: '', // 外护颜色 |
| | | inboundLength: '', // 入库长度 |
| | | letteringInfo: '', // 印字信息 |
| | | }, |
| | | ifsMaterialPropsVisible:false, |
| | | sonLaboratory: null, |
| | | orderId: null, |
| | | state: null, |
| | |
| | | { |
| | | name: "1285nm~1330nm", |
| | | arr: [12, 13, 14, 15], |
| | | // 初始化 getDataIndex1 为数组 |
| | | getDataIndex1: [], |
| | | isShowSelect: false, |
| | | maxNum: 5 |
| | | }, |
| | | { |
| | | name: "1525nm~1575nm", |
| | | arr: [12, 13, 14, 15], |
| | | // 初始化 getDataIndex1 为数组 |
| | | getDataIndex1: [], |
| | | isShowSelect: false, |
| | | maxNum: 5 |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | { |
| | | name: "截至波长", |
| | | arr: [12, 13, 14, 15], |
| | | // 初始化 getDataIndex1 为数组 |
| | | getDataIndex1: [], |
| | | isShowSelect: false, |
| | | maxNum: 5 |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | // 文件列表相关--结束 |
| | | // 任务切换列表--开始 |
| | | tableData0: [], |
| | |
| | | }, |
| | | tableLoading0: false, |
| | | // 任务切换列表--结束 |
| | | isSplit: 0, // 是否是拆单过来的 |
| | | }; |
| | | }, |
| | | // 用于上传文件的信息 |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | let { sonLaboratory, orderId, state, inspectorList, typeSource } = |
| | | let { sonLaboratory, orderId, state, inspectorList, typeSource,isSplit } = |
| | | this.$route.query; |
| | | this.sonLaboratory = sonLaboratory; |
| | | this.orderId = orderId; |
| | |
| | | this.state = state; |
| | | this.inspectorList = inspectorList; |
| | | this.typeSource = typeSource; |
| | | this.isSplit = isSplit; |
| | | }, |
| | | mounted() { |
| | | this.getTypeDicts(); // 获取紧急程度下拉框选项 |
| | |
| | | this.startWorker(); |
| | | // this.getList0() // 任务切换 |
| | | this.scrollInit(); |
| | | disconnect() |
| | | }, |
| | | activated() { |
| | | this.getTypeDicts(); // 获取紧急程度下拉框选项 |
| | |
| | | } |
| | | }); |
| | | } |
| | | console.log("处理后的模板-",this.tableList) |
| | | }, |
| | | // 特殊检验项--监听设备信息改变 |
| | | equipForm: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | closePartPropDialog(){ |
| | | this.ifsMaterialPropsForm = { |
| | | id:null, |
| | | ifsOrderId: null, |
| | | drumNo: '', // 载具编号 |
| | | startMeterMark: '', // 起始米标 |
| | | endMeterMark: '', // 截止米标 |
| | | insulationColor: '', // 绝缘颜色 |
| | | outerColor: '', // 外护颜色 |
| | | inboundLength: '', // 入库长度 |
| | | letteringInfo: '', // 印字信息 |
| | | } |
| | | this.ifsMaterialPropsVisible = false; |
| | | }, |
| | | getPartProps(ifsId){ |
| | | getOneByIfsId(ifsId).then((res)=>{ |
| | | if(res.code==200 && res.data){ |
| | | this.ifsMaterialPropsForm = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | saveOrUpdatePartProp(){ |
| | | saveOrUpdateProps({ |
| | | ...this.ifsMaterialPropsForm, |
| | | partNo: this.insOrder.partNo, |
| | | lotBatchNo: this.insOrder.lotBatchNo, |
| | | }).then((res)=>{ |
| | | if(res.code==200){ |
| | | this.$message.success("保存成功"); |
| | | this.ifsMaterialPropsVisible = false; |
| | | } |
| | | }) |
| | | }, |
| | | //打开IFS物料属性弹框 |
| | | showMaterialPropsDialog(){ |
| | | this.getPartProps(this.insOrder.ifsInventoryId) |
| | | this.$nextTick(()=>{ |
| | | this.ifsMaterialPropsVisible = true; |
| | | }) |
| | | }, |
| | | disconnect() { |
| | | return disconnect |
| | | }, |
| | | sss() { |
| | | console.log(this.$store.state.weightList) // |
| | | console.log(this.$store.state.weightList) // |
| | | }, |
| | | // 文件管理--开始 |
| | | getList() { |
| | |
| | | laboratory: this.sonLaboratory, |
| | | }).then(async (res) => { |
| | | this.insOrder = res.data.insOrder; |
| | | //查询零件属性 |
| | | this.getPartProps(res.data.insOrder.ifsInventoryId) |
| | | this.supplierDensity = res.data.supplierDensity; |
| | | this.getList() |
| | | this.urgentList.forEach((m) => { |
| | |
| | | getDataAcquisitionDevice() { |
| | | (async () => { |
| | | try { |
| | | // 检查是否支持 Web Serial API |
| | | if ('serial' in navigator) { |
| | | // 请求可用串口 |
| | | const ports = await navigator.serial.getPorts(); |
| | | if (ports.length > 0) { |
| | | await connect(); |
| | | // 检查页面中检测项是否包含密度 |
| | | const hasDensityItem = this.currentSample.insProduct.some(item => { |
| | | // 假设密度相关的检测项名称包含 "密度" 关键字,可按需修改 |
| | | return item.inspectionItem && item.inspectionItem.includes('密度'); |
| | | }); |
| | | if (hasDensityItem) { |
| | | // 检查是否支持 Web Serial API |
| | | if ('serial' in navigator) { |
| | | // 请求可用串口 |
| | | const ports = await navigator.serial.getPorts(); |
| | | if (ports.length > 0) { |
| | | await connect(); |
| | | } else { |
| | | console.log('没有可用的串口'); |
| | | } |
| | | } else { |
| | | console.log('没有可用的串口'); |
| | | console.log('当前浏览器不支持 Web Serial API'); |
| | | } |
| | | } else { |
| | | console.log('当前浏览器不支持 Web Serial API'); |
| | | } |
| | | } catch (error) { |
| | | console.error('检测串口时出错:', error); |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | // getDataAcquisitionDevice() { |
| | | // if (this.isSerialConnected) { |
| | | // connect(); |
| | | // } |
| | | // // return |
| | | // let itemIds = []; |
| | | // this.currentSample.insProduct.forEach((item) => { |
| | | // if (item.inspectionItemType === "1") { |
| | | // itemIds.push(item.id); |
| | | // } |
| | | // }); |
| | | // const params = { |
| | | // entrustCode: this.insOrder.entrustCode, |
| | | // sampleCode: this.currentSample.sampleCode, |
| | | // id: this.currentSample.id, |
| | | // itemIds: itemIds, |
| | | // }; |
| | | // this.dataAcquisitionLoading = true; |
| | | // dataCollection(params).then((res) => { |
| | | // this.dataAcquisitionLoading = false; |
| | | // if (res.code != 200) { |
| | | // return; |
| | | // } |
| | | // this.dataAcquisitionInfoNew = this.HaveJson(res.data); |
| | | // // 对数采回来的值进行处理 |
| | | // this.handleDataAcquisition(res.data); |
| | | // }).catch(err => { |
| | | // this.dataAcquisitionLoading = false; |
| | | // }); |
| | | // }, |
| | | // 假设存在一个方法用于更新串口连接状态 |
| | | // updateSerialConnectionStatus(status) { |
| | | // this.isSerialConnected = status; |
| | | // }, |
| | | |
| | | objectOrder(obj) { |
| | | let newkey = Object.keys(obj).sort(); |
| | | let newObj = {}; |
| | |
| | | return newObj; |
| | | }, |
| | | handleDataAcquisition(data, noDialog) { |
| | | console.log(data); |
| | | console.log("dadad--",data) |
| | | // 是否可以编辑数采数据 |
| | | if (this.dataAcquisitionEidtAble) { |
| | | this.getDataType = 1; |
| | |
| | | }; |
| | | } |
| | | // 循环数采数据 |
| | | console.log(data[i],i) |
| | | for (let j in data[i]) { |
| | | console.log("jjjjj--",j) |
| | | // 拼接字符串 检验项分类+检验项+检验子项 |
| | | let str0 = ""; |
| | | if (i.includes("@")) { |
| | |
| | | }; |
| | | } |
| | | let list = this.tableList[0].arr; |
| | | console.log(this.tableList[0]); |
| | | // 循环页面列表信息,判断数采数据对应页面列表信息的检验项是哪个,并给当前检验项绑定设备信息 |
| | | list.forEach((item, index) => { |
| | | let num0 = 0; |
| | |
| | | } |
| | | }; |
| | | let list = this.tableList[0].arr; |
| | | console.log(this.tableList[0]); |
| | | let maxNum = 0; |
| | | list.forEach((item, index) => { |
| | | let num0 = 0; |
| | |
| | | } else { |
| | | // 如果都不存在,则,进入处理数采线程里去处理数据 |
| | | try { |
| | | console.log(this.dataAcquisitionInfo); |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.getDataIndexLoading = false; |
| | | this.dataGetDia = false; |
| | | this.getDataTypeId = ""; |
| | | console.log("dadada---",this.dataAcquisitionInfo) |
| | | this.worker0.postMessage( |
| | | JSON.stringify({ |
| | | dataAcquisitionInfo: this.dataAcquisitionInfo, |
| | |
| | | // 监听 Worker 返回的结果 |
| | | this.worker0.onmessage = (event) => { |
| | | let result = JSON.parse(event.data); |
| | | console.log("Worker 返回的结果:", result); |
| | | if (result.method == "changeInput") { |
| | | // 采集后的数据,需要进行计算的线程进行计算 |
| | | let { list, n } = result.value; |
| | |
| | | if (c.v.ps != undefined && c.v.ps.value === "检验项") { |
| | | if (count4 === 0) { |
| | | if (c.v.v) { |
| | | c.v.v = c.v.v.replace(/\s*/g, ""); |
| | | c.v.v = c.v.v.replace(/[\n\r\s]*/g, ""); |
| | | } |
| | | str += c.v.v; |
| | | count4 += 1; |
| | |
| | | ) { |
| | | if (count4 === 1) { |
| | | if (c.v.v) { |
| | | c.v.v = c.v.v.replace(/\s*/g, ""); |
| | | c.v.v = c.v.v.replace(/[\n\r\s]*/g, ""); |
| | | } |
| | | str += c.v.v; |
| | | count4 += 1; |
| | |
| | | if (c.v.ps != undefined && c.v.ps.value === "检验项分类") { |
| | | if (count4 === 0) { |
| | | if (c.v.v) { |
| | | c.v.v = c.v.v.replace(/\s*/g, ""); |
| | | c.v.v = c.v.v.replace(/[\n\r\s]*/g, ""); |
| | | } |
| | | str += c.v.v; |
| | | count4 += 1; |
| | |
| | | } else if (c.v.ps != undefined && c.v.ps.value === "检验项") { |
| | | if (count4 === 1) { |
| | | if (c.v.v) { |
| | | c.v.v = c.v.v.replace(/\s*/g, ""); |
| | | console.log("进入1111111") |
| | | c.v.v = c.v.v.replace(/[\n\r\s]*/g, ""); |
| | | } |
| | | str += c.v.v; |
| | | count4 += 1; |
| | |
| | | ) { |
| | | if (count4 === 2) { |
| | | if (c.v.v) { |
| | | c.v.v = c.v.v.replace(/\s*/g, ""); |
| | | c.v.v = c.v.v.replace(/[\n\r\s]*/g, ""); |
| | | } |
| | | str += c.v.v; |
| | | count4 += 1; |
| | |
| | | if (str === "机械性能干态拉伸强度(纵向)") { |
| | | if (c.v.ps != undefined && c.v.ps.value === "单位") { |
| | | if (c.v.v) { |
| | | c.v.v = c.v.v.replace(/\s*/g, ""); |
| | | c.v.v = c.v.v.replace(/[\n\r\s]*/g, ""); |
| | | } |
| | | str2 = str + c.v.v; |
| | | unit2 = c.v.v; |
| | |
| | | undefined |
| | | ? "" |
| | | : this.currentSample.insProduct[i].inspectionItemClass; |
| | | inspectionItemClass = inspectionItemClass.replace(/\s*/g, ""); |
| | | inspectionItemClass = inspectionItemClass.replace(/[\n\r\s]*/g, ""); |
| | | let inspectionItem = |
| | | this.currentSample.insProduct[i].inspectionItem == null || |
| | | this.currentSample.insProduct[i].inspectionItem == undefined |
| | | ? "" |
| | | : this.currentSample.insProduct[i].inspectionItem; |
| | | inspectionItem = inspectionItem.replace(/\s*/g, ""); |
| | | inspectionItem = inspectionItem.replace(/[\n\r\s]*/g, ""); |
| | | let inspectionItemSubclass = |
| | | this.currentSample.insProduct[i].inspectionItemSubclass == |
| | | null || |
| | |
| | | ? "" |
| | | : this.currentSample.insProduct[i].inspectionItemSubclass; |
| | | inspectionItemSubclass = inspectionItemSubclass.replace( |
| | | /\s*/g, |
| | | /[\n\r\s]*/g, |
| | | "" |
| | | ); |
| | | if (inspectionItemSubclass === "干态拉伸强度(纵向)") { |
| | |
| | | openAddVerifyDia() { |
| | | this.addVerifyDia = true; |
| | | }, |
| | | confirmSubmit(registerInsResults){ |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | registerInsResults: registerInsResults |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.goback(); |
| | | this.submitLoading = false; |
| | | this.addVerifyDia = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | this.submitLoading = false; |
| | | }); |
| | | }, |
| | | submit() { |
| | | if (this.verifyUser === null || this.verifyUser === "") { |
| | | this.$message.error("请指定复核人员"); |
| | | return; |
| | | } |
| | | if (!this.otherForm.humidity) { |
| | | if (!this.otherForm.humidity && this.insOrder.ifsOrderType!=='02wg') { |
| | | this.$message.error("请输入湿度"); |
| | | return; |
| | | } |
| | | if (!this.otherForm.temperature) { |
| | | if (!this.otherForm.temperature && this.insOrder.ifsOrderType!=='02wg') { |
| | | this.$message.error("请输入温度"); |
| | | return; |
| | | } |
| | |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (!res.data || res.data.length == 0) { |
| | | if (!res.data || res.data.errorMsg.length == 0) { |
| | | this.submitLoading = true; |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | entrustCode: this.insOrder.entrustCode, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.goback(); |
| | | this.submitLoading = false; |
| | | this.addVerifyDia = false; |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | this.submitLoading = false; |
| | | //检验类型为原材料 |
| | | if(this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){ |
| | | const htmlStr = "是否登记IFS采购检验结果并移库?该操作会登记<span style='color:#ff4949'>同一零件同一订单的所有拆分批次</span>,请谨慎选择。" |
| | | this.$confirm(htmlStr, '提示', { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | dangerouslyUseHTMLString: true |
| | | }).then(() => { |
| | | this.confirmSubmit(true) |
| | | }).catch(() => { |
| | | this.confirmSubmit(false) |
| | | }); |
| | | }else{ |
| | | this.confirmSubmit(true) |
| | | } |
| | | } else { |
| | | let newData = []; |
| | | const h = this.$createElement; |
| | | for (let i in res.data) { |
| | | const lastChar = res.data[i].slice(-1); |
| | | for (let i in res.data.errorMsg) { |
| | | const lastChar = res.data.errorMsg[i].slice(-1); |
| | | if (lastChar == "-") { |
| | | res.data[i] = res.data[i].slice(0, -1); |
| | | res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1); |
| | | } |
| | | newData.push( |
| | | h( |
| | | "p", |
| | | { style: "font-size: 14px;color: red;" }, |
| | | Number(i) + 1 + "、" + res.data[i] |
| | | Number(i) + 1 + "、" + res.data.errorMsg[i] |
| | | ) |
| | | ); |
| | | } |
| | |
| | | }) |
| | | .then(() => { |
| | | this.submitLoading = true; |
| | | submitPlan({ |
| | | orderId: this.orderId, |
| | | laboratory: this.sonLaboratory, |
| | | verifyUser: this.verifyUser, |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.addVerifyDia = false; |
| | | this.goback(); |
| | | } |
| | | this.submitLoading = false; |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | this.submitLoading = false; |
| | | }); |
| | | this.confirmSubmit(false) |
| | | }) |
| | | .catch(() => { }); |
| | | } |
| | |
| | | |
| | | .data-collection-items { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | flex-wrap: wrap; |
| | | } |
| | | .data-collection-items .el-select, |
| | | .data-collection-items .el-checkbox { |
| | | flex-basis: 20% ; |
| | | flex-basis: 20% ; |
| | | box-sizing: border-box; |
| | | padding: 5px 2%; |
| | | } |