|
@@ -99,7 +99,7 @@ export default { |
|
|
// 获取设备场景模式参数 |
|
|
// 获取设备场景模式参数 |
|
|
getWatchConfig() { |
|
|
getWatchConfig() { |
|
|
APICore.getWatchConfig({imei: this.imei}).then(res => { |
|
|
APICore.getWatchConfig({imei: this.imei}).then(res => { |
|
|
let data = res.data; |
|
|
|
|
|
|
|
|
let data = res.data.data; |
|
|
if(data) { |
|
|
if(data) { |
|
|
const modeId = data.modeId; |
|
|
const modeId = data.modeId; |
|
|
const roleId = data.roleId; |
|
|
const roleId = data.roleId; |
|
@@ -108,8 +108,8 @@ export default { |
|
|
this.settingItems[0].text = `监护角色(${roleId === 1 ? '学生' : '老人'})`; |
|
|
this.settingItems[0].text = `监护角色(${roleId === 1 ? '学生' : '老人'})`; |
|
|
this.settingItems[1].text = `场景模式(${this.getModeById(modeId)})`; |
|
|
this.settingItems[1].text = `场景模式(${this.getModeById(modeId)})`; |
|
|
} else { |
|
|
} else { |
|
|
this.settingItems[0].text = `监护角色(学生)`; |
|
|
|
|
|
this.settingItems[1].text = `场景模式(无)`; |
|
|
|
|
|
|
|
|
this.settingItems[0].text = `监护角色(无数据)`; |
|
|
|
|
|
this.settingItems[1].text = `场景模式(无数据)`; |
|
|
/* this.modeId = 1; |
|
|
/* this.modeId = 1; |
|
|
this.roleId = 1; */ |
|
|
this.roleId = 1; */ |
|
|
} |
|
|
} |
|
@@ -133,7 +133,6 @@ export default { |
|
|
getIotCtlMode() { |
|
|
getIotCtlMode() { |
|
|
APICore.getIotCtlMode(this.imei).then(res => { |
|
|
APICore.getIotCtlMode(this.imei).then(res => { |
|
|
let data = res.data.data; |
|
|
let data = res.data.data; |
|
|
console.log("data", data); |
|
|
|
|
|
if(data) { |
|
|
if(data) { |
|
|
this.checked = data.mode === 1; |
|
|
this.checked = data.mode === 1; |
|
|
this.settingItems[2].text = this.concatTitle('加强省电模式', data.mode === 1 ? '打开' : '关闭', data.mode === 1 ? '耗电高' : '耗电低'); |
|
|
this.settingItems[2].text = this.concatTitle('加强省电模式', data.mode === 1 ? '打开' : '关闭', data.mode === 1 ? '耗电高' : '耗电低'); |
|
@@ -149,7 +148,6 @@ export default { |
|
|
getLocationConfig() { |
|
|
getLocationConfig() { |
|
|
APICore.getLocationConfig({imei: this.imei}).then(res => { |
|
|
APICore.getLocationConfig({imei: this.imei}).then(res => { |
|
|
let data = res.data.data; |
|
|
let data = res.data.data; |
|
|
console.log(data); |
|
|
|
|
|
if(data) { |
|
|
if(data) { |
|
|
this.settingItems[3].text = this.concatTitle('定位监测', data.enabled === 1 ? '打开': '关闭', data.enabled === 1 ? '耗电高' : '耗电低'); |
|
|
this.settingItems[3].text = this.concatTitle('定位监测', data.enabled === 1 ? '打开': '关闭', data.enabled === 1 ? '耗电高' : '耗电低'); |
|
|
this.settingItems[3].data = [ |
|
|
this.settingItems[3].data = [ |
|
@@ -367,7 +365,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 点击左边树形图 |
|
|
// 点击左边树形图 |
|
|
onCkickNav(value) { |
|
|
onCkickNav(value) { |
|
|
console.log("value", value); |
|
|
|
|
|
this.active = value; |
|
|
this.active = value; |
|
|
this.$store.commit('active', value); |
|
|
this.$store.commit('active', value); |
|
|
switch(value) { |
|
|
switch(value) { |
|
|