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>

@ -75,7 +75,9 @@
this.dialogVisible = false;
},
//
async getHeaders() {
async getHeaders() {
//
const res = await realTableShow({
table_name: this.tableName
})
@ -192,7 +194,8 @@
},
computed: {},
watch: {
formInfo(newVal) {
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`
this.getHeaders()
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 = []

@ -33,8 +33,10 @@
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange" :table-item="table_item">
<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}}
<template slot-scope="scope">
<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,8 +16,10 @@
</div>
</div>
<div class="code" v-if="imgSrc">
<img :src="imgSrc"></img>
<div class="code">
<div v-if="imgSrc">
<img :src="imgSrc"></img>
</div>
</div>
</div>
</div>
@ -86,12 +88,12 @@
}
.code {
height: 300px;
height: 200px;
text-align: center;
>img {
width: 300px;
height: 300px;
img {
width: 200px;
height: 200px;
}
}
</style>

@ -80,8 +80,8 @@
<el-table-column v-if="url_type=='pay'" align='center' fixed="right" label="操作" width="80"
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>

@ -10,9 +10,9 @@
<div>
<div>
<el-input v-model="select.name" placeholder="请输入姓名"></el-input>
</div>
<div>
<el-input v-model="select.mobile" placeholder="请输入手机号"></el-input>
</div>
<div>
<el-input v-model="select.mobile" placeholder="请输入手机号"></el-input>
</div>
<div>
<el-input v-model="select.company_name" placeholder="请输入公司名称"></el-input>
@ -64,12 +64,12 @@
<el-option v-for="item in is_vip_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.is_schoolmate" placeholder="请选择是否校友" clearable>
<el-option v-for="item in is_schoolmate_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-select v-model="select.is_schoolmate" placeholder="请选择是否校友" clearable>
<el-option v-for="item in is_schoolmate_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
<div>
<el-date-picker style="width:100%" @change="changeDate" v-model="select.courses_end_date" type="date"
@ -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>
@ -106,20 +106,20 @@
</template>
<template v-slot:is_schoolmate>
<el-table-column align='center' label="是否校友库学员" width="120" header-align="center">
<template slot-scope="scope">
<div v-for="item in is_schoolmate_list">
<el-tag v-if="scope.row.is_schoolmate===item.id" :type="item.type">{{item.value}}</el-tag>
<template slot-scope="scope">
<div v-for="item in is_schoolmate_list">
<el-tag v-if="scope.row.is_schoolmate===item.id" :type="item.type">{{item.value}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:is_vip>
<el-table-column align='center' label="学员身份" width="120" header-align="center">
<template slot-scope="scope">
<!-- <div v-for="item in is_schoolmate_list">
<div v-if="scope.row.is_vip===item.id">{{item.value}}</div>
</div> -->
<div v-if="scope.row.is_vip===1">VIP</div>
<template slot-scope="scope">
<!-- <div v-for="item in is_schoolmate_list">
<div v-if="scope.row.is_vip===item.id">{{item.value}}</div>
</div> -->
<div v-if="scope.row.is_vip===1">VIP</div>
<div v-else></div>
</template>
</el-table-column>
@ -134,7 +134,9 @@
</xy-table>
</div>
<student-detail ref="studentDetail"></student-detail>
<student-detail ref="studentDetail"></student-detail>
<imports ref="imports" :formInfo="table_item" :table-name="'users'" @refresh="getList"></imports>
</div>
</template>
@ -146,25 +148,27 @@
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:'',
name: '',
mobile: '',
course_name: '',
company_name: '',
company_position: '',
company_area: '',
company_type: '',
company_industry: '',
is_vip: '',
is_schoolmate:'',
is_vip: '',
is_schoolmate: '',
courses_end_date: '',
page: 1,
page_size: 10,
@ -236,7 +240,16 @@
created() {
this.getList()
},
methods: {
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()
@ -250,16 +263,16 @@
const res = await indexStudy({
page: this.select.page,
page_size: this.select.page_size,
name: this.select.name,
mobile:this.select.mobile,
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_schoolmate:this.select.is_schoolmate
courses_end_date: this.select.courses_end_date,
is_schoolmate: this.select.is_schoolmate
})
this.list = res.list.data
this.total = res.list.total
@ -316,11 +329,12 @@
flex-wrap: wrap;
&>div {
margin-right: 10px;
margin-bottom: 10px;
width: 150px;
&:last-child {
width:auto
margin-right: 10px;
margin-bottom: 10px;
width: 150px;
&:last-child {
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>
@ -130,7 +130,10 @@
<script>
import studentDetail from './components/detail.vue';
import myMixins from "@/mixin/selectMixin.js";
import formMixin from "@/mixin/formMixin.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