first commit

This commit is contained in:
2026-08-26 14:25:17 +08:00
commit 06debfd1fc
10595 changed files with 1836924 additions and 0 deletions
@@ -0,0 +1,33 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-apply-activity :activity_type="activityType" ref="activityApply"></activity-culture-apply-activity>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/applyActivity.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40003
}
},
components: {
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY
},
methods: {},
async created() {
setTimeout(()=>{this.$refs.activityApply.init()},500)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,32 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-apply-user :activity_type="activityType"></activity-culture-apply-user>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/applyUser.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40003
}
},
components: {
"activity-culture-apply-user": ACTIVITY_CULTURE_APPLY_USER
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,30 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<activity-culture-audit-activity :activity_type="activityType"></activity-culture-audit-activity>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/auditActivity.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40003
}
},
components: {
"activity-culture-audit-activity": ACTIVITY_CULTURE_AUDIT_ACTIVITY
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,30 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<activity-culture-info-manage :activity_type="activityType"></activity-culture-info-manage>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/infoMange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40003
}
},
components: {
"activity-culture-info-manage": ACTIVITY_CULTURE_INFO_MANAGE
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,32 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-user-statistics :activity_type="activityType"></activity-culture-user-statistics>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/userStatistics.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40003
}
},
components: {
"activity-culture-user-statistics": ACTIVITY_CULTURE_USER_STATISTICS
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,154 @@
<!--#include("infoActivity.js"){}#-->
<!--#include("singleSignUp.js"){}#-->
const ACTIVITY_CULTURE_APPLY_USER = {
template: /*language=HTML*/ `
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="活动时间">
<el-date-picker
:clearable="false"
placeholder="活动时间"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="活动名称">
<el-input clearable placeholder="请输入活动名称"
v-model="pageForm.name"></el-input>
</search-item>
<search-item label="">
<el-radio-group v-model="pageForm.state" @change="doSearch">
<el-radio-button label="1">全部</el-radio-button>
<el-radio-button label="2">报名中</el-radio-button>
<el-radio-button label="3">报名已结束</el-radio-button>
</el-radio-group>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="活动列表">
<el-radio-group v-model="pageForm.isEnrolled" @change="doSearch" size="mini" class="ml10">
<el-radio-button :label="true">已报名</el-radio-button>
<el-radio-button :label="false">未报名</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" row-key="id"
style="width: 100%;margin-bottom: 20px">
<el-table-column :index="indexMethod" label="序号" type="index" width="80px"></el-table-column>
<el-table-column
:key="column.prop"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='time'">
{{row.startTime}} 至 {{row.endTime}}
</template>
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">
{{row.projectTypeName}}({{row.projectTypeCode}})
</template>
<template scope="{row}" v-else-if="column.prop=='tussueName'">
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
<span v-if="row.activity_type==40001">校工会</span>
</template>
<template scope="{row}" v-else-if="column.prop=='countUser'">
<el-tag size="small">{{row.countUser}}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">
查看
</el-button>
<el-button
v-if="!row.isEnrolled && $moment(row.applyStartTime).valueOf()<$moment().valueOf() && $moment(row.applyEndTime).valueOf()>$moment().valueOf()"
@click="openSign(row)" size="mini" type="primary">
报名
</el-button>
<el-button v-if="row.isEnrolled" @click="openSign(row)" size="mini" type="primary">
报名情况
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<activity-culture-info-activity ref="infoActivity"></activity-culture-info-activity>
</template>
<single-signup ref="singleSignupRef" @refresh="doSearch"></single-signup>
</guava>
`,
store,
mixins: [initTableMixins],
props: {
activity_type: {
value: { type: Object, default: "" }
}
},
data() {
return {
submitLoading: false,
pageForm: {
isEnrolled: false,
state: 1,
year: new Date().getFullYear() + ""
},
tableColumns: [
{ prop: "name", label: "活动名称" },
{ prop: "address", label: "活动地点" },
{ prop: "projectTypeName", label: "活动项目类型" },
{ prop: "tussueName", label: "举办单位" },
{ prop: "time", label: "活动日期" },
{ prop: "applyStartTime", label: "报名开始时间" },
{ prop: "applyEndTime", label: "报名结束时间" }
]
}
},
components: {
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY,
"single-signup": singleSignUp
},
methods: {
//打开报名
async openSign(row) {
this.$refs.singleSignupRef.onOpen(row.id)
},
openView(row) {
this.$refs.guava.view(() => {
this.$refs.infoActivity.onOpen(row)
})
},
pageData() {
this.tableLoading = true
this.pageForm.activity_type = this.activity_type
this.$axios.post("/platform/activity/culture/applyUser/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
}).finally(() => {
this.tableLoading = false
})
}
},
async created() {
this.pageData()
}
}
@@ -0,0 +1,246 @@
<!--#include("infoActivity.js"){}#-->
const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
template: `
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="活动时间">
<el-date-picker
:clearable="false"
placeholder="活动时间"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="活动名称">
<el-input clearable placeholder="请输入活动名称"
v-model="pageForm.name"></el-input>
</search-item>
<search-item label="所属工会" v-if="activity_type===40002">
<el-select clearable filterable placeholder="请选择工会"
style="width: 100%"
v-model="pageForm.unionId">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in unionList">
</el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="活动列表">
<el-radio-group @change="doSearch" size="small" v-model="pageForm.approval">
<el-radio-button :key="i.code" :label="i.code" v-for="i in auditList">{{i.name}}
</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
class="vi-table" row-key="id" style="width: 100%;margin-bottom: 20px"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='time'">
{{$moment(row.startTime).format('YYYY-MM-DD')}} -
{{$moment(row.endTime).format('YYYY-MM-DD')}}
</template>
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">
{{row.projectTypeName}}({{row.projectTypeCode}})
</template>
<template scope="{row}" v-else-if="column.prop=='curTaskName'">
<span v-if="row.activity_type==40002 || row.activity_type==40003">
{{row.curTaskName}}
</span>
<span v-else>-</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<span v-if="row.activity_type==40002 || row.activity_type==40003">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</span>
<span v-else>-</span>
</template>
<template scope="{row}" v-else-if="column.prop=='tussueName'">
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="150px">
<template slot-scope="{row}">
<el-button :loading="row.loading" @click="onView(row)" size="mini">
查看
</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">
审核
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<activity-culture-info-activity handle label="校工会审核" ref="editInfo">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
</el-row>
</div>
</activity-culture-info-activity>
</template>
</guava>
`,
props: {
activity_type: {
value: {type: Object, default: ""}
}
},
store,
mixins: [initTableMixins],
data() {
return {
subDis: false,
unionList: [],
showApprovalForm: false,
auditList: [
{code: true, name: "已审核"},
{code: false, name: "未审核"}
],
pageForm: {
approval: false,
year: new Date().getFullYear() + ""
},
tableColumns: [
{prop: "name", label: "活动名称"},
{prop: "address", label: "活动地点"},
{prop: "projectTypeName", label: "活动项目类型"},
{prop: "tussueName", label: "举办单位"},
{prop: "time", label: "活动日期"},
{prop: "applyTime", label: "创建时间", sortable: true},
]
}
},
components: {
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
},
methods: {
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName,
id: row.id
}
this.$refs.editInfo.onOpen(row)
})
},
onView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.editInfo.onOpen(row)
})
},
pageData() {
this.tableLoading = true
this.pageForm.activity_type = this.activity_type
this.$axios.post("/platform/activity/culture/auditActivity/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
this.tableLoading = false
},
handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/activity/culture/auditActivity/doReview", {
data: JSON.stringify({
...this.formData,
submitType: val
}), id: this.formData.id
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
},
async created() {
// 根据 activity_type 动态添加流程相关列
if (this.activity_type === 40002 || this.activity_type === 40003) {
this.tableColumns.push(
{prop: "curTaskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
);
}
this.unionList = await this.$businessTool.listUnion()
this.pageData()
}
}
@@ -0,0 +1,210 @@
const ACTIVITY_CULTURE_INFO_ACTIVITY = {
template: /*language=HTML*/ `
<div>
<div class="process-title">
申请信息
<el-link type="primary" @click="openChart" v-if="viewData.activity_type !== 40001">点击查看流程图</el-link>
</div>
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
<el-descriptions-item label="活动名称" span="3">
<span class="item-center"> {{ viewData.name }}</span>
</el-descriptions-item>
<el-descriptions-item label="联系人">
<span v-if="viewData.username">
{{ viewData.username }}
({{ viewData.loginname }})</span>
</el-descriptions-item>
<el-descriptions-item label="联系方式">
{{ viewData.mobile }}
</el-descriptions-item>
<el-descriptions-item label="活动编号">
{{ viewData.activityCode }}
</el-descriptions-item>
<el-descriptions-item label="活动项目类型">
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
</el-descriptions-item>
<el-descriptions-item label="活动类型" >
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ?
'分工会活动'
:
'社团/社团活动' }}
</el-descriptions-item>
<el-descriptions-item label="活动地点">
{{ viewData.address }}
</el-descriptions-item>
<!-- <el-descriptions-item label="活动计划时间">-->
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="活动时间">
{{ viewData.startTime + ' - ' + viewData.endTime }}
</el-descriptions-item>
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
</el-descriptions-item>
<!-- <el-descriptions-item label="活动人数">-->
<!-- {{ viewData.peopleNum || '暂无' }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="活动报名范围">
{{ viewData.groupName || '暂无' }}
</el-descriptions-item>
<el-descriptions-item label="报名方式">
<span v-if="viewData.signUpMethod===1">个人报名</span>
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
<span v-else-if="!viewData.signUpMethod">无需报名</span>
</el-descriptions-item>
<el-descriptions-item label="是否用于报名">
<span v-if="viewData.isEnrollSystem">活动报名</span>
<span v-else>活动管理</span>
</el-descriptions-item>
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
<span v-if="viewData.userNumberLimit===1">总人数限制({{
viewData.totalUserNumberLimit
}}人)</span>
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
<span v-else-if="!viewData.userNumberLimit">不限制</span>
</el-descriptions-item>
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
stripe>
<el-table-column align="center" header-align="center" label="序号"
type="index"
width="100">
</el-table-column>
<el-table-column label="分工会名称" prop="unionname"></el-table-column>
<el-table-column label="分工会人数" prop="teacherCount"></el-table-column>
<el-table-column label="限制人数" prop="limitNum"></el-table-column>
</el-table>
</el-descriptions-item>
<el-descriptions-item label="封面图" span="3">
<img :src="viewData.cover"
class="avatar"
style="height: 200px;width: auto" v-if="viewData.cover">
</el-descriptions-item>
<el-descriptions-item label="活动内容" span="3">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="mt10">
<div class="process-title">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
}}({{task.ext.initiatorAccount}})
</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
}}({{task.taskFormData.loginName}})
</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
styles: [
`
.item-center {
width: 100%;
height: 100%;
display: block;
}
`
],
data() {
return {
visible: false,
userData: [],
viewData: {},
row: null,
doneTasks: [],
loading: true,
search: "",
tableKey: "",
activeName: "1"
}
},
methods: {
async findOne() {
this.loading = true
const { data } = await this.$axios.post("/platform/activity/culture/infoManage/findOne", { id: this.row.id })
this.loading = false
if (data) {
data.billFiles = JSON.parse(data.billFiles)
data.photoFiles = JSON.parse(data.photoFiles)
data.otherFiles = JSON.parse(data.otherFiles)
this.userData = clone(data.tissuePersonList)
data.unionUserNumberLimit = JSON.parse(data.unionUserNumberLimit)
data.location = JSON.parse(data.location)
this.viewData = data
this.tableKey = new Date().getTime()
this.activeName = this.handle ? "999" : "1"
} else {
this.viewData = {}
this.$notify.error({ title: "错误", message: "获取信息失败" })
}
},
// 打开
onOpen(row) {
this.row = row;
this.visible = true;
this.findOne();
this.getDoneTasks();
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
}
}
}
// <style>
// .item-center {
// text-align: center;
// font-weight: 700;
// margin-right: 110px;
// }
//
// .item-center .el-form-item__content {
// font-size: 18px;
// }
//
// .el-descriptions-item__cell {
// text-align: center !important;
// }
// </style>
@@ -0,0 +1,431 @@
<!--#include("applyActivity.js"){}#-->
<!--#include("infoActivity.js"){}#-->
const ACTIVITY_CULTURE_INFO_MANAGE = {
template: /*language=HTML*/`
<guava ref="guava">
<template>
<div class="culture-info-manage-layout">
<el-card class="culture-info-query-card" shadow="never">
<search @search="doSearch">
<search-item label="活动时间">
<el-date-picker
:clearable="false"
placeholder="活动时间"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="活动名称">
<el-input clearable placeholder="请输入活动名称"
v-model="pageForm.name"></el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10 culture-info-list-card" shadow="never">
<el-tabs v-if="canManageTemplate" v-model="activeTab" @tab-click="tabChange">
<el-tab-pane label="活动列表" name="activity"></el-tab-pane>
<el-tab-pane label="活动模板列表" name="template"></el-tab-pane>
</el-tabs>
<table-tool :label="canManageTemplate && activeTab === 'template' ? '活动模板列表' : '活动列表'">
</table-tool>
<el-table :data="tableData" :height="isTemplateManagedActivity ? tableHeight : null" :size="tableSize" @sort-change="pageOrder"
class="vi-table" ref="activityTableRef" row-key="id"
:style="{width: '100%', marginBottom: isTemplateManagedActivity ? '0' : '20px'}"
v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
width="80px"></el-table-column>
<el-table-column
:key="column.prop"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop=='time2'">
{{row.applyStartTime}}-{{row.applyEndTime}}
</template>
<template scope="{row}" v-else-if="column.prop=='projectTypeName'">
{{row.projectTypeName}}({{row.projectTypeCode}})
</template>
<template scope="{row}" v-else-if="column.prop=='tussueName'">
<span v-if="row.activity_type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
<span v-if="row.activity_type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
<span v-if="row.activity_type==40001">校工会</span>
</template>
<template scope="{row}" v-else-if="column.prop=='isUnseal'">
<el-switch
@change="(val)=>{activityStatusChange(row.id,row.isUnseal)}"
active-color="#13ce66"
:disabled="isUnsealDisabled(row)"
inactive-color="#ff4949"
v-model="row.isUnseal">
</el-switch>
</template>
<template scope="{row}" v-else-if="column.prop=='taskName'">
<span v-if="row.activity_type==40002 || row.activity_type==40003">
{{row.taskName}}
</span>
<span v-else>-</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<span v-if="row.activity_type==40002 || row.activity_type==40003">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作"
prop="userOnline" width="150px">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',row}">
查看
</el-dropdown-item>
<el-dropdown-item :command="{type:'edit',row}"
>
编辑
</el-dropdown-item>
<el-dropdown-item u
v-if="row.canRevoke" :command="{type:'Revoke',row}">
撤回
</el-dropdown-item>
<el-dropdown-item
v-if="canManageTemplate && !row.isTemplate"
:command="{type:'setTemplate',row}">
设为模板
</el-dropdown-item>
<el-dropdown-item
v-if="canManageTemplate && row.isTemplate"
:command="{type:'cancelTemplate',row}">
取消模板
</el-dropdown-item>
<el-dropdown-item :command="{type:'delete',row}" :disabled="!!row.isTemplate"
v-if="(activity_type === 40001 && (row.taskKey === 'startTask' || !row.instanceId)) || (activity_type !== 40001 && $auth.hasRole('SYSADMIN'))" >
删除
</el-dropdown-item>
<el-dropdown-item :command="{type:'openCode',row}">
二维码
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</template>
<template #edit>
<activity-culture-apply-activity
:activity_type="activity_type" ref="applyActivity" @goBack="goBack"></activity-culture-apply-activity>
</template>
<template #view>
<activity-culture-info-activity ref="infoActivity"></activity-culture-info-activity>
</template>
<el-dialog
title="活动二维码"
:visible.sync="codeDialogVisible"
:close-on-click-modal="false"
width="30%">
<div style=" display: flex;justify-content: center;">
<qrcode :options="{ width: 500 }" :value="url" ></qrcode>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
</span>
</el-dialog>
<slot></slot>
</guava>
`,
props: {
activity_type: {
value: {type: Object, default: ""}
}
},
mixins: [initTableMixins],
data() {
return {
activeTab: "activity",
tableHeight: 300,
tableResizeObserver: null,
codeDialogVisible: false,
pageForm: {
year: new Date().getFullYear() + ""
},
tableColumns: [
{prop: "name", label: "活动名称"},
{prop: "address", label: "活动地点"},
{prop: "projectTypeName", label: "活动项目类型"},
{prop: "tussueName", label: "举办单位"},
{prop: "time2", label: "报名日期", width: "300"},
{prop: "applyTime", label: "创建时间", sortable: true},
{prop: "isUnseal", label: "是否开启"},
],
url: ""
}
},
computed: {
// 当前双页签及满高列表仅用于校工会、分工会文化活动,社团页面保持原样。
isTemplateManagedActivity() {
return this.activity_type === 40001 || this.activity_type === 40002
},
// 文化活动页签沿用“设为模板”按钮的角色范围,不新增权限标识。
canManageTemplate() {
return this.isTemplateManagedActivity && this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
}
},
components: {
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY,
"activity-culture-info-activity": ACTIVITY_CULTURE_INFO_ACTIVITY
},
methods: {
activityStatusChange(id, isUnseal) {
this.$axios.post("/platform/activity/culture/infoManage/activityStatusChange", {
id: id,
isUnseal: isUnseal
}).then((resp) => {
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
} else {
this.$message.error(resp.msg)
}
})
},
isUnsealDisabled(row) {
// 流程类活动只有在流程结束后才允许开启或关闭,非流程类活动保持原有开关逻辑。
return (row.activity_type === 40002 || row.activity_type === 40003) && row.instanceState !== 20
},
dropdownCommand(command) {
const {type, row} = command
if (type === "view") {
this.onView(row)
} else if (type === "edit") {
this.openEdit(row)
} else if (type === "Revoke") {
this.onRevoke(row)
} else if (type === "delete") {
this.doDelete(row)
} else if (type === "setTemplate") {
this.setTemplate(row)
} else if (type === "cancelTemplate") {
this.cancelTemplate(row)
} else if (type === "openCode") {
this.url = location.origin + "/platform/h5/activity/culture/signUp?id=" + row.id + "&groupId=" + row.groupId
this.codeDialogVisible = true
} else if (type === "export") {
commonUtil.pjaxPush("/platform/activity/info/mange/export?id=" + row.id)
}
},
// 切换页签时按活动表中的模板状态重新查询,并重置分页位置。
tabChange() {
this.$set(this.pageForm, "templateStatus", this.activeTab === "template" ? 1 : 0)
this.doSearch()
this.updateTableHeight()
},
// 根据列表卡片可用空间固定表格高度,使大量数据只在表格内部滚动。
updateTableHeight() {
if (!this.isTemplateManagedActivity) {
return
}
this.$nextTick(() => {
const cardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
if (!cardBody || cardBody.clientHeight <= 0) {
return
}
const getOuterHeight = (element) => {
if (!element) {
return 0
}
const style = window.getComputedStyle(element)
return element.offsetHeight
+ (parseFloat(style.marginTop) || 0)
+ (parseFloat(style.marginBottom) || 0)
}
const bodyStyle = window.getComputedStyle(cardBody)
const bodyPadding = (parseFloat(bodyStyle.paddingTop) || 0)
+ (parseFloat(bodyStyle.paddingBottom) || 0)
const tabs = this.canManageTemplate ? cardBody.querySelector(".el-tabs") : null
const tableTool = cardBody.querySelector(".ele-table-tool")
const pagination = cardBody.querySelector(".el-pagination-container")
const reservedHeight = bodyPadding
+ getOuterHeight(tabs)
+ getOuterHeight(tableTool)
+ getOuterHeight(pagination)
const nextHeight = Math.max(1, Math.floor(cardBody.clientHeight - reservedHeight))
if (this.tableHeight !== nextHeight) {
this.tableHeight = nextHeight
}
this.$nextTick(() => {
if (this.$refs.activityTableRef) {
this.$refs.activityTableRef.doLayout()
}
})
})
},
goBack() {
this.doSearch()
this.$refs.guava.index()
},
openEdit(row) {
this.$refs.guava.edit(() => {
this.$refs.applyActivity.openEdit(row)
})
},
onView(row) {
this.$refs.guava.view(() => {
this.$refs.infoActivity.onOpen(row)
})
},
doDelete(row) {
if (row.isTemplate) {
this.$message.warning("该活动已设为模板,请先取消模板后再删除")
return
}
const {id} = row
this.$confirm("确定要删除该活动吗?", "提示", {type: "warning"}).then(() => {
this.$set(row, "loading", true)
this.$axios.post("/platform/activity/culture/infoManage/doDelete", {id: id}).then((resp) => {
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
} else {
this.$message.error(resp.msg)
}
this.$set(row, "loading", false)
})
})
},
setTemplate(row) {
this.$confirm("确定将该活动设为工作模板吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$set(row, "loading", true)
this.$axios.post("/platform/activity/culture/infoManage/setTemplate", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
} else {
this.$message.error(resp.msg)
}
this.$set(row, "loading", false)
})
})
},
cancelTemplate(row) {
this.$confirm("确定取消该活动的工作模板吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$set(row, "loading", true)
this.$axios.post("/platform/activity/culture/infoManage/cancelTemplate", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.doSearch()
this.$message.success(resp.msg)
} else {
this.$message.error(resp.msg)
}
this.$set(row, "loading", false)
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
},
pageData() {
this.tableLoading = true
this.pageForm.activity_type = this.activity_type
this.$axios.post("/platform/activity/culture/infoManage/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
this.tableLoading = false
})
},
},
created() {
// 根据 activity_type 动态添加流程相关列
if (this.activity_type === 40002 || this.activity_type === 40003) {
this.tableColumns.push(
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
);
}
if (this.canManageTemplate) {
// 有模板管理角色时默认进入活动列表,只展示未设置模板的校工会活动。
this.$set(this.pageForm, "templateStatus", 0)
}
this.pageData()
},
mounted() {
if (!this.isTemplateManagedActivity) {
return
}
const listCardBody = this.$el.querySelector(".culture-info-list-card > .el-card__body")
if (listCardBody && window.ResizeObserver) {
// 查询区换行、页签权限或窗口变化时同步调整表格内部滚动区域。
this.tableResizeObserver = new ResizeObserver(this.updateTableHeight)
this.tableResizeObserver.observe(listCardBody)
}
this.updateTableHeight()
window.addEventListener("resize", this.updateTableHeight)
},
beforeDestroy() {
if (this.tableResizeObserver) {
this.tableResizeObserver.disconnect()
this.tableResizeObserver = null
}
window.removeEventListener("resize", this.updateTableHeight)
}
}
@@ -0,0 +1,548 @@
const singleSignUp = {
template: /*language=HTML*/ `
<el-dialog title="活动报名" :visible.sync="dialogVisible" width="70%">
<div class="process-title">活动信息</div>
<el-descriptions :column="3" border class="margin-top" style="margin: 10px" title="">
<el-descriptions-item label="活动名称" span="3">
<span class="item-center"> {{ viewData.name }}</span>
</el-descriptions-item>
<el-descriptions-item label="联系人">
<span v-if="viewData.username">
{{ viewData.username }}
({{ viewData.loginname }})</span>
</el-descriptions-item>
<el-descriptions-item label="联系方式">
{{ viewData.mobile }}
</el-descriptions-item>
<el-descriptions-item label="活动编号">
{{ viewData.activityCode }}
</el-descriptions-item>
<el-descriptions-item label="活动项目类型">
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
</el-descriptions-item>
<el-descriptions-item label="活动类型">
{{ viewData.activity_type === 40001 ? '校工会活动' : viewData.activity_type === 40002 ? '分工会活动'
:
'社团/社团活动' }}
</el-descriptions-item>
<el-descriptions-item label="活动地点">
{{ viewData.address }}
</el-descriptions-item>
<!-- <el-descriptions-item label="活动计划时间">-->
<!-- {{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="活动时间">
{{ viewData.startTime + ' - ' + viewData.endTime }}
</el-descriptions-item>
<el-descriptions-item label="报名时间" v-if="viewData.applyStartTime">
{{ viewData.applyStartTime + ' - ' + viewData.applyEndTime }}
</el-descriptions-item>
<!-- <el-descriptions-item label="活动人数">-->
<!-- {{ viewData.peopleNum || '暂无' }}-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="报名方式">
<span v-if="viewData.signUpMethod===1">个人报名</span>
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
<span v-else-if="!viewData.signUpMethod">无需报名</span>
</el-descriptions-item>
<el-descriptions-item label="是否用于报名">
<span v-if="viewData.isEnrollSystem">活动报名</span>
<span v-else>活动管理</span>
</el-descriptions-item>
<el-descriptions-item label="报名人数限制" :span="2" v-if="viewData.signUpMethod!=null">
<span v-if="viewData.userNumberLimit===1">总人数限制({{
viewData.totalUserNumberLimit
}}人)</span>
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
<span v-else-if="!viewData.userNumberLimit">不限制</span>
</el-descriptions-item>
<el-descriptions-item label="分工会限制名额" span="3" v-if="viewData.userNumberLimit===2">
<el-table :data="viewData.unionUserNumberLimit" border height="500" size="small"
stripe>
<el-table-column align="center" header-align="center" label="序号"
type="index"
width="100">
</el-table-column>
<el-table-column label="分工会名称" prop="unionname"></el-table-column>
<el-table-column label="分工会人数" prop="teacherCount"></el-table-column>
<el-table-column label="限制人数" prop="limitNum"></el-table-column>
</el-table>
</el-descriptions-item>
<el-descriptions-item label="封面图" span="3">
<img :src="viewData.cover"
class="avatar"
style="height: 200px;width: auto" v-if="viewData.cover">
</el-descriptions-item>
<el-descriptions-item label="活动内容" span="3">
<div v-html="viewData.activityContent"></div>
</el-descriptions-item>
</el-descriptions>
<!-- 个人报名 啥也不要-->
<div v-if="viewData.signUpMethod===1">
<div class="process-title">个人报名信息</div>
<el-table :data="teamUsers" class="mt10">
<el-table-column label="序号" type="index" width="60px"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="sex" label="性别"></el-table-column>
<el-table-column prop="unitName" label="单位"></el-table-column>
<el-table-column prop="mobile" label="手机号"></el-table-column>
<el-table-column prop="applyUserId" label="标识">
<template slot-scope="{row}">
<el-tag size="mini" v-if="row.applyUserId==row.userId">
报名人
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<!-- 组队报名-->
<div v-else-if="viewData.signUpMethod===2">
<div class="process-title">选择组队队友,组队人数 <span style="color: red">{{viewData.teamNum}}</span>人
</div>
<span v-if="!isApplyUser" class="text-primary">如需取消报名,请联系报名人。</span>
<el-select
v-if="isApplyUser && inApplyTime"
v-model="searchTeammateUserId"
filterable
clearable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="queryTeammate">
<el-option
v-for="item in teammateOptions"
:key="item.userId"
:label="item.userName + '(' + item.loginName + ')'"
:value="item.userId">
</el-option>
</el-select>
<el-button v-if="isApplyUser && inApplyTime" class="ml5" type="primary" icon="el-icon-plus"
@click="addTeamUser">添加
</el-button>
<el-table :data="teamUsers" class="mt10">
<el-table-column label="序号" type="index" width="60px"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="sex" label="性别"></el-table-column>
<el-table-column prop="unitName" label="单位"></el-table-column>
<el-table-column prop="mobile" label="手机号"></el-table-column>
<el-table-column prop="applyUserId" label="标识">
<template slot-scope="{row}">
<!-- v-if="scope.row.applyUserId===scope.row.userId"-->
<el-tag size="mini" v-if="row.applyUserId==row.userId">
报名人
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="100px"
v-if="(isApplyUser || teamUsers.length===0) && inApplyTime">
<template slot-scope="scope">
<el-button type="danger" size="mini" @click="removeTeamUser(scope.$index)"
v-if="scope.row.applyUserId!==scope.row.userId">删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分工会报名-->
<div v-else-if="viewData.signUpMethod===3">
<div class="process-title">选择报名人员
</div>
<el-select
v-if="inApplyTime"
v-model="searchTeammateUserId"
filterable
clearable
remote
reserve-keyword
placeholder="请输入关键词"
:remote-method="queryTeammate">
<el-option
v-for="item in teammateOptions"
:key="item.userId"
:label="item.userName + '(' + item.loginName + ')'"
:value="item.userId">
</el-option>
</el-select>
<el-button v-if="inApplyTime" class="ml5" type="primary" icon="el-icon-plus"
@click="addTeamUser">添加
</el-button>
<el-table :data="teamUsers" class="mt10">
<el-table-column label="序号" type="index" width="60px"></el-table-column>
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="loginName" label="工号"></el-table-column>
<el-table-column prop="sex" label="性别"></el-table-column>
<el-table-column prop="unitName" label="单位"></el-table-column>
<el-table-column prop="mobile" label="手机号"></el-table-column>
<el-table-column label="操作" width="100px"
v-if="inApplyTime">
<template slot-scope="scope">
<el-button type="danger" size="mini" @click="removeTeamUser(scope.$index)">删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 表单填写-->
<template v-if="isCustomForm">
<div class="process-title">填写报名信息</div>
<form-create
:value.sync="dynamicFormData"
v-model="fapi"
:rule="formCreateRule"
:option="formCreateOption"
></form-create>
</template>
<template slot="footer">
<el-button type="" @click="dialogVisible = false">取消</el-button>
<!-- 报名人才有的权限 -->
<template v-if="isApplyUser">
<el-button v-if="!isSignUp && inApplyTime" type="primary" @click="onConfirm">确认报名</el-button>
<el-button v-if="isSignUp && inApplyTime" type="primary" @click="onConfirmAgain">重新提交
</el-button>
<el-button v-if="isSignUp && inApplyTime" type="danger" @click="onCancel">取消报名</el-button>
</template>
</template>
</el-dialog>
`,
store,
data() {
return {
dialogVisible: false,
viewData: {},
id: null,
dynamicFormData: {},
formCreateRule: [],
formCreateOption: {},
fapi: null,
//搜索框
searchTeammateUserId: null,
//搜索框选新娘
teammateOptions: [],
//表格用户
teamUsers: [],
//是否报名
isSignUp: false
}
},
computed: {
isCustomForm() {
return this.viewData && this.viewData.formConfig != null && this.viewData.formConfig !== ""
},
//是否报名人
isApplyUser() {
if (this.teamUsers) {
return this.teamUsers.every((v) => v.applyUserId === this.$store.state.user.id)
} else {
return true
}
},
//是否在活动报名时间内
inApplyTime() {
if (this.viewData) {
const now = new Date().getTime()
const start = this.$moment(this.viewData.applyStartTime).valueOf()
const end = this.$moment(this.viewData.applyEndTime).valueOf()
return now >= start && now <= end
}
return false
}
},
methods: {
// 报名弹窗与查看弹窗统一使用同一套活动详情字段,避免展示口径不一致。
parseJsonField(value, defaultValue) {
if (value === null || value === undefined || value === "") {
return defaultValue
}
if (typeof value === "string") {
return JSON.parse(value)
}
return value
},
onOpen(id) {
this.dialogVisible = true
this.id = id
this.activityInfo()
},
//查询报名人员
listTeamUser() {
this.$axios.post("/platform/activity/culture/applyUser/listTeamUser", {activityId: this.id}).then((res) => {
if (res.code === 0) {
this.isSignUp = res.data.length > 0
this.teamUsers = res.data
this.defaultAddSelf()
this.customFormInit()
}
})
},
//查询报名人员
listTeamUserUnion() {
this.$axios.post("/platform/activity/culture/applyUser/listTeamUserUnion", {activityId: this.id}).then((res) => {
if (res.code === 0) {
this.isSignUp = res.data.length > 0
this.teamUsers = res.data
this.defaultAddSelf()
this.customFormInit()
}
})
},
//表单回显
customFormInit() {
if (this.teamUsers && this.teamUsers.length > 0) {
const self = this.teamUsers.find((v) => v.userId === this.$store.state.user.id)
if (self && this.isCustomForm) {
this.dynamicFormData = self.dynamicFormData
}
}
},
//组队和个人报名默认增加自己
defaultAddSelf() {
if (this.teamUsers.length === 0 && [1, 2].includes(this.viewData.signUpMethod)) {
this.teamUsers.push({
userId: this.$store.state.user.id,
userName: this.$store.state.user.username,
loginName: this.$store.state.user.loginname,
sex: this.$store.state.user.sex,
unitName: this.$store.state.user?.unit?.name,
mobile: this.$store.state.user.mobile,
applyUserId: this.$store.state.user.id
})
}
},
//提交报名
async onConfirm() {
if (this.isCustomForm && this.fapi) {
let formValid = false
try {
await this.fapi.validate()
formValid = true
} catch (e) {
formValid = false
}
if (!formValid) return
}
//组队
if (this.viewData.signUpMethod === 2) {
//组队人数判断
if (this.teamUsers.length === 0) {
this.$message.warning("请添加队友后再提交!")
return
}
if (this.teamUsers.length < this.viewData.teamNum) {
this.$message.warning("您选择的人数小于" + this.viewData.teamNum + "人,请重新选择!")
return
}
if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
return
}
}
//分工会
if (this.viewData.signUpMethod === 3) {
if (this.teamUsers.length === 0) {
this.$message.warning("请添加报名人员后再提交!")
return
}
if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
return
}
}
let formData = {
activityId: this.id
}
if (this.isCustomForm) {
formData.ext = JSON.stringify(this.fapi.formData())
}
if (this.viewData.signUpMethod === 2 || this.viewData.signUpMethod === 3) {
formData.teamUserIds = JSON.stringify(this.teamUsers.map((v) => v.userId))
}
this.$confirm("确定提交报名信息吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/activity/culture/applyUser/signUp", formData).then((res) => {
if (res.code === 0) {
this.dialogVisible = false
this.$message.success(res.msg)
this.$emit("refresh", null)
}
})
})
// this.fapi.validate((valid, fail) => {
//
// })
},
//再次报名
onConfirmAgain() {
if (this.isCustomForm && this.fapi) {
console.log(this.fapi.validate())
}
//组队
if (this.viewData.signUpMethod === 2) {
//组队人数判断
if (this.teamUsers.length === 0) {
this.$message.warning("请添加队友后再提交!")
return
}
if (this.teamUsers.length < this.viewData.teamNum) {
this.$message.warning("您选择的人数小于" + this.viewData.teamNum + "人,请重新选择!")
return
}
if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
return
}
}
//分工会
if (this.viewData.signUpMethod === 3) {
if (this.teamUsers.length === 0) {
this.$message.warning("请添加报名人员后再提交!")
return
}
if (this.teamUsers.length > this.viewData.teamNum) {
this.$message.warning("您选择的人数大于" + this.viewData.teamNum + "人,请重新选择!")
return
}
}
let formData = {
activityId: this.id,
isAgain: true
}
if (this.isCustomForm) {
formData.ext = JSON.stringify(this.fapi.formData())
}
if (this.viewData.signUpMethod === 2 || this.viewData.signUpMethod === 3) {
formData.teamUserIds = JSON.stringify(this.teamUsers.map((v) => v.userId))
}
this.$confirm("确定重新提交报名信息吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/activity/culture/applyUser/signUp", formData).then((res) => {
if (res.code === 0) {
this.dialogVisible = false
this.$message.success(res.msg)
this.$emit("refresh", null)
}
})
})
},
//取消报名
onCancel() {
this.$confirm("确定取消报名吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/platform/activity/culture/applyUser/cancelSignUp", {activityId: this.id}).then((res) => {
if (res.code === 0) {
this.dialogVisible = false
this.$message.success(res.msg)
this.$emit("refresh", null)
}
})
})
},
//查询队友信息
queryTeammate(val) {
if (val) {
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {
keyword: val,
tissueId: this.id,
signUpMethod: this.viewData.signUpMethod
}).then((res) => {
if (res.code === 0) {
res.data.map(v => v.applyUserId = this.$store.state.user.id)
this.teammateOptions = res.data
}
})
}
},
//添加队友
addTeamUser() {
if (!this.searchTeammateUserId) {
this.$message.error("请先选择后再添加")
return
}
if (this.teamUsers.some((v) => v.userId === this.searchTeammateUserId)) {
this.$message.error("请勿重复添加")
return
}
if (this.teamUsers.length >= this.viewData.teamNum) {
this.$message.error("已满员")
return
}
this.teamUsers.push(this.teammateOptions.find((v) => v.userId === this.searchTeammateUserId))
this.searchTeammateUserId = null
},
//移除队友
removeTeamUser(index) {
this.teamUsers.splice(index, 1)
},
//活动信息
activityInfo() {
this.$axios.post("/platform/activity/culture/infoManage/findOne", {id: this.id}).then((res) => {
if (res.code === 0) {
const data = res.data || {}
data.billFiles = this.parseJsonField(data.billFiles, [])
data.photoFiles = this.parseJsonField(data.photoFiles, [])
data.otherFiles = this.parseJsonField(data.otherFiles, [])
data.unionUserNumberLimit = this.parseJsonField(data.unionUserNumberLimit, [])
data.location = this.parseJsonField(data.location, [])
data.formConfig = this.parseJsonField(data.formConfig, null)
this.viewData = data
if (this.viewData.signUpMethod === 3) {
const union = this.viewData.unionUserNumberLimit.find(v => v.id === this.$store.state.user.union.id)
if (union) {
this.viewData.teamNum = union.limitNum
}
this.listTeamUserUnion()
} else {
this.listTeamUser()
}
if (this.viewData.formConfig) {
this.formCreateRule = formCreate.parseJson(this.viewData.formConfig.rule)
this.formCreateOption = formCreate.parseJson(this.viewData.formConfig.options)
}
}
})
}
}
}
@@ -0,0 +1,198 @@
const ACTIVITY_CULTURE_USER_STATISTICS = {
template: /*language=HTML*/ `
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="活动时间">
<el-date-picker
@change="getActivityByYearOrType"
:clearable="false"
placeholder="活动时间"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</search-item>
<search-item label="活动名称">
<el-select filterable placeholder="请选择活动" style="width: 100%"
v-model="pageForm.activityId">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in activityList">
</el-option>
</el-select>
</search-item>
<search-item label="所属工会" v-if="activity_type===40002||activity_type===40001">
<el-select clearable filterable placeholder="请选择所属工会"
style="width: 100%"
v-model="pageForm.unionId">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in unionList">
</el-option>
</el-select>
</search-item>
<search-item label="姓名/工号">
<el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入姓名或工号"
v-model="pageForm.searchKeyword">
</el-input>
</search-item>
</search>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool label="人员列表">
<el-button @click="doExport" icon="el-icon-s-promotion" type="primary" size="mini">导出
</el-button>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" row-key="id"
style="width: 100%;" v-loading="tableLoading">
<el-table-column :index="indexMethod" align="center" header-align="center"
label="序号" type="index"
fixed="left"
width="80px"></el-table-column>
<el-table-column
:key="column.prop"
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:fixed="column.fixed"
:min-width="column.width || 180"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in fullTableColumns">
<template v-if="column.type==='tableForm'" scope="{row}">
<el-link @click="openMore(row.dynamicFormData)">点击查看</el-link>
</template>
<template v-else-if="column.type==='upload'" scope="{row}">
<el-link @click="openDownload(row.dynamicFormData,column.field)">点击下载</el-link>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<dynamic-Table-form-eval ref="dynamicTableFormEvalRef"></dynamic-Table-form-eval>
</guava>
`,
props: {
activity_type: {
value: { type: Object, default: "" }
}
},
mixins: [initTableMixins],
data() {
return {
unionList: [],
activityList: [],
pageForm: {
unionId: "",
searchName: "atp.username",
year: new Date().getFullYear() + ""
},
tableColumns: [
{ prop: "userName", label: "姓名", width: 180, fixed: "left" },
{ prop: "loginName", label: "工号", width: 180, fixed: "left" },
{ prop: "sex", label: "性别", width: 70 },
{ prop: "mobile", label: "联系方式", width: 180 },
{ prop: "unionName", label: "所属工会", width: 200 },
{ prop: "unitName", label: "所属单位", width: 200 },
{ prop: "applyDateTime", label: "报名时间", width: 180 },
{ prop: "applyUserUserName", label: "报名人", width: 180 }
],
dynamicTableColumns: []
}
},
computed: {
fullTableColumns() {
return this.tableColumns.concat(this.dynamicTableColumns)
}
},
methods: {
getNestedValue: getNestedValue,
openMore(dynamicFormData) {
const formConfig = this.activityList.find((v) => v.id === this.pageForm.activityId)?.formConfig
this.$refs.dynamicTableFormEvalRef.onOpen(formConfig, dynamicFormData)
},
openDownload(data,key){
const jsonData = JSON.parse(data)
const urls = jsonData[key]
if(urls){
this.$downLoad(urls[0])
}
},
async doExport() {
if (!this.pageForm.activityId) {
return
}
const { activityId, unionId } = this.pageForm
this.$downLoad("/platform/activity/culture/userStatistics/doExportUser", {
id: activityId,
unionId: unionId
})
},
pageData() {
if (!this.pageForm.activityId) {
return
}
this.$axios
.post("/platform/activity/culture/userStatistics/dynamicTableColumns", { activityId: this.pageForm.activityId })
.then((res) => {
if (res.code === 0) {
this.dynamicTableColumns = res.data
}
})
this.tableLoading = true
this.pageForm.activity_type = this.activity_type
this.$axios
.post("/platform/activity/culture/userStatistics/pageData", this.pageForm)
.then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
.finally(() => {
this.tableLoading = false
})
},
async getActivityByYearOrType() {
const resp = await $.get("/platform/activity/culture/userStatistics/getActivityByYearOrType", {
activity_type: this.activity_type,
year: this.pageForm.year
})
if (resp.code === 0) {
this.activityList = resp.data
if (resp.data && resp.data.length > 0) {
this.$set(this.pageForm, "activityId", resp.data[0].id)
this.pageData()
} else {
this.$set(this.pageForm, "activityId", null)
}
}
}
},
async created() {
await this.getActivityByYearOrType()
this.unionList = await this.$businessTool.listUnion()
}
}
@@ -0,0 +1,34 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-apply-activity :activity_type="activityType" ref="activityApply"></activity-culture-apply-activity>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/applyActivity.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40001
}
},
components: {
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY
},
methods: {},
async created() {
setTimeout(()=>{this.$refs.activityApply.init()},500)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,32 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-apply-user :activity_type="activityType"></activity-culture-apply-user>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/applyUser.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40001
}
},
components: {
"activity-culture-apply-user": ACTIVITY_CULTURE_APPLY_USER
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,63 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
/* 校工会文化活动列表占满平台内容区,页面本身不产生纵向滚动条。 */
#app .culture-info-manage-layout {
display: flex;
flex-direction: column;
min-height: 0;
height: calc(100vh - 82px);
overflow: hidden;
}
#app .culture-info-query-card {
flex: 0 0 auto;
}
/* 列表卡片填充剩余高度,表格高度由组件根据固定区域动态计算。 */
#app .culture-info-list-card {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
#app .culture-info-list-card > .el-card__body {
box-sizing: border-box;
display: flex;
flex-direction: column;
min-height: 0;
height: 100%;
overflow: hidden;
}
#app .culture-info-list-card .el-tabs,
#app .culture-info-list-card .ele-table-tool,
#app .culture-info-list-card .el-pagination-container {
flex: 0 0 auto;
}
</style>
<div id="app" v-cloak>
<activity-culture-info-manage :activity_type="activityType"></activity-culture-info-manage>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/infoMange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40001
}
},
components: {
"activity-culture-info-manage": ACTIVITY_CULTURE_INFO_MANAGE
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,32 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-user-statistics :activity_type="activityType"></activity-culture-user-statistics>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/userStatistics.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40001
}
},
components: {
"activity-culture-user-statistics": ACTIVITY_CULTURE_USER_STATISTICS
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,33 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-apply-activity :activity_type="activityType" ref="activityApply"></activity-culture-apply-activity>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/applyActivity.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40002
}
},
components: {
"activity-culture-apply-activity": ACTIVITY_CULTURE_APPLY_ACTIVITY
},
methods: {},
async created() {
setTimeout(()=>{this.$refs.activityApply.init()},500)
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,32 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-apply-user :activity_type="activityType"></activity-culture-apply-user>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/applyUser.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40002
}
},
components: {
"activity-culture-apply-user": ACTIVITY_CULTURE_APPLY_USER
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,30 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<activity-culture-audit-activity :activity_type="activityType"></activity-culture-audit-activity>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/auditActivity.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40002
}
},
components: {
"activity-culture-audit-activity": ACTIVITY_CULTURE_AUDIT_ACTIVITY
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,63 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
/* 分工会文化活动列表占满平台内容区,页面本身不产生纵向滚动条。 */
#app .culture-info-manage-layout {
display: flex;
flex-direction: column;
min-height: 0;
height: calc(100vh - 82px);
overflow: hidden;
}
#app .culture-info-query-card {
flex: 0 0 auto;
}
/* 列表卡片填充剩余高度,表格高度由组件根据固定区域动态计算。 */
#app .culture-info-list-card {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
#app .culture-info-list-card > .el-card__body {
box-sizing: border-box;
display: flex;
flex-direction: column;
min-height: 0;
height: 100%;
overflow: hidden;
}
#app .culture-info-list-card .el-tabs,
#app .culture-info-list-card .ele-table-tool,
#app .culture-info-list-card .el-pagination-container {
flex: 0 0 auto;
}
</style>
<div id="app" v-cloak>
<activity-culture-info-manage :activity_type="activityType"></activity-culture-info-manage>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/infoMange.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40002
}
},
components: {
"activity-culture-info-manage": ACTIVITY_CULTURE_INFO_MANAGE
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,32 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<activity-culture-user-statistics :activity_type="activityType"></activity-culture-user-statistics>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/userStatistics.js"){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
activityType: 40002
}
},
components: {
"activity-culture-user-statistics": ACTIVITY_CULTURE_USER_STATISTICS
},
methods: {},
async created() {}
})
</script>
<!--#
}
#-->