lion 1 year ago
parent 676b729095
commit cb6b6f2928

@ -37,6 +37,19 @@
<el-input v-model="form.name" placeholder="请输入课程名称" clearable style="width: 100%;"></el-input>
</div>
</div>
</template>
<template v-slot:is_virtual v-if="active===0">
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>是否为虚拟课程
</div>
<div class="xy-table-item-content">
<el-select v-model="form.is_virtual" placeholder="请选择" clearable style="width: 100%;">
<el-option v-for="item in false_or_true" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:year v-if="active===0">
<div class="xy-table-item">
@ -320,7 +333,8 @@
form: {
step: '', //
type: '',
name: '',
name: '',
is_virtual:0, //01
year: '',
dateRange: '',
total: '',
@ -570,7 +584,8 @@
this.form.dateRange = res.start_date ? [res.start_date, res.end_date] : ''
this.form.status = res.status ? res.status : 0
this.form.is_arrange = res.is_arrange ? res.is_arrange : 0
this.form.is_fee = res.is_fee ? res.is_fee : 0
this.form.is_fee = res.is_fee ? res.is_fee : 0
this.form.is_virtual = res.is_virtual?res.is_virtual:0
this.form.show_txl = res.show_txl === 0 ? 0 : 1
this.form.show_mobile = res.show_mobile ? res.show_mobile : 0
this.showTinymce = true
@ -627,7 +642,8 @@
this.form = {
step: '', //
type: '',
name: '',
name: '',
is_virtual:0,
year: '',
dateRange: '',
total: '',

@ -8,8 +8,8 @@
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>
</div>
<div class="xy-table-item-content" style="flex-grow:1;text-align:center" v-if="row.fee_files && row.fee_files.length>0">
<div v-for="item in row.fee_files" style="height:300px">
<img style="height:300px" :src="item.url" alt="">
<div v-for="item in row.fee_files">
<img style="width:70%" :src="item.url" alt="">
</div>
<div>
<el-button type="primary" style='margin:15px;' @click="updateFee(1)"></el-button>

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog ref="dialog" :width="50" :is-show.sync="isShow" :type="'form'" :title="typeName" :form="form">
<xy-dialog ref="dialog" :width="70" :is-show.sync="isShow" :type="'form'" :title="typeName" :form="form">
<template v-slot:show>
<div class="xy-table-item" style="padding: 0 20px;">
<div class="xy-table-item-label" style="font-weight: bold;width:0;padding: 0;display: none;">
@ -13,60 +13,69 @@
<div>课程体系{{subjectObj.leibie}}</div>
</div>
<div>
<lx-header icon="" :text="type=='checkshow' || type=='check'?'报名信息':'个人信息'" 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>
<div>
<el-descriptions class="margin-top" :column="2" border>
<!-- 学员字段表 -->
<el-descriptions-item v-for="item in selectFormList" :span="item.span?item.span:1">
<template slot="label">
{{item.name}}
</template>
<div v-if="item.field==='company_date'">
{{student_info[item.field]?(student_info[item.field]=='0000-00-00'?'':student_info[item.field]):''}}
</div>
<div v-else>
{{student_info[item.field]?student_info[item.field]:''}}
</template>
<div v-if="item.field==='company_date'">
{{student_info[item.field]?(student_info[item.field]=='0000-00-00'?'':student_info[item.field]):''}}
</div>
<div v-else>
{{student_info[item.field]?student_info[item.field]:''}}
<!-- 是否有更改的字段 -->
<template v-if="change_data.length>0">
<template v-for="change in change_data">
<span style="color:red"
v-if="change[item.field] && change['need_update']">-->{{change[item.field]}}</span>
</template>
</template>
</div>
</el-descriptions-item>
<el-descriptions-item :span="2" v-if="type==='check' || type==='checkshow' || type==='setPosition'">
<el-descriptions-item :span="2" v-if="type==='check' || type==='checkshow' || type==='setPosition'">
<template slot="label">
本班职务
</template>
{{sign_result.position?sign_result.position:''}}
</el-descriptions-item>
<!-- 报名信息 -->
<template v-if="sign_info.length>0">
<!-- <lx-header v-if="type==='check' || type==='checkshow' || type==='setPosition'" icon="" text="报名信息"
style="margin-bottom: 10px; border: 0px; margin-top: 15px">
</lx-header> -->
<template v-if="type==='check' || type==='checkshow' || type==='setPosition'">
<!-- <el-descriptions class="margin-top" :column="2" border> -->
<template v-for="item in sign_info">
<el-descriptions-item :span="2" v-if="item.submit_files && item.submit_files.length>0">
<template slot="label">
{{item.name}}
</template>
<div>
<template v-for="file in item.submit_files">
<img style="width:100px;margin:10px" :src="host+file"></img>
</template>
</div>
</el-descriptions-item>
<el-descriptions-item v-else :span="2">
<template slot="label">
{{item.name}}
</template>
{{item.value}}
</el-descriptions-item>
</template>
<!-- </el-descriptions> -->
</template>
</el-descriptions-item>
<!-- 报名信息 -->
<template v-if="sign_info.length>0">
<!-- <lx-header v-if="type==='check' || type==='checkshow' || type==='setPosition'" icon="" text="报名信息"
style="margin-bottom: 10px; border: 0px; margin-top: 15px">
</lx-header> -->
<template v-if="type==='check' || type==='checkshow' || type==='setPosition'">
<!-- <el-descriptions class="margin-top" :column="2" border> -->
<template v-for="item in sign_info">
<el-descriptions-item :span="2" v-if="item.submit_files && item.submit_files.length>0">
<template slot="label">
{{item.name}}
</template>
<div>
<template v-for="file in item.submit_files">
<img style="width:100px;margin:10px" :src="host+file"></img>
</template>
</div>
</el-descriptions-item>
<el-descriptions-item v-else :span="2">
<template slot="label">
{{item.name}}
</template>
{{item.value}}
</el-descriptions-item>
</template>
<!-- </el-descriptions> -->
</template>
</template>
</el-descriptions>
</div>
</div>
<!-- 审核查看 -->
@ -188,23 +197,52 @@
v-else-if="type=='check'|| type=='setPosition'" @click="isShow=false">取消</el-button>
<el-button type="primary" plain style='margin-left:5px;margin-bottom:5px;'
v-else-if="type=='show'||type=='checkshow'" @click="isShow=false">关闭</el-button>
</template>
</xy-dialog>
<!-- 选择要覆盖的 字段 -->
<Modal v-model="showChange" width="60" title="审核并更新字段">
<div class="update">
<template v-for="item in selectFormList">
<template v-for="(change,index) in change_data">
<div class="update-item" v-if="change[item.field] && change['need_update']">
<el-checkbox @change="(e)=>{changeCheckBox(e,index)}" v-model="change['is_checked']">
<div class="update-item-name">{{item.name}}:</div>
<div class="update-item-fieldwrap">
<div class="update-item-field" :style="{'margin-top':student_info[item.field]?'10px':'0px'}">
{{student_info[item.field]}}
</div>
<div class="update-item-field1" :style="{'margin-top':change[item.field]?'10px':'0px'}">
{{change[item.field]}}
</div>
</div>
</el-checkbox>
</div>
</template>
</template>
</div>
<template v-slot:footer>
<el-button plain type="primary" plain style='margin-left:5px;margin-bottom:5px;'
@click="showChange = false">取消</el-button>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="saveAndUpdate(false)"></el-button>
<el-button type="primary" style='margin-left:5px;margin-bottom:5px;' @click="saveAndUpdate(true)"></el-button>
</template>
</Modal>
</div>
</template>
<script>
import {
show
show,
save as saveUser
} from '@/api/student/index.js'
import {
save,
show as showSign
} from '@/api/apply/index.js'
import myMixins from "@/mixin/selectMixin.js";
import formMixin from "@/mixin/formMixin.js";
export default {
@ -217,14 +255,17 @@
isShow: false,
type: 'show',
typeName: '查看个人明细',
showChange: false,
id: '',
action: `${process.env.VUE_APP_UPLOAD_API}`,
host: `${process.env.VUE_APP_BASE_API}`,
subjectObj: {},
student_info: {},
row: {},
sign_info: [],
sign_info: [], // user
change_data: [], // user user
sign_result: {},
update_student_info: {}, //
fileList: [],
form: {
show: '',
@ -245,6 +286,15 @@
uploadRemove(file, fileList) {
this.fileList = fileList
},
changeCheckBox(e, index) {
console.log(e, index)
this.$nextTick(() => {
this.$set(this.change_data[index], 'is_checked', e)
})
this.$forceUpdate()
console.log("this.change", this.change_data)
},
// beforeUpload(file) {
// const isImage = file.type.includes('image');
// if (!isImage) {
@ -267,6 +317,29 @@
})
}
this.form.file_ids = _arr
// change_data user
// student_infochange_data
// 1
let has_count = 0 //
if (this.type === 'check') {
if (this.change_data.length > 0 && this.form.status === 1) {
for (var k of this.change_data) {
if (k['need_update']) {
has_count++
}
}
if (has_count > 0) {
console.log("has_count", has_count, this.change_data)
this.showChange = true
return
}
}
}
console.log("123")
// return
//
save({
...this.row,
status: this.form.status,
@ -284,6 +357,74 @@
this.$emit('refresh')
})
},
//
saveAndUpdate(isUpdate) {
console.log("isUpdate",isUpdate)
// return
if(isUpdate){
let update_count = 0 //
this.change_data.map(item => {
if (item.is_checked) {
update_count++
//
for (var student in this.student_info) {
if (item[student]) {
this.update_student_info[student] = item[student]
}
}
}
})
//
if (update_count > 0) {
save({
...this.row,
status: this.form.status,
reason: this.form.reason,
score: this.form.score,
giveup_reason: this.form.giveup_reason,
file_ids: this.form.file_ids,
position: this.form.position
}).then(res => {
saveUser({
...this.update_student_info
}).then(res => {
this.$message({
type: 'success',
message: '审核并更新成功'
})
this.isShow = false
this.showChange = false
this.$emit('refresh')
})
})
console.log("update", this.update_student_info)
} else {
this.$Message.warning("请选择需要更新的字段")
return
}
}else{
save({
...this.row,
status: this.form.status,
reason: this.form.reason,
score: this.form.score,
giveup_reason: this.form.giveup_reason,
file_ids: this.form.file_ids,
position: this.form.position
}).then(res => {
this.$message({
type: 'success',
message: '审核成功'
})
this.isShow = false
this.showChange = false
this.$emit('refresh')
})
}
},
getDetail() {
show({
@ -298,16 +439,20 @@
show_relation: ['user']
}).then(res => {
this.student_info = res.user
this.update_student_info = this.base.deepCopy(res.user)
this.sign_result = res
this.form.position = res.position ? res.position : ''
this.change_data = res.change_data ? res.change_data : []
// user
let _arr = []
if (res.data && Array.isArray(res.data)) {
res.data.map(item => {
if(item.edit_input==='files'){
if (!this.base.isNull(item.value) && item.value.indexOf("/storage/files/") !== -1) {
item.submit_files = item.value.split(",")
}
}
res.data.map(item => {
if (item.edit_input === 'files') {
if (!this.base.isNull(item.value) && item.value.indexOf("/storage/files/") !== -1) {
item.submit_files = item.value.split(",")
}
}
//
if (!this.student_info.hasOwnProperty(item.field)) {
console.log("item.field")
@ -320,11 +465,23 @@
}
this.form.status = res.status ? res.status : 0
this.form.score = res.score ? res.score : ''
this.form.reason = res.reason ? res.reason : ''
this.form.giveup_reason = res.giveup_reason?res.giveup_reason:''
this.form.reason = res.reason ? res.reason : ''
this.form.giveup_reason = res.giveup_reason ? res.giveup_reason : ''
this.fileList = res.files ? res.files : []
console.log("this.sign_info", this.sign_info)
// change_data user
if (this.change_data.length > 0) {
for (var k of this.change_data) {
for (var s in this.student_info) {
console.log(k, s, k.hasOwnProperty(s), k[s] != this.student_info[s])
if (k.hasOwnProperty(s) && k[s] != this.student_info[s]) {
k['need_update'] = true
k['is_checked'] = true
}
}
}
}
console.log("this.sign_info", this.sign_info, this.change_data)
})
}
},
@ -348,10 +505,15 @@
} else {
this.id = ''
this.type = 'show'
this.showChange = false
this.subjectObj = {}
this.sign_result = {}
this.sign_info = []
this.change_data = []
this.fileList = []
this.student_info = {}
this.update_student_info = {}
this.row = {}
this.$refs['dialog'].reset()
}
},
@ -376,6 +538,50 @@
margin-top: 0 !important;
}
.update {
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 30px;
&-item {
flex-basis: 50%;
margin: 10px 0;
font-size: 20px;
::v-deep .el-checkbox {
display: flex;
align-items: baseline;
}
&-fieldwrap {
font-size: 16px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
&-name {
font-size: 16px;
color: rgba(0, 0, 0, 0.5)
}
&-field {
font-size: 16px;
margin-top: 10px;
flex-basis: 100%;
color: #000
}
&-field1 {
font-size: 16px;
margin-top: 10px;
flex-basis: 100%;
color: red
}
}
}
.studentInfo {
&>div {
display: flex;

Loading…
Cancel
Save