commit
This commit is contained in:
@@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<div style="padding: 20px 50px">
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" style="width: 200px"
|
||||
@click="$downLoad('/platform/activity/basic/scope/downloadImport')" icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-upload
|
||||
action="#"
|
||||
name="file"
|
||||
ref="upload"
|
||||
:on-remove="
|
||||
(file, fileList) => {
|
||||
importData.fileList = fileHandleRemove(file, fileList)
|
||||
importResult = {
|
||||
errorCount: 0,
|
||||
successCount: 0,
|
||||
totalCount: 0,
|
||||
errorList: []
|
||||
}
|
||||
}
|
||||
"
|
||||
:on-change="
|
||||
(file, fileList) => {
|
||||
importData.fileList = fileHandleChange(file, fileList, { type: ['xls', 'xlsx'] })
|
||||
}
|
||||
"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:file-list="importData.fileList"
|
||||
>
|
||||
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件</el-button>
|
||||
<div class="el-upload__tip" slot="tip" style="color: #f56c6c">只能上传 xls/xlsx 文件</div>
|
||||
</el-upload>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="top" timestamp="导入结果">
|
||||
<el-card shadow="never">
|
||||
<p>总记录数:{{ errorInfoData.totalCount }}</p>
|
||||
<p>
|
||||
成功数:
|
||||
<span class="text-success">{{ errorInfoData.successCount }}</span>
|
||||
</p>
|
||||
<p>
|
||||
错误数:
|
||||
<span class="text-danger">{{ errorInfoData.errorCount }}</span>
|
||||
</p>
|
||||
<el-link @click="exportErrors" type="primary" v-if="errorInfoData.errorCount > 0">下载错误记录</el-link>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
<div style="text-align: right">
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="clearImportDialog" type="primary"
|
||||
:disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="clearSearchCnd"
|
||||
:loading="importLoading">清空查询条件</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">核对人员</el-button>
|
||||
<el-button type="primary" @click="doImportSearch"
|
||||
:loading="importLoading">查询人员</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
exists_login_name_redis_key: {type: String, required: ""},
|
||||
group_id: {type: Number, required: ""},
|
||||
do_import_url: {type: String, required: ""}
|
||||
},
|
||||
mounted() {
|
||||
const s = document.createElement("script")
|
||||
s.type = "text/javascript"
|
||||
s.src = "/assets/platform/plugins/xlsx/xlsx.full.min.js"
|
||||
document.body.appendChild(s)
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
importData: {
|
||||
fileList: [],
|
||||
isFlag: false
|
||||
},
|
||||
errorInfoData: {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: 0
|
||||
},
|
||||
importLoading: false,
|
||||
doImportUrl:""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clearImportDialog() {
|
||||
this.$emit("clear_import_dialog")
|
||||
},
|
||||
clearSearchCnd() {
|
||||
this.importData = {
|
||||
fileList: [],
|
||||
}
|
||||
this.errorInfoData = {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: [],
|
||||
}
|
||||
|
||||
$.get('/platform/activity/basic/scope/clearSearchCnd', {existsLoginNameRedisKey: this.exists_login_name_redis_key}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$emit("flush", this.exists_login_name_redis_key)
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
resetImportData() {
|
||||
this.importData = {
|
||||
fileList: [],
|
||||
}
|
||||
this.errorInfoData = {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: 0
|
||||
}
|
||||
},
|
||||
doImportSearch() {
|
||||
this.$emit("flush", this.exists_login_name_redis_key)
|
||||
this.clearImportDialog()
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.$message.error({
|
||||
title: "错误",
|
||||
message: "请选择文件!"
|
||||
})
|
||||
return
|
||||
}
|
||||
const data = new FormData()
|
||||
data.append("groupId", this.group_id)
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name)
|
||||
})
|
||||
this.importLoading = true
|
||||
this.$axios.post(this.do_import_url, data).then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (res.data.errorList && res.data.errorList.length > 0) {
|
||||
this.$message.warning("核对失败")
|
||||
} else {
|
||||
this.$message.success("核对成功")
|
||||
}
|
||||
|
||||
this.errorInfoData = res.data
|
||||
this.$emit("flush", res.data.existsLoginNameRedisKey)
|
||||
} else {
|
||||
this.$message.warning("核对失败")
|
||||
}
|
||||
this.importLoading = false
|
||||
})
|
||||
},
|
||||
exportErrors() {
|
||||
const data = this.errorInfoData.errorList
|
||||
|
||||
// 创建工作簿
|
||||
const workbook = XLSX.utils.book_new()
|
||||
|
||||
// 创建工作表
|
||||
const worksheet = XLSX.utils.json_to_sheet(data)
|
||||
|
||||
// 将工作表添加到工作簿
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1")
|
||||
|
||||
// 将工作簿转换为二进制对象
|
||||
const excelBuffer = XLSX.write(workbook, {bookType: "xlsx", type: "array"})
|
||||
|
||||
// 将二进制对象转换为Blob对象
|
||||
const blob = new Blob([excelBuffer], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})
|
||||
|
||||
// 创建下载链接并设置相关属性
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement("a")
|
||||
link.href = url
|
||||
link.download = "错误记录.xlsx"
|
||||
|
||||
// 模拟点击下载链接
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
// 清理下载链接
|
||||
document.body.removeChild(link)
|
||||
window.URL.revokeObjectURL(url)
|
||||
},
|
||||
fileHandleRemove(file, fileList) {
|
||||
return fileList
|
||||
},
|
||||
fileHandleChange(file, fileList, {type, size}) {
|
||||
const removeFile = () => {
|
||||
fileList.splice(fileList.findIndex((v) => v === file))
|
||||
}
|
||||
|
||||
if (!file.size) {
|
||||
this.$message.warning("您选择的是空文件!")
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (type && type.length && !type.includes(file.name.split(".").pop().toLowerCase())) {
|
||||
this.$message.warning(`文件只能是 ${type.map((v) => v.toUpperCase()).join("/")} 格式!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (size && !file.size < size) {
|
||||
this.$message.warning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
return fileList
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-card__body {
|
||||
padding: 25px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,319 +1,347 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动分组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
placeholder="活动分组"
|
||||
v-model="pageForm.groupId"
|
||||
style="width: 100%"
|
||||
@change="
|
||||
<div>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">活动分组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
placeholder="活动分组"
|
||||
v-model="pageForm.groupId"
|
||||
style="width: 100%"
|
||||
@change="
|
||||
doSearch()
|
||||
viewGroupName()
|
||||
"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
style="width: 100%"
|
||||
@keyup.enter.native="doSearch"
|
||||
>
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 80px">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="is_sysadmin || is_A06">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
placeholder="所属工会"
|
||||
v-model="pageForm.unionId"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="flushUnits"
|
||||
@clear="flushUnits"
|
||||
filterable
|
||||
>
|
||||
<el-option v-for="item in unions" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item" v-if="is_sysadmin || is_A06">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
placeholder="所属工会"
|
||||
v-model="pageForm.unionId"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
@change="flushUnits"
|
||||
@clear="flushUnits"
|
||||
filterable
|
||||
>
|
||||
<el-option v-for="item in unions" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%" clearable @change="doSearch" filterable>
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%" clearable @change="doSearch"
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.activityUnionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.activityUnitId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnits" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" code="PERSON_TYPE" @change="doSearch" style="width: 100%"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select
|
||||
v-model="pageForm.userState"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
placeholder="在职状态"
|
||||
@change="doSearch"
|
||||
code="USER_STATE"
|
||||
></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
<!--<div class="search-item"
|
||||
v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.activityUnionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :label="currentGroupName">
|
||||
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary" :disabled="!pageForm.groupId">
|
||||
导出活动分组人员xlsx
|
||||
</el-button>
|
||||
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
||||
删除{{ currentGroupName }}
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table ref="userTable" :data="tableData" stripe border :size="tableSize" @sort-change="pageOrder">
|
||||
<el-table-column label="序号" type="index" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[5, 10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount"
|
||||
></el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')}">
|
||||
<div class="search-item-label">活动单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.activityUnitId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in ActivityUnits" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" code="PERSON_TYPE" @change="doSearch"
|
||||
style="width: 100%"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select
|
||||
v-model="pageForm.userState"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
placeholder="在职状态"
|
||||
@change="doSearch"
|
||||
code="USER_STATE"
|
||||
></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :label="currentGroupName">
|
||||
<el-button v-if="is_sysadmin||is_A06"
|
||||
type="primary" size="medium" icon="el-icon-printer" @click="importDialogVisible=true">
|
||||
导入XLSX查询
|
||||
</el-button>
|
||||
<el-button @click="doExportUser" icon="el-icon-printer" size="small" type="primary"
|
||||
:disabled="!pageForm.groupId">
|
||||
导出活动分组人员xlsx
|
||||
</el-button>
|
||||
<el-button @click="doDelete(null)" type="danger" size="small" :disabled="tableData.length === 0">
|
||||
删除{{ currentGroupName }}
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table ref="userTable" :data="tableData" stripe border :size="tableSize" @sort-change="pageOrder">
|
||||
<el-table-column label="序号" type="index" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:sortable="column.sortable"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container" style="margin-bottom: 0px">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[5, 10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="pageForm.totalCount"
|
||||
></el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="importDialogVisible" title="人员导入" width="45%" :append-to-body="true"
|
||||
:close-on-click-modal="false">
|
||||
<activity-import-user ref="importUserRef"
|
||||
@clear_import_dialog="clearImportDialog"
|
||||
@flush="flush"
|
||||
do_import_url="/platform/activity/basic/user/doImport"
|
||||
:group_id="pageForm.groupId"
|
||||
:exists_login_name_redis_key="pageForm.existsLoginNameRedisKey"></activity-import-user>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
group_id: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is_H10() {
|
||||
return this.roleData.is_H10
|
||||
},
|
||||
is_A06() {
|
||||
return this.roleData.is_A06
|
||||
},
|
||||
is_H04() {
|
||||
return this.roleData.is_H04
|
||||
},
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_H03() {
|
||||
return this.roleData.is_H03
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
},
|
||||
unionid() {
|
||||
return this.roleData.unionid
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
ActivityUnions: [],
|
||||
ActivityUnits: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
searchName: "username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "工号" },
|
||||
{ prop: "userName", label: "姓名" },
|
||||
{ prop: "sex", label: "性别", sortable: true },
|
||||
{ prop: "birthday", label: "出生年月" },
|
||||
{ prop: "mobile", label: "联系电话" },
|
||||
{ prop: "personType", label: "人员类型", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "groupName", label: "所属分组", sortable: true }
|
||||
],
|
||||
roleData: {},
|
||||
currentGroupName: null
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
components: {},
|
||||
methods: {
|
||||
viewGroupName() {
|
||||
if (this.pageForm?.groupId) {
|
||||
const group = this.activityGroupList.find((v) => v.groupId === this.pageForm.groupId)
|
||||
this.currentGroupName = group.groupName + "人员"
|
||||
return
|
||||
}
|
||||
this.currentGroupName = "全部人员"
|
||||
},
|
||||
doExportUser() {
|
||||
window.open("/platform/activity/basic/user/doExportUser?groupId=" + this.pageForm.groupId)
|
||||
},
|
||||
doSearch2() {
|
||||
this.getActivityGroup()
|
||||
this.doSearch()
|
||||
},
|
||||
async doDelete(id, groupId) {
|
||||
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
let pageForm = clone(this.pageForm)
|
||||
pageForm.id = id
|
||||
const resp = await $.post("/platform/activity/basic/user/doDelete", pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
await this.getActivityGroup(this.pageForm.groupId)
|
||||
this.$emit("group_change")
|
||||
} else {
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.is_A06 || this.is_sysadmin) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
// this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.unionid)
|
||||
}
|
||||
},
|
||||
async getActivityGroup(id) {
|
||||
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
if (id) {
|
||||
if (this.activityGroupList.some((v) => v.groupId === id)) {
|
||||
this.$set(this.pageForm, "groupId", id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
} else {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
}
|
||||
await this.doSearch()
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const { data } = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleData = data
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post("/platform/activity/basic/user/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
// this.ActivityUnions = await getActivityUnions()
|
||||
await this.flushUnits()
|
||||
await this.getActivityGroup()
|
||||
await this.getRolesAndUnion()
|
||||
this.viewGroupName()
|
||||
props: {
|
||||
group_id: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
is_H10() {
|
||||
return this.roleData.is_H10
|
||||
},
|
||||
is_A06() {
|
||||
return this.roleData.is_A06
|
||||
},
|
||||
is_H04() {
|
||||
return this.roleData.is_H04
|
||||
},
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_H03() {
|
||||
return this.roleData.is_H03
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
},
|
||||
unionid() {
|
||||
return this.roleData.unionid
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activityGroupList: [],
|
||||
ActivityUnions: [],
|
||||
ActivityUnits: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
pageForm: {
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
searchName: "username",
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
memberStatus: [],
|
||||
year: moment().format("YYYY")
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: "loginName", label: "工号"},
|
||||
{prop: "userName", label: "姓名"},
|
||||
{prop: "sex", label: "性别", sortable: true},
|
||||
{prop: "birthday", label: "出生年月"},
|
||||
{prop: "mobile", label: "联系电话"},
|
||||
{prop: "personType", label: "人员类型", sortable: true},
|
||||
{prop: "userState", label: "在职状态", sortable: true},
|
||||
{prop: "unitName", label: "所属单位", sortable: true},
|
||||
{prop: "unionName", label: "所属工会", sortable: true},
|
||||
{prop: "groupName", label: "所属分组", sortable: true}
|
||||
],
|
||||
roleData: {},
|
||||
currentGroupName: null,
|
||||
importDialogVisible: false,
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"activity-import-user": httpVueLoader("/components/module/activity/ActivityImportUser.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
flush(exists_login_name_redis_key) {
|
||||
this.pageForm.existsLoginNameRedisKey = exists_login_name_redis_key
|
||||
this.doSearch()
|
||||
},
|
||||
clearImportDialog() {
|
||||
this.importDialogVisible = false
|
||||
},
|
||||
viewGroupName() {
|
||||
if (this.pageForm?.groupId) {
|
||||
const group = this.activityGroupList.find((v) => v.groupId === this.pageForm.groupId)
|
||||
this.currentGroupName = group.groupName + "人员"
|
||||
return
|
||||
}
|
||||
this.currentGroupName = "全部人员"
|
||||
},
|
||||
doExportUser() {
|
||||
window.open("/platform/activity/basic/user/doExportUser?groupId=" + this.pageForm.groupId)
|
||||
},
|
||||
doSearch2() {
|
||||
this.getActivityGroup()
|
||||
this.doSearch()
|
||||
},
|
||||
async doDelete(id, groupId) {
|
||||
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
let pageForm = clone(this.pageForm)
|
||||
pageForm.id = id
|
||||
const resp = await $.post("/platform/activity/basic/user/doDelete", pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
await this.getActivityGroup(this.pageForm.groupId)
|
||||
this.$emit("group_change")
|
||||
} else {
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
if (this.is_A06 || this.is_sysadmin) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
// this.ActivityUnits = await getActivityUnits(this.pageForm.activityUnionId)
|
||||
} else {
|
||||
this.units = await this.$businessTool.listUnit(this.unionid)
|
||||
}
|
||||
},
|
||||
async getActivityGroup(id) {
|
||||
const resp = await $.get("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
if (id) {
|
||||
if (this.activityGroupList.some((v) => v.groupId === id)) {
|
||||
this.$set(this.pageForm, "groupId", id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
} else {
|
||||
this.$set(this.pageForm, "groupId", resp.data[0].groupId)
|
||||
}
|
||||
}
|
||||
await this.doSearch()
|
||||
},
|
||||
async getRolesAndUnion() {
|
||||
const {data} = await $.post("/platform/activity/basic/scope/getRolesAndUnion")
|
||||
this.roleData = data
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post("/platform/activity/basic/user/pageData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data.list
|
||||
this.pageForm.totalCount = resp.data.totalCount
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
// this.ActivityUnions = await getActivityUnions()
|
||||
await this.flushUnits()
|
||||
await this.getActivityGroup()
|
||||
await this.getRolesAndUnion()
|
||||
this.viewGroupName()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<template>
|
||||
<el-card shadow="never" style="min-height: calc(100vh - 70px);position: relative">
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="文化活动申报" define_key="WHHD"
|
||||
v-if="activity_type===40002||activity_type===40003"></snaker-start>
|
||||
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="170px"
|
||||
ref="addForm" v-loading="formLoading">
|
||||
|
||||
<el-tabs tab-position="top" v-model="activeName">
|
||||
<el-tab-pane label="活动基础信息" name="1">
|
||||
<div class="mt20">
|
||||
@@ -84,20 +85,20 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="12"-->
|
||||
<!-- v-if="formData.isEnrollSystem === true">-->
|
||||
<!-- <el-form-item label="活动计划时间" prop="plannedDate">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- @change="plannedDateChange"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- v-model="formData.plannedDate" value-format="yyyy-MM-dd">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12"-->
|
||||
<!-- v-if="formData.isEnrollSystem === true">-->
|
||||
<!-- <el-form-item label="活动计划时间" prop="plannedDate">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- @change="plannedDateChange"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- v-model="formData.plannedDate" value-format="yyyy-MM-dd">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实际活动时间" prop="time">
|
||||
@@ -181,7 +182,9 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
<el-form-item label="报名人数限制" prop="userNumberLimit">
|
||||
<el-radio-group v-model="formData.userNumberLimit" size="small">
|
||||
<el-radio border :label="1">总人数限制</el-radio>
|
||||
<el-radio border :label="2" v-if="activity_type===40001">分工会人数限制</el-radio>
|
||||
<el-radio border :label="2" v-if="activity_type===40001">
|
||||
分工会人数限制
|
||||
</el-radio>
|
||||
<el-radio border :label="null">不限制</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@@ -472,15 +475,12 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
</el-alert>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
|
||||
<div style="padding: 20px;text-align: center;">
|
||||
<el-button @click="operation" style="width: 300px" type="primary" :disabled="formLoading">
|
||||
确 定
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<drawer-user-scope
|
||||
@@ -489,7 +489,8 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
:group_id.sync="formData.groupId"
|
||||
></drawer-user-scope>
|
||||
|
||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="userDialogVisible" title="添加人员" width="40%">
|
||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :visible.sync="userDialogVisible"
|
||||
title="添加人员" width="40%">
|
||||
|
||||
<el-form :model="formData" label-width="100px">
|
||||
<el-form-item label="参加人员" prop="userId">
|
||||
@@ -522,25 +523,27 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
`,
|
||||
props: {
|
||||
activity_type: {
|
||||
value: { type: Object, default: "" }
|
||||
value: {type: Object, default: ""}
|
||||
}
|
||||
},
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
activeName: "1",
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + ""
|
||||
},
|
||||
formRules: {
|
||||
groupId: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
name: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
type: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
projectTypeCode: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
address: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
plannedDate: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
time: [{ required: true, message: "必填", trigger: ["blur", "change"] }],
|
||||
cover: [{ required: true, message: "必填", trigger: ["blur", "change"] }]
|
||||
groupId: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
name: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
type: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
projectTypeCode: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
address: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
plannedDate: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
time: [{required: true, message: "必填", trigger: ["blur", "change"]}],
|
||||
cover: [{required: true, message: "必填", trigger: ["blur", "change"]}]
|
||||
},
|
||||
|
||||
projectTypeList: [],
|
||||
@@ -557,12 +560,12 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
selectLoading: false,
|
||||
|
||||
userColumns: [
|
||||
{ prop: "userName", label: "姓名" },
|
||||
{ prop: "loginName", label: "工号" },
|
||||
{ prop: "sex", label: "性别" },
|
||||
{ prop: "mobile", label: "联系方式" },
|
||||
{ prop: "unitName", label: "所属单位" },
|
||||
{ prop: "unionName", label: "所属工会" }
|
||||
{prop: "userName", label: "姓名"},
|
||||
{prop: "loginName", label: "工号"},
|
||||
{prop: "sex", label: "性别"},
|
||||
{prop: "mobile", label: "联系方式"},
|
||||
{prop: "unitName", label: "所属单位"},
|
||||
{prop: "unionName", label: "所属工会"}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -584,10 +587,50 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.activity_type = this.activity_type
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
formData.applyTime2 = null
|
||||
}
|
||||
if (time && time.length) {
|
||||
formData.startTime = formData.time[0]
|
||||
formData.endTime = formData.time[1]
|
||||
formData.time = null
|
||||
}
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
formData.endPlannedDate = formData.plannedDate[1]
|
||||
formData.plannedDate = null
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/activity/culture/applyActivity/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
if (this.activity_type === 40002) {
|
||||
window.location.href = "/platform/activity/culture/infoManage/union"
|
||||
} else if (this.activity_type === 40003) {
|
||||
window.location.href = "/platform/activity/culture/infoManage/club"
|
||||
} else {
|
||||
window.location.href = "/platform/activity/culture/infoManage/school"
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async remoteMethod(query) {
|
||||
if (query) {
|
||||
this.selectLoading = true
|
||||
const { data } = await this.$axios.post("/platform/activity/culture/applyActivity/findUser", {
|
||||
const {data} = await this.$axios.post("/platform/activity/culture/applyActivity/findUser", {
|
||||
serachWord: query,
|
||||
activity_type: this.activity_type
|
||||
})
|
||||
@@ -624,7 +667,7 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
this.formLoading = true
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.activity_type = this.activity_type
|
||||
const { time, applyTime2, plannedDate } = formData
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
@@ -715,28 +758,28 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
this.$set(this.formData, "mobile", id ? userList.find((v) => v.id === id).mobile : null)
|
||||
},
|
||||
async getActivityTwoLevelType(code) {
|
||||
const { data } = await this.$axios.post("/platform/activity/basic/settings/getActivityTwoLevelType", { code: code })
|
||||
const {data} = await this.$axios.post("/platform/activity/basic/settings/getActivityTwoLevelType", {code: code})
|
||||
return data
|
||||
},
|
||||
async getActivityGroup() {
|
||||
const { data } = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
const {data} = await this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup")
|
||||
this.activityGroupList = data
|
||||
},
|
||||
async generateActivityCode() {
|
||||
const { data } = await this.$axios.post("/platform/activity/sports/common/generateActivityCode", { activity_type: this.activity_type })
|
||||
const {data} = await this.$axios.post("/platform/activity/sports/common/generateActivityCode", {activity_type: this.activity_type})
|
||||
return data
|
||||
},
|
||||
async getUnionData() {
|
||||
const { data } = await this.$axios.post("/platform/activity/culture/applyActivity/getUnionData", {
|
||||
const {data} = await this.$axios.post("/platform/activity/culture/applyActivity/getUnionData", {
|
||||
activityScopeGroupId: this.formData.groupId
|
||||
})
|
||||
return data
|
||||
},
|
||||
init(id) {
|
||||
if (id){
|
||||
if (id) {
|
||||
this.activeName = "1"
|
||||
this.findOne(id)
|
||||
}else{
|
||||
} else {
|
||||
this.formData = {
|
||||
time: [],
|
||||
applyTime2: [],
|
||||
@@ -762,11 +805,11 @@ const ACTIVITY_CULTURE_APPLY_ACTIVITY = {
|
||||
}
|
||||
},
|
||||
async queryUserByIds(ids) {
|
||||
const { data } = await this.$axios.post("/platform/activity/culture/applyActivity/queryUserByIds", { ids: JSON.stringify(ids) })
|
||||
const {data} = await this.$axios.post("/platform/activity/culture/applyActivity/queryUserByIds", {ids: JSON.stringify(ids)})
|
||||
return data
|
||||
},
|
||||
async findOne(id) {
|
||||
const { data, code, msg } = await this.$axios.post("/platform/activity/culture/infoManage/findOne", { id })
|
||||
const {data, code, msg} = await this.$axios.post("/platform/activity/culture/infoManage/findOne", {id})
|
||||
if (code === 0) {
|
||||
if (data.userId) {
|
||||
const user = await this.queryUserByIds([data.userId])
|
||||
|
||||
@@ -34,8 +34,8 @@ const ACTIVITY_CULTURE_APPLY_USER = {
|
||||
<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="false">未报名</el-radio-button>
|
||||
<el-radio-button :label="true">已报名</el-radio-button>
|
||||
<el-radio-button :label="false">未报名</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
<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">
|
||||
@@ -42,8 +42,8 @@ const ACTIVITY_CULTURE_INFO_ACTIVITY = {
|
||||
</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===2">组队报名</span>
|
||||
<span v-else-if="viewData.signUpMethod===3">分工会报名</span>
|
||||
<span v-else-if="!viewData.signUpMethod">无需报名</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="是否用于报名">
|
||||
|
||||
@@ -153,7 +153,43 @@ const singleSignUp = {
|
||||
</div>
|
||||
<!-- 分工会报名-->
|
||||
<div v-else-if="viewData.signUpMethod===3">
|
||||
<div class="process-title">选择报名人员,报名人数 <span style="color: red">{{viewData.teamNum}}</span>人
|
||||
</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>
|
||||
|
||||
<!-- 表单填写-->
|
||||
@@ -243,6 +279,18 @@ const singleSignUp = {
|
||||
})
|
||||
},
|
||||
|
||||
//查询报名人员
|
||||
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) {
|
||||
@@ -300,14 +348,14 @@ const singleSignUp = {
|
||||
|
||||
//分工会
|
||||
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
|
||||
// }
|
||||
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 = {
|
||||
@@ -420,7 +468,10 @@ const singleSignUp = {
|
||||
//查询队友信息
|
||||
queryTeammate(val) {
|
||||
if (val) {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {keyword: val}).then((res) => {
|
||||
this.$axios.post("/platform/activity/culture/applyUser/queryTeammate", {
|
||||
keyword: val,
|
||||
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
|
||||
@@ -457,11 +508,18 @@ const singleSignUp = {
|
||||
this.$axios.post("/platform/activity/culture/infoManage/activityInfo", {id: this.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.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
|
||||
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)
|
||||
}
|
||||
this.listTeamUser()
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -117,8 +117,8 @@ const ACTIVITY_CULTURE_USER_STATISTICS = {
|
||||
{ prop: "loginName", label: "工号", width: 180, fixed: "left" },
|
||||
{ prop: "sex", label: "性别", width: 70 },
|
||||
{ prop: "mobile", label: "联系方式", width: 180 },
|
||||
{ prop: "unitName", label: "所属单位", width: 200 },
|
||||
{ prop: "unionName", label: "所属工会", width: 200 },
|
||||
{ prop: "unitName", label: "所属单位", width: 200 },
|
||||
{ prop: "applyDateTime", label: "报名时间", width: 180 },
|
||||
{ prop: "applyUserUserName", label: "报名人", width: 180 }
|
||||
],
|
||||
|
||||
@@ -56,6 +56,19 @@ layout("/layouts/platform.html"){
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="活动项目" v-if="unionLeaderCoach">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择活动项目"
|
||||
|
||||
v-model="pageForm.eventId"
|
||||
>
|
||||
<el-option :key="item.eventId" :label="item.allName"
|
||||
:value="item.eventId" v-for="item in eventList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -136,45 +149,28 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool label="活动项目信息">
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择组别"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.groupName"
|
||||
>
|
||||
<el-option :key="item.id" :label="item.name" :value="item.name"
|
||||
v-for="item in groupList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- <div class="search-item-option">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择组别"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.groupName"
|
||||
>
|
||||
<el-option :key="item.id" :label="item.name" :value="item.name"
|
||||
v-for="item in groupList"></el-option>
|
||||
</el-select>
|
||||
</div>-->
|
||||
|
||||
<div class="search-item-option">
|
||||
<el-select
|
||||
@change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择活动项目"
|
||||
style="width: 100%; margin-bottom: 5px; margin-left: 10px"
|
||||
v-if="unionLeaderCoach"
|
||||
v-model="pageForm.eventId"
|
||||
>
|
||||
<el-option :key="item.eventId" :label="item.allName"
|
||||
:value="item.eventId" v-for="item in eventList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="mr10 ml20" v-if="unionLeaderCoach">
|
||||
|
||||
<div v-if="unionLeaderCoach">
|
||||
领队:
|
||||
<span style="color: #419bf8">{{leaderData.username?leaderData.username:'暂无'}}</span>
|
||||
  教练:
|
||||
<span
|
||||
style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="openLeaderCoach" size="medium" type="primary"
|
||||
v-if="unionLeaderCoach">设置领队/教练
|
||||
<span style="color: #419bf8">{{coachData.username ?coachData.username:'暂无'}}</span>
|
||||
<el-button @click="openLeaderCoach" size="medium" type="primary">设置领队/教练
|
||||
</el-button>
|
||||
</div>
|
||||
</table-tool>
|
||||
|
||||
@@ -418,9 +418,10 @@ layout("/layouts/platform.html"){
|
||||
return v.id === this.pageForm.id
|
||||
})
|
||||
await this.getEventsByActivityId()
|
||||
this.pageForm.activityName = activity.length > 0 ? activity[0].name : null
|
||||
this.pageForm.applyType = activity[0].applyType
|
||||
|
||||
if (activity.length>0){
|
||||
this.pageForm.activityName = activity.length > 0 ? activity[0].name : null
|
||||
this.pageForm.applyType = activity[0].applyType
|
||||
}
|
||||
const resp = await this.$axios.post(loc() + "/pageData", this.pageForm)
|
||||
this.tabLoading = false
|
||||
if (resp.code === 0) {
|
||||
|
||||
@@ -184,7 +184,7 @@ const apply_component = {
|
||||
this.$axios.post("/platform/evaluate/apply/info", {id: row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
|
||||
this.$set(this.formData, "honorTypeName", row.honorTypeName)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -109,7 +109,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.showApprovalForm = false
|
||||
})
|
||||
},
|
||||
|
||||
@@ -108,7 +108,7 @@ layout("/layouts/platform.html"){
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
|
||||
@@ -303,6 +303,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
this.clubOption = await this.$businessTool.listCLubByRole()
|
||||
this.budgetTypeOption = await this.$businessTool.getDictOptions("ACTIVITY_BUDGET_TYPE")
|
||||
const budgetTypeOption = []
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
@@ -364,7 +365,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
async created() {
|
||||
this.init()
|
||||
this.clubOption = await this.$businessTool.listCLubByRole()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+2
-1
@@ -41,7 +41,8 @@ const basicForm = {
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="unionQuotaAllocationList" label="工会名额分配">
|
||||
<el-table :data="formData.unionQuotaAllocationList" size="medium" height="70vh">
|
||||
<el-table :data="formData.unionQuotaAllocationList" size="medium" max-height="500"
|
||||
show-summary style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="工会名称" prop="unionName"></el-table-column>
|
||||
<el-table-column label="会员人数" prop="memberNum"></el-table-column>
|
||||
|
||||
+8
-4
@@ -49,14 +49,17 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="报名结束时间" prop="signUpEndTIme"></el-table-column>
|
||||
<el-table-column label="所属工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="分配名额数" prop="allocationNum"></el-table-column>
|
||||
<el-table-column label="报名数(已审核通过数)">
|
||||
<!-- <el-table-column label="报名数(已审核通过数)">
|
||||
<template v-slot="{ row }">
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onSignUp(row)" size="mini" type="primary">报名</el-button>
|
||||
<el-button @click="onSignUp(row)" size="mini" type="primary"
|
||||
v-if="$moment(row.signUpStartTime).valueOf() < $moment().valueOf()
|
||||
&&
|
||||
$moment(row.signUpEndTIme).valueOf() > $moment().valueOf()">报名</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -94,7 +97,8 @@ layout("/layouts/platform.html"){
|
||||
methods: {
|
||||
onSignUp(row){
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.signUpFormRef.onOpen(row.activityId, row.unionId)
|
||||
const activity= this.activityList.find(item => item.id === row.activityId)
|
||||
this.$refs.signUpFormRef.onOpen(row.activityId, row.unionId,activity)
|
||||
})
|
||||
},
|
||||
onView(row){
|
||||
|
||||
+78
-5
@@ -1,11 +1,13 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-tabs v-model="activeName" >
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="活动基础信息" name="one">
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="活动名称">{{ viewData.activityName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signUpStartTime }}至{{viewData.signUpEndTIme}}</el-descriptions-item>
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signUpStartTime
|
||||
}}至{{viewData.signUpEndTIme}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="活动线路" :span="2">{{viewData.linNames}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会名额分配" :span="2">
|
||||
<el-table :data="viewData.unionQuotaAllocationList" size="medium" height="70vh">
|
||||
@@ -24,20 +26,81 @@ const info = {
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报名信息" name="two">
|
||||
<el-table :data="userTableData" :size="tableSize" height="70vh">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="mobile"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="idCard"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="报名线路" prop="lineName"></el-table-column>
|
||||
<el-table-column prop="signUpTime" label="填报时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template v-slot="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:append-to-body="true"
|
||||
:visible.sync="userDialogVisible"
|
||||
title="详细信息查看"
|
||||
width="40%"
|
||||
>
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="姓名">{{ userViewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{ userViewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位">{{ userViewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工会">{{ userViewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="附件">
|
||||
<file-preview :files="userViewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="userDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
`,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
activeName:"one"
|
||||
activeName: "one",
|
||||
userTableData: [],
|
||||
activityId: "",
|
||||
unionId: "",
|
||||
userDialogVisible:false,
|
||||
userViewData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(id,unionId) {
|
||||
openView(row) {
|
||||
|
||||
this.userViewData = row
|
||||
this.userViewData.files = JSON.parse(row.files)
|
||||
this.userDialogVisible = true
|
||||
},
|
||||
async onOpen(id, unionId) {
|
||||
this.activityId = id
|
||||
this.unionId = unionId
|
||||
await this.findOne(id)
|
||||
this.listQuotaAllocation()
|
||||
},
|
||||
async findOne(id) {
|
||||
this.$axios.post("/platform/excellentRecuperation/activityList/findOne", {id}).then(resp => {
|
||||
@@ -46,6 +109,16 @@ const info = {
|
||||
}
|
||||
})
|
||||
},
|
||||
listQuotaAllocation() {
|
||||
this.$axios.post("/platform/excellentRecuperation/activitySignUp/listQuotaAllocation", {
|
||||
activityId: this.activityId,
|
||||
unionId: this.unionId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.userTableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
+50
-20
@@ -77,7 +77,7 @@ const SIGN_UP_FORM = {
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<div class="process-title">报名人员信息</div>
|
||||
<div class="process-title">报名人员信息<span style="color:#ee0a24;">(如需修改或提交报名人员信息请点击编辑后提交)</span></div>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize" height="70vh">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
@@ -144,7 +144,8 @@ const SIGN_UP_FORM = {
|
||||
unionId: "",
|
||||
lineList: [],
|
||||
userOptions: [],
|
||||
userViewData:{},
|
||||
userViewData: {},
|
||||
activityData: {},
|
||||
userDialogVisible: false
|
||||
}
|
||||
},
|
||||
@@ -152,7 +153,7 @@ const SIGN_UP_FORM = {
|
||||
userChange(val) {
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const {userName, loginName, unitId, unitName, unionId, unionName,mobile,idCard} = user
|
||||
const {userName, loginName, unitId, unitName, unionId, unionName, mobile, idCard} = user
|
||||
this.$set(this.formData, "userName", userName)
|
||||
this.$set(this.formData, "loginName", loginName)
|
||||
this.$set(this.formData, "unitId", unitId)
|
||||
@@ -168,17 +169,37 @@ const SIGN_UP_FORM = {
|
||||
}
|
||||
}
|
||||
},
|
||||
async getSIgnUpUserList() {
|
||||
const res = await this.$axios.post('/platform/excellentRecuperation/activitySignUp/getSIgnUpUserList', {
|
||||
activityId: this.activityId,
|
||||
unionId: this.unionId
|
||||
})
|
||||
if (res.code === 0) {
|
||||
return res.data.length
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
onSave() {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.listQuotaAllocation()
|
||||
this.$message.success("保存成功")
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
this.getSIgnUpUserList().then(data => {
|
||||
const union = this.activityData.unionQuotaAllocationList.find(v => v.unionId === this.unionId)
|
||||
if (data >= union.allocationNum) {
|
||||
this.$message.error("该活动已满")
|
||||
return
|
||||
} else {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.listQuotaAllocation()
|
||||
this.$message.success("保存成功")
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
@@ -188,14 +209,22 @@ const SIGN_UP_FORM = {
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/submit', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.listQuotaAllocation()
|
||||
this.$message.success("提交成功")
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
this.getSIgnUpUserList().then(data => {
|
||||
const union = this.activityData.unionQuotaAllocationList(v => v.unionId === this.unionId)
|
||||
if (data >= union.allocationNum) {
|
||||
this.$message.error("该活动已满")
|
||||
return
|
||||
} else {
|
||||
this.$axios.post('/platform/excellentRecuperation/activitySignUp/submit', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.listQuotaAllocation()
|
||||
this.$message.success("提交成功")
|
||||
this.formData = {
|
||||
lineId: this.lineList[0].id,
|
||||
activityId: this.activityId
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -294,9 +323,10 @@ const SIGN_UP_FORM = {
|
||||
}
|
||||
})
|
||||
},
|
||||
onOpen(activityId, unionId) {
|
||||
onOpen(activityId, unionId, activity) {
|
||||
this.activityId = activityId
|
||||
this.unionId = unionId
|
||||
this.activityData = activity
|
||||
this.listQuotaAllocation()
|
||||
this.getLineList(activityId)
|
||||
},
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ layout("/layouts/platform.html"){
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
@@ -24,7 +24,7 @@ layout("/layouts/platform.html"){
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
|
||||
<search-item label="活动:">
|
||||
<search-item label="活动">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="pageForm.activityId"
|
||||
placeholder="请选择活动">
|
||||
|
||||
Reference in New Issue
Block a user