Browse Source

feat(组件): apiSelct 修改

tangning 2 years ago
parent
commit
3ab0be42a7

+ 12 - 7
src/api/corporation/modal.ts

@@ -74,14 +74,19 @@ export const selectUserList = (params: selectUserListParam) =>
   });
 
 export const checkUserAddAble = (params: checkUserParam) =>
-  defHttp.post<Result>({
-    url: Api.checkUserAddAble,
-    params,
-    headers: {
-      // @ts-ignore
-      ignoreCancelToken: true,
+  defHttp.post<Result>(
+    {
+      url: Api.checkUserAddAble,
+      params,
+      headers: {
+        // @ts-ignore
+        ignoreCancelToken: true,
+      },
     },
-  });
+    {
+      useResult: true,
+    },
+  );
 
 export const selectCompanyById = (params: selectCompanyParam) =>
   defHttp.post<Result>({

+ 1 - 0
src/views/product/drawer.data.ts

@@ -21,6 +21,7 @@ export const formSchema: FormSchema[] = [
         return treeData;
       },
       showSearch: true,
+      optionFilterProp: 'label',
       filterTreeNode: (searchVal, treeNode) => {
         return treeNode.title.includes(searchVal);
       },

+ 1 - 0
src/views/product/goodsSpecs.vue

@@ -109,6 +109,7 @@
                 value: 'id',
               },
               showSearch: true,
+              optionFilterProp: 'label',
               filterTreeNode: (searchVal, treeNode) => {
                 return treeNode.title.includes(searchVal);
               },

+ 3 - 0
src/views/scenes/roomDetail.vue

@@ -131,6 +131,7 @@
             disabled: true,
             resultField: 'list',
             labelField: 'userAndNick',
+            optionFilterProp: 'label',
             valueField: 'id',
             immediate: false,
             params: {
@@ -232,6 +233,7 @@
           componentProps: {
             api: staffListApi,
             showSearch: true,
+            optionFilterProp: 'label',
             resultField: 'list',
             labelField: 'nickName',
             valueField: 'id',
@@ -432,6 +434,7 @@
             },
             showSearch: true,
             resultField: 'list',
+            optionFilterProp: 'label',
             labelField: 'nickName',
             valueField: 'id',
             immediate: true,

+ 1 - 0
src/views/staff/detailsModal.vue

@@ -148,6 +148,7 @@
             resultField: 'list',
             labelField: 'name',
             valueField: 'id',
+            optionFilterProp: 'label',
             immediate: true,
             params: {
               page: 1,