|
|
@ -61,8 +61,8 @@ |
|
|
|
<el-table-column prop="createdTime" label="添加时间" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="170"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-if="scope.row.manageFlag == '1'" type="text" size="small" @click="updateManageFlagHandle(scope.row.id,'解除管理员')">解除管理员</el-button> |
|
|
|
<el-button v-if="scope.row.manageFlag == '0'" type="text" size="small" @click="updateManageFlagHandle(scope.row.id,'设置管理员')">设置管理员</el-button> |
|
|
|
<el-button v-if="scope.row.manageFlag == '1'" type="text" size="small" @click="cancelManageFlagHandle(scope.row.id)">解除管理员</el-button> |
|
|
|
<el-button v-if="scope.row.manageFlag == '0'" type="text" size="small" @click="setManageFlagHandle(scope.row.id)">设置管理员</el-button> |
|
|
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|
|
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|
|
|
</template> |
|
|
@ -79,6 +79,26 @@ |
|
|
|
</el-pagination> |
|
|
|
<!-- 弹窗, 新增 / 修改 --> |
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|
|
|
<el-dialog |
|
|
|
title="确认要设置管理员身份吗?" |
|
|
|
:visible.sync="setManagerDialog" |
|
|
|
width="30%"> |
|
|
|
<span>将该成员设置为管理员身份,管理员可以将通知和话题置顶、关闭等权限。</span> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="setManagerDialog = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="updateManageFlagHandle" :disabled="disAbled">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
title="确认要解除管理员身份吗?" |
|
|
|
:visible.sync="cancelManagerDialog" |
|
|
|
width="30%"> |
|
|
|
<span>将该成员的管理权限解除,解除后无法管理,不能置顶、关闭等权限。</span> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="cancelManagerDialog = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="updateManageFlagHandle" :disabled="disAbled">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</template> |
|
|
@ -114,7 +134,11 @@ export default { |
|
|
|
return time.getTime() < new Date(EndDateVal).getTime() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
updateManageFlagId: '', |
|
|
|
disAbled: false, |
|
|
|
setManagerDialog: false, |
|
|
|
cancelManagerDialog: false |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
@ -135,25 +159,31 @@ export default { |
|
|
|
return '管理员' |
|
|
|
} |
|
|
|
}, |
|
|
|
updateManageFlagHandle (id, promptInfo) { |
|
|
|
this.$confirm(this.$t('prompt.info', { 'handle': promptInfo }), this.$t('prompt.title'), { |
|
|
|
confirmButtonText: this.$t('confirm'), |
|
|
|
cancelButtonText: this.$t('cancel'), |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http.get(`/cloudAnalysis/masteruserrelation/updateManageFlag/` + id).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
setManageFlagHandle (id) { |
|
|
|
this.setManagerDialog = true |
|
|
|
this.updateManageFlagId = id |
|
|
|
}, |
|
|
|
cancelManageFlagHandle (id) { |
|
|
|
this.cancelManagerDialog = true |
|
|
|
this.updateManageFlagId = id |
|
|
|
}, |
|
|
|
updateManageFlagHandle () { |
|
|
|
this.disAbled = true |
|
|
|
this.$http.get(`/cloudAnalysis/masteruserrelation/updateManageFlag/${this.updateManageFlagId}`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.setManagerDialog = false |
|
|
|
this.cancelManagerDialog = false |
|
|
|
this.disAbled = false |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500, |
|
|
|
onClose: () => { |
|
|
|
this.getDataList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
} |
|
|
|