11
WXL
2024-08-14 0ac2d43fce4d74f6eea5a51a2e16af4e6a536c7c
11
已修改4个文件
45 ■■■■■ 文件已修改
src/store/getters.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/components/orgselect/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/donationdetails/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/getters.js
@@ -7,6 +7,7 @@
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  organization: state => state.user.organization,
  introduction: state => state.user.introduction,
  roles: state => state.user.roles,
  permissions: state => state.user.permissions,
src/store/modules/user.js
@@ -1,6 +1,8 @@
import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import {  Message } from 'element-ui'
import { listOrganization } from "@/api/project/organization";
const user = {
@@ -11,7 +13,8 @@
    code: '',
    msg: '',
    roles: [],
    permissions: []
    permissions: [],
    organization:[],
  },
  mutations: {
@@ -35,6 +38,9 @@
    },
    SET_PERMISSIONS: (state, permissions) => {
      state.permissions = permissions
    },
    SET_organization: (state, organization) => {
      state.organization = organization
    }
  },
@@ -101,6 +107,21 @@
        })
      })
    },
    // 拿取机构信息
    getdataList({commit}){
      return new Promise((resolve, reject) => {
        listOrganization({
          organizationtype: 4, //传入的类型
          pageNum: 1,
          pageSize: 100000
        }).then((res) => {
          commit('SET_organization', res.rows)
          resolve()
        }).catch(error => {
          reject(error)
        })
      })
    },
    // 前端 登出
    FedLogOut({ commit }) {
src/views/project/components/orgselect/index.vue
@@ -130,7 +130,6 @@
    renderSelecter() {
      this.pageData.PageSize = 100;
      this.myValue = this.value;
      this.getdataList();
    },
@@ -144,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 => {
src/views/project/donationdetails/index.vue
@@ -2756,6 +2756,7 @@
  created() {
    this.Getnetworkheader();
    this.getdataList();
    this.infoid = this.$route.query.id;
  },
  mounted() {
@@ -3361,6 +3362,10 @@
      }
      // }
    },
    // 获取部门数据缓存
    getdataList() {
      this.$store.dispatch("getdataList").then(() => {});
    },
    // 器官分配栏目控制
    changeorganState(value) {
      let selectedIndex = this.organList.organallocated.findIndex(