Browse Source

修改个人工作台单位获取接口

xieqy 3 years ago
parent
commit
074e4eca6f
2 changed files with 15 additions and 14 deletions
  1. 14 14
      src/widgets/PersonWorkbench/Widget.ts
  2. 1 0
      src/widgets/PersonWorkbench/config.json

+ 14 - 14
src/widgets/PersonWorkbench/Widget.ts

@@ -454,7 +454,7 @@ class PersonWorkbench extends BaseWidget {
         // dom.empty().append(html);
         // this.ajaxSend.selectSearch(dom);//本方法用于对对下拉框进行搜索初始化   
         var that=this
-        var url = this.apiRoot + this.config.getUnit;
+        var url = this.apiRoot + this.config.getUnitNew;
         dom.select2().select2({
             language: "zh-CN",
             // width: "220px",
@@ -467,28 +467,28 @@ class PersonWorkbench extends BaseWidget {
                 contentType: "application/json;charset=utf-8",
                 data: (params) => {
                     var query = {
-                        current: params.page || 1,
-                        size: 20,
-                        name: params.term,
-                        prjId: that.AppX.appConfig.currentPrj,
-                        departmentType:"CON,SPV,VEN"
+                        // current: params.page || 1,
+                        // size: 20,
+                        // name: params.term,
+                        // prjId: that.AppX.appConfig.currentPrj,
+                        // departmentType:"CON,SPV,VEN"
                     }
                     return query;
                 },
                 processResults: (data) => {
                     let nodes = [];
-                    if (data.code != 1) {
-                        console.error(data.message);
-                        return { results: nodes };
-                    }
-                    nodes = data.result.records.map(item => {
+                    // if (data.code != 1) {
+                    //     console.error(data.message);
+                    //     return { results: nodes };
+                    // }
+                    nodes = data.result.map(item => {
                         return { id: item.name, text: item.name };
                     })
                     return {
                         results: nodes,
-                        pagination: {
-                            more: data.result.current < data.result.pages
-                        }
+                        // pagination: {
+                        //     more: data.result.current < data.result.pages
+                        // }
                     }
                 }
             }

+ 1 - 0
src/widgets/PersonWorkbench/config.json

@@ -13,6 +13,7 @@
     "otherCount":"/tofly-sxgk/personWork/otherCount",
     "getPbsList":"/tofly-sxgk/structure/list",
     "getUnit":"/base/department/pageFilterPrj",
+    "getUnitNew":"/tofly-sxgk/contract/getContructDepartment",
     "pagesize": [
         10,
         25,