diff --git a/src/view/masterStation/equipment/components/list/index.vue b/src/view/masterStation/equipment/components/list/index.vue index e4dc5fb..fe9df7e 100644 --- a/src/view/masterStation/equipment/components/list/index.vue +++ b/src/view/masterStation/equipment/components/list/index.vue @@ -25,33 +25,22 @@ -->
-
+ + 编辑 -
+
-->
{{ item.netStatus == 1 ? '在线' : '离线' }} - -
{{ item.gatewayMac }}
@@ -99,7 +88,6 @@ import * as serve from '@/api/masterStation/equipment.js' import { ref, onMounted } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' - import { MoreFilled } from '@element-plus/icons-vue' import { useProjectStore } from '@/pinia/modules/project' defineProps({ @@ -139,44 +127,6 @@ emit('select-device', device) } - // 解锁 - const unlock = async (row) => { - ElMessageBox.confirm('确认解锁吗?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(async () => { - const res = await serve.deviceOperation({ - id: row.ID, - gatewayId: row.gatewayId, - para: '0xAD' - }) - if (res.code === 0) { - ElMessage.success('操作成功') - getDeviceGatewayListByPage() - } - }) - } - - // 合分闸 - const changeStatus = (row) => { - ElMessageBox.confirm(row.deviceStatus == 1 ? '确认分闸吗?' : '确认合闸吗?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(async () => { - const res = await serve.deviceOperation({ - id: row.ID, - gatewayId: row.gatewayId, - para: row.deviceStatus == 1 ? '0xA2' : '0xA1' - }) - if (res.code === 0) { - ElMessage.success('操作成功') - getDeviceGatewayListByPage() - } - }) - } - // 分页 const handleSizeChange = (val) => { pageSize.value = val @@ -229,10 +179,8 @@ const handleDeviceAction = (command, item) => { switch (command) { case 'changeStatus': - changeStatus(item) break case 'unlock': - unlock(item) break } }