This commit is contained in:
Paidax
2025-04-09 17:07:11 +08:00
parent 9e565d7665
commit 62f0b38ec3
24 changed files with 385 additions and 164 deletions
@@ -125,6 +125,7 @@ layout("/mobile/platform.html"){
return {
list: [],
id: GetQueryString("id"),
H5JumpTo: GetQueryString("H5JumpTo"),
subjects: [],
activity: {},
// remainingTime: 0,
@@ -162,7 +163,22 @@ layout("/mobile/platform.html"){
this.subjects = res.data.subjects
this.answerRecordId = res.data.answerRecordId
// this.checkGroupPermission()
this.getAnswerRecord()
if (!this.H5JumpTo && this.activity.repeatable && res.data.repeatTips){
// 如果是可重复答题,第二次答题进来弹出提示
vant.Dialog.confirm({
title: '温馨提示',
message: '您已完成本次答题,是否要重新答题?',
confirmButtonText: '重新答题',
cancelButtonText: '查看答题记录',
}).then(() => {
this.getAnswerRecord()
}).catch(() => {
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
// pjaxReplace("/mobile/index")
});
} else {
this.getAnswerRecord()
}
} else {
vant.Dialog.alert({
title: '温馨提示',
@@ -181,7 +197,7 @@ layout("/mobile/platform.html"){
this.answerRecord = res.data
if (this.answerRecord.isFinish || this.$moment().unix() > this.$moment(this.activity.endTime)) {
this.$pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
}
this.initAnswer()
@@ -210,6 +210,8 @@ layout("/mobile/platform.html"){
<div class="button-control">
<van-button v-if="canAgainQuestion" type="primary" @click="againQuestion" block>重新答题</van-button>
<!-- 女性知识答题 -->
<van-button v-if="activity.id === 'c3372eb3ee774e86b373fcacf8eb89c7'" type="primary" @click="goWelfareChoose" block>纪念品选择</van-button>
<van-button type="primary" @click="openHistory" block>查看全部答题记录</van-button>
</div>
</div>
@@ -272,6 +274,13 @@ layout("/mobile/platform.html"){
}
},
methods: {
/**
* 福利选择
*/
goWelfareChoose(){
// 女性答题的福利
pjaxReplace('/mobile/welfare/list/receive?projectId=8799d66b0bb640078f50feb029e506ed')
},
/**
* 重新答题
*/
@@ -280,7 +289,7 @@ layout("/mobile/platform.html"){
title: '温馨提示',
message: '确定要重新答题吗?',
}).then(() => {
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id)
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id + "&H5JumpTo=true")
}).catch(() => {
// on cancel
});
@@ -290,8 +299,19 @@ layout("/mobile/platform.html"){
if (res.code === 0) {
this.subjects = res.data.subjects
this.activity = res.data.activity
this.getAnswerRecord()
this.getHistoryQuestion()
if (this.activity.id === 'c3372eb3ee774e86b373fcacf8eb89c7') {
vant.Dialog.alert({
title: '温馨提示',
message: "感谢您参与女性健康知识竞赛。请选取活动纪念品",
}).then(() => {
this.getAnswerRecord()
this.getHistoryQuestion()
})
} else {
this.getAnswerRecord()
this.getHistoryQuestion()
}
}
})
},
@@ -649,15 +649,26 @@ layout("/mobile/platform.html"){
})
if (code === 0) {
this.getUserSelection(this.projectId)
this.$modal.msgSuccess("您已完成本次福利选择。")
// 女性健康知识讲座福利品Id
if (this.projectId === '8799d66b0bb640078f50feb029e506ed') {
pjaxReplace('/mobile/welfare/list/receive_success?projectId=' + this.projectId + '&provideMode=' + this.projectInfo.provideMode)
} else {
vant.Dialog.alert({
title: '温馨提示',
message: "您已完成本次福利选择。",
}).then(async () => {
this.confirmPopup = false
await this.getProjectInfo()
window.location.reload()
});
}
// this.$modal.msgSuccess("您已完成本次福利选择。")
} else {
this.$modal.msgError(msg)
}
this.confirmPopup = false
await this.getProjectInfo()
setTimeout(() => {
this.confirmPopup = false
await this.getProjectInfo()
window.location.reload()
}, 1000)
}
},
//查看详情
@@ -9,7 +9,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar :title="title" left-arrow
@click-left="history.back()"></van-nav-bar>
@click-left="back"></van-nav-bar>
</van-sticky>
<div style="text-align: center;margin-top: 200px;">
@@ -25,7 +25,8 @@ layout("/mobile/platform.html"){
</svg>
<div style="margin-top: 20px;">{{code=='2' ? '您已领取' : '您已选择'}}</div>
<div style="margin: 20px auto 0px auto;width: 300px;word-break: break-all">
福利品: {{selectOptionNames}}
<!-- 女性健康知识讲座福利品Id -->
{{ projectId == '8799d66b0bb640078f50feb029e506ed' ? '纪念品' : '福利品' }} {{selectOptionNames}}
</div>
<van-button style="margin-top: 20px;width: 100px" size="small" hairline type="primary"
@click="back">返回
@@ -43,6 +44,7 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins, welfareMixins],
data() {
return {
projectId: '',
selectOptionNames: null
}
},
@@ -52,7 +54,7 @@ layout("/mobile/platform.html"){
this.selectOptionNames = resp.data
},
back() {
window.history.go(-1)
pjaxReplace('/mobile/welfare/list/receive?projectId=' + this.projectId)
}
},
created() {
@@ -54,7 +54,7 @@ layout("/mobile/platform.html"){
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="pjaxReplace('/mobile//index')" left-arrow
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow
title="我的福利"></van-nav-bar>
<van-dropdown-menu active-color="#1989fa">
@@ -50,24 +50,17 @@
</div>
<div class="search-item">
<div class="search-item-label">姓名/工号</div>
<div class="search-item-label">姓名工号</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入姓名/工号"
placeholder="请输入姓名工号查询"
v-model="pageForm.searchKeyword">
<el-select placeholder="姓名/工号" slot="prepend"
style="width: 80px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="u.username"></el-option>
<el-option label="工号" value="u.loginanme"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-query">
<el-button @click="pageData" icon="el-icon-search" type="primary">搜索
</el-button>
<el-button @click="pageData" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
@@ -76,6 +69,7 @@
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="人员列表">
<template #func>
<el-button @click="doExportSign" icon="el-icon-s-promotion" type="primary" size="small">导出签到人员</el-button>
<el-button @click="doExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
</template>
</table-tool>
@@ -95,6 +89,10 @@
header-align="center"
sortable
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='signTime'">
<span v-if="row.signTime">{{ row.signTime }}</span>
<el-tag v-else type="warning">暂无</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
v-if="${@shiro.hasRole('sysadmin')}"
@@ -125,7 +123,6 @@
activityList: {},
pageForm: {
unionId: '',
searchName: "u.username",
type: type,
year: new Date().getFullYear() + ''
},
@@ -138,6 +135,8 @@
{prop: 'unionname', label: '所属工会'},
{prop: 'applyDateTime', label: '报名时间'}
],
// 这个活动是否签字
showSignExport: false,
}
},
methods: {
@@ -159,8 +158,7 @@
},
async doExport() {
const {activityId, unionId} = this.pageForm
window.open("/platform/activity/info/mange/doExportUser?id=" + activityId +
"&unionId=" + unionId)
window.open("/platform/activity/info/mange/doExportUser?id=" + activityId + "&unionId=" + unionId + "&isSign=false")
},
pageData() {
sublime.showLoadingbar();
@@ -185,12 +183,26 @@
this.activityList = resp.data
if (resp.data && resp.data.length > 0) {
this.$set(this.pageForm, "activityId", resp.data[0].id)
if (resp.data[0].needSign) {
// 需要签到
this.tableColumns.push(
{prop: 'signState', label: '签到状态'},
{prop: 'signTime', label: '签到时间'}
)
this.showSignExport = true
}
} else {
this.$set(this.pageForm, "activityId", null)
this.tableColumns.filter(item => item.prop !== 'signState' && item.prop !== 'signTime')
this.showSignExport = false
}
this.pageData()
}
},
doExportSign() {
const {activityId, unionId} = this.pageForm
window.open("/platform/activity/info/mange/doExportUser?id=" + activityId + "&unionId=" + unionId + "&isSign=true")
}
},
async created() {
await this.getActivityByYearOrType()
@@ -12,13 +12,7 @@ layout("/layouts/platform.html"){
<template>
<el-card shadow="never">
<div class="btn-group tool-button">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询"
style="width: 100px;">
<el-option label="工号" value="u.loginname"></el-option>
<el-option label="姓名" value="u.username"></el-option>
</el-select>
</el-input>
<el-input placeholder="请输入工号或姓名查询" clearable v-model="pageForm.searchKeyword"></el-input>
</div>
<div class="btn-group tool-button">
<el-select v-model="pageForm.jdhid" clearable filterable placeholder="请选择教代会"
@@ -10,13 +10,7 @@ layout("/layouts/platform.html"){
<guava ref="guava">
<el-card shadow="never">
<div class="btn-group tool-button">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询"
style="width: 100px;">
<el-option label="工号" value="u.loginname"></el-option>
<el-option label="姓名" value="u.username"></el-option>
</el-select>
</el-input>
<el-input placeholder="请输入工号或姓名查询" clearable v-model="pageForm.searchKeyword"></el-input>
</div>
<div class="btn-group tool-button">
@@ -118,9 +112,6 @@ layout("/layouts/platform.html"){
<el-table-column align="center" header-align="center" label="所属工会" prop="dbunitname"
show-overflow-tooltip sortable>
<template scope="scope">
{{scope.row.unionname}}({{scope.row.unioncode}})
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" prop="dbunitname"
show-overflow-tooltip
@@ -104,6 +104,8 @@ layout("/layouts/platform.html"){
<div class="pull-right offscreen-right">
<el-button type="primary" @click="openAdd"><i class="ti-plus"></i> 添加代表团
</el-button>
<el-button type="primary" @click="doSetDbInfo"><i class="ti-plus"></i> 重置代表信息
</el-button>
</div>
</el-card>
<el-dialog title="添加代表团" :visible.sync="addDialogVisible" width="40%">
@@ -513,6 +515,14 @@ layout("/layouts/platform.html"){
}
},
methods: {
async doSetDbInfo(){
const resp = await $.post('/platform/jdh/zzjg/delegation/setDbInfo')
if (resp.code === 0) {
this.$message.success('设置成功')
} else {
this.$message.warning('操作失败')
}
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'fgh') {
@@ -38,9 +38,24 @@ layout("/layouts/platform.html"){
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px">
<vi-title title="请选择活动"></vi-title>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="activity_id" label="项目名称">
<el-autocomplete style="width: 100%"
v-model="formData.activity_name"
placeholder="请输入内容"
@select="handleSelect"
@input="activityChange"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.activity_id != null && formData.activity_id !== ''">
<el-button @click="openView" type="primary">查看活动详细信息</el-button>
</el-col>
</el-row>
<!--<el-row :gutter="20">
<el-col :span="12">
<el-form-item prop="activity_id" label="活动名称">
<el-select v-model="formData.activity_id"
@@ -56,39 +71,17 @@ layout("/layouts/platform.html"){
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.activity_id != null && formData.activity_id !== ''">
<el-button @click="openView" type="primary">查看活动详细信息</el-button>
</el-col>
</el-row>
<el-row :gutter="20" v-if="formData.activity_id != null && formData.activity_id !== ''">
<el-col :span="12">
<el-form-item prop="activity_number" label="实际参与人数">
<el-input-number v-model="formData.activity_number"
style="width: 100%"
placeholder="请输入实际参与人数"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<div style="padding: 4px 0 20px 0">
<!--<el-button type="primary" size="small" @click="doExportActivityApply">
导出活动申请方案表
</el-button>
<el-button type="primary" size="small" style="margin-left: 10px"
@click="doExportReimbursementVoucher">导出报销凭证
</el-button>
<el-button type="primary" size="small" style="margin-left: 10px"
@click="doExportActivitySignUpUser">导出活动参加人员
</el-button>-->
</div>
</el-col>
</el-row>
</el-row>-->
<el-row :gutter="20" v-if="formData.activity_id != null && formData.activity_id !== ''">
</el-row>
<el-row :gutter="20" v-if="formData.activity_id != null && formData.activity_id !== ''">
<vi-title title="活动费用预算及报销信息表"></vi-title>
<el-form-item label-width="40px">
<span style="color: red">如有收款人请填写收款人、支行名称及报销卡号;如无收款人,请在备注栏中说明报销情况</span>
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
@@ -132,22 +125,6 @@ layout("/layouts/platform.html"){
<el-input v-model="row.username" maxlength="50"
@input="getCardNumberByPayeeId(row)"
placeholder="请输入收款人"></el-input>
<!--<el-select :loading="selectLoading" :remote-method="remoteMethod"
clearable
filterable
@change="getCardNumberByPayeeId(row)"
placeholder="请选择收款人"
remote
reserve-keyword
style="width: 100%"
v-model="row.payeeId">
<el-option
:key="item.id"
:label="item.username+'-'+item.loginname+'-'+item.unitname"
:value="item.id"
v-for="item in userList">
</el-option>
</el-select>-->
</el-form-item>
</template>
</el-table-column>
@@ -508,8 +508,8 @@ layout("/layouts/platform.html"){
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.personTypeOptions = await getDictOptions("PERSON_TYPE")
this.userStateOptions = await getDictOptions("USER_STATE")
}
});
</script>
@@ -187,7 +187,7 @@ layout("/layouts/platform.html"){
}
},
async created() {
this.personTypeOptions = await getDictOptions("UserType")
this.personTypeOptions = await getDictOptions("PERSON_TYPE")
this.unions = await getUnions(null)
this.units = await getUnits(null)
this.pageData();