index.js 818 Bytes
Newer Older
fukai committed
1 2 3
import Api from "~/service/Api"

export default {
niewei committed
4 5 6
  async getOrgTree () {
    this.queryLoading = true;
    console.log(sessionStorage.getItem("currentOrg").departmentNumber, 222)
fukai committed
7 8 9
    let params = {
      rootBranch: JSON.parse(sessionStorage.getItem("currentOrg")).departmentNumber
    }
fukai committed
10
    let rtnmsg = await Api.post("/admin/bch/getBchTreeByRoot", params);
fukai committed
11 12 13 14 15 16
    if (rtnmsg.respCode == SUCCESS) {
      this.orgTree = rtnmsg.data
      this.orgTree.forEach((item) => {
        this.expandedKeys.push(item.branch);
      });

niewei committed
17
      this.queryLoading = false;
fukai committed
18 19 20
    }
  },
  //获取机构详情
niewei committed
21
  async getJgDetails (data) {
fukai committed
22 23 24
    let params = {
      id: data.id
    }
fukai committed
25
    let rtnmsg = await Api.post("/admin/bch/getBchById", params);
fukai committed
26 27 28 29 30 31
    if (rtnmsg.respCode == SUCCESS) {
      this.bchInfo = rtnmsg.data
    }
  },

}