commit
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-steps :active="active" finish-status="success" simple>
|
<el-steps :active="active" finish-status="success" simple>
|
||||||
@@ -194,7 +193,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item prop="applyWay" label="报名方式">
|
<el-form-item prop="applyWay" label="报名方式">
|
||||||
<el-checkbox-group v-model="form.applyWay" >
|
<el-checkbox-group v-model="form.applyWay">
|
||||||
<el-checkbox :disabled="form.activityLevel !== 40001" :label="2"
|
<el-checkbox :disabled="form.activityLevel !== 40001" :label="2"
|
||||||
border>基层工会报名
|
border>基层工会报名
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
@@ -207,7 +206,7 @@
|
|||||||
<el-form-item prop="isSign" label="是否需要签字">
|
<el-form-item prop="isSign" label="是否需要签字">
|
||||||
<el-radio-group v-model="form.isSign">
|
<el-radio-group v-model="form.isSign">
|
||||||
<el-radio :label="true" border>需要</el-radio>
|
<el-radio :label="true" border>需要</el-radio>
|
||||||
<el-radio :label="false" border >不需要</el-radio>
|
<el-radio :label="false" border>不需要</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -698,10 +697,10 @@ module.exports = {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {}
|
||||||
},
|
},
|
||||||
is_club: { type: Boolean, default: false },
|
is_club: {type: Boolean, default: false},
|
||||||
is_union: { type: Boolean, default: false },
|
is_union: {type: Boolean, default: false},
|
||||||
is_sysadmin: { type: Boolean, default: false },
|
is_sysadmin: {type: Boolean, default: false},
|
||||||
is_a06: { type: Boolean, default: false }
|
is_a06: {type: Boolean, default: false}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
"file-upload": httpVueLoader("/components/plugins/FileUpload.vue"),
|
"file-upload": httpVueLoader("/components/plugins/FileUpload.vue"),
|
||||||
@@ -725,7 +724,7 @@ module.exports = {
|
|||||||
return {
|
return {
|
||||||
unionUserNumOneKeyRatio: null,
|
unionUserNumOneKeyRatio: null,
|
||||||
summaryCount: 0,
|
summaryCount: 0,
|
||||||
unionUserNumCalc: [{ startNum: 1, endNum: 1, resultNum: 1 }],
|
unionUserNumCalc: [{startNum: 1, endNum: 1, resultNum: 1}],
|
||||||
activityGroupList: [],
|
activityGroupList: [],
|
||||||
active: 0,
|
active: 0,
|
||||||
eventForm: {
|
eventForm: {
|
||||||
@@ -742,18 +741,18 @@ module.exports = {
|
|||||||
events: [],
|
events: [],
|
||||||
projectType: "",
|
projectType: "",
|
||||||
formRules: {
|
formRules: {
|
||||||
name: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
address: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
address: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
typeId: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
typeId: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
eventsIds: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
eventsIds: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
applyTime: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
applyTime: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
unitSponsor: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
unitSponsor: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
undertakeUnit: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
undertakeUnit: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
// unitJointly: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// unitJointly: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
time: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
time: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
activityGroupId: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
activityGroupId: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
gameStyle: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
gameStyle: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
applyWay: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
applyWay: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
restrictTotalPeople: [{
|
restrictTotalPeople: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "必填",
|
message: "必填",
|
||||||
@@ -769,12 +768,12 @@ module.exports = {
|
|||||||
// rewardMethod: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// rewardMethod: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
// precautions: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// precautions: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
// eventNotification: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// eventNotification: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
personType: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
personType: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
// athleteQualification: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// athleteQualification: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
activityLevel: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
activityLevel: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
// belongClubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
// belongClubId: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
applyType: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
applyType: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
athletesMaxNum: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
athletesMaxNum: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||||
restrictRegNumber: [{
|
restrictRegNumber: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: "必填",
|
message: "必填",
|
||||||
@@ -787,7 +786,7 @@ module.exports = {
|
|||||||
async applyUserModelInput(val) {
|
async applyUserModelInput(val) {
|
||||||
if (val === 2) {
|
if (val === 2) {
|
||||||
if (!this.eventForm.unionLimit || this.eventForm.unionLimit.length === 0) {
|
if (!this.eventForm.unionLimit || this.eventForm.unionLimit.length === 0) {
|
||||||
const resp = await $.get(loc() + "/getUnionLimit", { activityScopeId: this.eventForm.activityGroupId })
|
const resp = await $.get(loc() + "/getUnionLimit", {activityScopeId: this.eventForm.activityGroupId})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
this.$set(this.eventForm, "unionLimit", resp.data)
|
this.$set(this.eventForm, "unionLimit", resp.data)
|
||||||
}
|
}
|
||||||
@@ -932,7 +931,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
async eventChange(val) {
|
async eventChange(val) {
|
||||||
const data = this.checkedEventInfo.find((v) => v.eventId === val)
|
const data = this.checkedEventInfo.find((v) => v.eventId === val)
|
||||||
const resp = await $.get("/platform/activity/school/info/mange/getEventData", { id: val })
|
const resp = await $.get("/platform/activity/school/info/mange/getEventData", {id: val})
|
||||||
await this.$nextTick()
|
await this.$nextTick()
|
||||||
if (data) {
|
if (data) {
|
||||||
data.applyUserModel = data.applyUserModel ? data.applyUserModel : 1
|
data.applyUserModel = data.applyUserModel ? data.applyUserModel : 1
|
||||||
@@ -995,7 +994,7 @@ module.exports = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
getArrDifference(arr1, arr2) {
|
getArrDifference(arr1, arr2) {
|
||||||
return arr1.concat(arr2).filter(function(v, i, arr) {
|
return arr1.concat(arr2).filter(function (v, i, arr) {
|
||||||
return arr.indexOf(v) === arr.lastIndexOf(v)
|
return arr.indexOf(v) === arr.lastIndexOf(v)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -1003,26 +1002,26 @@ module.exports = {
|
|||||||
this.$refs["activityForm"].validate(async (valid) => {
|
this.$refs["activityForm"].validate(async (valid) => {
|
||||||
const form = clone(this.form)
|
const form = clone(this.form)
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
this.$notify.warning({ title: "警告", message: "存在未填的必填项" })
|
this.$notify.warning({title: "警告", message: "存在未填的必填项"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const arrDifference = this.getArrDifference(this.form.unitJointly, this.form.unitSponsor)
|
const arrDifference = this.getArrDifference(this.form.unitJointly, this.form.unitSponsor)
|
||||||
if (arrDifference.length === 0) {
|
if (arrDifference.length === 0) {
|
||||||
this.$notify.error({ title: "错误", message: "协办单位里存在主办单位" })
|
this.$notify.error({title: "错误", message: "协办单位里存在主办单位"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moment(this.form.time[0]).valueOf() <= moment(this.form.applyTime[0]).valueOf()) {
|
if (moment(this.form.time[0]).valueOf() <= moment(this.form.applyTime[0]).valueOf()) {
|
||||||
this.$notify.error({ title: "错误", message: "活动时间必须晚于报名时间" })
|
this.$notify.error({title: "错误", message: "活动时间必须晚于报名时间"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (form.applyWay.includes(3) && !form.image) {
|
if (form.applyWay.includes(3) && !form.image) {
|
||||||
this.$notify.error({ title: "错误", message: "请上传小程序活动封面图" })
|
this.$notify.error({title: "错误", message: "请上传小程序活动封面图"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.form.eventsIds.length === 0) {
|
if (this.form.eventsIds.length === 0) {
|
||||||
this.$notify.error({ title: "错误", message: "请选择项目" })
|
this.$notify.error({title: "错误", message: "请选择项目"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1112,7 +1111,7 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getActivityCode(activity_type) {
|
async getActivityCode(activity_type) {
|
||||||
const { data } = await $.get("/platform/activity/apply/generateActivityCode", { activity_type: activity_type })
|
const {data} = await $.get("/platform/activity/apply/generateActivityCode", {activity_type: activity_type})
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
async openEdit(row, flag) {
|
async openEdit(row, flag) {
|
||||||
@@ -1120,10 +1119,10 @@ module.exports = {
|
|||||||
await this.applyTypeChange(row.applyType)
|
await this.applyTypeChange(row.applyType)
|
||||||
this.planList = await activity.getSchoolActivityPlan(1)
|
this.planList = await activity.getSchoolActivityPlan(1)
|
||||||
await this.getActivityGroup()
|
await this.getActivityGroup()
|
||||||
const { id } = row
|
const {id} = row
|
||||||
this.$set(row, "loading", true)
|
this.$set(row, "loading", true)
|
||||||
|
|
||||||
const resp = await $.get("/platform/activity/school/info/mange/findOne", { id })
|
const resp = await $.get("/platform/activity/school/info/mange/findOne", {id})
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
const v = resp.data
|
const v = resp.data
|
||||||
|
|
||||||
@@ -1193,13 +1192,13 @@ module.exports = {
|
|||||||
this.$emit("flip")
|
this.$emit("flip")
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
} else {
|
} else {
|
||||||
this.$notify.error({ title: "错误", message: resp.msg })
|
this.$notify.error({title: "错误", message: resp.msg})
|
||||||
}
|
}
|
||||||
loading.close()
|
loading.close()
|
||||||
},
|
},
|
||||||
async operate() {
|
async operate() {
|
||||||
const deleteEventIds = this.eventsIds.filter((v) => !this.form.eventsIds.includes(v))
|
const deleteEventIds = this.eventsIds.filter((v) => !this.form.eventsIds.includes(v))
|
||||||
const { data } = await $.get(loc() + "/getEventApply", {
|
const {data} = await $.get(loc() + "/getEventApply", {
|
||||||
activityId: this.form.id,
|
activityId: this.form.id,
|
||||||
eventId: JSON.stringify(deleteEventIds)
|
eventId: JSON.stringify(deleteEventIds)
|
||||||
})
|
})
|
||||||
@@ -1243,7 +1242,7 @@ module.exports = {
|
|||||||
form.restrictMinNum = form.athletesMaxNum
|
form.restrictMinNum = form.athletesMaxNum
|
||||||
form.isSave = true
|
form.isSave = true
|
||||||
|
|
||||||
const { time, applyTime } = form
|
const {time, applyTime} = form
|
||||||
if (applyTime && applyTime.length) {
|
if (applyTime && applyTime.length) {
|
||||||
form.applyStartTime = applyTime[0]
|
form.applyStartTime = applyTime[0]
|
||||||
form.applyEndTime = applyTime[1]
|
form.applyEndTime = applyTime[1]
|
||||||
@@ -1295,21 +1294,21 @@ module.exports = {
|
|||||||
loading.close()
|
loading.close()
|
||||||
},
|
},
|
||||||
examineTrans(form) {
|
examineTrans(form) {
|
||||||
const { unitJointly, unitSponsor, time, applyTime, applyWay, image } = form
|
const {unitJointly, unitSponsor, time, applyTime, applyWay, image} = form
|
||||||
|
|
||||||
const arrDifference = this.getArrDifference(unitJointly, unitSponsor)
|
const arrDifference = this.getArrDifference(unitJointly, unitSponsor)
|
||||||
if (arrDifference.length === 0) {
|
if (arrDifference.length === 0) {
|
||||||
this.$notify.error({ title: "错误", message: "协办单位里存在主办单位" })
|
this.$notify.error({title: "错误", message: "协办单位里存在主办单位"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moment(time[0]).valueOf() <= moment(applyTime[0]).valueOf()) {
|
if (moment(time[0]).valueOf() <= moment(applyTime[0]).valueOf()) {
|
||||||
this.$notify.error({ title: "错误", message: "活动时间必须晚于报名时间" })
|
this.$notify.error({title: "错误", message: "活动时间必须晚于报名时间"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (applyWay.includes(3) && !image) {
|
if (applyWay.includes(3) && !image) {
|
||||||
this.$notify.error({ title: "错误", message: "请上传小程序活动封面图" })
|
this.$notify.error({title: "错误", message: "请上传小程序活动封面图"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1335,7 +1334,7 @@ module.exports = {
|
|||||||
this.$set(this.eventForm, "restrictGirlNum", 0)
|
this.$set(this.eventForm, "restrictGirlNum", 0)
|
||||||
},
|
},
|
||||||
async getActivityGroup() {
|
async getActivityGroup() {
|
||||||
const { data } = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
const {data} = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||||
this.activityGroupList = data
|
this.activityGroupList = data
|
||||||
},
|
},
|
||||||
async initCnd() {
|
async initCnd() {
|
||||||
@@ -1343,11 +1342,11 @@ module.exports = {
|
|||||||
const personType = await getDictByCode("personType")
|
const personType = await getDictByCode("personType")
|
||||||
|
|
||||||
const userStateOptions = userState.map((v) => {
|
const userStateOptions = userState.map((v) => {
|
||||||
return { label: v.name, value: v.name }
|
return {label: v.name, value: v.name}
|
||||||
})
|
})
|
||||||
|
|
||||||
const personTypeOptions = personType.map((v) => {
|
const personTypeOptions = personType.map((v) => {
|
||||||
return { label: v.name, value: v.name }
|
return {label: v.name, value: v.name}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.fields = [
|
this.fields = [
|
||||||
@@ -1356,8 +1355,8 @@ module.exports = {
|
|||||||
value: "sex",
|
value: "sex",
|
||||||
type: "select",
|
type: "select",
|
||||||
options: [
|
options: [
|
||||||
{ label: "男", value: "男" },
|
{label: "男", value: "男"},
|
||||||
{ label: "女", value: "女" }
|
{label: "女", value: "女"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1210,6 +1210,18 @@ layout("/layouts/platform.html"){
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="detailsDialogVisible"
|
||||||
|
title="活动通知"
|
||||||
|
width="70%"
|
||||||
|
>
|
||||||
|
<div v-html="activityData2.eventNotification"></div>
|
||||||
|
<span class="dialog-footer" slot="footer">
|
||||||
|
<el-button @click="detailsDialogVisible = false" type="primary">关 闭</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -1342,7 +1354,9 @@ layout("/layouts/platform.html"){
|
|||||||
promiseBookDialogVisible: false,
|
promiseBookDialogVisible: false,
|
||||||
|
|
||||||
// 活动审核相关
|
// 活动审核相关
|
||||||
activityIsAudit: false
|
activityIsAudit: false,
|
||||||
|
|
||||||
|
detailsDialogVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -1812,6 +1826,8 @@ layout("/layouts/platform.html"){
|
|||||||
this.pageData()
|
this.pageData()
|
||||||
|
|
||||||
await this.changeActivit()
|
await this.changeActivit()
|
||||||
|
|
||||||
|
this.detailsDialogVisible = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user