|
@@ -7,7 +7,7 @@
|
|
append-to-body
|
|
append-to-body
|
|
destroy-on-close
|
|
destroy-on-close
|
|
>
|
|
>
|
|
- <ProTable ref="proTableRef" :columns="columns" :data="state.tableData" :pagination="false" :tool-button="['setting']" max-height="500px">
|
|
|
|
|
|
+ <ProTable ref="proTableRef" :columns="columns" :data="state.tableData" :pagination="false" :loading="loading" :tool-button="['setting']" max-height="500px">
|
|
</ProTable>
|
|
</ProTable>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</template>
|
|
</template>
|
|
@@ -47,6 +47,7 @@ const columns = ref<any[]>([
|
|
},
|
|
},
|
|
{ prop: 'state', label: '状态', width: 80 },
|
|
{ prop: 'state', label: '状态', width: 80 },
|
|
]);
|
|
]);
|
|
|
|
+const loading = ref<boolean>(false); // 是否显示加载
|
|
// 定义变量内容
|
|
// 定义变量内容
|
|
const state = reactive<StateRoles>({
|
|
const state = reactive<StateRoles>({
|
|
dialogVisible: false, // 弹窗显示隐藏
|
|
dialogVisible: false, // 弹窗显示隐藏
|
|
@@ -55,13 +56,17 @@ const state = reactive<StateRoles>({
|
|
});
|
|
});
|
|
// 打开弹窗
|
|
// 打开弹窗
|
|
const openDialog = (row: any) => {
|
|
const openDialog = (row: any) => {
|
|
|
|
+ loading.value = true;
|
|
state.currentRow = row;
|
|
state.currentRow = row;
|
|
let req: string;
|
|
let req: string;
|
|
if (row.accountIds.length >= 1) req = '?' + qs.stringify({ ids: row.accountIds }, { indices: false });
|
|
if (row.accountIds.length >= 1) req = '?' + qs.stringify({ ids: row.accountIds }, { indices: false });
|
|
else req = '?' + 'ids=';
|
|
else req = '?' + 'ids=';
|
|
getUserListByIds(req).then((res: any) => {
|
|
getUserListByIds(req).then((res: any) => {
|
|
state.tableData = res?.result ?? [];
|
|
state.tableData = res?.result ?? [];
|
|
- });
|
|
|
|
|
|
+ loading.value = false;
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ })
|
|
state.dialogVisible = true;
|
|
state.dialogVisible = true;
|
|
emit('openDialog');
|
|
emit('openDialog');
|
|
};
|
|
};
|