师资报名查看

main
lijingyu007 5 months ago
parent 28e27e03a7
commit d44268b783
  1. 2
      .env.development
  2. 2
      package.json
  3. 78
      src/components/jsonTool/index.vue
  4. 5
      src/main.js
  5. 11
      src/views/trainService/signlist.vue
  6. 110
      src/views/trainService/signupStudent.vue

@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
# VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/test-api' # VUE_APP_BASE_TARGET = 'http://www.bjkeyware.com/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://192.168.0.129: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'

@ -39,6 +39,7 @@
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "^0.21.1", "axios": "^0.21.1",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"bin-code-editor": "^0.9.0",
"caniuse-lite": "^1.0.30001281", "caniuse-lite": "^1.0.30001281",
"clipboard": "2.0.6", "clipboard": "2.0.6",
"compression-webpack-plugin": "^5.0.1", "compression-webpack-plugin": "^5.0.1",
@ -89,7 +90,6 @@
"sass-loader": "^10.0.0", "sass-loader": "^10.0.0",
"script-ext-html-webpack-plugin": "2.1.5", "script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1", "svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12" "vue-template-compiler": "2.6.12"
}, },
"engines": { "engines": {

@ -0,0 +1,78 @@
<template>
<div style="width: 100%; margin-top: 30px">
<b-code-editor
v-model="jsonData"
:auto-format="true"
:smart-indent="true"
theme="dracula"
:indent-unit="4"
:line-wrap="false"
ref="editor"
></b-code-editor>
<br />
<!-- <el-button type="primary" @click="onSubumit">提交</el-button> -->
</div>
</template>
<script>
export default {
props: {
jsonData: {
type: String,
default: `[
{
"name": "姓名",
"key": "name",
"type": "input",
"value": ""
},
{
"title": "在校职务",
"key": "title",
"type": "input",
"value": ""
},
{
"mobile": "手机号",
"key": "mobile",
"type": "input",
"value": ""
}
]`,
},
},
data() {
return {
}
},
methods: {
// json
isJSON(str) {
if (typeof str == 'string') {
try {
var obj = JSON.parse(str)
if (typeof obj == 'object' && obj) {
return true
} else {
return false
}
} catch (e) {
return false
}
} else if (typeof str == 'object' && str) {
return true
}
},
onSubumit() {
if (!this.isJSON(this.jsonData)) {
this.$message.error(`json格式错误`)
return false
}
this.$message.success('json格式正确')
},
},
}
</script>
<style>
</style>

@ -32,6 +32,11 @@ import Distpicker from 'v-distpicker'
Vue.component('v-distpicker', Distpicker) Vue.component('v-distpicker', Distpicker)
// json
import CodeEditor from 'bin-code-editor';
Vue.use(CodeEditor);
// json
// 防xss攻击 // 防xss攻击
import Xss from 'xss' import Xss from 'xss'
Vue.prototype.Xss = Xss Vue.prototype.Xss = Xss

@ -34,6 +34,7 @@
<el-option label="校企合作班" :value="0"></el-option> <el-option label="校企合作班" :value="0"></el-option>
<el-option label="线下培训进阶班" :value="1"></el-option> <el-option label="线下培训进阶班" :value="1"></el-option>
<el-option label="可靠性人才培训班" :value="2"></el-option> <el-option label="可靠性人才培训班" :value="2"></el-option>
<el-option label="师资培训班" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -131,6 +132,7 @@
<el-option label="校企合作班" :value="0"></el-option> <el-option label="校企合作班" :value="0"></el-option>
<el-option label="线下培训进阶班" :value="1"></el-option> <el-option label="线下培训进阶班" :value="1"></el-option>
<el-option label="可靠性人才培训班" :value="2"></el-option> <el-option label="可靠性人才培训班" :value="2"></el-option>
<el-option label="师资培训班" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="培训教师" prop="teacherName"> <el-form-item label="培训教师" prop="teacherName">
@ -233,6 +235,8 @@
imageType="zip|rar" imageType="zip|rar"
/> />
</el-form-item> </el-form-item>
<!-- 编辑json -->
<JsonTool ref="jsontool" v-if="form.classType == 3"/>
<el-form-item style="padding-left: 170px"> <el-form-item style="padding-left: 170px">
<el-button <el-button
@ -276,6 +280,7 @@
@pagination="getStudentList" @pagination="getStudentList"
/> />
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -291,9 +296,10 @@ import {
import ImageUpload from '@/components/ImgUpload/index.vue' import ImageUpload from '@/components/ImgUpload/index.vue'
import NonimageUpload from '@/views/components/NonimageUpload' import NonimageUpload from '@/views/components/NonimageUpload'
// 1 2 3 4 5 status // 1 2 3 4 5 status
import JsonTool from '@/components/jsonTool'
export default { export default {
name: 'peixunbaoming', name: 'peixunbaoming',
components: { ImageUpload, NonimageUpload }, components: { ImageUpload, NonimageUpload, JsonTool },
data() { data() {
return { return {
teacherList: [], teacherList: [],
@ -348,6 +354,9 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
// json
// json
//
async getTeacherList() { async getTeacherList() {
const res = await listTeacherAll() const res = await listTeacherAll()
this.teacherList = res this.teacherList = res

@ -1,43 +1,37 @@
<template> <template>
<div class="container" style="padding: 30px"> <div class="container" style="padding: 30px">
<el-form <el-form :model="queryParamss" ref="queryForm" inline label-width="68px">
:model="queryParamss" <el-form-item label="姓名" prop="studentName">
ref="queryForm" <el-input v-model="queryParamss.studentName" placeholder="请输入姓名" clearable size="small" />
inline </el-form-item>
label-width="68px" <el-form-item label="手机号" prop="mobile">
> <el-input v-model="queryParamss.mobile" placeholder="请输入手机号" clearable size="small" />
<el-form-item label="姓名" prop="studentName"> </el-form-item>
<el-input v-model="queryParamss.studentName" placeholder="请输入姓名" clearable size="small" /> <!-- <el-form-item label="所属学院" prop="homeCollege" v-if="$route.query.type == 0">
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model="queryParamss.mobile" placeholder="请输入手机号" clearable size="small" />
</el-form-item>
<!-- <el-form-item label="所属学院" prop="homeCollege" v-if="$route.query.type == 0">
<el-input v-model="queryParamss.homeCollege" placeholder="请输入所属学院" clearable size="small" /> <el-input v-model="queryParamss.homeCollege" placeholder="请输入所属学院" clearable size="small" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="辅导员" prop="counsellor" v-if="$route.query.type == 0"> <el-form-item label="辅导员" prop="counsellor" v-if="$route.query.type == 0">
<el-input v-model="queryParamss.counsellor" placeholder="请输入辅导员姓名" clearable size="small" /> <el-input v-model="queryParamss.counsellor" placeholder="请输入辅导员姓名" clearable size="small" />
</el-form-item> </el-form-item>
<el-form-item label="专业" prop="majorName" v-if="$route.query.type == 0"> <el-form-item label="专业" prop="majorName" v-if="$route.query.type == 0">
<el-input v-model="queryParamss.majorName" placeholder="请输入专业" clearable size="small" /> <el-input v-model="queryParamss.majorName" placeholder="请输入专业" clearable size="small" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 详细学生信息弹层 --> <!-- 详细学生信息弹层 -->
<el-table v-if="$route.query.type != 3" :data="studentList" v-loading="loading">
<el-table :data="studentList" v-loading="loading">
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" />
<el-table-column label="学号" align="center" prop="studentCode" v-if="$route.query.type == 0" /> <el-table-column label="学号" align="center" prop="studentCode" v-if="$route.query.type == 0" />
<el-table-column label="姓名" align="center" prop="studentName" /> <el-table-column label="姓名" align="center" prop="studentName" />
<!-- <el-table-column label="所属学院" align="center" prop="homeCollege" v-if="$route.query.type == 0" /> --> <!-- <el-table-column label="所属学院" align="center" prop="homeCollege" v-if="$route.query.type == 0" /> -->
<el-table-column label="专业名称" align="center" prop="majorName" v-if="$route.query.type == 0" /> <el-table-column label="专业名称" align="center" prop="majorName" v-if="$route.query.type == 0" />
<el-table-column label="手机号" align="center" prop="mobile" /> <el-table-column label="手机号" align="center" prop="mobile" />
<el-table-column label="辅导员" align="center" prop="counsellor" v-if="$route.query.type == 0"/> <el-table-column label="辅导员" align="center" prop="counsellor" v-if="$route.query.type == 0" />
<el-table-column label="辅导员联系方式" align="center" prop="counsellorTel" v-if="$route.query.type == 0"/> <el-table-column label="辅导员联系方式" align="center" prop="counsellorTel" v-if="$route.query.type == 0" />
<el-table-column label="报名时间" align="center" prop="registrationTime" /> <el-table-column label="报名时间" align="center" prop="registrationTime" />
<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">
@ -49,6 +43,18 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table v-else :data="teacherList" v-loading="loading">
<el-table-column label="序号" align="center" type="index" />
<el-table-column v-for="it in headerList" :key="it" :label="headerData[it]" align="center" :prop="it" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" v-if="scope.row.remark" @click="editRemark(scope.row)"
>修改备注</el-button
>
<el-button size="mini" type="text" v-else @click="addRemark(scope.row)">添加备注</el-button>
</template>
</el-table-column>
</el-table>
<pagination <pagination
v-show="totals > 0" v-show="totals > 0"
:total="totals" :total="totals"
@ -95,7 +101,7 @@ export default {
mobile: null, mobile: null,
majorName: null, majorName: null,
counsellor: null, counsellor: null,
counsellorTel: null counsellorTel: null,
}, },
totals: 0, totals: 0,
@ -108,6 +114,10 @@ export default {
remark: [{ required: true, message: '请输入备注', trigger: 'blur' }], remark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
}, },
rowId: null, rowId: null,
teacherList: [], //
//
headerList: [],
headerData: {},
} }
}, },
@ -117,8 +127,46 @@ export default {
methods: { methods: {
async getStudentList() { async getStudentList() {
this.loading = true this.loading = true
const res = await searchNum({ trainClassId: this.$route.query.id, ...this.queryParamss }) const res = await searchNum({
this.studentList = res.rows classType: this.$route.query.type,
trainClassId: this.$route.query.id,
...this.queryParamss,
})
if (this.$route.query.type == 3 && res.total > 0) {
// json
if (res.rows[0].data) {
this.headerList = []
this.headerData ={}
//
const firstData = JSON.parse(res.rows[0].data)
firstData.forEach((it) => {
//
this.headerList.push(it.key)
//
this.headerData[it.key] = it[it.key]
})
//
this.headerList.push('remark')
this.headerData.remark = '备注'
//
const newData = []
// --json
res.rows.forEach((item) => {
if (item.data) {
const obj = {}
JSON.parse(item.data).forEach((ite) => {
obj[ite.key] = ite.value
obj.trainingStudentId = item.trainingStudentId
obj.remark = item.remark
})
newData.push(obj)
}
})
this.teacherList = newData
}
} else {
this.studentList = res.rows
}
this.totals = res.total this.totals = res.total
this.loading = false this.loading = false
}, },
@ -141,7 +189,7 @@ export default {
this.rowId = row.trainingStudentId this.rowId = row.trainingStudentId
this.visibleopen = true this.visibleopen = true
this.title = '修改备注' this.title = '修改备注'
this.form = {remark: row.remark} this.form = { remark: row.remark }
}, },
// //
submitRemark() { submitRemark() {

Loading…
Cancel
Save