| | |
| | | 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, |
| | |
| | | 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 = { |
| | |
| | | code: '', |
| | | msg: '', |
| | | roles: [], |
| | | permissions: [] |
| | | permissions: [], |
| | | organization:[], |
| | | }, |
| | | |
| | | mutations: { |
| | |
| | | }, |
| | | SET_PERMISSIONS: (state, permissions) => { |
| | | state.permissions = permissions |
| | | }, |
| | | SET_organization: (state, organization) => { |
| | | state.organization = organization |
| | | } |
| | | }, |
| | | |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | // 拿取机构信息 |
| | | 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 }) { |
| | |
| | | renderSelecter() { |
| | | this.pageData.PageSize = 100; |
| | | this.myValue = this.value; |
| | | |
| | | this.getdataList(); |
| | | }, |
| | | |
| | |
| | | }; //搜索条件 |
| | | |
| | | 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 => { |
| | |
| | | |
| | | created() { |
| | | this.Getnetworkheader(); |
| | | this.getdataList(); |
| | | this.infoid = this.$route.query.id; |
| | | }, |
| | | mounted() { |
| | |
| | | } |
| | | // } |
| | | }, |
| | | // 获取部门数据缓存 |
| | | getdataList() { |
| | | this.$store.dispatch("getdataList").then(() => {}); |
| | | }, |
| | | // 器官分配栏目控制 |
| | | changeorganState(value) { |
| | | let selectedIndex = this.organList.organallocated.findIndex( |