| | |
| | | line-height: 24px; |
| | | margin-top: 5px; |
| | | } |
| | | .circulateTable { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | .opticalProject { |
| | | width: 38%; |
| | | } |
| | | .temperatureList { |
| | | width: 60%; |
| | | .temperatureListTitle { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | line-height: 30px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | .ins_order_add .el-input-group__append, |
| | |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>检验项</span> |
| | | <el-input |
| | | v-if="active==1" |
| | | v-model="inspectionItem" |
| | | @input="searchFilterList" |
| | | size="mini" |
| | |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>检验项子项</span> |
| | | <el-input |
| | | v-if="active==1" |
| | | v-model="inspectionItemSubclass" |
| | | @input="searchFilterList" |
| | | size="mini" |
| | |
| | | <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px"> |
| | | <span>试验方法</span> |
| | | <el-input |
| | | v-if="active==1" |
| | | v-model="methodS" |
| | | @input="searchFilterList" |
| | | size="mini" |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="温度循环要求填写" :visible.sync="circulateShow" width="800px" :show-close="false"> |
| | | <el-dialog title="温度循环要求填写" :visible.sync="circulateShow" width="900px" :before-close="beforeCirculateShowClose" :show-close="false"> |
| | | <div class="search" style="display: flex;background: transparent;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">保温时间:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="circulateForm.entrustCode" size="small" placeholder=""></el-input> |
| | | <el-input v-model="circulateForm.entrustTime" size="small" placeholder="" type="number"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">循环次数:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="circulateForm.entrustCode" size="small" placeholder=""></el-input> |
| | | <el-input v-model="circulateForm.entrustNum" size="small" placeholder="" type="number"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">温度点:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="circulateForm.entrustCode" size="small" placeholder=""></el-input> |
| | | <el-input @blur="changeTemperatureData" v-model="circulateForm.entrustPoint" size="small" placeholder="" type="number"></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="circulateTable"> |
| | | <div class="opticalProject"> |
| | | <div style="line-height: 30px;">光纤项目</div> |
| | | <el-divider></el-divider> |
| | | <div> |
| | | <el-table |
| | | ref="multipleTable" |
| | | border |
| | | :header-cell-style="{'text-align':'center'}" |
| | | :cell-style="{'text-align':'center'}" |
| | | :data="opticalProject" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column prop="value" label="光纤项目" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="temperatureList"> |
| | | <div class="temperatureListTitle"> |
| | | <span>温度点集合(请按照顺序填写,20℃必须为首位)</span> |
| | | <span> |
| | | <el-button type="primary" size="mini" @click="addTemperatureData">新增</el-button> |
| | | <el-button size="mini" @click="deleteTemperatureData">删除</el-button> |
| | | </span> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <el-table |
| | | :data="temperatureData" |
| | | border |
| | | :header-cell-style="{'text-align':'center'}" |
| | | :cell-style="{'text-align':'center'}" |
| | | style="width: 100%"> |
| | | <el-table-column prop="date" label="温度点(℃)" width="120px"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.temperaturePoint" clearable placeholder="请输入"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="要求(dB/Km)"> |
| | | <template slot-scope="scope"> |
| | | <span>x</span> |
| | | <el-select v-model="scope.row.askSymbol" placeholder="请选择" size="small" style="width: 120px"> |
| | | <el-option v-for="item in temperatureDataList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-input size="small" v-model="scope.row.askNum" clearable placeholder="请输入" style="width: 120px"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="spliceData">保存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import equipConfig from './equip-config.vue' |
| | | import cableConfig from './cable-config.vue' |
| | | import Vue from 'vue' |
| | | import {iuCharts} from "../../../util/echarts"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | productList0: [], |
| | | bsm1DiaList: [], |
| | | productIds: [], |
| | | productListSelected: [], |
| | | getProductLoad: false, |
| | | saveLoad: false, |
| | | templateDia: false, |
| | |
| | | inspectionItemSubclass:null, |
| | | methodS:null, |
| | | circulateShow:false, |
| | | circulateForm:{}, |
| | | isBsm2Val2:false |
| | | circulateForm:{ |
| | | entrustTime: '', |
| | | entrustNum: '', |
| | | entrustPoint: '' |
| | | }, |
| | | isBsm2Val2:false, |
| | | opticalProject: [], // 温度循环弹框光纤项目列表 |
| | | opticalProjectList: [], // 温度循环弹框光纤项目选中的数组 |
| | | temperatureData: [], // 温度循环弹框温度点集合列表 |
| | | temperatureDataList: [ |
| | | {label: '<', value: '<'}, |
| | | {label: '≤', value: '≤'}, |
| | | {label: '>', value: '>'}, |
| | | {label: '≥', value: '≥'}, |
| | | {label: '=', value: '='}, |
| | | ] |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | spliceData () { |
| | | if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) { |
| | | this.$message.error('请填写完整数据') |
| | | return |
| | | } |
| | | |
| | | const opticalProjectList = JSON.parse(JSON.stringify(this.opticalProjectList)) |
| | | let entrustTime = this.circulateForm.entrustTime |
| | | let entrustNum = this.circulateForm.entrustNum |
| | | let temperaturePoint1 = JSON.parse(JSON.stringify(this.temperatureData)) |
| | | temperaturePoint1.forEach(t => { |
| | | if (!t.temperaturePoint || !t.askSymbol || !t.askNum) { |
| | | throw this.$message.error('请填写完整数据') |
| | | } |
| | | }) |
| | | let temperaturePoint = JSON.parse(JSON.stringify(this.temperatureData)) |
| | | temperaturePoint.unshift({temperaturePoint: 20}) |
| | | let askArr = [] |
| | | let opticalProjectArr = [] |
| | | // 拼接要求值ask |
| | | opticalProjectList.forEach(o => { |
| | | opticalProjectArr.push(o.value) |
| | | temperaturePoint.forEach(t => { |
| | | if (!t.askSymbol) { |
| | | const askObj = t.temperaturePoint + '℃' + ',' + o.value + ',' + null |
| | | askArr.push(askObj) |
| | | } else { |
| | | const askObj = t.temperaturePoint + '℃' + ',' + o.value + ',' + t.askSymbol + t.askNum |
| | | askArr.push(askObj) |
| | | } |
| | | }) |
| | | }) |
| | | askArr.push(this.circulateForm.entrustNum) |
| | | const ask = askArr.join(';') |
| | | // 拼接要求描述tell |
| | | let askNum = [] |
| | | let temperaturePointList = [] |
| | | let temperaturePointList2 = [] |
| | | entrustTime = entrustTime + 'h' |
| | | entrustNum = entrustNum + '次' |
| | | temperaturePoint.forEach(t => { |
| | | t.temperaturePoint = t.temperaturePoint + '℃' |
| | | temperaturePointList.push(t.temperaturePoint) |
| | | }) |
| | | temperaturePoint1.forEach(t => { |
| | | t.temperaturePoint = t.temperaturePoint + '℃' |
| | | askNum.push(t.askSymbol + t.askNum + 'dB/Km') |
| | | temperaturePointList2.push(t.temperaturePoint) |
| | | }) |
| | | let additionArr = [] |
| | | askNum.forEach(a => { |
| | | additionArr.push(temperaturePointList2.join(',') + a) |
| | | }) |
| | | temperaturePointList2.unshift(20 + '℃') |
| | | const tell = '温度范围:' + temperaturePointList2.join(',') + ';' + '保温时间:' + entrustTime + ';' + '循环次数:' |
| | | + entrustNum + ';' + '光纤(' + opticalProjectArr.join(',') + ')' + '附加衰减绝对值:' + additionArr.join(';') |
| | | this.productList.forEach(item => { |
| | | if (item.inspectionItem === '温度循环') { |
| | | item.ask = ask |
| | | item.tell = tell |
| | | } |
| | | }) |
| | | console.log('ask---', ask) |
| | | console.log('tell---', tell) |
| | | 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('请填写完整数据') |
| | | } |
| | | }) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.opticalProjectList = val; |
| | | }, |
| | | addTemperatureData () { |
| | | const obj = {} |
| | | this.temperatureData.push(obj) |
| | | }, |
| | | deleteTemperatureData () { |
| | | if (this.temperatureData.length > 0) { |
| | | this.temperatureData = this.temperatureData.slice(0,-1) |
| | | } |
| | | }, |
| | | changeTemperatureData () { |
| | | const length = this.temperatureData.length |
| | | const entrustPoint = Number(this.circulateForm.entrustPoint) |
| | | if (entrustPoint > length) { |
| | | for (let i = 0; i < (entrustPoint - length); i++) { |
| | | const obj = {} |
| | | this.temperatureData.push(obj) |
| | | } |
| | | } else if (entrustPoint < length) { |
| | | const deleteNum = length - entrustPoint |
| | | this.temperatureData = this.temperatureData.slice(0,-deleteNum) |
| | | } |
| | | }, |
| | | searchFilterList () { |
| | | const vtw = { |
| | | inspectionItem: this.inspectionItem, // 检验项 |
| | |
| | | } else if (!this.sampleList.every(m => m.standardMethodListId)) { |
| | | this.$message.error('请选择检验标准') |
| | | } else { |
| | | const select = this.selectTree.split(' - ') |
| | | const productListSelected = this.productListSelected.some(item => item.inspectionItem === '温度循环') |
| | | let isHaveBushing = '' |
| | | this.sampleList.forEach(item => { |
| | | if (!item.bushing || item.bushing.length === 0) { |
| | | isHaveBushing = false |
| | | } |
| | | }) |
| | | console.log('isHaveBushing===', isHaveBushing) |
| | | if (productListSelected && select[2] === '光缆' && isHaveBushing === false) { |
| | | this.$message.error('光缆温度循环项目必须进行光纤配置') |
| | | return |
| | | } |
| | | let sampleList = this.HaveJson(this.sampleList) |
| | | let projectNum = this.totalArr.filter(a => a.state == 1).length |
| | | if(projectNum==0){ |
| | |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | selectProduct(val) { |
| | | this.productListSelected = val |
| | | this.productIds = [] |
| | | val.forEach(a => { |
| | | this.productIds.push(a.id) |
| | |
| | | } |
| | | return item |
| | | }) |
| | | if (row.inspectionItem === '温度循环') { |
| | | const select = this.selectTree.split(' - ') |
| | | if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 1) { |
| | | this.circulateShow = true; |
| | | return |
| | | } else if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 0) { |
| | | this.circulateShow = false; |
| | | } |
| | | this.getProNum() |
| | | }, |
| | | searchProject () { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "光纤项目" |
| | | }).then(res => { |
| | | this.opticalProject = res.data |
| | | }) |
| | | }, |
| | | permute(nums) { |
| | | const result = []; |
| | |
| | | }) |
| | | }, 200) |
| | | }) |
| | | this.searchProject() |
| | | }, |
| | | changeModel() { |
| | | this.sampleList.forEach(a => { |
| | |
| | | } |
| | | }, |
| | | handleAll(e) { |
| | | console.log('全选') |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | m.state = 1 |