fix add user of exam
This commit is contained in:
parent
a661124534
commit
7449f98cb6
File diff suppressed because one or more lines are too long
|
@ -84,18 +84,18 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" fixed="right">
|
<el-table-column align="center" label="操作" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.type=='正式考试'"
|
v-if="scope.row.type=='正式考试'"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleExport(scope)"
|
@click="handleExport(scope)"
|
||||||
>生成Word</el-button>
|
>生成Word</el-button> -->
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.type=='正式考试'"
|
v-if="scope.row.type=='正式考试'"
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleExport2(scope)"
|
@click="handleExport2(scope)"
|
||||||
>重新生成</el-button>
|
>重新生成</el-button> -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.type=='正式考试'"
|
v-if="scope.row.type=='正式考试'"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
|
|
@ -54,12 +54,12 @@
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
:disabled="!checkPermission(['paper_update'])"
|
:disabled="!checkPermission(['paper_update'])"
|
||||||
></el-button>
|
></el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleClone(scope)"
|
@click="handleClone(scope)"
|
||||||
:disabled="!checkPermission(['paper_clone'])"
|
:disabled="!checkPermission(['paper_clone'])"
|
||||||
>克隆</el-button>
|
>克隆</el-button> -->
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
|
@ -120,11 +120,11 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleAddUser"
|
<div style="margin-top: 10px">
|
||||||
>新增</el-button
|
<el-button type="primary" icon="el-icon-plus" @click="handleAddUser"
|
||||||
>
|
>新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="userList.results"
|
:data="userList.results"
|
||||||
|
@ -196,6 +196,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="userList.count > 0"
|
v-show="userList.count > 0"
|
||||||
:total="userList.count"
|
:total="userList.count"
|
||||||
|
@ -206,6 +207,66 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:title="dialogType === 'edit' ? '编辑用户' : '新增用户'"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="user"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
:rules="rule1"
|
||||||
|
>
|
||||||
|
<el-form-item label="姓名" prop="name">
|
||||||
|
<el-input v-model="user.name" placeholder="姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="账户" prop="username">
|
||||||
|
<el-input v-model="user.username" placeholder="账户" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属部门" prop="dept">
|
||||||
|
<treeselect
|
||||||
|
v-model="user.dept"
|
||||||
|
:multiple="false"
|
||||||
|
:options="orgData"
|
||||||
|
placeholder="所属部门"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="角色" prop="roles">
|
||||||
|
<el-select
|
||||||
|
v-model="user.roles"
|
||||||
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in roles"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="头像" prop="dept">
|
||||||
|
<el-upload
|
||||||
|
class="avatar-uploader"
|
||||||
|
:action="upUrl"
|
||||||
|
accept="image/jpeg, image/gif, image/png, image/bmp"
|
||||||
|
:show-file-list="false"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:before-upload="beforeAvatarUpload"
|
||||||
|
:headers="upHeaders"
|
||||||
|
>
|
||||||
|
<img v-if="user.avatar" :src="user.avatar" class="avatar" />
|
||||||
|
<i v-else class="el-icon-plus avatar-uploader-icon" />
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in New Issue