授权逻辑更改
This commit is contained in:
@@ -7,7 +7,6 @@ import { getPopupContainer } from '@vben/utils';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { personLibList } from '#/api/sis/personLib';
|
||||
import type { PersonLibQuery, PersonLibVO } from '#/api/sis/personLib/model';
|
||||
import { Tag } from 'ant-design-vue';
|
||||
|
||||
let libArr: PersonLibVO[] = [];
|
||||
const labelText: VbenFormSchema = {
|
||||
@@ -16,7 +15,7 @@ const labelText: VbenFormSchema = {
|
||||
component: 'ApiSelect',
|
||||
componentProps: {
|
||||
resultField: 'list', // 根据API返回结构调整
|
||||
labelField: 'labelText',
|
||||
labelField: 'libName',
|
||||
valueField: 'id',
|
||||
// immediate: true,
|
||||
api: async () => {
|
||||
@@ -26,19 +25,6 @@ const labelText: VbenFormSchema = {
|
||||
pageSize: 500,
|
||||
};
|
||||
const res = await personLibList(params);
|
||||
res.rows.forEach((item) => {
|
||||
let tag =
|
||||
item.libType == 1 ? (
|
||||
<Tag color="#108ee9">人像库</Tag>
|
||||
) : (
|
||||
<Tag color="#2db7f5">工服库</Tag>
|
||||
);
|
||||
item.labelText = (
|
||||
<span>
|
||||
{item.libName} {tag}
|
||||
</span>
|
||||
);
|
||||
});
|
||||
libArr = res.rows;
|
||||
}
|
||||
return libArr;
|
||||
|
Reference in New Issue
Block a user