lion 1 year ago
parent 61f95ed292
commit 5fdf8645f2

@ -129,7 +129,7 @@
// + // +
if (this.tableName === 'users') { if (this.tableName === 'users') {
b.unshift({ b.unshift({
key: 'status', key: 'status_name',
title: '审核状态', title: '审核状态',
width: 120 width: 120
}); });
@ -196,12 +196,11 @@
}) })
} }
// //
if (this.tableName === 'users') { // if (this.tableName === 'users') {
response.map(item => { // response.map(item => {
item.is_schoolmate = 1 // item.username = item.name
item.username = item.name // })
}) // }
}
this.tableList = response; this.tableList = response;
this.fileList = fileList this.fileList = fileList
this.$message({ this.$message({

@ -86,7 +86,7 @@
<div> <div>
<div class="txl"> <div class="txl">
<div>课程名称{{subjectObj.title}}</div> <div>课程名称{{subjectObj.title}}</div>
<div>开课日期{{subjectObj.date}}</div> <div>开课日期{{subjectObj.date?subjectObj.date:'开课待定'}}</div>
<div>课程体系{{subjectObj.leibie}}</div> <div>课程体系{{subjectObj.leibie}}</div>
</div> </div>
<xy-table :list="list" :total="total" :showIndex="false" @pageIndexChange="pageIndexChange" <xy-table :list="list" :total="total" :showIndex="false" @pageIndexChange="pageIndexChange"
@ -228,10 +228,16 @@
] ]
} }
}, },
mounted() { created(){
this.subjectObj = this.$route.query this.subjectObj = this.$route.query
console.log("this.$route.query",this.$route.query)
this.select.course_id = this.subjectObj.id this.select.course_id = this.subjectObj.id
this.select.status = this.subjectObj.status if(this.subjectObj.status===0){
this.select.status = 0
}else{
this.select.status = this.subjectObj.status?parseInt(this.subjectObj.status):''
}
this.getList() this.getList()
}, },
methods: { methods: {

@ -37,7 +37,7 @@
<div> <div>
<div class="txl"> <div class="txl">
<div>课程名称{{subjectObj.title}}</div> <div>课程名称{{subjectObj.title}}</div>
<div>开课日期{{subjectObj.date}}</div> <div>开课日期{{subjectObj.date?subjectObj.date:'开课待定'}}</div>
<div>课程体系{{subjectObj.leibie}}</div> <div>课程体系{{subjectObj.leibie}}</div>
<div>班主任{{subjectObj.teacher}}</div> <div>班主任{{subjectObj.teacher}}</div>
</div> </div>
@ -239,6 +239,10 @@
key: 'date', key: 'date',
op: 'eq', op: 'eq',
value: this.select.date ? this.select.date : '' value: this.select.date ? this.select.date : ''
}, {
key: 'course_id',
op: 'eq',
value: this.select.course_id
}], }],
}) })
this.list = res.data this.list = res.data

@ -217,7 +217,12 @@
}, },
goAttendance(row) { goAttendance(row) {
let value = row.type_detail.name let value = row.type_detail.name
let teacher = row.teacher ? row.teacher.name : '' let teacher = []
if(row.teacher_detail.length>0){
row.teacher_detail.map(item=>{
teacher.push(item.name)
})
}
this.$router.push({ this.$router.push({
path: '/course/attendance', path: '/course/attendance',
query: { query: {
@ -225,7 +230,7 @@
id: row.id, id: row.id,
date: row.start_date ? row.start_date + '至' + row.end_date : '', date: row.start_date ? row.start_date + '至' + row.end_date : '',
leibie: value, leibie: value,
teacher: teacher teacher: teacher.join(",")
} }
}) })
}, },

