diff --git a/src/pages.json b/src/pages.json
index 2eb219c..df82c08 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -440,13 +440,13 @@
}
},
{
- "path": "pages/lighting_timie/list",
+ "path": "pages/lighting_time/list",
"style": {
"navigationBarTitleText": "照明管理"
}
},
{
- "path": "pages/lighting_timie/setting",
+ "path": "pages/lighting_time/setting",
"style": {
"navigationBarTitleText": "照明管理"
}
diff --git a/src/subpackage/device/js/device_api.js b/src/subpackage/device/js/device_api.js
index b6ef2e5..7d129e4 100644
--- a/src/subpackage/device/js/device_api.js
+++ b/src/subpackage/device/js/device_api.js
@@ -69,6 +69,12 @@ export const DEVICE_API = {
brandList:`${ORIGIN}/stadium/brand/all`, // 获取品牌列表
brandInfo:`${ORIGIN}/stadium/brand/get`, // 获取品牌信息
+ // 20240830 tid1641 小程序-商家助手小程序照明定时任务优化
+ cacScheduledTaskGet:`${ORIGIN}/admin/cacScheduledTask/data`, // 获取YZK照明定时列表接口
+ cacScheduledTaskSave:`${ORIGIN}/admin/cacScheduledTask/save`, // 设置YZK照明定时
+ cacScheduledTaskDelete:`${ORIGIN}/admin/cacScheduledTask/delete`, // 删除YZK照明定时
+
+
}
export default DEVICE_API;
\ No newline at end of file
diff --git a/src/subpackage/device/pages/index/index.vue b/src/subpackage/device/pages/index/index.vue
index a9432b8..3f0547b 100644
--- a/src/subpackage/device/pages/index/index.vue
+++ b/src/subpackage/device/pages/index/index.vue
@@ -10,7 +10,8 @@
欧轩智能中控
-
+
+
设备id:{{ curStoreInfo.device_name || "-" }}
@@ -32,7 +33,7 @@
{
- util.hideLoad();
- this.deviceInfo = res || {};
- uni.setStorageSync("deviceInfo",res)
+ let _data = res?.data || {}
+ util.hideLoad();
+ if(_data.code === 0){
+ this.deviceInfo = _data?.data || {};
+ uni.setStorageSync("deviceInfo",res)
+ }else{
+ return Promise.reject(_data);
+ }
+ })
+ .catch(err=>{
+ util.hideLoad();
+ util.showModal({
+ title: '提示',
+ content: err?.message || '中控在线状态查询失败!'
+ })
})
- .catch(util.hideLoad)
},
goBack(){
uni.navigateBack({ delta:1 });
diff --git a/src/subpackage/device/pages/lighting_time/list.vue b/src/subpackage/device/pages/lighting_time/list.vue
new file mode 100644
index 0000000..991df61
--- /dev/null
+++ b/src/subpackage/device/pages/lighting_time/list.vue
@@ -0,0 +1,180 @@
+
+
+ {{ optionsQuery.hardware_name || '-' }}
+
+
+
+ 指令:{{ getInstructTxt(e.operate) }}
+
+
+
+ 时间:{{ e.h_m_s || '-'}}
+
+
+ 日期:{{ e.day_of_week || '-' }}
+
+
+
+
+
+ 添加定时任务
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/subpackage/device/pages/lighting_timie/setting.vue b/src/subpackage/device/pages/lighting_time/setting.vue
similarity index 74%
rename from src/subpackage/device/pages/lighting_timie/setting.vue
rename to src/subpackage/device/pages/lighting_time/setting.vue
index cb16a96..de2990a 100644
--- a/src/subpackage/device/pages/lighting_timie/setting.vue
+++ b/src/subpackage/device/pages/lighting_time/setting.vue
@@ -1,6 +1,6 @@
- 1号馆照明定时
+ {{ optionsQuery.hardware_name || '-' }}
@@ -56,23 +56,31 @@
- 添加定时任务
+ 添加定时任务
diff --git a/src/subpackage/device/pages/lighting_timie/list.vue b/src/subpackage/device/pages/lighting_timie/list.vue
deleted file mode 100644
index 8522d70..0000000
--- a/src/subpackage/device/pages/lighting_timie/list.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
- 1号馆照明定时
-
-
-
- 指令:关闭
-
-
-
- 时间:08:00
-
-
- 日期:周日、周一、周二、周三、周四、周五、周六
-
-
-
-
-
- 添加定时任务
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/subpackage/device/pages/switch_manage/switch_manage.vue b/src/subpackage/device/pages/switch_manage/switch_manage.vue
index d00c0af..8b1ddac 100644
--- a/src/subpackage/device/pages/switch_manage/switch_manage.vue
+++ b/src/subpackage/device/pages/switch_manage/switch_manage.vue
@@ -210,7 +210,13 @@ export default {
if(this.pageInfo.hardware_type=='IotSim')return util.routeTo(`/subpackage/device/pages/index/lot_manage?mac=${switchInfo.hardware_standard}`, 'nT');
}
- if(status == 3) return (()=>{
+
+ // 云中空,照明,开定时得区分开来
+ if(status === 3 && switchInfo?.hardware_type === "Light" && switchInfo?.hardware_connect_method === "YZK" ){
+ let { hardware_name, id } = switchInfo;
+ let _qryStr = `hardware_id=${id || ''}&hardware_name=${util.jsonStr(hardware_name || '')}`
+ return util.routeTo(`/subpackage/device/pages/lighting_time/list?${_qryStr}`, 'nT');
+ } else if (status == 3) return (()=>{
switchInfo.switchData = _data;//将中控组合数据传递到下层
let timing_setting = `/subpackage/device/pages/timing/timing_setting?switchInfo=${encodeURIComponent(JSON.stringify(switchInfo))}`
util.routeTo(`${timing_setting}`, 'nT');
diff --git a/src/subpackage/device/static/images/delete.png b/src/subpackage/device/static/images/delete.png
new file mode 100644
index 0000000..b358e0b
Binary files /dev/null and b/src/subpackage/device/static/images/delete.png differ
diff --git a/src/utils/util.js b/src/utils/util.js
index c38a21b..cb9c6d4 100644
--- a/src/utils/util.js
+++ b/src/utils/util.js
@@ -150,10 +150,10 @@ export function debounce(func, wait, immediate) {
}
}
-function jsonStr(data){
+export function jsonStr(data){
return encodeURIComponent(JSON.stringify(data))
}
-function jsonPar(json){
+export function jsonPar(json){
return JSON.parse(decodeURIComponent(json))
}