yxh
yxh
6 天以前 8022f7036945b75f82f2dfc43055623f81ed98f6
src/views/project/components/orgselect/index.vue
@@ -17,7 +17,7 @@
      value-key="organizationid"
      allow-create
      reserve-keyword
      :placeholder="placeholder ? placeholder : '请输入机构名称'"
      :placeholder="placeholder ? placeholder : '请选择'"
      class="full-block"
      ref="selecter"
    >
@@ -42,6 +42,13 @@
    //Select基础属性
    value: {
      type: [String, Array]
    },
    //获取列表
    dataList: {
      type: Array,
      default: function() {
        return [];
      }
    },
    disabled: {
      type: Boolean,
@@ -94,7 +101,7 @@
    return {
      pageData: { pageNum: 1, pageSize: 100 },
      isLoading: false,
      dataList: [],
      // dataList: [],
      tempList: [],
      myValue: this.multiple ? [] : "",
      focusEvents: {
@@ -122,9 +129,7 @@
  methods: {
    renderSelecter() {
      this.pageData.PageSize = 100;
      this.dataList = [];
      this.myValue = this.value;
      this.getdataList();
    },
@@ -138,6 +143,21 @@
      }; //搜索条件
      let userType = { userType: "1" };
      if (this.orgType == 4) {
        let arr = this.$store.state.user.organization;
        this.dataList.push(...arr);
        if (this.isAll) {
          let all = {
            organizationid: "",
            organizationname: "全部"
          };
          this.dataList.unshift(all);
        }
        this.tempList = this.dataList.map(item => item);
        this.focusEvents.loaded = true;
        this.isLoading = false;
        return;
      }
      listOrganization(searchData)
        .then(response => {