commit
This commit is contained in:
@@ -68,7 +68,7 @@ public class NutShiroProcessor extends AbstractProcessor {
|
||||
//不需要认证授权的url
|
||||
String[] authIgnoreUrlArr = Lang.array("/",
|
||||
"/sso/login",
|
||||
// "/platform/login",
|
||||
"/platform/login",
|
||||
"/platform/login(/doLogin|/logout|/captcha)",
|
||||
"/platform/qywechat/.*",
|
||||
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
||||
|
||||
@@ -76,6 +76,11 @@ public class TrainSignUpCourse extends BaseModel implements Serializable {
|
||||
@Comment("报名人数是否限制")
|
||||
private Boolean courseIsLimitApply;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Comment("课程是否开启")
|
||||
private Boolean isOpen;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.INT)
|
||||
@Comment("序号")
|
||||
|
||||
@@ -323,7 +323,7 @@ layout("/mobile/platform.html"){
|
||||
style="color: #dd6363">点我查看微信群二维码</span>
|
||||
</div>
|
||||
<div class="train-card-actions"
|
||||
v-if="activityStatus !== '1' || (o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf())">
|
||||
v-if="o.isOpen !== false && (activityStatus !== '1' || (o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()))">
|
||||
<van-button type="primary" color="#1867b0" round size="mini"
|
||||
class="train-card-button"
|
||||
v-if="activityStatus !== '1' && o.isSign === false"
|
||||
@@ -625,11 +625,27 @@ layout("/mobile/platform.html"){
|
||||
const {data} = await $.get('/platform/trainSingUp/manage/userAdjust/registerUserList', this.registerForm)
|
||||
this.signUsers = data
|
||||
},
|
||||
// 未开启的课程排到最后,其余课程保持原有顺序不变
|
||||
sortCourseList(courseList) {
|
||||
return (courseList || []).map((item, index) => {
|
||||
return {
|
||||
item: item,
|
||||
index: index
|
||||
}
|
||||
}).sort((a, b) => {
|
||||
const aOrder = a.item.isOpen === false ? 1 : 0
|
||||
const bOrder = b.item.isOpen === false ? 1 : 0
|
||||
if (aOrder !== bOrder) {
|
||||
return aOrder - bOrder
|
||||
}
|
||||
return a.index - b.index
|
||||
}).map(v => v.item)
|
||||
},
|
||||
tabClick(name, title) {
|
||||
if (this.courseType === '0' && this.activityStatus !== '1') {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title)
|
||||
this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(o => o.assort === title))
|
||||
} else {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title && o.courseType === this.courseType)
|
||||
this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(o => o.assort === title && o.courseType === this.courseType))
|
||||
}
|
||||
},
|
||||
calcSignUpCount(o) {
|
||||
@@ -1030,10 +1046,11 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.tableData.courseList = this.sortCourseList(this.tableData.courseList)
|
||||
this.assortList = Array.from(new Set(this.tableData.courseList.map(o => o.assort).filter(o => o !== '' && o !== undefined)))
|
||||
this.tempArray = clone(this.tableData)
|
||||
if (this.assortList.length > 0 && this.activityStatus !== '1') {
|
||||
this.tableData.courseList = this.tableData.courseList.filter(o => o.assort === this.assortList[0])
|
||||
this.tableData.courseList = this.sortCourseList(this.tableData.courseList.filter(o => o.assort === this.assortList[0]))
|
||||
}
|
||||
const type = this.trainTypeList.find(o => o.code === this.tableData.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
@@ -1089,12 +1106,14 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
if (this.assortList.length > 0 && this.activityStatus !== '1') {
|
||||
if (value === '0') {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === this.assort)
|
||||
this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(o => o.assort === this.assort))
|
||||
} else {
|
||||
this.tableData.courseList = this.tempArray.courseList.filter(item => item.courseType === value && item.assort === this.assort)
|
||||
this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(item => item.courseType === value && item.assort === this.assort))
|
||||
}
|
||||
} else {
|
||||
this.tableData.courseList = value === '0' ? this.tempArray.courseList : this.tempArray.courseList.filter(item => item.courseType === value)
|
||||
this.tableData.courseList = value === '0'
|
||||
? this.sortCourseList(this.tempArray.courseList)
|
||||
: this.sortCourseList(this.tempArray.courseList.filter(item => item.courseType === value))
|
||||
}
|
||||
this.closeLoading()
|
||||
},
|
||||
|
||||
@@ -55,8 +55,8 @@ layout("/layouts/platform.html"){
|
||||
notice: false,
|
||||
isIntegral: false,
|
||||
courseList: [
|
||||
{courseName: '1', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1},
|
||||
{courseName: '2', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1}
|
||||
{courseName: '1', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, isOpen: true},
|
||||
{courseName: '2', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, isOpen: true}
|
||||
],
|
||||
conditionStructure: {
|
||||
method: "AND",
|
||||
@@ -164,7 +164,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
//添加培训班
|
||||
addCourse() {
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false})
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false, isOpen: true})
|
||||
},
|
||||
//删除培训班
|
||||
async removeTableCourse(index) {
|
||||
@@ -493,6 +493,9 @@ layout("/layouts/platform.html"){
|
||||
|
||||
if (this.formData.courseList && this.formData.courseList.length > 0) {
|
||||
this.formData.courseList.forEach(item => {
|
||||
if (item.isOpen === undefined) {
|
||||
this.$set(item, 'isOpen', true)
|
||||
}
|
||||
const type = this.courseTypeList.find(o => o.id === item.courseType)
|
||||
if (type && type.isBringFamily === true) {
|
||||
this.$set(item, 'isBringFamily', true)
|
||||
@@ -502,7 +505,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false})
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false, isOpen: true})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -690,6 +693,9 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
|
||||
this.formData.courseList.forEach(item => {
|
||||
if (item.isOpen === undefined) {
|
||||
this.$set(item, 'isOpen', true)
|
||||
}
|
||||
const type = this.courseTypeList.find(o => o.id === item.courseType)
|
||||
if (type.isBringFamily === true) {
|
||||
this.$set(item, 'isBringFamily', true)
|
||||
|
||||
@@ -266,6 +266,17 @@
|
||||
<el-input v-model="row.assort"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否开启" width="200">
|
||||
<template scope="scope">
|
||||
<el-switch
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="scope.row.isOpen">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="trainType + '时间'" width="200">
|
||||
<template scope="scope">
|
||||
|
||||
Reference in New Issue
Block a user