|
|
@ -412,6 +412,29 @@ const typeMap = { |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
const gzztMap = { |
|
|
|
"01": '常亮', |
|
|
|
"02": '流水', |
|
|
|
"03": '闪烁', |
|
|
|
"04": '关闭', |
|
|
|
} |
|
|
|
const gzmsMap = { |
|
|
|
"SETMD0": "激光关闭", |
|
|
|
"SETMD1": "常亮模式", |
|
|
|
"SETMD2": "间隔100ms闪烁模式", |
|
|
|
"SETMD3": "间隔200ms闪烁模式", |
|
|
|
"SETMD4": "间隔500ms闪烁模式", |
|
|
|
"SETMD5": "2次闪烁模式", |
|
|
|
"SETMD6": "SOS模式", |
|
|
|
"SETMD7": "自定义模式1", |
|
|
|
"SETMD8": "自定义模式2", |
|
|
|
"SETMD9": "自定义模式3", |
|
|
|
} |
|
|
|
const controlModelMap = { |
|
|
|
"00": '手动模式', |
|
|
|
"01": '自动模式', |
|
|
|
"02": '万年历', |
|
|
|
} |
|
|
|
export default { |
|
|
|
name: 'addAndEditDialog', |
|
|
|
components: { |
|
|
@ -599,7 +622,15 @@ export default { |
|
|
|
let action = {}; |
|
|
|
if (it.otherConfig) { |
|
|
|
let config = JSON.parse(it.otherConfig); |
|
|
|
action = { ...it, ...config, qbb: (config?.dcInfoBoardTemplate?.content || '') }; |
|
|
|
let qbb = '' |
|
|
|
if (config.id) { |
|
|
|
qbb = config.content; |
|
|
|
config = { dcInfoBoardTemplate: config }; |
|
|
|
} |
|
|
|
// if (config.state) { |
|
|
|
// config.gzms = config.state |
|
|
|
// } |
|
|
|
action = { ...it, ...config, qbb: qbb }; |
|
|
|
} |
|
|
|
if (it.deviceList) { |
|
|
|
action.deviceList = it.deviceList.split(',').map(str => Number(str)); |
|
|
@ -653,12 +684,16 @@ export default { |
|
|
|
if (it.controlModel) { |
|
|
|
let other = { |
|
|
|
controlModel: it.controlModel, |
|
|
|
controlModelName: controlModelMap[it.controlModel], |
|
|
|
state: it.state, |
|
|
|
name: gzztMap[it.state] |
|
|
|
} |
|
|
|
if (it.time && it?.time[0]) { |
|
|
|
other = { |
|
|
|
controlModel: it.controlModel, |
|
|
|
controlModelName: controlModelMap[it.controlModel], |
|
|
|
state: it.state, |
|
|
|
name: gzztMap[it.state], |
|
|
|
startTime: it.time[0], |
|
|
|
endTime: it.time[1] |
|
|
|
} |
|
|
@ -668,6 +703,7 @@ export default { |
|
|
|
if (it.gzms) { |
|
|
|
data.otherConfig = JSON.stringify({ |
|
|
|
state: it.gzms, |
|
|
|
name: gzmsMap[it.gzms], |
|
|
|
operationDuration: it.operationDuration, |
|
|
|
}) |
|
|
|
} |
|
|
@ -678,8 +714,8 @@ export default { |
|
|
|
if (valid) { |
|
|
|
// this.submitting = false; |
|
|
|
let secondFormTable = this.$refs['secondFormTable'].tableData || []; |
|
|
|
// console.log('12', secondFormTable); |
|
|
|
let thirdFormTable = this.$refs['thirdFormTable'].tableData || []; |
|
|
|
console.log('12', thirdFormTable); |
|
|
|
let dcArr = []; |
|
|
|
let id = ''; |
|
|
|
if (this.dialogType == 2) id = this.planId; |
|
|
|