最终版本

master
lby 8 months ago
parent 30be1fb7a6
commit 836f820dc1

@ -44,7 +44,7 @@
<if test="role != null">#{role}, </if> <if test="role != null">#{role}, </if>
<if test="job != null">#{job}, </if> <if test="job != null">#{job}, </if>
<if test="skill != null">#{skill}, </if> <if test="skill != null">#{skill}, </if>
<if test="degree != null">#{degree} </if> <if test="degree != null">#{degree}, </if>
<if test="sal != null">#{sal}</if> <if test="sal != null">#{sal}</if>
</trim> </trim>
</insert> </insert>

@ -31,6 +31,7 @@
<el-form style="margin-top: 20px"> <el-form style="margin-top: 20px">
<el-button @click="openEditDialog()">新增用户</el-button> <el-button @click="openEditDialog()">新增用户</el-button>
</el-form> </el-form>
<el-main class="mainTable"> <el-main class="mainTable">
<el-table borer <el-table borer
style="width: 100%; margin-top: 10px;" style="width: 100%; margin-top: 10px;"
@ -44,17 +45,19 @@
label="姓名"></el-table-column> label="姓名"></el-table-column>
<el-table-column <el-table-column
prop="roleName" prop="roleName"
label="身份"></el-table-column> label="角色"></el-table-column>
<el-table-column
prop="job"
label="工作"></el-table-column>
<el-table-column <el-table-column
prop="address" prop="skill"
label="地址"></el-table-column> label="技能"></el-table-column>
<el-table-column <el-table-column
prop="ip" prop="degree"
label="网站"></el-table-column> label="学历"></el-table-column>
<el-table-column <el-table-column
prop="lastLoginTime" prop="sal"
label="最后登录" label="薪资"></el-table-column>
:formatter="dateFormat"></el-table-column>
<el-table-column label="操作" v-if="user.role == 1"> <el-table-column label="操作" v-if="user.role == 1">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="small" icon="el-icon-edit" @click="openEditDialog(scope.row)">编辑</el-button> <el-button size="small" icon="el-icon-edit" @click="openEditDialog(scope.row)">编辑</el-button>
@ -95,11 +98,20 @@
<el-form-item label="密码" v-if="!userForm.id"> <el-form-item label="密码" v-if="!userForm.id">
<el-input v-model="userForm.password"></el-input> <el-input v-model="userForm.password"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="地址"> <el-form-item label="角色">
<el-input v-model="userForm.address"></el-input> <el-input v-model="userForm.roleName"></el-input>
</el-form-item>
<el-form-item label="工作">
<el-input v-model="userForm.job"></el-input>
</el-form-item>
<el-form-item label="技能">
<el-input v-model="userForm.skill"></el-input>
</el-form-item>
<el-form-item label="学历">
<el-input v-model="userForm.degree"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="个人网站"> <el-form-item label="薪资">
<el-input v-model="userForm.ip"></el-input> <el-input v-model="userForm.sal"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="cancel('edit')">取消</el-button> <el-button type="primary" @click="cancel('edit')">取消</el-button>
@ -143,8 +155,10 @@
name: '', name: '',
password: '', password: '',
role: '', role: '',
address: '', sal: '',
ip: '' degree: '',
skill:'',
job:''
} }
}, },
methods: { methods: {

@ -44,6 +44,7 @@
还没有账户?立即<a @click="switchForm('loginForm')">注册</a> 还没有账户?立即<a @click="switchForm('loginForm')">注册</a>
</el-form> </el-form>
<el-form ref="registerForm" :model="registerForm" v-show="registerVisible" :rules="registerRules" label-width="80px"> <el-form ref="registerForm" :model="registerForm" v-show="registerVisible" :rules="registerRules" label-width="80px">
<el-form-item label="用户名" prop="name"> <el-form-item label="用户名" prop="name">
<el-input v-model="registerForm.name"></el-input> <el-input v-model="registerForm.name"></el-input>
@ -54,12 +55,21 @@
<el-form-item label="重复密码" prop="rePassword"> <el-form-item label="重复密码" prop="rePassword">
<el-input type="password" v-model="registerForm.rePassword"></el-input> <el-input type="password" v-model="registerForm.rePassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="registerForm.address"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="个人网站" prop="ip"> <el-form-item label="工作" prop="job">
<el-input v-model="registerForm.ip"></el-input> <el-input v-model="registerForm.job"></el-input>
</el-form-item>
<el-form-item label="技能" prop="skill">
<el-input v-model="registerForm.skill"></el-input>
</el-form-item>
<el-form-item label="学历" prop="degree">
<el-input v-model="registerForm.degree"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="薪资" prop="sal">
<el-input v-model="registerForm.sal"></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" v-on:click="registerSubmit">注册</el-button> <el-button type="primary" v-on:click="registerSubmit">注册</el-button>
@ -90,8 +100,9 @@
name: '', name: '',
password: '', password: '',
rePassword: '', rePassword: '',
address: '', job: '',
ip: '' skill: '',
sal:''
}, },
registerRules: { registerRules: {
name: [ name: [

Loading…
Cancel
Save