From a1ef67d205da00cfa413da98e51dcf91a5bfe5e2 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Fri, 13 Sep 2024 17:55:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/book/components/addBook.vue | 27 +-
src/views/book/components/checkBook.vue | 2 +-
src/views/book/index.vue | 26 +-
src/views/component/imports.vue | 2 +-
src/views/course/apply.vue | 2 +-
src/views/course/apply_list.vue | 254 ++++++++++--------
src/views/course/class.vue | 2 +-
src/views/course/components/addClass.vue | 36 ++-
.../course/components/setMainTeacher.vue | 6 +-
src/views/course/history.vue | 2 +-
src/views/course/index.vue | 2 +-
src/views/course/pay.vue | 63 +++--
src/views/course/txl.vue | 41 ++-
src/views/student/index.vue | 55 ++--
src/views/student/search.vue | 29 +-
15 files changed, 349 insertions(+), 200 deletions(-)
diff --git a/src/views/book/components/addBook.vue b/src/views/book/components/addBook.vue
index c8eab93..7632e31 100644
--- a/src/views/book/components/addBook.vue
+++ b/src/views/book/components/addBook.vue
@@ -84,7 +84,7 @@
-
+
@@ -142,7 +142,10 @@
} from '@/api/student/index.js'
import {
index as courseIndex
- } from "@/api/course/index.js"
+ } from "@/api/course/index.js"
+ import {
+ index as getAppointment
+ } from "@/api/book/appointment.js"
export default {
mixins: [myMixins],
components: {
@@ -200,7 +203,8 @@
},
created() {
this.getCourseList()
- this.getUserList('')
+ this.getUserList('')
+ this.getSites()
},
methods: {
submit(status) {
@@ -254,7 +258,8 @@
show_relation: ['user', 'appointmentConfig']
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
- this.form.status = res.status ? res.status : 0
+ this.form.status = res.status ? res.status : 0
+ this.form.site = res.site?parseInt(res.site):''
this.form.timeRange = [this.formatHH(res.start_time), this.formatHH(res.end_time)]
})
},
@@ -298,7 +303,7 @@
async getUserList(query) {
const res = await indexStudy({
page: 1,
- page_size: 99999,
+ page_size: 99,
name: query,
course_id: this.form.course_id,
})
@@ -307,6 +312,18 @@
this.$Message.warning("当前搜索没有学员")
}
this.loading = false
+ },
+ async getSites() {
+ const res = await getAppointment({
+ page: 1,
+ page_size: 999,
+ // filter: [{
+ // key: 'status',
+ // op: 'eq',
+ // value: 1
+ // }]
+ })
+ this.site_options = res.data
},
changeCourse(e) {
if (e) {
diff --git a/src/views/book/components/checkBook.vue b/src/views/book/components/checkBook.vue
index 5325799..9f359ee 100644
--- a/src/views/book/components/checkBook.vue
+++ b/src/views/book/components/checkBook.vue
@@ -23,7 +23,7 @@
预约场地:
- {{submitObj.appointment_config?submitObj.appointment_config.name:''}}
+ {{submitObj.appointment_config?submitObj.appointment_config.real_name:''}}
车牌:
diff --git a/src/views/book/index.vue b/src/views/book/index.vue
index e0c2e5e..8366116 100644
--- a/src/views/book/index.vue
+++ b/src/views/book/index.vue
@@ -64,12 +64,15 @@
-
+
查看
审核
+
+ 取消
+
编辑
@@ -93,7 +96,8 @@
import addBook from './components/addBook.vue';
import {
index,
- destroy
+ destroy,
+ save
} from "@/api/book/index.js"
import {
index as getAppointment
@@ -135,7 +139,7 @@
align: 'center',
width: 120,
}, {
- prop: 'appointment_config.name',
+ prop: 'appointment_config.real_name',
label: '预约场地',
align: 'center',
width: 120,
@@ -242,7 +246,7 @@
this.$refs.addBook.id = id
}
this.$refs.addBook.type = type
- this.$refs.addBook.site_options = this.site_options
+ // this.$refs.addBook.site_options = this.site_options
this.$refs.addBook.isShow = true
},
exportExcel() {
@@ -290,7 +294,19 @@
console.log(error)
reject(error)
})
- },
+ },
+ cancelBook(row){
+ save({
+ ...row,
+ status:3
+ }).then(res => {
+ this.$message({
+ type: 'success',
+ message: '取消成功'
+ })
+ this.getList()
+ })
+ }
}
}
diff --git a/src/views/component/imports.vue b/src/views/component/imports.vue
index 472c809..c461c44 100644
--- a/src/views/component/imports.vue
+++ b/src/views/component/imports.vue
@@ -218,7 +218,7 @@
data.push(['2024-09-03', 'xxx', '出勤/缺勤'])
}else if (this.tableName === 'course_contents') {
data.push(['(上传前请删除示例)', '', '', ''])
- data.push(['2024-09-03', '上午13:00-14:00', '王老师', '《战略思维2》', '苏州大学', '老师简介'])
+ data.push(['2024-09-03', '上午09:00-10:00', '王老师', '《战略思维2》', '苏州大学', '老师简介'])
}else if(this.tableName === 'course_signs'){
data.push(['(请确保学员联系方式不为空)', '', '', ''])
}
diff --git a/src/views/course/apply.vue b/src/views/course/apply.vue
index 094597e..c420720 100644
--- a/src/views/course/apply.vue
+++ b/src/views/course/apply.vue
@@ -187,7 +187,7 @@
page: this.select.page,
page_size: this.select.page_size,
show_relation: ['typeDetail'],
- sort_name:'id',
+ sort_name:'start_date',
sort_type:'DESC',
filter: [{
key: 'name',
diff --git a/src/views/course/apply_list.vue b/src/views/course/apply_list.vue
index 7e0e91e..b2fbcb4 100644
--- a/src/views/course/apply_list.vue
+++ b/src/views/course/apply_list.vue
@@ -6,75 +6,75 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
- 导出
-
- 批量审核
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+ 导出
+
+ 批量审核
+
+
@@ -91,6 +91,13 @@
+
+
+
+ {{getIndex(scope.$index)}}
+
+
+
@@ -128,10 +135,10 @@
} from '@/api/apply/index.js'
import {
download
- } from "@/utils/downloadRequest";
+ } from "@/utils/downloadRequest";
export default {
- mixins: [myMixins,formMixin],
+ mixins: [myMixins, formMixin],
components: {
studentDetail
},
@@ -167,6 +174,13 @@
// return row.status === 0
// }
},
+ {
+ prop: 'index',
+ label: '',
+ align: 'center',
+ width: 50,
+ fixed: 'left'
+ },
{
prop: 'user.username',
label: '姓名',
@@ -227,18 +241,17 @@
}
]
}
- },
- created(){
- this.subjectObj = this.$route.query
- console.log("this.$route.query",this.$route.query)
- this.select.course_id = this.subjectObj.id
- if(this.subjectObj.status===0){
- this.select.status = 0
- }else{
- this.select.status = this.subjectObj.status?parseInt(this.subjectObj.status):''
-
- }
- this.getList()
+ },
+ created() {
+ this.subjectObj = this.$route.query
+ console.log("this.$route.query", this.$route.query)
+ this.select.course_id = this.subjectObj.id
+ if (this.subjectObj.status === 0) {
+ this.select.status = 0
+ } else {
+ this.select.status = this.subjectObj.status ? parseInt(this.subjectObj.status) : ''
+ }
+ this.getList()
},
methods: {
pageIndexChange(e) {
@@ -250,18 +263,23 @@
this.select.page = 1
this.getList()
},
- resetSelect(){
- this.select.name = ''
- this.select.mobile = ''
- this.select.company_name = ''
- this.select.company_position = ''
- this.select.company_area = ''
- this.select.company_type = ''
- this.select.company_industry = ''
- this.select.education = ''
- this.select.status = ''
- this.select.page=1
- this.getList()
+ getIndex(e){
+ let perSize = (this.select.page -1 ) * this.select.page_size
+ let index = perSize + e + 1
+ return index
+ },
+ resetSelect() {
+ this.select.name = ''
+ this.select.mobile = ''
+ this.select.company_name = ''
+ this.select.company_position = ''
+ this.select.company_area = ''
+ this.select.company_type = ''
+ this.select.company_industry = ''
+ this.select.education = ''
+ this.select.status = ''
+ this.select.page = 1
+ this.getList()
},
async getList() {
const res = await index({
@@ -323,7 +341,7 @@
this.$refs.studentDetail.row = row
this.$refs.studentDetail.type = type
this.$refs.studentDetail.isShow = true
- },
+ },
exportExcel() {
let _export = {}
@@ -383,27 +401,27 @@
}
}
- .searchwrap {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
-
- &>div {
- display: flex;
- align-items: center;
- // margin-bottom: 10px;
- flex-wrap: wrap;
-
- &>div {
- margin-right: 10px;
- margin-bottom: 10px;
- width: 150px;
-
- &:last-child {
- width: auto
- }
- }
-
- }
+ .searchwrap {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+
+ &>div {
+ display: flex;
+ align-items: center;
+ // margin-bottom: 10px;
+ flex-wrap: wrap;
+
+ &>div {
+ margin-right: 10px;
+ margin-bottom: 10px;
+ width: 150px;
+
+ &:last-child {
+ width: auto
+ }
+ }
+
+ }
}
diff --git a/src/views/course/class.vue b/src/views/course/class.vue
index 655792d..6021e41 100644
--- a/src/views/course/class.vue
+++ b/src/views/course/class.vue
@@ -189,7 +189,7 @@
page: this.select.page,
page_size: this.select.page_size,
show_relation: ['teacher', 'typeDetail'],
- sort_name: 'id',
+ sort_name: 'start_date',
sort_type: 'DESC',
filter: [{
key: 'name',
diff --git a/src/views/course/components/addClass.vue b/src/views/course/components/addClass.vue
index 8890bf9..e1477eb 100644
--- a/src/views/course/components/addClass.vue
+++ b/src/views/course/components/addClass.vue
@@ -15,12 +15,20 @@
导入
- 发布课表
+ 发布课表
+
+
+ 取消发布课表
+
+
+ 短信通知
+
+
+
+ 下载并打印课表
-
- 下载并打印课表
-
-
+
+
0){
res.teacher_detail.map(item=>{
@@ -153,17 +161,23 @@
this.getCousreContent()
},
// 发布课表
- changeContentStatus() {
+ changeContentStatus(flag) {
if (this.list.length === 0) {
this.$Message.warning("请先导入课表")
return
+ }
+ if(flag){
+ this.subjectObj.course_content_status = 1
+ }else{
+ this.subjectObj.course_content_status = 0
}
- this.subjectObj.course_content_status = 1
save(this.subjectObj).then(res => {
- this.$Message.success("发布成功")
+ this.$Message.success(flag?"发布成功":'已取消发布')
this.$emit('refresh')
- this.getCourseDetail()
- this.isSendMessage()
+ this.getCourseDetail()
+ if(flag){
+ this.isSendMessage()
+ }
})
},
// 发布课表之后 确认是否发送短信
diff --git a/src/views/course/components/setMainTeacher.vue b/src/views/course/components/setMainTeacher.vue
index e52120d..3794224 100644
--- a/src/views/course/components/setMainTeacher.vue
+++ b/src/views/course/components/setMainTeacher.vue
@@ -8,7 +8,7 @@
*班主任:
-
+
@@ -50,6 +50,10 @@
methods: {
setTeachers(e){
this.teacher_options = e
+ },
+ changeTeachers(e){
+ this.teachers = e
+ this.form.teacher_id = this.teachers.join(",")
},
submit() {
if(this.teachers.length>0){
diff --git a/src/views/course/history.vue b/src/views/course/history.vue
index e76114d..c5fcb1b 100644
--- a/src/views/course/history.vue
+++ b/src/views/course/history.vue
@@ -185,7 +185,7 @@
page: this.select.page,
page_size: this.select.page_size,
show_relation: ['typeDetail'],
- sort_name: 'id',
+ sort_name: 'start_date',
sort_type: 'DESC',
filter: [{
key: 'name',
diff --git a/src/views/course/index.vue b/src/views/course/index.vue
index 53a833c..a52c0b2 100644
--- a/src/views/course/index.vue
+++ b/src/views/course/index.vue
@@ -202,7 +202,7 @@
page: this.select.page,
page_size: this.select.page_size,
show_relation: ['type_detail'],
- sort_name: 'id',
+ sort_name: 'start_date',
sort_type: 'DESC',
// course_status:this.select.course_status,
filter: [{
diff --git a/src/views/course/pay.vue b/src/views/course/pay.vue
index 90a3f46..b4a86b4 100644
--- a/src/views/course/pay.vue
+++ b/src/views/course/pay.vue
@@ -18,10 +18,10 @@
查询
-
-
- 重置
-
+
+
+ 重置
+
导出
@@ -49,9 +49,15 @@
开课日期:{{subjectObj.date}}
课程体系:{{subjectObj.leibie}}
-
+
+
+
+ {{getIndex(scope.$index)}}
+
+
+
@@ -74,8 +80,7 @@
-
+
@@ -85,8 +90,7 @@
header-align="center">
- 核对
+ 核对
@@ -134,6 +138,12 @@
list: [],
total: 0,
table_item: [{
+ prop: 'index',
+ label: '',
+ align: 'center',
+ width: 50,
+ fixed: 'left'
+ }, {
prop: 'user.username',
label: '姓名',
align: 'center',
@@ -167,7 +177,7 @@
}, {
prop: 'user.company_name',
label: '公司名称',
- align: 'left',
+ align: 'left',
width: 240,
}, {
prop: 'user.company_position',
@@ -211,8 +221,8 @@
this.subjectObj = this.$route.query
this.select.course_id = this.subjectObj.id
if (this.url_type == 'pay') {
- this.table_item.unshift({
- prop:'selection',
+ this.table_item.unshift({
+ prop: 'selection',
type: 'selection',
width: 50,
fixed: 'left'
@@ -230,12 +240,17 @@
this.select.page_size = e
this.select.page = 1
this.getList()
+ },
+ resetSelect() {
+ this.select.name = ''
+ this.select.fee_status = ''
+ this.select.page = 1
+ this.getList()
},
- resetSelect(){
- this.select.name = ''
- this.select.fee_status = ''
- this.select.page=1
- this.getList()
+ getIndex(e){
+ let perSize = (this.select.page -1 ) * this.select.page_size
+ let index = perSize + e + 1
+ return index
},
async getList() {
const res = await indexStudy({
@@ -298,21 +313,21 @@
},
exportExcel() {
let _export = {}
- this.table_item.map(item => {
- console.log("item.prop",item.prop)
- if (item.prop === 'status') {
+ this.table_item.map(item => {
+ console.log("item.prop", item.prop)
+ if (item.prop === 'status') {
_export['status_text'] = item.label
} else if (item.prop === 'fee_status') {
_export['fee_status_text'] = item.label
- }else if (item.prop === 'img' || item.prop === 'selection') {
+ } else if (item.prop === 'img' || item.prop === 'selection'|| item.prop === 'index') {
- }else {
+ } else {
_export[item.prop] = item.label
}
})
- console.log("_export",_export)
+ console.log("_export", _export)
download(
'/api/admin/course-signs/index',
'get', {
diff --git a/src/views/course/txl.vue b/src/views/course/txl.vue
index 6e36903..72f813f 100644
--- a/src/views/course/txl.vue
+++ b/src/views/course/txl.vue
@@ -80,8 +80,15 @@
开课日期:{{subjectObj.date?subjectObj.date:'开课待定'}}
课程体系:{{subjectObj.leibie}}
-
+
+
+
+
+ {{getIndex(scope.$index)}}
+
+
+
@@ -144,16 +151,24 @@
company_area: '',
company_type: '',
company_industry: '',
- education: '',
+ education: '',
+ type:'',
status: '',
apply_status: '',
page: 1,
- page_size: 10
+ page_size: 10,
+ is_fee:''
},
list: [],
total: 0,
formList: [], //自定义表单字段
table_item: [{
+ prop: 'index',
+ label: '',
+ align: 'center',
+ width: 50,
+ fixed: 'left'
+ }, {
prop: 'user.username',
label: '姓名',
align: 'center',
@@ -220,7 +235,12 @@
}
},
mounted() {
- this.subjectObj = this.$route.query
+ this.subjectObj = this.$route.query
+ if(this.$route.query.is_fee==0){
+ this.select.is_fee = ''
+ }else{
+ this.select.is_fee = 1
+ }
this.select.course_id = this.subjectObj.id
this.getAutoForm()
this.getList()
@@ -235,6 +255,11 @@
this.select.page = 1
this.getList()
},
+ getIndex(e){
+ let perSize = (this.select.page -1 ) * this.select.page_size
+ let index = perSize + e + 1
+ return index
+ },
resetSelect(){
this.select.name = ''
this.select.mobile = ''
@@ -244,6 +269,7 @@
this.select.company_type = ''
this.select.company_industry = ''
this.select.education = ''
+ this.select.type = ''
this.select.page=1
this.getList()
},
@@ -258,7 +284,8 @@
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
- education: this.select.education,
+ education: this.select.education,
+ type:this.select.type,
filter: [{
key: 'course_id',
op: 'eq',
@@ -270,7 +297,7 @@
}, {
key: 'fee_status',
op: 'eq',
- value: this.subjectObj.is_fee === 0 ? '' : 1
+ value: this.select.is_fee
}]
})
this.list = res.data
diff --git a/src/views/student/index.vue b/src/views/student/index.vue
index a8c87dd..d04303e 100644
--- a/src/views/student/index.vue
+++ b/src/views/student/index.vue
@@ -109,7 +109,13 @@
-
+
+
+
+ {{getIndex(scope.$index)}}
+
+
+
@@ -227,6 +233,12 @@
type: 'selection',
width: 50,
fixed: 'left'
+ }, {
+ prop: 'index',
+ label: '',
+ align: 'center',
+ width: 50,
+ fixed: 'left'
}, {
prop: 'course_list',
label: '课程名称',
@@ -307,24 +319,29 @@
this.select.page = 1
this.getList()
},
- resetSelect() {
- this.select.name=''
- this.select.mobile=''
- this.select.company_name=''
- this.select.course_name=''
- this.select.company_position=''
- this.select.company_area=''
- this.select.company_type=''
- this.select.company_industry=''
- this.select.is_vip=''
- this.select.courses_end_date=''
- this.select.is_schoolmate=''
- this.select.education=''
- this.select.type=''
- this.select.status=''
- this.select.course_type = ''
- this.select.page = 1
- this.getList()
+ getIndex(e){
+ let perSize = (this.select.page -1 ) * this.select.page_size
+ let index = perSize + e + 1
+ return index
+ },
+ resetSelect() {
+ this.select.name = ''
+ this.select.mobile = ''
+ this.select.company_name = ''
+ this.select.course_name = ''
+ this.select.company_position = ''
+ this.select.company_area = ''
+ this.select.company_type = ''
+ this.select.company_industry = ''
+ this.select.is_vip = ''
+ this.select.courses_end_date = ''
+ this.select.is_schoolmate = ''
+ this.select.education = ''
+ this.select.type = ''
+ this.select.status = ''
+ this.select.course_type = ''
+ this.select.page = 1
+ this.getList()
},
async getList() {
const res = await indexStudy({
diff --git a/src/views/student/search.vue b/src/views/student/search.vue
index fa454d0..c38f253 100644
--- a/src/views/student/search.vue
+++ b/src/views/student/search.vue
@@ -106,8 +106,14 @@
统计:本年度学员共计{{year_total}}人;累计学员{{alltotal}}人。
-
+ :table-item="table_item" :showIndex="false">
+
+
+
+ {{getIndex(scope.$index)}}
+
+
+
@@ -210,6 +216,12 @@
alltotal: 0,
total: 0,
table_item: [{
+ prop: 'index',
+ label: '',
+ align: 'center',
+ width: 50,
+ fixed: 'left'
+ },{
prop: 'course_list',
label: '课程名称',
align: 'left',
@@ -279,6 +291,11 @@
this.select.page_size = e
this.select.page = 1
this.getList()
+ },
+ getIndex(e){
+ let perSize = (this.select.page -1 ) * this.select.page_size
+ let index = perSize + e + 1
+ return index
},
resetSelect() {
this.select.name = ''
@@ -338,8 +355,12 @@
},
exportExcel() {
let _export = {}
- this.selectFormList.map(item => {
- _export[item.field] = item.name
+ this.selectFormList.map(item => {
+ if(item.prop==='index'){
+
+ }else{
+ _export[item.field] = item.name
+ }
})
download(
'/api/admin/users/study',