|
|
|
|
@ -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;">
|
|
|
|
|
<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>
|
|
|
|
|
</el-select>
|
|
|
|
|
@ -41,8 +42,7 @@
|
|
|
|
|
" v-for="(i, index) in defaultFormList">
|
|
|
|
|
<el-input :placeholder="i.help?i.help:'表单字段'" :disabled="true"></el-input>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<draggable :value="formList" group="items" @change="changeHandler"
|
|
|
|
|
style="width:100%">
|
|
|
|
|
<draggable :value="formList" group="items" @change="changeHandler" style="width:100%">
|
|
|
|
|
<el-form-item style="flex-basis: 100%;" :label="i.name || '字段名称'" :required="
|
|
|
|
|
i.rule ? !!i.rule.includes('required') : false
|
|
|
|
|
" v-for="(i, index) in formList" @click.native="selectPick(i, index)">
|
|
|
|
|
@ -82,11 +82,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="提示"
|
|
|
|
|
:visible.sync="showTips"
|
|
|
|
|
width="30%">
|
|
|
|
|
<div style="padding: 30px;font-size: 24px;text-indent: 2em;">是否确认克隆<span style="color:red">{{hasCourseName}}</span>的报名表单,克隆后将<span style="color:red">覆盖原有课程的报名表单</span>,请谨慎操作。</div>
|
|
|
|
|
<el-dialog title="提示" :visible.sync="showTips" 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">
|
|
|
|
|
<el-button @click="showTips = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="copyForms">确 定</el-button>
|
|
|
|
|
@ -109,7 +107,8 @@
|
|
|
|
|
cloneForm
|
|
|
|
|
} from "@/api/course/form";
|
|
|
|
|
import {
|
|
|
|
|
index as courseIndex
|
|
|
|
|
index as courseIndex,
|
|
|
|
|
show as courseShow
|
|
|
|
|
} from "@/api/course/index.js"
|
|
|
|
|
import {
|
|
|
|
|
deepCopy
|
|
|
|
|
@ -162,10 +161,21 @@
|
|
|
|
|
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) {
|
|
|
|
|
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) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
@ -175,7 +185,6 @@
|
|
|
|
|
// this.$Message.warning("当前课程已有人员报名,不可进行报名表单克隆操作")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(e){
|
|
|
|
|
this.hasCourseList.map(item => {
|
|
|
|
|
if (item.id === e) {
|
|
|
|
|
this.hasCourseId = e
|
|
|
|
|
@ -183,7 +192,7 @@
|
|
|
|
|
this.showTips = true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 复制表单数据
|
|
|
|
|
copyForms() {
|
|
|
|
|
|