diff --git a/api/dev-ops/index.js b/api/dev-ops/index.js index 0dfc920..49034f7 100644 --- a/api/dev-ops/index.js +++ b/api/dev-ops/index.js @@ -72,10 +72,18 @@ export function upgradeValve4G(code, dvId) { }) } -// 基站升级 +// 基站/阀门重启 export function resetStationDevice(code, dvId) { return request({ url: `/system/dev-ops/resetStationDevice/${code}`, method: 'get' }) +} + +// 4G阀门重启 +export function reset4GDevice(code, dvId) { + return request({ + url: `/system/dev-ops/reset4GDevice/${code}`, + method: 'get' + }) } \ No newline at end of file diff --git a/pages/dev-ops/device.vue b/pages/dev-ops/device.vue index e3f3920..a0775c6 100644 --- a/pages/dev-ops/device.vue +++ b/pages/dev-ops/device.vue @@ -138,18 +138,18 @@ - + + @click="restartValve4(item.device)" /> - + @click="pressureSelect(item.device)" disabled /> --> @@ -746,6 +746,11 @@ // 重启 restartValve4(item) { console.error("重启:", item); + plugins.modal.confirm(`重启"${item.deviceCode}"`).then(() => { + DevOpsApi.reset4GDevice(item.deviceCode).then(res => { + plugins.modal.msg(res.msg) + }) + }).catch(() => {}); }, // 设备升级 upgradeValve4(item) {