master
lion 2 weeks ago
parent 710b7b2fbf
commit d01d5f4cce

@ -704,6 +704,18 @@ export default {
getCompanyConfig() { getCompanyConfig() {
companyConfig().then(res => { companyConfig().then(res => {
this.formSelect.company_type = res.companiesTags this.formSelect.company_type = res.companiesTags
this.selectFormList.map(sform => {
if (sform.field === 'company_type') {
sform.select_item=[]
this.formSelect['company_type'].map(kf => {
sform.select_item.push({
key: kf,
value: kf
})
})
console.log("sform.select_item", sform.select_item)
}
})
}) })
}, },
getAllPara() { getAllPara() {
@ -724,7 +736,7 @@ export default {
// 数据插入到 selectFormList 的select_item中{key:'',value:''} // 数据插入到 selectFormList 的select_item中{key:'',value:''}
this.selectFormList.map(sform => { this.selectFormList.map(sform => {
for (var k in this.formSelect) { for (var k in this.formSelect) {
if (sform.field === k) { if (sform.field === k && k!="company_type") {
this.formSelect[k].map(kf => { this.formSelect[k].map(kf => {
sform.select_item.push({ sform.select_item.push({
key: kf.value, key: kf.value,

@ -1,4 +1,4 @@
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
@ -173,5 +173,5 @@ export function resetRouter() {
const newRouter = createRouter() const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router router.matcher = newRouter.matcher // reset router
} }
export default router export default router

@ -20,7 +20,7 @@
</el-select> </el-select>
</div> </div>
<div> <div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button> <el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
<el-button type="primary" size="small" @click="resetSelect"></el-button> <el-button type="primary" size="small" @click="resetSelect"></el-button>
</div> </div>
</div> </div>
@ -31,13 +31,13 @@
</div> </div>
<div> <div>
<xy-table :list="list" :total="total" :showIndexFixed="'left'" <xy-table :list="list" :total="total" :showIndexFixed="'left'"
@pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange" :table-item="table_item"> @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange" :table-item="table_item">
<template v-slot:dateRange> <template v-slot:dateRange>
<el-table-column align='center' label="开课日期" width="200" header-align="center"> <el-table-column align='center' label="开课日期" width="200" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{scope.row.start_date?scope.row.start_date+'至'+scope.row.end_date:''}} {{scope.row.start_date?scope.row.start_date+'至'+scope.row.end_date:''}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -48,27 +48,27 @@
<div v-if="scope.row.course_signs_count && scope.row.course_signs_count>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.course_signs_count && scope.row.course_signs_count>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,'')"> @click="toApply(scope.row,'')">
{{scope.row.course_signs_count}} {{scope.row.course_signs_count}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,'')">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,'')">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:sign_wait_total> <template v-slot:sign_wait_total>
<el-table-column align='center' label="待审核人数" width="120" header-align="center"> <el-table-column align='center' label="待审核人数" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sign_wait_total && scope.row.sign_wait_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_wait_total && scope.row.sign_wait_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,0)"> @click="toApply(scope.row,0)">
{{scope.row.sign_wait_total}} {{scope.row.sign_wait_total}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,0)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,0)">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:sign_pass_total> <template v-slot:sign_pass_total>
<el-table-column align='center' label="审核通过人数" width="120" header-align="center"> <el-table-column align='center' label="审核通过人数" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sign_pass_total && scope.row.sign_pass_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_pass_total && scope.row.sign_pass_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,1)">{{scope.row.sign_pass_total}}</div> @click="toApply(scope.row,1)">{{scope.row.sign_pass_total}}</div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,1)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,1)">0</div>
</template> </template>
</el-table-column> </el-table-column>
@ -79,54 +79,54 @@
<div v-if="scope.row.sign_fault_total && scope.row.sign_fault_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_fault_total && scope.row.sign_fault_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,2)"> @click="toApply(scope.row,2)">
{{scope.row.sign_fault_total}} {{scope.row.sign_fault_total}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,2)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,2)">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:sign_prepare_total> <template v-slot:sign_prepare_total>
<el-table-column align='center' label="备选人数" width="120" header-align="center"> <el-table-column align='center' label="备选人数" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sign_prepare_total && scope.row.sign_prepare_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_prepare_total && scope.row.sign_prepare_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,3)"> @click="toApply(scope.row,3)">
{{scope.row.sign_prepare_total}} {{scope.row.sign_prepare_total}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,3)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,3)">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:sign_cancel_total> <template v-slot:sign_cancel_total>
<el-table-column align='center' label="已取消人数" width="120" header-align="center"> <el-table-column align='center' label="已取消人数" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sign_cancel_total && scope.row.sign_cancel_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_cancel_total && scope.row.sign_cancel_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,4)"> @click="toApply(scope.row,4)">
{{scope.row.sign_cancel_total}} {{scope.row.sign_cancel_total}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,4)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,4)">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:sign_give_up_total> <template v-slot:sign_give_up_total>
<el-table-column align='center' label="主动放弃人数" width="120" header-align="center"> <el-table-column align='center' label="主动放弃人数" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sign_give_up_total && scope.row.sign_give_up_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_give_up_total && scope.row.sign_give_up_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,5)"> @click="toApply(scope.row,5)">
{{scope.row.sign_give_up_total}} {{scope.row.sign_give_up_total}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,5)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,5)">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:sign_black_total> <template v-slot:sign_black_total>
<el-table-column align='center' label="黑名单人数" width="120" header-align="center"> <el-table-column align='center' label="黑名单人数" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.sign_black_total && scope.row.sign_black_total>0" style="cursor: pointer;color:blue;text-decoration:underline" <div v-if="scope.row.sign_black_total && scope.row.sign_black_total>0" style="cursor: pointer;color:blue;text-decoration:underline"
@click="toApply(scope.row,6)"> @click="toApply(scope.row,6)">
{{scope.row.sign_black_total}} {{scope.row.sign_black_total}}
</div> </div>
<div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,6)">0</div> <div v-else style="cursor: pointer;text-decoration:underline" @click="toApply(scope.row,6)">0</div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:btns> <template v-slot:btns>
@ -141,16 +141,16 @@
import myMixins from "@/mixin/selectMixin.js"; import myMixins from "@/mixin/selectMixin.js";
import { import {
index index
} from "@/api/course/index.js" } from "@/api/course/index.js"
import { import {
index as indexType index as indexType
} from "@/api/course/courseType.js" } from "@/api/course/courseType.js"
export default { export default {
mixins: [myMixins], mixins: [myMixins],
components: {}, components: {},
data() { data() {
return { return {
dateRange: [], dateRange: [],
courseTypesList:[], courseTypesList:[],
select: { select: {
name: '', name: '',
@ -164,7 +164,7 @@
table_item: [{ table_item: [{
prop: 'name', prop: 'name',
label: '课程名称', label: '课程名称',
align: 'left', align: 'left',
fixed:'left' fixed:'left'
}, { }, {
prop: 'dateRange', prop: 'dateRange',
@ -186,12 +186,12 @@
label: '目前报名人数', label: '目前报名人数',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
prop: 'sign_wait_total', prop: 'sign_wait_total',
label: '待审核人数', label: '待审核人数',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
prop: 'sign_pass_total', prop: 'sign_pass_total',
@ -204,61 +204,61 @@
label: '审核不通过人数', label: '审核不通过人数',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
prop: 'sign_prepare_total', prop: 'sign_prepare_total',
label: '备选人数', label: '备选人数',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
prop: 'sign_cancel_total', prop: 'sign_cancel_total',
label: '已取消人数', label: '已取消人数',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
prop: 'sign_give_up_total', prop: 'sign_give_up_total',
label: '主动放弃人数', label: '主动放弃人数',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
prop: 'sign_black_total', prop: 'sign_black_total',
label: '黑名单人数', label: '黑名单人数',
align: 'center', align: 'center',
width: 120 width: 120
}] }]
} }
}, },
created() { created() {
this.getList() this.getList()
this.getTypes() this.getTypes()
}, },
methods: { methods: {
pageIndexChange(e){ pageIndexChange(e){
this.select.page = e this.select.page = e
this.getList() this.getList()
}, },
pageSizeChange(e){ pageSizeChange(e){
this.select.page_size = e this.select.page_size = e
this.select.page = 1 this.select.page = 1
this.getList() this.getList()
}, },
resetSelect(){ resetSelect(){
this.select.name = '' this.select.name = ''
this.select.type = '' this.select.type = ''
this.select.dateRange = '' this.select.dateRange = ''
this.select.page=1 this.select.page=1
this.getList() this.getList()
}, },
async getList() { async getList() {
const res = await index({ const res = await index({
page: this.select.page, page: this.select.page,
page_size: this.select.page_size, page_size: this.select.page_size,
show_relation: ['typeDetail'], show_relation: ['typeDetail'],
sort_name:'start_date', sort_name:'start_date',
sort_type:'DESC', sort_type:'DESC',
filter: [{ filter: [{
key: 'name', key: 'name',
@ -271,26 +271,26 @@
}, { }, {
key: 'start_date', key: 'start_date',
op: 'range', op: 'range',
value: this.select.dateRange value: this.select.dateRange?this.select.dateRange.join(","):''
}] }]
}) })
this.list = res.data this.list = res.data
this.total = res.total this.total = res.total
}, },
getTypes() { getTypes() {
indexType({ indexType({
page: 1, page: 1,
page_size: 999, page_size: 999,
sort_name:'id', sort_name:'id',
sort_type:'ASC', sort_type:'ASC',
}).then(res => { }).then(res => {
// this.courseTypesList = res.data.filter(item => item.status === 1) // this.courseTypesList = res.data.filter(item => item.status === 1)
this.courseTypesList = res.data this.courseTypesList = res.data
}) })
}, },
changeDateRange(e) { changeDateRange(e) {
if (e) { if (e) {
this.select.dateRange = e.join(",") this.select.dateRange = e
} else { } else {
this.select.dateRange = '' this.select.dateRange = ''
} }
@ -298,7 +298,7 @@
toApply(row,status) { toApply(row,status) {
this.$router.push({ this.$router.push({
path: '/course/apply_list', path: '/course/apply_list',
query: { query: {
status:status, status:status,
title: row.name, title: row.name,
id: row.id, id: row.id,
@ -326,4 +326,4 @@
} }
} }
} }
</style> </style>

@ -297,7 +297,7 @@ export default {
const today = new Date() const today = new Date()
const thisYear = today.getFullYear() const thisYear = today.getFullYear()
this.filterForm.startDate = new Date(thisYear, 0, 1) // 11 this.filterForm.startDate = new Date(thisYear, 0, 1) // 11
this.filterForm.endDate = today this.filterForm.endDate = new Date(thisYear, 11, 31)
} else if (value === 'lastYear') { } else if (value === 'lastYear') {
// //
const today = new Date() const today = new Date()
@ -750,9 +750,9 @@ export default {
// //
if (data && data.areas && Array.isArray(data.areas)) { if (data && data.areas && Array.isArray(data.areas)) {
this.regionData = data.areas.map(item => ({ this.regionData = data.areas.map(item => ({
region: item.value || '', region: item.area || '',
totalPeople: item.course_signs_pass || 0, totalPeople: item.total || 0,
uniquePeople: item.course_signs_pass_unique || 0 uniquePeople: item.total_unique || 0
})) }))
this.regionSummary = this.regionData.reduce((acc, row) => ({ this.regionSummary = this.regionData.reduce((acc, row) => ({
totalPeople: acc.totalPeople + (Number(row.totalPeople) || 0), totalPeople: acc.totalPeople + (Number(row.totalPeople) || 0),

@ -69,7 +69,7 @@
</el-table-column> </el-table-column>
</template> </template>
<template v-slot:project_users> <template v-slot:project_users>
<el-table-column align='center' label="项目经理" width="300" header-align="center"> <el-table-column align='center' label="管理平台-项目经理-首次出资时间" width="300" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item,index) in scope.row.project_users"> <div v-for="(item,index) in scope.row.project_users">
<div style="text-align: left;"> <div style="text-align: left;">

Loading…
Cancel
Save