|
@ -20,8 +20,8 @@ |
|
|
<!-- <button @click="test">测试</button> --> |
|
|
<!-- <button @click="test">测试</button> --> |
|
|
<!-- 密集架 --> |
|
|
<!-- 密集架 --> |
|
|
<ul v-if="cnName==='密集架'"> |
|
|
<ul v-if="cnName==='密集架'"> |
|
|
<li v-for="(eItem,index) in childData" :key="eItem.id" class="box"> |
|
|
|
|
|
<p class="case-name">盒名称:{{ eItem.caseName }}</p> |
|
|
|
|
|
|
|
|
<li v-for="(eItem,index) in mijiChild" :key="eItem.id" class="box"> |
|
|
|
|
|
<p class="case-name">盒名称:<el-tag v-for="item in childData" :key="item.id">{{ item.caseName }}</el-tag></p> |
|
|
<div class="frame-content head-container"> |
|
|
<div class="frame-content head-container"> |
|
|
<div class="frame-item"> |
|
|
<div class="frame-item"> |
|
|
<span>区号</span> |
|
|
<span>区号</span> |
|
@ -29,25 +29,25 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="frame-item item-line"> |
|
|
<div class="frame-item item-line"> |
|
|
<span>列</span> |
|
|
<span>列</span> |
|
|
<el-select v-model="childData[index].colNum" class="filter-item" style="width: 86px;" @change="selectChange(index,'col')"> |
|
|
|
|
|
|
|
|
<el-select v-model="mijiChild[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-option v-for="item in columnOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="frame-item item-line"> |
|
|
<div class="frame-item item-line"> |
|
|
<span>节</span> |
|
|
<span>节</span> |
|
|
<el-select v-model="childData[index].sectionNum" class="filter-item" style="width: 86px;" :disabled="childData[index].colNum === ''" @change="selectChange(index)"> |
|
|
|
|
|
|
|
|
<el-select v-model="mijiChild[index].sectionNum" class="filter-item" style="width: 86px;" :disabled="mijiChild[index].colNum === ''" @change="selectChange(index)"> |
|
|
<el-option v-for="item in partOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
<el-option v-for="item in partOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="frame-item item-line"> |
|
|
<div class="frame-item item-line"> |
|
|
<span>层</span> |
|
|
<span>层</span> |
|
|
<el-select v-model="childData[index].levelNum" class="filter-item" style="width: 86px;" :disabled="childData[index].colNum === ''||childData[index].sectionNum === ''" @change="selectChange(index)"> |
|
|
|
|
|
|
|
|
<el-select v-model="mijiChild[index].levelNum" class="filter-item" style="width: 86px;" :disabled="mijiChild[index].colNum === ''||mijiChild[index].sectionNum === ''" @change="selectChange(index)"> |
|
|
<el-option v-for="item in rowOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
<el-option v-for="item in rowOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="frame-item item-line"> |
|
|
<div class="frame-item item-line"> |
|
|
<span>方向</span> |
|
|
<span>方向</span> |
|
|
<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-select v-model="mijiChild[index].direction" class="filter-item" style="width: 86px;" :disabled="mijiChild[index].colNum === ''||mijiChild[index].sectionNum === ''||mijiChild[index].levelNum === ''" @change="selectChange(index)"> |
|
|
<el-option v-for="item in directionOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
<el-option v-for="item in directionOptions" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
@ -60,7 +60,7 @@ |
|
|
<div> |
|
|
<div> |
|
|
<p v-show="btnChecked[index]===2" class="success-msg"> |
|
|
<p v-show="btnChecked[index]===2" class="success-msg"> |
|
|
<i class="iconfont icon-tishichenggong" /> |
|
|
<i class="iconfont icon-tishichenggong" /> |
|
|
<span class="success-text">位置已核对成功,层位名称:{{ fieldNum }}区{{ childData[index].colNum }}列{{ childData[index].sectionNum }}节{{ childData[index].levelNum }}层{{ (childData[index].direction==='1'? '左边':'')||(childData[index].direction==='2'?'右边':'') }}</span> |
|
|
|
|
|
|
|
|
<span class="success-text">位置已核对成功,层位名称:{{ fieldNum }}区{{ mijiChild[index].colNum }}列{{ mijiChild[index].sectionNum }}节{{ mijiChild[index].levelNum }}层{{ (mijiChild[index].direction==='1'? '左边':'')||(mijiChild[index].direction==='2'?'右边':'') }}</span> |
|
|
</p> |
|
|
</p> |
|
|
<p v-show="btnChecked[index]===3" class="fail-msg"> |
|
|
<p v-show="btnChecked[index]===3" class="fail-msg"> |
|
|
<i class="iconfont icon-tishijinggao" /> |
|
|
<i class="iconfont icon-tishijinggao" /> |
|
@ -146,6 +146,7 @@ export default { |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
singleVisible: false, |
|
|
singleVisible: false, |
|
|
childData: [], // 档案盒信息列表 |
|
|
childData: [], // 档案盒信息列表 |
|
|
|
|
|
mijiChild: [], |
|
|
fieldNum: 1, // 柜号 |
|
|
fieldNum: 1, // 柜号 |
|
|
btnChecked: [], // 校验状态 |
|
|
btnChecked: [], // 校验状态 |
|
|
columnOptions: [], // 密集架-列,回转柜-列 |
|
|
columnOptions: [], // 密集架-列,回转柜-列 |
|
@ -170,11 +171,22 @@ export default { |
|
|
handleNodeClick(data) { |
|
|
handleNodeClick(data) { |
|
|
this.deviceId = data.id |
|
|
this.deviceId = data.id |
|
|
this.cnName = data.deviceTypeId.name |
|
|
this.cnName = data.deviceTypeId.name |
|
|
console.log(data) |
|
|
|
|
|
|
|
|
this.mijiChild.push(this.childData[0]) |
|
|
// 按钮状态 |
|
|
// 按钮状态 |
|
|
this.btnChecked = this.childArr(1) |
|
|
this.btnChecked = this.childArr(1) |
|
|
this.isOccupy = this.childArr({}) |
|
|
this.isOccupy = this.childArr({}) |
|
|
const params = { deviceInfoId: data.id } |
|
|
const params = { deviceInfoId: data.id } |
|
|
|
|
|
if (this.deviceType === 1) { |
|
|
|
|
|
// 清空上一次选择数据 |
|
|
|
|
|
for (let index = 0; index < this.mijiChild.length; index++) { |
|
|
|
|
|
this.mijiChild[index].colNum = '' |
|
|
|
|
|
this.mijiChild[index].sectionNum = '' |
|
|
|
|
|
this.mijiChild[index].levelNum = '' |
|
|
|
|
|
this.mijiChild[index].direction = '' |
|
|
|
|
|
this.mijiChild[index].cabLevel = '' |
|
|
|
|
|
this.mijiChild[index].cabCol = '' |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
// 清空上一次选择数据 |
|
|
// 清空上一次选择数据 |
|
|
for (let index = 0; index < this.childData.length; index++) { |
|
|
for (let index = 0; index < this.childData.length; index++) { |
|
|
this.childData[index].colNum = '' |
|
|
this.childData[index].colNum = '' |
|
@ -184,6 +196,8 @@ export default { |
|
|
this.childData[index].cabLevel = '' |
|
|
this.childData[index].cabLevel = '' |
|
|
this.childData[index].cabCol = '' |
|
|
this.childData[index].cabCol = '' |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 选择器 |
|
|
// 选择器 |
|
|
if (data.deviceTypeId.name === '密集架') { |
|
|
if (data.deviceTypeId.name === '密集架') { |
|
|
this.deviceType = 1 |
|
|
this.deviceType = 1 |
|
@ -223,9 +237,18 @@ export default { |
|
|
// 计算 -----删除 |
|
|
// 计算 -----删除 |
|
|
childArr(str) { |
|
|
childArr(str) { |
|
|
const arr = [] |
|
|
const arr = [] |
|
|
|
|
|
if (this.deviceType === 1) { |
|
|
|
|
|
for (let i = 0; i < this.mijiChild.length; i++) { |
|
|
|
|
|
arr.push(str) |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
for (let i = 0; i < this.childData.length; i++) { |
|
|
for (let i = 0; i < this.childData.length; i++) { |
|
|
arr.push(str) |
|
|
arr.push(str) |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// for (let i = 0; i < this.childData.length; i++) { |
|
|
|
|
|
// arr.push(str) |
|
|
|
|
|
// } |
|
|
return JSON.parse(JSON.stringify(arr)) |
|
|
return JSON.parse(JSON.stringify(arr)) |
|
|
}, |
|
|
}, |
|
|
test() { |
|
|
test() { |
|
@ -233,7 +256,12 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 校验 |
|
|
// 校验 |
|
|
async selectChange(index, position) { |
|
|
async selectChange(index, position) { |
|
|
const obj = this.childData[index] |
|
|
|
|
|
|
|
|
let obj |
|
|
|
|
|
if (this.deviceType === 1) { |
|
|
|
|
|
obj = this.mijiChild[index] |
|
|
|
|
|
} else { |
|
|
|
|
|
obj = this.childData[index] |
|
|
|
|
|
} |
|
|
// 密集架因业务原因,最后2列(9,10列)为战备柜,且层数只有5层 |
|
|
// 密集架因业务原因,最后2列(9,10列)为战备柜,且层数只有5层 |
|
|
// if (this.deviceType === 1 && position === 'col') { |
|
|
// if (this.deviceType === 1 && position === 'col') { |
|
|
// if (obj.colNum > 8) { |
|
|
// if (obj.colNum > 8) { |
|
@ -282,8 +310,15 @@ export default { |
|
|
}) |
|
|
}) |
|
|
// 按钮变化 |
|
|
// 按钮变化 |
|
|
if (res) { |
|
|
if (res) { |
|
|
|
|
|
if (this.deviceType === 1) { |
|
|
|
|
|
this.childData.forEach((item, i) => { |
|
|
|
|
|
this.isOccupy[i] = res |
|
|
|
|
|
this.btnChecked[i] = 2 |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
this.btnChecked[index] = 2 |
|
|
this.btnChecked[index] = 2 |
|
|
this.isOccupy[index] = res |
|
|
this.isOccupy[index] = res |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.btnChecked[index] = 3 |
|
|
this.btnChecked[index] = 3 |
|
|
} |
|
|
} |
|
@ -295,6 +330,7 @@ export default { |
|
|
// const caseId = this.childData.map(item => item.id) |
|
|
// const caseId = this.childData.map(item => item.id) |
|
|
this.crud.downloadLoading = true |
|
|
this.crud.downloadLoading = true |
|
|
const params = [] |
|
|
const params = [] |
|
|
|
|
|
console.log('isOccupy2', this.isOccupy) |
|
|
this.isOccupy.forEach((item, i) => { |
|
|
this.isOccupy.forEach((item, i) => { |
|
|
const obj = {} |
|
|
const obj = {} |
|
|
obj.caseId = this.childData[i].id |
|
|
obj.caseId = this.childData[i].id |
|
@ -304,6 +340,7 @@ export default { |
|
|
obj.shelfId = item.id |
|
|
obj.shelfId = item.id |
|
|
params.push(obj) |
|
|
params.push(obj) |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log('params', params) |
|
|
collect(params).then(data => { |
|
|
collect(params).then(data => { |
|
|
console.log(data, 'data') |
|
|
console.log(data, 'data') |
|
|
if (data) { |
|
|
if (data) { |
|
@ -317,6 +354,12 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleClose() { |
|
|
handleClose() { |
|
|
this.cnName = null |
|
|
this.cnName = null |
|
|
|
|
|
this.mijiChild = [] |
|
|
|
|
|
this.childData = [] |
|
|
|
|
|
this.crud.downloadLoading = false |
|
|
|
|
|
this.btnChecked = this.childArr(1) |
|
|
|
|
|
this.isOccupy = this.childArr({}) |
|
|
|
|
|
this.crud.refresh() |
|
|
}, |
|
|
}, |
|
|
open() { |
|
|
open() { |
|
|
if (this.$refs.deviceTree) { |
|
|
if (this.$refs.deviceTree) { |
|
@ -465,4 +508,8 @@ export default { |
|
|
color: #fff; |
|
|
color: #fff; |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|
} |
|
|
} |
|
|
|
|
|
.el-tag{ |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
margin-right: 4px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |