|
|
@@ -123,7 +123,7 @@
|
|
|
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['digital:deviceGroup:edit']"></el-button>-->
|
|
|
<!-- </el-tooltip>-->
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
|
|
+ <el-button link type="primary" icon="Delete" @click="handleDeleteDevice(scope.row)"
|
|
|
v-hasPermi="['digital:deviceGroup:remove']"></el-button>
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
@@ -188,7 +188,8 @@ import {
|
|
|
} from '@/api/smsb/digital/deviceGroup';
|
|
|
import {
|
|
|
getGroupRelByGroupId,
|
|
|
- addDeviceGroupRel
|
|
|
+ addDeviceGroupRel,
|
|
|
+ delDeviceGroupRel
|
|
|
} from '@/api/smsb/digital/deviceGroupRel';
|
|
|
import {
|
|
|
listDevice
|
|
|
@@ -456,6 +457,15 @@ const handleDelete = async (row?: DeviceGroupVO) => {
|
|
|
await getList();
|
|
|
}
|
|
|
|
|
|
+const handleDeleteDevice = async (row?: DeviceGroupRelVO) => {
|
|
|
+ const _ids = row?.id || ids.value;
|
|
|
+ await proxy?.$modal.confirm('是否确认删除设备信息编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
|
|
+ await delDeviceGroupRel(_ids);
|
|
|
+ proxy?.$modal.msgSuccess("删除成功");
|
|
|
+ const res = await getGroupRelByGroupId(groupId.value);
|
|
|
+ deviceList.value = res.data;
|
|
|
+}
|
|
|
+
|
|
|
/** 导出按钮操作 */
|
|
|
const handleExport = () => {
|
|
|
proxy?.download('digital/deviceGroup/export', {
|