优化代码
This commit is contained in:
parent
ae288e8ace
commit
d38fe65d2b
|
@ -12,7 +12,8 @@
|
|||
<el-table-column prop="organizationName" :label="$t('workspace.organization_name')"/>
|
||||
<el-table-column :label="$t('commons.member')">
|
||||
<template v-slot:default="scope">
|
||||
<el-button type="text" class="member-size" @click="cellClick(scope.row)">{{scope.row.memberSize}}
|
||||
<el-button type="text" class="member-size" @click="cellClick(scope.row)">
|
||||
{{scope.row.memberSize}}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -85,7 +86,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- dialog of workspace member -->
|
||||
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeWsMemberDialog">
|
||||
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="dialogSearch"
|
||||
:create-tip="dialogBtnTips" :title="$t('commons.member')"/>
|
||||
<!-- organization member table -->
|
||||
|
@ -112,7 +113,7 @@
|
|||
<!-- add workspace member dialog -->
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="dialogWsMemberAddVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
@close="closeWsMemberAddDialog">
|
||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
|
||||
size="small">
|
||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||
|
@ -152,7 +153,7 @@
|
|||
<!-- update workspace member dialog -->
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="dialogWsMemberUpdateVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
@close="closeWsMemberUpdateDialog">
|
||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||
|
@ -180,7 +181,7 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')" @keydown.enter.native.prevent
|
||||
<el-button type="primary" @click="updateWorkspaceMember('updateUserForm')" @keydown.enter.native.prevent
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
|
@ -232,7 +233,6 @@
|
|||
},
|
||||
addMember() {
|
||||
this.dialogWsMemberAddVisible = true;
|
||||
this.memberForm = {};
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.$set(this.memberForm, "userList", response.data);
|
||||
});
|
||||
|
@ -318,13 +318,16 @@
|
|||
|
||||
});
|
||||
},
|
||||
closeFunc() {
|
||||
this.form = {};
|
||||
closeWsMemberAddDialog() {
|
||||
this.memberForm = {};
|
||||
},
|
||||
closeMemberFunc() {
|
||||
closeWsMemberDialog() {
|
||||
this.memberLineData = [];
|
||||
this.list();
|
||||
},
|
||||
closeWsMemberUpdateDialog() {
|
||||
this.dialogSearch();
|
||||
},
|
||||
list() {
|
||||
let url = '/workspace/list/all/' + this.currentPage + '/' + this.pageSize;
|
||||
this.result = this.$post(url, this.condition, response => {
|
||||
|
@ -385,7 +388,7 @@
|
|||
this.$info(this.$t('commons.delete_cancel'));
|
||||
});
|
||||
},
|
||||
updateOrgMember() {
|
||||
updateWorkspaceMember() {
|
||||
let param = {
|
||||
id: this.memberForm.id,
|
||||
name: this.memberForm.name,
|
||||
|
|
Loading…
Reference in New Issue