.
This commit is contained in:
parent
0dc701a196
commit
549b7bf511
@ -71,3 +71,11 @@ export function upgradeValve4G(code, dvId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 基站升级
|
||||||
|
export function resetStationDevice(code, dvId) {
|
||||||
|
return request({
|
||||||
|
url: `/system/dev-ops/resetStationDevice/${code}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
@ -131,7 +131,7 @@
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
removeItem(item) {
|
removeItem(item) {
|
||||||
this.$showConfirm(`删除"${item.groupName}"?`).then(res => {
|
plugins.modal.confirm(`删除"${item.groupName}"?`).then(() => {
|
||||||
isApi.removeBatchControl(item.id).then(res => {
|
isApi.removeBatchControl(item.id).then(res => {
|
||||||
this.queryList();
|
this.queryList();
|
||||||
plugins.modal.msg("删除成功")
|
plugins.modal.msg("删除成功")
|
||||||
@ -140,7 +140,7 @@
|
|||||||
},
|
},
|
||||||
// 开阀
|
// 开阀
|
||||||
batchControlExec(isMemory, item) {
|
batchControlExec(isMemory, item) {
|
||||||
this.$showConfirm("执行批量开阀?").then(res => {
|
plugins.modal.confirm(`执行批量开阀?`).then(() => {
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
isApi.batchControlExec(isMemory, item.id).then(res => {
|
isApi.batchControlExec(isMemory, item.id).then(res => {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
@ -160,7 +160,7 @@
|
|||||||
},
|
},
|
||||||
// 关阀
|
// 关阀
|
||||||
batchControlClose(item) {
|
batchControlClose(item) {
|
||||||
this.$showConfirm("执行批量关阀?").then(res => {
|
plugins.modal.confirm(`执行批量关阀?`).then(() => {
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
isApi.batchControlClose(item.id).then(res => {
|
isApi.batchControlClose(item.id).then(res => {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
@ -180,7 +180,7 @@
|
|||||||
},
|
},
|
||||||
// 角度记忆
|
// 角度记忆
|
||||||
saveBatchControlAngle(item) {
|
saveBatchControlAngle(item) {
|
||||||
this.$showConfirm("执行角度记忆?").then(res => {
|
plugins.modal.confirm(`执行角度记忆?`).then(() => {
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
isApi.saveBatchControlAngle(item.id).then(res => {
|
isApi.saveBatchControlAngle(item.id).then(res => {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
|
@ -662,7 +662,7 @@
|
|||||||
},
|
},
|
||||||
// 下发列表
|
// 下发列表
|
||||||
sendTopoList(item) {
|
sendTopoList(item) {
|
||||||
this.$showConfirm("下发列表").then(res => {
|
plugins.modal.confirm(`下发列表`).then(() => {
|
||||||
DevOpsApi.gvl(item.deviceCode).then(res => {
|
DevOpsApi.gvl(item.deviceCode).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -677,7 +677,7 @@
|
|||||||
},
|
},
|
||||||
// 获取配置
|
// 获取配置
|
||||||
getStationConfig(item) {
|
getStationConfig(item) {
|
||||||
this.$showConfirm("获取配置").then(res => {
|
plugins.modal.confirm(`获取配置`).then(() => {
|
||||||
DevOpsApi.gsc(item.deviceCode).then(res => {
|
DevOpsApi.gsc(item.deviceCode).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -690,6 +690,8 @@
|
|||||||
// 重启
|
// 重启
|
||||||
restartStation(item) {
|
restartStation(item) {
|
||||||
console.error("重启:", item);
|
console.error("重启:", item);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 子设备
|
// 子设备
|
||||||
topoDevice(item) {
|
topoDevice(item) {
|
||||||
@ -699,7 +701,7 @@
|
|||||||
},
|
},
|
||||||
// 升级
|
// 升级
|
||||||
upgradeStation(item) {
|
upgradeStation(item) {
|
||||||
this.$showConfirm(`升级"${item.deviceCode}"到"${item.newVersionName}"版本?`).then(res => {
|
plugins.modal.confirm(`升级"${item.deviceCode}"到"${item.newVersionName}"版本?`).then(() => {
|
||||||
DevOpsApi.upgradeStation(item.deviceCode, item.newDeviceVersionId).then(res => {
|
DevOpsApi.upgradeStation(item.deviceCode, item.newDeviceVersionId).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -721,7 +723,7 @@
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
let msg = `您确定要修改【${this.rolaFrequency.item.deviceCode }】的频段为【${this.rolaFrequency.new}】?`;
|
let msg = `您确定要修改【${this.rolaFrequency.item.deviceCode }】的频段为【${this.rolaFrequency.new}】?`;
|
||||||
this.$showConfirm(msg).then(res => {
|
plugins.modal.confirm(msg).then(() => {
|
||||||
DevOpsApi.slf({
|
DevOpsApi.slf({
|
||||||
deviceCode: this.rolaFrequency.item.deviceCode,
|
deviceCode: this.rolaFrequency.item.deviceCode,
|
||||||
oldFrequency: this.rolaFrequency.old,
|
oldFrequency: this.rolaFrequency.old,
|
||||||
@ -745,7 +747,7 @@
|
|||||||
},
|
},
|
||||||
// 设备升级
|
// 设备升级
|
||||||
upgradeValve4(item) {
|
upgradeValve4(item) {
|
||||||
this.$showConfirm(`升级"${item.deviceCode}"到"${item.newVersionName}"版本?`).then(res => {
|
plugins.modal.confirm(`升级"${item.deviceCode}"到"${item.newVersionName}"版本?`).then(() => {
|
||||||
DevOpsApi.upgradeValve4G(item.deviceCode, item.newDeviceVersionId).then(res => {
|
DevOpsApi.upgradeValve4G(item.deviceCode, item.newDeviceVersionId).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -805,9 +807,11 @@
|
|||||||
deviceCode: item.deviceCode,
|
deviceCode: item.deviceCode,
|
||||||
controlValve: item.data.items.m.value == 1 ? 0 : 1
|
controlValve: item.data.items.m.value == 1 ? 0 : 1
|
||||||
};
|
};
|
||||||
this.$showConfirm(`切换运行模式为"${(m == 1 ? "自动" : "手动" )}"?`).then(res => {
|
plugins.modal.confirm(`切换运行模式为"${(m == 1 ? "自动" : "手动" )}"?`).then(() => {
|
||||||
controlHeadSwitch(par).then(res => {
|
controlHeadSwitch(par).then(res => {
|
||||||
item.data.items.m.value = m;
|
item.data.items.m.value = m;
|
||||||
|
}) controlHeadSwitch(par).then(res => {
|
||||||
|
item.data.items.m.value = m;
|
||||||
})
|
})
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
@ -189,7 +189,7 @@
|
|||||||
},
|
},
|
||||||
// 下发列表
|
// 下发列表
|
||||||
sendList(item) {
|
sendList(item) {
|
||||||
this.$showConfirm("下发列表").then(res => {
|
plugins.modal.confirm("下发列表").then(() => {
|
||||||
DevOpsApi.gvl(item.deviceCode).then(res => {
|
DevOpsApi.gvl(item.deviceCode).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -204,7 +204,7 @@
|
|||||||
},
|
},
|
||||||
// 获取配置
|
// 获取配置
|
||||||
getConfig(item) {
|
getConfig(item) {
|
||||||
this.$showConfirm("获取配置").then(res => {
|
plugins.modal.confirm("获取配置").then(() => {
|
||||||
DevOpsApi.gsc(item.deviceCode).then(res => {
|
DevOpsApi.gsc(item.deviceCode).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -226,7 +226,7 @@
|
|||||||
},
|
},
|
||||||
// 升级
|
// 升级
|
||||||
upgrade(item) {
|
upgrade(item) {
|
||||||
this.$showConfirm("基站升级").then(res => {
|
plugins.modal.confirm("基站升级").then(() => {
|
||||||
DevOpsApi.stationUpgrade(item.deviceCode, item.newDeviceVersionId).then(res => {
|
DevOpsApi.stationUpgrade(item.deviceCode, item.newDeviceVersionId).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -251,7 +251,7 @@
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
let msg = `您确定要修改【${this.rolaFrequency.item.deviceCode }】的频段为【${this.rolaFrequency.new}】?`;
|
let msg = `您确定要修改【${this.rolaFrequency.item.deviceCode }】的频段为【${this.rolaFrequency.new}】?`;
|
||||||
this.$showConfirm(msg).then(res => {
|
plugins.modal.confirm(msg).then(() => {
|
||||||
DevOpsApi.slf({
|
DevOpsApi.slf({
|
||||||
deviceCode: this.rolaFrequency.item.deviceCode,
|
deviceCode: this.rolaFrequency.item.deviceCode,
|
||||||
oldFrequency: this.rolaFrequency.old,
|
oldFrequency: this.rolaFrequency.old,
|
||||||
|
@ -202,7 +202,7 @@
|
|||||||
},
|
},
|
||||||
// 获取配置
|
// 获取配置
|
||||||
getConfig(item) {
|
getConfig(item) {
|
||||||
this.$showConfirm("获取配置").then(res => {
|
plugins.modal.confirm("获取配置").then(() => {
|
||||||
DevOpsApi.gvc(item.device.deviceCode).then(res => {
|
DevOpsApi.gvc(item.device.deviceCode).then(res => {
|
||||||
plugins.modal.msg(res.msg)
|
plugins.modal.msg(res.msg)
|
||||||
})
|
})
|
||||||
@ -224,7 +224,7 @@
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
let msg = `您确定要修改【${this.rolaFrequency.item.deviceCode}】的频段为【${this.rolaFrequency.new}】?`;
|
let msg = `您确定要修改【${this.rolaFrequency.item.deviceCode}】的频段为【${this.rolaFrequency.new}】?`;
|
||||||
this.$showConfirm(msg).then(res => {
|
plugins.modal.confirm(msg).then(() => {
|
||||||
DevOpsApi.vlf({
|
DevOpsApi.vlf({
|
||||||
stationCode: this.station.deviceCode,
|
stationCode: this.station.deviceCode,
|
||||||
deviceCode: this.rolaFrequency.item.deviceCode,
|
deviceCode: this.rolaFrequency.item.deviceCode,
|
||||||
|
@ -699,7 +699,7 @@
|
|||||||
},
|
},
|
||||||
//导航
|
//导航
|
||||||
mapNavigation() {
|
mapNavigation() {
|
||||||
this.$showConfirm(`导航至"${this.title}"?`).then(res => {
|
plugins.modal.confirm(`导航至"${this.title}"?`).then(() => {
|
||||||
const centerPoint = JSON.parse(this.mapObj.landMap.centerPoint);
|
const centerPoint = JSON.parse(this.mapObj.landMap.centerPoint);
|
||||||
const lat = centerPoint[1]
|
const lat = centerPoint[1]
|
||||||
const lng = centerPoint[0]
|
const lng = centerPoint[0]
|
||||||
@ -732,7 +732,7 @@
|
|||||||
plugins.modal.msg("测距已关闭")
|
plugins.modal.msg("测距已关闭")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$showConfirm(`开启测距,开启后再次点击关闭。`).then(res => {
|
plugins.modal.confirm(`开启测距,开启后再次点击关闭。`).then(() => {
|
||||||
this.mapObj.ranging = true;
|
this.mapObj.ranging = true;
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
@ -772,7 +772,7 @@
|
|||||||
break;
|
break;
|
||||||
case 'sfj':
|
case 'sfj':
|
||||||
case 'sb':
|
case 'sb':
|
||||||
this.$showConfirm("确定打开首部设备?").then(res => {
|
plugins.modal.confirm("确定打开首部设备?").then(() => {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
getHeadDevice(e.device.deviceId).then((res) => {
|
getHeadDevice(e.device.deviceId).then((res) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
@ -800,7 +800,7 @@
|
|||||||
case 'bz':
|
case 'bz':
|
||||||
case 'sxt':
|
case 'sxt':
|
||||||
case 'scd':
|
case 'scd':
|
||||||
this.$showConfirm("确定打开农情设备?").then(res => {
|
plugins.modal.confirm("确定打开农情设备?").then(() => {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
getOtherDevice(e.device.deviceId).then((res) => {
|
getOtherDevice(e.device.deviceId).then((res) => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
@ -196,14 +196,14 @@
|
|||||||
},
|
},
|
||||||
//删除任务
|
//删除任务
|
||||||
delTask(item) {
|
delTask(item) {
|
||||||
this.$showConfirm(`删除"${item.taskName}"?`).then(() => {
|
plugins.modal.confirm(`删除"${item.taskName}"?`).then(() => {
|
||||||
taskApi.delTask(item.id).then(res => {
|
taskApi.delTask(item.id).then(res => {
|
||||||
plugins.modal.msg("删除成功")
|
plugins.modal.msg("删除成功")
|
||||||
this.reload();
|
this.reload();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$showConfirm(err, false).then(() => {
|
plugins.modal.confirm(err, false).then(() => {
|
||||||
this.reload();
|
this.reload();
|
||||||
})
|
}).catch(() => {});
|
||||||
})
|
})
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
@ -236,14 +236,14 @@
|
|||||||
//方案删除
|
//方案删除
|
||||||
updateScenario(item, disabled) {
|
updateScenario(item, disabled) {
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
this.$showConfirm(`禁用"${item.scenarioName}"?`).then(() => {
|
plugins.modal.confirm(`禁用"${item.scenarioName}"?`).then(() => {
|
||||||
isApi.disabled(item.id).then(res => {
|
isApi.disabled(item.id).then(res => {
|
||||||
plugins.modal.msg("禁用成功")
|
plugins.modal.msg("禁用成功")
|
||||||
this.reload();
|
this.reload();
|
||||||
})
|
})
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
this.$showConfirm(`启用"${item.scenarioName}"?`).then(() => {
|
plugins.modal.confirm(`启用"${item.scenarioName}"?`).then(() => {
|
||||||
isApi.enable(item.id).then(res => {
|
isApi.enable(item.id).then(res => {
|
||||||
plugins.modal.msg("启用成功")
|
plugins.modal.msg("启用成功")
|
||||||
this.reload();
|
this.reload();
|
||||||
|
@ -342,7 +342,7 @@
|
|||||||
// 选中数据
|
// 选中数据
|
||||||
itemChange(wo, vItem) {
|
itemChange(wo, vItem) {
|
||||||
if (this.selected[`${wo.id}_${vItem.valveNo}`]) {
|
if (this.selected[`${wo.id}_${vItem.valveNo}`]) {
|
||||||
this.$showConfirm("更换到当前轮灌组?").then(res => {
|
plugins.modal.confirm("更换到当前轮灌组?").then(() => {
|
||||||
//删除之前存储的组中的数据
|
//删除之前存储的组中的数据
|
||||||
this.removeWo(this.selected[`${wo.id}_${vItem.valveNo}`].gIndex, wo.id, vItem.valveNo);
|
this.removeWo(this.selected[`${wo.id}_${vItem.valveNo}`].gIndex, wo.id, vItem.valveNo);
|
||||||
delete this.selected[`${wo.id}_${vItem.valveNo}`];
|
delete this.selected[`${wo.id}_${vItem.valveNo}`];
|
||||||
@ -488,7 +488,7 @@
|
|||||||
removeGroup(index) {
|
removeGroup(index) {
|
||||||
this.groupPop = false;
|
this.groupPop = false;
|
||||||
const groupName = this.formData.groups[index].groupName;
|
const groupName = this.formData.groups[index].groupName;
|
||||||
this.$showConfirm(`删除"${groupName}"?`).then(res => {
|
plugins.modal.confirm(`删除"${groupName}"?`).then(() => {
|
||||||
//删除轮灌组
|
//删除轮灌组
|
||||||
this.formData.groups[index]._isHide = true;
|
this.formData.groups[index]._isHide = true;
|
||||||
let i = 0;
|
let i = 0;
|
||||||
@ -558,7 +558,7 @@
|
|||||||
_item.sort = (_index + 1)
|
_item.sort = (_index + 1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.$showConfirm("保存轮灌方案?").then(res => {
|
plugins.modal.confirm("保存轮灌方案?").then(() => {
|
||||||
uni.showLoading();
|
uni.showLoading();
|
||||||
isApi.saveIrrigateScenario(formData).then(res => {
|
isApi.saveIrrigateScenario(formData).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
title = "暂停执行?"
|
title = "暂停执行?"
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.$showConfirm(title).then(() => {
|
plugins.modal.confirm(title).then(() => {
|
||||||
taskApi.updateTask({
|
taskApi.updateTask({
|
||||||
id: this.task.id,
|
id: this.task.id,
|
||||||
status: status
|
status: status
|
||||||
@ -114,9 +114,9 @@
|
|||||||
plugins.modal.msg("删除成功")
|
plugins.modal.msg("删除成功")
|
||||||
this.loadData();
|
this.loadData();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$showConfirm(err, false).then(() => {
|
plugins.modal.confirm(err, false).then(() => {
|
||||||
this.loadData();
|
this.loadData();
|
||||||
})
|
}).catch(() => {});
|
||||||
})
|
})
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
@ -268,7 +268,7 @@
|
|||||||
confirm() {
|
confirm() {
|
||||||
this.$refs.formRef.validate().then(valid => {
|
this.$refs.formRef.validate().then(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$showConfirm("立即执行?").then(() => {
|
plugins.modal.confirm("立即执行?").then(() => {
|
||||||
taskApi.addTask(this.formData).then(res => {
|
taskApi.addTask(this.formData).then(res => {
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
});
|
});
|
||||||
|
@ -41,13 +41,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 确认窗体
|
// 确认窗体
|
||||||
confirm(text) {
|
confirm(text, showCancel = true) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '系统提示',
|
title: '系统提示',
|
||||||
content: text,
|
content: text,
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
confirmText: '确定',
|
confirmText: '确定',
|
||||||
|
showCancel: showCancel,
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
resolve(res.confirm)
|
resolve(res.confirm)
|
||||||
|
Loading…
Reference in New Issue
Block a user