WXL
2026-03-19 5aa165156994b1b8a601063fa0a1107d1893ea57
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: {
@@ -108,6 +115,7 @@
      console.error("'lazy-load'必须和'filterable'同时使用!");
      return false;
    }
    console.log(456789);
    if (this.lazyLoad) {
      this.focusEvents.func = () => {
@@ -122,9 +130,7 @@
  methods: {
    renderSelecter() {
      this.pageData.PageSize = 100;
      this.dataList = [];
      this.myValue = this.value;
      this.getdataList();
    },
@@ -138,6 +144,23 @@
      }; //搜索条件
      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);
        }
        console.log(this.dataList,'this.dataList');
        this.tempList = this.dataList.map(item => item);
        this.focusEvents.loaded = true;
        this.isLoading = false;
        return;
      }
      listOrganization(searchData)
        .then(response => {