新加字段调试完成

main
lijingyu007 6 months ago
parent bb4426fc2b
commit f7a43d8bee
  1. 2
      .env.development
  2. 56
      src/views/trainService/talentPool.vue
  3. 38
      src/views/trainService/trainTeacher.vue

@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_BASE_API = '/test-api' VUE_APP_BASE_API = '/test-api'
# VUE_APP_BASE_TARGET = 'http://www.keyitest.cn/test-api' # VUE_APP_BASE_TARGET = 'http://www.keyitest.cn/test-api'
VUE_APP_BASE_TARGET = 'http://192.168.0.229:9999' VUE_APP_BASE_TARGET = 'http://192.168.0.129:9999'
# VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999' # VUE_APP_BASE_TARGET = 'http://172.16.36.180:9999'
# 路由懒加载 # 路由懒加载

@ -28,10 +28,10 @@
<el-table-column label="证书编号" align="center" prop="certificateNo" /> <el-table-column label="证书编号" align="center" prop="certificateNo" />
<el-table-column label="学校" align="center" prop="university" /> <el-table-column label="学校" align="center" prop="university" />
<el-table-column label="二级学院" align="center" prop="college" /> <el-table-column label="二级学院" align="center" prop="college" />
<el-table-column label="年级" align="center" prop="college" /> <el-table-column label="年级" align="center" prop="grade" />
<el-table-column label="专业" align="center" prop="college" /> <el-table-column label="专业" align="center" prop="major" />
<el-table-column label="水平" align="center" prop="college" /> <el-table-column label="水平" align="center" prop="level" />
<el-table-column label="是否雇用" align="center" prop="college" /> <el-table-column label="是否雇用" align="center" prop="hire" />
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -72,17 +72,26 @@
<el-form-item label="二级学院:" prop="college"> <el-form-item label="二级学院:" prop="college">
<el-input v-model="form.college" placeholder="请输入二级学院"></el-input> <el-input v-model="form.college" placeholder="请输入二级学院"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="年级:" prop="college"> <el-form-item label="年级:" prop="grade">
<el-input v-model="form.college" placeholder="请输入年级"></el-input> <!-- <el-input v-model="form.grade" placeholder="请输入年级"></el-input> -->
<el-date-picker value-format="yyyy" v-model="form.grade" type="year" placeholder="请输入年级">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="专业:" prop="college"> <el-form-item label="专业:" prop="major">
<el-input v-model="form.college" placeholder="请输入专业"></el-input> <el-input v-model="form.major" placeholder="请输入专业"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="水平:" prop="college"> <el-form-item label="水平:" prop="level">
<el-input v-model="form.college" placeholder="请输入水平"></el-input> <el-select v-model="form.level" placeholder="请输入水平">
<el-option label="优" :value="'优'"></el-option>
<el-option label="良" :value="'良'"></el-option>
<el-option label="差" :value="'差'"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否雇用:" prop="college"> <el-form-item label="是否雇用:" prop="hire">
<el-input v-model="form.college" placeholder="请输入是否雇用"></el-input> <el-select v-model="form.hire" placeholder="请输入是否雇用">
<el-option label="是" :value="'是'"></el-option>
<el-option label="否" :value="'否'"></el-option>
</el-select>
</el-form-item> </el-form-item>
<br /> <br />
<el-form-item label="备注:" prop="remark"> <el-form-item label="备注:" prop="remark">
@ -128,7 +137,14 @@
</div> </div>
</template> </template>
<script> <script>
import { listTalent, addTalent, updateTalent, deleteTalent, importTemplate } from '@/api/trainService/index.js' import {
listTalent,
addTalent,
updateTalent,
deleteTalent,
importTemplate,
detailTalent,
} from '@/api/trainService/index.js'
import ImageUpload from '@/components/ImgUpload/index.vue' import ImageUpload from '@/components/ImgUpload/index.vue'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
@ -157,11 +173,7 @@ export default {
certificateNo: [{ required: true, message: '请输入证书编号', trigger: 'blur' }], certificateNo: [{ required: true, message: '请输入证书编号', trigger: 'blur' }],
university: [{ required: true, message: '请输入学校', trigger: 'blur' }], university: [{ required: true, message: '请输入学校', trigger: 'blur' }],
college: [{ required: true, message: '请输入二级学院', trigger: 'blur' }], college: [{ required: true, message: '请输入二级学院', trigger: 'blur' }],
hire: [{ required: true, message: '请输入是否雇用', trigger: 'change' }],
name: [{ required: true, message: '请输入年级', trigger: 'blur' }],
name: [{ required: true, message: '请输入专业', trigger: 'blur' }],
name: [{ required: true, message: '请输入水平', trigger: 'blur' }],
name: [{ required: true, message: '请输入是否雇用', trigger: 'blur' }],
}, },
upload: { upload: {
// //
@ -195,9 +207,11 @@ export default {
}, },
// //
async modify(row) { async modify(row) {
this.title = '修改人才' detailTalent(row.talentId).then((res) => {
this.visibleopen = true this.form = res
this.form = row this.title = '修改人才'
this.visibleopen = true
})
}, },
async delrow(row) { async delrow(row) {
this.$confirm('是否确认删除人才', '警告', { this.$confirm('是否确认删除人才', '警告', {

@ -26,9 +26,13 @@
<el-table-column label="手机号" align="center" prop="phone" /> <el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="教学方向" align="center" prop="teaching" /> <el-table-column label="教学方向" align="center" prop="teaching" />
<el-table-column label="职称" align="center" prop="title" /> <el-table-column label="职称" align="center" prop="title" />
<el-table-column label="经验" align="center" prop="experience" /> <el-table-column label="经验" align="center" prop="workTime" />
<el-table-column label="简介" align="center" prop="profile" /> <el-table-column label="简介" align="center" prop="profile" />
<el-table-column label="是否对外显示" align="center" prop="isEmploy" /> <el-table-column label="是否对外显示" align="center" prop="isShow">
<template slot-scope="scope">
{{ scope.row.isShow ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="modify(scope.row)">修改</el-button> <el-button size="mini" type="text" @click="modify(scope.row)">修改</el-button>
@ -65,11 +69,15 @@
<el-form-item label="职称" prop="title"> <el-form-item label="职称" prop="title">
<el-input v-model="form.title" placeholder="请输入职称"></el-input> <el-input v-model="form.title" placeholder="请输入职称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="经验" prop="experience"> <el-form-item label="经验" prop="workTime">
<el-input v-model="form.experience" placeholder="请输入经验"></el-input> <el-date-picker value-format="yyyy" v-model="form.workTime" type="year" placeholder="请输入经验">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="是否对外显示" prop="isEmploy"> <el-form-item label="是否对外显示" prop="isShow">
<el-input v-model="form.isEmploy" placeholder="请输入是否对外显示"></el-input> <el-select v-model="form.isShow" placeholder="请输入是否雇用">
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></el-option>
</el-select>
</el-form-item> </el-form-item>
<br /> <br />
@ -94,7 +102,7 @@
</div> </div>
</template> </template>
<script> <script>
import { listTeacher, addTeacher, updateTeacher, deleteTalent } from '@/api/trainService/index.js' import { listTeacher, addTeacher, updateTeacher, deleteTalent, detailTalent } from '@/api/trainService/index.js'
import ImageUpload from '@/components/ImageUpload/index.vue' import ImageUpload from '@/components/ImageUpload/index.vue'
export default { export default {
name: 'peixunbaoming', name: 'peixunbaoming',
@ -119,7 +127,7 @@ export default {
phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }], phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
teaching: [{ required: true, message: '请输入教学方向', trigger: 'blur' }], teaching: [{ required: true, message: '请输入教学方向', trigger: 'blur' }],
title: [{ required: true, message: '请输入职称', trigger: 'blur' }], title: [{ required: true, message: '请输入职称', trigger: 'blur' }],
isEmploy: [{ required: true, message: '请输入是否对外显示', trigger: 'blur' }], isShow: [{ required: true, message: '请输入是否对外显示', trigger: 'blur' }],
avatar: [{ required: true, message: '请上传头像', trigger: 'change' }], avatar: [{ required: true, message: '请上传头像', trigger: 'change' }],
}, },
} }
@ -139,12 +147,14 @@ export default {
}, },
// //
async modify(row) { async modify(row) {
this.title = '修改教师' detailTalent(row.talentId).then((res) => {
this.visibleopen = true this.form = res
this.form = row if (this.form.avatar) {
if (this.form.avatar) { this.form.avatar = this.imgbase + this.form.avatar
this.form.avatar = this.imgbase + this.form.avatar }
} this.title = '修改教师'
this.visibleopen = true
})
}, },
async delrow(row) { async delrow(row) {
this.$confirm('是否确认删除教师', '警告', { this.$confirm('是否确认删除教师', '警告', {

Loading…
Cancel
Save