@ -7,7 +7,7 @@
<div>课程体系{{subjectObj.type_detail?subjectObj.type_detail.name:''}}</div> <div>课程体系{{subjectObj.type_detail?subjectObj.type_detail.name:''}}</div>
</div> </div>
<div class="txl"> <div class="txl">
<div>班主任{{subjectObj.teacher?subjectObj.teacher.name:''}}</div> <div>班主任{{subjectObj.teacherList?subjectObj.teacherList:''}}</div>
<div>课表状态{{subjectObj.course_content_status===1?'已发布':'未发布'}}</div> <div>课表状态{{subjectObj.course_content_status===1?'已发布':'未发布'}}</div>
</div> </div>
<div class="txl"> <div class="txl">
@ -54,6 +54,9 @@
sendSms, sendSms,
destroy destroy
} from '@/api/course/courseContent.js' } from '@/api/course/courseContent.js'
import {
index as teacherIndex
} from "@/api/info/teachers.js"
import { import {
show, show,
save save
@ -131,6 +134,13 @@
}) })
this.subjectObj = {} this.subjectObj = {}
this.subjectObj = this.base.requestToForm(res, this.subjectObj) this.subjectObj = this.base.requestToForm(res, this.subjectObj)
let teacher = []
if(res.teacher_detail.length>0){
res.teacher_detail.map(item=>{
teacher.push(item.name)
})
}
this.subjectObj.teacherList = teacher.join(",")
}, },
// //
importTable() { importTable() {
@ -138,6 +148,7 @@
}, },
refreshData() { refreshData() {
this.$emit('refresh') this.$emit('refresh')
this.getTeachers()
this.getCourseDetail() this.getCourseDetail()
this.getCousreContent() this.getCousreContent()
}, },
@ -183,6 +194,13 @@
this.$refs.editClass.setTeachers(this.teacher_options) this.$refs.editClass.setTeachers(this.teacher_options)
this.$refs.editClass.isShow = true this.$refs.editClass.isShow = true
}, },
async getTeachers() {
const res = await teacherIndex({
page: 1,
page_size: 999
})
this.teacher_options = res.data
},
deleteList(id) { deleteList(id) {
var that = this; var that = this;
destroy({ destroy({

@ -5,7 +5,8 @@
<div style="display: flex;align-items: center;justify-content: space-between;font-size: 26px;"> <div style="display: flex;align-items: center;justify-content: space-between;font-size: 26px;">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<div style="width:300px">创建报名表单</div> <div style="width:300px">创建报名表单</div>
<el-select v-model="hasCourseId" @change="changeCourse" placeholder="请选择课程表单" clearable style="width: 100%;"> <el-select v-model="hasCourseId" @change="changeCourse" placeholder="请选择课程表单" clearable
style="width: 100%;">
<el-option v-for="item in hasCourseList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in hasCourseList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -41,8 +42,7 @@
" v-for="(i, index) in defaultFormList"> " v-for="(i, index) in defaultFormList">
<el-input :placeholder="i.help?i.help:'表单字段'" :disabled="true"></el-input> <el-input :placeholder="i.help?i.help:'表单字段'" :disabled="true"></el-input>
</el-form-item> --> </el-form-item> -->
<draggable :value="formList" group="items" @change="changeHandler" <draggable :value="formList" group="items" @change="changeHandler" style="width:100%">
style="width:100%">
<el-form-item style="flex-basis: 100%;" :label="i.name || '字段名称'" :required=" <el-form-item style="flex-basis: 100%;" :label="i.name || '字段名称'" :required="
i.rule ? !!i.rule.includes('required') : false i.rule ? !!i.rule.includes('required') : false
" v-for="(i, index) in formList" @click.native="selectPick(i, index)"> " v-for="(i, index) in formList" @click.native="selectPick(i, index)">
@ -82,11 +82,9 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- --> <!-- -->
<el-dialog <el-dialog title="提示" :visible.sync="showTips" width="30%">
title="提示" <div style="padding: 30px;font-size: 24px;text-indent: 2em;">是否确认克隆<span
:visible.sync="showTips" style="color:red">{{hasCourseName}}</span>的报名表单克隆后将<span style="color:red">覆盖原有课程的报名表单</span>请谨慎操作</div>
width="30%">
<div style="padding: 30px;font-size: 24px;text-indent: 2em;">是否确认克隆<span style="color:red">{{hasCourseName}}</span>的报名表单克隆后将<span style="color:red">覆盖原有课程的报名表单</span>请谨慎操作</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="showTips = false"> </el-button> <el-button @click="showTips = false"> </el-button>
<el-button type="primary" @click="copyForms"> </el-button> <el-button type="primary" @click="copyForms"> </el-button>
@ -109,7 +107,8 @@
cloneForm cloneForm
} from "@/api/course/form"; } from "@/api/course/form";
import { import {
index as courseIndex index as courseIndex,
show as courseShow
} from "@/api/course/index.js" } from "@/api/course/index.js"
import { import {
deepCopy deepCopy
@ -162,10 +161,21 @@
sort_type: 'ASC', sort_type: 'ASC',
}) })
this.hasCourseList = res.data.filter((item)=>{return item.id!=this.course_id}) this.hasCourseList = res.data.filter((item) => {
return item.id != this.course_id
})
}, },
changeCourse(e) { changeCourse(e) {
console.log("course-e", e) console.log("course-e", e)
if (e) {
this.getDetail(e)
}
},
getDetail(e) {
courseShow({
id: this.course_id,
}).then(res => {
// this.course_signs_count = res.course_signs_count
if (this.course_signs_count > 0) { if (this.course_signs_count > 0) {
this.$message({ this.$message({
type: 'warning', type: 'warning',
@ -175,7 +185,6 @@
// this.$Message.warning("") // this.$Message.warning("")
return return
} }
if(e){
this.hasCourseList.map(item => { this.hasCourseList.map(item => {
if (item.id === e) { if (item.id === e) {
this.hasCourseId = e this.hasCourseId = e
@ -183,7 +192,7 @@
this.showTips = true this.showTips = true
} }
}) })
} })
}, },
// //
copyForms() { copyForms() {

@ -77,7 +77,7 @@
<div> <div>
<div class="txl"> <div class="txl">
<div>课程名称{{subjectObj.title}}</div> <div>课程名称{{subjectObj.title}}</div>
<div>开课日期{{subjectObj.date}}</div> <div>开课日期{{subjectObj.date?subjectObj.date:'开课待定'}}</div>
<div>课程体系{{subjectObj.leibie}}</div> <div>课程体系{{subjectObj.leibie}}</div>
</div> </div>
<xy-table :list="list" :total="total" :showIndexFixed="'left'" @pageIndexChange="pageIndexChange" <xy-table :list="list" :total="total" :showIndexFixed="'left'" @pageIndexChange="pageIndexChange"

@ -9,11 +9,11 @@
<div class="xy-table-item-content" style="flex-grow: 1;"> <div class="xy-table-item-content" style="flex-grow: 1;">
<div class="courseName" v-if="type=='check' || type=='checkshow' "> <div class="courseName" v-if="type=='check' || type=='checkshow' ">
<div>课程名称{{subjectObj.title}}</div> <div>课程名称{{subjectObj.title}}</div>
<div>开课日期{{subjectObj.date}}</div> <div>开课日期{{subjectObj.date?subjectObj.date:'开课待定'}}</div>
<div>课程体系{{subjectObj.leibie}}</div> <div>课程体系{{subjectObj.leibie}}</div>
</div> </div>
<div> <div>
<lx-header icon="" text="个人信息" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="" :text="type=='checkshow' || type=='check'?'报名信息':'个人信息'" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
</lx-header> </lx-header>
<div> <div>
<el-descriptions class="margin-top" :column="2" border> <el-descriptions class="margin-top" :column="2" border>

Loading…
Cancel
Save