| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionItemClass" v-if="PROJECT === '装备电缆'" label="检验项分类" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '装备电缆'" label="检验项分类(EN)" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="sonLaboratory" label="子实验室" min-width="130" show-overflow-tooltip :filters="filters" |
| | | :filter-method="filterHandler"></el-table-column> |
| | | <el-table-column prop="methodS" label="试验方法" min-width="120" show-overflow-tooltip> |
| | |
| | | </div> |
| | | <div class="temperatureList"> |
| | | <div class="temperatureListTitle"> |
| | | <span>温度点集合(请按照顺序填写,20℃必须为首位)</span> |
| | | <span>温度点集合</span> |
| | | <span> |
| | | <el-button type="primary" size="mini" @click="addTemperatureData">新增</el-button> |
| | | <el-button size="mini" @click="deleteTemperatureData">删除</el-button> |
| | |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanSpliceData">取消</el-button> |
| | | <el-button type="primary" @click="spliceData">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :title="temperatureTitle" :visible.sync="temperatureShow" width="260px" :before-close="temperatureShowClose" :show-close="false"> |
| | | <div> |
| | | <div v-if="isShowInput" style="margin-bottom: 6px"> |
| | | <span>循环次数:</span> |
| | | <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> |
| | | </div> |
| | | <el-checkbox-group v-model="temperatureTest" @change="handleTemperatureTestChange" style="display: flex;flex-direction: column;"> |
| | | <el-checkbox v-for="item in temperatureList" :label="item" :key="item" style="margin-bottom: 6px">{{item}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cleanTemperatureTest">取消</el-button> |
| | | <el-button type="primary" @click="spliceTemperatureTest">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | {label: '=', value: '='}, |
| | | {label: '≥', value: '≥'}, |
| | | {label: '>', value: '>'}, |
| | | ] |
| | | ], |
| | | temperatureShow: false, // 温升试验检验项弹框 |
| | | temperatureTest: [], |
| | | temperatureList: [], |
| | | temperatureEngList: [], |
| | | temperatureTitle: '', |
| | | temperatureTestNum: '', |
| | | isShowInput: false, |
| | | temId: '' |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | throw this.$message.error('请填写完整数据') |
| | | } |
| | | }) |
| | | if (!o.temperatureData.some(item => item.temperaturePoint == '20')) { |
| | | throw this.$message.error(`${o.value + '波长没有配置20℃温度点'}`) |
| | | } |
| | | }) |
| | | let entrustTime = this.circulateForm.entrustTime |
| | | let entrustNum = this.circulateForm.entrustNum |
| | |
| | | o.temperatureData.unshift({temperaturePoint: 20}) |
| | | o.temperatureData.forEach(t => { |
| | | if (!t.askSymbol) { |
| | | const askObj = t.temperaturePoint + '℃' + ',' + o.value + ',' + null |
| | | const askObj = t.temperaturePoint + '℃(常温)' + ',' + o.value + ',' + null |
| | | askArr.push(askObj) |
| | | } else { |
| | | const askObj = t.temperaturePoint + '℃' + ',' + o.value + ',' + t.askSymbol + t.askNum |
| | |
| | | }) |
| | | temperaturePointList = Array.from(new Set(temperaturePointList)) |
| | | temperaturePointList2 = Array.from(new Set(temperaturePointList2)) |
| | | temperaturePointList2.unshift(20 + '℃') |
| | | temperaturePointList2.unshift(20 + '℃(常温)') |
| | | let additionArr = [] |
| | | askNum.forEach(a => { |
| | | additionArr.push(temperaturePointList.join(',') + a) |
| | |
| | | item.tell = tell |
| | | } |
| | | }) |
| | | this.circulateShow = false |
| | | }, |
| | | spliceTemperatureTest () { |
| | | if (this.temperatureTest.length === 0) { |
| | | this.$message.error('请选择') |
| | | return |
| | | } |
| | | let askStr = '' |
| | | let askArr1 = [] |
| | | let askArr2 = '' |
| | | let ask = '' |
| | | let index = '' |
| | | this.temperatureTest.map(val => { |
| | | index = this.temperatureEngList.findIndex(item => item.label === val) |
| | | if (index > -1) { |
| | | askStr = val + ',' + this.temperatureEngList[index].value |
| | | } |
| | | askArr1.push(askStr) |
| | | }) |
| | | |
| | | if (this.temperatureTitle === '温升试验要求填写') { |
| | | askArr2 = askArr1.join(';') |
| | | ask = askArr2 + ';1' |
| | | } else { |
| | | if (!this.temperatureTestNum) { |
| | | this.$message.error('请填写循环次数') |
| | | return |
| | | } |
| | | askArr2 = askArr1.join(';') |
| | | ask = askArr2 + ';' + this.temperatureTestNum |
| | | } |
| | | this.productList.forEach(item => { |
| | | if (item.id === this.temId) { |
| | | item.ask = ask |
| | | item.tell = ask |
| | | } |
| | | }) |
| | | console.log('ask---', ask) |
| | | console.log('tell---', tell) |
| | | this.temperatureShow = false |
| | | }, |
| | | temperatureShowClose () { |
| | | if (this.temperatureTitle === '热循环要求填写' && !this.temperatureTestNum) { |
| | | this.$message.error('请填写循环次数') |
| | | return |
| | | } |
| | | if (this.temperatureTest.length === 0) { |
| | | this.$message.error('请选择') |
| | | return |
| | | } |
| | | this.spliceTemperatureTest() |
| | | }, |
| | | cleanTemperatureTest () { |
| | | this.temperatureTest = [] |
| | | this.temperatureTestNum = '' |
| | | this.temperatureShow = false |
| | | }, |
| | | cleanSpliceData () { |
| | | this.circulateForm.entrustNum = null |
| | | this.circulateForm.entrustTime = null |
| | | this.circulateForm.entrustPoint = null |
| | | this.opticalProjectList = [] |
| | | this.$refs.multipleTable.clearSelection() |
| | | this.temperatureData = [] |
| | | this.circulateShow = false |
| | | }, |
| | | beforeCirculateShowClose () { |
| | | if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) { |
| | | this.$message.error('请填写完整数据') |
| | | return |
| | | } |
| | | let temperaturePoint1 = JSON.parse(JSON.stringify(this.temperatureData)) |
| | | temperaturePoint1.forEach(t => { |
| | | if (!t.temperaturePoint || !t.askSymbol || !t.askNum) { |
| | | throw this.$message.error('请填写完整数据') |
| | | if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) { |
| | | this.$message.error('请填写完整数据') |
| | | return |
| | | } |
| | | }) |
| | | // 拼接要求值ask |
| | | const opticalProjectList = JSON.parse(JSON.stringify(this.opticalProjectList)) |
| | | opticalProjectList.forEach(o => { |
| | | o.temperatureData.forEach(t => { |
| | | if (!t.temperaturePoint || !t.askSymbol || !t.askNum) { |
| | | throw this.$message.error('请填写完整数据') |
| | | } |
| | | }) |
| | | if (!o.temperatureData.some(item => item.temperaturePoint == '20')) { |
| | | throw this.$message.error(`${o.value + '波长没有配置20℃温度点'}`) |
| | | } |
| | | }) |
| | | this.spliceData() |
| | | }, |
| | | |
| | | handleTemperatureTestChange (value) { |
| | | console.log('value---', value) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.opticalProjectList = val; |
| | |
| | | } else if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 0) { |
| | | this.circulateShow = false; |
| | | } |
| | | if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 1) { |
| | | console.log('row---', row) |
| | | this.temperatureTitle = `${row.inspectionItem}要求填写` |
| | | this.isShowInput = row.inspectionItem === '热循环' |
| | | this.temId = row.id |
| | | this.temperatureShow = true; |
| | | return |
| | | } else if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 0) { |
| | | this.temperatureShow = false; |
| | | } |
| | | this.getProNum() |
| | | }, |
| | | searchProject () { |
| | |
| | | }, 200) |
| | | }) |
| | | this.searchProject() |
| | | this.searchTemList() |
| | | }, |
| | | searchTemList () { |
| | | this.temperatureList = [] |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "电力温度循环检验" |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | this.temperatureEngList = res.data |
| | | res.data.forEach(item => { |
| | | this.temperatureList.push(item.label) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | changeModel() { |
| | | this.sampleList.forEach(a => { |
| | |
| | | } |
| | | }, |
| | | handleAll(e) { |
| | | console.log('e---', e) |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | m.state = 1 |
| | | if(e.find(a=>a.id == m.id)){ |
| | | m.state = 1 |
| | | } |
| | | return m |
| | | }) |
| | | } else { |
| | |
| | | this.$refs.productTable.clearSelection() |
| | | return |
| | | } |
| | | const select = this.selectTree.split(' - ') |
| | | if (p.inspectionItem === '温度循环' && select[2] === '光缆' && p.state === 1) { |
| | | this.circulateShow = true; |
| | | return |
| | | } else if (p.inspectionItem === '温度循环' && select[2] === '光缆' && p.state === 0) { |
| | | this.circulateShow = false; |
| | | } |
| | | if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 1) { |
| | | console.log('p---', p) |
| | | this.temperatureTitle = `${p.inspectionItem}要求填写` |
| | | this.isShowInput = p.inspectionItem === '热循环' |
| | | this.temId = p.id |
| | | this.temperatureShow = true; |
| | | return |
| | | } else if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 0) { |
| | | this.temperatureShow = false; |
| | | } |
| | | /* if (p.ask.includes('RTS')&&p.state === 1) { |
| | | p.rts = '' |
| | | this.bsm3Val = '' |