bug
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<span class="filter_label">区域</span>
|
<span class="filter_label">区域</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-17 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<uni-data-select v-model="index1" :localdata="options1"></uni-data-select>
|
<view class="filter_input">缓存货架区域</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -40,8 +40,6 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
options1: [{value: 1, text: '缓存货架区域', point: []}],
|
|
||||||
index1: '',
|
|
||||||
options2: this.generateArray('CRYHCHJ', '出入窑缓存货架'),
|
options2: this.generateArray('CRYHCHJ', '出入窑缓存货架'),
|
||||||
index2: '',
|
index2: '',
|
||||||
disabled: false
|
disabled: false
|
||||||
@@ -55,14 +53,13 @@
|
|||||||
const array = []
|
const array = []
|
||||||
for (let i = 1; i <= 136; i++) {
|
for (let i = 1; i <= 136; i++) {
|
||||||
array.push({
|
array.push({
|
||||||
value: `${prefix}${String(i).padStart(2, '0')}`,
|
value: `${prefix}${String(i).padStart(3, '0')}`,
|
||||||
text: `${suffix}${String(i).padStart(2, '0')}`
|
text: `${suffix}${String(i).padStart(3, '0')}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return array
|
return array
|
||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.index1 = ''
|
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,18 +4,18 @@
|
|||||||
<view class="zd_content">
|
<view class="zd_content">
|
||||||
<view class="zd_wrapper">
|
<view class="zd_wrapper">
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-7">
|
||||||
<span class="filter_label">区域</span>
|
<span class="filter_label">区域</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-15 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<uni-data-select v-model="index1" :localdata="options1" @change="change"></uni-data-select>
|
<view class="filter_input">压制区域</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-7">
|
||||||
<span class="filter_label">点位</span>
|
<span class="filter_label">点位</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-15 filter_select">
|
<view class="zd-col-17 filter_select">
|
||||||
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
|
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,9 +67,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
options1: [{value: 1, text: '压制区域', point: []}],
|
options2: this.generateArray(),
|
||||||
index1: '',
|
|
||||||
options2: [],
|
|
||||||
index2: '',
|
index2: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
@@ -80,23 +78,24 @@
|
|||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
},
|
},
|
||||||
created () {
|
|
||||||
let point1 = []
|
|
||||||
for (let i = 0; i < 8; i++) {
|
|
||||||
point1.push({value: `HNJ0${i+1}DJW`, text: `混碾机对接位0${i+1}`})
|
|
||||||
}
|
|
||||||
let point2 = []
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
if (i >= 9) {
|
|
||||||
point2.push({value: `YJ${i+1}XLW01`, text: `压制机${i+1}下料位01`}, {value: `YJ${i+1}XLW02`, text: `压制机${i+1}下料位02`})
|
|
||||||
} else {
|
|
||||||
point2.push({value: `YJ0${i+1}XLW01`, text: `压制机0${i+1}下料位01`}, {value: `YJ0${i+1}XLW02`, text: `压制机0${i+1}下料位02`})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.options1[0].point = point1
|
|
||||||
this.options1[1].point = point2
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
generateArray(prefix, suffix) {
|
||||||
|
const array = []
|
||||||
|
const baseText = '压制机'
|
||||||
|
const baseValue = 'YJ'
|
||||||
|
const maxMachines = 10
|
||||||
|
const maxPositions = 2
|
||||||
|
|
||||||
|
for (let machine = 1; machine <= maxMachines; machine++) {
|
||||||
|
for (let position = 1; position <= maxPositions; position++) {
|
||||||
|
array.push({
|
||||||
|
value: `${baseValue}${String(machine).padStart(2, '0')}XLW${String(position).padStart(2, '0')}`,
|
||||||
|
text: `${baseText}${String(machine).padStart(2, '0')}下料位${String(position).padStart(2, '0')}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array
|
||||||
|
},
|
||||||
change (e) {
|
change (e) {
|
||||||
this.options1.map((el, i) => {
|
this.options1.map((el, i) => {
|
||||||
if (e === i) {
|
if (e === i) {
|
||||||
@@ -105,7 +104,6 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.index1 = ''
|
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
this.val2 = ''
|
this.val2 = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user