add:照明系统修改

This commit is contained in:
chenpingsen
2024-07-24 13:46:24 +08:00
parent 7dadb22181
commit 84191fe301
4 changed files with 109 additions and 229 deletions

View File

@@ -64,7 +64,7 @@
:data-source="transferData"
show-search
:filter-option="filterOption"
:render="(item) => item.title"
:render="(item: any) => item.title"
@change="handleChange"
:style="{ color: 'rgba(255,255,255,1)' }"
@search="handleSearch"
@@ -106,14 +106,14 @@ const getTable = () => {
}
// 删除表格中的计划
const deletePlan = (id: String) => {
http.delete(lightingManage.deletePlan, [id]).then(res => {
http.delete(lightingManage.deletePlan, [id]).then(() => {
message.success('操作成功')
getTable()
})
}
// 重启表格中的计划
const restartPlan = (id: String) => {
http.post(lightingManage.restartPlan, { planId: id }).then(res => {
http.post(lightingManage.restartPlan, { planId: id }).then(() => {
message.success('操作成功')
getTable()
})
@@ -128,7 +128,6 @@ const addModal = () => {
addVisible.value = true;
};
// 穿梭框部分 =======================================================
// 穿梭框数据
@@ -137,7 +136,7 @@ const transferData = ref([]) as any;
const getLeftPlan = () => {
http.get(lightingManage.getLeftPlan, {}).then(res => {
let arr = []
res.data.forEach(item => {
res.data.forEach((item: any) => {
arr.push({
key: item.id,
title: item.planName
@@ -160,7 +159,7 @@ const sendPlan = () => {
if (targetKeys.value.length < 1) {
return message.info('没有选择任何计划');
}
http.post(lightingManage.submitLeftPlan, targetKeys.value).then(res => {
http.post(lightingManage.submitLeftPlan, targetKeys.value).then(() => {
message.success('添加成功')
// 如果发送成功,则刷新表格
getTable()