commit
This commit is contained in:
@@ -1,4 +1,45 @@
|
||||
const commonUtil = {
|
||||
//axios配置
|
||||
axiosService() {
|
||||
// 创建 axios 实例
|
||||
const axiosService = axios.create({
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
|
||||
"x-requested-with": "XMLHttpRequest"
|
||||
}
|
||||
})
|
||||
//axios拦截器
|
||||
axiosService.interceptors.response.use(
|
||||
(response) => {
|
||||
const userAgent = navigator.userAgent || navigator.vendor || window.opera
|
||||
const isMobile = /iPad|iPhone|iPod|Android/.test(userAgent)
|
||||
//判断是否为blob 不处理直接返回文件流
|
||||
if (response.config.responseType === "blob") {
|
||||
return response
|
||||
}
|
||||
if (response.data && response.data.code !== 0) {
|
||||
if (isMobile) {
|
||||
vant.Toast(response.data.msg)
|
||||
} else {
|
||||
ELEMENT.Message.error(response.data.msg)
|
||||
}
|
||||
return Promise.reject(response.data)
|
||||
}
|
||||
return response.data
|
||||
},
|
||||
(error) => {
|
||||
const userAgent = navigator.userAgent || navigator.vendor || window.opera
|
||||
const isMobile = /iPad|iPhone|iPod|Android/.test(userAgent)
|
||||
if (isMobile) {
|
||||
vant.Toast(error.message)
|
||||
} else {
|
||||
ELEMENT.Message.error(error.message)
|
||||
}
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
return axiosService
|
||||
},
|
||||
//权限认证
|
||||
authService() {
|
||||
function authPermission(permission) {
|
||||
@@ -65,4 +106,55 @@ const commonUtil = {
|
||||
}
|
||||
}
|
||||
},
|
||||
//下载文件
|
||||
downLoadService: function (url, data) {
|
||||
const loading = ELEMENT.Loading.service({
|
||||
lock: true,
|
||||
text: "导出中,请耐心等待",
|
||||
spinner: "el-icon-loading",
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
})
|
||||
|
||||
Vue.prototype.$axios
|
||||
.post(url, data, { responseType: "blob" })
|
||||
.then((response) => {
|
||||
if (response.data.type === "application/json") {
|
||||
try {
|
||||
const reader = new FileReader()
|
||||
reader.onload = function () {
|
||||
// reader.result 包含了 Blob 的内容,转换为字符串
|
||||
const content = reader.result
|
||||
// 将字符串解析为 JSON 对象
|
||||
const jsonObject = JSON.parse(content)
|
||||
this.$message.error(jsonObject.msg)
|
||||
}
|
||||
reader.readAsText(response.data)
|
||||
} catch (err) {
|
||||
this.$message.error("下载文件出错")
|
||||
}
|
||||
return
|
||||
}
|
||||
//获取服务器返回的文件描述信息
|
||||
const contentDisposition = response.headers["content-disposition"]
|
||||
const filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
|
||||
const matches = filenameRegex.exec(contentDisposition)
|
||||
let filename = ""
|
||||
if (matches != null && matches[1]) {
|
||||
filename = matches[1].replace(/['"]/g, "")
|
||||
filename = decodeURIComponent(filename)
|
||||
}
|
||||
//执行下载文件
|
||||
const url = window.URL.createObjectURL(new Blob([response.data]))
|
||||
const link = document.createElement("a")
|
||||
link.href = url
|
||||
link.setAttribute("download", filename) // 例如 'document.pdf'
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
link.parentNode.removeChild(link)
|
||||
loading.close()
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ const self_mixin = {
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
unionLimitNum: 0,
|
||||
isRegisterFull: false
|
||||
isRegisterFull: false,
|
||||
user: JSON.parse(window.sessionStorage.getItem('user'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -15,9 +16,9 @@ const self_mixin = {
|
||||
resp.data.location = JSON.parse(resp.data.location)
|
||||
resp.data.unionUserNumberLimit = JSON.parse(resp.data.unionUserNumberLimit)
|
||||
this.o = resp.data
|
||||
this.unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
this.unionId = this.user.union.id
|
||||
if (!this.unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
this.$message.warning('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
}
|
||||
if (this.o.userNumberLimit === 2) {
|
||||
@@ -127,4 +128,4 @@ const self_mixin = {
|
||||
return s.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,373 +1,312 @@
|
||||
<template>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="活动基础信息" name="1">
|
||||
<el-form label-suffix=":" style="padding: 20px 0" label-width="120px">
|
||||
<el-form-item class="item-center">{{ viewData.name }}</el-form-item>
|
||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||
<el-tab-pane label="活动基础信息" name="1">
|
||||
<border-table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>联系人</th>
|
||||
<td>{{ viewData.username }}( {{ viewData.loginname }})</td>
|
||||
<th>联系方式</th>
|
||||
<td>{{ viewData.mobile }}</td>
|
||||
<th>活动编号</th>
|
||||
<td>{{ viewData.activityCode }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>活动名称</th>
|
||||
<td>{{ viewData.name }}</td>
|
||||
<th>活动类型</th>
|
||||
<td>{{ viewData.type === 1 ? "分工会活动" : viewData.type === 2 ? "协会协会活动" : "校工会活动" }}</td>
|
||||
<th>活动项目类型</th>
|
||||
<td>{{ viewData.projectTypeName }}( {{ viewData.projectTypeCode }})</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>活动地点</th>
|
||||
<td>{{ viewData.address }}</td>
|
||||
<th>报名时间</th>
|
||||
<td>{{ viewData.applyStartTime }} - {{ viewData.applyEndTime }}</td>
|
||||
<th>活动时间</th>
|
||||
<td>{{ viewData.startTime }} - {{ viewData.endTime }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>创建组织</th>
|
||||
<td>
|
||||
<span v-if="viewData.type===40001">{{ "校工会" }}</span>
|
||||
<span v-if="viewData.type===40002">{{ viewData.unionname ? viewData.unionname : "暂无" }}</span>
|
||||
<span v-if="viewData.type===40003">{{ viewData.clubName ? viewData.clubName : "暂无" }}</span>
|
||||
</td>
|
||||
<th>报名方式</th>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<th>报名人数限制</th>
|
||||
<td>
|
||||
<span v-if="viewData.userNumberLimit===1">总人数限制({{viewData.totalUserNumberLimit }}人)</span>
|
||||
<span v-else-if="viewData.userNumberLimit===2">分工会人数限制</span>
|
||||
<span v-else-if="!viewData.userNumberLimit">不限制</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr v-if="viewData.userNumberLimit===2">
|
||||
<th>报名方式</th>
|
||||
<td colspan="5">
|
||||
<el-table border stripe :data="viewData.unionUserNumberLimit" size="small"
|
||||
height="500">
|
||||
<el-table-column type="index" label="序号" header-align="center" align="center"
|
||||
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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr v-if="viewData.needSign && viewData.needSign!=null">
|
||||
<th>是否需要签到</th>
|
||||
<td>{{ viewData.needSign ? "需要" : "不需要" }}</td>
|
||||
<th>签到半径</th>
|
||||
<td colspan="3">{{ viewData.rangeMeter + "米" }}</td>
|
||||
</tr>
|
||||
|
||||
<tr v-if="viewData.needSign">
|
||||
<th>活动签到点位</th>
|
||||
<td colspan="5">
|
||||
<el-card shadow="never">
|
||||
<div style="width: 100%;height: 500px" id="signMap"></div>
|
||||
</el-card>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>活动介绍</th>
|
||||
<td colspan="5">
|
||||
<div v-html="viewData.activityContent"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>附件</th>
|
||||
<td colspan="5">
|
||||
<file-upload v-if="viewData.otherFiles&&viewData.otherFiles.length"
|
||||
:files="viewData.otherFiles" :view="true">
|
||||
</file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>封面图</th>
|
||||
<td colspan="5">
|
||||
<img v-if="viewData.cover"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.cover"
|
||||
class="avatar" style="height: 200px;width: auto">
|
||||
<span v-else>暂无</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<el-row gutter="60">
|
||||
</table>
|
||||
</border-table>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人">
|
||||
<span v-if="viewData.username">
|
||||
{{ viewData.username }}
|
||||
({{ viewData.loginname }})</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动费用" name="3" v-if="!viewData.isEnrollSystem">
|
||||
<el-form label-suffix=":" label-position="left" style="padding: 20px 0" label-width="80px">
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-table border stripe :data="viewData.goods">
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动编号">
|
||||
{{ viewData.activityCode }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-table-column
|
||||
type="index" label="序号" header-align="center" align="center" width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动项目类型">
|
||||
{{ viewData.projectTypeName }}({{ viewData.projectTypeCode }})
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-table-column
|
||||
label="物品名称" header-align="center" align="center" prop="name">
|
||||
</el-table-column>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动类型">
|
||||
{{ viewData.type === 1 ? '分工会活动' : viewData.type === 2 ? '协会协会活动' : '校工会活动' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-table-column
|
||||
label="物品价格" header-align="center" align="center" prop="actualPrice">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动计划时间">
|
||||
{{ viewData.startPlannedDate + ' - ' + viewData.endPlannedDate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="发  票">
|
||||
<file-upload v-if="viewData.billFiles&&viewData.billFiles.length"
|
||||
:files="viewData.billFiles" :view="true">
|
||||
</file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动时间">{{ viewData.startTime }} - {{
|
||||
viewData.endTime
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="viewData.applyStartTime">
|
||||
<el-form-item label="报名时间">{{ viewData.applyStartTime }} - {{
|
||||
viewData.applyEndTime
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动人数">{{ viewData.peopleNum || '暂无' }}</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="照  片">
|
||||
<file-upload v-if="viewData.photoFiles&&viewData.photoFiles.length"
|
||||
:files="viewData.photoFiles" :view="true">
|
||||
</file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动内容">
|
||||
<span style="white-space: pre-line">
|
||||
{{ viewData.activityContent }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-if="!viewData.isEnrollSystem">
|
||||
<el-form-item label="活动考核内容">
|
||||
<span style="white-space: pre-line">
|
||||
{{ viewData.activityExamineContent }}
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动总结" name="4" v-if="!viewData.isEnrollSystem">
|
||||
<el-form ref="form" label-width="120px">
|
||||
<el-form-item prop="activitySummary" label="活动总结">
|
||||
{{ viewData.activitySummary }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="审核信息" name="5" v-if="viewData.auditId">
|
||||
<el-form ref="form" label-width="120px">
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动地点">{{ viewData.address }}</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-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-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动提醒">
|
||||
{{ viewData.xlFlag ? '提醒' : '不提醒' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否用于报名">
|
||||
<span v-if="viewData.isEnrollSystem">活动报名</span>
|
||||
<span v-else>活动管理</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="viewData.signUpMethod!=null">
|
||||
<el-form-item label="报名人数限制">
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="viewData.userNumberLimit===2">
|
||||
<el-form-item label="分工会限制名额">
|
||||
<el-table border stripe :data="viewData.unionUserNumberLimit" size="small"
|
||||
height="500">
|
||||
<el-table-column type="index" label="序号" header-align="center" align="center"
|
||||
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-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item v-if="viewData.type===1" label="所属工会">
|
||||
{{ !viewData.unionname ? '暂无' : viewData.unionname }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="viewData.type===2" label="所属协会">
|
||||
{{ !viewData.clubName ? '暂无' : viewData.clubName }}
|
||||
</el-form-item>
|
||||
<el-form-item v-if="viewData.type===3" label="所属组织">
|
||||
校工会
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="[1,2].includes(viewData.signUpMethod)">
|
||||
<el-form-item label="是否需要签到">
|
||||
{{ viewData.needSign ? '需要' : '不需要' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="viewData.signUpMethod!=null">
|
||||
<el-form-item label="签到半径(m)" v-if="viewData.needSign">
|
||||
{{ viewData.rangeMeter + '米' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="封面图" prop="cover">
|
||||
<img v-if="viewData.cover"
|
||||
:src="FILE_DOMAIN + '/fileStreamPreview?id=' + viewData.cover"
|
||||
class="avatar" style="height: 200px;width: auto">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="viewData.needSign">
|
||||
<el-form-item prop="" label="活动签到点位">
|
||||
<el-card shadow="never">
|
||||
<div style="width: 100%;height: 500px" id="signMap"></div>
|
||||
</el-card>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动费用" name="3" v-if="!viewData.isEnrollSystem">
|
||||
<el-form label-suffix=":" label-position="left" style="padding: 20px 0" label-width="80px">
|
||||
|
||||
<el-table border stripe :data="viewData.goods">
|
||||
|
||||
<el-table-column
|
||||
type="index" label="序号" header-align="center" align="center" width="100">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="物品名称" header-align="center" align="center" prop="name">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="物品价格" header-align="center" align="center" prop="actualPrice">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-form-item label="发  票">
|
||||
<file-upload v-if="viewData.billFiles&&viewData.billFiles.length"
|
||||
:files="viewData.billFiles" :view="true">
|
||||
</file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="照  片">
|
||||
<file-upload v-if="viewData.photoFiles&&viewData.photoFiles.length"
|
||||
:files="viewData.photoFiles" :view="true">
|
||||
</file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="其  他">
|
||||
<file-upload v-if="viewData.otherFiles&&viewData.otherFiles.length"
|
||||
:files="viewData.otherFiles" :view="true">
|
||||
</file-upload>
|
||||
<span v-else>暂无</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动总结" name="4" v-if="!viewData.isEnrollSystem">
|
||||
<el-form ref="form" label-width="120px">
|
||||
<el-form-item prop="activitySummary" label="活动总结">
|
||||
{{ viewData.activitySummary }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="审核信息" name="5" v-if="viewData.auditId">
|
||||
<el-form ref="form" label-width="120px">
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.audit.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.audit.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见:">
|
||||
{{ viewData.audit.auditOpinion }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="handle" :label="label" name="999">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员:">
|
||||
{{ viewData.audit.username }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间:">
|
||||
{{ viewData.audit.auditTime }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核意见:">
|
||||
{{ viewData.audit.auditOpinion }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="handle" :label="label" name="999">
|
||||
<slot name="handle"></slot>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '审核'
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userData: [],
|
||||
viewData: {},
|
||||
loading: true,
|
||||
search: '',
|
||||
tableKey: '',
|
||||
activeName: '1',
|
||||
userColumns: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
},
|
||||
methods: {
|
||||
hasPane(name) {
|
||||
if (!this.handle) {
|
||||
return true
|
||||
}
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async doExport() {
|
||||
window.open("/platform/activity/info/mange/doExportUser?id=" + this.viewData.id)
|
||||
},
|
||||
async userChange() {
|
||||
if (this.search) {
|
||||
const {data} = await $.get("/platform/activity/info/mange/searchTissueUser", {
|
||||
id: this.viewData.id,
|
||||
search: this.search
|
||||
})
|
||||
this.userData = data
|
||||
}
|
||||
},
|
||||
async getInfo(id) {
|
||||
this.userColumns = [{prop: 'userName', label: '姓名'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系方式'},
|
||||
{prop: 'unitName', label: '所属单位'},
|
||||
{prop: 'unionName', label: '所属工会'}]
|
||||
this.loading = true
|
||||
const {data} = await $.get("/platform/activity/info/mange/findOne", {id})
|
||||
this.loading = false
|
||||
if (data) {
|
||||
if (data.needSign) {
|
||||
this.userColumns.push({prop: 'isSign', label: '是否签到'})
|
||||
this.userColumns.push({prop: 'signTime', label: '签到时间'})
|
||||
props: {
|
||||
handle: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: "审核"
|
||||
}
|
||||
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.initMap()
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$notify.error({title: '错误', message: '获取信息失败'});
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
let marker = null
|
||||
this.$nextTick(() => {
|
||||
let map = new AMap.Map("signMap", {
|
||||
resizeEnable: true,
|
||||
center: [118.640081, 32.082496],
|
||||
zoom: 16
|
||||
});
|
||||
data() {
|
||||
return {
|
||||
userData: [],
|
||||
viewData: {},
|
||||
loading: true,
|
||||
search: "",
|
||||
tableKey: "",
|
||||
activeName: "1",
|
||||
userColumns: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"file-upload": httpVueLoader("/components/plugins/FileUpload.vue")
|
||||
},
|
||||
methods: {
|
||||
hasPane(name) {
|
||||
if (!this.handle) {
|
||||
return true
|
||||
}
|
||||
return this.panes.includes(name)
|
||||
},
|
||||
async doExport() {
|
||||
window.open("/platform/activity/info/mange/doExportUser?id=" + this.viewData.id)
|
||||
},
|
||||
async userChange() {
|
||||
if (this.search) {
|
||||
const { data } = await $.get("/platform/activity/info/mange/searchTissueUser", {
|
||||
id: this.viewData.id,
|
||||
search: this.search
|
||||
})
|
||||
this.userData = data
|
||||
}
|
||||
},
|
||||
async getInfo(id) {
|
||||
this.userColumns = [{ prop: "userName", label: "姓名" },
|
||||
{ prop: "loginName", label: "工号" },
|
||||
{ prop: "sex", label: "性别" },
|
||||
{ prop: "mobile", label: "联系方式" },
|
||||
{ prop: "unitName", label: "所属单位" },
|
||||
{ prop: "unionName", label: "所属工会" }]
|
||||
this.loading = true
|
||||
const { data } = await $.get("/platform/activity/info/mange/findOne", { id })
|
||||
this.loading = false
|
||||
if (data) {
|
||||
if (data.needSign) {
|
||||
this.userColumns.push({ prop: "isSign", label: "是否签到" })
|
||||
this.userColumns.push({ prop: "signTime", label: "签到时间" })
|
||||
}
|
||||
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.initMap()
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
} else {
|
||||
this.viewData = {}
|
||||
this.$notify.error({ title: "错误", message: "获取信息失败" })
|
||||
}
|
||||
},
|
||||
initMap() {
|
||||
let marker = null
|
||||
this.$nextTick(() => {
|
||||
let map = new AMap.Map("signMap", {
|
||||
resizeEnable: true,
|
||||
center: [118.640081, 32.082496],
|
||||
zoom: 16
|
||||
})
|
||||
|
||||
if (this.viewData.location && Array.isArray(this.viewData.location)) {
|
||||
const lng = parseFloat(this.viewData.location[0])
|
||||
const lat = parseFloat(this.viewData.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
});
|
||||
marker.setMap(map);
|
||||
map.setZoomAndCenter(18, [lng, lat])
|
||||
if (this.viewData.location && Array.isArray(this.viewData.location)) {
|
||||
const lng = parseFloat(this.viewData.location[0])
|
||||
const lat = parseFloat(this.viewData.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
marker.setMap(map)
|
||||
map.setZoomAndCenter(18, [lng, lat])
|
||||
}
|
||||
map.on("click", (e) => {
|
||||
console.log(e)
|
||||
if (marker) {
|
||||
marker.setMap(null)
|
||||
marker = null
|
||||
}
|
||||
marker = new AMap.Marker({
|
||||
position: [e.lnglat.getLng(), e.lnglat.getLat()],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
marker.setMap(map)
|
||||
this.formData.location = []
|
||||
this.formData.location.push(e.lnglat.getLng())
|
||||
this.formData.location.push(e.lnglat.getLat())
|
||||
})
|
||||
})
|
||||
}
|
||||
map.on('click', (e) => {
|
||||
console.log(e)
|
||||
if (marker) {
|
||||
marker.setMap(null)
|
||||
marker = null
|
||||
}
|
||||
marker = new AMap.Marker({
|
||||
position: [e.lnglat.getLng(), e.lnglat.getLat()],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
marker.setMap(map)
|
||||
this.formData.location = []
|
||||
this.formData.location.push(e.lnglat.getLng())
|
||||
this.formData.location.push(e.lnglat.getLat())
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.item-center {
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
margin-right: 110px;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
margin-right: 110px;
|
||||
}
|
||||
|
||||
.item-center .el-form-item__content {
|
||||
font-size: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/font/iconfont.js"></script>
|
||||
<script type="text/javascript" src="${base!}/assets/platform/plugins/wp-upload-vue/js/wpupload.js"></script>
|
||||
|
||||
<!--axios-->
|
||||
<script src="${base!}/assets/platform/plugins/axios/axios.js"></script>
|
||||
|
||||
<!-- import JavaScript -->
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/index.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/element-ui/lib/i18n/${lang,escape}.js"></script>
|
||||
@@ -146,6 +149,8 @@
|
||||
window.viewImage = viewImage;
|
||||
Vue.prototype.$viewImage = viewImage
|
||||
Vue.prototype.$auth = commonUtil.authService()
|
||||
Vue.prototype.$axios = commonUtil.axiosService()
|
||||
Vue.prototype.$downLoad = commonUtil.downLoadService
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -61,11 +61,7 @@
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="活动内容" v-if="o.projectTypeCode!=='50004'">
|
||||
<template #label>
|
||||
<span style="white-space: pre-line">
|
||||
{{o.activityContent}}
|
||||
</span>
|
||||
</template>
|
||||
<span @click.stop="showActivityInfo(o.activityContent)" style="color: #0a84ff">点我查看详情</span>
|
||||
</van-cell>
|
||||
<van-cell title="签到点位" v-if="o.needSign">
|
||||
<template #label>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
const self_mixin = {
|
||||
const self_mixin_h5 = {
|
||||
data() {
|
||||
return {
|
||||
//已报名人数
|
||||
hasRegUserNum: 0,
|
||||
unionId: null,
|
||||
unionLimitNum: 0,
|
||||
isRegisterFull: false
|
||||
isRegisterFull: false,
|
||||
user: JSON.parse(window.sessionStorage.getItem('user'))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -15,7 +16,7 @@ const self_mixin = {
|
||||
resp.data.location = JSON.parse(resp.data.location)
|
||||
resp.data.unionUserNumberLimit = JSON.parse(resp.data.unionUserNumberLimit)
|
||||
this.o = resp.data
|
||||
this.unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
|
||||
this.unionId = this.user.union.id
|
||||
if (!this.unionId) {
|
||||
this.$toast.fail('您的所属工会信息缺失,请联系管理员')
|
||||
return
|
||||
@@ -52,8 +53,9 @@ const self_mixin = {
|
||||
zoomEnable: true,
|
||||
dragEnable: false,
|
||||
resizeEnable: true,
|
||||
center: [114.402582, 30.521378],
|
||||
zoom: 16
|
||||
center: [119.743667, 30.216618],
|
||||
zoom: 16,
|
||||
scrollWheel: true,
|
||||
});
|
||||
|
||||
if (this.o.location && Array.isArray(this.o.location)) {
|
||||
@@ -61,7 +63,7 @@ const self_mixin = {
|
||||
const lat = parseFloat(this.o.location[1])
|
||||
marker = new AMap.Marker({
|
||||
position: [lng, lat],
|
||||
offset: new AMap.Pixel(-13, -30)
|
||||
//offset: new AMap.Pixel(-13, -30)
|
||||
})
|
||||
map.add(marker)
|
||||
// marker.setMap(map);
|
||||
@@ -127,4 +129,4 @@ const self_mixin = {
|
||||
return s.toFixed(2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ layout("/mobile/platform.html"){
|
||||
if (o.projectTypeCode === '50004') {
|
||||
pjaxReplace('/mobile/activity/myActivity/goMyProject?id=' + o.id)
|
||||
} else {
|
||||
pjaxReplace('/mobile/activity/unionActivity/goReg?id=' + o.id + '&signUpMethod=' + o.signUpMethod)
|
||||
pjaxReplace('/mobile/activity/myActivity/goSign?id=' + o.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -9,22 +9,43 @@ layout("/mobile/platform.html"){
|
||||
height: 200px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.remark-content{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: calc(100vh - 46px - 44px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.remark-content *{
|
||||
max-width: 100%!important;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="签到" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<van-nav-bar title="签到" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/activity/unionActivity')"></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px" v-if="o.needSign">
|
||||
<van-button
|
||||
:disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf() || isSign"
|
||||
:disabled="isSign"
|
||||
@click="doSign()" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<van-popup class="joinPopup" position="right" v-model:show="showActivityInfoPopup">
|
||||
<van-nav-bar @click-left="showActivityInfoPopup = false" fixed left-arrow placeholder title="活动内容"></van-nav-bar>
|
||||
<div class="remark-content" v-html="activityContent" @click="remarkClick"></div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -36,15 +57,29 @@ layout("/mobile/platform.html"){
|
||||
let geolocation = null
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
mixins: [mobileMixins, self_mixin_h5],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
isSign: null
|
||||
isSign: null,
|
||||
|
||||
activityContent: '',
|
||||
showActivityInfoPopup: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remarkClick(event){
|
||||
//如果点击的是图片
|
||||
if(event.target.tagName === 'IMG'){
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
},
|
||||
showActivityInfo(activityContent){
|
||||
this.activityContent = ''
|
||||
this.activityContent = activityContent
|
||||
this.showActivityInfoPopup = true
|
||||
},
|
||||
async getSignStatus() {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/isSign', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
@@ -52,6 +87,12 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
async doSign() {
|
||||
const loading1 = this.$toast.loading({
|
||||
message: '正在获取您的位置...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
geolocation.getCurrentPosition(async (status, result) => {
|
||||
if (status !== 'complete') {
|
||||
this.$toast.fail('定位失败!')
|
||||
@@ -67,10 +108,21 @@ layout("/mobile/platform.html"){
|
||||
const distance = this.getMapDistance(params)
|
||||
console.log(distance)
|
||||
console.log(this.o.rangeMeter)
|
||||
|
||||
loading1.close()
|
||||
if (!moment().isBetween(moment(this.o.signStartTime), moment(this.o.signEndTime))) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '未到签到时间<br/>签到开始时间:' + this.o.signStartTime + '<br/>签到结束时间:' + this.o.signEndTime,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (distance > this.o.rangeMeter) {
|
||||
this.$toast('距离活动打卡点还有' + distance + '米')
|
||||
return
|
||||
}
|
||||
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要签到吗?',
|
||||
@@ -83,23 +135,24 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/singleSignUp', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
await this.getSignStatus()
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
async created() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.activityId = id
|
||||
this.getActivityInfo()
|
||||
this.getSignStatus()
|
||||
await this.getActivityInfo()
|
||||
await this.getSignStatus()
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -107,4 +160,4 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -9,6 +9,23 @@ layout("/mobile/platform.html"){
|
||||
/*height: 200px;*/
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.remark-content{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: calc(100vh - 46px - 44px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.remark-content *{
|
||||
max-width: 100%!important;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
@@ -41,7 +58,7 @@ layout("/mobile/platform.html"){
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
<!--<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="isRegister && moment().valueOf() < moment(o.endTime).valueOf() && moment().valueOf() > moment(o.startTime).valueOf()">
|
||||
<van-button
|
||||
:color="themeColor"
|
||||
@@ -50,25 +67,45 @@ layout("/mobile/platform.html"){
|
||||
type="info">
|
||||
{{isSign?'签到成功':'立即签到'}}
|
||||
</van-button>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<van-popup class="joinPopup" position="right" v-model:show="showActivityInfoPopup">
|
||||
<van-nav-bar @click-left="showActivityInfoPopup = false" fixed left-arrow placeholder title="活动内容"></van-nav-bar>
|
||||
<div class="remark-content" v-html="activityContent" @click="remarkClick"></div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
mixins: [mobileMixins, self_mixin_h5],
|
||||
data() {
|
||||
return {
|
||||
activityId: '',
|
||||
o: {},
|
||||
tagCloseable: true,
|
||||
isRegister: false,
|
||||
isSign: false
|
||||
isSign: false,
|
||||
|
||||
activityContent: '',
|
||||
showActivityInfoPopup: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remarkClick(event){
|
||||
//如果点击的是图片
|
||||
if(event.target.tagName === 'IMG'){
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
},
|
||||
showActivityInfo(activityContent){
|
||||
console.log(activityContent)
|
||||
this.activityContent = ''
|
||||
this.activityContent = activityContent
|
||||
this.showActivityInfoPopup = true
|
||||
},
|
||||
async isRegisterForMe() {
|
||||
const resp = await $.get('/mobile/activity/unionActivity/isRegisterForMe', {activityId: this.activityId})
|
||||
if (resp.code === 0) {
|
||||
@@ -93,15 +130,21 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
await this.getHasRegUserNum()
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleRegister', {activityId: this.activityId})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success(resp.msg)
|
||||
loading.close()
|
||||
pjaxReplace('/mobile/activity/unionActivity')
|
||||
}, 500)
|
||||
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已报名成功,请按时参加活动哦',
|
||||
}).then(() => {
|
||||
window.location.reload()
|
||||
}).catch(() => {
|
||||
window.location.reload()
|
||||
})
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -110,23 +153,31 @@ layout("/mobile/platform.html"){
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success(resp.msg)
|
||||
loading.close()
|
||||
pjaxReplace('/mobile/activity/unionActivity')
|
||||
}, 1000)
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
}).then(() => {
|
||||
window.location.reload()
|
||||
}).catch(() => {})
|
||||
// setTimeout(() => {
|
||||
// this.$toast.success(resp.msg)
|
||||
// pjaxReplace('/mobile/activity/unionActivity')
|
||||
// }, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -39,10 +39,27 @@ layout("/mobile/platform.html"){
|
||||
.van-search__action {
|
||||
background-color: #edf0ff
|
||||
}
|
||||
|
||||
.remark-content{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: calc(100vh - 46px - 44px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.remark-content *{
|
||||
max-width: 100%!important;
|
||||
}
|
||||
|
||||
.joinPopup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f6f7f9;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="title" @click-left="history.back()" fixed left-arrow
|
||||
<van-nav-bar :title="title" @click-left="pjaxReplace('/mobile/activity/unionActivity')" fixed left-arrow
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<!--#include("/mobile/activity/unionActivity/common/activityInfo.html"){}#-->
|
||||
@@ -51,47 +68,40 @@ layout("/mobile/platform.html"){
|
||||
<van-cell class="regCell" title="报名人员">
|
||||
<template #label>
|
||||
<div>
|
||||
<span v-if="o.userNumberLimit===1">
|
||||
本活动限制总报名人数:({{o.totalUserNumberLimit}})人
|
||||
</span>
|
||||
<span v-if="o.userNumberLimit===1">本活动限制总报名人数:({{o.totalUserNumberLimit}})人</span>
|
||||
<span v-else-if="o.userNumberLimit===2">
|
||||
当前分工会报名限额 <span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
当前基层工会报名限额
|
||||
<span style="color: orange">({{o.limitUnion.limitNum}})人</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt5" v-loading="tagCloseable">
|
||||
<div v-if="registerList && registerList.length>0">
|
||||
<template v-for="item in registerList">
|
||||
<van-tag :closeable="tagCloseable" :color="themeColor"
|
||||
@close="removeRegUser(item)"
|
||||
size="medium"
|
||||
type="primary">
|
||||
<van-tag :closeable="tagCloseable" :color="themeColor" @close="removeRegUser(item)" size="medium" type="primary">
|
||||
{{item.userName}}
|
||||
</van-tag>
|
||||
</template>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="text-align: center;margin-top: 20px;">
|
||||
无报名人员
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 20px">无报名人员</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt5" style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="openUserActionSheet" size="mini"
|
||||
type="info" v-if="tagCloseable">选择报名人员
|
||||
</van-button>
|
||||
<div
|
||||
class="mt5"
|
||||
style="text-align: right"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()"
|
||||
>
|
||||
<van-button :color="themeColor" @click="openUserActionSheet" size="mini" type="info" v-if="tagCloseable">选择报名人员</van-button>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-action-sheet class="userActionPopup" title="选择报名人员" v-model="userActionSheet">
|
||||
<van-search @search="onSearchUser" placeholder="请输入姓名搜索" show-action
|
||||
v-model="searchKey">
|
||||
<van-search @search="onSearchUser" placeholder="请输入姓名搜索" show-action v-model="searchKey">
|
||||
<template #action>
|
||||
<div @click="onSearchUser(searchKey)">搜索</div>
|
||||
</template>
|
||||
|
||||
</van-search>
|
||||
|
||||
<!-- <div class="van-hairline--bottom">-->
|
||||
@@ -101,50 +111,36 @@ layout("/mobile/platform.html"){
|
||||
<van-loading size="24px" vertical>搜索中...</van-loading>
|
||||
</template>
|
||||
|
||||
<div class="van-action-sheet__content mt5"
|
||||
v-else-if="searchUserList && searchUserList.length>0">
|
||||
|
||||
<div class="van-action-sheet__content mt5" v-else-if="searchUserList && searchUserList.length>0">
|
||||
<template>
|
||||
<template v-for="item in searchUserList"
|
||||
v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<template v-for="item in searchUserList" v-if="!registerList.map(v=>v.id).includes(item.id)">
|
||||
<button @click="searchUserAdd(item)" class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</button>
|
||||
</template>
|
||||
<!--<van-empty description="没有更多了" style="position:absolute;height: 70%"
|
||||
<!--<van-empty description="没有更多了"
|
||||
v-else></van-empty>-->
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<van-empty description="暂无数据" style="position:absolute;height: 70%"
|
||||
v-else-if="searchUserList.length===0"></van-empty>
|
||||
<van-empty description="暂无数据" v-else-if="searchUserList.length===0"></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()">
|
||||
<van-button :color="themeColor" @click="doSave()" block style="border-radius: 10px"
|
||||
type="info"
|
||||
v-if="tagCloseable">
|
||||
提 交
|
||||
</van-button>
|
||||
<div
|
||||
style="margin: 20px 20px 10px 20px"
|
||||
v-if="moment(o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.applyEndTime).valueOf()"
|
||||
>
|
||||
<van-button :color="themeColor" @click="doSave()" block style="border-radius: 10px" type="info" v-if="tagCloseable">提 交</van-button>
|
||||
<template v-else="!tagCloseable">
|
||||
<van-button :color="themeColor" @click="tagCloseable = true"
|
||||
block style="border-radius: 10px"
|
||||
type="info">
|
||||
修 改
|
||||
</van-button>
|
||||
<van-button
|
||||
@click="doCancel"
|
||||
block color="red" style="border-radius: 10px;margin-top: 10px"
|
||||
type="info">
|
||||
取消报名
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click="tagCloseable = true" block style="border-radius: 10px" type="info">修 改</van-button>
|
||||
<van-button @click="doCancel" block color="red" style="border-radius: 10px; margin-top: 10px" type="info">取消报名</van-button>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
<van-popup class="joinPopup" position="right" v-model:show="showActivityInfoPopup">
|
||||
<van-nav-bar @click-left="showActivityInfoPopup = false" fixed left-arrow placeholder title="活动内容"></van-nav-bar>
|
||||
<div class="remark-content" v-html="activityContent" @click="remarkClick"></div>
|
||||
</van-popup>
|
||||
|
||||
<!-- <div style="margin: 20px 20px 10px 20px" v-if="tagCloseable">-->
|
||||
<!-- <van-button-->
|
||||
<!-- :disabled="moment().valueOf() > moment(o.endTime).valueOf() || moment().valueOf() < moment(o.startTime).valueOf()"-->
|
||||
@@ -160,45 +156,58 @@ layout("/mobile/platform.html"){
|
||||
<!--#include("/mobile/activity/unionActivity/common/initMap.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, self_mixin],
|
||||
el: "#app",
|
||||
mixins: [mobileMixins, self_mixin_h5],
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
userId: "${@shiro.getPrincipalProperty('id')}",
|
||||
userName: "${@shiro.getPrincipalProperty('username')}",
|
||||
activityId: '',
|
||||
activityId: "",
|
||||
o: {},
|
||||
registerList: [],
|
||||
addRegisterList: [],
|
||||
userActionSheet: false,
|
||||
searchKey: '',
|
||||
searchKey: "",
|
||||
searchUserList: [],
|
||||
tagCloseable: true,
|
||||
searchLoading: false
|
||||
searchLoading: false,
|
||||
|
||||
activityContent: '',
|
||||
showActivityInfoPopup: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remarkClick(event){
|
||||
//如果点击的是图片
|
||||
if(event.target.tagName === 'IMG'){
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
},
|
||||
showActivityInfo(activityContent){
|
||||
console.log(activityContent)
|
||||
this.activityContent = ''
|
||||
this.activityContent = activityContent
|
||||
this.showActivityInfoPopup = true
|
||||
},
|
||||
async doCancel() {
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要取消报名吗?',
|
||||
title: "提示",
|
||||
message: "您确认要取消报名吗?"
|
||||
})
|
||||
const loading = this.$toast.loading({
|
||||
message: '取消中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSingleCancelRegister', {activityId: this.activityId})
|
||||
if (confirm === "confirm") {
|
||||
const loading = this.$toast.loading({
|
||||
message: "取消中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/mobile/activity/unionActivity/doSingleCancelRegister", { activityId: this.activityId })
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.history.back()
|
||||
}, 400)
|
||||
window.location.reload()
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
@@ -206,10 +215,10 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
async getRegisterUser() {
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
const resp = await $.get("/mobile/activity/myActivity/selectRegisterList", { activityId: this.activityId })
|
||||
if (resp.code === 0) {
|
||||
if (this.o.signUpMethod === 3) {
|
||||
this.registerList = resp.data.filter(v => v.applyUserId === this.userId)
|
||||
this.registerList = resp.data.filter((v) => v.applyUserId === this.userId)
|
||||
} else {
|
||||
this.registerList = resp.data
|
||||
}
|
||||
@@ -220,9 +229,10 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
openUserActionSheet() {
|
||||
this.searchKey = ''
|
||||
this.searchKey = ""
|
||||
this.searchUserList = []
|
||||
this.userActionSheet = true
|
||||
this.onSearchUser("1")
|
||||
},
|
||||
async onSearchUser(val) {
|
||||
if (!val) {
|
||||
@@ -230,21 +240,20 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
this.searchLoading = true
|
||||
const resp = await $.get('/mobile/activity/unionActivity/searchNoRegisterUser', {
|
||||
const resp = await $.get("/mobile/activity/unionActivity/searchNoRegisterUser", {
|
||||
activityId: this.activityId,
|
||||
searchKey: val
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.searchLoading = false
|
||||
this.searchUserList = resp.data.list
|
||||
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
},
|
||||
searchUserAdd(item) {
|
||||
const {id, userName} = item
|
||||
this.registerList.push({id, userName})
|
||||
const { id, userName } = item
|
||||
this.registerList.push({ id, userName })
|
||||
this.$toast.success("添加成功")
|
||||
},
|
||||
async removeRegUser(item) {
|
||||
@@ -253,46 +262,42 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确认要移除吗?',
|
||||
title: "提示",
|
||||
message: "您确认要移除吗?"
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const index = this.registerList.findIndex(v => v.id === item.id)
|
||||
if (confirm === "confirm") {
|
||||
const index = this.registerList.findIndex((v) => v.id === item.id)
|
||||
this.registerList.splice(index, 1)
|
||||
}
|
||||
},
|
||||
//保存
|
||||
async doSave() {
|
||||
if (this.registerList.length === 0) {
|
||||
this.$toast('请添加报名人员后再提交!')
|
||||
this.$toast("请添加报名人员后再提交!")
|
||||
return
|
||||
}
|
||||
if (this.o.signUpMethod === 3) {
|
||||
if (this.registerList.length !== this.o.teamNum) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是双人报名模式您需要报名' + this.o.teamNum + '人!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
title: "温馨提示",
|
||||
message: "此活动是双人报名模式您需要报名" + this.o.teamNum + "人!"
|
||||
}).then(() => {})
|
||||
return
|
||||
}
|
||||
if (!this.registerList.map(v => v.id).includes(this.userId)) {
|
||||
if (!this.registerList.map((v) => v.id).includes(this.userId)) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此活动是组队模式请您找' + this.o.teamNum + '朋友一起报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
title: "温馨提示",
|
||||
message: "此活动是组队模式请您找" + this.o.teamNum + "朋友一起报名!"
|
||||
}).then(() => {})
|
||||
return
|
||||
}
|
||||
// await this.getRegisterUser()
|
||||
const resp = await $.get('/mobile/activity/myActivity/selectRegisterList', {activityId: this.activityId})
|
||||
const resp = await $.get("/mobile/activity/myActivity/selectRegisterList", { activityId: this.activityId })
|
||||
this.addRegisterList = resp.data
|
||||
let arr = []
|
||||
if (this.addRegisterList && this.addRegisterList.length > 0) {
|
||||
this.addRegisterList.forEach(v => {
|
||||
this.registerList.forEach(r => {
|
||||
this.addRegisterList.forEach((v) => {
|
||||
this.registerList.forEach((r) => {
|
||||
if (v.id === r.id && v.applyUserId !== this.userId) {
|
||||
arr.push(r.userName)
|
||||
}
|
||||
@@ -302,11 +307,9 @@ layout("/mobile/platform.html"){
|
||||
|
||||
if (arr && arr.length > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '【' + arr.toString() + '】已成功报名您无需再报名!',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
title: "温馨提示",
|
||||
message: "【" + arr.toString() + "】已成功报名您无需再报名!"
|
||||
}).then(() => {})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -319,41 +322,40 @@ layout("/mobile/platform.html"){
|
||||
});
|
||||
return
|
||||
}*/
|
||||
|
||||
}
|
||||
let message = ''
|
||||
let message = ""
|
||||
if (this.o.needSign) {
|
||||
message = '此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!'
|
||||
message = "此活动开启了签到,需要您活动当天前往签到点位核实活动报名人员后进行签到!"
|
||||
}
|
||||
const confirm = await this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: message + '您确认要报名吗?',
|
||||
title: "提示",
|
||||
message: message + "您确认要报名吗?"
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
if (confirm === "confirm") {
|
||||
const loading = this.$toast.loading({
|
||||
message: '报名中...',
|
||||
message: "报名中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const params = {
|
||||
activityId: this.activityId,
|
||||
personIds: JSON.stringify(this.registerList.map(v => v.id))
|
||||
personIds: JSON.stringify(this.registerList.map((v) => v.id))
|
||||
}
|
||||
const resp = await $.post('/mobile/activity/unionActivity/doSaveUnionRegister', params)
|
||||
|
||||
const resp = await $.post("/mobile/activity/unionActivity/doSaveUnionRegister", params)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
await this.getRegisterUser()
|
||||
await this.getHasRegUserNum()
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.success(resp.msg)
|
||||
}, 1000)
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
loading.close()
|
||||
this.$toast.fail(resp.msg)
|
||||
}, 500)
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,14 +367,12 @@ layout("/mobile/platform.html"){
|
||||
await this.getActivityInfo()
|
||||
await this.getRegisterUser()
|
||||
if (this.o.signUpMethod === 3 && this.registerList.length === 0) {
|
||||
this.registerList.push({id: this.userId, userName: this.userName})
|
||||
this.registerList.push({ id: this.userId, userName: this.userName })
|
||||
}
|
||||
this.title = (this.o.signUpMethod === 2 ? '分工会报名' : '组队报名')
|
||||
this.title = this.o.signUpMethod === 2 ? "基层工会报名" : "组队报名"
|
||||
if (moment(this.o.applyStartTime).valueOf() < moment().valueOf() && moment().valueOf() > moment(this.o.applyEndTime).valueOf()) {
|
||||
this.$toast.fail("不在活动范围内")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/vant.css">
|
||||
|
||||
<script>
|
||||
window._AMapSecurityConfig = {
|
||||
securityJsCode: "4fa1e1aeabba7eb9518129cf57ab17c1",
|
||||
};
|
||||
</script>
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vant/vant.js"></script>
|
||||
|
||||
@@ -48,7 +54,7 @@
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script src="${base!}/assets/platform/js/scannerQrCodeJs.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="https://webapi.amap.com/maps?v=2.0&key=6ab3452804ba35050880b5e047436853&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||
src="https://webapi.amap.com/maps?v=2.0&key=57f0d098ba1b881ecc436c4cfd23bbbf&plugin=AMap.PolyEditor,AMap.Geolocation"></script>
|
||||
|
||||
<!--字典混入-->
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
@@ -11,8 +11,8 @@ layout("/mobile/platform.html"){
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
background: #ffffff;
|
||||
/*margin: 10px 0;*/
|
||||
margin-bottom: 10px;
|
||||
margin: 0 0 10px 0 !important;
|
||||
/*margin-bottom: 10px;*/
|
||||
color: var(--color-primary);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -80,7 +80,7 @@ layout("/mobile/platform.html"){
|
||||
<h2 class="title">{{ activity.title }}</h2>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="!answerRecord.isFinish">
|
||||
<div style="margin-top: 50px" v-if="!answerRecord.isFinish">
|
||||
<div v-for="(subject, index) in subjects" :key="index" class="subject">
|
||||
<p>{{index+1}}、{{ subject.title }}</p>
|
||||
<div class="tag">
|
||||
@@ -161,8 +161,15 @@ layout("/mobile/platform.html"){
|
||||
this.activity = res.data.activity
|
||||
this.subjects = res.data.subjects
|
||||
this.answerRecordId = res.data.answerRecordId
|
||||
this.checkGroupPermission()
|
||||
// this.checkGroupPermission()
|
||||
this.getAnswerRecord()
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: res.msg,
|
||||
}).then(() => {
|
||||
pjaxReplace("/mobile/index")
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -307,8 +314,7 @@ layout("/mobile/platform.html"){
|
||||
|
||||
//自动提交
|
||||
autoSubmit(loading = null) {
|
||||
$
|
||||
.post("/platform/h5/qsv/quiz/submitAnswer", {
|
||||
$.post("/platform/h5/qsv/quiz/submitAnswer", {
|
||||
answer: JSON.stringify({
|
||||
activityId: this.id,
|
||||
answerRecordId: this.answerRecordId,
|
||||
@@ -324,35 +330,35 @@ layout("/mobile/platform.html"){
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||
// this.getAnswerRecord()
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
.always(() => {
|
||||
if (loading) {
|
||||
loading.clear()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async checkGroupPermission() {
|
||||
const groupId = this.activity.groupId
|
||||
if (groupId) {
|
||||
const { code, data } = await $.post("/open/common/checkGroupPermission", { groupId })
|
||||
if (code === 0) {
|
||||
if (!data) {
|
||||
this.$dialog
|
||||
.alert({
|
||||
title: "提示",
|
||||
message: "您没有权限参与"
|
||||
})
|
||||
.then(() => {
|
||||
location.back()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// async checkGroupPermission() {
|
||||
// const groupId = this.activity.groupId
|
||||
// if (groupId) {
|
||||
// const { code, data } = await $.post("/open/common/checkGroupPermission", { groupId })
|
||||
// if (code === 0) {
|
||||
// if (!data) {
|
||||
// this.$dialog
|
||||
// .alert({
|
||||
// title: "提示",
|
||||
// message: "您没有权限参与"
|
||||
// })
|
||||
// .then(() => {
|
||||
// location.back()
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
},
|
||||
created() {
|
||||
if (this.timerInterval) {
|
||||
|
||||
@@ -10,6 +10,7 @@ layout("/mobile/platform.html"){
|
||||
.container .title {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
margin: 0 !important;
|
||||
background: #ffffff;
|
||||
color: var(--color-primary);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
@@ -168,7 +169,7 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<div style="margin-top: 50px">
|
||||
<div v-for="(subject, index) in subjects" :key="index" class="subject">
|
||||
<p>{{index+1}}、{{ subject.title }}</p>
|
||||
<div class="tag">
|
||||
@@ -208,11 +209,12 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
|
||||
<div class="button-control">
|
||||
<van-button v-if="canAgainQuestion" type="primary" @click="againQuestion" block>重新答题</van-button>
|
||||
<van-button type="primary" @click="openHistory" block>查看全部答题记录</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-action-sheet v-model="historyShow" title="历史记录">
|
||||
<van-action-sheet v-model="historyShow" title="历史记录" >
|
||||
<div class="history-list">
|
||||
<div v-for="item in historyList" class="history-item">
|
||||
<div class="history-header">
|
||||
@@ -239,7 +241,9 @@ layout("/mobile/platform.html"){
|
||||
activity: {},
|
||||
list: [],
|
||||
historyShow: false,
|
||||
historyList: []
|
||||
historyList: [],
|
||||
|
||||
canAgainQuestion: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -268,12 +272,26 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 重新答题
|
||||
*/
|
||||
againQuestion() {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确定要重新答题吗?',
|
||||
}).then(() => {
|
||||
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id)
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
getAnswerResult() {
|
||||
$.post("/platform/h5/qsv/quiz/answerResult", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.subjects = res.data.subjects
|
||||
this.activity = res.data.activity
|
||||
this.getAnswerRecord()
|
||||
this.getHistoryQuestion()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -305,16 +323,19 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
historyBack() {
|
||||
pjaxReplace('/platform/h5/qsv')
|
||||
},
|
||||
|
||||
openHistory() {
|
||||
this.historyShow = true
|
||||
},
|
||||
getHistoryQuestion() {
|
||||
$.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activity.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.historyList = res.data
|
||||
if (this.activity.maxAttempts > res.data.length) {
|
||||
this.canAgainQuestion = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -169,14 +169,14 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12" :xl="12" :xs="24">
|
||||
<!--<el-col :lg="12" :xl="12" :xs="24">
|
||||
<el-form-item label="活动人数" prop="peopleNum">
|
||||
<el-input-number :disabled="[1,2].includes(formData.signUpMethod)"
|
||||
maxlength="10" style="width: 100%"
|
||||
placeholder="请填写活动人数"
|
||||
v-model="formData.peopleNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :lg="12" :xl="12" :xs="24">
|
||||
<el-form-item label="参加人员范围" prop="groupId">
|
||||
@@ -202,6 +202,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="40">
|
||||
|
||||
<!-- <el-col :lg="12" :xl="12" :xs="12">
|
||||
<el-form-item label="是否推送移动端" prop="isPushHome">
|
||||
@@ -401,6 +404,19 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" v-if="formData.needSign">
|
||||
<el-form-item label="签到时间" prop="signTime">
|
||||
<el-date-picker
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.signTime"
|
||||
value-format="yyyy-MM-dd HH:mm">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-show="formData.needSign">
|
||||
<el-form-item label="活动签到点位">
|
||||
@@ -882,7 +898,12 @@
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.type = this.pageForm.type
|
||||
formData.apply_type = 1
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
const {time, applyTime2, plannedDate, signTime} = formData
|
||||
if (signTime && signTime.length) {
|
||||
formData.signStartTime = signTime[0]
|
||||
formData.signEndTime = signTime[1]
|
||||
formData.signTime = undefined
|
||||
}
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
@@ -945,7 +966,12 @@
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
formData.type = this.pageForm.type
|
||||
formData.apply_type = 1
|
||||
const {time, applyTime2, plannedDate} = formData
|
||||
const {time, applyTime2, plannedDate, signTime} = formData
|
||||
if (signTime && signTime.length) {
|
||||
formData.signStartTime = signTime[0]
|
||||
formData.signEndTime = signTime[1]
|
||||
formData.signTime = undefined
|
||||
}
|
||||
if (applyTime2 && applyTime2.length) {
|
||||
formData.applyStartTime = applyTime2[0]
|
||||
formData.applyEndTime = applyTime2[1]
|
||||
@@ -986,9 +1012,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
async init() {
|
||||
this.delNotesList = []
|
||||
@@ -1028,6 +1051,7 @@
|
||||
if (data.otherFiles && data.otherFiles.length > 0) data.otherFiles = JSON.parse(data.otherFiles)
|
||||
if (data.applyStartTime) data.applyTime2 = [data.applyStartTime, data.applyEndTime]
|
||||
if (data.startTime) data.time = [data.startTime, data.endTime]
|
||||
if (data.signStartTime) data.signTime = [data.signStartTime, data.signEndTime]
|
||||
if (data.startPlannedDate) data.plannedDate = [data.startPlannedDate, data.endPlannedDate]
|
||||
this.userData = clone(data.tissuePersonList)
|
||||
data.unionUserNumberLimit = JSON.parse(data.unionUserNumberLimit)
|
||||
@@ -1040,6 +1064,11 @@
|
||||
if (this.formData.needSign) {
|
||||
await this.initMap()
|
||||
}
|
||||
|
||||
if (this.formData.userNumberLimit === 2) {
|
||||
this.calSummaryCount()
|
||||
}
|
||||
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
@@ -1049,7 +1078,7 @@
|
||||
// if (map == null) {
|
||||
map = new AMap.Map("signMap", {
|
||||
resizeEnable: true,
|
||||
center: [118.640081, 32.082496],
|
||||
center: [119.743667, 30.216618],
|
||||
zoom: 16
|
||||
})
|
||||
// }
|
||||
|
||||
@@ -148,7 +148,10 @@
|
||||
通知
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'openCode',row}">
|
||||
二维码
|
||||
报名二维码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'openSignCode',row}">
|
||||
签到二维码
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item :command="{type:'export',row}">
|
||||
导出人员名单
|
||||
@@ -260,6 +263,8 @@
|
||||
this.sendMsg(row)
|
||||
} else if (type === 'openCode') {
|
||||
this.openCode(row)
|
||||
} else if (type === 'openSignCode') {
|
||||
this.openSignCode(row)
|
||||
} else if (type === 'export') {
|
||||
location.href = "/platform/activity/info/mange/export?id=" + row.id
|
||||
}
|
||||
@@ -267,6 +272,9 @@
|
||||
openCode(row) {
|
||||
this.$refs.openQRCode.openCode("/mobile/activity/unionActivity/goReg?id=" + row.id + "&signUpMethod=" + row.signUpMethod)
|
||||
},
|
||||
openSignCode(row) {
|
||||
this.$refs.openQRCode.openCode("/mobile/activity/myActivity/goSign?id=" + row.id)
|
||||
},
|
||||
sendMsg(row) {
|
||||
if (row.signUpMethod === 1 || row.signUpMethod === 3) {
|
||||
this.mobileUrl = "/mobile/activity/unionActivity/goReg?id=" + row.id + "&signUpMethod=" + row.signUpMethod
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
@@ -61,22 +62,33 @@
|
||||
<template scope="{row}" v-if="column.prop=='time'">
|
||||
<span>{{moment(row.startTime).format('YYYY-MM-DD')}} - {{moment(row.endTime).format('YYYY-MM-DD')}}</span>
|
||||
</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.type==40002">{{row.unionname?row.unionname:'暂无'}}</span>
|
||||
<span v-if="row.type==40003">{{row.clubName?row.clubName:'暂无'}}</span>
|
||||
<span v-if="row.type==40001">校工会</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='totalApplyNum'">
|
||||
<span v-if="row.userNumberLimit===1">(<span style="color: red">余{{ Number(row.totalUserNumberLimit) - Number(row.totalApplyNum) }}</span>/{{row.totalUserNumberLimit}}人)</span>
|
||||
<span v-else-if="row.userNumberLimit===2">{{ row.totalApplyNum }}人</span>
|
||||
<span v-else>(<span style="color: #fd835a">无名额限制</span>/已报 <span style="color: red">{{row.totalApplyNum}}</span>人)</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='signUpMethod'">
|
||||
<span v-if="row.signUpMethod===1">个人报名</span>
|
||||
<span v-else-if="row.signUpMethod===2">分工会报名</span>
|
||||
<span v-else-if="row.signUpMethod===3"
|
||||
style="color: #fd835a">组队报名<span style="color: black">(每组限报 <span style="color: red">{{row.teamNum}}</span> 人)</span></span>
|
||||
<span v-else-if="!row.signUpMethod">无需报名</span>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='countUser'">
|
||||
<el-tag type="success" v-if="row.countUser>0">已报名({{row.countUser}})</el-tag>
|
||||
<el-tag type="danger" v-else>未报名</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="200px">
|
||||
<el-table-column align="center" header-align="center" label="操作" prop="userOnline" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button :loading="row.loading" @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<template
|
||||
@@ -86,7 +98,7 @@
|
||||
报名
|
||||
</el-button>
|
||||
<el-button :loading="row.loading" @click="openAudit(row)" size="mini" type="primary" v-if="row.signUpMethod === 3">
|
||||
报名
|
||||
{{ row.countUser > 0 ? '修改' : '报名' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:loading="row.loading"
|
||||
@@ -102,7 +114,7 @@
|
||||
@click="doDelete(row)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="row.countUser>0&&row.signUpMethod === 1"
|
||||
v-if="row.countUser>0"
|
||||
>
|
||||
取消报名
|
||||
</el-button>
|
||||
@@ -177,8 +189,9 @@
|
||||
{ prop: "projectTypeName", label: "活动项目类型" },
|
||||
{ prop: "tussueName", label: "举办单位" },
|
||||
{ prop: "time", label: "活动日期" },
|
||||
{ prop: "applyTime", label: "创建时间", sortable: true },
|
||||
{ prop: "countUser", label: "报名人数", sortable: true }
|
||||
{ prop: "totalApplyNum", label: "已报名人数", width: 160 },
|
||||
{ prop: "signUpMethod", label: "报名方式", sortable: true, width: 200 },
|
||||
{ prop: "countUser", label: "我的报名", sortable: true }
|
||||
],
|
||||
leftData: [],
|
||||
rightData: [],
|
||||
@@ -283,6 +296,8 @@
|
||||
const { data: rightData } = await $.get("/platform/activity/applyUser/getReportedUser", {
|
||||
tissueId: row.id
|
||||
})
|
||||
|
||||
debugger
|
||||
this.leftData = data.map((user) => {
|
||||
return this.getTransProp(user, row.signUpMethod)
|
||||
})
|
||||
|
||||
@@ -76,8 +76,7 @@
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="人员列表">
|
||||
<template #func>
|
||||
<el-button @click="doExport" icon="el-icon-s-promotion" type="primary">导出
|
||||
</el-button>
|
||||
<el-button @click="doExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ layout("/layouts/platform.html"){
|
||||
<el-option
|
||||
v-for="item in activityOptions"
|
||||
:key="item.id"
|
||||
:label="item.activity_name"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -417,7 +417,7 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
<!--<el-dialog
|
||||
title="活动报销须知"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%">
|
||||
@@ -438,7 +438,7 @@ layout("/layouts/platform.html"){
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false;">同意</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</el-dialog>-->
|
||||
|
||||
</div>
|
||||
|
||||
@@ -467,7 +467,7 @@ layout("/layouts/platform.html"){
|
||||
projectType: [],
|
||||
activityType: [],
|
||||
formData: {
|
||||
goods: []
|
||||
budgets: [{}]
|
||||
},
|
||||
formSign: {},
|
||||
pageForm: {
|
||||
@@ -562,6 +562,8 @@ layout("/layouts/platform.html"){
|
||||
this.formData.budgets.forEach(v => {
|
||||
this.remoteMethod(v.loginName)
|
||||
})
|
||||
} else {
|
||||
this.formData.budgets = [{}]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -25,11 +25,20 @@ const MEMBER_ALL_CHANGE_INFO = {
|
||||
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<template v-if="viewData.retireDate">
|
||||
<el-descriptions-item label="退休日期">
|
||||
<el-tooltip class="item" effect="dark" :content="viewData.retireDate.substring(0, 10) + '系统将自动取消会员身份及福利会员身份'" placement="top">
|
||||
<span>{{ viewData.retireDate.substring(0, 10) }}</span>
|
||||
</el-tooltip>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="进校时间">{{ viewData.schoolTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
|
||||
@@ -36,7 +36,7 @@ const MEMBER_CHANGE_AUDIT_INFO = {
|
||||
|
||||
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="进校时间">{{ viewData.schoolTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
|
||||
@@ -27,7 +27,11 @@ const MEMBER_INFO = {
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<template v-if="viewData.retireDate">
|
||||
<el-descriptions-item label="退休日期">{{ viewData.retireDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休日期">
|
||||
<el-tooltip class="item" effect="dark" :content="viewData.retireDate.substring(0, 10) + '系统将自动取消会员身份及福利会员身份'" placement="top">
|
||||
<span>{{ viewData.retireDate.substring(0, 10) }}</span>
|
||||
</el-tooltip>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
@@ -35,7 +39,7 @@ const MEMBER_INFO = {
|
||||
|
||||
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="进校时间">{{ viewData.schoolTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
|
||||
@@ -127,7 +127,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
exportXlsx() {
|
||||
// this.$downLoad("/platform/qsv/quizRank/exportXlsx", this.pageForm)
|
||||
this.$downLoad("/platform/qsv/quizRank/exportXlsx", this.pageForm)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
@@ -56,7 +56,7 @@ const answer = {
|
||||
},
|
||||
|
||||
exportUserAnswerXlsx() {
|
||||
// this.$downLoad("/platform/qsv/survey/exportUserAnswerXlsx", { activityId: this.activityId })
|
||||
this.$downLoad("/platform/qsv/survey/exportUserAnswerXlsx", { activityId: this.activityId })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="数据列表">
|
||||
<!-- <el-button @click="exportXlsx" icon="el-icon-download" size="small" type="primary" class="mr5">导出xlsx</el-button>-->
|
||||
<!-- <el-button @click="exportXlsx" icon="el-icon-download" size="small" type="primary" class="mr5">导出xlsx</el-button>-->
|
||||
</table-tool>
|
||||
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="标题" prop="title" width="120" sortable></el-table-column>
|
||||
<el-table-column label="标题" prop="title" width="320" sortable></el-table-column>
|
||||
<el-table-column label="类型" prop="category" sortable>
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.ACTIVITY_QSV_CATEGORY" :value="row.category"></dict-tag>
|
||||
@@ -60,7 +60,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
exportXlsx() {
|
||||
$.post("/platform/qsv/survey/exportXlsx", this.pageForm)
|
||||
this.$downLoad("/platform/qsv/survey/exportXlsx", this.pageForm)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -86,6 +86,7 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="操作" width="180px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openChangeInfo(row, true)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.isOperate" @click="doRevoke(row)" size="mini" type="warning">撤销</el-button>
|
||||
<el-button v-if="!row.isOperate" @click="openChangeInfo(row, false)" size="mini" type="primary">变更</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -142,11 +143,27 @@ layout("/layouts/platform.html"){
|
||||
'user-change-info': USER_CHANGE_INFO
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 撤销
|
||||
*/
|
||||
doRevoke(row) {
|
||||
console.log(row)
|
||||
},
|
||||
/**
|
||||
* 批量操作变更
|
||||
*/
|
||||
doBatchChange(){
|
||||
if (this.checkUsers.length === 0) {
|
||||
this.$message.warning('请选择需要批量确认的用户数据')
|
||||
return
|
||||
}
|
||||
|
||||
const isHasRetire = this.checkUsers.some(v=> ['退休'].includes(v.userState))
|
||||
if (isHasRetire) {
|
||||
this.$message.warning('勾选用户中有退休教工,请手动变更退休职工并设置退休时间,勿批量确认')
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('确认要批量变更勾选用户吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -154,8 +171,8 @@ layout("/layouts/platform.html"){
|
||||
}).then(async () => {
|
||||
const url = "/platform/sourcechange/manage/doBatchChange"
|
||||
let isSendMsg = false
|
||||
const isHasNewTeacher = this.checkUsers.some(v=> v.changeInfosStr === '新入职')
|
||||
|
||||
const isHasNewTeacher = this.checkUsers.some(v=> v.changeInfosStr === '新入职')
|
||||
const ids = this.checkUsers.map(item => item.id)
|
||||
if (isHasNewTeacher) {
|
||||
this.$confirm('勾选用户中有新入职教工,是否对新入职教职工发送入会邀请?', '提示', {
|
||||
|
||||
@@ -26,11 +26,20 @@ const USER_CHANGE_INFO = {
|
||||
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<template v-if="viewData.retireDate">
|
||||
<el-descriptions-item label="退休日期">
|
||||
<el-tooltip class="item" effect="dark" :content="viewData.retireDate.substring(0, 10) + '系统将自动取消会员身份及福利会员身份'" placement="top">
|
||||
<span>{{ viewData.retireDate.substring(0, 10) }}</span>
|
||||
</el-tooltip>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
|
||||
<el-descriptions-item></el-descriptions-item>
|
||||
<el-descriptions-item label="进校时间">{{ viewData.schoolTime }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
@@ -195,7 +204,7 @@ const USER_CHANGE_INFO = {
|
||||
<el-date-picker v-model="formData.retireDate"
|
||||
type="date"
|
||||
:disabled="isView"
|
||||
placeholder="请选择出生日期"
|
||||
placeholder="请选择退休日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"></el-date-picker>
|
||||
@@ -419,6 +428,10 @@ const USER_CHANGE_INFO = {
|
||||
doSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
if (['退休'].includes(this.formData.userState) && !this.formData.retireDate) {
|
||||
this.$message.warning('请在数据更新后信息中设置该教工的退休日期')
|
||||
return
|
||||
}
|
||||
this.$confirm("提交后会改变人员基础数据,您确定要提交吗?", "提示", { type: "warning" })
|
||||
.then(() => {
|
||||
this.$emit('do-submit', this.formData)
|
||||
|
||||
Reference in New Issue
Block a user