前端新加字段

main
lijingyu007 6 months ago
parent c8e87b77d9
commit bb4426fc2b
  1. 2
      .env.development
  2. 2
      src/views/trainService/school.vue
  3. 34
      src/views/trainService/signlist.vue
  4. 93
      src/views/trainService/talentPool.vue
  5. 73
      src/views/trainService/trainTeacher.vue

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

@ -16,7 +16,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</div> -->
<div style="margin-top: 5px">
<div style="margin-top: 5px;margin-bottom:20px">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addsign">新增</el-button>
</div>
</el-form>

@ -1,5 +1,6 @@
<template>
<div class="container" style="padding: 30px">
<el-form
:model="queryParams"
ref="queryForm"
@ -41,10 +42,10 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</div>
<div style="margin-top: 5px">
</el-form>
<div style="margin-top: 5px; margin-bottom: 20px">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addsign">新增</el-button>
</div>
</el-form>
<el-table v-loading="loading" :data="classList">
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="学校" align="center" prop="schoolName" />
@ -58,24 +59,25 @@
<span v-if="scope.row.classType == 2">可靠性人才培训班</span>
</template>
</el-table-column>
<el-table-column label="培训教师" align="center" prop="teacherName" />
<el-table-column label="报名开始时间" align="center" prop="registrationStartTime">
<template slot-scope="scope">
{{ scope.row.registrationStartTime.slice(0, 10) || '未录入' }}
{{ (scope.row.registrationStartTime && scope.row.registrationStartTime.slice(0, 10)) || '未录入' }}
</template>
</el-table-column>
<el-table-column label="报名结束时间" align="center" prop="registrationEndTime">
<template slot-scope="scope">
{{ scope.row.registrationEndTime.slice(0, 10) || '未录入' }}
{{ (scope.row.registrationEndTime && scope.row.registrationEndTime.slice(0, 10)) || '未录入' }}
</template>
</el-table-column>
<el-table-column label="培训开始时间" align="center" prop="trainStartTime">
<template slot-scope="scope">
{{ scope.row.trainStartTime.slice(0, 10) || '未录入' }}
{{ (scope.row.trainStartTime && scope.row.trainStartTime.slice(0, 10)) || '未录入' }}
</template>
</el-table-column>
<el-table-column label="培训结束时间" align="center" prop="trainEndTime">
<template slot-scope="scope">
{{ scope.row.trainEndTime.slice(0, 10) || '未录入' }}
{{ (scope.row.trainEndTime && scope.row.trainEndTime.slice(0, 10)) || '未录入' }}
</template>
</el-table-column>
<el-table-column label="已报名/总人数" align="center" prop="classSize">
@ -114,7 +116,7 @@
:title="title"
:visible.sync="visibleopen"
:close-on-click-modal="false"
width="700px"
width="800px"
append-to-body
@close="colsedia"
>
@ -127,6 +129,16 @@
<el-option label="可靠性人才培训班" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="培训教师" prop="teacher">
<el-select allow-create filterable v-model="form.teacher">
<el-option
v-for="it in teacherList"
:key="it.talentId"
:label="it.name"
:value="it.talentId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="学校名称" prop="schoolId" v-if="form.classType == 0">
<el-select v-model="form.schoolId">
<el-option
@ -265,7 +277,7 @@ import {
searchNum,
} from '@/api/trainService/index.js'
import ImageUpload from '@/components/ImgUpload/index.vue'
import { listTeacher } from '@/api/trainService/index.js'
import NonimageUpload from '@/views/components/NonimageUpload'
// 1 2 3 4 5 status
export default {
@ -273,6 +285,7 @@ export default {
components: { ImageUpload, NonimageUpload },
data() {
return {
teacherList: [],
imgAction: process.env.VUE_APP_BASE_API + '/upload',
loading: false,
classList: [],
@ -315,6 +328,10 @@ export default {
mounted() {},
methods: {
async getTeacherList() {
const res = await listTeacher()
this.teacherList = res.rows
},
//
setPackagePath(value) {
this.form.attachment = value
@ -423,6 +440,7 @@ export default {
created() {
this.getList()
this.getSchoolListFn()
this.getTeacherList()
},
}
</script>

@ -16,7 +16,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</div> -->
<div style="margin-top: 5px; margin-bottom: 10px">
<div style="margin-top: 5px; margin-bottom: 20px">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addsign">新增</el-button>
<el-button type="warning" icon="el-icon-plus" size="mini" @click="handleImport">导入</el-button>
</div>
@ -28,6 +28,10 @@
<el-table-column label="证书编号" align="center" prop="certificateNo" />
<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="college" />
<el-table-column label="是否雇用" align="center" prop="college" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
@ -52,39 +56,43 @@
append-to-body
@close="colsedia"
>
<el-form :model="form" :rules="rules" ref="form" label-width="70px">
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name"></el-input>
<el-form :model="form" :rules="rules" ref="form" label-width="100px" inline>
<el-form-item label="姓名:" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone"></el-input>
<el-form-item label="手机号:" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="证书编号" prop="certificateNo">
<el-input v-model="form.certificateNo"></el-input>
<el-form-item label="证书编号:" prop="certificateNo">
<el-input v-model="form.certificateNo" placeholder="请输入证书编号"></el-input>
</el-form-item>
<el-form-item label="学校" prop="university">
<el-input v-model="form.university"></el-input>
<el-form-item label="学校:" prop="university">
<el-input v-model="form.university" placeholder="请输入学校"></el-input>
</el-form-item>
<el-form-item label="二级学院" prop="college">
<el-input v-model="form.college"></el-input>
<el-form-item label="二级学院:" prop="college">
<el-input v-model="form.college" placeholder="请输入二级学院"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input>
<el-form-item label="年级:" prop="college">
<el-input v-model="form.college" placeholder="请输入年级"></el-input>
</el-form-item>
<el-form-item style="margin-top: 80px; text-align: center; margin-left: -150px">
<el-button
type="primary"
style="width: 135px; font-size: 16px; height: 39px; line-height: 11px"
@click="submitto('confirm')"
>确认</el-button
>
<el-button
style="width: 135px; font-size: 16px; height: 39px; line-height: 11px; margin-left: 30px"
@click="colsedia"
>取消</el-button
>
<el-form-item label="专业:" prop="college">
<el-input v-model="form.college" placeholder="请输入专业"></el-input>
</el-form-item>
<el-form-item label="水平:" prop="college">
<el-input v-model="form.college" placeholder="请输入水平"></el-input>
</el-form-item>
<el-form-item label="是否雇用:" prop="college">
<el-input v-model="form.college" placeholder="请输入是否雇用"></el-input>
</el-form-item>
<br />
<el-form-item label="备注:" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitto('confirm')">确认</el-button>
<el-button @click="colsedia">取消</el-button>
</span>
</el-dialog>
<!-- 导入对话框 -->
@ -143,7 +151,18 @@ export default {
title: '新增人才',
visibleopen: false,
form: {},
rules: {},
rules: {
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
certificateNo: [{ required: true, message: '请输入证书编号', trigger: 'blur' }],
university: [{ required: true, message: '请输入学校', trigger: 'blur' }],
college: [{ required: true, message: '请输入二级学院', trigger: 'blur' }],
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: {
//
open: false,
@ -195,21 +214,30 @@ export default {
})
},
//
async submitto() {
submitto() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.talentId) {
//
await updateTalent(this.form)
updateTalent(this.form).then((res) => {
this.$message.success('修改成功')
this.colsedia()
this.getList()
})
} else {
// console.log(this.form);
await addTalent(this.form)
addTalent(this.form).then((res) => {
this.$message.success('新增成功')
}
this.colsedia()
this.getList()
})
}
}
})
},
//
colsedia() {
this.$refs['form'].resetFields()
this.visibleopen = false
},
handleQuery() {
@ -257,4 +285,7 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .el-textarea__inner {
width: 500px;
}
</style>

@ -16,7 +16,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</div> -->
<div style="margin-top: 5px">
<div style="margin-top: 5px; margin-bottom: 20px">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addsign">新增</el-button>
</div>
</el-form>
@ -26,7 +26,9 @@
<el-table-column label="手机号" align="center" prop="phone" />
<el-table-column label="教学方向" align="center" prop="teaching" />
<el-table-column label="职称" align="center" prop="title" />
<el-table-column label="经验" align="center" prop="experience" />
<el-table-column label="简介" align="center" prop="profile" />
<el-table-column label="是否对外显示" align="center" prop="isEmploy" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="modify(scope.row)">修改</el-button>
@ -46,26 +48,31 @@
:title="title"
:visible.sync="visibleopen"
:close-on-click-modal="false"
width="700px"
width="720px"
append-to-body
@close="colsedia"
>
<el-form :model="form" :rules="rules" ref="form" label-width="70px">
<el-form :model="form" :rules="rules" ref="form" label-width="110px" inline>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name"></el-input>
<el-input v-model="form.name" placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="form.phone"></el-input>
<el-input v-model="form.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="教学方向" prop="teaching">
<el-input v-model="form.teaching"></el-input>
<el-input v-model="form.teaching" placeholder="请输入教学方向"></el-input>
</el-form-item>
<el-form-item label="职称" prop="title">
<el-input v-model="form.title"></el-input>
<el-input v-model="form.title" placeholder="请输入职称"></el-input>
</el-form-item>
<el-form-item label="简介" prop="profile">
<el-input v-model="form.profile" type="textarea" :rows="6"></el-input>
<el-form-item label="经验" prop="experience">
<el-input v-model="form.experience" placeholder="请输入经验"></el-input>
</el-form-item>
<el-form-item label="是否对外显示" prop="isEmploy">
<el-input v-model="form.isEmploy" placeholder="请输入是否对外显示"></el-input>
</el-form-item>
<br />
<el-form-item label="图片" prop="avatar">
<ImageUpload
ref="imgupload"
@ -75,21 +82,14 @@
:limit="1"
/>
</el-form-item>
<el-form-item style="margin-top: 80px; text-align: center; margin-left: -150px">
<el-button
type="primary"
style="width: 135px; font-size: 16px; height: 39px; line-height: 11px"
@click="submitto('confirm')"
>确认</el-button
>
<el-button
style="width: 135px; font-size: 16px; height: 39px; line-height: 11px; margin-left: 30px"
@click="colsedia"
>取消</el-button
>
<el-form-item label="简介" prop="profile">
<el-input v-model="form.profile" placeholder="请输入简介" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitto('confirm')"> </el-button>
<el-button @click="colsedia"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -114,7 +114,14 @@ export default {
title: '新增教师',
visibleopen: false,
form: {},
rules: {},
rules: {
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
phone: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
teaching: [{ required: true, message: '请输入教学方向', trigger: 'blur' }],
title: [{ required: true, message: '请输入职称', trigger: 'blur' }],
isEmploy: [{ required: true, message: '请输入是否对外显示', trigger: 'blur' }],
avatar: [{ required: true, message: '请上传头像', trigger: 'change' }],
},
}
},
@ -154,25 +161,34 @@ export default {
})
},
//
async submitto() {
submitto() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.talentId) {
//
const url = this.form.avatar
const index = url.indexOf('/profile')
this.form.avatar = url.substring(index)
console.log(this.form)
await updateTeacher(this.form)
updateTeacher(this.form).then((res) => {
this.$message.success('修改成功')
this.colsedia()
this.getList()
})
} else {
await addTeacher(this.form)
addTeacher(this.form).then((res) => {
this.$message.success('新增成功')
}
this.colsedia()
this.getList()
})
}
}
})
},
//
colsedia() {
this.visibleopen = false
this.$refs['form'].resetFields()
},
handleQuery() {
this.getList()
@ -189,4 +205,7 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .el-textarea__inner {
width: 500px;
}
</style>

Loading…
Cancel
Save