| | |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情 |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1">检验模板切换</el-button> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button> |
| | | <el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">任务切换</el-button> |
| | | <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1" |
| | | :loading="submitLoading">提交</el-button> |
| | | <!-- 复核 --> |
| | | <el-button size="small" type="primary" @click="upInsReview(1)" :loading="reviewLoading" |
| | | <el-button size="small" type="primary" @click="upInsReview(1,'继续试验')" :loading="reviewLoading" |
| | | v-if="state>1&&!isLook">继续试验</el-button> |
| | | <el-button size="small" @click="upInsReview(0)" v-if="state>1&&!isLook" type="danger">再次试验</el-button> |
| | | <el-button size="small" @click="upInsReview(2)" v-if="state>1&&!isLook">结束试验</el-button> |
| | | <el-button size="small" @click="$emit('goback')" v-if="!noBack">返回</el-button> |
| | | <el-button size="small" @click="upInsReview(0,'再次试验')" v-if="state>1&&!isLook" type="danger">再次试验</el-button> |
| | | <el-button size="small" @click="upInsReview(2,'结束试验')" v-if="state>1&&!isLook">结束试验</el-button> |
| | | <el-button size="small" @click="handleBack" v-if="!noBack">返回</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search" v-show="!isLook"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="当前样品位数:"> |
| | | <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="" v-if="insOrder.rule"> |
| | | <el-tag>{{ !insOrder.rule.includes('不考虑不确定度')?insOrder.rule.split('-')[0]+' '+insOrder.rule.split('-')[1]+'%':insOrder.rule }}</el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="备注:"> |
| | | <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span> |
| | |
| | | <i |
| | | v-if="currentFiberOptic" class="el-icon-caret-right table_caret" @click="caretOptic(1)"></i> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='试验前样品检查'"> |
| | | <el-select class="table_input" v-model="n.v.v" |
| | | :disabled="state>1|| (n.u != userId && n.u != undefined && n.u != '')" @change="(val)=>changeSampleCheck(val, n,'前')"> |
| | | <el-option label="完好" :value="'完好'"></el-option> |
| | | <el-option label="破损" :value="'破损'"></el-option> |
| | | </el-select> |
| | | </template> |
| | | <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='试验后样品检查'"> |
| | | <el-select class="table_input" v-model="n.v.v" |
| | | :disabled="state>1|| (n.u != userId && n.u != undefined && n.u != '')" @change="(val)=>changeSampleCheck(val, n,'后')"> |
| | | <el-option label="完好" :value="'完好'"></el-option> |
| | | <el-option label="破损" :value="'破损'"></el-option> |
| | | </el-select> |
| | | </template> |
| | | <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)" ></span> |
| | | </div> |
| | |
| | | }" |
| | | v-if="state==1&&fileAdd" |
| | | :on-success="handleSuccessUp" :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' :headers="headers" :on-change="beforeUpload" |
| | | accept='.jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv' :headers="headers" :on-change="beforeUpload" |
| | | style="width: 80px !important;" |
| | | :on-error="onError" ref='upload'> |
| | | <el-button size="small" type="primary" v-if="state==1">附件上传</el-button></el-upload> |
| | |
| | | <el-button type="primary" @click="submit0">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="文件预览" |
| | | :visible.sync="lookFileVisible" |
| | | width="60%" fullscreen> |
| | | <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" |
| | | :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import excelFunction from '../../../util/excelFountion' |
| | | import CircuitParameters1 from './circuit-parameters1.vue' |
| | | import CircuitParameters2 from './circuit-parameters2.vue' |
| | | import filePreview from '../../tool/file-preview.vue' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'], |
| | | components: { |
| | | ValueTable, |
| | | Circuit, |
| | | CircuitParameters1, |
| | | CircuitParameters2 |
| | | CircuitParameters2, |
| | | filePreview |
| | | }, |
| | | data() { |
| | | return { |
| | | lookFileVisible:false,//预览文件 |
| | | experimentDia:false, |
| | | experimentInfo:{ |
| | | note:'', |
| | |
| | | disabFun: (row, index) => { |
| | | return this.state!=1 |
| | | } |
| | | }, |
| | | { |
| | | id: '1', |
| | | font: '预览', |
| | | type: 'text', |
| | | method: 'lookFile', |
| | | } |
| | | ], |
| | | isPage: false, |
| | |
| | | otherForm:{ |
| | | temperature:'', |
| | | humidity:'' |
| | | } |
| | | }, |
| | | currentFile:{},//当前文件 |
| | | } |
| | | }, |
| | | // 用于上传文件的信息 |
| | |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | insResult: null, |
| | | beforeCheck:null, |
| | | afterCheck:null, |
| | | } |
| | | } |
| | | }) |
| | |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | insResult: null, |
| | | beforeCheck:null, |
| | | afterCheck:null, |
| | | } |
| | | } |
| | | }) |
| | |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | insResult: null, |
| | | beforeCheck:null, |
| | | afterCheck:null, |
| | | } |
| | | }) |
| | | // 页面列表数据处理 |
| | |
| | | }) |
| | | } |
| | | } |
| | | if (b.v.ps != undefined && b.v.ps.value === '试验前样品检查') { |
| | | // b.v.v = '' |
| | | this.$set(b.v, 'v', '' ) |
| | | this.param[b.i].beforeCheck = b |
| | | } |
| | | if (b.v.ps != undefined && b.v.ps.value === '试验后样品检查') { |
| | | // b.v.v = '' |
| | | this.$set(b.v, 'v', '' ) |
| | | this.param[b.i].afterCheck = b |
| | | } |
| | | set.add(b.r) |
| | | // 如果模板列表的函数存在,那么加入到excel函数列表里面 |
| | | if (b.v.f) { |
| | |
| | | } catch (e) {} |
| | | try { |
| | | // 最终值赋值 |
| | | this.param[a.id].resValue.v.v = this.toFixed(a.lastValue,this.param[a.id].resValue.v.ct) |
| | | this.param[a.id].resValue = {v:{v:a.lastValue}} |
| | | // this.param[a.id].resValue.v.v = this.toFixed(a.lastValue,this.param[a.id].resValue.v.ct) |
| | | // 结论赋值 |
| | | this.param[a.id].insResult.v.v = a.insResult |
| | | } catch (e) {} |
| | | this.param[a.id].insResult = {v:{v:a.insResult}} |
| | | // this.param[a.id].insResult.v.v = a.insResult |
| | | // 检验前样品检查赋值 |
| | | this.param[a.id].afterCheck.v.v = a.insProductResult.afterCheck |
| | | // 检验后样品检查赋值 |
| | | this.param[a.id].beforeCheck.v.v = a.insProductResult.beforeCheck |
| | | } catch (e) { |
| | | console.log('error',e) |
| | | } |
| | | }) |
| | | // 对excel函数进行处理 |
| | | this.handleExcelMethod() |
| | |
| | | n.v.v = n.v.v.replace('/', '') |
| | | } |
| | | } |
| | | // 通信特殊处理,检验值填入之后直接保存数据,判断结果默认为3 |
| | | for (var i in this.param){ |
| | | this.param[i].insResult = {v:{v:3}} |
| | | } |
| | | this.saveInsContext(n.i) |
| | | return; |
| | | // 以下是正常的判断流程,后面有需要则进入此流程 |
| | | try { |
| | | // 向 Worker 发送消息,开始处理逻辑 |
| | | this.worker.postMessage(JSON.stringify({ |
| | |
| | | } catch (error) { |
| | | console.log(444,error); |
| | | } |
| | | |
| | | // 监听 Worker 返回的结果 |
| | | this.worker.onmessage = (event) => { |
| | | this.result = JSON.parse(event.data); |
| | |
| | | if(this.result.value.currentInsItemId){ |
| | | currentInsItemId = this.result.value.currentInsItemId |
| | | } |
| | | // console.log(this.result,123); |
| | | // 特殊处理一下结论,会有这种特殊情况 |
| | | for (var i in this.param){ |
| | | if(this.param[i].insResult&&this.param[i].insResult.v&&this.param[i].insResult.v.v){ |
| | |
| | | } |
| | | } |
| | | this.saveInsContext(currentInsItemId) |
| | | // 如果是数采可编辑输入的情况,可以直接保存数据 |
| | | // if(this.getDataType==2){ |
| | | // this.saveInsContext(currentInsItemId) |
| | | // }else{ |
| | | // if(this.isGet&&!this.dataAcquisitionEidtAble){ |
| | | // if(this.result.value.getDataTypeId==''){ |
| | | // // 如果是数采不可编辑输入的情况,且最后一个数采没有完成,则不保存数据 |
| | | // return |
| | | // } |
| | | // // 保存数据 |
| | | // setTimeout(()=>{ |
| | | // this.saveInsContext(currentInsItemId) |
| | | // },2000) |
| | | // }else if(this.isGet&&this.dataAcquisitionEidtAble){ |
| | | // if(this.getDataType==1){ |
| | | // if(this.result.value.getDataTypeId==''){ |
| | | // // 如果是数采可编辑输入的情况,且最后一个数采没有完成,则不保存数据 |
| | | // return |
| | | // } |
| | | // this.saveInsContext(currentInsItemId) |
| | | // }else{ |
| | | // this.saveInsContext(currentInsItemId) |
| | | // } |
| | | // }else{ |
| | | // this.saveInsContext(currentInsItemId) |
| | | // } |
| | | // } |
| | | }) |
| | | break; |
| | | case 'tableList': |
| | |
| | | }) |
| | | }, |
| | | // 复核 |
| | | upInsReview(e) { |
| | | if (e == 1||e==2) { |
| | | upInsReview(e,type) { |
| | | this.$confirm(`是否${type}?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | if (e == 1||e==2) { |
| | | // 继续试验 |
| | | this.reviewLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.verifyPlan, { |
| | |
| | | // 再次试验 |
| | | this.reviewDia = true; |
| | | } |
| | | }) |
| | | }, |
| | | handleReviewDia() { |
| | | if (this.noReason) { |
| | |
| | | } |
| | | }, |
| | | handleSubmit(){ |
| | | this.experimentDia = true |
| | | if (this.sonLaboratory === '电路试验') { |
| | | this.experimentDia = true |
| | | } else { |
| | | if(this.insOrder.orderType=='C'){ |
| | | this.verifyUser = this.insOrder.prepareUserId |
| | | this.submit() |
| | | }else{ |
| | | this.addVerifyDia = true |
| | | } |
| | | } |
| | | }, |
| | | submit() { |
| | | if (this.verifyUser === null || this.verifyUser === '') { |
| | |
| | | // 保存数据 |
| | | this.saveInsContext(n.i) |
| | | }, |
| | | // 样品检查 |
| | | changeSampleCheck(val, n,type){ |
| | | this.$set(n.v,'v',val) |
| | | if(type=='前'){ |
| | | // 检验前 |
| | | this.saveInsContext(n.i) |
| | | }else{ |
| | | // 检验后 |
| | | this.saveInsContext(n.i) |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | insResult: null, |
| | | beforeCheck:null, |
| | | afterCheck:null, |
| | | } |
| | | } |
| | | }) |
| | |
| | | await this.handleChangeSample(this.currentSample) |
| | | this.currentNum++ |
| | | this.tableLoading = false |
| | | }, |
| | | lookFile(row){ |
| | | this.currentFile = row; |
| | | if(row.type==1){ |
| | | this.currentFile.url = this.javaApi+'/img/'+row.fileUrl |
| | | }else{ |
| | | this.currentFile.url = this.javaApi+'/word/'+row.fileUrl |
| | | } |
| | | this.lookFileVisible = true |
| | | }, |
| | | handleBack(){ |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')){ |
| | | this.$confirm('请确认当前数据是否全部保存,是否返回?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$emit('goback') |
| | | }) |
| | | }else{ |
| | | this.$emit('goback') |
| | | } |
| | | } |
| | | } |
| | | } |