Translate into English :by jimmy

This commit is contained in:
jimmy 2021-01-06 22:23:32 +08:00
parent 1a3ecaf9e0
commit c6f6ed0cd6
19 changed files with 152 additions and 152 deletions

View File

@ -8,7 +8,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>TEKSystem管理系统</title>
<title>TEKsystems Admin</title>
<style>
html {
height: 100%;

View File

@ -37,7 +37,7 @@ export default {
const first = matched[0]
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: '主页' } }].concat(matched)
matched = [{ path: '/dashboard', meta: { title: 'Home' } }].concat(matched)
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
},

View File

@ -12,12 +12,12 @@
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/profile/index">
<el-dropdown-item>个人信息</el-dropdown-item>
<el-dropdown-item>Personal information</el-dropdown-item>
</router-link>
<router-link to="/">
<el-dropdown-item>主页</el-dropdown-item>
<el-dropdown-item>Home</el-dropdown-item>
</router-link>
<el-dropdown-item @click.native="logout" divided>退出</el-dropdown-item>
<el-dropdown-item @click.native="logout" divided>Log out</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>

View File

@ -24,7 +24,7 @@ export default {
},
data () {
return {
title: 'TEKSystem管理系统'
title: 'TEKsystems Admin'
}
}
}

View File

@ -21,7 +21,7 @@ const constantRoutes = [
name: 'Login',
hidden: true,
component: () => import('@/views/login/index'),
meta: { title: '登录' }
meta: { title: 'Login' }
},
{
path: '/',
@ -32,7 +32,7 @@ const constantRoutes = [
path: 'dashboard',
component: () => import('@/views/dashboard/index'),
name: 'Dashboard',
meta: { title: '主页', icon: 'home', affix: true }
meta: { title: 'Home', icon: 'home', affix: true }
}
]
},
@ -41,7 +41,7 @@ const constantRoutes = [
component: Layout,
name: 'UserPage',
meta: {
title: '用户管理',
title: 'User Management',
icon: 'users'
},
children: [
@ -49,26 +49,26 @@ const constantRoutes = [
path: 'student/list',
component: () => import('@/views/user/student/list'),
name: 'UserStudentPageList',
meta: { title: '招聘专员列表', noCache: true }
meta: { title: 'Recruiter List', noCache: true }
},
{
path: 'student/edit',
component: () => import('@/views/user/student/edit'),
name: 'UserStudentEdit',
meta: { title: '学生编辑', noCache: true, activeMenu: '/user/student/list' },
meta: { title: 'Students edit', noCache: true, activeMenu: '/user/student/list' },
hidden: true
},
{
path: 'admin/list',
component: () => import('@/views/user/admin/list'),
name: 'UserAdminPageList',
meta: { title: '管理员列表', noCache: true }
meta: { title: 'Admin List', noCache: true }
},
{
path: 'admin/edit',
component: () => import('@/views/user/admin/edit'),
name: 'UserAdminEdit',
meta: { title: '管理员编辑', noCache: true, activeMenu: '/user/admin/list' },
meta: { title: 'Admin edit', noCache: true, activeMenu: '/user/admin/list' },
hidden: true
}
]
@ -78,7 +78,7 @@ const constantRoutes = [
component: Layout,
name: 'ExamPage',
meta: {
title: '卷题管理',
title: 'Paper management',
icon: 'exam'
},
children: [
@ -100,7 +100,7 @@ const constantRoutes = [
path: 'question/list',
component: () => import('@/views/exam/question/list'),
name: 'ExamQuestionPageList',
meta: { title: '题目列表', noCache: true }
meta: { title: 'Question List', noCache: true }
},
{
path: 'question/edit/singleChoice',
@ -168,7 +168,7 @@ const constantRoutes = [
component: Layout,
name: 'EducationPage',
meta: {
title: '教育管理',
title: 'Configuration',
icon: 'education'
},
alwaysShow: true,
@ -177,26 +177,26 @@ const constantRoutes = [
path: 'industry/list',
component: () => import('@/views/education/industry/list'),
name: 'EducationIndustryPage',
meta: { title: 'industry列表', noCache: true }
meta: { title: 'Industry', noCache: true }
},
{
path: 'industry/edit',
component: () => import('@/views/education/industry/edit'),
name: 'EducationIndustryEditPage',
meta: { title: 'industry编辑', noCache: true, activeMenu: '/education/industry/list' },
meta: { title: 'Industry edit', noCache: true, activeMenu: '/education/industry/list' },
hidden: true
},
{
path: 'subject/list',
component: () => import('@/views/education/subject/list'),
name: 'EducationSubjectPage',
meta: { title: 'skill列表', noCache: true }
meta: { title: 'Skill', noCache: true }
},
{
path: 'subject/edit',
component: () => import('@/views/education/subject/edit'),
name: 'EducationSubjectEditPage',
meta: { title: 'skill编辑', noCache: true, activeMenu: '/education/subject/list' },
meta: { title: 'Skill edit', noCache: true, activeMenu: '/education/subject/list' },
hidden: true
}
]
@ -230,7 +230,7 @@ const constantRoutes = [
component: Layout,
name: 'LogPage',
meta: {
title: '日志中心',
title: 'Activity Logs',
icon: 'log'
},
alwaysShow: true,
@ -239,7 +239,7 @@ const constantRoutes = [
path: 'user/list',
component: () => import('@/views/log/list'),
name: 'LogUserPage',
meta: { title: '用户日志', noCache: true }
meta: { title: 'User Activities', noCache: true }
}
]
},

View File

@ -1,14 +1,14 @@
// initial state
const state = {
user: {
sexEnum: [{ key: 1, value: '' }, { key: 2, value: '' }],
statusEnum: [{ key: 1, value: '启用' }, { key: 2, value: '禁用' }],
sexEnum: [{ key: 1, value: 'Male' }, { key: 2, value: 'Female' }],
statusEnum: [{ key: 1, value: 'Enabled' }, { key: 2, value: 'Disable' }],
levelEnum: [{ key: 1, value: '一年级' }, { key: 2, value: '二年级' }, { key: 3, value: '三年级' }, { key: 4, value: '四年级' }, { key: 5, value: '五年级' }, { key: 6, value: '六年级' },
{ key: 7, value: '初一' }, { key: 8, value: '初二' }, { key: 9, value: '初三' },
{ key: 10, value: '高一' }, { key: 11, value: '高二' }, { key: 12, value: '高三' }],
roleEnum: [{ key: 1, value: '学生' }, { key: 2, value: '教师' }, { key: 3, value: '管理员' }],
statusTag: [{ key: 1, value: 'success' }, { key: 2, value: 'danger' }],
statusBtn: [{ key: 1, value: '禁用' }, { key: 2, value: '启用' }]
statusBtn: [{ key: 1, value: 'Disable' }, { key: 2, value: 'Enabled' }]
},
exam: {
examPaper: {

View File

@ -21,7 +21,7 @@
</div>
<div class="card-panel-description">
<div class="card-panel-text">
题目总数
Question Count
</div>
<count-to :start-val="0" :end-val="questionCount" :duration="3000" class="card-panel-num" v-loading="loading"/>
</div>
@ -98,8 +98,8 @@ export default {
_this.questionCount = response.questionCount
_this.doExamPaperCount = response.doExamPaperCount
_this.doQuestionCount = response.doQuestionCount
_this.echartsUserAction.setOption(this.option('用户活跃度', '{b}日{c}度', response.mothDayText, response.mothDayUserActionValue))
_this.echartsQuestion.setOption(this.option('题目月数量', '{b}日{c}题', response.mothDayText, response.mothDayDoExamQuestionValue))
_this.echartsUserAction.setOption(this.option('User Activity', '{b}day{c}°', response.mothDayText, response.mothDayUserActionValue))
_this.echartsQuestion.setOption(this.option('Monthly Question Count', '{b}day{c}topic', response.mothDayText, response.mothDayDoExamQuestionValue))
this.loading = false
})
},

View File

@ -11,8 +11,8 @@
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button type="primary" @click="submitForm">Submit</el-button>
<el-button @click="resetForm">Reset</el-button>
</el-form-item>
</el-form>
</div>

View File

@ -7,9 +7,9 @@
</el-select>
</el-form-item>-->
<el-form-item>
<el-button type="primary" @click="submitForm">查询</el-button>
<el-button type="primary" @click="submitForm">Search</el-button>
<router-link :to="{path:'/education/industry/edit'}" class="link-left">
<el-button type="primary">添加</el-button>
<el-button type="primary">Add</el-button>
</router-link>
</el-form-item>
</el-form>
@ -17,12 +17,12 @@
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
<el-table-column prop="id" label="Id" />
<el-table-column prop="name" label="industry"/>
<el-table-column width="220px" label="操作" align="center">
<el-table-column width="220px" label="Operation" align="center">
<template slot-scope="{row}">
<router-link :to="{path:'/education/industry/edit', query:{id:row.id}}" class="link-left">
<el-button size="mini">编辑</el-button>
<el-button size="mini">Edit</el-button>
</router-link>
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">删除</el-button>
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">Delete</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading">
<el-form-item label="skill" required>
<el-form-item label="Skill" required>
<el-input v-model="form.name"></el-input>
</el-form-item>
<!-- <el-form-item label="年级:" required>
@ -11,8 +11,8 @@
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button type="primary" @click="submitForm">Submit</el-button>
<el-button @click="resetForm">Reset</el-button>
</el-form-item>
</el-form>
</div>

View File

@ -7,9 +7,9 @@
</el-select>
</el-form-item>-->
<el-form-item>
<el-button type="primary" @click="submitForm">查询</el-button>
<el-button type="primary" @click="submitForm">Search</el-button>
<router-link :to="{path:'/education/subject/edit'}" class="link-left">
<el-button type="primary">添加</el-button>
<el-button type="primary">Add</el-button>
</router-link>
</el-form-item>
</el-form>
@ -19,12 +19,12 @@
<el-table-column prop="name" label="skill"/>
<!-- <el-table-column prop="industry" label="industry"/> -->
<!-- <el-table-column prop="levelName" label="年级" /> -->
<el-table-column width="220px" label="操作" align="center">
<el-table-column width="220px" label="Opration" align="center">
<template slot-scope="{row}">
<router-link :to="{path:'/education/subject/edit', query:{id:row.id}}" class="link-left">
<el-button size="mini">编辑</el-button>
<el-button size="mini">Edit</el-button>
</router-link>
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">删除</el-button>
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">Delete</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -1,42 +1,42 @@
<template>
<div class="app-container">
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules">
<el-form-item label="industry" prop="industryId" required>
<el-select v-model="form.industryId" placeholder="industry" @change="levelChange">
<el-form-item label="Industry" prop="industryId" required>
<el-select v-model="form.industryId" placeholder="Industry" @change="levelChange">
<el-option v-for="item in industryFilter" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="skill" prop="skillId" required>
<el-select v-model="form.skillId" placeholder="skill" >
<el-form-item label="Skill" prop="skillId" required>
<el-select v-model="form.skillId" placeholder="Skill" >
<el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="题干" prop="title" required>
<el-form-item label="Question" prop="title" required>
<el-input v-model="form.title" @focus="inputClick(form,'title')" />
</el-form-item>
<el-form-item label="答案" prop="correct" required>
<el-form-item label="Answer" prop="correct" required>
<el-input v-model="form.correct" @focus="inputClick(form,'correct')" />
</el-form-item>
<el-form-item label="解析" prop="analyze" required>
<el-form-item label="Analysis" prop="analyze" required>
<el-input v-model="form.analyze" @focus="inputClick(form,'analyze')" />
</el-form-item>
<!-- <el-form-item label="分数:" prop="score" required>
<el-input-number v-model="form.score" :precision="1" :step="1" :max="100"></el-input-number>
</el-form-item> -->
<el-form-item label="难度" required>
<el-form-item label="Difficulty" required>
<el-rate v-model="form.difficult" class="question-item-rate"></el-rate>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button type="success" @click="showQuestion">预览</el-button>
<el-button type="primary" @click="submitForm">Submit</el-button>
<el-button @click="resetForm">Reset</el-button>
<el-button type="success" @click="showQuestion">Preview</el-button>
</el-form-item>
</el-form>
<el-dialog :visible.sync="richEditor.dialogVisible" append-to-body :close-on-click-modal="false" style="width: 100%;height: 100%" :show-close="false" center>
<Ueditor @ready="editorReady"/>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="editorConfirm"></el-button>
<el-button @click="richEditor.dialogVisible = false"></el-button>
<el-button type="primary" @click="editorConfirm">Confirm</el-button>
<el-button @click="richEditor.dialogVisible = false">Cancel</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="questionShow.dialog" style="width: 100%;height: 100%">
@ -75,22 +75,22 @@ export default {
formLoading: false,
rules: {
gradeLevel: [
{ required: true, message: '请选择年级', trigger: 'change' }
{ required: true, message: 'Please select grade', trigger: 'change' }
],
subjectId: [
{ required: true, message: '请选择学科', trigger: 'change' }
{ required: true, message: 'Please select subject', trigger: 'change' }
],
title: [
{ required: true, message: '请输入题干', trigger: 'blur' }
{ required: true, message: 'Please enter the question stem', trigger: 'blur' }
],
correct: [
{ required: true, message: '请输入答案', trigger: 'blur' }
{ required: true, message: 'Please enter the answer', trigger: 'blur' }
],
analyze: [
{ required: true, message: '请输入解析', trigger: 'blur' }
{ required: true, message: 'Please enter parse', trigger: 'blur' }
],
score: [
{ required: true, message: '请输入分数', trigger: 'blur' }
{ required: true, message: 'Please enter the score', trigger: 'blur' }
]
},
richEditor: {

View File

@ -1,32 +1,32 @@
<template>
<div class="app-container">
<el-form :model="queryParam" ref="queryForm" :inline="true">
<el-form-item label="题目ID">
<el-form-item label="Question ID">
<el-input v-model="queryParam.id" clearable></el-input>
</el-form-item>
<el-form-item label="industry">
<el-select v-model="queryParam.industry" placeholder="industry" @change="levelChange" clearable>
<el-form-item label="Industry">
<el-select v-model="queryParam.industry" placeholder="Industry" @change="levelChange" clearable>
<el-option v-for="item in industryFilter" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="skill">
<el-select v-model="queryParam.skill" clearable>
<el-form-item label="Skill">
<el-select v-model="queryParam.skill" clearable placeholder="Skill">
<el-option v-for="item in subjectFilter" :key="item.id" :value="item.id"
:label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="题型:">
<!-- <el-form-item label="题型:">
<el-select v-model="queryParam.questionType" clearable>
<el-option v-for="item in questionType" :key="item.key" :value="item.key" :label="item.value"></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="submitForm">查询</el-button>
<el-button type="primary" @click="submitForm">Search</el-button>
<el-popover placement="bottom" trigger="click">
<el-button type="warning" size="mini" v-for="item in editUrlEnum" :key="item.key"
<!--<el-button type="warning" size="mini" v-for="item in editUrlEnum" :key="item.key"
@click="$router.push({path:item.value})">{{item.name}}
</el-button>
<el-button slot="reference" type="primary" class="link-left">添加</el-button>
</el-button> -->
<el-button slot="reference" type="primary" class="link-left" @click="$router.push('/exam/question/edit/shortAnswer')">Add</el-button>
</el-popover>
</el-form-item>
</el-form>
@ -34,16 +34,16 @@
<el-table-column prop="id" label="Id" width="90px"/>
<el-table-column prop="industryName" label="industry" width="120px"/>
<el-table-column prop="skillName" label="skill" width="120px"/>
<el-table-column prop="questionType" label="题型" :formatter="questionTypeFormatter" width="70px"/>
<el-table-column prop="shortTitle" label="题干" show-overflow-tooltip/>
<!-- <el-table-column prop="questionType" label="题型" :formatter="questionTypeFormatter" width="70px"/> -->
<el-table-column prop="shortTitle" label="Question" show-overflow-tooltip/>
<!-- <el-table-column prop="score" label="分数" width="60px"/> -->
<el-table-column prop="difficult" label="难度" width="60px"/>
<el-table-column prop="createTime" label="创建时间" width="160px"/>
<el-table-column label="操作" align="center" width="220px">
<el-table-column prop="difficult" label="Difficulty" width="100px"/>
<el-table-column prop="createTime" label="Create Time" width="160px"/>
<el-table-column label="Operation" align="center" width="220px">
<template slot-scope="{row}">
<el-button size="mini" @click="showQuestion(row)">预览</el-button>
<el-button size="mini" @click="editQuestion(row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteQuestion(row)" class="link-left">删除</el-button>
<el-button size="mini" @click="showQuestion(row)">Preview</el-button>
<el-button size="mini" @click="editQuestion(row)">Edit</el-button>
<el-button size="mini" type="danger" @click="deleteQuestion(row)" class="link-left">Delete</el-button>
</template>
</el-table-column>
</el-table>
@ -68,7 +68,7 @@ export default {
return {
queryParam: {
id: null,
questionType: null,
questionType: '1',
skill: null,
industry: null,
pageIndex: 1,

View File

@ -1,23 +1,23 @@
<template>
<div class="app-container">
<el-form :model="queryParam" ref="queryForm" :inline="true">
<el-form-item label="用户Id">
<el-form-item label="User Id">
<el-input v-model="queryParam.userId"></el-input>
</el-form-item>
<el-form-item label="用户名:">
<el-form-item label="Username: ">
<el-input v-model="queryParam.userName"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">查询</el-button>
<el-button type="primary" @click="submitForm">Search</el-button>
</el-form-item>
</el-form>
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
<el-table-column prop="id" label="Id" width="100" />
<el-table-column prop="userName" label="用户名" width="150" />
<el-table-column prop="realName" label="真实姓名" width="150" />
<el-table-column prop="content" label="动态" />
<el-table-column prop="createTime" label="创建时间" width="160px"/>
<el-table-column prop="Id" label="Id" width="100" />
<el-table-column prop="userName" label="Username" width="150" />
<el-table-column prop="realName" label="Name" width="150" />
<el-table-column prop="content" label="Activity" />
<el-table-column prop="createTime" label="Create Time" width="160px"/>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
@pagination="search"/>

View File

@ -3,7 +3,7 @@
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
<div class="title-container">
<h3 class="title">TekSystem管理系统</h3>
<h3 class="title">TEKSystemsQuestion Bank Admin Portal</h3>
</div>
<el-form-item prop="userName">
@ -13,7 +13,7 @@
<el-input
ref="userName"
v-model="loginForm.userName"
placeholder="用户名"
placeholder="Username"
name="userName"
type="text"
tabindex="1"
@ -31,7 +31,7 @@
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="密码"
placeholder="Password"
name="password"
tabindex="2"
auto-complete="on"
@ -45,14 +45,14 @@
</el-form-item>
</el-tooltip>
<el-checkbox v-model="loginForm.remember" style="margin-bottom: 20px;margin-left: 5px;">记住密码</el-checkbox>
<el-checkbox v-model="loginForm.remember" style="margin-bottom: 20px;margin-left: 5px;">Remember me</el-checkbox>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button>
</el-form>
<div class="account-foot-copyright">
<span>Copyright © 2020 TekSystem 版权所有</span>
<span>Copyright © 2020 TEKSystems</span>
</div>
</div>
</template>
@ -66,14 +66,14 @@ export default {
data () {
const validateUsername = (rule, value, callback) => {
if (value.length < 5) {
callback(new Error('用户名不能少于5个字符'))
callback(new Error('The user name cannot be less than 5 characters.'))
} else {
callback()
}
}
const validatePassword = (rule, value, callback) => {
if (value.length < 5) {
callback(new Error('密码不能少于5个字符'))
callback(new Error('The password must be no less than 5 characters.'))
} else {
callback()
}

View File

@ -2,37 +2,37 @@
<div class="app-container">
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules">
<el-form-item label="用户名" prop="userName" required>
<el-form-item label="User name" prop="userName" required>
<el-input v-model="form.userName"></el-input>
</el-form-item>
<el-form-item label="密码" required>
<el-form-item label="Password" required>
<el-input v-model="form.password"></el-input>
</el-form-item>
<el-form-item label="真实姓名:" prop="realName" required>
<el-form-item label="Name: " prop="realName" required>
<el-input v-model="form.realName"></el-input>
</el-form-item>
<el-form-item label="年龄">
<el-form-item label="Age">
<el-input v-model="form.age"></el-input>
</el-form-item>
<el-form-item label="性别">
<el-select v-model="form.sex" placeholder="性别" clearable>
<el-form-item label="gender">
<el-select v-model="form.sex" placeholder="Gender" clearable>
<el-option v-for="item in sexEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="出生日期">
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
<el-form-item label="BirthDay">
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="Option date"/>
</el-form-item>
<el-form-item label="手机">
<el-form-item label="Phone">
<el-input v-model="form.phone"></el-input>
</el-form-item>
<el-form-item label="状态" required>
<el-select v-model="form.status" placeholder="状态">
<el-form-item label="Status" required>
<el-select v-model="form.status" placeholder="Status">
<el-option v-for="item in statusEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button type="primary" @click="submitForm">Submit</el-button>
<el-button @click="resetForm">Reset</el-button>
</el-form-item>
</el-form>
</div>
@ -60,10 +60,10 @@ export default {
formLoading: false,
rules: {
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
{ required: true, message: 'Please enter the user name', trigger: 'blur' }
],
realName: [
{ required: true, message: '请输入真实姓名', trigger: 'blur' }
{ required: true, message: 'Please enter your real name', trigger: 'blur' }
]
}
}

View File

@ -1,40 +1,40 @@
<template>
<div class="app-container">
<el-form :model="queryParam" ref="queryForm" :inline="true">
<el-form-item label="用户名">
<el-form-item label="Username">
<el-input v-model="queryParam.userName"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">查询</el-button>
<el-button type="primary" @click="submitForm">Search</el-button>
<router-link :to="{path:'/user/admin/edit'}" class="link-left">
<el-button type="primary">添加</el-button>
<el-button type="primary">Add</el-button>
</router-link>
</el-form-item>
</el-form>
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
<el-table-column prop="id" label="Id" />
<el-table-column prop="userName" label="用户名"/>
<el-table-column prop="realName" label="真实姓名" />
<el-table-column prop="sex" label="性别" width="60px;" :formatter="sexFormatter"/>
<el-table-column prop="phone" label="手机号"/>
<el-table-column prop="createTime" label="创建时间" width="160px"/>
<el-table-column label="状态" prop="status" width="70px">
<el-table-column prop="userName" label="Username"/>
<el-table-column prop="realName" label="Name" />
<el-table-column prop="sex" label="Gender" width="100px;" :formatter="sexFormatter"/>
<el-table-column prop="phone" label="Phone"/>
<el-table-column prop="createTime" label="Create Time" width="160px"/>
<el-table-column label="Status" prop="status" width="70px">
<template slot-scope="{row}">
<el-tag :type="statusTagFormatter(row.status)">
{{ statusFormatter(row.status) }}
</el-tag>
</template>
</el-table-column>
<el-table-column width="220px" label="操作" align="center">
<el-table-column width="220px" label="Operation" align="center">
<template slot-scope="{row}">
<el-button size="mini" @click="changeStatus(row)" class="link-left">
{{ statusBtnFormatter(row.status) }}
</el-button>
<router-link :to="{path:'/user/admin/edit', query:{id:row.id}}" class="link-left">
<el-button size="mini">编辑</el-button>
<el-button size="mini">Edit</el-button>
</router-link>
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button>
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">Delete</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -2,27 +2,27 @@
<div class="app-container">
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules">
<el-form-item label="用户名" prop="userName" required>
<el-form-item label="Username" prop="userName" required>
<el-input v-model="form.userName"></el-input>
</el-form-item>
<el-form-item label="密码" required>
<el-form-item label="Password" required>
<el-input v-model="form.password"></el-input>
</el-form-item>
<el-form-item label="真实姓名" prop="realName" required>
<el-form-item label="Name" prop="realName" required>
<el-input v-model="form.realName"></el-input>
</el-form-item>
<el-form-item label="年龄">
<el-form-item label="Age">
<el-input v-model="form.age"></el-input>
</el-form-item>
<el-form-item label="性别">
<el-select v-model="form.sex" placeholder="性别" clearable>
<el-form-item label="Gender">
<el-select v-model="form.sex" placeholder="Gender" clearable>
<el-option v-for="item in sexEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="出生日期">
<el-date-picker v-model="form.birthDay" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" />
<el-form-item label="Birthday">
<el-date-picker v-model="form.birthDay" type="date" value-format="yyyy-MM-dd" placeholder="Option date" />
</el-form-item>
<el-form-item label="手机">
<el-form-item label="Phone">
<el-input v-model="form.phone"></el-input>
</el-form-item>
<!--<el-form-item label="年级:" prop="userLevel" required>
@ -30,14 +30,14 @@
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
</el-select>
</el-form-item>-->
<el-form-item label="状态" required>
<el-select v-model="form.status" placeholder="状态">
<el-form-item label="Status" required>
<el-select v-model="form.status" placeholder="Status">
<el-option v-for="item in statusEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button type="primary" @click="submitForm">Submit</el-button>
<el-button @click="resetForm">Reset</el-button>
</el-form-item>
</el-form>
</div>

View File

@ -1,44 +1,44 @@
<template>
<div class="app-container">
<el-form :model="queryParam" ref="queryForm" :inline="true">
<el-form-item label="用户名">
<el-form-item label="Username">
<el-input v-model="queryParam.userName"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm">查询</el-button>
<el-button type="primary" @click="submitForm">Search</el-button>
<router-link :to="{path:'/user/student/edit'}" class="link-left">
<el-button type="primary">添加</el-button>
<el-button type="primary">Add</el-button>
</router-link>
</el-form-item>
</el-form>
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
<el-table-column prop="id" label="Id" />
<el-table-column prop="userName" label="用户名"/>
<el-table-column prop="realName" label="真实姓名" />
<el-table-column prop="id" label="ID" />
<el-table-column prop="userName" label="Username"/>
<el-table-column prop="realName" label="Name" />
<!--<el-table-column prop="userLevel" label="学级" :formatter="levelFormatter"/>-->
<el-table-column prop="sex" label="性别" width="60px;" :formatter="sexFormatter"/>
<el-table-column prop="phone" label="手机号"/>
<el-table-column prop="createTime" label="创建时间" width="160px"/>
<el-table-column label="状态" prop="status" width="70px">
<el-table-column prop="sex" label="Gender" width="100px;" :formatter="sexFormatter"/>
<el-table-column prop="phone" label="Phone Number"/>
<el-table-column prop="createTime" label="Create Time" width="160px"/>
<el-table-column label="Status" prop="status" width="70px">
<template slot-scope="{row}">
<el-tag :type="statusTagFormatter(row.status)">
{{ statusFormatter(row.status) }}
</el-tag>
</template>
</el-table-column>
<el-table-column width="270px" label="操作" align="center">
<el-table-column width="270px" label="Operation" align="center">
<template slot-scope="{row}">
<el-button size="mini" @click="changeStatus(row)" class="link-left">
{{ statusBtnFormatter(row.status) }}
</el-button>
<router-link :to="{path:'/user/student/edit', query:{id:row.id}}" class="link-left">
<el-button size="mini" >编辑</el-button>
<el-button size="mini" >Edit</el-button>
</router-link>
<router-link :to="{path:'/log/user/list', query:{userId:row.id}}" class="link-left">
<el-button size="mini" >日志</el-button>
<el-button size="mini" >Logs</el-button>
</router-link>
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button>
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">Delete</el-button>
</template>
</el-table-column>
</el-table>