|
@@ -125,6 +125,31 @@ const searchConfig: ISearchConfig = reactive({
|
|
|
style: { width: "200px" },
|
|
style: { width: "200px" },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ type: "select",
|
|
|
|
|
+ label: "所属企业",
|
|
|
|
|
+ prop: "firmId",
|
|
|
|
|
+ attrs: {
|
|
|
|
|
+ placeholder: "请选择企业",
|
|
|
|
|
+ clearable: true,
|
|
|
|
|
+ filterable: true,
|
|
|
|
|
+ style: { width: "200px" },
|
|
|
|
|
+ },
|
|
|
|
|
+ options: [],
|
|
|
|
|
+ async initFn(item) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const response = await UserFirmAPI.getFirmList();
|
|
|
|
|
+ if (Array.isArray(response)) {
|
|
|
|
|
+ item.options = response.map((firm: any) => ({
|
|
|
|
|
+ label: firm.name,
|
|
|
|
|
+ value: firm.id,
|
|
|
|
|
+ }));
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error("Failed to fetch firm list:", error);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
type: "select",
|
|
type: "select",
|
|
|
label: "身份", // 1 管理员 2普通员工
|
|
label: "身份", // 1 管理员 2普通员工
|