فهرست منبع

删除机构优化

gcj 3 سال پیش
والد
کامیت
03d939efba
2فایلهای تغییر یافته به همراه14 افزوده شده و 6 حذف شده
  1. 12 4
      src/components/Personalcenter/AccountSet.vue
  2. 2 2
      vue.config.js

+ 12 - 4
src/components/Personalcenter/AccountSet.vue

@@ -387,6 +387,7 @@ export default {
     },
     //退出机构
     exitOrg(item) {
+      let _this = this;
       let MethodName = "user_manager-ExitOrg";
       let data = {
         org_id: item.org_id,
@@ -396,7 +397,7 @@ export default {
           this.close(item);
           this.$message.success("退出成功");
           setTimeout(() => {
-            this.getMyOrgList();
+            _this.getMyOrgList("date");
           }, 500);
         })
         .catch((error) => {
@@ -408,7 +409,7 @@ export default {
       item.isPop = false;
     },
     //得到我的机构列表-org_manager-GetMyOrgList
-    getMyOrgList() {
+    getMyOrgList(type) {
       this.myOrgloading = true;
       let MethodName = "org_manager-GetMyOrgList";
       let data = {
@@ -422,6 +423,9 @@ export default {
           return item;
         });
         console.log(this.myOrgList);
+        if (type == "date") {
+          this.getinstitutionList();
+        }
       });
     },
     // 获取机构列表
@@ -434,16 +438,20 @@ export default {
         cur_page: this.pageNum,
       };
       getContent(MethodName, data).then((res) => {
+        console.log(res.org_list);
         this.SelectLoading = false;
         this.total = this.total ? this.total : res.total_count;
-        let orgList = JSON.parse(JSON.stringify(this.orgList));
-        let list = orgList.concat(res.org_list);
+        // let orgList = JSON.parse(JSON.stringify(this.orgList));
+        //let list = orgList.concat(res.org_list);
+        let list = res.org_list;
         this.orgList = this.handleOrgList(JSON.parse(JSON.stringify(list)));
+        console.log(this.orgList);
       });
     },
     //处理数据交集
     handleOrgList(list) {
       let resArr = [];
+      debugger;
       if (this.myOrgList.length > 0) {
         let myOrgId = [];
         this.myOrgList.forEach((item) => {

+ 2 - 2
vue.config.js

@@ -42,8 +42,8 @@ module.exports = {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://gcls.utschool.cn/`,
-        //target: `http://gcls.helxsoft.cn/`,
+        // target: `http://gcls.utschool.cn/`,
+        target: `http://gcls.helxsoft.cn/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''