diff --git a/project/hlj/app/AppMicrodiskManage/AppMicrodiskManage.vue b/project/hlj/app/AppMicrodiskManage/AppMicrodiskManage.vue
index 370a84d1..4d368090 100644
--- a/project/hlj/app/AppMicrodiskManage/AppMicrodiskManage.vue
+++ b/project/hlj/app/AppMicrodiskManage/AppMicrodiskManage.vue
@@ -8,7 +8,6 @@
-
-
diff --git a/project/hlj/app/AppMicrodiskManage/components/List.vue b/project/hlj/app/AppMicrodiskManage/components/List.vue
index 36b42d51..3b353f7a 100644
--- a/project/hlj/app/AppMicrodiskManage/components/List.vue
+++ b/project/hlj/app/AppMicrodiskManage/components/List.vue
@@ -51,18 +51,9 @@
-
+ 权限管理
-
+
+
+ 添加成员
+
+
+
+
+
+ 设置管理员
+ 移除
+
+
+
+
+
@@ -108,7 +126,10 @@
data() {
return {
+ isShowAuth: false,
isShowMenu: false,
+ authInfos: [],
+ isShowUser: true,
menuInfo: {
x: '',
y: '',
@@ -136,12 +157,24 @@
{ prop: 'ctime', label: '文件创建时间', formart: v => v ? this.$moment(v * 1000).format('YYYY-MM-DD HH:mm:ss') : '-' },
// { prop: 'departmentNames', label: '创建人' }
],
+ authColConfigs: [
+ { prop: 'name', label: '姓名' },
+ { prop: 'auth', label: '权限', align: 'center', formart: v => v === 7 ? '管理员' : '成员' }
+ ],
defaultProps: {
children: 'children',
label: 'fileName'
},
tableData: [],
- directoryList: []
+ isShowUser: true,
+ directoryList: [],
+ authList: []
+ }
+ },
+
+ computed: {
+ disabledList () {
+ return this.authList.map(v => v.wxUserId)
}
},
@@ -153,10 +186,51 @@
mounted () {
this.getList()
+ this.getAuthList()
document.querySelector('html').addEventListener('click', this.bindEvent)
},
methods: {
+ getAuthList () {
+ this.instance.post(`/app/wxwedrive/spaceUserInfo`, null, {
+ }).then(res => {
+ if (res.code == 0) {
+ this.authList = res.data.filter(v => v.type === 1).map(v => {
+ return {
+ ...v,
+ id: v.id
+ }
+ })
+ }
+ })
+ },
+
+ onUserChange (e) {
+ this.instance.post(`/app/wxwedrive/spaceAclAdd`, e.map(v => {
+ return {
+ wxUserId: v.id,
+ type: 1,
+ name: v.name,
+ auth: 1
+ }
+ })).then(res => {
+ if (res.code == 0) {
+ this.authInfos = []
+ this.$message.success('添加成功')
+ this.getAuthList()
+
+ this.$nextTick(() => {
+ this.$refs.aiUserSelecter.reset()
+ })
+ }
+ })
+ },
+
+ showAuth () {
+ this.authInfos = []
+ this.isShowAuth = true
+ },
+
loadNode (node, resolve) {
this.instance.post(`/app/wxwedrive/queryWedriveDirectory?spaceid=${node.data.spaceid || ''}&fatherid=${node.data.fileId || ''}`).then(res => {
if (res.code == 0) {
@@ -282,6 +356,28 @@
return data.name.indexOf(value) !== -1
},
+ settingAadmin (id) {
+ this.$confirm('确定设置该成员为管理员?').then(() => {
+ this.instance.post(`/app/wxwedrive/spaceAclAddAdmin?wxUserId=${id}`).then(res => {
+ if (res.code == 0) {
+ this.getAuthList()
+ this.$message.success('设置成功')
+ }
+ })
+ })
+ },
+
+ removeUser (e) {
+ this.$confirm('确定移除该成员?').then(() => {
+ this.instance.post(`/app/wxwedrive/spaceAclDel`, [e]).then(res => {
+ if (res.code == 0) {
+ this.getAuthList()
+ this.$message.success('移除成功')
+ }
+ })
+ })
+ },
+
remove(id) {
this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/app/wxwedrive/fileDelete?fileid=${id}`).then(res => {
diff --git a/ui/packages/common/AiUserSelecter.vue b/ui/packages/common/AiUserSelecter.vue
index 90d0f11e..2b44de89 100644
--- a/ui/packages/common/AiUserSelecter.vue
+++ b/ui/packages/common/AiUserSelecter.vue
@@ -259,6 +259,13 @@
})))
this.userIds = this.chooseUser.map(v => v[this.props.id])
}
+ },
+
+ disabledList: {
+ handler () {
+ this.getList()
+ },
+ deep: true
}
},
@@ -431,7 +438,10 @@
}
}).then(res => {
if (res.code == 0) {
- this.list = res.data.records.map(v => {
+ console.log(this.disabledList)
+ this.list = res.data.records.filter(v => {
+ return this.disabledList.indexOf(v.id) === -1
+ }).map(v => {
return {
...v,
isChecked: false