This commit is contained in:
server
2025-09-16 12:40:46 +08:00
parent 0462c947d5
commit cadaf1b65f
15 changed files with 202 additions and 72 deletions
@@ -47,12 +47,12 @@ layout("/layouts/platform.html"){
<el-option v-for="item in userStateOptions" :label="item" :value="item"></el-option>
</el-select>
</search-item>
<search-item label="用方式">
<search-item label="用方式">
<el-select v-model="pageForm.preparedBy" clearable filterable>
<el-option v-for="item in preparedByOptions" :label="item" :value="item"></el-option>
</el-select>
</search-item>
<search-item label="教职工类别">
<search-item label="人员类型">
<el-select v-model="pageForm.personType" clearable filterable>
<el-option v-for="item in personTypeOptions" :label="item" :value="item"></el-option>
</el-select>
@@ -76,9 +76,9 @@ layout("/layouts/platform.html"){
<template slot-scope="{row}">{{$moment(row.birthday).format('YYYY-MM-DD')}}</template>
</el-table-column>
<el-table-column prop="userState" label="在职状态" sortable width="120"></el-table-column>
<el-table-column prop="preparedBy" label="人事编制" sortable width="120"></el-table-column>
<el-table-column prop="preparedBy" label="聘用方式" sortable width="120"></el-table-column>
<el-table-column prop="postDoctoralJoinDate" label="进站时间" sortable width="120"></el-table-column>
<el-table-column prop="personType" label="教职工类别" sortable width="120"></el-table-column>
<el-table-column prop="personType" label="人员类型" sortable width="120"></el-table-column>
<el-table-column prop="comeSchoolDate" label="来校年月" sortable width="120"></el-table-column>
<el-table-column prop="technicalTitle" label="技术职称" sortable width="120"></el-table-column>
<el-table-column prop="position" label="干部职务" sortable width="120" show-overflow-tooltip></el-table-column>
@@ -69,7 +69,7 @@ const courseList = {
</template>
<template v-slot="{row}" v-else-if="column.prop=='introduce'">
<span v-if="!row.introduce">暂无</span>
<span v-if="!row.introduce?.trim()">暂无</span>
<el-button v-else style="padding: 0" @click="onPreview(row.introduce)" type="text">点击查看</el-button>
</template>
@@ -108,6 +108,13 @@ const courseList = {
<el-button @click="viewMapDialog = false">取 消</el-button>
</el-row>
</el-dialog>
<el-dialog :visible.sync="infoVisible" title="详细信息" append-to-body>
<div v-html="introduce"></div>
<el-row class="mt20" justify="end" type="flex">
<el-button @click="infoVisible = false">取 消</el-button>
</el-row>
</el-dialog>
<sign-form ref="signFormRef" @refresh="doSearch"></sign-form>
</div>
@@ -129,28 +136,40 @@ const courseList = {
tableColumns: [
{ prop: "courseName", label: "名称" },
{ prop: "typeName", label: "类型", width: 130},
{ prop: "campus", label: "校区", width: 160 },
{ prop: "courseLocationCoordinates", label: "地点", width: 200 },
{ prop: "courseInstructor", label: "联系人", width: 100 },
{ prop: "courseTime", label: "时间", width: 200 },
{ prop: "courseTime", label: "时间", width: 160 },
{ prop: "introduce", label: "详细信息", width: 100 },
{ prop: "applyNum", label: "已报名人数", width: 200 }
],
activity: {},
courseTypeList: [],
activityType: '',
pdf: false,
infoVisible: false,
introduce: '',
}
},
methods: {
async onPreview(introduce) {
const parser = new DOMParser();
const doc = parser.parseFromString(introduce, 'text/html');
const link = doc.querySelector('a');
const href = link.getAttribute('href');
try {
const parser = new DOMParser();
const doc = parser.parseFromString(introduce, 'text/html');
const link = doc.querySelector('a');
const href = link.getAttribute('href');
const id = href.substring(href.indexOf("=") + 1)
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
const id = href.substring(href.indexOf("=") + 1)
const res = await this.$axios.post("/platform/sys/file/previewFileData", { ids: JSON.stringify([id]) })
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
this.pdf = true
window.open("/assets/platform/plugins/pdfJs/web/viewer.html?file=" + encodeURIComponent(res.data[0].downloadPath), res.data[0].name)
} catch (e) {
this.introduce = introduce
this.pdf = false
this.infoVisible = true
}
},
tagClick(key, val) {
let idx = this.pageForm[key].indexOf(val)
@@ -185,7 +204,7 @@ const courseList = {
type: "warning"
})
}
this.$refs.signFormRef.onOpen(row, courseType)
this.$refs.signFormRef.onOpen(row, courseType, this.activity)
}
})
},
@@ -30,6 +30,10 @@ layout("/layouts/platform.html"){
font-size: 20px;
padding: 0 4px;
}
.info-dialog .el-dialog__body {
max-height: 600px;
overflow-y: auto;
}
</style>
<div id="app" v-cloak>
@@ -99,26 +103,26 @@ layout("/layouts/platform.html"){
</template>
</guava>
<el-dialog title="详细信息" :visible.sync="infoVisible" width="60%">
<el-dialog title="详细信息" :visible.sync="infoVisible" width="60%" class="info-dialog">
<activity-info ref="infoRef"></activity-info>
<el-statistic
v-if="time < 0"
format="DD 天 HH 时 mm 分钟 ss 秒"
:value="new Date(infoRow.activitySignUpStartTime)"
time-indices
title="距离开始:"
@finish="time = 0"
style="margin-top: 30px"
>
</el-statistic>
<span slot="footer" class="dialog-footer">
<el-button @click="infoVisible = false">取消</el-button>
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
去报名
</el-button>
<el-statistic
v-if="time < 0"
format="DD 天 HH 时 mm 分钟 ss 秒"
:value="new Date(infoRow.activitySignUpStartTime)"
time-indices
title="距离开始:"
@finish="time = 0"
>
</el-statistic>
<template v-else>
<el-button @click="infoVisible = false">取消</el-button>
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
去报名
</el-button>
</template>
</span>
</el-dialog>
@@ -61,7 +61,7 @@ const signForm = {
style="display: flex; justify-content: space-between; align-items: center">
<div>家属信息</div>
<div>
<el-button type="primary" size="mini" @click="delFamily">
<el-button type="danger" size="mini" @click="delFamily">
删除家属
</el-button>
<el-button type="primary" size="mini" @click="addFamily">
@@ -76,7 +76,7 @@ const signForm = {
:name="index + ''"
:label="'家属' + (index + 1)"
:key="index">
<el-row>
<el-row class="mt20">
<el-col :span="24">
<el-form-item
v-for="(column, index) in item"
@@ -154,12 +154,14 @@ const signForm = {
courseTypeRow: {},
courseTimeSelectList: [],
active: '',
activity: {},
}
},
methods: {
addFamily() {
if(this.formData.mobileColumnsValue.length >= this.courseTypeRow.familyMaxCount) {
this.$message.warning('家属最多人数为' + this.courseTypeRow.familyMaxCount)
if(this.formData.mobileColumnsValue.length >= this.activity.familyMaxCount) {
this.$message.warning('家属最多人数为' + this.activity.familyMaxCount)
return
}
const list = clone(this.courseTypeRow.familyMobileSignColumnList)
@@ -177,7 +179,10 @@ const signForm = {
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
})
if (res.code !== 0) {
this.$message.warning(res.msg)
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning"
})
return false
}
return true
@@ -189,7 +194,10 @@ const signForm = {
courseId: this.courseRow.id
})
if (resp.code !== 0) {
this.$message.warning(resp.msg)
this.$alert(resp.msg, "提示", {
confirmButtonText: "确定",
type: "warning"
})
return false
}
}
@@ -203,8 +211,8 @@ const signForm = {
this.$message.warning('获取时段信息失败,请联系管理员')
}
},
async onOpen(row, courseType) {
this.initData(row, courseType)
async onOpen(row, courseType, activity) {
this.initData(row, courseType, activity)
if (row.courseIsLimitApply) {
await this.getCourseTimeSelectList(row)
}
@@ -373,8 +381,11 @@ const signForm = {
this.formData.mobileColumnsValue = JSON.stringify(clone(array))
const resp = await this.$axios.post("/platform/family/apply/doSignUp", this.formData)
if (resp.code === 0) {
this.$alert(resp.msg, "提示", {
confirmButtonText: "确定",
type: "warning"
})
this.signDialog = false
this.$message.success(resp.msg)
this.$emit('refresh')
} else {
this.$message.warning(resp.msg)
@@ -383,7 +394,8 @@ const signForm = {
}
})
},
initData(row, courseType) {
initData(row, courseType, activity) {
this.activity = activity
this.formData = {
activityId: row.activityId,
courseId: row.id,
@@ -108,6 +108,11 @@ const basicForm = {
<el-input maxlength="50" v-model="formData.keyWord" placeholder="请输入关键词"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :rules="{required:true,message: '请输入家属最多数', trigger: 'blur'}" label="家属最多数" prop="familyMaxCount">
<el-input maxlength="50" v-model="formData.familyMaxCount" placeholder="请输入家属最多数" type="number"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item :rules="{required:true,message: '请输入活动介绍', trigger: 'blur'}" label="活动介绍" prop="introduce">
<text-editor v-model="formData.introduce"></text-editor>
@@ -272,6 +277,13 @@ const basicForm = {
</div>
</div>
</el-form-item>
<div class="left-span-label" style="margin-top: 20px">判断家属数量唯一标识</div>
<el-form-item label="唯一标识" prop="onlyKey">
<el-select @focus="keyFocus" v-model="formData.onlyKey" placeholder="请选择唯一标识">
<el-option v-for="item in typeArray" :key="item.columnCode" :label="item.columnName" :value="item.columnCode"></el-option>
</el-select>
</el-form-item>
</div>
</el-form>
<div style="float: right; margin: 20px 0">
@@ -349,6 +361,8 @@ const basicForm = {
},
campusList: [],
courseTypeList: [],
typeArray: [],
}
},
components: {
@@ -357,6 +371,19 @@ const basicForm = {
"custom-form": customForm,
},
methods: {
keyFocus() {
const types = this.formData.courseList.filter(o => o.courseType !== undefined).map(o => o.courseType)
if(types.length === 0) {
this.$message.warning('请先设置' + this.activityType + '类型')
return
}
const typeList = this.courseTypeList.filter(o => types.includes(o.id))
let array = []
typeList.forEach(item => {
array = array.concat(item.familyMobileSignColumnList)
})
this.typeArray = array
},
async validNumber(row, old) {
if (GetQueryString("id") === "") {
if (row.courseReservedNumber > row.coursePeopleNumber && row.reserveMode === 1) {
@@ -593,6 +620,7 @@ const basicForm = {
if (resp.code === 0) {
this.formData = resp.data
this.typeChange(this.formData.trainType)
if(this.formData.onlyKey) this.keyFocus()
}
}
},
@@ -11,6 +11,9 @@ const info = {
<el-descriptions-item label="活动结束时间">{{viewData.activityEndTime}}</el-descriptions-item>
<el-descriptions-item label="报名开始时间">{{viewData.activitySignUpStartTime}}</el-descriptions-item>
<el-descriptions-item label="报名结束时间">{{viewData.activitySignUpEndTime}}</el-descriptions-item>
<el-descriptions-item label="详细信息" :span="2">
<div v-html="viewData.introduce"></div>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane :label="activityType + '信息'">
@@ -158,6 +158,7 @@ const MEMBER_MANAGE_TABLE = {
{prop: "birthday", label: "出生年月", sortable: true},
{prop: "userState", label: "在职状态", sortable: true},
{prop: "preparedBy", label: "聘用方式", sortable: true},
{prop: "postDoctoralJoinDate", label: "进站时间", sortable: true},
{prop: "personType", label: "人员类型", sortable: true},
{prop: "unionName", label: "所属工会", sortable: true},
{prop: "unitName", label: "所属单位", sortable: true}
@@ -43,7 +43,7 @@ const applyForm = {
<div style="display: flex; align-items: center; justify-content: space-between">
<div>{{activity.keyWord}}信息</div>
<div>
<van-tag @click="delFamily" size="large" type="primary" color="lightgrey">删除{{activity.keyWord}}</van-tag>
<van-tag @click="delFamily" size="large" type="primary" color="#ff3b30">删除{{activity.keyWord}}</van-tag>
<van-tag @click="addFamily" size="large" type="primary" color="#1867b0">添加{{activity.keyWord}}</van-tag>
</div>
</div>
@@ -89,8 +89,8 @@ const applyForm = {
},
methods: {
addFamily() {
if(this.formData.mobileColumnsValue.length >= this.formData.count) {
this.$toast('您选择的名额数为' + this.formData.count + '' + this.activity.keyWord + '最多人数为' + this.formData.count)
if(this.formData.mobileColumnsValue.length >= this.activity.familyMaxCount) {
this.$toast(this.activity.keyWord + '最多人数为' + this.activity.familyMaxCount)
return
}
const list = clone(this.courseType.familyMobileSignColumnList)
@@ -273,6 +273,9 @@ const applyForm = {
courseId: this.formData.courseId,
currentFamilyNumber: this.formData.mobileColumnsValue.length || 0
})
if(res.code !== 0) {
this.$dialog.alert({title: '温馨提示', message: res.msg})
}
return res.code === 0
},
async validateCourseTime() {
@@ -280,6 +283,9 @@ const applyForm = {
activityCourseId: this.formData.activityCourseId,
courseId: this.row.id
})
if(res.code !== 0) {
this.$dialog.alert({title: '温馨提示', message: res.msg})
}
return res.code === 0
},
async onSubmit() {
@@ -310,11 +316,13 @@ const applyForm = {
})
formData.mobileColumnsValue = JSON.stringify(clone(array))
this.$axios.post("/platform/family/apply/doSignUp", formData).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.visible = false
this.$emit('refresh')
}
this.$dialog.alert({title: '温馨提示', message: res.msg})
.then(() => {
if (res.code === 0) {
this.visible = false
this.$emit('refresh')
}
})
})
})
})
@@ -12,6 +12,10 @@ layout("/layouts/platform_h5.html"){
font-size: 14px;
border-radius: 6px;
}
.table-list-container .table-list-item .item-title, .table-list-container .table-list-item .item-title {
text-overflow: unset !important;
white-space: normal !important;
}
</style>
<div id="app">
@@ -37,15 +41,20 @@ layout("/layouts/platform_h5.html"){
</template>
<template v-slot="{index,row}">
<table-column label="类型">{{row.typeName}}</table-column>
<table-column label="校区">{{row.campus}}</table-column>
<table-column label="地点">{{row.courseLocation}}</table-column>
<table-column label="联系人">{{row.courseInstructor}}</table-column>
<table-column label="时间">
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
{{ $moment(row.courseTimes[0].courseStartTime).format('MM月DD日 HH:mm') + '~' + $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
+ ' '
+ $moment(row.courseTimes[0].courseStartTime).format('MM月DD日 HH:mm')
+ '~'
+ $moment(row.courseTimes[0].courseEndTime).format('HH:mm') }}
</span>
<span v-else @click="onTime(row)" class="primary-color">点我查看</span>
</table-column>
<table-column v-if="row.introduce" label="详细信息">
<table-column v-if="row.introduce?.trim()" label="详细信息">
<span @click="introduceRow = row; introduceVisible = true" class="primary-color">点我查看</span>
</table-column>
</template>
@@ -114,6 +123,7 @@ layout("/layouts/platform_h5.html"){
introduceRow: {},
activity: {},
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
}
},
methods: {