【更新】前端增加编辑机构判断登录者是否为超管而展示不同的树
This commit is contained in:
parent
7ea83d770a
commit
ad69372226
@ -70,6 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import store from '@/store'
|
||||||
import { sysOrgAdd, getOrgTree } from '@/api/modular/system/orgManage'
|
import { sysOrgAdd, getOrgTree } from '@/api/modular/system/orgManage'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
@ -106,14 +107,20 @@
|
|||||||
this.orgTree = []
|
this.orgTree = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.orgTree = [{
|
const admintype = store.getters.admintype
|
||||||
'id': '-1',
|
// eslint-disable-next-line eqeqeq
|
||||||
'parentId': '0',
|
if (admintype == '1') {
|
||||||
'title': '顶级',
|
this.orgTree = [{
|
||||||
'value': '0',
|
'id': '-1',
|
||||||
'pid': '0',
|
'parentId': '0',
|
||||||
'children': res.data
|
'title': '顶级',
|
||||||
}]
|
'value': '0',
|
||||||
|
'pid': '0',
|
||||||
|
'children': res.data
|
||||||
|
}]
|
||||||
|
} else {
|
||||||
|
this.orgTree = res.data
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import store from '@/store'
|
||||||
import { sysOrgEdit, getOrgTree } from '@/api/modular/system/orgManage'
|
import { sysOrgEdit, getOrgTree } from '@/api/modular/system/orgManage'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
@ -128,14 +129,20 @@
|
|||||||
this.orgTree = []
|
this.orgTree = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.orgTree = [{
|
const admintype = store.getters.admintype
|
||||||
'id': '-1',
|
// eslint-disable-next-line eqeqeq
|
||||||
'parentId': '0',
|
if (admintype == '1') {
|
||||||
'title': '顶级',
|
this.orgTree = [{
|
||||||
'value': '0',
|
'id': '-1',
|
||||||
'pid': '0',
|
'parentId': '0',
|
||||||
'children': res.data
|
'title': '顶级',
|
||||||
}]
|
'value': '0',
|
||||||
|
'pid': '0',
|
||||||
|
'children': res.data
|
||||||
|
}]
|
||||||
|
} else {
|
||||||
|
this.orgTree = res.data
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user