diff --git a/psdc-ui/src/views/system/cl/index.vue b/psdc-ui/src/views/system/cl/index.vue
index 29b16a2..bcfd94d 100644
--- a/psdc-ui/src/views/system/cl/index.vue
+++ b/psdc-ui/src/views/system/cl/index.vue
@@ -23,8 +23,8 @@
-
-
+
+
@@ -57,136 +57,47 @@
-
+
-
+
-
-
-
-
-
-
-
- 步骤描述:
-
- 是否有限制条件
-
- 是
- 否
-
-
-
- 限制设备:
-
-
-
- 限制属性:
-
- 温度
- 进水温度
- 出水温度
-
- 温度数值:
-
-
-
- 全选
-
-
- {{item.deviceName}}
-
- {{control.label}}
-
-
- 开启
- 关闭
-
-
-
-
-
-
-
-
-
-
+
+
+ 步骤名称:
+
步骤描述:
-
+
是否有限制条件
-
+
是
否
-
+
限制设备:
-
+
限制属性:
-
+
温度
进水温度
出水温度
- 温度数值:
-
+ 限制值:
+
- 全选
-
-
- {{item.deviceName}}
-
- {{control.label}}
-
-
- 开启
- 关闭
-
-
-
-
-
-
-
-
-
-
- 步骤描述:
-
- 是否有限制条件
-
- 是
- 否
-
-
-
- 限制设备:
-
-
-
- 限制属性:
-
- 温度
- 进水温度
- 出水温度
-
- 温度数值:
-
-
-
- 全选
-
+ 全选
+
{{item.deviceName}}
@@ -204,50 +115,13 @@
+ 删除
-
-
-
- {{ item.content }}
-
-
- 添加步骤
-
+ 添加步骤+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -518,8 +392,12 @@ const title = ref();
const open1 = ref(false);
const title1= ref();
const activeName = ref('1')
+const addForm = reactive({
+ strategyInfo:'',
+ strategyName:'',
+ scenesList:[]
+})
const timingForm = reactive({
- num:1,
sceneName:'',
sceneRemark:'',
deviceVos:[],
@@ -568,20 +446,15 @@ function submitForm() {
// 根据 item 从 data.sblb 中找到对应的设备信息
let deviceInfo = data.sblb.find(sblbItem => sblbItem.deviceId === item);
if (deviceInfo) {
- console.log(deviceInfo)
+ console.log('11111',deviceInfo)
tempItem.tempList = deviceInfo.controlKey
}
tempCheckedSblb.push(tempItem);
- timingForm.deviceVos=tempCheckedSblb
- // for(let i in deviceInfo.controlKey){
- // deviceInfo.controlKey[i].value=''
- // }
- // deviceInfo.controlKey.map(item => {
- // item.value = '';
- // });
+ // items.scenesList.deviceVos=tempCheckedSblb
});
- console.log(timingForm)
- postNew(timingForm).then((res)=>{
+ addForm.scenesList.push(items)
+ console.log(addForm)
+ postNew(addForm).then((res)=>{
console.log(res)
ElMessage({type:"success",message:'新增成功!'})
handleQuery()
@@ -589,6 +462,8 @@ function submitForm() {
console.log(res)
data.queryParams=res.data
})
+ addForm.strategyInfo='',
+ addForm.strategyName='',
timingForm.sceneName='',
timingForm.sceneRemark='',
timingForm.deviceVos=[],
@@ -607,6 +482,8 @@ function submitForm() {
})
};
function cancel() {
+ addForm.strategyInfo='',
+ addForm.strategyName='',
timingForm.sceneName='',
timingForm.sceneRemark='',
timingForm.deviceVos=[];
@@ -730,13 +607,45 @@ function handleDel(sceneCode) {
//添加步骤
-const items = reactive([{ id: 1, title: '第一步', content: '步骤一的内容' }])
-const activeNames = ref(['1'])
+const items = reactive([{ id: 1, title: '第1步', content: `步骤1的内容`,
+ isIndeterminate:false,
+ checkedSblb: [],
+ checkAll:false,
+ sceneName:'',
+ sceneRemark:'',
+ deviceVos:[],
+ isJudge:null,
+ judgeDevice:null,
+ judgeElement:null,
+ judgeData:null }])
+const activeNames =reactive([1])
const addStep = () => {
const newId = items.length + 1
- items.push({ id: newId, title: `第${newId}步`, content: `步骤${newId}的内容` })
- activeNames.value.push(`${newId}`)
+ items.push({ id: newId, title: `第${newId}步`, content: `步骤${newId}的内容`,
+ isIndeterminate:false,
+ checkedSblb: [],
+ checkAll:false,
+ sceneName:'',
+ sceneRemark:'',
+ deviceVos:[],
+ isJudge:null,
+ judgeDevice:null,
+ judgeElement:null,
+ judgeData:null})
+ activeNames.push(`${newId}`)
+ console.log(items)
+ console.log(activeNames)
}
+const removeStep = (id) => {
+ const index = items.findIndex(item => item.id === id)
+ if (index !== -1) {
+ items.splice(index, 1)
+ activeNames.splice(activeNames.indexOf(`${id}`), 1)
+ }
+ console.log(items)
+ console.log(activeNames)
+}
+