From d01d5f4cce8b2a85ed220cfa5d676bdbe00b5365 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Sat, 22 Nov 2025 19:28:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/mixin/formMixin.js | 14 +-
src/router/index.js | 6 +-
src/views/course/apply.vue | 266 ++++++++++++------------
src/views/statistics/index.vue | 8 +-
src/views/student/schoolmateCompany.vue | 2 +-
5 files changed, 154 insertions(+), 142 deletions(-)
diff --git a/src/mixin/formMixin.js b/src/mixin/formMixin.js
index 290fc5a..4047769 100644
--- a/src/mixin/formMixin.js
+++ b/src/mixin/formMixin.js
@@ -704,6 +704,18 @@ export default {
getCompanyConfig() {
companyConfig().then(res => {
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() {
@@ -724,7 +736,7 @@ export default {
// 数据插入到 selectFormList 的select_item中{key:'',value:''}
this.selectFormList.map(sform => {
for (var k in this.formSelect) {
- if (sform.field === k) {
+ if (sform.field === k && k!="company_type") {
this.formSelect[k].map(kf => {
sform.select_item.push({
key: kf.value,
diff --git a/src/router/index.js b/src/router/index.js
index 0700d8f..bf44004 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,4 +1,4 @@
-
+
import Vue from 'vue'
import Router from 'vue-router'
@@ -173,5 +173,5 @@ export function resetRouter() {
const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router
}
-
-export default router
+
+export default router
diff --git a/src/views/course/apply.vue b/src/views/course/apply.vue
index 6f3882c..5bfcaf2 100644
--- a/src/views/course/apply.vue
+++ b/src/views/course/apply.vue
@@ -20,7 +20,7 @@
- 查询
+ 查询
重置
@@ -31,13 +31,13 @@
-
-
-
- {{scope.row.start_date?scope.row.start_date+'至'+scope.row.end_date:''}}
+
+
+ {{scope.row.start_date?scope.row.start_date+'至'+scope.row.end_date:''}}
@@ -48,27 +48,27 @@
{{scope.row.course_signs_count}}
-
+
0
-
-
-
-
-
- {{scope.row.sign_wait_total}}
-
- 0
-
-
+
+
+
+
+
+ {{scope.row.sign_wait_total}}
+
+ 0
+
+
{{scope.row.sign_pass_total}}
+ @click="toApply(scope.row,1)">{{scope.row.sign_pass_total}}
0
@@ -79,54 +79,54 @@
{{scope.row.sign_fault_total}}
-
+
0
-
-
-
-
-
- {{scope.row.sign_prepare_total}}
-
- 0
-
-
-
-
-
-
-
- {{scope.row.sign_cancel_total}}
-
- 0
-
-
-
-
-
-
-
- {{scope.row.sign_give_up_total}}
-
- 0
-
-
-
-
-
-
-
- {{scope.row.sign_black_total}}
-
- 0
-
-
+
+
+
+
+
+ {{scope.row.sign_prepare_total}}
+
+ 0
+
+
+
+
+
+
+
+ {{scope.row.sign_cancel_total}}
+
+ 0
+
+
+
+
+
+
+
+ {{scope.row.sign_give_up_total}}
+
+ 0
+
+
+
+
+
+
+
+ {{scope.row.sign_black_total}}
+
+ 0
+
+
@@ -141,16 +141,16 @@
import myMixins from "@/mixin/selectMixin.js";
import {
index
- } from "@/api/course/index.js"
- import {
- index as indexType
+ } from "@/api/course/index.js"
+ import {
+ index as indexType
} from "@/api/course/courseType.js"
export default {
mixins: [myMixins],
components: {},
data() {
return {
- dateRange: [],
+ dateRange: [],
courseTypesList:[],
select: {
name: '',
@@ -164,7 +164,7 @@
table_item: [{
prop: 'name',
label: '课程名称',
- align: 'left',
+ align: 'left',
fixed:'left'
}, {
prop: 'dateRange',
@@ -186,12 +186,12 @@
label: '目前报名人数',
align: 'center',
width: 120
- },
- {
- prop: 'sign_wait_total',
- label: '待审核人数',
- align: 'center',
- width: 120
+ },
+ {
+ prop: 'sign_wait_total',
+ label: '待审核人数',
+ align: 'center',
+ width: 120
},
{
prop: 'sign_pass_total',
@@ -204,61 +204,61 @@
label: '审核不通过人数',
align: 'center',
width: 120
- },
- {
- prop: 'sign_prepare_total',
- label: '备选人数',
- align: 'center',
- width: 120
- },
- {
- prop: 'sign_cancel_total',
- label: '已取消人数',
- align: 'center',
- width: 120
- },
- {
- prop: 'sign_give_up_total',
- label: '主动放弃人数',
- align: 'center',
- width: 120
- },
- {
- prop: 'sign_black_total',
- label: '黑名单人数',
- align: 'center',
- width: 120
+ },
+ {
+ prop: 'sign_prepare_total',
+ label: '备选人数',
+ align: 'center',
+ width: 120
+ },
+ {
+ prop: 'sign_cancel_total',
+ label: '已取消人数',
+ align: 'center',
+ width: 120
+ },
+ {
+ prop: 'sign_give_up_total',
+ label: '主动放弃人数',
+ align: 'center',
+ width: 120
+ },
+ {
+ prop: 'sign_black_total',
+ label: '黑名单人数',
+ align: 'center',
+ width: 120
}]
}
},
created() {
- this.getList()
+ this.getList()
this.getTypes()
},
- methods: {
- pageIndexChange(e){
- this.select.page = e
- this.getList()
- },
- pageSizeChange(e){
- this.select.page_size = e
- this.select.page = 1
- this.getList()
- },
- resetSelect(){
- this.select.name = ''
- this.select.type = ''
- this.select.dateRange = ''
- this.select.page=1
- this.getList()
+ methods: {
+ pageIndexChange(e){
+ this.select.page = e
+ this.getList()
+ },
+ pageSizeChange(e){
+ this.select.page_size = e
+ this.select.page = 1
+ this.getList()
+ },
+ resetSelect(){
+ this.select.name = ''
+ this.select.type = ''
+ this.select.dateRange = ''
+ this.select.page=1
+ this.getList()
},
async getList() {
const res = await index({
page: this.select.page,
- page_size: this.select.page_size,
- show_relation: ['typeDetail'],
- sort_name:'start_date',
+ page_size: this.select.page_size,
+ show_relation: ['typeDetail'],
+ sort_name:'start_date',
sort_type:'DESC',
filter: [{
key: 'name',
@@ -271,26 +271,26 @@
}, {
key: 'start_date',
op: 'range',
- value: this.select.dateRange
+ value: this.select.dateRange?this.select.dateRange.join(","):''
}]
})
this.list = res.data
this.total = res.total
- },
- getTypes() {
- indexType({
- page: 1,
- page_size: 999,
- sort_name:'id',
- sort_type:'ASC',
- }).then(res => {
- // this.courseTypesList = res.data.filter(item => item.status === 1)
- this.courseTypesList = res.data
- })
+ },
+ getTypes() {
+ indexType({
+ page: 1,
+ page_size: 999,
+ sort_name:'id',
+ sort_type:'ASC',
+ }).then(res => {
+ // this.courseTypesList = res.data.filter(item => item.status === 1)
+ this.courseTypesList = res.data
+ })
},
changeDateRange(e) {
if (e) {
- this.select.dateRange = e.join(",")
+ this.select.dateRange = e
} else {
this.select.dateRange = ''
}
@@ -298,7 +298,7 @@
toApply(row,status) {
this.$router.push({
path: '/course/apply_list',
- query: {
+ query: {
status:status,
title: row.name,
id: row.id,
@@ -326,4 +326,4 @@
}
}
}
-
+
diff --git a/src/views/statistics/index.vue b/src/views/statistics/index.vue
index 1b29277..1c8a1e9 100644
--- a/src/views/statistics/index.vue
+++ b/src/views/statistics/index.vue
@@ -297,7 +297,7 @@ export default {
const today = new Date()
const thisYear = today.getFullYear()
this.filterForm.startDate = new Date(thisYear, 0, 1) // 今年1月1日
- this.filterForm.endDate = today
+ this.filterForm.endDate = new Date(thisYear, 11, 31)
} else if (value === 'lastYear') {
// 去年:设置为去年第一天到最后一天
const today = new Date()
@@ -750,9 +750,9 @@ export default {
// 更新区域明细统计表格
if (data && data.areas && Array.isArray(data.areas)) {
this.regionData = data.areas.map(item => ({
- region: item.value || '',
- totalPeople: item.course_signs_pass || 0,
- uniquePeople: item.course_signs_pass_unique || 0
+ region: item.area || '',
+ totalPeople: item.total || 0,
+ uniquePeople: item.total_unique || 0
}))
this.regionSummary = this.regionData.reduce((acc, row) => ({
totalPeople: acc.totalPeople + (Number(row.totalPeople) || 0),
diff --git a/src/views/student/schoolmateCompany.vue b/src/views/student/schoolmateCompany.vue
index 47c575d..970f0dc 100644
--- a/src/views/student/schoolmateCompany.vue
+++ b/src/views/student/schoolmateCompany.vue
@@ -69,7 +69,7 @@
-
+