| | |
| | | display: inline-flex; |
| | | align-items: center; |
| | | } |
| | | .history-btn{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | </style> |
| | | <style> |
| | | .inspection .el-form-item__label { |
| | |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button> |
| | | <el-button size="small" type="primary" @click="taskVisible=true">任务切换</el-button> |
| | | <el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">任务切换</el-button> |
| | | <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1" |
| | | :loading="submitLoading">提交</el-button> |
| | | <!-- 复核 --> |
| | | <el-button size="small" type="primary" @click="upInsReview(1)" :loading="reviewLoading" |
| | | v-if="state>1">继续试验</el-button> |
| | | <el-button size="small" @click="upInsReview(0)" v-if="state>1" type="danger">再次试验</el-button> |
| | | <el-button size="small" @click="upInsReview(2)" v-if="state>1">结束试验</el-button> |
| | | 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')">返回</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <div class="search" v-show="!isLook"> |
| | | <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px" label-position="right"> |
| | | <el-form-item label="委托编号:"> |
| | | <el-input clearable v-model="insOrder.entrustCode" disabled size="small" placeholder="请输入"></el-input> |
| | |
| | | <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请输入" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="试验标准:"> |
| | | <span>{{ insOrder.testRequirements?insOrder.testRequirements:'-' }}</span> |
| | | <span>{{ currentSample.testRequirements?currentSample.testRequirements:'-' }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="下发时间:"> |
| | | <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="请输入"></el-input> |
| | |
| | | <el-radio-button :label="item.templateId" v-for="(item,index) in tableLists" :key="index" |
| | | size="small">{{ item.templateName }}</el-radio-button> |
| | | </el-radio-group> |
| | | <span style="margin-left: 20px;margin-right: 10px;">模板版本:</span> |
| | | <!-- <span style="margin-left: 20px;margin-right: 10px;">模板版本:</span> |
| | | <el-radio-group v-model="currentTableState" size="small"> |
| | | <el-radio-button label="0" size="small">版本一</el-radio-button> |
| | | <el-radio-button label="1" size="small">版本二</el-radio-button> |
| | | </el-radio-group> |
| | | </el-radio-group> --> |
| | | </div> |
| | | <div style="display: flex;align-items: center;"> |
| | | <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'"> 套管:</span> |
| | |
| | | </el-select> |
| | | <el-button type="primary" size="small" v-if="(isGet||tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='温度循环检验原始记录'&&temDataAcquisition)&&PROJECT=='检测中心'&&state==1" @click="getDataAcquisitionDevice" :loading="dataAcquisitionLoading">数据采集</el-button> |
| | | <el-button :type="dataAcquisitionEidtAble?'':'primary'" size="small" v-if="(isGet||(tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='温度循环检验原始记录'))&&PROJECT=='检测中心'&&collected&&state==1" @click="dataAcquisitionEidtAble=!dataAcquisitionEidtAble">{{dataAcquisitionEidtAble?'关闭编辑':'编辑数采'}}</el-button> |
| | | </div> |
| | | <div class="history-btn" v-if="isLook"> |
| | | <el-button type="primary" icon="el-icon-arrow-left" size="small" @click="goHistory(-1)">上一条记录</el-button> |
| | | <span style="font-size: 14px;margin: 0 10px;">当前第{{num}}条</span> |
| | | <el-button type="primary" size="small" @click="goHistory(1)">下一条记录<i class="el-icon-arrow-right el-icon--right"></i></el-button> |
| | | </div> |
| | | </div> |
| | | <!-- 常规检验原始记录 --> |
| | |
| | | <!-- 电路试验 --> |
| | | <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" style="width: 100%;overflow-x: auto;overflow-y: visible;"> |
| | | <!-- <Circuit></Circuit> --> |
| | | <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state"></CircuitParameters1> |
| | | <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state"></CircuitParameters2> |
| | | <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters1> |
| | | <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1" :isLook="isLook" :currentNum="currentNum"></CircuitParameters2> |
| | | </div> |
| | | <el-upload :action="action" |
| | | :data="{ |
| | |
| | | <el-button type="primary" @click="submitDataGet()" :loading="getDataIndexLoading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="选择电路检验模板版本" |
| | | :visible.sync="versionDialogVisible" |
| | | width="30%" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :show-close="false"> |
| | | <el-radio-group v-model="currentTableState"> |
| | | <el-radio :label="0">电调-电路检验原始记录</el-radio> |
| | | <el-radio :label="1">非电调-电路检验原始记录</el-radio> |
| | | </el-radio-group> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" :loading="versionLoading" @click="saveVersion">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import CircuitParameters1 from './circuit-parameters1.vue' |
| | | import CircuitParameters2 from './circuit-parameters2.vue' |
| | | export default { |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList'], |
| | | props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1'], |
| | | components: { |
| | | ValueTable, |
| | | Circuit, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | currentNum:0, |
| | | versionLoading:false, |
| | | versionDialogVisible:false, |
| | | currentTableState:0, |
| | | sagData: [], |
| | | sagForm: { |
| | |
| | | getDataIndexLoading:false, |
| | | changeType:null, |
| | | getDataTypeId:'', |
| | | getDataType:null |
| | | getDataType:null, |
| | | num:0 |
| | | } |
| | | }, |
| | | // 用于上传文件的信息 |
| | |
| | | created() { |
| | | this.componentData.entity.sonLaboratory = this.sonLaboratory; |
| | | this.id = this.orderId; |
| | | this.currentTableState = this.version |
| | | this.num = this.num1 |
| | | this.getUserInfo() |
| | | }, |
| | | mounted() { |
| | |
| | | // 根据类型、任务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 = null; |
| | | if(!this.isLook){ |
| | | res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory) |
| | | }else{ |
| | | res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct2+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory+'&num='+this.num) |
| | | } |
| | | this.tableLoading = false; |
| | | return res.data |
| | | }, |
| | |
| | | } |
| | | // 处理页面列表数据 |
| | | this.getTableLists(); |
| | | this.currentKey = row.index |
| | | this.currentKey = row.index?row.index:0 |
| | | this.currentTab = null; |
| | | // 向多线程去保存页面列表数据,后端传参,当前模板信息 |
| | | this.worker.postMessage(JSON.stringify({ |
| | |
| | | this.tableList = null; |
| | | this.tableList = [this.tableLists[0]] |
| | | this.currentTable = this.tableLists[0].templateId; |
| | | if(this.tableLists.find(m=>m.templateId==this.currentTable)&&this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('电路试验')&&this.currentTableState!=0&&this.currentTableState!=1){ |
| | | this.versionDialogVisible = true |
| | | } |
| | | // 处理页面列表数据 |
| | | this.handleTableData() |
| | | } |
| | |
| | | if(this.param){ |
| | | this.$axios.post(this.$api.insOrderPlan.saveInsContext, { |
| | | param: JSON.stringify(this.param), |
| | | currentTable:this.currentTable |
| | | currentTable:this.currentTable, |
| | | num:this.currentSample.num1 |
| | | }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message.error('保存失败') |
| | |
| | | async getCurrentItem(){ |
| | | let list = await this.getCurrentProduct(this.currentSample.id,0) |
| | | this.currentSample.insProduct = this.HaveJson(list) |
| | | }, |
| | | saveVersion(){ |
| | | if(this.currentTableState!=0&&this.currentTableState!=1){ |
| | | this.$message.error('请选择版本') |
| | | return |
| | | } |
| | | this.versionLoading = true; |
| | | this.$axios.post(this.$api.insOrderPlan.chooseVersion, { |
| | | orderStateId: this.orderStateId, |
| | | version: this.currentTableState |
| | | }).then(res => { |
| | | this.versionLoading = false; |
| | | if(res.code==201){ |
| | | return |
| | | } |
| | | this.versionDialogVisible = false |
| | | }) |
| | | }, |
| | | async goHistory(num){ |
| | | if(this.num==1&&num==-1){ |
| | | this.$message.error('当前是第一条记录') |
| | | return |
| | | }else if(this.num1==this.num&&num==1){ |
| | | this.$message.error('当前是最后一条记录') |
| | | return |
| | | } |
| | | this.num = this.num + num |
| | | this.tableLoading = true |
| | | await this.handleChangeSample(this.currentSample) |
| | | this.currentNum++ |
| | | this.tableLoading = false |
| | | } |
| | | } |
| | | } |