|
@@ -19,11 +19,11 @@
|
|
|
</el-icon>
|
|
|
新增资产关系
|
|
|
</el-button>
|
|
|
- <el-button type="info" @click="batchdel()" v-auth="'batchdel'">
|
|
|
+ <el-button type="info" @click="batchUnbind()" v-auth="'batchUnbind'" :disabled="!ids.length">
|
|
|
<el-icon>
|
|
|
<ele-FolderAdd />
|
|
|
</el-icon>
|
|
|
- 删除
|
|
|
+ 解绑
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -55,7 +55,6 @@
|
|
|
<el-table-column label="操作" width="170" v-col="'handle'" align="center">
|
|
|
<template #default="scope">
|
|
|
<el-button size="small" text type="warning" v-auth="'unbind'" @click="unbind(scope.row)">解绑</el-button>
|
|
|
- <el-button size="small" text type="info" v-auth="'del'" @click="del(scope.row)">删除</el-button>
|
|
|
<el-button size="small" text type="primary" v-auth="'set'" @click="set(scope.row)">设置筛选条件</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -113,29 +112,29 @@ const handleNodeClick = (data: any) => {
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
-const batchdel = () => {
|
|
|
- ElMessageBox.confirm('是否确认要批量删除这些数据吗?', '提示', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- }).then(async () => {
|
|
|
- await device.assetRelationship.delete(ids.value)
|
|
|
- ElMessage.success('删除成功')
|
|
|
- getList()
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-const del = (row: any) => {
|
|
|
- ElMessageBox.confirm('是否确认删除该设备档案', '提示', {
|
|
|
- confirmButtonText: '确认',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- }).then(async () => {
|
|
|
- await device.assetRelationship.delete([row.id])
|
|
|
- ElMessage.success('删除成功')
|
|
|
- getList()
|
|
|
- })
|
|
|
-}
|
|
|
+// const batchdel = () => {
|
|
|
+// ElMessageBox.confirm('是否确认要批量删除这些数据吗?', '提示', {
|
|
|
+// confirmButtonText: '确认',
|
|
|
+// cancelButtonText: '取消',
|
|
|
+// type: 'warning',
|
|
|
+// }).then(async () => {
|
|
|
+// await device.assetRelationship.delete(ids.value)
|
|
|
+// ElMessage.success('删除成功')
|
|
|
+// getList()
|
|
|
+// })
|
|
|
+// }
|
|
|
+
|
|
|
+// const del = (row: any) => {
|
|
|
+// ElMessageBox.confirm('是否确认删除该设备档案', '提示', {
|
|
|
+// confirmButtonText: '确认',
|
|
|
+// cancelButtonText: '取消',
|
|
|
+// type: 'warning',
|
|
|
+// }).then(async () => {
|
|
|
+// await device.assetRelationship.delete([row.id])
|
|
|
+// ElMessage.success('删除成功')
|
|
|
+// getList()
|
|
|
+// })
|
|
|
+// }
|
|
|
|
|
|
// 状态修改
|
|
|
const handleStatusChange = (row: any) => {
|
|
@@ -162,12 +161,23 @@ const unbind = (row: any) => {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
}).then(async () => {
|
|
|
- await device.assetRelationship.unBind(row.id)
|
|
|
+ await device.assetRelationship.unBind([row.id])
|
|
|
ElMessage.success('解绑成功')
|
|
|
getList()
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+const batchUnbind = () => {
|
|
|
+ ElMessageBox.confirm('是否确认要批量解绑这些数据吗?', '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(async () => {
|
|
|
+ await device.assetRelationship.unBind(ids.value)
|
|
|
+ ElMessage.success('解绑成功')
|
|
|
+ getList()
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
// getCateList()
|
|
|
</script>
|