linwe
2023-12-23 40ec0dfba7bcfbfbd47d86c03fda96be078e2225
src/views/gzll/components/ownersMemberManager.vue
@@ -40,6 +40,14 @@
  } from "@/api/owners/ownersCommittee.js";
  import {
    getUserByDistrictId
  } from "@/api/system/user.js";
  // import {
  //     update as committeeUpdate,
  //   } from "@/api/owners_committee"
  import {
    mapGetters
  } from "vuex";
  import {
@@ -59,6 +67,7 @@
    data() {
      return {
        owners: {},
        userList: [],
        form: {},
        search: {},
        excelBox: false,
@@ -88,19 +97,27 @@
              prop: "userId",
              span: 12,
              labelWidth: 120,
              type: "select",
              type: "tree",
              remote: true,
              hide: true,
              // dicUrl: `/api/blade-system/user/searchUserByDistrictId?districtId={{key}}`,
              dicData: [],
              props: {
                label: 'name',
                value: 'id'
              },
              hide: true,
              dicUrl: `/api/blade-system/user/searchUser?name={{key}}` + `&current=1&size=30`,
              defaultExpandedKeys: [],
              rules: [{
                required: true,
                message: "请选择业委会成员",
                trigger: "blur",
              }, ],
              click({
                column,
                value
              }) {
                console.log(column, value)
              }
            }, {
              label: "名称",
              prop: "name",
@@ -352,6 +369,10 @@
      init(data) {
        this.ownersId = data.id
        this.owners = data
        const column = this.findObject(this.option.column, "userId");
        let arr = []
        arr.push(this.owners.areaId)
        column.defaultExpandedKeys = arr;
        this.onLoad(this.page)
      },
      rowSave(row, done, loading) {
@@ -366,7 +387,7 @@
          });
          done();
        }, error => {
          window.console.log(error);
          // window.console.log(error);
          loading();
        });
      },
@@ -380,7 +401,7 @@
          });
          done();
        }, error => {
          window.console.log(error);
          // window.console.log(error);
          loading();
        });
      },
@@ -445,7 +466,6 @@
        this.excelBox = true;
      },
      uploadAfter(res, done, loading, column) {
        window.console.log(column);
        this.excelBox = false;
        this.refreshChange();
        done();
@@ -478,6 +498,9 @@
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
            const column = this.findObject(this.option.column, "userId");
            console.table(this.userList)
            column.dicData = this.userList;
          });
        }
        this.initFlag = true;
@@ -502,6 +525,11 @@
          this.loading = false;
          this.selectionClear();
        });
        getUserByDistrictId(this.owners.areaId).then(res => {
          const column = this.findObject(this.option.column, "userId");
          this.userList = res.data.data;
          column.dicData = res.data.data;
        })
      }
    }
  };