手机同步钉钉组织架构
@@ -25,7 +22,7 @@
:pagination="false"
:dataSource="data">
- 角色授权
+ 角色授权
@@ -120,24 +117,16 @@
},
data() {
return {
- searchValue: '',
- visible:false,
- roleVisible:false,
treeData: [],
- root:{
- title:'',
- key : '0',
- isLeaf:false,
- id:''
- },
+ root:{key : '0'},
data,
columns,
+ organId:''
}
},
methods: {
getRoot(){
- getRootOrgan(this.$store.getters.getOrganId).then(res=>{
- console.log(res)
+ getRootOrgan(this.organId).then(res=>{
if(res){
this.root.title = res.name
this.root.isLeaf = res.leaf
@@ -154,7 +143,6 @@
return
}
getChildrenOrgan(treeNode.$options.propsData.dataRef.id).then(res=>{
- console.log(res)
treeNode.dataRef.children = res.map((item,index)=>{
item.key = `${treeNode.eventKey}-${index}`
return item
@@ -164,10 +152,8 @@
})
})
},
- onExpand(expandedKeys) {
- console.log(expandedKeys)
- // this.expandedKeys = expandedKeys
- // this.autoExpandParent = false
+ onSearch(value) {
+ console.log(value)
},
//分页
size(size) {
@@ -176,46 +162,14 @@
page(page){
console.log(page)
},
- //添加
- addMenber(){
- this.visible = true
- console.log('111')
- },
- //取消
- cancel(flag){
- this.visible = flag
- },
- //授权
- scopeOk(flag){
- this.roleVisible = flag
- },
- cancelScope(flag){
- this.roleVisible = flag
+ //授权
+ scope(){
},
- //添加
- addOrgan(flag){
- this.visible = flag
- }
},
created(){
+ this.organId = JSON.parse(localStorage.getItem('user')).sysOrganization.id
this.getRoot()
},
- computed: {
- rowSelection() {
- const {selectedRowKeys} = this;
- return {
- onChange: (selectedRowKeys, selectedRows) => {
- console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
- },
- getCheckboxProps: record => ({
- props: {
- disabled: record.name === 'Disabled User', // Column configuration not to be checked
- name: record.name,
- }
- }),
- }
- }
- },
}
@@ -224,7 +178,6 @@
display: flex;
height: 100%;
}
-
.search {
width: 302px;
padding: 35px 30px 0 40px;
@@ -246,7 +199,7 @@
height: 70px;
padding-right: 32px;
display: flex;
- justify-content: flex-end;
+ justify-content: space-between;
align-items: center;
}
diff --git a/src/views/loading/Loading.vue b/src/views/loading/Loading.vue
index 941faeb4a864fdf56ec5b56c5f0dc8355a8b85be..7d39143f03357319f384a6a475ddac41e4f7eb25 100644
--- a/src/views/loading/Loading.vue
+++ b/src/views/loading/Loading.vue
@@ -11,7 +11,7 @@
return{
id:'',
spin:true,
- title:'加载用户信息中...'
+ title:'登录中...'
}
},
methods:{
@@ -22,20 +22,20 @@
this.getCode(result.code,this.id)
},
onFail : err=> {
- this.$message.error('请求失败,重试');
+ this.$message.error('访问出错了');
}
})
},
getCode(code,id){
- login(code,id).then(res=>{
- console.log(res)
+ login(code,id)
+ .then(res=>{
let data = res.datas
if(res.resp_code === 0){
+ this.title='加载用户信息中...'
localStorage.setItem('assToken',data.access_token)
getUserData().then(res=>{
- console.log(res)
if(res.resp_code === 0){
- localStorage.setItem('user',res.datas)
+ localStorage.setItem('user',JSON.stringify(res.datas))
this.$router.replace({
name:'conOrgan'
})
@@ -46,21 +46,21 @@
}else{
this.$message.error(res.resp_msg);
}
- }).catch(err=>{
+ })
+ .catch(err=>{
this.$message.error('请求失败,请稍后重试');
})
}
},
created() {
this.id = this.$route.query.corpid
- localStorage.setItem('cropId',this.id)
- this.$store.commit('setCropId',this.id)
- this.signIn()
- // setTimeout(()=>{
- // this.$router.replace({
- // name:'conOrgan'
- // })
- // },500)
+ localStorage.setItem('cropId',this.id)
+ // this.signIn()
+ setTimeout(()=>{
+ this.$router.replace({
+ name:'conOrgan'
+ })
+ },500)
}
}