最终版本

master
lby 8 months ago
parent 30be1fb7a6
commit 836f820dc1

@ -44,7 +44,7 @@
<if test="role != null">#{role}, </if>
<if test="job != null">#{job}, </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>
</trim>
</insert>

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

@ -43,6 +43,7 @@
</el-form-item>
还没有账户?立即<a @click="switchForm('loginForm')">注册</a>
</el-form>
<el-form ref="registerForm" :model="registerForm" v-show="registerVisible" :rules="registerRules" label-width="80px">
<el-form-item label="用户名" prop="name">
@ -54,14 +55,23 @@
<el-form-item label="重复密码" prop="rePassword">
<el-input type="password" v-model="registerForm.rePassword"></el-input>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="registerForm.address"></el-input>
</el-form-item>
<el-form-item label="个人网站" prop="ip">
<el-input v-model="registerForm.ip"></el-input>
<el-form-item label="工作" prop="job">
<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 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-form-item>
已有账户?请<a @click="switchForm">登录</a>
@ -90,8 +100,9 @@
name: '',
password: '',
rePassword: '',
address: '',
ip: ''
job: '',
skill: '',
sal:''
},
registerRules: {
name: [

Loading…
Cancel
Save