修改变量命名
This commit is contained in:
parent
ca497f71b6
commit
afbc7b5060
|
@ -27,7 +27,7 @@
|
|||
:total="total"/>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="$t('workspace.create')" :visible.sync="createVisible" width="30%">
|
||||
<el-dialog :title="$t('workspace.create')" :visible.sync="dialogWsAddVisible" width="30%">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off"/>
|
||||
|
@ -45,7 +45,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- dialog of workspace member -->
|
||||
<el-dialog :visible.sync="memberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="wsMemberList"
|
||||
:create-tip="dialogBtnTips" :title="$t('commons.member')"/>
|
||||
<!-- organization member table -->
|
||||
|
@ -69,12 +69,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<ms-table-pagination :change="wsMemberList" :current-page.sync="currentMemberPage" :page-size.sync="pageMemberSize"
|
||||
:total="memberTotal"/>
|
||||
<ms-table-pagination :change="wsMemberList" :current-page.sync="dialogCurrentPage" :page-size.sync="dialogPageSize"
|
||||
:total="dialogTotal"/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- add workspace member dialog -->
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="dialogWsMemberAddVisible" width="30%" :destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
|
||||
size="small">
|
||||
|
@ -112,7 +112,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- update workspace member dialog -->
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="dialogWsMemberUpdateVisible" width="30%" :destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
|
@ -171,7 +171,7 @@
|
|||
},
|
||||
methods: {
|
||||
create() {
|
||||
this.createVisible = true;
|
||||
this.dialogWsAddVisible = true;
|
||||
this.form = {};
|
||||
},
|
||||
submit(formName) {
|
||||
|
@ -182,7 +182,7 @@
|
|||
saveType = 'update'
|
||||
}
|
||||
this.$post("/workspace/" + saveType, this.form, () => {
|
||||
this.createVisible = false;
|
||||
this.dialogWsAddVisible = false;
|
||||
this.list();
|
||||
Message.success(this.$t('commons.save_success'));
|
||||
});
|
||||
|
@ -192,16 +192,8 @@
|
|||
});
|
||||
},
|
||||
edit(row) {
|
||||
this.createVisible = true;
|
||||
this.dialogWsAddVisible = true;
|
||||
this.form = row;
|
||||
|
||||
// let self = this;
|
||||
// let getUser1 = this.$get("/test/user");
|
||||
// let getUser2 = this.$get("/test/sleep");
|
||||
// this.$all([getUser1, getUser2], function (r1, r2) {
|
||||
// window.console.log(r1.data.data, r2.data.data);
|
||||
// self.loading = false;
|
||||
// });
|
||||
},
|
||||
del(row) {
|
||||
this.$confirm(this.$t('workspace.delete_confirm'), '', {
|
||||
|
@ -250,7 +242,7 @@
|
|||
|
||||
},
|
||||
addMember() {
|
||||
this.addMemberVisible = true;
|
||||
this.dialogWsMemberAddVisible = true;
|
||||
this.memberForm = {};
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.$set(this.memberForm, "userList", response.data);
|
||||
|
@ -262,7 +254,7 @@
|
|||
cellClick(row) {
|
||||
// 保存当前点击的组织信息到currentRow
|
||||
this.currentWorkspaceRow = row;
|
||||
this.memberVisible = true;
|
||||
this.dialogWsMemberVisible = true;
|
||||
let param = {
|
||||
name: '',
|
||||
workspaceId: row.id
|
||||
|
@ -279,12 +271,12 @@
|
|||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.memberTotal = data.itemCount;
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
wsMemberList() {
|
||||
let row = this.currentWorkspaceRow;
|
||||
this.memberVisible = true;
|
||||
this.dialogWsMemberVisible = true;
|
||||
let param = this.dialogCondition;
|
||||
this.$set(param, 'workspaceId', row.id);
|
||||
let path = "/user/ws/member/list";
|
||||
|
@ -299,7 +291,7 @@
|
|||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.memberTotal = data.itemCount;
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
closeFunc() {
|
||||
|
@ -319,7 +311,7 @@
|
|||
};
|
||||
this.result = this.$post("user/ws/member/add", param, () => {
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
this.addMemberVisible = false;
|
||||
this.dialogWsMemberAddVisible = false;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
|
@ -327,7 +319,7 @@
|
|||
});
|
||||
},
|
||||
editMember(row) {
|
||||
this.updateMemberVisible = true;
|
||||
this.dialogWsMemberUpdateVisible = true;
|
||||
this.memberForm = row;
|
||||
let roleIds = this.memberForm.roles.map(r => r.id);
|
||||
this.result = this.$get('/role/list/test', response => {
|
||||
|
@ -361,19 +353,21 @@
|
|||
}
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateMemberVisible = false;
|
||||
this.dialogWsMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
});
|
||||
},
|
||||
buildPagePath(path) {
|
||||
return path + "/" + this.currentMemberPage + "/" + this.pageMemberSize;
|
||||
return path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
loading: false,
|
||||
createVisible: false,
|
||||
dialogWsAddVisible: false,
|
||||
dialogWsMemberVisible: false,
|
||||
dialogWsMemberAddVisible: false,
|
||||
dialogWsMemberUpdateVisible: false,
|
||||
btnTips: this.$t('workspace.create'),
|
||||
dialogBtnTips: this.$t('member.create'),
|
||||
addTips: this.$t('member.create'),
|
||||
|
@ -383,13 +377,9 @@
|
|||
currentPage: 1,
|
||||
pageSize: 5,
|
||||
total: 0,
|
||||
updateVisible: false,
|
||||
memberVisible: false,
|
||||
addMemberVisible: false,
|
||||
updateMemberVisible: false,
|
||||
currentMemberPage: 1,
|
||||
pageMemberSize: 5,
|
||||
memberTotal: 0,
|
||||
dialogCurrentPage: 1,
|
||||
dialogPageSize: 5,
|
||||
dialogTotal: 0,
|
||||
memberLineData: [],
|
||||
memberForm: {},
|
||||
form: {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<ms-table-header :condition.sync="condition" @search="search" @create="create"
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData" @create="create"
|
||||
:create-tip="btnTips" :title="$t('commons.organization')"/>
|
||||
</template>
|
||||
<!-- system menu organization table-->
|
||||
|
@ -29,8 +29,9 @@
|
|||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
</el-card>
|
||||
|
||||
<!-- dialog of organization member -->
|
||||
<el-dialog :visible.sync="memberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<el-dialog :visible.sync="dialogOrgMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="orgMemberList"
|
||||
:create-tip="dialogBtnTips" :title="$t('commons.member')"/>
|
||||
<!-- organization member table -->
|
||||
|
@ -54,13 +55,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<ms-table-pagination :change="orgMemberList" :current-page.sync="currentMemberPage"
|
||||
:page-size.sync="pageMemberSize"
|
||||
:total="memberTotal"/>
|
||||
<ms-table-pagination :change="orgMemberList" :current-page.sync="dialogCurrentPage"
|
||||
:page-size.sync="dialogPageSize"
|
||||
:total="dialogTotal"/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- add organization form -->
|
||||
<el-dialog :title="$t('organization.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc"
|
||||
<el-dialog :title="$t('organization.create')" :visible.sync="dialogOrgAddVisible" width="30%" @closed="closeFunc"
|
||||
:destroy-on-close="true">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||
ref="createOrganization">
|
||||
|
@ -80,7 +81,8 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- update organization form -->
|
||||
<el-dialog :title="$t('organization.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('organization.modify')" :visible.sync="dialogOrgUpdateVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||
ref="updateOrganizationForm">
|
||||
|
@ -101,7 +103,8 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- add organization member form -->
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="dialogOrgMemberAddVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px"
|
||||
size="small">
|
||||
|
@ -139,7 +142,8 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- update organization member form -->
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="dialogOrgMemberUpdateVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
|
@ -192,18 +196,18 @@
|
|||
createPath: '/organization/add',
|
||||
updatePath: '/organization/update',
|
||||
result: {},
|
||||
createVisible: false,
|
||||
updateVisible: false,
|
||||
memberVisible: false,
|
||||
addMemberVisible: false,
|
||||
updateMemberVisible: false,
|
||||
dialogOrgAddVisible: false,
|
||||
dialogOrgUpdateVisible: false,
|
||||
dialogOrgMemberVisible: false,
|
||||
dialogOrgMemberAddVisible: false,
|
||||
dialogOrgMemberUpdateVisible: false,
|
||||
multipleSelection: [],
|
||||
currentPage: 1,
|
||||
pageSize: 5,
|
||||
total: 0,
|
||||
currentMemberPage: 1,
|
||||
pageMemberSize: 5,
|
||||
memberTotal: 0,
|
||||
dialogCurrentPage: 1,
|
||||
dialogPageSize: 5,
|
||||
dialogTotal: 0,
|
||||
currentRow: {},
|
||||
btnTips: this.$t('organization.create'),
|
||||
dialogBtnTips: this.$t('member.create'),
|
||||
|
@ -243,10 +247,10 @@
|
|||
},
|
||||
methods: {
|
||||
create() {
|
||||
this.createVisible = true;
|
||||
this.dialogOrgAddVisible = true;
|
||||
},
|
||||
addMember() {
|
||||
this.addMemberVisible = true;
|
||||
this.dialogOrgMemberAddVisible = true;
|
||||
this.memberForm = {};
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.$set(this.memberForm, "userList", response.data);
|
||||
|
@ -256,11 +260,11 @@
|
|||
})
|
||||
},
|
||||
edit(row) {
|
||||
this.updateVisible = true;
|
||||
this.dialogOrgUpdateVisible = true;
|
||||
this.form = row;
|
||||
},
|
||||
editMember(row) {
|
||||
this.updateMemberVisible = true;
|
||||
this.dialogOrgMemberUpdateVisible = true;
|
||||
this.memberForm = row;
|
||||
let roleIds = this.memberForm.roles.map(r => r.id);
|
||||
this.result = this.$get('/role/list/org', response => {
|
||||
|
@ -272,13 +276,13 @@
|
|||
cellClick(row) {
|
||||
// 保存当前点击的组织信息到currentRow
|
||||
this.currentRow = row;
|
||||
this.memberVisible = true;
|
||||
this.dialogOrgMemberVisible = true;
|
||||
let param = {
|
||||
name: '',
|
||||
organizationId: row.id
|
||||
};
|
||||
let path = "/user/special/org/member/list";
|
||||
this.result = this.$post(path + "/" + this.currentMemberPage + "/" + this.pageMemberSize, param, res => {
|
||||
this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => {
|
||||
let data = res.data;
|
||||
this.memberLineData = data.listObject;
|
||||
let url = "/userrole/list/org/" + row.id;
|
||||
|
@ -288,17 +292,16 @@
|
|||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.memberTotal = data.itemCount;
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
orgMemberList() {
|
||||
let row = this.currentRow;
|
||||
this.memberVisible = true;
|
||||
this.dialogOrgMemberVisible = true;
|
||||
let param = this.dialogCondition;
|
||||
this.$set(param, 'organizationId', row.id);
|
||||
window.console.log(this.dialogCondition)
|
||||
let path = "/user/special/org/member/list";
|
||||
this.result = this.$post(path + "/" + this.currentMemberPage + "/" + this.pageMemberSize, param, res => {
|
||||
this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => {
|
||||
let data = res.data;
|
||||
this.memberLineData = data.listObject;
|
||||
let url = "/userrole/list/org/" + row.id;
|
||||
|
@ -308,7 +311,7 @@
|
|||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.memberTotal = data.itemCount;
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
del(row) {
|
||||
|
@ -345,7 +348,7 @@
|
|||
this.result = this.$post(this.createPath, this.form, () => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.initTableData();
|
||||
this.createVisible = false;
|
||||
this.dialogOrgAddVisible = false;
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
@ -357,7 +360,7 @@
|
|||
if (valide) {
|
||||
this.result = this.$post(this.updatePath, this.form, () => {
|
||||
this.$success(this.$t('commons.modify_success'))
|
||||
this.updateVisible = false;
|
||||
this.dialogOrgUpdateVisible = false;
|
||||
this.initTableData();
|
||||
});
|
||||
} else {
|
||||
|
@ -365,9 +368,6 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.initTableData();
|
||||
},
|
||||
initTableData() {
|
||||
this.result = this.$post(this.queryPath + "/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
|
||||
let data = response.data;
|
||||
|
@ -406,7 +406,7 @@
|
|||
};
|
||||
this.result = this.$post("user/special/org/member/add", param, () => {
|
||||
this.cellClick(this.currentRow);
|
||||
this.addMemberVisible = false;
|
||||
this.dialogOrgMemberAddVisible = false;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
|
@ -424,7 +424,7 @@
|
|||
}
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'))
|
||||
this.updateMemberVisible = false;
|
||||
this.dialogOrgMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentRow);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</el-card>
|
||||
|
||||
<!-- add workspace dialog -->
|
||||
<el-dialog :title="$t('workspace.create')" :visible.sync="createVisible" width="30%">
|
||||
<el-dialog :title="$t('workspace.create')" :visible.sync="dialogWsAddVisible" width="30%">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off"/>
|
||||
|
@ -56,7 +56,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- update workspace dialog -->
|
||||
<el-dialog :title="$t('workspace.update')" :visible.sync="updateVisible" width="30%">
|
||||
<el-dialog :title="$t('workspace.update')" :visible.sync="dialogWsUpdateVisible" width="30%">
|
||||
<el-form :model="form" :rules="rules" ref="updateForm" label-position="right" label-width="100px" size="small">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off"/>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- dialog of workspace member -->
|
||||
<el-dialog :visible.sync="memberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc">
|
||||
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="wsMemberList"
|
||||
:create-tip="dialogBtnTips" :title="$t('commons.member')"/>
|
||||
<!-- organization member table -->
|
||||
|
@ -110,13 +110,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<ms-table-pagination :change="wsMemberList" :current-page.sync="currentMemberPage"
|
||||
:page-size.sync="pageMemberSize"
|
||||
:total="memberTotal"/>
|
||||
<ms-table-pagination :change="wsMemberList" :current-page.sync="dialogCurrentPage"
|
||||
:page-size.sync="dialogPageSize"
|
||||
:total="dialogTotal"/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- add workspace member dialog -->
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="dialogWsMemberAddVisible" width="30%" :destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
|
||||
size="small">
|
||||
|
@ -153,7 +153,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- update workspace member dialog -->
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true"
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="dialogWsMemberUpdateVisible" width="30%" :destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
|
@ -206,7 +206,7 @@
|
|||
},
|
||||
methods: {
|
||||
create() {
|
||||
this.createVisible = true;
|
||||
this.dialogWsAddVisible = true;
|
||||
this.form = {};
|
||||
this.$get("/organization/list", response => {
|
||||
this.$set(this.form, "orgList", response.data);
|
||||
|
@ -220,7 +220,7 @@
|
|||
saveType = 'update'
|
||||
}
|
||||
this.result = this.$post("/workspace/" + saveType, this.form, () => {
|
||||
this.createVisible = false;
|
||||
this.dialogWsAddVisible = false;
|
||||
this.list();
|
||||
Message.success(this.$t('commons.save_success'));
|
||||
});
|
||||
|
@ -230,7 +230,7 @@
|
|||
});
|
||||
},
|
||||
addMember() {
|
||||
this.addMemberVisible = true;
|
||||
this.dialogWsMemberAddVisible = true;
|
||||
this.memberForm = {};
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.$set(this.memberForm, "userList", response.data);
|
||||
|
@ -242,13 +242,13 @@
|
|||
cellClick(row) {
|
||||
// 保存当前点击的组织信息到currentRow
|
||||
this.currentWorkspaceRow = row;
|
||||
this.memberVisible = true;
|
||||
this.dialogWsMemberVisible = true;
|
||||
let param = {
|
||||
name: '',
|
||||
workspaceId: row.id
|
||||
};
|
||||
let path = "/user/special/ws/member/list";
|
||||
this.result = this.$post(this.buildPagePath(path), param, res => {
|
||||
this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => {
|
||||
let data = res.data;
|
||||
this.memberLineData = data.listObject;
|
||||
let url = "/userrole/list/ws/" + row.id;
|
||||
|
@ -259,16 +259,16 @@
|
|||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.memberTotal = data.itemCount;
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
wsMemberList() {
|
||||
let row = this.currentWorkspaceRow;
|
||||
this.memberVisible = true;
|
||||
this.dialogWsMemberVisible = true;
|
||||
let param = this.dialogCondition;
|
||||
this.$set(param, 'workspaceId', row.id);
|
||||
let path = "/user/special/ws/member/list";
|
||||
this.result = this.$post(this.buildPagePath(path), param, res => {
|
||||
this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => {
|
||||
let data = res.data;
|
||||
this.memberLineData = data.listObject;
|
||||
let url = "/userrole/list/ws/" + row.id;
|
||||
|
@ -279,11 +279,11 @@
|
|||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.memberTotal = data.itemCount;
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
edit(row) {
|
||||
this.updateVisible = true;
|
||||
this.dialogWsUpdateVisible = true;
|
||||
// copy user
|
||||
this.form = Object.assign({}, row);
|
||||
this.$get("/organization/list", response => {
|
||||
|
@ -295,7 +295,7 @@
|
|||
if (valide) {
|
||||
this.result = this.$post("/workspace/special/update", this.form, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateVisible = false;
|
||||
this.dialogWsUpdateVisible = false;
|
||||
this.list();
|
||||
});
|
||||
} else {
|
||||
|
@ -346,9 +346,6 @@
|
|||
this.total = data.itemCount;
|
||||
});
|
||||
},
|
||||
buildPagePath(path) {
|
||||
return path + "/" + this.currentMemberPage + "/" + this.pageMemberSize;
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -359,7 +356,7 @@
|
|||
};
|
||||
this.result = this.$post("user/special/ws/member/add", param, () => {
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
this.addMemberVisible = false;
|
||||
this.dialogWsMemberAddVisible = false;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
|
@ -367,7 +364,7 @@
|
|||
});
|
||||
},
|
||||
editMember(row) {
|
||||
this.updateMemberVisible = true;
|
||||
this.dialogWsMemberUpdateVisible = true;
|
||||
this.memberForm = row;
|
||||
let roleIds = this.memberForm.roles.map(r => r.id);
|
||||
this.result = this.$get('/role/list/test', response => {
|
||||
|
@ -401,7 +398,7 @@
|
|||
}
|
||||
this.result = this.$post("/workspace/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.updateMemberVisible = false;
|
||||
this.dialogWsMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentWorkspaceRow);
|
||||
});
|
||||
},
|
||||
|
@ -409,11 +406,11 @@
|
|||
data() {
|
||||
return {
|
||||
result: {},
|
||||
createVisible: false,
|
||||
updateVisible: false,
|
||||
memberVisible: false,
|
||||
addMemberVisible: false,
|
||||
updateMemberVisible: false,
|
||||
dialogWsAddVisible: false,
|
||||
dialogWsUpdateVisible: false,
|
||||
dialogWsMemberVisible: false,
|
||||
dialogWsMemberAddVisible: false,
|
||||
dialogWsMemberUpdateVisible: false,
|
||||
btnTips: this.$t('workspace.create'),
|
||||
dialogBtnTips: this.$t('member.create'),
|
||||
addTips: this.$t('member.create'),
|
||||
|
@ -423,9 +420,9 @@
|
|||
currentPage: 1,
|
||||
pageSize: 5,
|
||||
total: 0,
|
||||
currentMemberPage: 1,
|
||||
pageMemberSize: 5,
|
||||
memberTotal: 0,
|
||||
dialogCurrentPage: 1,
|
||||
dialogPageSize: 5,
|
||||
dialogTotal: 0,
|
||||
memberLineData: [],
|
||||
memberForm: {},
|
||||
form: {
|
||||
|
|
Loading…
Reference in New Issue