| | |
| | | <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> |
| | | </template> |
| | | |
| | |
| | | {label: '=', value: '='}, |
| | | {label: '≥', value: '≥'}, |
| | | {label: '>', value: '>'}, |
| | | ] |
| | | ], |
| | | temperatureShow: false, // 温升试验检验项弹框 |
| | | temperatureTest: [], |
| | | temperatureList: [], |
| | | temperatureEngList: [], |
| | | temperatureTitle: '', |
| | | temperatureTestNum: '', |
| | | isShowInput: false, |
| | | temId: '' |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | item.tell = tell |
| | | } |
| | | }) |
| | | console.log('ask---', ask) |
| | | console.log('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) |
| | | 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.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 => { |
| | | if(e.find(a=>a.id == m.id)){ |
| | |
| | | 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 = '' |