| | |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">检验单详情</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="fiberOpticVisible=true" v-if="fiberOptic.length>0">光纤切换</el-button> |
| | | <el-button size="small" type="primary" @click="fiberOpticTapeVisible=true" v-if="fiberOpticTape.length>0">光纤带切换</el-button> |
| | | <el-button size="small" type="primary" @click="bushingVisible=true" v-if="bushing.length>0">套管切换</el-button> |
| | | <el-button size="small" type="primary" @click="sampleVisible=true">样品切换</el-button> |
| | | <el-button size="small" type="primary" @click="taskVisible=true">任务切换</el-button> |
| | | <el-button size="small" type="primary" @click="addVerifyDia = true" v-show="state==1" |
| | |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <el-drawer title="光纤切换" :visible.sync="fiberOpticVisible" :size="500"> |
| | | <el-table class="el-table" ref="fiberOpticTable" :data="fiberOptic" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeOptic" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey" :row-key="record=>record.index" v-if="fiberOpticVisible"> |
| | | <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="bushColor" label="管套色标" min-width="100px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="color" label="光纤色标" min-width="100px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="model" label="光纤规格" min-width="130px" show-overflow-tooltip |
| | | ></el-table-column> |
| | | <el-table-column prop="standard" label="参考标准" width="100px" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="光纤带切换" :visible.sync="fiberOpticTapeVisible" :size="500"> |
| | | <el-table class="el-table" ref="fiberOpticTapeTable" :data="fiberOpticTape" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeTape" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey" :row-key="record=>record.index" v-if="fiberOpticTapeVisible"> |
| | | <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="光纤带编号" min-width="110px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="model" label="光纤带规格" min-width="110px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="standard" label="参考标准" width="90px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="num" label="光纤检测量" min-width="110px" show-overflow-tooltip |
| | | ></el-table-column> |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="套管切换" :visible.sync="bushingVisible" :size="500"> |
| | | <el-table class="el-table" ref="bushingTable" :data="bushing" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeBushing" :row-class-name="tableRowClassName" |
| | | :current-row-key="currentKey" :row-key="record=>record.index" v-if="bushingVisible"> |
| | | <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="color" label="管色标" min-width="110px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="num2" label="标量" min-width="110px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="num3" label="测试量" min-width="90px" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </el-drawer> |
| | | <el-drawer title="样品切换" :visible.sync="sampleVisible" :size="500"> |
| | | <el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border |
| | | highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName" |
| | |
| | | addVerifyDia: false, |
| | | verifyUser: null, |
| | | personList: [], |
| | | enumList: [] |
| | | enumList: [], |
| | | fiberOpticVisible:false, |
| | | fiberOpticTapeVisible:false, |
| | | bushingVisible:false, |
| | | fiberOpticTape:[],//光纤带列表 |
| | | fiberOptic:[],//光纤列表 |
| | | bushing:[],//套管列表 |
| | | currentFiberOpticTape:null,//当前光纤带 |
| | | currentFiberOptic:null,//当前光纤 |
| | | currentBushing:null,//当前套管 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.getTableLists(); |
| | | this.componentData.currentId = val; |
| | | this.currentKey = 1; |
| | | |
| | | // 清空光纤配置相关数据 |
| | | this.fiberOpticTape = [] |
| | | this.currentFiberOpticTape = null; |
| | | this.fiberOptic = [] |
| | | this.currentFiberOptic = null; |
| | | this.bushing = [] |
| | | this.currentBushing = null; |
| | | }) |
| | | }, |
| | | currentTable(val1, val0) { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleChangeBushing(row, column, event){ |
| | | this.currentBushing = row; |
| | | this.fiberOpticTape = [] |
| | | this.currentFiberOpticTape = null; |
| | | this.fiberOptic = [] |
| | | this.currentFiberOptic = null; |
| | | if(row.fiber&&row.fiber.length>0){ |
| | | // 直接配置光纤 |
| | | this.fiberOptic = row.fiber; |
| | | }else if(row.fibers&&row.fibers.length>0){ |
| | | // 配置光纤带后,再配置光纤 |
| | | this.fiberOpticTape = row.fibers; |
| | | } |
| | | this.bushingVisible = false; |
| | | }, |
| | | handleChangeOptic(row, column, event){ |
| | | this.currentFiberOptic = row; |
| | | this.currentFiberOptic.productList.forEach(a => { |
| | | this.param[a.id] = { |
| | | insValue: [], |
| | | comValue: [], |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | } |
| | | }) |
| | | this.getTableLists0(row) |
| | | this.fiberOpticVisible = false; |
| | | this.currentKey = row.index |
| | | }, |
| | | handleChangeTape(row, column, event){ |
| | | this.currentFiberOpticTape = row; |
| | | this.param = {} |
| | | this.fiberOptic = [] |
| | | this.currentFiberOptic = null; |
| | | this.currentFiberOpticTape.productList.forEach(a => { |
| | | this.param[a.id] = { |
| | | insValue: [], |
| | | comValue: [], |
| | | resValue: null, |
| | | equipValue: [], |
| | | equipName: [], |
| | | insResult: null |
| | | } |
| | | }) |
| | | this.getTableLists0(row) |
| | | if(row.fiber&&row.fiber.length>0){ |
| | | // 配置光纤 |
| | | this.fiberOptic = row.fiber; |
| | | } |
| | | this.fiberOpticTapeVisible = false; |
| | | this.currentKey = row.index |
| | | }, |
| | | handleChangeSample(row, column, event) { |
| | | this.currentSample = row; |
| | | this.param = {} |
| | | // 清空光纤配置相关数据 |
| | | this.fiberOpticTape = [] |
| | | this.currentFiberOpticTape = null; |
| | | this.fiberOptic = [] |
| | | this.currentFiberOptic = null; |
| | | this.bushing = [] |
| | | this.currentBushing = null; |
| | | |
| | | this.currentSample.insProduct.forEach(a => { |
| | | this.param[a.id] = { |
| | | insValue: [], |
| | |
| | | insResult: null |
| | | } |
| | | }) |
| | | let bushing = this.currentSample.insProduct.bushing |
| | | if(bushing&&bushing.length>0){ |
| | | this.bushing = bushing |
| | | } |
| | | // this.handleTableData() |
| | | this.getTableLists(); |
| | | this.sampleVisible = false; |
| | |
| | | this.handleTableData() |
| | | } |
| | | }, |
| | | // 光纤配置相关模板table列表 |
| | | getTableLists0(obj){ |
| | | const mySet1 = new Set(); |
| | | this.tableLists = obj.productList.filter(m => { |
| | | let num0 = mySet1.size; |
| | | if (m.templateId != null&&m.template != null) { |
| | | mySet1.add(JSON.stringify({ |
| | | template: m.template, |
| | | templateId: m.templateId |
| | | })) |
| | | } |
| | | let num1 = mySet1.size; |
| | | if (num1 > num0) { |
| | | return m |
| | | } |
| | | }); |
| | | if (this.tableLists && this.tableLists.length > 0) { |
| | | this.tableList = null; |
| | | this.tableList = [this.tableLists[0]] |
| | | this.currentTable = this.tableLists[0].templateId; |
| | | this.handleTableData() |
| | | } |
| | | }, |
| | | handleTableData() { |
| | | this.excelMethodList = [] |
| | | this.widthList = this.tableList[0].style.columnlen; |