|
@@ -11,19 +11,19 @@
|
|
</div>
|
|
</div>
|
|
<div class="binding-con" :style="{height:(Math.ceil(auth.length/4)*30 + 140)+'px'}">
|
|
<div class="binding-con" :style="{height:(Math.ceil(auth.length/4)*30 + 140)+'px'}">
|
|
<div class="binding-body cooperation">
|
|
<div class="binding-body cooperation">
|
|
- <template v-if="!cooName">
|
|
|
|
|
|
+ <template >
|
|
<div class="toclient">{{lang==='en'?'Collaborator':`协作用户`}}</div>
|
|
<div class="toclient">{{lang==='en'?'Collaborator':`协作用户`}}</div>
|
|
<div class="b-input" >
|
|
<div class="b-input" >
|
|
<input v-model="userName" :placeholder="lang==='en'?'User name':'请输入用户账号'" type="text">
|
|
<input v-model="userName" :placeholder="lang==='en'?'User name':'请输入用户账号'" type="text">
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
- <template v-else>
|
|
|
|
|
|
+ <!-- <template v-else>
|
|
<div class="toclient">{{lang==='en'?'Collaborator':`协作用户`}}</div>
|
|
<div class="toclient">{{lang==='en'?'Collaborator':`协作用户`}}</div>
|
|
<div class="b-input" >
|
|
<div class="b-input" >
|
|
{{cooName}}
|
|
{{cooName}}
|
|
</div>
|
|
</div>
|
|
- </template>
|
|
|
|
|
|
+ </template> -->
|
|
|
|
|
|
<div class="toclient"><span>{{lang==='en'?'Permission':'协作权限'}}</span><div @click="handleSelectAll" v-if="!cooName"><span :class="{check_active:selectAll}" class="fdcheck">{{lang==='en'?'All':'全选'}}</span></div></div>
|
|
<div class="toclient"><span>{{lang==='en'?'Permission':'协作权限'}}</span><div @click="handleSelectAll" v-if="!cooName"><span :class="{check_active:selectAll}" class="fdcheck">{{lang==='en'?'All':'全选'}}</span></div></div>
|
|
<ul class="auth-list">
|
|
<ul class="auth-list">
|
|
@@ -40,6 +40,7 @@
|
|
|
|
|
|
<template v-else>
|
|
<template v-else>
|
|
<span class="default" @click="unbind">{{lang==='en'?'Cancel collaborator':'取消协作'}}</span>
|
|
<span class="default" @click="unbind">{{lang==='en'?'Cancel collaborator':'取消协作'}}</span>
|
|
|
|
+ <span @click="addCooperation">{{lang==='en'?'OK':'确定'}}</span>
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -82,11 +83,14 @@ export default {
|
|
this.selectAll = !this.cooName
|
|
this.selectAll = !this.cooName
|
|
this.getResoureList()
|
|
this.getResoureList()
|
|
}
|
|
}
|
|
- this.userName = ''
|
|
|
|
|
|
+ this.userName = this.cooName || ''
|
|
this.lang = localStorage.getItem('language')
|
|
this.lang = localStorage.getItem('language')
|
|
this.toastCode = this.lang === 'en' ? toastEN : toastZH
|
|
this.toastCode = this.lang === 'en' ? toastEN : toastZH
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ mounted () {
|
|
|
|
+
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
async unbind () {
|
|
async unbind () {
|
|
let token = localStorage.getItem('token')
|
|
let token = localStorage.getItem('token')
|
|
@@ -123,10 +127,10 @@ export default {
|
|
this.selectAll = !this.selectAll
|
|
this.selectAll = !this.selectAll
|
|
},
|
|
},
|
|
selectItem (item, i) {
|
|
selectItem (item, i) {
|
|
- if (this.cooName) {
|
|
|
|
- // this.userName = this.cooName
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.cooName) {
|
|
|
|
+ // this.userName = this.cooName
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
item.hasAuth = !item.hasAuth
|
|
item.hasAuth = !item.hasAuth
|
|
this.$set(this.auth, i, item)
|
|
this.$set(this.auth, i, item)
|
|
this.lock = true
|
|
this.lock = true
|