|
|
@ -29,25 +29,25 @@ |
|
|
|
</div> |
|
|
|
<div class="frame-item item-line"> |
|
|
|
<span>列</span> |
|
|
|
<el-select v-model="childData[index].colNum" class="filter-item" style="width: 86px;" @change="selectChange(index)"> |
|
|
|
<el-select v-model="childData[index].colNum" class="filter-item" style="width: 86px;" @change="selectChange(index,'col')"> |
|
|
|
<el-option v-for="item in columnOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="frame-item item-line"> |
|
|
|
<span>节</span> |
|
|
|
<el-select v-model="childData[index].sectionNum" class="filter-item" style="width: 86px;" @change="selectChange(index)"> |
|
|
|
<el-select v-model="childData[index].sectionNum" class="filter-item" style="width: 86px;" :disabled="childData[index].colNum === ''" @change="selectChange(index)"> |
|
|
|
<el-option v-for="item in partOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="frame-item item-line"> |
|
|
|
<span>层</span> |
|
|
|
<el-select v-model="childData[index].levelNum" class="filter-item" style="width: 86px;" @change="selectChange(index)"> |
|
|
|
<el-select v-model="childData[index].levelNum" class="filter-item" style="width: 86px;" :disabled="childData[index].colNum === ''||childData[index].sectionNum === ''" @change="selectChange(index)"> |
|
|
|
<el-option v-for="item in rowOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="frame-item item-line"> |
|
|
|
<span>方向</span> |
|
|
|
<el-select v-model="childData[index].direction" class="filter-item" style="width: 86px;" @change="selectChange(index)"> |
|
|
|
<el-select v-model="childData[index].direction" class="filter-item" style="width: 86px;" :disabled="childData[index].colNum === ''||childData[index].sectionNum === ''||childData[index].levelNum === ''" @change="selectChange(index)"> |
|
|
|
<el-option v-for="item in directionOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
@ -151,6 +151,7 @@ export default { |
|
|
|
columnOptions: [], // 密集架-列,回转柜-列 |
|
|
|
partOptions: [], // 密集架-节 |
|
|
|
rowOptions: [], // 密集架-层,回转柜-层 |
|
|
|
rowNo: 1, |
|
|
|
directionOptions: [ |
|
|
|
{ value: '1', label: '左边' }, |
|
|
|
{ value: '2', label: '右边' } |
|
|
@ -197,6 +198,7 @@ export default { |
|
|
|
this.partOptions.push({ value: i, label: i }) |
|
|
|
} |
|
|
|
this.rowOptions.splice(0, this.rowOptions.length) |
|
|
|
this.rowNo = res.rowNo |
|
|
|
for (let i = 1; i <= res.rowNo; i++) { |
|
|
|
this.rowOptions.push({ value: i, label: i }) |
|
|
|
} |
|
|
@ -230,8 +232,26 @@ export default { |
|
|
|
this.singleVisible = true |
|
|
|
}, |
|
|
|
// 校验 |
|
|
|
async selectChange(index) { |
|
|
|
async selectChange(index, position) { |
|
|
|
const obj = this.childData[index] |
|
|
|
// 密集架因业务原因,最后2列(9,10列)为战备柜,且层数只有5层 |
|
|
|
// if (this.deviceType === 1 && position === 'col') { |
|
|
|
// if (obj.colNum > 8) { |
|
|
|
// if (obj.levelNum > 5) { |
|
|
|
// this.childData[index].levelNum = '' |
|
|
|
// obj.levelNum = '' |
|
|
|
// } |
|
|
|
// this.rowOptions.splice(0, this.rowOptions.length) |
|
|
|
// for (let i = 1; i <= 5; i++) { |
|
|
|
// this.rowOptions.push({ value: i, label: i }) |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// this.rowOptions.splice(0, this.rowOptions.length) |
|
|
|
// for (let i = 1; i <= this.rowNo; i++) { |
|
|
|
// this.rowOptions.push({ value: i, label: i }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// let bool = 0 |
|
|
|
// for (const key in obj) { // 校验是否全部选择 |
|
|
|
// if (!obj[key]) { |
|
|
|