diff --git a/src/views/system/Department/components/AddDeviceOrProductDialog.vue b/src/views/system/Department/components/AddDeviceOrProductDialog.vue
index c82bc814..939440d5 100644
--- a/src/views/system/Department/components/AddDeviceOrProductDialog.vue
+++ b/src/views/system/Department/components/AddDeviceOrProductDialog.vue
@@ -38,7 +38,7 @@
:params="queryParams"
:rowSelection="{
selectedRowKeys: table._selectedRowKeys.value,
- onChange: selectRow,
+ onChange: selectChange,
}"
@cancelSelect="table.cancelSelect"
:columns="columns"
@@ -55,7 +55,7 @@
:status="slotProps.state?.value"
:statusText="slotProps.state?.text"
:statusNames="{
- online: 'success',
+ online: 'processing',
offline: 'error',
notActive: 'warning',
}"
@@ -121,7 +121,7 @@
:status="slotProps.state.value"
:text="slotProps.state.text"
:statusNames="{
- online: 'success',
+ online: 'processing',
offline: 'error',
notActive: 'warning',
}"
@@ -173,10 +173,8 @@ const confirm = () => {
permission: item.selectPermissions,
}));
- if (params.length === 1) {
- // 只选择一个产品资产分配时, 分配之后, 进入设备资产分配需查出对应产品下的设备
- departmentStore.setProductId(params[0].assetIdList[0]);
- }
+ // 分配产品资产后, 进入设备资产分配,默认查询第一个产品下的设备
+ departmentStore.setProductId(params[0].assetIdList[0]);
loading.value = true;
bindDeviceOrProductList_api(props.assetType, params)
@@ -475,15 +473,20 @@ const table: any = {
},
};
table.init();
-const selectRow = (keys: string[], rows: any[]) => {
- const okRows = rows.filter(
- (item) =>
- !!item.permissionList.find(
- (permiss: any) => permiss.value === 'share',
- ),
- );
- table.selectedRows = okRows;
- table._selectedRowKeys.value = okRows.map((item) => item.id);
+// const selectRow = (rows: any[], check: boolean) => {
+// const okRows = rows.filter(
+// (item) =>
+// !!item.permissionList.find(
+// (permiss: any) => permiss.value === 'share',
+// ),
+// );
+// table.selectedRows = okRows;
+// table._selectedRowKeys.value = okRows.map((item) => item.id);
+// };
+// fix: bug#10749
+const selectChange = (keys: string[], rows: any[]) => {
+ table.selectedRows = rows;
+ table._selectedRowKeys.value = keys;
};
diff --git a/src/views/system/Department/product/index.vue b/src/views/system/Department/product/index.vue
index 0a113a4c..249eaf81 100644
--- a/src/views/system/Department/product/index.vue
+++ b/src/views/system/Department/product/index.vue
@@ -68,8 +68,8 @@
:status="slotProps.state?.value"
:statusText="slotProps.state?.text"
:statusNames="{
- 1: 'processing',
- 0: 'error',
+ online: 'processing',
+ offline: 'error',
}"
>
@@ -171,8 +171,8 @@
:status="slotProps.state.value"
:text="slotProps.state.text"
:statusNames="{
- 1: 'processing',
- 0: 'error',
+ online: 'processing',
+ offline: 'error',
}"
>
@@ -517,6 +517,7 @@ const table = {
},
];
unBindDeviceOrProduct_api('product', params).then(() => {
+ tableData._selectedRowKeys = [];
message.success('操作成功');
table.refresh();
});
diff --git a/src/views/system/Department/user/index.vue b/src/views/system/Department/user/index.vue
index 1170e786..deeb51ae 100644
--- a/src/views/system/Department/user/index.vue
+++ b/src/views/system/Department/user/index.vue
@@ -213,4 +213,11 @@ const table = reactive({
});
const dialogVisible = ref(false);
+
+watch(
+ () => props.parentId,
+ () => {
+ table.refresh();
+ },
+);
diff --git a/src/views/system/Relationship/components/EditDialog.vue b/src/views/system/Relationship/components/EditDialog.vue
index 78194fac..13a03557 100644
--- a/src/views/system/Relationship/components/EditDialog.vue
+++ b/src/views/system/Relationship/components/EditDialog.vue
@@ -71,7 +71,7 @@
v-model:value="form.data.targetType"
:disabled="!!form.data.id"
@change="form.rules.checkUnique"
- placeholder="请选择关联方"
+ placeholder="请选择被关联方"
>