|
|
@ -840,8 +840,6 @@ export default { |
|
|
|
if (res.code === 200) { |
|
|
|
if (res.code === 200) { |
|
|
|
let handleList = res.rows; |
|
|
|
let handleList = res.rows; |
|
|
|
this.delayList = []; |
|
|
|
this.delayList = []; |
|
|
|
// 定义一个数组来映射数字到中文 |
|
|
|
|
|
|
|
const chineseNumbers = ["一", "二", "三", "四", "五", "六", "日"]; |
|
|
|
|
|
|
|
handleList.forEach((element, index) => { |
|
|
|
handleList.forEach((element, index) => { |
|
|
|
if (element.values && element.values.length > 0) { |
|
|
|
if (element.values && element.values.length > 0) { |
|
|
|
// 初始化一个空对象来存储非蝶阀处理后的结果 |
|
|
|
// 初始化一个空对象来存储非蝶阀处理后的结果 |
|
|
@ -853,31 +851,29 @@ export default { |
|
|
|
// console.log("定时${index}开_时", `定时${index}开_时`); |
|
|
|
// console.log("定时${index}开_时", `定时${index}开_时`); |
|
|
|
// console.log("child.pointName", child.pointName); |
|
|
|
// console.log("child.pointName", child.pointName); |
|
|
|
if (child.pointName) { |
|
|
|
if (child.pointName) { |
|
|
|
// 获取对应的中文数字 |
|
|
|
|
|
|
|
const chineseNumber = chineseNumbers[index]; |
|
|
|
|
|
|
|
// 定时开机-小时 |
|
|
|
// 定时开机-小时 |
|
|
|
if (child.pointName == `星期${chineseNumber}开_时`) { |
|
|
|
if (child.pointName.includes("开_时")) { |
|
|
|
// console.log("定时开机-时·························"); |
|
|
|
// console.log("定时开机-时·························"); |
|
|
|
delayItem.delayOpenHour = child.curValue; |
|
|
|
delayItem.delayOpenHour = child.curValue; |
|
|
|
delayItem.delayOpenHourId = child.id; |
|
|
|
delayItem.delayOpenHourId = child.id; |
|
|
|
} |
|
|
|
} |
|
|
|
// 定时开机-分钟 |
|
|
|
// 定时开机-分钟 |
|
|
|
else if ( |
|
|
|
else if ( |
|
|
|
child.pointName.includes(`星期${chineseNumber}开_分`) |
|
|
|
child.pointName.includes("开_分") |
|
|
|
) { |
|
|
|
) { |
|
|
|
delayItem.delayOpenMinute = child.curValue; |
|
|
|
delayItem.delayOpenMinute = child.curValue; |
|
|
|
delayItem.delayOpenMinuteId = child.id; |
|
|
|
delayItem.delayOpenMinuteId = child.id; |
|
|
|
} |
|
|
|
} |
|
|
|
// 定时关机-小时 |
|
|
|
// 定时关机-小时 |
|
|
|
else if ( |
|
|
|
else if ( |
|
|
|
child.pointName.includes(`星期${chineseNumber}关_时`) |
|
|
|
child.pointName.includes("关_时") |
|
|
|
) { |
|
|
|
) { |
|
|
|
delayItem.delayCloseHour = child.curValue; |
|
|
|
delayItem.delayCloseHour = child.curValue; |
|
|
|
delayItem.delayCloseHourId = child.id; |
|
|
|
delayItem.delayCloseHourId = child.id; |
|
|
|
} |
|
|
|
} |
|
|
|
// 定时关机-分钟 |
|
|
|
// 定时关机-分钟 |
|
|
|
else if ( |
|
|
|
else if ( |
|
|
|
child.pointName.includes(`星期${chineseNumber}关_分`) |
|
|
|
child.pointName.includes("关_分") |
|
|
|
) { |
|
|
|
) { |
|
|
|
delayItem.delayCloseMinute = child.curValue; |
|
|
|
delayItem.delayCloseMinute = child.curValue; |
|
|
|
delayItem.delayCloseMinuteId = child.id; |
|
|
|
delayItem.delayCloseMinuteId = child.id; |
|
|
@ -944,6 +940,7 @@ export default { |
|
|
|
item[propertyName] = inputValue; |
|
|
|
item[propertyName] = inputValue; |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSwitchEnter(item, name, event) { |
|
|
|
handleSwitchEnter(item, name, event) { |
|
|
|
|
|
|
|
console.log("item",item) |
|
|
|
// 失去焦点 |
|
|
|
// 失去焦点 |
|
|
|
event.target.blur(); |
|
|
|
event.target.blur(); |
|
|
|
let id = ""; |
|
|
|
let id = ""; |
|
|
@ -987,7 +984,8 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
this.handleSwitchOperationConrol(id, value); |
|
|
|
console.log("打印id",id) |
|
|
|
|
|
|
|
// this.handleSwitchOperationConrol(id, value); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
// 用户取消操作,需要更新原来的频率 |
|
|
|
// 用户取消操作,需要更新原来的频率 |
|
|
@ -1582,7 +1580,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.highlight { |
|
|
|
.highlight { |
|
|
|
background-color: rgb(118, 134, 145) !important; /* 定义高亮的背景颜色 */ |
|
|
|
background-color: #003863 !important; /* 定义高亮的背景颜色 */ |
|
|
|
color: #ffffff !important; |
|
|
|
color: #ffffff !important; |
|
|
|
font-weight: bold; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
} |
|
|
|