commit
This commit is contained in:
@@ -48,6 +48,18 @@ const businessTool = {
|
||||
}
|
||||
})
|
||||
},
|
||||
listManageClubByRole() {
|
||||
return commonUtil
|
||||
.axiosService()
|
||||
.post("/platform/club/common/listManageClubByRole", {})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取字典数据,不包含禁用
|
||||
* @param code
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
flushUnits()
|
||||
doSearch()
|
||||
"
|
||||
:clearable="is_A06 === true || is_sysadmin === true"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="所属工会"
|
||||
style="width: 100%"
|
||||
@@ -216,7 +216,7 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select placeholder="请选择教代会" v-model="pageForm.sessionId" clearable style="width: 100%">
|
||||
<el-select @change="doSearch" @clear="doSearch" placeholder="请选择教代会" v-model="pageForm.sessionId" clearable style="width: 100%">
|
||||
<el-option v-for="item in sessionOptions" :label="item.fullName" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -228,12 +228,12 @@
|
||||
</template>
|
||||
|
||||
<el-row class="query-row"
|
||||
v-if="is_A06===true||is_sysadmin===true||is_H02===true">
|
||||
v-if="is_A06===true||is_sysadmin===true||is_CLUB_PRESIDENT===true">
|
||||
<el-col class="query-title">社团:</el-col>
|
||||
<el-col class="query-content">
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择社团" @change="doSearch"
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择社团" @change="doSearch" @clear="doSearch"
|
||||
filterable
|
||||
:clearable="is_A06===true||is_sysadmin===true||(is_H04===true&&is_H02===true)"
|
||||
clearable
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in clubOptions"
|
||||
@@ -250,6 +250,7 @@
|
||||
<el-col class="query-content">
|
||||
<el-select
|
||||
@change="doSearch()"
|
||||
@clear="doSearch()"
|
||||
placeholder="请选择活动组别范围之外的人员"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@@ -493,6 +494,9 @@ module.exports = {
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_CLUB_PRESIDENT() {
|
||||
return this.roleData.is_CLUB_PRESIDENT
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
},
|
||||
@@ -709,18 +713,15 @@ module.exports = {
|
||||
async created() {
|
||||
this.listSession()
|
||||
await this.getRolesAndUnion()
|
||||
this.clubOptions = await this.$businessTool.listClubByRole()
|
||||
this.clubOptions = await this.$businessTool.listManageClubByRole()
|
||||
if ((this.is_sysadmin || this.is_A06 || this.is_H02) === false && this.is_H04 === true) {
|
||||
this.unions = this.$businessTool.listUnion(this.unionid)
|
||||
this.$set(this.pageForm, "unionId", this.unions[0].id)
|
||||
this.unions = await this.$businessTool.listUnion(this.unionid)
|
||||
if (this.unions.length > 0 && this.is_CLUB_PRESIDENT !== true) {
|
||||
this.$set(this.pageForm, "unionId", this.unions[0].id)
|
||||
}
|
||||
} else {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
}
|
||||
if (this.is_H04 === false && this.is_H02 === true) {
|
||||
if (this.clubOptions.length > 0) {
|
||||
this.$set(this.pageForm, "clubId", this.clubOptions[0].id)
|
||||
}
|
||||
}
|
||||
await this.flushUnits()
|
||||
await this.getActivityGroup()
|
||||
this.personTypeOptions = await this.$businessTool.getDictOptions("USER_PERSON_TYPE")
|
||||
|
||||
@@ -84,7 +84,12 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
|
||||
</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="操作"
|
||||
|
||||
@@ -23,12 +23,15 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
<el-descriptions-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
<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>-->
|
||||
@@ -38,15 +41,13 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
<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.peopleNum || '暂无' }}-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
<el-descriptions-item label="活动报名范围">
|
||||
{{ viewData.groupName || '暂无' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动地点">
|
||||
{{ viewData.address }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="报名方式">
|
||||
<span v-if="viewData.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===2">组队报名</span>
|
||||
|
||||
@@ -103,8 +103,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'edit',row}"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
:disabled="row.projectTypeCode==50004">
|
||||
>
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item u
|
||||
@@ -113,7 +112,7 @@ const ACTIVITY_CULTURE_INFO_MANAGE = {
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'delete',row}"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId" >
|
||||
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}">
|
||||
|
||||
@@ -17,14 +17,17 @@ const singleSignUp = {
|
||||
<el-descriptions-item label="活动编号">
|
||||
{{ viewData.activityCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动编号">
|
||||
<el-descriptions-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动类型" :span="2">
|
||||
<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>-->
|
||||
@@ -34,12 +37,10 @@ const singleSignUp = {
|
||||
<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.address }}
|
||||
</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>
|
||||
@@ -50,7 +51,7 @@ const singleSignUp = {
|
||||
<span v-if="viewData.isEnrollSystem">活动报名</span>
|
||||
<span v-else>活动管理</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="报名人数限制" span="3" v-if="viewData.signUpMethod!=null">
|
||||
<el-descriptions-item label="报名人数限制" :span="2" v-if="viewData.signUpMethod!=null">
|
||||
<span v-if="viewData.userNumberLimit===1">总人数限制({{
|
||||
viewData.totalUserNumberLimit
|
||||
}}人)</span>
|
||||
@@ -261,6 +262,16 @@ const singleSignUp = {
|
||||
}
|
||||
},
|
||||
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
|
||||
@@ -506,12 +517,21 @@ const singleSignUp = {
|
||||
|
||||
//活动信息
|
||||
activityInfo() {
|
||||
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => {
|
||||
this.$axios.post("/platform/activity/culture/infoManage/findOne", {id: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
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)
|
||||
this.viewData.teamNum = union.limitNum
|
||||
if (union) {
|
||||
this.viewData.teamNum = union.limitNum
|
||||
}
|
||||
this.listTeamUserUnion()
|
||||
} else {
|
||||
this.listTeamUser()
|
||||
|
||||
@@ -71,6 +71,12 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="分工会列表">
|
||||
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')">
|
||||
<el-button @click="openImport" size="small" type="primary">导入报名人员</el-button>
|
||||
<el-button @click="doExportByEnroll" size="small" type="primary">导出报名信息</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" row-key="id" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="{row}">
|
||||
@@ -295,11 +301,20 @@ layout("/layouts/platform.html"){
|
||||
prop="num"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="doExportXlsx(row)" size="mini" type="primary">导出
|
||||
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="doExportXlsx(row)" size="mini" type="primary">导出
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog title="导入报名人员" :visible.sync="importDialog" width="50%" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<file-import
|
||||
ref="viewImport"
|
||||
temp_url="/platform/activity/reading/downloadImportTemplate"
|
||||
post_url="/platform/activity/reading/importUserActivitys"
|
||||
:business_id="pageForm.id"
|
||||
@flush="successImport"
|
||||
></file-import>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
@@ -310,6 +325,9 @@ layout("/layouts/platform.html"){
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityList: [],
|
||||
@@ -317,6 +335,7 @@ layout("/layouts/platform.html"){
|
||||
unions: [],
|
||||
rootData: [],
|
||||
|
||||
importDialog: false,
|
||||
noneData: false,
|
||||
tabLoading: false,
|
||||
events: [],
|
||||
@@ -342,11 +361,40 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
doExportXlsx(row) {
|
||||
this.$downLoad("/platform/activity/sports/info/mange/exportXlsx", {
|
||||
this.$downLoad(loc() + "/doExportByEnroll", {
|
||||
id: this.pageForm.id,
|
||||
unionId: row.id
|
||||
})
|
||||
},
|
||||
doExportByEnroll() {
|
||||
if (!this.pageForm.id) {
|
||||
this.notifyWarning("请先选择活动名称")
|
||||
return
|
||||
}
|
||||
if (!this.pageForm.unionid) {
|
||||
this.notifyWarning("请选择所属工会")
|
||||
return
|
||||
}
|
||||
this.$downLoad(loc() + "/doExportByEnroll", {
|
||||
id: this.pageForm.id,
|
||||
unionId: this.pageForm.unionid
|
||||
})
|
||||
},
|
||||
openImport() {
|
||||
if (!this.pageForm.id) {
|
||||
this.notifyWarning("请先选择活动名称")
|
||||
return
|
||||
}
|
||||
this.importDialog = true
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.viewImport) {
|
||||
this.$refs.viewImport.resetImportData()
|
||||
}
|
||||
})
|
||||
},
|
||||
successImport() {
|
||||
this.pageData()
|
||||
},
|
||||
unionIdChange() {
|
||||
const tableData = clone(this.rootData)
|
||||
setTimeout(()=>{
|
||||
|
||||
Reference in New Issue
Block a user