人员、品牌活动、答题、单身教工
This commit is contained in:
@@ -114,6 +114,10 @@ a, img {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root {
|
||||
--color-primary: #06c;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1616837257578" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4737"
|
||||
width="128" height="128">
|
||||
<defs>
|
||||
<style type="text/css"></style>
|
||||
</defs>
|
||||
<path d="M689.6 728l-409.6 97.6a129.6 129.6 0 0 1-155.2-94.4L35.2 350.4c-16-68.8 27.2-137.6 94.4-153.6l409.6-97.6c68.8-16 137.6 25.6 155.2 94.4l91.2 379.2c16 68.8-27.2 137.6-96 155.2z"
|
||||
fill="#E1E1DF" p-id="4738"></path>
|
||||
<path d="M772.8 992H259.2c-70.4 0-128-57.6-128-128V256c0-70.4 57.6-128 128-128h513.6c70.4 0 128 57.6 128 128v608c0 70.4-57.6 128-128 128z"
|
||||
fill="#4E8DF6" p-id="4739"></path>
|
||||
<path d="M976 555.2l-35.2-22.4c-14.4-9.6-35.2-4.8-43.2 9.6l-22.4 35.2c-3.2 4.8-1.6 11.2 3.2 14.4l72 43.2c4.8 3.2 11.2 1.6 14.4-3.2l22.4-35.2c9.6-12.8 4.8-33.6-11.2-41.6zM713.6 851.2l70.4 43.2c4.8 3.2 11.2 1.6 16-3.2l142.4-220.8c3.2-4.8 1.6-11.2-3.2-16l-70.4-43.2c-4.8-3.2-11.2-1.6-16 3.2l-142.4 222.4c-4.8 4.8-3.2 11.2 3.2 14.4zM694.4 976l72-48c6.4-4.8 6.4-14.4 0-19.2L704 872c-6.4-3.2-16 0-17.6 8l-11.2 86.4c1.6 8 11.2 16 19.2 9.6z"
|
||||
fill="#E1E1DF" p-id="4740"></path>
|
||||
<path d="M676.8 192H355.2c-25.6 0-48-22.4-48-48V80c0-27.2 22.4-48 48-48h321.6c27.2 0 48 20.8 48 48v64c0 25.6-22.4 48-48 48z"
|
||||
fill="#2166CC" p-id="4741"></path>
|
||||
<path d="M737.6 427.2H534.4c-14.4 0-27.2-11.2-27.2-27.2v-11.2c0-14.4 11.2-27.2 27.2-27.2h203.2c14.4 0 27.2 12.8 27.2 27.2v11.2c0 14.4-12.8 27.2-27.2 27.2zM769.6 608H534.4c-14.4 0-27.2-12.8-27.2-27.2v-11.2c0-14.4 11.2-27.2 27.2-27.2h235.2c14.4 0 27.2 12.8 27.2 27.2v11.2c0 14.4-11.2 27.2-27.2 27.2zM673.6 788.8h-139.2c-14.4 0-27.2-12.8-27.2-27.2v-11.2c0-14.4 11.2-27.2 27.2-27.2h139.2c14.4 0 27.2 12.8 27.2 27.2v11.2c0 14.4-12.8 27.2-27.2 27.2z"
|
||||
fill="#2166CC" p-id="4742"></path>
|
||||
<path d="M396.8 385.6l-88 92.8-25.6-27.2c-11.2-11.2-30.4-11.2-41.6 0-11.2 12.8-11.2 32 0 43.2l44.8 48c4.8 6.4 12.8 9.6 20.8 9.6s16-3.2 20.8-9.6l107.2-113.6c11.2-11.2 12.8-32 1.6-43.2-9.6-11.2-28.8-11.2-40 0z"
|
||||
fill="#FFFFFF" p-id="4743"></path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -64,6 +64,7 @@
|
||||
Vue.component("text-editor", httpVueLoader("/components/plugins/TextEditor.vue?v=" + new Date().getTime()))
|
||||
|
||||
Vue.prototype.$auth = commonUtil.authService()
|
||||
Vue.prototype.$moment = moment
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="列表" fixed placeholder left-text="返回" left-arrow @click-left="historyBack"></van-nav-bar>
|
||||
<van-nav-bar title="列表" fixed placeholder left-text="返回" left-arrow @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-tabs v-model="pageForm.category" @change="onRefresh">
|
||||
<van-tab v-for="item in dict.type.ACTIVITY_QSV_CATEGORY" :name="item.code" :title="item.label" :key="item.code"></van-tab>
|
||||
<van-tab v-for="item in dict.type.ACTIVITY_QSV_CATEGORY" :name="item.value" :title="item.label" :key="item.value"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
@@ -72,9 +72,7 @@ layout("/layouts/platform_h5.html"){
|
||||
methods: {
|
||||
onLoad() {
|
||||
this.loading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/h5/qsv/pageData", this.pageForm)
|
||||
$.post("/platform/h5/qsv/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.list = this.list.concat(res.data.list)
|
||||
@@ -84,9 +82,6 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.loading = false
|
||||
this.refreshing = false
|
||||
})
|
||||
@@ -99,12 +94,9 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
async itemClick(item) {
|
||||
if (item.groupId) {
|
||||
const { code, data } = await this.$axios.post("/open/common/checkGroupPermission", { groupId: item.groupId })
|
||||
if (code === 0) {
|
||||
if (!data) {
|
||||
this.$toast.fail("您没有权限参与")
|
||||
return
|
||||
}
|
||||
if (!await getScopeUser(item.groupId)) {
|
||||
this.$toast.fail("您没有权限参与")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +108,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
const path = this.categoryPaths[item.category]
|
||||
if (path) {
|
||||
this.$pjaxReplace(path + "?id=" + item.id)
|
||||
pjaxReplace(path + "?id=" + item.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
@@ -72,7 +72,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="问卷调查" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="问卷调查" left-arrow @click-left="pjaxReplace('/mobile/index')" placeholder fixed></van-nav-bar>
|
||||
<div class="container" :style="{'padding-bottom': answerRecord.isFinish ? 0 : '84px'}">
|
||||
<van-sticky offset-top="46px">
|
||||
<!--开启计时 未完成 活动未结束-->
|
||||
@@ -156,7 +156,7 @@ layout("/layouts/platform_h5.html"){
|
||||
methods: {
|
||||
//获取活动、题目
|
||||
listSubjects() {
|
||||
this.$axios.post("/platform/h5/qsv/quiz/subjects", { activityId: this.id }).then((res) => {
|
||||
$.post("/platform/h5/qsv/quiz/subjects", { activityId: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activity = res.data.activity
|
||||
this.subjects = res.data.subjects
|
||||
@@ -169,7 +169,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
//获取回答记录
|
||||
getAnswerRecord() {
|
||||
this.$axios.post("/platform/h5/qsv/quiz/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
$.post("/platform/h5/qsv/quiz/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.answerRecord = res.data
|
||||
|
||||
@@ -262,7 +262,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
historyScore() {
|
||||
this.$axios.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activityId }).then((res) => {
|
||||
$.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activityId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.historyScores = res.data
|
||||
}
|
||||
@@ -307,7 +307,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
//自动提交
|
||||
autoSubmit(loading = null) {
|
||||
this.$axios
|
||||
$
|
||||
.post("/platform/h5/qsv/quiz/submitAnswer", {
|
||||
answer: JSON.stringify({
|
||||
activityId: this.id,
|
||||
@@ -338,7 +338,7 @@ layout("/layouts/platform_h5.html"){
|
||||
async checkGroupPermission() {
|
||||
const groupId = this.activity.groupId
|
||||
if (groupId) {
|
||||
const { code, data } = await this.$axios.post("/open/common/checkGroupPermission", { groupId })
|
||||
const { code, data } = await $.post("/open/common/checkGroupPermission", { groupId })
|
||||
if (code === 0) {
|
||||
if (!data) {
|
||||
this.$dialog
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
@@ -156,7 +156,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="问卷调查" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="问卷调查" left-arrow @click-left="pjaxReplace('/mobile/index')" placeholder fixed></van-nav-bar>
|
||||
<div class="container" :style="{'padding-bottom': answerRecord.isFinish ? 0 : '84px'}">
|
||||
<van-sticky offset-top="46px">
|
||||
<h2 class="title">{{ activity.title }}</h2>
|
||||
@@ -269,7 +269,7 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
methods: {
|
||||
getAnswerResult() {
|
||||
this.$axios.post("/platform/h5/qsv/quiz/answerResult", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
$.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
|
||||
@@ -280,7 +280,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
//获取回答记录
|
||||
getAnswerRecord() {
|
||||
this.$axios.post("/platform/h5/qsv/quiz/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
$.post("/platform/h5/qsv/quiz/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.answerRecord = res.data
|
||||
this.initAnswer()
|
||||
@@ -307,12 +307,12 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
historyBack() {
|
||||
this.$pjaxReplace("/platform/h5/qsv")
|
||||
pjaxReplace('/platform/h5/qsv')
|
||||
},
|
||||
|
||||
openHistory() {
|
||||
this.historyShow = true
|
||||
this.$axios.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activity.id }).then((res) => {
|
||||
$.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activity.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.historyList = res.data
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
@@ -80,10 +80,21 @@ layout("/layouts/platform_h5.html"){
|
||||
resize: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.desc-content{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.desc-content *{
|
||||
max-width: 100%!important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="问卷调查" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="问卷调查" left-arrow @click-left="pjaxReplace('/mobile/index')" placeholder fixed></van-nav-bar>
|
||||
<div class="container" :style="{'padding-bottom': answerRecord.isFinish ? 0 : '84px'}">
|
||||
<h2 class="title">{{ activity.title }}</h2>
|
||||
<div v-if="!isFinished">
|
||||
@@ -99,6 +110,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-checkbox-group
|
||||
v-model="subject.userSelectOptionIds"
|
||||
:ref="'subject'+subject.id"
|
||||
:max="subject.maxMulti ? subject.maxMulti : 0"
|
||||
v-if="['radio','checkbox'].includes(subject.type)"
|
||||
>
|
||||
<van-cell-group>
|
||||
@@ -112,6 +124,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<template #icon>
|
||||
<van-checkbox :name="option.id" :ref="'option'+option.id" style="margin-right: 10px"></van-checkbox>
|
||||
</template>
|
||||
|
||||
<img
|
||||
slot="right-icon"
|
||||
v-if="option.imgUrl"
|
||||
@@ -120,6 +133,14 @@ layout("/layouts/platform_h5.html"){
|
||||
style="width: 40px; height: 40px"
|
||||
@click.stop="previewOptionImg(option.imgUrl)"
|
||||
/>
|
||||
|
||||
<div slot="extra">
|
||||
<div v-if="option.description" style="color: #0a84ff" @click.stop="openDesc(option)">
|
||||
查看详情
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
@@ -134,6 +155,13 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<van-action-sheet v-model="descShow" title="详情">
|
||||
<div class="desc-content" v-html="optionDesc" @click="descClick">
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -148,7 +176,10 @@ layout("/layouts/platform_h5.html"){
|
||||
remainingTime: 0,
|
||||
isFinished: false,
|
||||
answerRecord: {},
|
||||
answerRecordId: null
|
||||
answerRecordId: null,
|
||||
|
||||
descShow:false,
|
||||
optionDesc:null
|
||||
}
|
||||
},
|
||||
|
||||
@@ -164,23 +195,36 @@ layout("/layouts/platform_h5.html"){
|
||||
methods: {
|
||||
//获取活动、题目
|
||||
listSubjects() {
|
||||
this.$axios.post("/platform/h5/qsv/survey/subjects", { activityId: this.id }).then((res) => {
|
||||
$.post("/platform/h5/qsv/survey/subjects", { activityId: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activity = res.data.activity
|
||||
this.subjects = res.data.subjects
|
||||
this.answerRecordId = res.data.answerRecordId
|
||||
this.getAnswerRecord()
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: res.msg,
|
||||
}).then(() => {
|
||||
pjaxReplace("/mobile/index")
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取回答记录
|
||||
getAnswerRecord() {
|
||||
this.$axios.post("/platform/h5/qsv/survey/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
$.post("/platform/h5/qsv/survey/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.answerRecord = res.data
|
||||
if (this.answerRecord.isFinish) {
|
||||
this.$toast.success("您已完成该调查")
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已完成该调查,感谢您的参与!',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
// this.$toast.success("您已完成该调查")
|
||||
}
|
||||
this.initAnswer()
|
||||
}
|
||||
@@ -222,6 +266,21 @@ layout("/layouts/platform_h5.html"){
|
||||
vant.ImagePreview([img])
|
||||
},
|
||||
|
||||
//查看详情
|
||||
openDesc(option){
|
||||
this.descShow = true
|
||||
this.optionDesc = option.description
|
||||
},
|
||||
|
||||
//详情点击
|
||||
descClick(event){
|
||||
//如果点击的是图片
|
||||
if(event.target.tagName === 'IMG'){
|
||||
vant.ImagePreview([event.target.src])
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//手动提交
|
||||
onSubmit() {
|
||||
const endTime = this.activity.endTime
|
||||
@@ -250,8 +309,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
//自动提交
|
||||
autoSubmit(loading = null) {
|
||||
this.$axios
|
||||
.post("/platform/h5/qsv/survey/submitAnswer", {
|
||||
$.post("/platform/h5/qsv/survey/submitAnswer", {
|
||||
answer: JSON.stringify({
|
||||
activityId: this.id,
|
||||
answerRecordId: this.answerRecordId,
|
||||
@@ -269,8 +327,6 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$toast.success(res.msg)
|
||||
this.getAnswerRecord()
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if (loading) {
|
||||
loading.clear()
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ layout("/mobile/platform.html"){
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 25px;
|
||||
font-size: 12px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,9 +158,6 @@ layout("/mobile/platform.html"){
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="trainType + '列表'" left-arrow
|
||||
@click-left="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?type=' + type)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-dropdown-menu active-color="#1867b0">
|
||||
<van-dropdown-item @change="tabChange" v-model="activityStatus"
|
||||
:options="activityOptions"></van-dropdown-item>
|
||||
@@ -171,7 +168,6 @@ layout("/mobile/platform.html"){
|
||||
<van-tabs v-if="activityStatus != '1' && assortList.length > 0" v-model="assort" type="card" color="#1867B0"
|
||||
style="margin-top: 10px" @click="tabClick">
|
||||
<van-tab v-for="item in assortList" :name="item" :title="item">
|
||||
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
@@ -181,7 +177,7 @@ layout("/mobile/platform.html"){
|
||||
</van-notice-bar>-->
|
||||
|
||||
<template>
|
||||
<div id="parentDiv" v-model="loading" v-if="tableData.courseList && tableData.courseList.length>0">
|
||||
<div id="parentDiv" v-model="loading" v-if="tableData.courseList && tableData.courseList.length>0" style="margin-bottom: 60px">
|
||||
|
||||
<template v-for="o in tableData.courseList">
|
||||
<div style="position: relative"
|
||||
@@ -211,13 +207,24 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
<div>
|
||||
<span class="train-title">活动时间:</span>
|
||||
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"
|
||||
style="color: #1867b0">点我查看</span>
|
||||
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"
|
||||
style="color: #1867b0">
|
||||
<template v-if="o.courseName.includes('时间待定')">
|
||||
<span style="color: #e5a15e">活动时间另行通知</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"
|
||||
style="color: #1867b0">点我查看</span>
|
||||
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"
|
||||
style="color: #1867b0">
|
||||
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<template v-if="o.courseTimeName">
|
||||
<div>
|
||||
<span class="train-title">报名时段:</span>
|
||||
<span style="color: #1867b0">{{o.courseTimeName}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div>
|
||||
<span @click.stop="showPic(FILE_DOMAIN + '/fileStreamPreview?id=' + tableData.wechat.id)"
|
||||
v-if="o.isSign === true && tableData.wechat"
|
||||
@@ -241,11 +248,11 @@ layout("/mobile/platform.html"){
|
||||
style="position: absolute; left: 77%; top: 58%;"
|
||||
src="/assets/mobile/svg/train/sign_up.svg"></image>
|
||||
|
||||
<div @click="trainClick(o)" v-if="activityStatus === '1' && o.isMobileSign"
|
||||
style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;
|
||||
position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">
|
||||
签到
|
||||
</div>
|
||||
<!-- <div @click="trainClick(o)" v-if="activityStatus === '1'"-->
|
||||
<!-- style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;-->
|
||||
<!-- position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">-->
|
||||
<!-- 签到-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -304,7 +311,14 @@ layout("/mobile/platform.html"){
|
||||
<div class="join_content">
|
||||
<van-form @submit="joinSubmit" :show-error-message="false">
|
||||
<div class="van-doc-card-two" style="margin-bottom: 16px">
|
||||
<div></div>
|
||||
<div class="van-card-header">
|
||||
活动信息
|
||||
</div>
|
||||
<div class="van-card-body">
|
||||
<van-field label="活动名称" readonly v-model="choose.courseName"></van-field>
|
||||
<van-field label="校区" readonly v-model="choose.campus"></van-field>
|
||||
<van-field label="活动地点" readonly v-model="choose.courseLocation"></van-field>
|
||||
</div>
|
||||
<div class="van-card-header">
|
||||
基础信息
|
||||
</div>
|
||||
@@ -316,6 +330,19 @@ layout("/mobile/platform.html"){
|
||||
<van-field label="性别" readonly v-model="formData.sex"></van-field>
|
||||
<van-field label="联系方式" required :rules="[{ required: true, message: '请填写联系方式' }]"
|
||||
placeholder="请填写联系方式" v-model="formData.mobile"></van-field>
|
||||
<template v-if="this.choose.courseIsLimitApply">
|
||||
<van-field label="报名时段" required :rules="[{ required: true, message: '请选择报名时段' }]"
|
||||
readonly @click="showCoursePicker = true;getCourseTimeSelectList(choose);"
|
||||
placeholder="请选择报名时段" v-model="formData.courseTimeName"></van-field>
|
||||
<van-popup v-model="showCoursePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="courseTimeSelectList"
|
||||
@confirm="onCourseConfirm"
|
||||
@cancel="showCoursePicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
<train-dynamic-form v-model="dynamicColumnsData" ref="trainDynamicForm"></train-dynamic-form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -325,11 +352,17 @@ layout("/mobile/platform.html"){
|
||||
</van-form>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace @click="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList')">活动报名</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace @click="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?type=my')">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
let pointArray = []
|
||||
let locations = null
|
||||
let map = null
|
||||
@@ -339,6 +372,7 @@ layout("/mobile/platform.html"){
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 0,
|
||||
assort: '',
|
||||
assortList: [],
|
||||
allColumnsData: [],
|
||||
@@ -362,6 +396,9 @@ layout("/mobile/platform.html"){
|
||||
activitySignUpStartTime: null,
|
||||
choose: {},
|
||||
activity: '',
|
||||
|
||||
showCoursePicker: false,
|
||||
courseTimeSelectList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -528,7 +565,7 @@ layout("/mobile/platform.html"){
|
||||
cancel(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?\n一旦确认,可不能反悔了哟!",
|
||||
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?",
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/cancelSignUp', {
|
||||
@@ -543,12 +580,24 @@ layout("/mobile/platform.html"){
|
||||
});
|
||||
},
|
||||
async signUp(o) {
|
||||
if (o.courseName.includes('时间待定')) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '活动报名尚未开始哦,请报名其他活动吧',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.choose = o
|
||||
|
||||
const res = await $.post('/platform/mobile/trainSignUpActivity/validateSignUp', {
|
||||
cndId: o.conditionStructureId,
|
||||
courseId: o.id,
|
||||
})
|
||||
|
||||
if (o.courseIsLimitApply) {
|
||||
await this.getCourseTimeSelectList(o)
|
||||
}
|
||||
|
||||
if(res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
@@ -579,6 +628,20 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
this.joinPopup = true
|
||||
},
|
||||
async getCourseTimeSelectList(o) {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/getCourseTimeSelectList',{courseId: o.id})
|
||||
if (resp.code === 0) {
|
||||
this.courseTimeSelectList = resp.data
|
||||
} else {
|
||||
this.$toast.fail("获取时段信息失败,请联系管理员")
|
||||
}
|
||||
},
|
||||
onCourseConfirm(val){
|
||||
this.formData.activityCourseId = val.value
|
||||
this.$set(this.formData, "activityCourseId", val.value)
|
||||
this.$set(this.formData, "courseTimeName", val.text.substring(0, 12))
|
||||
this.showCoursePicker = false
|
||||
},
|
||||
async joinSubmit() {
|
||||
let valid = false
|
||||
try {
|
||||
@@ -609,9 +672,24 @@ layout("/mobile/platform.html"){
|
||||
return
|
||||
}
|
||||
|
||||
let flag = this.choose.courseIsLimitApply
|
||||
if (flag) {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/validateSourceSignUp',{activityCourseId: this.formData.activityCourseId})
|
||||
if (resp.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: resp.msg,
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let msg = '您选择了【' + this.choose.courseName + (flag ? this.formData.courseTimeName : '') + '】\n的报名,是否确认?'
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您选择了【' + this.choose.courseName + '】\n一旦确认,可不能反悔了哟',
|
||||
message: msg,
|
||||
confirmButtonColor: '#1867b0',
|
||||
}).then(async () => {
|
||||
const toast = vant.Toast.loading({
|
||||
@@ -632,7 +710,7 @@ layout("/mobile/platform.html"){
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/doSignUp', this.formData)
|
||||
vant.Toast(resp.msg)
|
||||
if (resp.code === 0) {
|
||||
await this.pageData()
|
||||
this.pageData()
|
||||
this.joinPopup = false
|
||||
}
|
||||
toast.clear()
|
||||
@@ -800,6 +878,7 @@ layout("/mobile/platform.html"){
|
||||
if (this.type === 'my') {
|
||||
this.activityOptions = [{text: '我报名的', value: '1'}]
|
||||
this.activityStatus = '1'
|
||||
this.tarBarActive = 1
|
||||
} else {
|
||||
this.activityOptions = [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}]
|
||||
this.activityStatus = new Date().getTime() > new Date(time).getTime() ? '1' : '0'
|
||||
|
||||
@@ -68,61 +68,45 @@ layout("/mobile/platform.html"){
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" fixed left-arrow placeholder
|
||||
title="活动列表"></van-nav-bar>
|
||||
<van-nav-bar title="活动列表" left-arrow placeholder fixed
|
||||
@click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
<van-dropdown-item :options="yearList" @change="formChange"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="activityStatusList" @change="formChange"
|
||||
v-model="pageForm.activityStatus"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.year" :options="yearList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.activityStatus" :options="activityStatusList"
|
||||
@change="formChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<!-- <van-sticky>-->
|
||||
<!-- <van-nav-bar title="活动列表" left-arrow-->
|
||||
<!-- @click-left="location.replace('/mobile/index')"></van-nav-bar>-->
|
||||
<!-- </van-sticky>-->
|
||||
<!-- <van-sticky>-->
|
||||
<!-- <van-nav-bar title="活动列表" left-arrow-->
|
||||
<!-- @click-left="location.replace('/mobile/index')"></van-nav-bar>-->
|
||||
<!-- </van-sticky>-->
|
||||
|
||||
<!-- <van-sticky>-->
|
||||
<!-- <van-tabs v-model="pageForm.activityStatus" @change="tabChange">-->
|
||||
<!-- <van-tab title="全部" name="0"></van-tab>-->
|
||||
<!-- <van-tab v-if="type !== 'my'" title="进行中" name="1"></van-tab>-->
|
||||
<!-- <van-tab v-if="type === 'my'" title="进行中" name="3"></van-tab>-->
|
||||
<!-- <van-tab title="已结束" name="2"></van-tab>-->
|
||||
<!-- </van-tabs>-->
|
||||
<!-- </van-sticky>-->
|
||||
<!-- <van-sticky>-->
|
||||
<!-- <van-tabs v-model="pageForm.activityStatus" @change="tabChange">-->
|
||||
<!-- <van-tab title="全部" name="0"></van-tab>-->
|
||||
<!-- <van-tab v-if="type !== 'my'" title="进行中" name="1"></van-tab>-->
|
||||
<!-- <van-tab v-if="type === 'my'" title="进行中" name="3"></van-tab>-->
|
||||
<!-- <van-tab title="已结束" name="2"></van-tab>-->
|
||||
<!-- </van-tabs>-->
|
||||
<!-- </van-sticky>-->
|
||||
|
||||
<div style="margin: 60px auto 80px auto">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading">
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<!-- <div class="tag" v-if="moment(o.activitySignUpStartTime).unix() > moment().unix()">即将开始</div>-->
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<div v-for="o in tableData" class="van-doc-card">
|
||||
<!-- <div class="tag" v-if="moment(o.activitySignUpStartTime).unix() > moment().unix()">即将开始</div>-->
|
||||
<div>
|
||||
<div class="tag" style="background-color: #bc62c5" v-if="o.isDisabled">活动未开启
|
||||
</div>
|
||||
<div class="tag"
|
||||
v-else-if="!o.isDisabled && moment(o.activitySignUpStartTime).valueOf() > moment().valueOf()">
|
||||
未开始报名
|
||||
</div>
|
||||
<div class="tag"
|
||||
v-else-if="!o.isDisabled &&moment(o.activitySignUpEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.activitySignUpStartTime).valueOf()">
|
||||
报名中
|
||||
</div>
|
||||
<div class="tag" style="background-color: #f14646"
|
||||
v-else-if="!o.isDisabled &&moment(o.activityEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityStartTime).valueOf()">
|
||||
报名结束
|
||||
</div>
|
||||
<div class="tag"
|
||||
v-else-if="!o.isDisabled &&moment(o.activityStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityEndTime).valueOf()">
|
||||
活动进行中
|
||||
</div>
|
||||
<div class="tag" style="background-color: #f14646"
|
||||
v-else-if="!o.isDisabled &&moment().valueOf() > moment(o.activityEndTime).valueOf()">
|
||||
活动结束
|
||||
</div>
|
||||
<div class="tag" style="background-color: #bc62c5" v-if="o.isDisabled">活动未开启</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled && moment(o.activitySignUpStartTime).valueOf() > moment().valueOf()">未开始报名</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled &&moment(o.activitySignUpEndTime).valueOf() > moment().valueOf() && moment().valueOf() > moment(o.activitySignUpStartTime).valueOf()">报名中</div>
|
||||
<div class="tag" style="background-color: #f14646" v-else-if="!o.isDisabled &&moment(o.activityEndTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityStartTime).valueOf()">报名结束</div>
|
||||
<div class="tag" v-else-if="!o.isDisabled &&moment(o.activityStartTime).valueOf() < moment().valueOf() && moment().valueOf() < moment(o.activityEndTime).valueOf()">活动进行中</div>
|
||||
<div class="tag" style="background-color: #f14646" v-else-if="!o.isDisabled &&moment().valueOf() > moment(o.activityEndTime).valueOf()">活动结束</div>
|
||||
</div>
|
||||
<div @click="welfareClick(o)">
|
||||
<div>
|
||||
@@ -134,8 +118,7 @@ layout("/mobile/platform.html"){
|
||||
v-else></van-image>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
<div class="van-ellipsis" style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.activityName}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -163,9 +146,15 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace @click="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList')">活动报名</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace @click="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?type=my')">我的活动</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -200,7 +189,7 @@ layout("/mobile/platform.html"){
|
||||
this.pageData()
|
||||
},
|
||||
async welfareClick(o) {
|
||||
if (o.isDisabled) {
|
||||
if (o.isDisabled){
|
||||
this.$toast('活动未开启')
|
||||
return;
|
||||
}
|
||||
@@ -212,7 +201,16 @@ layout("/mobile/platform.html"){
|
||||
pjaxReplace('/platform/mobile/trainSignUpActivity/trainInfo' +
|
||||
'?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime + '&type=my' + '&startTime=' + o.activitySignUpStartTime)
|
||||
} else {
|
||||
pjaxReplace('/platform/mobile/trainSignUpActivity/activityInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime)
|
||||
const scopeUser = await getScopeUser(o.activityGroupId);
|
||||
if (scopeUser === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您不在报名人员范围内',
|
||||
confirmButtonColor: '#1867b0'
|
||||
})
|
||||
return
|
||||
}
|
||||
pjaxReplace('/platform/mobile/trainSignUpActivity/trainInfo?activityId=' + o.id + '&endTime=' + o.activitySignUpEndTime)
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
@@ -243,7 +241,7 @@ layout("/mobile/platform.html"){
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
async init() {
|
||||
async init(){
|
||||
this.$set(this.pageForm, "activityStatus", 1)
|
||||
this.$set(this.pageForm, "year", new Date().getFullYear())
|
||||
}
|
||||
@@ -251,6 +249,9 @@ layout("/mobile/platform.html"){
|
||||
async created() {
|
||||
await this.init()
|
||||
this.type = GetQueryString('type')
|
||||
if (this.type === 'my') {
|
||||
this.tarBarActive = 1
|
||||
}
|
||||
this.pageForm.type = this.type
|
||||
this.startLoading()
|
||||
// this.pageForm.activityStatus = this.type === 'my' ? '3' : '1'
|
||||
|
||||
@@ -205,7 +205,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<template #view>
|
||||
|
||||
<member-all-change-info ref="memberAllChangeInfoRef"></member-all-change-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
@@ -317,7 +317,8 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../common/memberAllChangeInfo.js"){}#-->
|
||||
<!--#include("../../member/change/common/memberAllChangeInfo.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
@@ -360,10 +361,14 @@ layout("/layouts/platform.html"){
|
||||
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
|
||||
'user-upset': httpVueLoader('/components/userpartupdate/UserPartUpdateSet.vue'),
|
||||
'user-upset-data': httpVueLoader('/components/userpartupdate/UserDataPartUpSet.vue'),
|
||||
'member-all-change-info': MEMBER_ALL_CHANGE_INFO,
|
||||
},
|
||||
methods: {
|
||||
async openUserChangeInfo({hisId}) {
|
||||
|
||||
openUserChangeInfo(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberAllChangeInfoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
async getColumnInfo() {
|
||||
const {data, msg, code} = await $.post('/platform/activity/basic/scope/getUserTableColumnInfo')
|
||||
|
||||
@@ -12,13 +12,15 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审核列表">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" @click="doBatchApproval" class="mr10">批量审核</el-button>
|
||||
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table :data="tableData" @selection-change="handleSelectionChange" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" reserve-selection></el-table-column>
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column :label="column.label"
|
||||
@@ -127,6 +129,7 @@ layout("/layouts/platform.html"){
|
||||
showApprovalForm: false,
|
||||
|
||||
changeTypeData: [],
|
||||
multipleSelection: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -135,6 +138,32 @@ layout("/layouts/platform.html"){
|
||||
'member-change-audit-info': MEMBER_CHANGE_AUDIT_INFO
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
doBatchApproval() {
|
||||
if (this.multipleSelection.length === 0){
|
||||
this.$message.warning('请勾选需要审核的人员数据')
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('确定要将勾选的数据全部审核通过吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const ids = this.multipleSelection.map((v) => v.id)
|
||||
const resp = await $.post('/platform/member/change/branchUnion/audit/doBatchApproval', {
|
||||
data: JSON.stringify(ids)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -869,7 +869,10 @@ layout("/layouts/platform.html"){
|
||||
// }
|
||||
},
|
||||
getChangeTypes(changeTypes){
|
||||
const changeTypesList = clone(changeTypes)
|
||||
if (!changeTypes) {
|
||||
return
|
||||
}
|
||||
const changeTypesList = JSON.parse(changeTypes)
|
||||
if (changeTypesList) {
|
||||
if (!changeTypesList || changeTypesList.length === 0 || !this.changeTypeData || this.changeTypeData.length === 0) return null
|
||||
return changeTypesList
|
||||
|
||||
@@ -12,13 +12,15 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审核列表">
|
||||
<template #func>
|
||||
<el-button size="small" type="primary" @click="doBatchApproval" class="mr10">批量审核</el-button>
|
||||
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table :data="tableData" @selection-change="handleSelectionChange" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column type="selection" width="55" reserve-selection></el-table-column>
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column :label="column.label"
|
||||
@@ -127,6 +129,7 @@ layout("/layouts/platform.html"){
|
||||
showApprovalForm: false,
|
||||
|
||||
changeTypeData: [],
|
||||
multipleSelection: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -135,6 +138,32 @@ layout("/layouts/platform.html"){
|
||||
'member-change-audit-info': MEMBER_CHANGE_AUDIT_INFO
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
doBatchApproval() {
|
||||
if (this.multipleSelection.length === 0){
|
||||
this.$message.warning('请勾选需要审核的人员数据')
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm('确定要将勾选的数据全部审核通过吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const ids = this.multipleSelection.map((v) => v.id)
|
||||
const resp = await $.post('/platform/member/change/schoolUnion/audit/doBatchApproval', {
|
||||
data: JSON.stringify(ids)
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -33,7 +33,7 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" @click="$refs.member.save()"
|
||||
style="position: absolute;right: 20px;top: 30px;z-index: 100">提交
|
||||
</el-button>
|
||||
<member ref="member" :id="'${@shiro.getPrincipalProperty('id')}'"></member>
|
||||
<member ref="member" :id="user.id"></member>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -45,14 +45,16 @@ layout("/layouts/platform.html"){
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
user: {},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'member': httpVueLoader('/components/member/MemberInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {},
|
||||
async created() {
|
||||
|
||||
this.user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -5,8 +5,8 @@ const basicForm = {
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="150px">
|
||||
<el-form-item label="类型" prop="category">
|
||||
<el-radio-group v-model="formData.category" size="small">
|
||||
<el-radio v-for="item in dict.type.ACTIVITY_QSV_CATEGORY" :label="item.code"
|
||||
:key="item.code"
|
||||
<el-radio v-for="item in dict.type.ACTIVITY_QSV_CATEGORY" :label="item.value"
|
||||
:key="item.value"
|
||||
border>
|
||||
{{item.label}}
|
||||
</el-radio>
|
||||
@@ -71,8 +71,8 @@ const basicForm = {
|
||||
</el-popover>
|
||||
</span>
|
||||
<el-radio-group v-model="formData.mode" size="small">
|
||||
<el-radio v-for="item in dict.type.ACTIVITY_QSV_MODE" :label="item.code"
|
||||
:key="item.code"
|
||||
<el-radio v-for="item in dict.type.ACTIVITY_QSV_MODE" :label="item.value"
|
||||
:key="item.value"
|
||||
border>
|
||||
{{item.label}}
|
||||
</el-radio>
|
||||
@@ -163,8 +163,8 @@ const basicForm = {
|
||||
|
||||
<el-form-item label="得分统计模式" prop="scoreMode" v-if="formData.category==='QUIZ'">
|
||||
<el-radio-group v-model="formData.scoreMode" size="small">
|
||||
<el-radio v-for="item in dict.type.ACTIVITY_QSV_SCORE_MODE" :label="item.code"
|
||||
:key="item.code" border>
|
||||
<el-radio v-for="item in dict.type.ACTIVITY_QSV_SCORE_MODE" :label="item.value"
|
||||
:key="item.value" border>
|
||||
{{item.label}}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -197,12 +197,14 @@ const basicForm = {
|
||||
`,
|
||||
dicts: ["ACTIVITY_QSV_CATEGORY", "ACTIVITY_QSV_MODE", "ACTIVITY_QSV_REPEAT_MODE", "ACTIVITY_QSV_SCORE_MODE"],
|
||||
components: {
|
||||
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue")
|
||||
"drawer-user-scope": httpVueLoader("/components/plugins/DrawerUserScope.vue")
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formData: {},
|
||||
formData: {
|
||||
category: ''
|
||||
},
|
||||
formRules: {
|
||||
category: [{ required: true, message: "请选择类型", trigger: "change" }],
|
||||
title: [{ required: true, message: "请输入标题", trigger: "change" }],
|
||||
@@ -219,7 +221,7 @@ const basicForm = {
|
||||
this.dialogVisible = true
|
||||
this.getActivityGroup()
|
||||
if (id) {
|
||||
this.$axios.post("/platform/qsv/activity/findOne", { id }).then((res) => {
|
||||
$.post("/platform/qsv/activity/findOne", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
@@ -231,7 +233,7 @@ const basicForm = {
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios.post("/platform/qsv/activity/save", this.formData).then((res) => {
|
||||
$.post("/platform/qsv/activity/save", this.formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.dialogVisible = false
|
||||
@@ -242,7 +244,7 @@ const basicForm = {
|
||||
})
|
||||
},
|
||||
getActivityGroup() {
|
||||
this.$axios.post("/platform/activity/basic/scope/getActivityUserScopeGroup").then((res) => {
|
||||
$.post("/platform/activity/basic/scope/getActivityUserScopeGroup").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activityGroupOptions = res.data
|
||||
}
|
||||
|
||||
@@ -5,18 +5,31 @@ layout("/layouts/platform.html"){
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker placeholder="年度" type="year" v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="标题">
|
||||
<el-input placeholder="标题" v-model="pageForm.title" clearable></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度:</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker placeholder="年度" style="width: 100%" type="year" v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">标题:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="标题" v-model="pageForm.title" clearable></el-input>
|
||||
</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">
|
||||
<table-tool>
|
||||
<el-button @click="$refs.basicFormRef.onOpen()" size="small" type="primary" class="mr5">新增</el-button>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="管理列表">
|
||||
<template #func>
|
||||
<el-button @click="$refs.basicFormRef.onOpen()" size="small" type="primary" class="mr5">新增</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder">
|
||||
@@ -80,7 +93,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/qsv/activity/delete", { id }).then((res) => {
|
||||
$.post("/platform/qsv/activity/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("删除成功")
|
||||
this.pageData()
|
||||
|
||||
@@ -3,7 +3,7 @@ const optionImg = {
|
||||
<el-dialog :visible="visible" title="设置图片" append-to-body width="700px">
|
||||
<div style="background: #f7f8f9;text-align: center;border: solid 1px #d7d8d9;border-radius: 4px;">
|
||||
<el-upload
|
||||
action="/platform/sys/file/uploadDynamicReturnUrl"
|
||||
action="/file_server/uploadFile"
|
||||
:show-file-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:before-upload="beforeUpload">
|
||||
@@ -38,7 +38,7 @@ const optionImg = {
|
||||
console.log(file)
|
||||
console.log(fileList)
|
||||
if (response.code === 0) {
|
||||
this.img = response.data
|
||||
this.img = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + response.data.filepath
|
||||
// this.img = "/platform/sys/file/download?id=t38dmq4beuhrupqb54prl52t4u"
|
||||
this.$message.success("图片上传成功")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
const setting = {
|
||||
template:/*language=HTML*/`
|
||||
<el-dialog :title="title" :visible.sync="visible" append-to-body width="50%">
|
||||
<el-form :model="formData" label-width="80px">
|
||||
<el-form-item label="链接" prop="link">
|
||||
<el-input maxlength="255" placeholder="" v-model="formData.link"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="详情" prop="description">
|
||||
<text-editor v-model="formData.description"></text-editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
`,
|
||||
data(){
|
||||
return{
|
||||
title: '设置',
|
||||
visible: false,
|
||||
formData:{},
|
||||
ext: null
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
onOpen(option,ext){
|
||||
console.log(option)
|
||||
this.formData = { ...option }
|
||||
this.ext = ext
|
||||
this.visible = true
|
||||
},
|
||||
onConfirm(){
|
||||
this.$emit('confirm', { option:this.formData,ext:this.ext })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
<!--#include('optionImg.js'){}#-->
|
||||
<!--#include('setting.js'){}#-->
|
||||
|
||||
const subjectForm = {
|
||||
template: /*language=HTML*/ `
|
||||
@@ -41,6 +42,11 @@ const subjectForm = {
|
||||
<!-- </el-option>-->
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div v-if="subject.type === 'checkbox'">
|
||||
最大选择数:
|
||||
<el-input v-model="subject.maxMulti" placeholder="最多可选数量"></el-input>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <el-input-->
|
||||
@@ -115,6 +121,14 @@ const subjectForm = {
|
||||
v-model="option.isCorrect"
|
||||
active-text="正确答案">
|
||||
</el-switch>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-setting"
|
||||
size="mini"
|
||||
@click="openSetting(subjectIndex,optionIndex,option)">
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@@ -189,10 +203,12 @@ const subjectForm = {
|
||||
</div>
|
||||
|
||||
<option-img ref="optionImgRef" @confirm="onOptionImgConfirm"></option-img>
|
||||
<setting ref="settingRef" @confirm="onSettingConfirm"></setting>
|
||||
</div>
|
||||
`,
|
||||
components: {
|
||||
'option-img': optionImg,
|
||||
'setting': setting
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -210,12 +226,12 @@ const subjectForm = {
|
||||
this.visible = true
|
||||
if (id) {
|
||||
this.id = id
|
||||
this.$axios.post("/platform/qsv/activity/findOne", {id}).then((res) => {
|
||||
$.post("/platform/qsv/activity/findOne", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activity = res.data
|
||||
}
|
||||
})
|
||||
this.$axios.post("/platform/qsv/activity/listSubjects", {activityId: id}).then((res) => {
|
||||
$.post("/platform/qsv/activity/listSubjects", {activityId: id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.subjects = res.data
|
||||
}
|
||||
@@ -277,7 +293,7 @@ const subjectForm = {
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//添加选项
|
||||
addOption(subject) {
|
||||
subject.options.push({
|
||||
@@ -288,7 +304,7 @@ const subjectForm = {
|
||||
isCorrect: false
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//删除选项
|
||||
removeOption(subject, optionIndex) {
|
||||
subject.options.splice(optionIndex, 1)
|
||||
@@ -301,21 +317,38 @@ const subjectForm = {
|
||||
optionIndex
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//选项图片上传成功回调
|
||||
onOptionImgConfirm({img, ext}) {
|
||||
this.$set(this.subjects[ext.subjectIndex].options[ext.optionIndex], "imgUrl", img)
|
||||
},
|
||||
|
||||
|
||||
//删除选项图片
|
||||
removeOptionImg(subjectIndex, optionIndex){
|
||||
this.$set(this.subjects[subjectIndex].options[optionIndex], "imgUrl", null)
|
||||
console.log(this.subjects[subjectIndex])
|
||||
},
|
||||
|
||||
|
||||
//打开选项设置
|
||||
openSetting(subjectIndex, optionIndex, option){
|
||||
this.$refs.settingRef.onOpen(option, {
|
||||
subjectIndex,
|
||||
optionIndex
|
||||
})
|
||||
},
|
||||
|
||||
//选项设置确认
|
||||
onSettingConfirm({option, ext}){
|
||||
this.subjects[ext.subjectIndex].options[ext.optionIndex] = option
|
||||
console.log(this.subjects[ext.subjectIndex].options[ext.optionIndex])
|
||||
|
||||
// this.$set(this.subjects[ext.subjectIndex].options[ext.optionIndex], "isCorrect", option.isCorrect)
|
||||
// this.$set(this.subjects[ext.subjectIndex].options[ext.optionIndex], "hint", option.hint)
|
||||
},
|
||||
|
||||
//保存
|
||||
saveQuestionnaire() {
|
||||
this.$axios
|
||||
$
|
||||
.post("/platform/qsv/activity/saveSubjects", {
|
||||
activityId: this.id,
|
||||
subjects: JSON.stringify(this.subjects)
|
||||
|
||||
@@ -4,52 +4,84 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="listActivity"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="问卷">
|
||||
<el-select filterable placeholder="所属问卷" style="width: 100%" @change="doSearch" v-model="pageForm.activityId">
|
||||
<el-option :label="item.title" :value="item.id" :key="item.id" v-for="item in activityOptions"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="姓名/工号" clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" clearable filterable>
|
||||
<el-option v-for="item in unionOptions" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" clearable filterable>
|
||||
<el-option v-for="item in unitOptions" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="答题日期">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.attemptDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择答题日期"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
@change="listActivity"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">问卷</div>
|
||||
<div class="search-item-option">
|
||||
<el-select filterable placeholder="所属问卷" style="width: 100%" @change="doSearch" v-model="pageForm.activityId">
|
||||
<el-option :label="item.title" :value="item.id" :key="item.id" v-for="item in activityOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/工号</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="姓名/工号" clearable></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" style="width: 100%" v-model="pageForm.unionId" clearable filterable>
|
||||
<el-option v-for="item in unionOptions" :label="item.unionname" :value="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="所属单位" style="width: 100%" v-model="pageForm.unitId" clearable filterable>
|
||||
<el-option v-for="item in unitOptions" :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">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.attemptDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择答题日期"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="exportXlsx" icon="el-icon-download" size="small" type="primary" class="mr5">导出xlsx</el-button>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="管理列表">
|
||||
<template #func>
|
||||
<el-button @click="exportXlsx" icon="el-icon-download" size="small" type="primary" class="mr5">导出xlsx</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
@@ -79,7 +111,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
listActivity() {
|
||||
this.$axios.post("/platform/qsv/quizRank/listQuiz", { year: this.pageForm.year }).then((res) => {
|
||||
$.post("/platform/qsv/quizRank/listQuiz", { year: this.pageForm.year }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activityOptions = res.data
|
||||
if (this.activityOptions.length > 0) {
|
||||
@@ -95,12 +127,12 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
exportXlsx() {
|
||||
this.$downLoad("/platform/qsv/quizRank/exportXlsx", this.pageForm)
|
||||
// this.$downLoad("/platform/qsv/quizRank/exportXlsx", this.pageForm)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await this.$businessTool.listUnion()
|
||||
this.unitOptions = await this.$businessTool.listUnit()
|
||||
this.unionOptions = await getUnionList()
|
||||
this.unitOptions = await getUnits()
|
||||
this.listActivity()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -32,7 +32,7 @@ const answer = {
|
||||
},
|
||||
|
||||
list() {
|
||||
this.$axios.post("/platform/qsv/survey/userAnswer", { activityId: this.activityId }).then((res) => {
|
||||
$.post("/platform/qsv/survey/userAnswer", { activityId: this.activityId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableColumns = res.data.tableColumns
|
||||
this.tableData = res.data.tableData
|
||||
@@ -46,7 +46,7 @@ const answer = {
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/qsv/survey/deleteUserAnswer", { id }).then((res) => {
|
||||
$.post("/platform/qsv/survey/deleteUserAnswer", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.list()
|
||||
@@ -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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,21 +4,24 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">年度</div>
|
||||
<div class="search-item-option">
|
||||
<el-date-picker
|
||||
:clearable="false"
|
||||
placeholder="选择年"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<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>-->
|
||||
</table-tool>
|
||||
<el-table :data="tableData" ref="tableRef" @sort-change="pageOrder">
|
||||
@@ -57,7 +60,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
exportXlsx() {
|
||||
this.$axios.post("/platform/qsv/survey/exportXlsx", this.pageForm)
|
||||
$.post("/platform/qsv/survey/exportXlsx", this.pageForm)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -63,7 +63,7 @@ const report = {
|
||||
onOpen(activityId) {
|
||||
this.dialogVisible = true
|
||||
this.activityId = activityId
|
||||
this.$axios.post("/platform/qsv/survey/report", { activityId }).then((res) => {
|
||||
$.post("/platform/qsv/survey/report", { activityId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.subjects = res.data
|
||||
}
|
||||
@@ -72,8 +72,7 @@ const report = {
|
||||
openDetail(subjectId, optionId) {
|
||||
console.log(subjectId)
|
||||
console.log(optionId)
|
||||
this.$axios
|
||||
.post("/platform/qsv/survey/selectOptionUsers", {
|
||||
$.post("/platform/qsv/survey/selectOptionUsers", {
|
||||
activityId: this.activityId,
|
||||
subjectId,
|
||||
optionId
|
||||
|
||||
@@ -0,0 +1,330 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-form .el-select, .el-form .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{id?'信息编辑':'申请加入'}}
|
||||
</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
<el-form :model="formData" :rules="formRules" label-width="100px" ref="AddForm">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="姓名">
|
||||
<el-input placeholder="姓名" readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="所属工会" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="所属单位" prop="unitName">
|
||||
<el-input readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input placeholder="性别" readonly v-model="formData.sex"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="出生年月" prop="birthday">
|
||||
<el-date-picker
|
||||
placeholder="出生年月"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
v-model="formData.birthday"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="籍贯" prop="hometown">
|
||||
<el-input v-model="formData.hometown" placeholder="请填写籍贯"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="学历" prop="education">
|
||||
<el-input v-model="formData.education" placeholder="请填写学历"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="身高(cm)" prop="height">
|
||||
<el-input v-model="formData.height" placeholder="请填写身高" type="number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="婚姻状况" prop="maritalStatus">
|
||||
<el-select clearable v-model="formData.maritalStatus"
|
||||
filterable remote placeholder="请选择婚姻状况"
|
||||
style="width: 100%">
|
||||
<el-option v-for="o in maritalStatusList"
|
||||
:label="o"
|
||||
:value="o"
|
||||
:key="o"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="兴趣爱好" prop="hobby">
|
||||
<el-input v-model="formData.hobby" placeholder="请填写兴趣爱好"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="子女情况" prop="childrenSituation">
|
||||
<el-input v-model="formData.childrenSituation" placeholder="请填写子女情况"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="月收入" prop="monthlyIncome">
|
||||
<el-input-number style="width: 100%" v-model="formData.monthlyIncome"
|
||||
placeholder="请填写月收入"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="住房情况" prop="housingSituation">
|
||||
<el-input maxlength="100" v-model="formData.housingSituation"
|
||||
placeholder="请填写住房情况"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item required label="形象照片" prop="photo">
|
||||
<image-upload ref="imageUpload" :height="100"
|
||||
:width="100" :limit="1"
|
||||
:file-type="['png','jpg']"
|
||||
:file-size="10"
|
||||
v-model="formData.photo"></image-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item required label="上传照片" prop="picFiles">
|
||||
<file-upload :files.sync="formData.picFiles" card :max="10"
|
||||
:type="['jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">请上传jpg、png、jpeg格式的图片,最多不超过10张</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-divider content-position="left">联谊信息</el-divider>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item label="交友意向" prop="intentionFriends">
|
||||
<el-input type="textarea" :rows="3"
|
||||
placeholder="请填写交友意向"
|
||||
v-model="formData.intentionFriends"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item label="个人介绍" prop="personalIntroduction">
|
||||
<el-input type="textarea" :rows="4"
|
||||
placeholder="请填写个人介绍"
|
||||
v-model="formData.personalIntroduction"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" justify="center" type="flex" v-if="!['8030'].includes(formData.singleState)">
|
||||
<el-button :disabled="disabled" @click="doSave()" style="width: 300px" type="primary">保 存
|
||||
</el-button>
|
||||
<el-button :disabled="disabled" @click="doSubmit()" style="width: 300px" type="primary">提 交
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-row class="mt10" justify="center" type="flex" v-if="['8030'].includes(formData.singleState)">
|
||||
<el-button :disabled="disabled" @click="updateInfo()" style="width: 300px" type="primary">确 定
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
id: null,
|
||||
formRules: {
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
birthday: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
maritalStatusList: ["未婚", "离婚", "丧偶"],
|
||||
disabled: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async updateInfo() {
|
||||
const resp = await $.post(loc() + '/doModifyInfo', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/single/myApply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSave() {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = '/platform/single/myApply/doEdit'
|
||||
} else {
|
||||
postUrl = '/platform/single/apply/doSubmit'
|
||||
}
|
||||
this.formData.isSubmit = false
|
||||
const resp = await $.post(postUrl, this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/single/myApply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
const valid = await this.$refs['AddForm'].validate()
|
||||
if (valid) {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = '/platform/single/myApply/doEdit'
|
||||
} else {
|
||||
postUrl = '/platform/single/apply/doSubmit'
|
||||
}
|
||||
this.formData.isSubmit = true
|
||||
this.formData.singleState = '8010'
|
||||
const resp = await $.post(postUrl, this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/single/myApply')
|
||||
}, 1000)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async isEdit() {
|
||||
const id = GetQueryString("id")
|
||||
this.id = id
|
||||
if (id) {
|
||||
await this.findOne(id)
|
||||
}
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get(loc() + '/findOneSingle', {id: id})
|
||||
this.formData = resp.data
|
||||
},
|
||||
initFormData() {
|
||||
if (this.id == null) {
|
||||
this.$set(this.formData, 'birthday', "${@shiro.getPrincipalProperty('birthday')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'sex', "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, 'unitName', "${@shiro.getPrincipalProperty('unit').getName()}")
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
this.$set(this.formData, 'hometown', "${@shiro.getPrincipalProperty('hometown')}")
|
||||
this.$set(this.formData, 'education', "${@shiro.getPrincipalProperty('education')}")
|
||||
}
|
||||
},
|
||||
async isJoinedBeforeAndIsAudit() {
|
||||
const resp = await $.get(loc() + '/isJoinedBeforeAndIsAudit')
|
||||
if (resp.data.auditUser) {
|
||||
this.notifyWarning("您的申请正在处理中或已加入成功,请勿重复提交!")
|
||||
this.disabled = true;
|
||||
return
|
||||
}
|
||||
if (resp.data.singleUser) {
|
||||
const confirm = await this.$confirm('您之前申请加入过,是否显示以往数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
await this.findOne(resp.data.singleUser.id)
|
||||
this.formData.id = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.isEdit()
|
||||
},
|
||||
async created() {
|
||||
this.initFormData();
|
||||
const id = GetQueryString("id")
|
||||
if (!id) {
|
||||
await this.isJoinedBeforeAndIsAudit()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -12,7 +12,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
|
||||
.query-row {
|
||||
height: 70px;
|
||||
height: 55px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@@ -74,96 +74,113 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">性  别:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.sex" style="width: 100%" clearable
|
||||
placeholder="请选择性别">
|
||||
<el-option v-for="sex in sexOptions" :label="sex" :value="sex"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="searchMore">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionGroupId" style="width: 100%"
|
||||
filterable
|
||||
clearable
|
||||
@change="getThreeUnits"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in unionGroups"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">学  历:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.education" style="width: 100%" placeholder="请选择学历" code="Education"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">组成科室:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.threeUnitId" style="width: 100%" filterable
|
||||
clearable
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in threeUnits"
|
||||
:key="item.id"
|
||||
: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" style="width: 100%" clearable
|
||||
placeholder="人员类型"
|
||||
code="PERSON_TYPE"></dict-select>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">单身状况:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.maritalStatus" style="width: 100%" clearable
|
||||
placeholder="请选择单身状况">
|
||||
<el-option v-for="item in maritalStatusOptions" :label="item" :value="item"></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.userState" style="width: 100%" clearable
|
||||
placeholder="在职状态"
|
||||
code="USER_STATE"></dict-select>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">性  别:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.sex" style="width: 100%" clearable
|
||||
placeholder="请选择">
|
||||
<el-option v-for="sex in sexOptions" :label="sex" :value="sex"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <template v-if="searchMore">-->
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">工会小组:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.unionGroupId" style="width: 100%"-->
|
||||
<!-- filterable-->
|
||||
<!-- clearable-->
|
||||
<!-- @change="getThreeUnits"-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in unionGroups"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.groupName"-->
|
||||
<!-- :value="item.id">-->
|
||||
<!-- </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.position"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">组成科室:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <el-select v-model="pageForm.threeUnitId" style="width: 100%" filterable-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in threeUnits"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :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" style="width: 100%" clearable-->
|
||||
<!-- placeholder="人员类型"-->
|
||||
<!-- code="UserType"></dict-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.jobTitle"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="search-item">
|
||||
<div class="search-item-label">会员状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.memberStatus" style="width: 100%" clearable
|
||||
placeholder="会员状态" code="memberStatusText"></dict-select>
|
||||
</div>
|
||||
</div>-->
|
||||
</template>
|
||||
<!-- <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="在职状态"-->
|
||||
<!-- code="UserState"></dict-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.position"-->
|
||||
<!-- @keyup.enter.native="doSearch">-->
|
||||
<!-- </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.jobTitle"-->
|
||||
<!-- @keyup.enter.native="doSearch">-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <!– <div class="search-item">-->
|
||||
<!-- <div class="search-item-label">会员状态:</div>-->
|
||||
<!-- <div class="search-item-option">-->
|
||||
<!-- <dict-select v-model="pageForm.memberStatus" style="width: 100%" clearable-->
|
||||
<!-- placeholder="会员状态" code="memberStatusText"></dict-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>–>-->
|
||||
<!-- </template>-->
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
<more v-model="searchMore"></more>
|
||||
<!-- <more v-model="searchMore"></more>-->
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -206,6 +223,26 @@ layout("/layouts/platform.html"){
|
||||
</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">年龄范围:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
<el-row type="flex" style="align-items: center">
|
||||
<el-col :span="15">
|
||||
<el-slider
|
||||
v-model="pageForm.age"
|
||||
range
|
||||
show-stops
|
||||
:max="100">
|
||||
</el-slider>
|
||||
</el-col>
|
||||
<el-col :span="9" class="pl20">
|
||||
当前范围:{{ pageForm.age }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--<el-row type="flex" align="middle" class="query-row">
|
||||
<el-col class="query-row-title">模糊查询:</el-col>
|
||||
<el-col class="query-row-content">
|
||||
@@ -217,8 +254,16 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="教工列表" :app="this">
|
||||
<template #func><!--el-icon-printer-->
|
||||
<el-button type="primary" size="small" icon="el-icon-upload2" @click="openImport">单身教工导入</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" @click="exportSingle">单身教工导出</el-button>
|
||||
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isJoin">
|
||||
<el-radio-button :label="true">加入</el-radio-button>
|
||||
<el-radio-button :label="false">退出</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-button type="primary" size="small" icon="el-icon-upload2" @click="openImport">单身教工导入
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" @click="exportSingle">单身教工导出
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
@@ -260,10 +305,7 @@ layout("/layouts/platform.html"){
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
:command="{type:'edit',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" :command="{type:'delete',data:scope.row}">
|
||||
:command="{type:'delete',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -276,119 +318,41 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</template>
|
||||
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="$refs.member.save()">提交</el-button>
|
||||
<template #view>
|
||||
<single-info ref="viewInfo"></single-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<member ref="member" :id="userId" @save="afterEdit"></member>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
|
||||
<el-tabs v-model="active">
|
||||
<el-tab-pane label="个人信息" name="info">
|
||||
<member ref="memberInfo" :id="userId" view></member>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="变更记录" name="change">
|
||||
<mem-change-records :userid="userId"></mem-change-records>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<file-import ref="viewImport" :temp_url="tempUrl"
|
||||
:post_url="postUrl" :is_show_radio="isShowRadio"></file-import>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
title="导入"
|
||||
:visible.sync="importVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="50%">
|
||||
<el-timeline>
|
||||
<el-timeline-item timestamp="下载模板" placement="top">
|
||||
<el-card>
|
||||
<el-button size="medium" type=""
|
||||
@click="location.href='/platform/single/list/downloadImport'"
|
||||
icon="el-icon-download">下载模板
|
||||
</el-button>
|
||||
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item timestamp="上传文件" placement="top">
|
||||
<el-card>
|
||||
<el-form>
|
||||
<el-form-item label="请选择更新模式">
|
||||
<el-radio-group v-model="importData.isFlag">
|
||||
<el-radio-button label="true">清空更新</el-radio-button>
|
||||
<el-radio-button label="false">追加</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-upload
|
||||
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>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
|
||||
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<!--<script src="https://cdn.staticfile.org/xlsx/0.18.5/xlsx.full.min.js"></script>-->
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
data() {
|
||||
return {
|
||||
tempUrl:'/platform/single/list/downloadImport',
|
||||
postUrl:'/platform/single/list/doImport',
|
||||
isShowRadio:false,
|
||||
labelYear: "",
|
||||
archiveDialogVisible: false,
|
||||
archiveLoading: false,
|
||||
sexOptions: ['男', '女'],
|
||||
|
||||
maritalStatusOptions:['未婚','离异','丧偶'],
|
||||
submitLoading: false,
|
||||
pageForm: {
|
||||
personTypes: [],
|
||||
userStates: [],
|
||||
age: [0, 0],
|
||||
searchName: "username",
|
||||
isJoin:true,
|
||||
},
|
||||
|
||||
userId: "",
|
||||
@@ -401,21 +365,14 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'idcard', label: '身份证号', width: 170},
|
||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
// {prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'marriage', label: '婚否', checked: 0},
|
||||
{prop: 'education', label: '学历', checked: 0},
|
||||
{prop: 'hometown', label: '籍贯', checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
// {prop: 'memberNumber', label: '会员号', checked: 0},
|
||||
{prop: 'education', label: '学历', sortable: true},
|
||||
{prop: 'maritalStatus', label: '单身状况', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
],
|
||||
personTypeOptions: [],
|
||||
userStateOptions: [],
|
||||
@@ -429,34 +386,17 @@ layout("/layouts/platform.html"){
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
importVisible: false,
|
||||
importLoading: false,
|
||||
importData: {
|
||||
fileList: [],
|
||||
isFlag: false
|
||||
},
|
||||
errorInfoData: {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
openImport(){
|
||||
this.importData = {
|
||||
fileList: [],
|
||||
isFlag: true
|
||||
}
|
||||
this.errorInfoData = {
|
||||
totalCount: 0,
|
||||
successCount: 0,
|
||||
errorCount: 0,
|
||||
errorList: 0,
|
||||
}
|
||||
this.importVisible = true;
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'single-info': httpVueLoader('/components/singleuser/SingUserInfo.vue'),
|
||||
'file-import': httpVueLoader('/components/plugins/FileImport.vue')
|
||||
},
|
||||
methods: {
|
||||
openImport() {
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
checkUserStateType(state) {
|
||||
let idx = this.pageForm.userStates.indexOf(state)
|
||||
@@ -495,9 +435,10 @@ layout("/layouts/platform.html"){
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" === a) {//确认后再执行
|
||||
const resp = await $.post(loc() + "/delete", {userId});
|
||||
const resp = await $.post("/platform/single/myApply/removeById", {userId});
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
@@ -505,26 +446,20 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
});
|
||||
},
|
||||
openEdit(userId) {
|
||||
this.userId = userId
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
afterEdit() {
|
||||
this.userId = ''
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
openView(userId) {
|
||||
this.active = 'info'
|
||||
this.userId = userId
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.activeName = '1'
|
||||
this.$refs.viewInfo.openView(id)
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data.id)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data.id)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data.id)
|
||||
}
|
||||
@@ -550,6 +485,7 @@ layout("/layouts/platform.html"){
|
||||
const pageForm = clone(this.pageForm)
|
||||
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
|
||||
pageForm.userStates = JSON.stringify(pageForm.userStates)
|
||||
pageForm.age = JSON.stringify(pageForm.age)
|
||||
|
||||
$.post(loc() + "/pageData", pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
@@ -562,72 +498,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.notifyWarning("请选择文件!")
|
||||
return
|
||||
}
|
||||
const data = new FormData();
|
||||
data.append("isFlag", this.importData.isFlag)
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name);
|
||||
});
|
||||
this.importLoading = true
|
||||
$.ajax({
|
||||
url: loc() + "/doImport",
|
||||
type: "post",
|
||||
data: data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (data) => {
|
||||
this.importLoading = false
|
||||
if (data.code === 0 && data.data === null) {
|
||||
this.pageData();
|
||||
this.notifySuccess("导入成功")
|
||||
this.importVisible = false
|
||||
} else {
|
||||
this.notifyWarning("导入失败")
|
||||
this.errorInfoData = data.data
|
||||
}
|
||||
},
|
||||
error: (data) => {
|
||||
this.notifyWarning("导入失败")
|
||||
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);
|
||||
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
@@ -638,16 +508,9 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.personTypeOptions = await getDictOptions("PERSON_TYPE")
|
||||
this.userStateOptions = await getDictOptions("USER_STATE")
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
|
||||
'member-cnd': httpVueLoader('/components/member/MemberCnd.vue'),
|
||||
},
|
||||
this.personTypeOptions = await getDictOptions("UserType")
|
||||
this.userStateOptions = await getDictOptions("UserState")
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<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-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="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%;"
|
||||
@change="getThreeUnits"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="searchMore">
|
||||
<template v-if="isThreeUnit">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.unionGroupId" style="width: 100%"
|
||||
filterable
|
||||
clearable
|
||||
@change="getThreeUnits"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in unionGroups"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="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 v-model="pageForm.threeUnitId" style="width: 100%"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in threeUnits"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select v-model="pageForm.personType" style="width: 100%"
|
||||
clearable
|
||||
placeholder="人员类型"
|
||||
code="UserType"></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="在职状态"
|
||||
code="UserState"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
<more v-model="searchMore"></more>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请列表" :app="this">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isJoin">
|
||||
<el-radio-button :label="true">加入</el-radio-button>
|
||||
<el-radio-button :label="false">退出</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></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"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center" label="操作" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="['8000','8030'].includes(scope.row.singleState)"
|
||||
:command="{type:'modify',data:scope.row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="['8030'].includes(scope.row.singleState)"
|
||||
:command="{type:'exitSingle',data:scope.row}">
|
||||
退出
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="['8000'].includes(scope.row.singleState)"
|
||||
:command="{type:'remove',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="!['8000'].includes(scope.row.singleState) && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}"
|
||||
:command="{type:'remove',data:scope.row}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<single-info ref="viewInfo"></single-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isThreeUnit: false,
|
||||
pageForm:{
|
||||
isJoin:true,
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'maritalStatus', label: '婚姻状况'},
|
||||
{prop: 'stateName', label: '申请状态'},
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'single-info': httpVueLoader('/components/singleuser/SingUserInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type === 'view') {
|
||||
this.openView(data.id)
|
||||
} else if (type === 'modify') {
|
||||
this.openEdit(data.id)
|
||||
} else if (type === 'remove') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'exitSingle'){
|
||||
this.exitSingle(data.id)
|
||||
}
|
||||
},
|
||||
openView(id){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.activeName = '1'
|
||||
this.$refs.viewInfo.openView(id)
|
||||
},
|
||||
openEdit(id){
|
||||
sublime.jumpPagePjax('/platform/single/apply?id=' + id)
|
||||
},
|
||||
async doDelete(id){
|
||||
const resp = await $.get(loc() + '/removeById',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.notifySuccess(resp.msg)
|
||||
}else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
},
|
||||
async exitSingle(id){
|
||||
const confirm = await this.$confirm('您确定要【退出】吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.get(loc() + '/exitSingle',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.notifySuccess(resp.msg)
|
||||
}else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.$set(this.pageForm, "unionGroupId", null)
|
||||
this.$set(this.pageForm, "threeUnitId", null)
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||
if (this.isThreeUnit) {
|
||||
this.tableColumns.forEach(v => {
|
||||
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
||||
v.checked = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,389 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="getThreeUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="searchMore">
|
||||
<template v-if="isThreeUnit">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="getThreeUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionGroupId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
v-for="item in unionGroups">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">组成科室:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.threeUnitId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in threeUnits">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select clearable code="UserType"
|
||||
placeholder="人员类型"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.personType"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select clearable code="UserState"
|
||||
placeholder="在职状态"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.userState"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
<more v-model="searchMore"></more>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="申请列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small"
|
||||
v-model="pageForm.isJoin">
|
||||
<el-radio-button :label="true">加入({{auditNum.joinCount}})
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="false">退出({{auditNum.exitCount}})
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-table"
|
||||
ref="table"
|
||||
row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center"
|
||||
label="操作" prop="userOnline">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'audit',data:scope.row}"
|
||||
v-if="['8020','8050'].includes(scope.row.singleState)">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'rollback',data:scope.row}"
|
||||
v-if="['8025','8030','8055','8060'].includes(scope.row.singleState)">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<single-info ref="viewInfo"></single-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<single-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<el-form :model="formData" :rules="formRules" label-position="right"
|
||||
label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="auditSign" label="审核签字">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(0)" type="danger">
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button @click="doReview(1)" type="primary">
|
||||
通过
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</single-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
isThreeUnit: false,
|
||||
pageForm: {
|
||||
isJoin: true,
|
||||
isAudit: false,
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'education', label: '学历'},
|
||||
{prop: 'maritalStatus', label: '单身状况'},
|
||||
{prop: 'stateName', label: '申请状态'},
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
formRules: {
|
||||
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
auditNum: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'single-info': httpVueLoader('/components/singleuser/SingUserInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
doReview(row) {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
isJoin: this.pageForm.isJoin
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
await this.getAuditNum();
|
||||
this.notifySuccess(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
this.id = data.id;
|
||||
if (type === 'view') {
|
||||
this.openView(data.id)
|
||||
} else if (type === 'audit') {
|
||||
this.openAudit(data.id)
|
||||
} else if (type === 'rollback') {
|
||||
this.doRollBack(data.id)
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(id)
|
||||
},
|
||||
openAudit(id) {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'schoolAudit'
|
||||
this.$refs.auditInfo.openView(id)
|
||||
},
|
||||
async doRollBack(id) {
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack', {
|
||||
id: id,
|
||||
isJoin: this.pageForm.isJoin
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.pageData();
|
||||
await this.getAuditNum();
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doSearch() {
|
||||
this.pageData();
|
||||
await this.getAuditNum();
|
||||
},
|
||||
async getAuditNum() {
|
||||
const resp = await $.get(loc() + '/getAuditNum', {
|
||||
isAudit: this.pageForm.isAudit,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.auditNum = resp.data
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.$set(this.pageForm, "unionGroupId", null)
|
||||
this.$set(this.pageForm, "threeUnitId", null)
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||
if (this.isThreeUnit) {
|
||||
this.tableColumns.forEach(v => {
|
||||
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
||||
v.checked = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
await this.getAuditNum()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -87,13 +87,13 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column v-if="searchType==='按分工会统计'" align="center" header-align="center" label="分工会"
|
||||
width="220px">
|
||||
<template scope="{row}">
|
||||
<!--{{isDisPlayCode?'('+row.unionCode+')':null}}-->{{row.unionName}}
|
||||
<!--{{isDisPlayCode?'('+row.unionCode+')':null}}-->{{row.unName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="searchType==='按单位统计'" align="center" header-align="center" label="单位"
|
||||
width="220px">
|
||||
<template scope="{row}">
|
||||
<!--{{isDisPlayCode?'('+row.unitCode+')':null}}-->{{row.unitName}}
|
||||
<!--{{isDisPlayCode?'('+row.unitCode+')':null}}-->{{row.unName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalNumber" label="总人数" align="center" sortable></el-table-column>
|
||||
@@ -187,7 +187,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.personTypeOptions = await getDictOptions("PERSON_TYPE")
|
||||
this.personTypeOptions = await getDictOptions("UserType")
|
||||
this.unions = await getUnions(null)
|
||||
this.units = await getUnits(null)
|
||||
this.pageData();
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="search">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.searchKeyword">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="getThreeUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template v-if="searchMore">
|
||||
<template v-if="isThreeUnit">
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工会小组:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="getThreeUnits" clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.unionGroupId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id"
|
||||
v-for="item in unionGroups">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">组成科室:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable
|
||||
placeholder="请选择"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.threeUnitId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in threeUnits">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">人员类型:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select clearable code="UserType"
|
||||
placeholder="人员类型"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.personType"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">在职状态:</div>
|
||||
<div class="search-item-option">
|
||||
<dict-select clearable code="UserState"
|
||||
placeholder="在职状态"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.userState"></dict-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
<more v-model="searchMore"></more>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="申请列表">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small"
|
||||
v-model="pageForm.isJoin">
|
||||
<el-radio-button :label="true">加入({{auditNum.joinCount}})
|
||||
</el-radio-button>
|
||||
<el-radio-button :label="false">退出({{auditNum.exitCount}})
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small"
|
||||
v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-table"
|
||||
ref="table"
|
||||
row-key="id" style="width: 100%" v-loading="tableLoading">
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" header-align="center"
|
||||
label="操作" prop="userOnline">
|
||||
<template scope="scope">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:scope.row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'audit',data:scope.row}"
|
||||
v-if="['8010','8040'].includes(scope.row.singleState)">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'rollback',data:scope.row}"
|
||||
v-if="['8015','8020','8045','8050'].includes(scope.row.singleState)">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<single-info ref="viewInfo"></single-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<single-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="分工会审核" name="unionAudit">
|
||||
<el-form :model="formData" :rules="formRules" label-position="right"
|
||||
label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人员" prop="username">
|
||||
<el-input disabled
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.auditTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="审核意见" prop="auditOpinion">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="auditSign" label="审核签字">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(0)" type="danger">
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button @click="doReview(1)" type="primary">
|
||||
通过
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</single-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
isThreeUnit: false,
|
||||
pageForm: {
|
||||
isJoin: true,
|
||||
isAudit: false,
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'username', label: '姓名', sortable: true},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true, checked: 0},
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'education', label: '学历'},
|
||||
{prop: 'maritalStatus', label: '单身状况'},
|
||||
{prop: 'stateName', label: '申请状态'},
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
formRules: {
|
||||
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
auditNum: {}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'single-info': httpVueLoader('/components/singleuser/SingUserInfo.vue')
|
||||
},
|
||||
methods: {
|
||||
doReview(row) {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
isJoin: this.pageForm.isJoin
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
await this.getAuditNum();
|
||||
this.notifySuccess(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
this.id = data.id;
|
||||
if (type === 'view') {
|
||||
this.openView(data.id)
|
||||
} else if (type === 'audit') {
|
||||
this.openAudit(data.id)
|
||||
} else if (type === 'rollback') {
|
||||
this.doRollBack(data.id)
|
||||
}
|
||||
},
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(id)
|
||||
},
|
||||
openAudit(id) {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'unionAudit'
|
||||
this.$refs.auditInfo.openView(id)
|
||||
},
|
||||
async doRollBack(id) {
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack', {
|
||||
id: id,
|
||||
isJoin: this.pageForm.isJoin
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.pageData();
|
||||
await this.getAuditNum();
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async doSearch() {
|
||||
this.pageData();
|
||||
await this.getAuditNum();
|
||||
},
|
||||
async getAuditNum() {
|
||||
const resp = await $.get(loc() + '/getAuditNum', {
|
||||
isAudit: this.pageForm.isAudit,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.auditNum = resp.data
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.$set(this.pageForm, "unionGroupId", null)
|
||||
this.$set(this.pageForm, "threeUnitId", null)
|
||||
this.units = []
|
||||
this.unionGroups = []
|
||||
this.threeUnits = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.isThreeUnit = await getConfigKey('isThreeUnit') === 'true'
|
||||
if (this.isThreeUnit) {
|
||||
this.tableColumns.forEach(v => {
|
||||
if (["threeUnitName", "unionGroupName"].includes(v.prop)) {
|
||||
v.checked = 1
|
||||
}
|
||||
})
|
||||
}
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
await this.getAuditNum();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -50,13 +50,19 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="变更记录(默认查询当天变更记录,如需查询更多变更记录,请选择上方【变更日期】后进行搜索)">
|
||||
<template #func>
|
||||
<el-radio-group @change="search" class="mr5" size="small" v-model="pageForm.isOperate">
|
||||
<el-button type="primary" style="margin-right: 10px" size="small" @click="doBatchChange">批量确认</el-button>
|
||||
|
||||
<el-radio-group @change="search" class="mr5" size="small"
|
||||
v-model="pageForm.isOperate">
|
||||
<el-radio-button label="true">已操作</el-radio-button>
|
||||
<el-radio-button label="false">未操作</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table"
|
||||
@selection-change="tableHandleSelectionChange"
|
||||
row-key="id" style="width: 100%">
|
||||
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column :index="indexMethod"
|
||||
header-align="center"
|
||||
label="序号" type="index" width="80px"></el-table-column>
|
||||
@@ -119,15 +125,16 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "人员类型", sortable: true },
|
||||
{ prop: "unionname", label: "所属工会", sortable: true },
|
||||
{ prop: "changeInfosStr", label: "变更详细信息", sortable: true },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true, width: "160px" },
|
||||
{ prop: "changeTime", label: "变更时间", sortable: true },
|
||||
{ prop: "changeInfosStr", label: "变更详细信息", sortable: true, width: "300px" },
|
||||
{ prop: "changeTypes", label: "变更类型", sortable: true, width: "180px" },
|
||||
{ prop: "changeTime", label: "变更时间", sortable: true, width: "150px" },
|
||||
],
|
||||
unions: [],
|
||||
units: [],
|
||||
isView: true,
|
||||
|
||||
changeTypeData: []
|
||||
changeTypeData: [],
|
||||
checkUsers: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -135,6 +142,39 @@ layout("/layouts/platform.html"){
|
||||
'user-change-info': USER_CHANGE_INFO
|
||||
},
|
||||
methods: {
|
||||
doBatchChange(){
|
||||
if (this.checkUsers.length === 0) {
|
||||
this.$message.warning('请选择需要批量确认的用户数据')
|
||||
return
|
||||
}
|
||||
this.$confirm('确认要批量变更勾选用户吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const ids = this.checkUsers.map(item => item.id)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据保存中请稍后...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
const resp = await $.post('/platform/sourcechange/manage/doBatchChange', {
|
||||
data: JSON.stringify(ids)
|
||||
})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$refs.table.clearSelection()
|
||||
await this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
tableHandleSelectionChange(val){
|
||||
this.checkUsers = val
|
||||
},
|
||||
async doSubmit(formData){
|
||||
const resp = await $.post('/platform/sourcechange/manage/doSubmit', formData)
|
||||
if (resp.code === 0) {
|
||||
@@ -149,6 +189,11 @@ layout("/layouts/platform.html"){
|
||||
this.isView = flag
|
||||
this.$refs.guava.view()
|
||||
this.$nextTick(() => {
|
||||
if (row.changeInfosStr === '新入职') {
|
||||
this.$refs.userChangeInfoRef.activeName = flag ? 'basicInfo' : 'userChangInfo'
|
||||
} else {
|
||||
this.$refs.userChangeInfoRef.activeName = 'changeInfo'
|
||||
}
|
||||
this.$refs.userChangeInfoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -287,7 +287,7 @@ const USER_CHANGE_INFO = {
|
||||
|
||||
<el-row justify="end" v-if="!isView" type="flex" class="mt10">
|
||||
<el-button @click="$emit('do-back')" type="primary">返 回</el-button>
|
||||
<el-button @click="doSubmit" type="primary">提 交</el-button>
|
||||
<el-button @click="doSubmit" type="primary">确认变更</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -309,7 +309,7 @@ const USER_CHANGE_INFO = {
|
||||
</el-table>
|
||||
<el-row justify="end" v-if="!isView || !formData.isOperate" type="flex" class="mt10">
|
||||
<el-button @click="$emit('do-back')" type="primary">返 回</el-button>
|
||||
<el-button @click="doSubmit" type="primary">提 交</el-button>
|
||||
<el-button @click="doSubmit" type="primary">确认变更</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
@@ -61,7 +61,7 @@ layout("/layouts/platform.html"){
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
this.$axios.post(loc() + "/disable", { id }).then((resp) => {
|
||||
$.post(loc() + "/disable", { id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
|
||||
@@ -120,7 +120,7 @@ layout("/layouts/platform.html"){
|
||||
签到二维码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="sendMsg(row)">
|
||||
通知
|
||||
报名通知
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="openView(row)">
|
||||
查看
|
||||
@@ -223,6 +223,8 @@ layout("/layouts/platform.html"){
|
||||
courseTimeList: [],
|
||||
viewMapDialog: false,
|
||||
clickRow: {},
|
||||
|
||||
scheduledDate: '13:30'
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -231,8 +233,25 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
methods: {
|
||||
sendMsg(row) {
|
||||
this.url = `<a href="` + (APP_DOMAIN + "/platform/mobile/trainSignUpActivity/trainList") + `">点击参与</a>`
|
||||
this.$refs.sendMsg.openDialog(row.activityGroupId)
|
||||
this.$confirm('您确认要发送报名提醒吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(async ({value}) => {
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/sendMsg' ,{
|
||||
activityId: row.id,
|
||||
activityGroupId: row.activityGroupId,
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
// this.url = `<a href="` + (APP_DOMAIN + "/platform/mobile/trainSignUpActivity/trainList") + `">点击参与</a>`
|
||||
// this.$refs.sendMsg.openDialog(row.activityGroupId)
|
||||
|
||||
},
|
||||
openCode(id) {
|
||||
this.$refs.openQRCode.openCode("/platform/mobile/trainSignUpActivity/trainList")
|
||||
|
||||
@@ -36,7 +36,6 @@ layout("/layouts/platform.html"){
|
||||
let map = null
|
||||
let marker = null
|
||||
let geocoder = null
|
||||
let E = window.wangEditor
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
@@ -54,6 +53,7 @@ layout("/layouts/platform.html"){
|
||||
fromEdit: '',
|
||||
formData: {
|
||||
notice: false,
|
||||
isIntegral: false,
|
||||
courseList: [
|
||||
{courseName: '1', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1},
|
||||
{courseName: '2', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1}
|
||||
@@ -66,6 +66,7 @@ layout("/layouts/platform.html"){
|
||||
limitNum: 1,
|
||||
typeLimits: [],
|
||||
activityMode: 1,
|
||||
pushHome: 0,
|
||||
},
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
@@ -161,7 +162,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
//添加培训班
|
||||
addCourse() {
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1})
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false})
|
||||
},
|
||||
//删除培训班
|
||||
async removeTableCourse(index) {
|
||||
@@ -231,7 +232,7 @@ layout("/layouts/platform.html"){
|
||||
this.unionLimitIndex = index
|
||||
this.setUpUnionLimitDialog = true
|
||||
if (!this.formData.courseList[this.unionLimitIndex].unionLimit || this.formData.courseList[this.unionLimitIndex].unionLimit.length === 0) {
|
||||
const resp = await $.get('/platform/trainSingUp/manage/activity/getUnionLimit', {activityScopeId: this.formData.activityGroupId})
|
||||
const resp = await $.get('/platform/trainSingUp/manage/activity/add/getUnionLimit', {activityScopeId: this.formData.activityGroupId})
|
||||
if (resp.code === 0) {
|
||||
this.$set(this.formData.courseList[this.unionLimitIndex], 'unionLimit', resp.data)
|
||||
}
|
||||
@@ -395,7 +396,7 @@ layout("/layouts/platform.html"){
|
||||
const courseValid = this.formData.courseList.some((v, i) => {
|
||||
const basicValid = v.courseName && v.coursePeopleNumber && v.campus
|
||||
&& v.courseLocation && v.courseInstructor && v.courseType
|
||||
const timeValid = v.courseTimeList && v.courseTimeList.length > 0 && v.courseTimeList.every(x => {
|
||||
const timeValid = v.courseTimeList.length > 0 && v.courseTimeList.every(x => {
|
||||
return x.courseStartTime && x.courseEndTime && (x.courseStartTime < x.courseEndTime)
|
||||
})
|
||||
|
||||
@@ -435,18 +436,13 @@ layout("/layouts/platform.html"){
|
||||
|
||||
//cloneData.conditionStructure.conditions = cloneData.conditionStructure.conditions.filter(v => v.field && v.fieldObj && v.operational && v.value)
|
||||
|
||||
if (cloneData.cover && cloneData.cover.length > 0) {
|
||||
cloneData.cover = cloneData.cover[0]
|
||||
cloneData.activitySignUpStartTime = cloneData.activitySignTime !== undefined ? cloneData.activitySignTime[0] : null
|
||||
cloneData.activitySignUpEndTime = cloneData.activitySignTime !== undefined ? cloneData.activitySignTime[1] : null
|
||||
cloneData.activityStartTime = cloneData.activityTime !== undefined ? cloneData.activityTime[0] : null
|
||||
cloneData.activityEndTime = cloneData.activityTime !== undefined ? cloneData.activityTime[1] : null
|
||||
if(cloneData.activityStartTime !== undefined && cloneData.activityStartTime !== null) {
|
||||
cloneData.year = new Date(cloneData.activityStartTime).getFullYear()
|
||||
}
|
||||
if (cloneData.wechat && cloneData.wechat.length > 0) {
|
||||
cloneData.wechat = cloneData.wechat[0]
|
||||
}
|
||||
cloneData.activitySignUpStartTime = cloneData.activitySignTime[0]
|
||||
cloneData.activitySignUpEndTime = cloneData.activitySignTime[1]
|
||||
cloneData.activityStartTime = cloneData.activityTime[0]
|
||||
cloneData.activityEndTime = cloneData.activityTime[1]
|
||||
cloneData.year = new Date(cloneData.activityStartTime).getFullYear()
|
||||
|
||||
/*const limitNumArray = []
|
||||
this.formData.typeLimits.forEach(item => {
|
||||
limitNumArray.push({
|
||||
@@ -467,7 +463,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
cloneData.typeLimits = limitNumArray
|
||||
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/doHandle', {data: JSON.stringify(cloneData)})
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/doHandle', {data: JSON.stringify(cloneData), flag: flag})
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
@@ -485,44 +481,24 @@ layout("/layouts/platform.html"){
|
||||
if (id) {
|
||||
const resp = await $.get('/platform/trainSingUp/manage/activity/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.cover) {
|
||||
resp.data.cover = [resp.data.cover]
|
||||
}
|
||||
if (resp.data.wechat) {
|
||||
resp.data.wechat = [resp.data.wechat]
|
||||
}
|
||||
this.formData = resp.data
|
||||
const type = this.trainTypeList.find(o => o.code === this.formData.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
this.$nextTick(() => {
|
||||
$("#introduce").html("")
|
||||
var editor = new E("#introduce")
|
||||
editor.config.onchange = (html) => {
|
||||
this.formData.introduce = html.replace(/<p\><\/p>/g, '')
|
||||
}
|
||||
editor.create()
|
||||
editor.txt.html(resp.data.introduce)
|
||||
})
|
||||
|
||||
this.formData.courseList.forEach(item => {
|
||||
const type = this.courseTypeList.find(o => o.id === item.courseType)
|
||||
if(type && type.isBringFamily === true) {
|
||||
this.$set(item, 'isBringFamily', true)
|
||||
item.reserveMode = 1
|
||||
} else {
|
||||
this.$set(item, 'isBringFamily', false)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
$("#introduce").html("")
|
||||
var editor = new E("#introduce")
|
||||
editor.config.onchange = (html) => {
|
||||
this.formData.introduce = html.replace(/<p\><\/p>/g, '')
|
||||
if (this.formData.courseList && this.formData.courseList.length > 0) {
|
||||
this.formData.courseList.forEach(item => {
|
||||
const type = this.courseTypeList.find(o => o.id === item.courseType)
|
||||
if (type && type.isBringFamily === true) {
|
||||
this.$set(item, 'isBringFamily', true)
|
||||
item.reserveMode = 1
|
||||
} else {
|
||||
this.$set(item, 'isBringFamily', false)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false})
|
||||
}
|
||||
editor.create()
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async initCnd() {
|
||||
@@ -592,7 +568,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
//获取培训班报名人数
|
||||
async getRegisterUserCount(courseId) {
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/getRegisterUserCount', {courseId})
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/add/getRegisterUserCount', {courseId})
|
||||
return resp.code === 0 ? resp.data : 0
|
||||
},
|
||||
setSignUpCondition() {
|
||||
@@ -684,16 +660,16 @@ layout("/layouts/platform.html"){
|
||||
this.trainType = type ? type.name : ''
|
||||
},
|
||||
async getHistoricalActList() {
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/getHistoricalActList', {})
|
||||
const resp = await $.post('/platform/trainSingUp/manage/activity/add/getHistoricalActList', {})
|
||||
return resp.data
|
||||
},
|
||||
async historicalActChange(val) {
|
||||
const resp = await $.get('/platform/trainSingUp/manage/activity/findOne', {id: val})
|
||||
if (resp.code === 0) {
|
||||
resp.data.cover = [resp.data.cover]
|
||||
if (resp.data.wechat) {
|
||||
resp.data.wechat = [resp.data.wechat]
|
||||
}
|
||||
// resp.data.cover = [resp.data.cover]
|
||||
// if (resp.data.wechat) {
|
||||
// resp.data.wechat = [resp.data.wechat]
|
||||
// }
|
||||
this.formData = resp.data
|
||||
const type = this.trainTypeList.find(o => o.code === this.formData.trainType)
|
||||
this.trainType = type ? type.name : '培训班'
|
||||
@@ -736,9 +712,15 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
conditionStructure(val) {
|
||||
console.log(val)
|
||||
this.formData.courseList[this.userScopeIndex].conditionStructure = val
|
||||
},
|
||||
'formData.activityGroupId': {
|
||||
async handler(newVal, oldVal) {
|
||||
this.activityGroupList = await getActivityGroup()
|
||||
this.userScopeDialog = false
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -188,12 +188,15 @@ layout("/layouts/platform.html"){
|
||||
<div slot="header" class="clearfix"
|
||||
style="font-size: 16px;padding: 5px 0"
|
||||
@click="openApply(item)">
|
||||
<div style="width: 88%; white-space: nowrap; overflow: hidden; display: inline-block; text-overflow: ellipsis">
|
||||
{{item.activityName}}
|
||||
</div>
|
||||
<el-tooltip class="item" effect="dark" :content="item.activityName"
|
||||
placement="top-start">
|
||||
|
||||
<span v-if="item.activityName.length<=10">{{item.activityName}}</span>
|
||||
<span v-else>{{item.activityName.substr(0,10)}}...</span>
|
||||
</el-tooltip>
|
||||
<el-button @click="openApply(item)" class="reserve_btn"
|
||||
type="text">
|
||||
报名
|
||||
请选择活动报名
|
||||
</el-button>
|
||||
</div>
|
||||
<div @click="openApply(item)">
|
||||
@@ -223,13 +226,14 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<div class="text e-item">
|
||||
<span style="color: gray">报名时间:</span>
|
||||
{{moment(item.activitySignUpStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(item.activitySignUpEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
{{moment(item.activitySignUpStartTime)
|
||||
.format('MM/DD HH:mm')}} 至
|
||||
{{moment(item.activitySignUpEndTime).format('MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div class="text item">
|
||||
<span style="color: gray">活动时间:</span>
|
||||
{{moment(item.activityStartTime).format('YYYY/MM/DD HH:mm')}} 至
|
||||
{{moment(item.activityEndTime).format('YYYY/MM/DD HH:mm')}}
|
||||
{{moment(item.activityStartTime).format('MM/DD HH:mm')}} 至
|
||||
{{moment(item.activityEndTime).format('MM/DD HH:mm')}}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -237,7 +241,7 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<el-empty description="暂无数据" v-else></el-empty>
|
||||
<el-empty v-else description="暂无数据"></el-empty>
|
||||
</el-row>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
@@ -246,7 +250,7 @@ layout("/layouts/platform.html"){
|
||||
<template #label_end>
|
||||
<div class="search-item-option">
|
||||
<el-select v-model="pageForm.courseTypeId"
|
||||
:placeholder="'请选择' + trainType"
|
||||
:placeholder="'请选择' + trainType + '类型'"
|
||||
filterable clearable
|
||||
style="width: 100%;margin-bottom: 5px;margin-left: 10px"
|
||||
@change="doSearch">
|
||||
@@ -274,6 +278,7 @@ layout("/layouts/platform.html"){
|
||||
:key="column.prop"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
show-overflow-tooltip>
|
||||
|
||||
@@ -284,9 +289,17 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='courseTime'">
|
||||
<el-button style="padding: 0" @click="openViewCourseTime(row.id)" type="text">
|
||||
点击查看{{trainType}}时间
|
||||
</el-button>
|
||||
<template v-if="row.courseName.includes('时间待定')">
|
||||
<span style="color: #e5a15e">活动时间另行通知</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button v-if="row.courseList && row.courseList.length == 1" type="text" style="padding: 0">
|
||||
{{moment(row.courseList[0].courseStartTime).format('MM-DD HH:mm')}}至{{moment(row.courseList[0].courseStartTime).format('MM-DD HH:mm')}}
|
||||
</el-button>
|
||||
<el-button v-else style="padding: 0" @click="openViewCourseTime(row)" type="text">
|
||||
点击查看{{trainType}}时间
|
||||
</el-button>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='applyNum'">
|
||||
@@ -307,108 +320,6 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<el-form :model="formData" ref="form" label-width="120px">
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input readonly v-model="formData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="所在单位" prop="unitName">
|
||||
<el-input readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="所属工会" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input readonly v-model="formData.sex"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item
|
||||
v-for="(column, index) in formData.trainMobileSignColumnList"
|
||||
:prop="'trainMobileSignColumnList.' + index + '.columnValue'"
|
||||
:label="column.columnName"
|
||||
:key="column.columnCode"
|
||||
:rules="{ required: column.isRequired,
|
||||
message: (['SELECT', 'FILE'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName,
|
||||
trigger: 'blur'}">
|
||||
<!--文本框-->
|
||||
<template v-if="!['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
<el-input
|
||||
v-model="column.columnValue"
|
||||
:placeholder="'请填写' + column.columnName"
|
||||
:type="['INT'].includes(column.columnType) ? 'number' : ''"
|
||||
></el-input>
|
||||
</template>
|
||||
<!--选择框-->
|
||||
<template v-else-if="['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
<el-select v-model="column.columnValue"
|
||||
clearable
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in column.selectValues"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<!--时间框-->
|
||||
<template v-else-if="['DATE', 'DATETIME'].includes(column.columnType)">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="column.columnValue"
|
||||
:type="column.columnType === 'DATE' ? 'date' : 'datetime'"
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
:value-format="column.columnType === 'DATE' ? 'yyyy-MM-dd' : 'yyyy-MM-dd HH:mm:ss'">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<!--文件-->
|
||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||
<file-upload
|
||||
:files.sync="column.columnValue"
|
||||
:max="column.fileNumber"
|
||||
:type="column.fileType">
|
||||
</file-upload>
|
||||
</template>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" @click="doSubmit">提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="courseTimeListDialog" :title="trainType + '时间'" width="60%" append-to-body>
|
||||
<el-table :data="courseTimeList">
|
||||
@@ -434,6 +345,108 @@ layout("/layouts/platform.html"){
|
||||
<div id="viewMap" style="width: 100%;height: 500px"></div>
|
||||
</el-dialog>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="applyDialog" :title="trainType + '报名'" width="50%" append-to-body>
|
||||
<el-form :model="formData" ref="form" label-width="90px">
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="姓名" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input readonly v-model="formData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="所在单位" prop="unitName">
|
||||
<el-input readonly v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="所属工会" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-input readonly v-model="formData.sex"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col span="24">
|
||||
<el-form-item
|
||||
v-for="(column, index) in formData.trainMobileSignColumnList"
|
||||
:prop="'trainMobileSignColumnList.' + index + '.columnValue'"
|
||||
:label="column.columnName"
|
||||
:key="column.columnCode"
|
||||
:rules="{ required: column.isRequired,
|
||||
message: (['SELECT', 'FILE'].includes(column.columnFormType) ? '请选择' : '请填写') + column.columnName,
|
||||
trigger: 'blur'}">
|
||||
<!--文本框-->
|
||||
<template v-if="!['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
<el-input
|
||||
v-model="column.columnValue"
|
||||
:placeholder="'请填写' + column.columnName"
|
||||
:type="['INT'].includes(column.columnType) ? 'number' : ''"
|
||||
></el-input>
|
||||
</template>
|
||||
<!--选择框-->
|
||||
<template v-else-if="['SELECT'].includes(column.columnFormType) && ['VARCHAR','TEXT','INT'].includes(column.columnType)">
|
||||
<el-select v-model="column.columnValue"
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in column.selectValues"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<!--时间框-->
|
||||
<template v-else-if="['DATE', 'DATETIME'].includes(column.columnType)">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="column.columnValue"
|
||||
:type="column.columnType === 'DATE' ? 'date' : 'datetime'"
|
||||
:placeholder="'请选择' + column.columnName"
|
||||
:value-format="column.columnType === 'DATE' ? 'yyyy-MM-dd' : 'yyyy-MM-dd HH:mm:ss'">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
<!--文件-->
|
||||
<template v-else-if="['JSON'].includes(column.columnType)">
|
||||
<file-upload
|
||||
:files.sync="column.columnValue"
|
||||
:max="column.fileNumber"
|
||||
:type="column.fileType">
|
||||
</file-upload>
|
||||
</template>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" @click="doSubmit">提 交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -452,13 +465,13 @@ layout("/layouts/platform.html"){
|
||||
activityList: [],
|
||||
courseTypeList: [],
|
||||
tableColumns: [
|
||||
/* {prop: 'name', label: '活动名称'},*/
|
||||
{prop: 'courseName', label: '名称'},
|
||||
{prop: 'lxname', label: '类型'},
|
||||
{prop: 'coursePeopleNumber', label: '总人数'},
|
||||
{prop: 'courseName', label: '名称', width: '350px'},
|
||||
{prop: 'lxname', label: '类型', width: '80px'},
|
||||
{prop: 'assort', label: '标识', width: '200px'},
|
||||
// {prop: 'coursePeopleNumber', label: '总人数', width: '80px'},
|
||||
{prop: 'courseLocationCoordinates', label: '地点'},
|
||||
{prop: 'courseInstructor', label: '联系人'},
|
||||
{prop: 'courseTime', label: '时间'},
|
||||
{prop: 'courseTime', label: '时间', width: '200px'},
|
||||
{prop: 'applyNum', label: '已报名人数'},
|
||||
],
|
||||
viewMapDialog: false,
|
||||
@@ -470,20 +483,29 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
choose: {},
|
||||
trainType: '培训班',
|
||||
|
||||
applyDialog: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doCancel(row){
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/cancelSignUp',{
|
||||
activityId:row.activityId,
|
||||
courseId:row.id
|
||||
const msg = '您确认要取消' + row.courseName + '的报名吗?'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await $.post('/platform/mobile/trainSignUpActivity/cancelSignUp',{
|
||||
activityId:row.activityId,
|
||||
courseId:row.id
|
||||
})
|
||||
if (resp.code === 0){
|
||||
await this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
}else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
if (resp.code === 0){
|
||||
await this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
}else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
calcSignUpCount(o) {
|
||||
if(o.reserveMode === 2) {
|
||||
@@ -523,7 +545,8 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
const msg = '您确认要提交' + this.choose.courseName + '的报名吗?'
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -541,7 +564,7 @@ layout("/layouts/platform.html"){
|
||||
if (resp.code === 0) {
|
||||
await this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
this.$refs.guava.index()
|
||||
this.applyDialog = false
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
@@ -551,17 +574,22 @@ layout("/layouts/platform.html"){
|
||||
|
||||
},
|
||||
async doApply(row) {
|
||||
if (row.courseName.includes('时间待定')) {
|
||||
this.$message.warning('活动报名尚未开始哦,请报名其他活动吧')
|
||||
return
|
||||
}
|
||||
|
||||
this.choose = row
|
||||
const o = this.courseTypeList.find(v => v.id === row.courseType)
|
||||
const data = this.trainSignUpActivity
|
||||
const now = moment().valueOf()
|
||||
if (now < moment(data.activitySignUpStartTime).valueOf() || now > moment(data.activitySignUpEndTime).valueOf()) {
|
||||
this.$message.warning('报名已结束,请致电校工会咨询,联系电话:85913629')
|
||||
this.$message.warning('此活动不在报名时间内')
|
||||
return
|
||||
}
|
||||
const scopeUser = await getScopeUser(data.activityGroupId);
|
||||
if (scopeUser === 0) {
|
||||
this.$message.warning('您不在活动报名范围内')
|
||||
this.$message.warning('您不在报名人员范围内')
|
||||
return
|
||||
}
|
||||
const res = await $.post('/platform/mobile/trainSignUpActivity/validateSignUp', {
|
||||
@@ -588,9 +616,9 @@ layout("/layouts/platform.html"){
|
||||
this.formData.trainMobileSignColumnList.forEach(item => {
|
||||
item.columnValue = ''
|
||||
})
|
||||
this.$refs.form.clearValidate()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.guava.edit()
|
||||
this.applyDialog = true
|
||||
// this.$refs.guava.edit()
|
||||
})
|
||||
},
|
||||
openViewMap(point) {
|
||||
@@ -649,9 +677,13 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async openViewCourseTime(id) {
|
||||
const resp = await $.get(loc() + '/getCourseTime', {id: id})
|
||||
this.courseTimeList = resp.data
|
||||
async openViewCourseTime(row) {
|
||||
if (row.courseList && row.courseList.length > 0) {
|
||||
this.courseTimeList = row.courseList
|
||||
} else {
|
||||
const resp = await $.get(loc() + '/getCourseTime', {id: row.id})
|
||||
this.courseTimeList = resp.data
|
||||
}
|
||||
this.courseTimeListDialog = true
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
<el-row :gutter="20" type="flex" v-if="fromEdit !== 'edit'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否沿用之前活动" prop="use">
|
||||
<el-radio-group v-model="use">
|
||||
<el-radio :label="true">沿用之前活动</el-radio>
|
||||
<el-radio :label="false">不沿用之前活动</el-radio>
|
||||
<el-radio-group v-model="use" size="medium">
|
||||
<el-radio-button :label="true" border>沿用之前活动</el-radio-button>
|
||||
<el-radio-button :label="false" border>不沿用之前活动</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="use">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="往期活动" prop="historicalAct">
|
||||
<el-select v-model="historicalAct" placeholder="请选择往期活动"
|
||||
:disabled="!use"
|
||||
style="width: 100%" @change="historicalActChange">
|
||||
<el-option
|
||||
v-for="item in historicalActList"
|
||||
@@ -30,7 +31,7 @@
|
||||
<el-input maxlength="50" v-model="formData.activityName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="trainType + '通知'" prop="notice">
|
||||
<el-radio-group v-model="formData.notice" size="medium">
|
||||
<el-radio-button :label="true" border>通知</el-radio-button>
|
||||
@@ -38,15 +39,42 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<!--<el-col :span="12">
|
||||
<el-form-item label="是否启用积分系统" prop="isIntegral">
|
||||
<el-radio-group size="medium" v-model="formData.isIntegral">
|
||||
<el-radio-button :label="false">不启用</el-radio-button>
|
||||
<el-radio-button :label="true">启用</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
</el-row>
|
||||
<!--<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否推送移动端" prop="pushHome">
|
||||
<el-radio-group v-model="formData.pushHome" size="medium">
|
||||
<el-radio-button :label="0">不推送</el-radio-button>
|
||||
<el-radio-button :label="1">推送列表</el-radio-button>
|
||||
<el-radio-button :label="2">推送大图</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!–<el-col :span="12">
|
||||
<el-form-item :label="trainType + '通知'" prop="notice">
|
||||
<el-radio-group v-model="formData.notice" size="medium">
|
||||
<el-radio-button :label="true" border>通知</el-radio-button>
|
||||
<el-radio-button :label="false" border>不通知</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>–>
|
||||
<!–<el-col :span="6">
|
||||
<el-form-item label="活动类型" prop="activityMode">
|
||||
<el-radio-group v-model="formData.activityMode" size="medium">
|
||||
<el-radio-button :label="1" border>校工会</el-radio-button>
|
||||
<el-radio-button :label="2" border>分工会</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>–>
|
||||
</el-row>-->
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item :rules="{required:true,message: '请选择起止时间', trigger: 'blur'}" label="活动时间"
|
||||
@@ -111,14 +139,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-form-item :rules="{required:true,message: '请输入活动介绍', trigger: 'blur'}" label="活动介绍" prop="introduce">
|
||||
<!--<el-input
|
||||
:autosize="{ minRows: 5, maxRows: 10}"
|
||||
placeholder="请输入活动介绍"
|
||||
type="textarea"
|
||||
v-model="formData.introduce">
|
||||
</el-input>-->
|
||||
<!--<div id="introduce"></div>-->
|
||||
<text-editor v-model="formData.introduce"></text-editor>
|
||||
<text-editor v-model="formData.introduce" ></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="封面图片" prop="cover" :rules="{required:true,message: '请上传活动移动端封面图片', trigger: 'blur'}">
|
||||
@@ -325,6 +346,11 @@
|
||||
v-model="courseTimeOneKeySet.endTime">
|
||||
</el-time-select>
|
||||
<el-button @click="oneKeySetStartEndTime" size="mini" type="primary">一键设置开始/结束时间</el-button>
|
||||
<span style="color: #ac3111">报名人数是否限制:</span>
|
||||
<el-radio-group size="mini" v-model="formData.courseList[courseIndex].courseIsLimitApply">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
|
||||
<el-table v-if="formData.courseList && formData.courseList[courseIndex]"
|
||||
@@ -344,6 +370,7 @@
|
||||
end: '23:30'
|
||||
}"
|
||||
placeholder="开始时间"
|
||||
style="width: 100%"
|
||||
v-model="row.courseStartTime">
|
||||
</el-time-select>
|
||||
</template>
|
||||
@@ -356,11 +383,21 @@
|
||||
step: '00:05',
|
||||
end: '23:30'
|
||||
}"
|
||||
style="width: 100%"
|
||||
placeholder="结束时间"
|
||||
v-model="row.courseEndTime">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-if="formData.courseList[courseIndex].courseIsLimitApply">
|
||||
<el-table-column label="人数限制">
|
||||
<template scope="{row}">
|
||||
<el-input-number v-model="row.courseLimitNum" :min="1" :max="1000"
|
||||
style="width: 100%"
|
||||
placeholder="限制报名个数"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template scope="{row,$index}">
|
||||
<el-button
|
||||
|
||||
@@ -94,12 +94,6 @@ layout("/layouts/platform.html"){
|
||||
<el-radio :label="false" border>不纳入</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.isBringFamily === true" prop="selfAddFamily" label="本人纳入总人数">
|
||||
<el-radio-group v-model="formData.selfAddFamily">
|
||||
<el-radio :label="true" border>纳入</el-radio>
|
||||
<el-radio :label="false" border>不纳入</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<vi-title2 title="报名填写字段">
|
||||
|
||||
@@ -51,7 +51,7 @@ layout("/layouts/platform.html"){
|
||||
<table-tool :app="this" label="人员调整">
|
||||
<template #func>
|
||||
<el-button type="primary" @click="openImport(null)" size="small">
|
||||
批量调整
|
||||
批量导入
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
@@ -89,22 +89,12 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="已报名人数" prop="registerNum" sortable align="center" header-align="center"
|
||||
show-overflow-tooltip>
|
||||
<template scope="{row}">
|
||||
<template v-if="row.isAddFamily && row.isBringFamily">
|
||||
<el-link v-if="row.selfAddFamily" @click="openView(row)" type="primary">
|
||||
{{row.registerNum + '家属(' + row.familyCount + ')'}}
|
||||
</el-link>
|
||||
<el-link v-else @click="openView(row)" type="primary">
|
||||
{{row.familyCount}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-link v-if="row.reserveMode === 1" @click="openView(row)" type="primary">
|
||||
{{row.registerNum + row.courseReservedNumber}}
|
||||
</el-link>
|
||||
<el-link v-if="row.reserveMode === 2" @click="openView(row)" type="primary">
|
||||
{{row.registerNum}}
|
||||
</el-link>
|
||||
</template>
|
||||
<el-link v-if="row.reserveMode === 1" @click="openView(row)" type="primary">
|
||||
{{row.registerNum + row.courseReservedNumber}}
|
||||
</el-link>
|
||||
<el-link v-if="row.reserveMode === 2" @click="openView(row)" type="primary">
|
||||
{{row.registerNum}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -131,7 +121,7 @@ layout("/layouts/platform.html"){
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="registerForm.unionId" clearable filterable placeholder="请选择分工会"
|
||||
<el-select v-model="registerForm.unionId" clearable filterable placeholder="请选择院级工会"
|
||||
@change="getUnitList()">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
@@ -342,7 +332,8 @@ layout("/layouts/platform.html"){
|
||||
const f = this.tempFileList[0]
|
||||
formData.append("file", f.raw, f.raw.name)
|
||||
formData.append("activityId", this.pageForm.activityId)
|
||||
formData.append("importCourseId", this.importRow.id)
|
||||
formData.append("importCourseId", this.importRow ? this.importRow.id : '')
|
||||
formData.append("isSingle", this.isSingle)
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '数据提交中...',
|
||||
|
||||
@@ -81,22 +81,12 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="已报名人数" prop="registerNum" sortable align="center" header-align="center"
|
||||
show-overflow-tooltip>
|
||||
<template scope="{row}">
|
||||
<template v-if="row.isAddFamily && row.isBringFamily">
|
||||
<el-link v-if="row.selfAddFamily" @click="openView(row)" type="primary">
|
||||
{{row.registerNum + '家属(' + row.familyCount + ')'}}
|
||||
</el-link>
|
||||
<el-link v-else @click="openView(row)" type="primary">
|
||||
{{row.familyCount}}
|
||||
</el-link>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-link v-if="row.reserveMode === 1" @click="openView(row)" type="primary">
|
||||
{{row.registerNum + row.courseReservedNumber}}
|
||||
</el-link>
|
||||
<el-link v-if="row.reserveMode === 2" @click="openView(row)" type="primary">
|
||||
{{row.registerNum}}
|
||||
</el-link>
|
||||
</template>
|
||||
<el-link v-if="row.reserveMode === 1" @click="openView(row)" type="primary">
|
||||
{{row.registerNum + row.courseReservedNumber}}
|
||||
</el-link>
|
||||
<el-link v-if="row.reserveMode === 2" @click="openView(row)" type="primary">
|
||||
{{row.registerNum}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px">
|
||||
@@ -120,7 +110,6 @@ layout("/layouts/platform.html"){
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
columnTable: [],
|
||||
activityList: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear().toString(),
|
||||
@@ -145,15 +134,6 @@ layout("/layouts/platform.html"){
|
||||
{label: '报名时间', prop: 'signUpTime'},
|
||||
{label: '报名状态', prop: 'state'},
|
||||
],
|
||||
cloneTableColumns: [
|
||||
{label: '姓名', prop: 'username'},
|
||||
{label: '工号', prop: 'loginname'},
|
||||
{label: '单位', prop: 'unitname'},
|
||||
{label: '分工会', prop: 'unionname'},
|
||||
{label: '联系方式', prop: 'mobile'},
|
||||
{label: '报名时间', prop: 'signUpTime'},
|
||||
{label: '报名状态', prop: 'state'},
|
||||
],
|
||||
userSignInfo: {},
|
||||
trainType: '培训班',
|
||||
trainTypeList: [],
|
||||
@@ -193,11 +173,6 @@ layout("/layouts/platform.html"){
|
||||
this.registerUserTableData = resp_register.data
|
||||
const resp_signInfo = await $.get(loc() + '/getSignInfo', {courseId: row.id})
|
||||
this.userSignInfo = resp_signInfo.data
|
||||
const resp_columnInfo = await $.get(loc() + '/getTaleColumnInfo', {courseId: row.id})
|
||||
if(resp_columnInfo.data) {
|
||||
this.registerUserTableColumns = []
|
||||
this.registerUserTableColumns = this.cloneTableColumns.concat(resp_columnInfo.data)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
Reference in New Issue
Block a user