diff --git a/src/pages.json b/src/pages.json
index 5dcf150..df82c08 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -438,6 +438,18 @@
"style": {
"navigationBarTitleText": ""
}
+ },
+ {
+ "path": "pages/lighting_time/list",
+ "style": {
+ "navigationBarTitleText": "照明管理"
+ }
+ },
+ {
+ "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..db1f4f5 100644
--- a/src/subpackage/device/js/device_api.js
+++ b/src/subpackage/device/js/device_api.js
@@ -69,6 +69,11 @@ 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_time/setting.vue b/src/subpackage/device/pages/lighting_time/setting.vue
new file mode 100644
index 0000000..de2990a
--- /dev/null
+++ b/src/subpackage/device/pages/lighting_time/setting.vue
@@ -0,0 +1,271 @@
+
+
+ {{ optionsQuery.hardware_name || '-' }}
+
+
+
+ 指令
+
+
+ 开
+
+
+
+ 关
+
+
+
+
+
+ 时间点
+
+
+
+
+
+
+
+
+ 日期
+
+
+ 全选
+
+
+
+
+ {{ e }}
+
+
+
+
+
+ 添加定时任务
+
+
+
+
+
+
+
\ 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 9712712..1100b8e 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))
}