|
@@ -42,7 +42,8 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="按角色" name="second" style="height: 400px;">
|
|
|
+ <!-- v-hasPermi="['sys_dept:M'] == true ? jue = 0 :jue = 1" -->
|
|
|
+ <el-tab-pane v-if="['sys_dept:M'] == true ? jue = 0 :jue = 1" label="按角色" name="second" style="height: 400px;">
|
|
|
<treeselect v-model="form.parentId" :options="deptOptionstwo" :normalizer="normalizer" :flat="true" :maxHeight="150" @select="djieskle" placeholder="点击选择角色" />
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="按组" name="third" style="height: 400px;">
|
|
@@ -121,6 +122,7 @@ import { getTableQuery, getQueryList, tableSubimt, tableSubimtanit, addbjectSave
|
|
|
|
|
|
import { group, getRole, getPersonnel, getMembers,delRoleses } from '@/api/system/election';
|
|
|
import { listDept } from '@/api/system/dept';
|
|
|
+import { getInfo } from '@/api/login';
|
|
|
import { listRole } from '@/api/system/role';
|
|
|
import { treeselect } from '@/api/system/dept';
|
|
|
import Treeselect from '@riophae/vue-treeselect';
|
|
@@ -172,10 +174,20 @@ export default {
|
|
|
dhiuw:[],
|
|
|
// 组id
|
|
|
elezu:0,
|
|
|
- jeihqdcee:[]
|
|
|
+ jeihqdcee:[],
|
|
|
+ jue:false,
|
|
|
+ buemg:false,
|
|
|
+ zuge:false,
|
|
|
+ iuid:0
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.iuid = this.$route.query.id - 0;
|
|
|
+ this.jegeuser()
|
|
|
+ this.members(this.iuid,1)
|
|
|
+ },
|
|
|
mounted() {
|
|
|
+ console.log(this.jue)
|
|
|
this.getTreeselect();
|
|
|
// this.staff(100)
|
|
|
// this.getUser();
|
|
@@ -274,7 +286,7 @@ export default {
|
|
|
console.log(node, instanceId);
|
|
|
},
|
|
|
djieskletwo(node, instanceId) {
|
|
|
- this.members(node.id);
|
|
|
+ this.members(node.id,2);
|
|
|
this.elezu = node.id
|
|
|
console.log(node, instanceId);
|
|
|
},
|
|
@@ -376,7 +388,7 @@ export default {
|
|
|
console.log(eledete)
|
|
|
// this.elezu
|
|
|
this.loading = true;
|
|
|
- delRoleses(this.elezu,eledete).then(response => {
|
|
|
+ delRoleses(this.iuid,eledete).then(response => {
|
|
|
// this.lisehtwo = response.data;
|
|
|
// this.dhiuw = response.data
|
|
|
if(response.code == 200){
|
|
@@ -478,42 +490,71 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 按照组查询人员
|
|
|
- members(index) {
|
|
|
- let hueg = []
|
|
|
- let jheugq = []
|
|
|
- hueg = this.lisehtwo
|
|
|
- this.loading = true;
|
|
|
- console.log(this.lisehtwo)
|
|
|
- this.lisehtwo.splice(0,this.dhiuw.length-2)
|
|
|
- console.log(this.lisehtwo)
|
|
|
- console.log(this.dhiuw.length-2)
|
|
|
- this.liseh = []
|
|
|
- // for (let i = this.dhiuw.length - 1; i >= 0; i--) {
|
|
|
- // if (this.dhiuw[i].id == urls) {
|
|
|
- // this.config.splice(i, 1);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.jeihqdcee = this.lisehtwo
|
|
|
- getMembers(index).then(response => {
|
|
|
- // this.deptOptionsthre = this.handleTree(response.data, "id"); this.liseh = response.data;
|
|
|
- // response.data
|
|
|
- // this.lisehtwo.push(response.data)
|
|
|
- // this.lisehtwo = []
|
|
|
- this.dhiuw = []
|
|
|
- this.dhiuw = response.data
|
|
|
- console.log(this.dhiuw,87)
|
|
|
- if(this.dhiuw.length == 0){
|
|
|
- console.log(34,this.dhiuw)
|
|
|
- this.lisehtwo = this.jeihqdcee
|
|
|
- }else{
|
|
|
- // this.dhiuw.filter(route=>{
|
|
|
- // this.lisehtwo.push(route)
|
|
|
- this.lisehtwo = this.lisehtwo.concat(this.dhiuw)
|
|
|
- // })
|
|
|
- }
|
|
|
+ members(index,val) {
|
|
|
+ if(val == 1){
|
|
|
+ // 最外层
|
|
|
+ let hueg = []
|
|
|
+ let jheugq = []
|
|
|
+ hueg = this.lisehtwo
|
|
|
+ this.loading = true;
|
|
|
+ console.log(this.lisehtwo)
|
|
|
+ this.lisehtwo.splice(0,this.dhiuw.length-2)
|
|
|
+ console.log(this.lisehtwo)
|
|
|
+ console.log(this.dhiuw.length-2)
|
|
|
+ this.liseh = []
|
|
|
+ // for (let i = this.dhiuw.length - 1; i >= 0; i--) {
|
|
|
+ // if (this.dhiuw[i].id == urls) {
|
|
|
+ // this.config.splice(i, 1);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.jeihqdcee = this.lisehtwo
|
|
|
+ getMembers(index).then(response => {
|
|
|
+ // this.deptOptionsthre = this.handleTree(response.data, "id"); this.liseh = response.data;
|
|
|
+ // response.data
|
|
|
+ // this.lisehtwo.push(response.data)
|
|
|
+ // this.lisehtwo = []
|
|
|
+ this.dhiuw = []
|
|
|
+ this.dhiuw = response.data
|
|
|
+ console.log(this.dhiuw,87)
|
|
|
+ if(this.dhiuw.length == 0){
|
|
|
+ console.log(34,this.dhiuw)
|
|
|
+ this.lisehtwo = this.jeihqdcee
|
|
|
+ }else{
|
|
|
+ // this.dhiuw.filter(route=>{
|
|
|
+ // this.lisehtwo.push(route)
|
|
|
+ this.lisehtwo = this.lisehtwo.concat(this.dhiuw)
|
|
|
+ // })
|
|
|
+ }
|
|
|
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ }else if(val == 2){
|
|
|
+ // 里层点击
|
|
|
+ getMembers(index).then(response => {
|
|
|
+ this.liseh = response.data;
|
|
|
+ this.dhiuw = response.data
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //获取权限
|
|
|
+ jegeuser(){
|
|
|
+ getInfo().then(res =>{
|
|
|
+ console.log(res.permissions)
|
|
|
+ res.permissions.filter( route =>{
|
|
|
+ if(route == 'system:role:list'){
|
|
|
+ this.jue = true
|
|
|
+ }
|
|
|
+ if(route == 'system:user:list'){
|
|
|
+ this.buemg = true
|
|
|
+ }
|
|
|
+ if(route == 'system:group:index'){
|
|
|
+ this.zuge = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // this.jue
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|