Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cdf3a260e5
|
@ -27,7 +27,7 @@ public class UserRoleController {
|
|||
|
||||
@GetMapping("/list/ws/{workspaceId}/{userId}")
|
||||
@RequiresRoles(value = {RoleConstants.ADMIN,RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
||||
public List<Role> getWorkspaceMemberRole(@PathVariable String workspaceId, @PathVariable String userId) {
|
||||
public List<Role> getWorkspaceMemberRoles(@PathVariable String workspaceId, @PathVariable String userId) {
|
||||
return userRoleService.getWorkspaceMemberRoles(workspaceId, userId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div>
|
||||
<ms-tag v-for="(role, index) in roles"
|
||||
:key="index"
|
||||
:effect="effect"
|
||||
:type="type"
|
||||
:content="role.name"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MsTag from "./MsTag";
|
||||
|
||||
export default {
|
||||
name: "MsRolesTag",
|
||||
components: {MsTag},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'primary',
|
||||
},
|
||||
roles: {
|
||||
type: Array
|
||||
},
|
||||
effect: {
|
||||
type: String,
|
||||
default: 'dark',
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -31,7 +31,7 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;" @click="submit('form')" size="medium">
|
||||
<el-button type="primary" @keydown.enter.native.prevent @click="submit('form')" size="medium">
|
||||
{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
|
@ -11,17 +11,15 @@
|
|||
<el-table-column prop="phone" :label="$t('commons.phone')"/>
|
||||
<el-table-column prop="roles" :label="$t('commons.role')" width="140">
|
||||
<template v-slot:default="scope">
|
||||
<el-tag v-for="(role, index) in scope.row.roles" :key="index" size="mini" effect="dark">
|
||||
{{ role.name }}
|
||||
</el-tag>
|
||||
<ms-roles-tag :roles="scope.row.roles"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini"
|
||||
circle/>
|
||||
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini"
|
||||
circle/>
|
||||
<el-button @click="edit(scope.row)" @keydown.enter.native.prevent type="primary" icon="el-icon-edit"
|
||||
size="mini" circle/>
|
||||
<el-button @click="del(scope.row)" @keydown.enter.native.prevent type="danger" icon="el-icon-delete"
|
||||
size="mini" circle/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -58,8 +56,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="submitForm('form')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -92,8 +91,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateOrgMember('updateUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -105,10 +105,11 @@
|
|||
import {TokenKey} from "../../../../common/js/constants";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsRolesTag from "../../common/components/MsRolesTag";
|
||||
|
||||
export default {
|
||||
name: "MsOrganizationMember",
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader},
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag},
|
||||
created() {
|
||||
this.initTableData();
|
||||
},
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini"
|
||||
circle/>
|
||||
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini"
|
||||
circle/>
|
||||
<el-button @click="edit(scope.row)" @keydown.enter.native.prevent type="primary" icon="el-icon-edit"
|
||||
size="mini" circle/>
|
||||
<el-button @click="del(scope.row)" @keydown.enter.native.prevent type="danger" icon="el-icon-delete"
|
||||
size="mini" circle/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -38,8 +38,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="submit('form')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -55,26 +56,26 @@
|
|||
<el-table-column prop="phone" :label="$t('commons.phone')"/>
|
||||
<el-table-column :label="$t('commons.role')" width="120">
|
||||
<template v-slot:default="scope">
|
||||
<el-tag v-for="(role, index) in scope.row.roles" :key="index" size="mini" effect="dark" type="success">
|
||||
{{ role.name }}
|
||||
</el-tag>
|
||||
<ms-roles-tag :roles="scope.row.roles" type="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="editMember(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit"
|
||||
<el-button @click="editMember(scope.row)" @keydown.enter.native.prevent type="primary" icon="el-icon-edit"
|
||||
size="mini" circle/>
|
||||
<el-button @click="delMember(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete"
|
||||
<el-button @click="delMember(scope.row)" @keydown.enter.native.prevent type="danger" icon="el-icon-delete"
|
||||
size="mini" circle/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<ms-table-pagination :change="dialogSearch" :current-page.sync="dialogCurrentPage" :page-size.sync="dialogPageSize"
|
||||
<ms-table-pagination :change="dialogSearch" :current-page.sync="dialogCurrentPage"
|
||||
:page-size.sync="dialogPageSize"
|
||||
:total="dialogTotal"/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- add workspace member dialog -->
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="dialogWsMemberAddVisible" 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">
|
||||
|
@ -105,14 +106,16 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="submitForm('form')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- update workspace member dialog -->
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="dialogWsMemberUpdateVisible" 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">
|
||||
|
@ -141,8 +144,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateOrgMember('updateUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -156,10 +160,11 @@
|
|||
import {TokenKey} from "../../../../common/js/constants";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsRolesTag from "../../common/components/MsRolesTag";
|
||||
|
||||
export default {
|
||||
name: "MsOrganizationWorkspace",
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader},
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag},
|
||||
mounted() {
|
||||
this.list();
|
||||
},
|
||||
|
|
|
@ -27,8 +27,10 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog :title="$t('member.modify_personal_info')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="updateUserForm">
|
||||
<el-dialog :title="$t('member.modify_personal_info')" :visible.sync="updateVisible" width="30%"
|
||||
:destroy-on-close="true" @close="closeFunc">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||
ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
|
@ -44,8 +46,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateUser('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateUser('updateUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -68,7 +71,7 @@
|
|||
rule: {
|
||||
name: [
|
||||
{required: true, message: this.$t('member.input_name'), trigger: 'blur'},
|
||||
{ min: 2, max: 10, message: this.$t('commons.input_limit', [2, 10]), trigger: 'blur' },
|
||||
{min: 2, max: 10, message: this.$t('commons.input_limit', [2, 10]), trigger: 'blur'},
|
||||
{
|
||||
required: true,
|
||||
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
|
||||
|
@ -85,7 +88,7 @@
|
|||
}
|
||||
],
|
||||
email: [
|
||||
{ required: true, message: this.$t('member.input_email'), trigger: 'blur' },
|
||||
{required: true, message: this.$t('member.input_email'), trigger: 'blur'},
|
||||
{
|
||||
required: true,
|
||||
pattern: /^([A-Za-z0-9_\-.])+@([A-Za-z0-9]+\.)+[A-Za-z]{2,6}$/,
|
||||
|
@ -112,7 +115,7 @@
|
|||
updateUser(updateUserForm) {
|
||||
this.$refs[updateUserForm].validate(valide => {
|
||||
if (valide) {
|
||||
this.result = this.$post(this.updatePath, this.form,response => {
|
||||
this.result = this.$post(this.updatePath, this.form, response => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
localStorage.setItem(TokenKey, JSON.stringify(response.data));
|
||||
this.updateVisible = false;
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini"
|
||||
circle/>
|
||||
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini"
|
||||
circle/>
|
||||
<el-button @click="edit(scope.row)" @keydown.enter.native.prevent type="primary" icon="el-icon-edit"
|
||||
size="mini" circle/>
|
||||
<el-button @click="del(scope.row)" @keydown.enter.native.prevent type="danger" icon="el-icon-delete"
|
||||
size="mini" circle/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -41,16 +41,14 @@
|
|||
<el-table-column prop="phone" :label="$t('commons.phone')"/>
|
||||
<el-table-column :label="$t('commons.role')" width="140">
|
||||
<template v-slot:default="scope">
|
||||
<el-tag v-for="(role, index) in scope.row.roles" :key="index" size="mini" effect="dark">
|
||||
{{ role.name }}
|
||||
</el-tag>
|
||||
<ms-roles-tag :roles="scope.row.roles"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="editMember(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit"
|
||||
<el-button @click="editMember(scope.row)" @keydown.enter.native.prevent type="primary" icon="el-icon-edit"
|
||||
size="mini" circle/>
|
||||
<el-button @click="delMember(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete"
|
||||
<el-button @click="delMember(scope.row)" @keydown.enter.native.prevent type="danger" icon="el-icon-delete"
|
||||
size="mini" circle/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -74,8 +72,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="createOrganization('createOrganization')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="createOrganization('createOrganization')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -95,9 +94,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateOrganization('updateOrganizationForm')"
|
||||
size="medium">{{$t('organization.modify')}}</el-button>
|
||||
<el-button @click="updateOrganization('updateOrganizationForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('organization.modify')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -135,8 +134,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="submitForm('form')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -172,8 +172,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateOrgMember('updateUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -185,10 +186,11 @@
|
|||
import MsCreateBox from "../CreateBox";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsRolesTag from "../../common/components/MsRolesTag";
|
||||
|
||||
export default {
|
||||
name: "MsOrganization",
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader},
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag},
|
||||
data() {
|
||||
return {
|
||||
queryPath: '/organization/list',
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;" @click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button type="primary" @keydown.enter.native.prevent @click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -78,7 +78,7 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="updateWorkspace('updateForm')" onkeydown="return false;"
|
||||
<el-button type="primary" @click="updateWorkspace('updateForm')" @keydown.enter.native.prevent
|
||||
size="medium">{{$t('commons.save')}}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -96,16 +96,14 @@
|
|||
<el-table-column prop="phone" :label="$t('commons.phone')"/>
|
||||
<el-table-column :label="$t('commons.role')" width="120">
|
||||
<template v-slot:default="scope">
|
||||
<el-tag v-for="(role, index) in scope.row.roles" :key="index" size="mini" effect="dark" type="success">
|
||||
{{ role.name }}
|
||||
</el-tag>
|
||||
<ms-roles-tag :roles="scope.row.roles" type="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="editMember(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit"
|
||||
<el-button @click="editMember(scope.row)" @keydown.enter.native.prevent type="primary" icon="el-icon-edit"
|
||||
size="mini" circle/>
|
||||
<el-button @click="delMember(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete"
|
||||
<el-button @click="delMember(scope.row)" @keydown.enter.native.prevent type="danger" icon="el-icon-delete"
|
||||
size="mini" circle/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -116,7 +114,8 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- add workspace member dialog -->
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="dialogWsMemberAddVisible" 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">
|
||||
|
@ -147,13 +146,16 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button type="primary" @keydown.enter.native.prevent @click="submitForm('form')" size="medium">
|
||||
{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- update workspace member dialog -->
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="dialogWsMemberUpdateVisible" 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">
|
||||
|
@ -182,8 +184,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')" onkeydown="return false;"
|
||||
size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')" @keydown.enter.native.prevent
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
|
@ -197,10 +200,11 @@
|
|||
import {Message} from "element-ui";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsRolesTag from "../../common/components/MsRolesTag";
|
||||
|
||||
export default {
|
||||
name: "MsSystemWorkspace",
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader},
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag},
|
||||
mounted() {
|
||||
this.list();
|
||||
},
|
||||
|
|
|
@ -122,9 +122,10 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="createTestResourcePool('createTestResourcePoolForm')"
|
||||
size="medium">{{$t('commons.create')}}</el-button>
|
||||
<el-button @click="createTestResourcePool('createTestResourcePoolForm')" @keydown.enter.native.prevent
|
||||
type="primary"
|
||||
size="medium">{{$t('commons.create')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -202,9 +203,10 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateTestResourcePool('updateTestResourcePoolForm')"
|
||||
size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateTestResourcePool('updateTestResourcePoolForm')" @keydown.enter.native.prevent
|
||||
type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="createUser('createUserForm')" size="medium">创建</el-button>
|
||||
<el-button @click="createUser('createUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -83,8 +83,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateUser('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateUser('updateUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
<el-table-column prop="phone" :label="$t('commons.phone')"/>
|
||||
<el-table-column prop="roles" :label="$t('commons.role')" width="120">
|
||||
<template v-slot:default="scope">
|
||||
<el-tag v-for="(role, index) in scope.row.roles" :key="index" size="mini" effect="dark" type="success">
|
||||
{{ role.name }}
|
||||
</el-tag>
|
||||
<ms-roles-tag :roles="scope.row.roles" type="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template v-slot:default="scope">
|
||||
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini"
|
||||
<el-button @click="edit(scope.row)" type="primary" icon="el-icon-edit" size="mini"
|
||||
@keydown.enter.native.prevent
|
||||
circle v-permission="['test_manager']"/>
|
||||
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini"
|
||||
<el-button @click="del(scope.row)" type="danger" icon="el-icon-delete" size="mini"
|
||||
@keydown.enter.native.prevent
|
||||
circle v-permission="['test_manager']"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -29,7 +29,8 @@
|
|||
:total="total"/>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||
<el-dialog :title="$t('member.create')" :visible.sync="createVisible" width="30%" :destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
|
||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')"
|
||||
|
@ -57,13 +58,15 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="submitForm('form')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input v-model="form.id" autocomplete="off" :disabled="true"/>
|
||||
|
@ -90,8 +93,9 @@
|
|||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" onkeydown="return false;"
|
||||
@click="updateWorkspaceMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||
<el-button @click="updateWorkspaceMember('updateUserForm')" @keydown.enter.native.prevent type="primary"
|
||||
size="medium">{{$t('commons.save')}}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -104,11 +108,11 @@
|
|||
import {TokenKey} from "../../../../common/js/constants";
|
||||
import MsTablePagination from "../../common/pagination/TablePagination";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsTag from "../../common/components/MsTag";
|
||||
import MsRolesTag from "../../common/components/MsRolesTag";
|
||||
|
||||
export default {
|
||||
name: "MsMember",
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsTag},
|
||||
components: {MsCreateBox, MsTablePagination, MsTableHeader, MsRolesTag},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
|
|
Loading…
Reference in New Issue