|
|
@ -356,7 +356,7 @@ export default {
|
|
|
|
this.$router.replace('/pages/station/list')
|
|
|
|
this.$router.replace('/pages/station/list')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
initData() {
|
|
|
|
initData() {
|
|
|
|
|
|
|
|
console.log(this.stationData)
|
|
|
|
const hasLocalData = this.selectStations.length
|
|
|
|
const hasLocalData = this.selectStations.length
|
|
|
|
const stationId = hasLocalData ? this.selectStations[0] : this.$route.query.id
|
|
|
|
const stationId = hasLocalData ? this.selectStations[0] : this.$route.query.id
|
|
|
|
const station = this.stationData.filter(v => {
|
|
|
|
const station = this.stationData.filter(v => {
|
|
|
@ -419,18 +419,27 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// this.itemNum = eightNumArr.includes(this.selectStations[0]) ? 8 : sixteenNumArr.includes(this.selectStations[1]) ? 16 : 12
|
|
|
|
// this.itemNum = eightNumArr.includes(this.selectStations[0]) ? 8 : sixteenNumArr.includes(this.selectStations[1]) ? 16 : 12
|
|
|
|
this.itemNum = itemNum
|
|
|
|
this.itemNum = itemNum
|
|
|
|
// width: 183px;
|
|
|
|
const SELF_ARR = ['35', '36']
|
|
|
|
const eightNumArr = ['1052758023'] // 塞纳8个组串
|
|
|
|
const B9Arr = ['1052758018', '31']
|
|
|
|
const sixteenNumArr = ['30'] // 16个组串
|
|
|
|
const isB9 = B9Arr[0] === this.selectStations[0] && B9Arr[1]=== this.selectStations[1]
|
|
|
|
// this.itemNum = eightNumArr.includes(this.selectStations[0]) ? 8 : sixteenNumArr.includes(this.selectStations[1]) ? 16 : 12
|
|
|
|
const isB15OrB17 = SELF_ARR.includes(this.selectStations[1])
|
|
|
|
|
|
|
|
// 伟创B9 3,6,9 设置为655。35 未接入
|
|
|
|
this.secondList = Array.from(Array(maxNum)).map((v, inde) => {
|
|
|
|
this.secondList = Array.from(Array(maxNum)).map((v, inde) => {
|
|
|
|
const index = inde + 1
|
|
|
|
const index = inde + 1
|
|
|
|
const cList = Array.from(Array(this.itemNum)).map((cv, cIndex) => {
|
|
|
|
const cList = Array.from(Array(this.itemNum)).map((cv, cIndex) => {
|
|
|
|
const _cIndex = cIndex + 1
|
|
|
|
const _cIndex = cIndex + 1
|
|
|
|
const num = item[`electricQuantity${index}_${_cIndex}`].split('A')[0]
|
|
|
|
let text = item[`electricQuantity${index}_${_cIndex}`]
|
|
|
|
|
|
|
|
text = text.split('A')[0] || 0
|
|
|
|
|
|
|
|
const isOffLine = +text <= 0.4
|
|
|
|
|
|
|
|
let num = isB9 && [3, 6, 9].includes(_cIndex) && isOffLine ? '655.35' : text
|
|
|
|
|
|
|
|
num = isB15OrB17 && [1,5,9,13].includes(_cIndex) && isOffLine ? '655.35' : num
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果是0.0 替换为655.35
|
|
|
|
|
|
|
|
// num = (+num) === 0 ? '655.35' : num
|
|
|
|
const reg = /^65/g
|
|
|
|
const reg = /^65/g
|
|
|
|
const is65535 = reg.test(num)
|
|
|
|
const is65535 = reg.test(num)
|
|
|
|
const _num = is65535 ? num.split('.').join('') : num
|
|
|
|
const _num = is65535 ? num.split('.').join('') : +num
|
|
|
|
|
|
|
|
// console.log(num)
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
id: '',
|
|
|
|
id: '',
|
|
|
|
electricQuantity: parseFloat(_num),
|
|
|
|
electricQuantity: parseFloat(_num),
|
|
|
|