fix: bug#10389、10421
This commit is contained in:
parent
5604c8bd35
commit
cf36e34e4f
|
@ -25,7 +25,7 @@
|
|||
<!-- 选择设备 -->
|
||||
<j-modal
|
||||
title="选择设备"
|
||||
width="800px"
|
||||
width="850px"
|
||||
v-model:visible="visible"
|
||||
:maskClosable="false"
|
||||
:destroyOnClose="true"
|
||||
|
@ -57,6 +57,7 @@
|
|||
deviceItem = record;
|
||||
}
|
||||
}"
|
||||
:alertRender="false"
|
||||
:pagination="{
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ['10', '20', '50', '100'],
|
||||
|
@ -160,6 +161,7 @@ const columns = [
|
|||
key: 'id',
|
||||
search: {
|
||||
type: 'string',
|
||||
defaultTermType: 'eq',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -316,15 +316,10 @@ const getBindUsers = async () => {
|
|||
* 获取所有用户未绑定的用户
|
||||
*/
|
||||
const allUserList = ref([]);
|
||||
const getAllUsers = async () => {
|
||||
const getAllUsers = async (terms?: any) => {
|
||||
const params = {
|
||||
paging: false,
|
||||
terms: [
|
||||
{
|
||||
column: `id$user-third$${props.data.type}_${props.data.provider}$not`,
|
||||
value: props.data.id,
|
||||
},
|
||||
],
|
||||
terms,
|
||||
};
|
||||
const { result } = await configApi.getPlatformUsers(params);
|
||||
allUserList.value = result.map((m: any) => ({
|
||||
|
@ -355,11 +350,11 @@ const getTableData = () => {
|
|||
const bindUser = bindUsers.find(
|
||||
(f: any) => f.thirdPartyUserId === deptUser.id,
|
||||
);
|
||||
// if (bindUser) {
|
||||
// unBindUser = unBindUsers.find(
|
||||
// (f: any) => f.id === bindUser.userId,
|
||||
// );
|
||||
// }
|
||||
if (bindUser) {
|
||||
unBindUser = unBindUsers.find(
|
||||
(f: any) => f.id === bindUser.userId,
|
||||
);
|
||||
}
|
||||
dataSource.value.push({
|
||||
thirdPartyUserId: deptUser.id,
|
||||
thirdPartyUserName: deptUser.name,
|
||||
|
@ -422,7 +417,12 @@ const handleBind = (row: any) => {
|
|||
bindVis.value = true;
|
||||
// formData.value = row;
|
||||
Object.assign(formData.value, row);
|
||||
getAllUsers();
|
||||
getAllUsers([
|
||||
{
|
||||
column: `id$user-third$${props.data.type}_${props.data.provider}$not`,
|
||||
// value: props.data.id,
|
||||
},
|
||||
]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue