lion 1 year ago
parent a1a5816dc5
commit bd1fc8cc0f

@ -153,7 +153,7 @@ export default {
type: 'success'
}, {
id: 2,
value: '驳回',
value: '审核不通过',
type: 'warning'
}, {
id: 3,

@ -69,7 +69,7 @@
</div>
<div style="margin-top:15px">
<el-button type="primary" style='margin:15px;' @click="submit(1)"></el-button>
<el-button type="primary" style='margin:15px;' @click="submit(2)"></el-button>
<el-button type="primary" style='margin:15px;' @click="submit(2)"></el-button>
<el-button type="primary" plain style='margin:15px;' @click="submit(3)"></el-button>
</div>
</div>

@ -76,6 +76,8 @@
},
//
async getHeaders() {
//
const res = await realTableShow({
table_name: this.tableName
})
@ -193,6 +195,7 @@
computed: {},
watch: {
formInfo(newVal) {
console.log("formInfo", newVal)
if (newVal && newVal instanceof Array) {
this.table = this.headers = newVal.map((i) => {
return {
@ -203,12 +206,29 @@
}
},
dialogVisible(newval) {
console.log("newval", newval, this.tableName)
console.log("newval", newval, this.tableName,this.formInfo)
if (newval) {
let changeTableName = this.tableName.replace('_', '-')
this.action = `${process.env.VUE_APP_BASE_API}/api/admin/${changeTableName}/excel-show`
this.import_action = `/api/admin/${changeTableName}/import`
//
if(this.tableName==='users'){
this.import_action = `/api/admin/${changeTableName}/import-study`
this.table = this.headers = this.formInfo.map((i) => {
if(i.prop){
return {
key: i.prop,
title: i.label,
};
}
});
console.log("this.table",this.headers)
}else{
this.getHeaders()
}
console.log("action", this.action, this.import_action)
} else {
this.tableList = []

@ -34,7 +34,9 @@
<template v-slot:dateRange>
<el-table-column align='center' label="开课日期" width="200" header-align="center">
<template slot-scope="scope">
{{scope.row.start_date}}{{scope.row.end_date}}
<div>
{{scope.row.start_date?scope.row.start_date+'至'+scope.row.end_date:''}}
</div>
</template>
</el-table-column>
</template>

@ -117,7 +117,7 @@
<template v-slot:image_id 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>课程封面680*380
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>课程封面680*380
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' :on-exceed="onExceed" :limit="1" list-type="picture-card"
@ -265,10 +265,10 @@
required: true,
message: '请选择课程类别'
}],
image_id: [{
required: true,
message: '请上传课程封面'
}],
// image_id: [{
// required: true,
// message: ''
// }],
// content: [{
// required: true,
// message: ''

@ -8,7 +8,7 @@
<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">
<div v-for="item in row.fee_files" style="height:300px">
<img style="height:300px" :src="item.url" alt="">
</div>
<div>

@ -68,8 +68,7 @@
show({
id: this.id
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.$forceUpdate()
this.form = this.base.deepCopy(res, this.form)
})
},
},

@ -16,11 +16,13 @@
</div>
</div>
<div class="code" v-if="imgSrc">
<div class="code">
<div v-if="imgSrc">
<img :src="imgSrc"></img>
</div>
</div>
</div>
</div>
</template>
@ -86,12 +88,12 @@
}
.code {
height: 300px;
height: 200px;
text-align: center;
>img {
width: 300px;
height: 300px;
img {
width: 200px;
height: 200px;
}
}
</style>

@ -81,7 +81,7 @@
header-align="center">
<template slot-scope="scope">
<!-- -->
<el-button type="primary" v-if="scope.row.fee_status===3" size="small"
<el-button type="primary" size="small" v-if="scope.row.fee_status===3"
@click="showCheckPay(scope.row)">核对</el-button>
</template>
</el-table-column>

@ -78,7 +78,7 @@
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
<el-button type="primary" size="small">导入</el-button>
<el-button type="primary" size="small" @click="importTable"></el-button>
<el-button type="primary" size="small" @click="updateSchoolmates(1)"></el-button>
<el-button type="primary" size="small" @click="updateSchoolmates(0)"></el-button>
</div>
@ -135,6 +135,8 @@
</div>
<student-detail ref="studentDetail"></student-detail>
<imports ref="imports" :formInfo="table_item" :table-name="'users'" @refresh="getList"></imports>
</div>
</template>
@ -146,17 +148,19 @@
indexStudy,
updateSchoolmate
} from '@/api/student/index.js'
import imports from "@/views/component/imports.vue"
export default {
mixins: [myMixins, formMixin],
components: {
studentDetail
studentDetail,
imports
},
data() {
return {
path: '',
select: {
name: '',
mobile:'',
mobile: '',
course_name: '',
company_name: '',
company_position: '',
@ -164,7 +168,7 @@
company_type: '',
company_industry: '',
is_vip: '',
is_schoolmate:'',
is_schoolmate: '',
courses_end_date: '',
page: 1,
page_size: 10,
@ -237,6 +241,15 @@
this.getList()
},
methods: {
importTable(row) {
// this.$refs.imports.tableData = {
// 'data[course_id]': row.course_id,
// 'data[course_content_id]': row.id
// }
this.$refs.imports.show()
// {"course_id":15,"course_content_id":188}
},
pageIndexChange(e) {
this.select.page = e
this.getList()
@ -251,7 +264,7 @@
page: this.select.page,
page_size: this.select.page_size,
name: this.select.name,
mobile:this.select.mobile,
mobile: this.select.mobile,
company_name: this.select.company_name,
company_position: this.select.company_position,
company_area: this.select.company_area,
@ -259,7 +272,7 @@
company_industry: this.select.company_industry,
is_vip: this.select.is_vip,
courses_end_date: this.select.courses_end_date,
is_schoolmate:this.select.is_schoolmate
is_schoolmate: this.select.is_schoolmate
})
this.list = res.list.data
this.total = res.list.total
@ -319,8 +332,9 @@
margin-right: 10px;
margin-bottom: 10px;
width: 150px;
&:last-child {
width:auto
width: auto
}
}

@ -72,7 +72,7 @@
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
<el-button type="primary" size="small">导出</el-button>
<el-button type="primary" size="small" @click="exportExcel"></el-button>
</div>
</div>
@ -131,6 +131,9 @@
import studentDetail from './components/detail.vue';
import myMixins from "@/mixin/selectMixin.js";
import formMixin from "@/mixin/formMixin.js";
import {
download
} from "@/utils/downloadRequest";
import {
indexStudy
} from '@/api/student/index.js'
@ -260,6 +263,30 @@
this.$refs.studentDetail.id = id
this.$refs.studentDetail.type = type
this.$refs.studentDetail.isShow = true
},
exportExcel() {
let _export = {}
this.table_item.map(item => {
_export[item.prop] = item.label
})
download(
'/api/admin/users/study',
'get', {
export_fields: _export,
name: this.select.name,
mobile:this.select.mobile,
company_name: this.select.company_name,
company_position: this.select.company_position,
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
is_vip: this.select.is_vip,
courses_end_date: this.select.courses_end_date,
is_export: 1,
page: 1,
page_size: 999
},
`学员信息.xlsx`)
}
}
}

Loading…
Cancel
Save