commit
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="报名时间">{{ viewData.signingUptime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="参加活动时间">{{
|
||||
<el-descriptions-item label="预出行时间">{{
|
||||
viewData.specificTime ? viewData.specificTime : "暂未更新"
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
@@ -35,8 +35,14 @@
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
|
||||
<template v-if="viewData.takePartInBaseManagementId">
|
||||
<el-descriptions-item label="定点名称">{{ viewData.baseName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{ viewData.baseTravelAgencyName }}</el-descriptions-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-descriptions-item label="线路名称">{{ viewData.lineName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="旅行社名称">{{ viewData.travelAgencyName }}</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="是否含随行人">
|
||||
<span class="label label-primary">
|
||||
{{ (viewData.companionList && viewData.companionList.length > 0) ? "携带" : "未携带" }}
|
||||
|
||||
@@ -152,6 +152,14 @@
|
||||
Vue.prototype.$axios = commonUtil.axiosService()
|
||||
Vue.prototype.$downLoad = commonUtil.downLoadService
|
||||
</script>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
if (window.innerWidth < 768 && location.pathname === '/platform/home') {
|
||||
window.location.replace('/mobile/index');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="gallery-loader" style="background-color:transparent;">
|
||||
|
||||
@@ -7,11 +7,11 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 200px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.swiper img {
|
||||
height: 200px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.module {
|
||||
@@ -172,7 +172,7 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<div id="app">
|
||||
<!--首页-->
|
||||
<div style="margin-bottom: 60px" v-if="active === 0">
|
||||
<div style="margin-bottom: 60px;max-height: calc(100vh - 60px);overflow-y: auto" v-if="active === 0">
|
||||
<!--轮播图-->
|
||||
<van-swipe :autoplay="3000" class="swiper">
|
||||
<van-swipe-item :key="index" v-for="(image, index) in images">
|
||||
@@ -724,8 +724,8 @@ layout("/mobile/platform.html"){
|
||||
const active = sessionStorage.getItem("zhgh-mobile-home-active")
|
||||
this.active = active ? parseInt(active) : 0
|
||||
|
||||
// this.clickIndex = 2
|
||||
// this.clickMenu = this.moduleMenus.find(o => o.moduleName === '日常办公')
|
||||
this.clickIndex = 2
|
||||
this.clickMenu = this.moduleMenus.find(o => o.moduleName === '职工权益')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
<div style="text-indent: 2.1rem">
|
||||
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
|
||||
我将严格遵守工会章程 ,认真执行工会决议,积极参与工会活动,主动融入“杭医健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“杭医健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
</span>
|
||||
</div>
|
||||
</van-checkbox>
|
||||
|
||||
@@ -125,7 +125,6 @@
|
||||
async flushCache() {
|
||||
const day = moment().format('YYYY-MM-DD')
|
||||
if (window.localStorage.getItem('flushCache') !== day) {
|
||||
debugger
|
||||
const { code, msg } = await $.post('/platform/home/clearCache')
|
||||
if (code === 0) {
|
||||
location.reload()
|
||||
|
||||
@@ -352,7 +352,7 @@ layout("/mobile/platform.html"){
|
||||
<span>联系方式:</span>{{o.baseContactNumber}}
|
||||
</div>
|
||||
<div class="mobile">
|
||||
<span>已报人数:</span>{{o.signUpUserNum}}
|
||||
<span>出行时间:</span>{{o.specificTime}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,424 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.container {
|
||||
background: #ffffff;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.container .title {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
background: #ffffff;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.container .card {
|
||||
padding: 10px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.description, .last-content {
|
||||
background: rgb(255, 255, 255);
|
||||
padding: 5px 20px;
|
||||
margin: -15px 0 10px 0;
|
||||
line-height: 1.5rem;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.subject {
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
/*border-top: 2px solid rgba(24, 103, 176, 0.6);*/
|
||||
border-bottom: 2px solid rgba(24, 103, 176, 0.6);
|
||||
/*box-shadow: 0 2px 4px rgba(24, 103, 176, 0.6);*/
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.first-box {
|
||||
border-top: 2px solid rgba(24, 103, 176, 0.6);
|
||||
}
|
||||
|
||||
.subject p {
|
||||
font-size: 16px;
|
||||
margin: 20px 0 10px 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.subject .tag {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.button-control {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
column-gap: 20px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.van-checkbox__icon--checked .van-icon {
|
||||
color: #fff !important;
|
||||
background-color: var(--color-primary) !important;
|
||||
border-color: var(--color-primary) !important;
|
||||
}
|
||||
|
||||
.van-checkbox__icon--disabled .van-icon {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.ui-input-box {
|
||||
border: 1px solid #e3e3e3;
|
||||
margin: 5px 0;
|
||||
background-color: #fff;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ui-input-box input {
|
||||
background-color: #fff;
|
||||
border: none !important;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
-webkit-appearance: none;
|
||||
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="doBack" placeholder fixed></van-nav-bar>
|
||||
<div class="container" :style="{'padding-bottom': answerRecord.isFinish ? 0 : '84px'}">
|
||||
<h2 class="title">{{ activity.title }}</h2>
|
||||
<div class="description" v-if="activity.description">
|
||||
<div v-html="activity.description"></div>
|
||||
</div>
|
||||
<div v-if="!isFinished">
|
||||
<div v-for="(subject, index) in subjects" :key="index" class="subject" :class="{ 'first-box': index === 0 }">
|
||||
<p>{{index+1}}、{{ subject.title }}</p>
|
||||
<div class="tag">
|
||||
<van-tag v-if="subject.type === 'checkbox'" type="primary" size="large">多选</van-tag>
|
||||
<van-tag v-if="subject.type === 'radio'" type="primary" size="large">单选</van-tag>
|
||||
<van-tag v-if="subject.type === 'text'" type="primary" size="large">填空</van-tag>
|
||||
<van-tag v-if="subject.score" type="primary" size="large">{{subject.score}}分</van-tag>
|
||||
</div>
|
||||
|
||||
<!--单选、多选-->
|
||||
<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>
|
||||
|
||||
<div v-for="(option,index) in subject.options">
|
||||
|
||||
<van-cell :title="option.text" :key="option.id" clickable @click="cellToggle(subject,option.id)">
|
||||
<template #icon>
|
||||
<van-checkbox :name="option.id" :ref="'option'+option.id"
|
||||
:disabled="answerRecord.isFinish"
|
||||
style="margin-right: 10px"></van-checkbox>
|
||||
</template>
|
||||
|
||||
<img
|
||||
slot="right-icon"
|
||||
v-if="option.imgUrl"
|
||||
:src="option.imgUrl"
|
||||
alt=""
|
||||
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>
|
||||
|
||||
<div v-if="option.isOpenContent==true && selectOptionIds.includes(option.id)">
|
||||
<van-field v-model="option.content" :label="option.contentPrefix"
|
||||
:placeholder="'请填写' + (option.contentPrefix ? option.contentPrefix : '')"
|
||||
:disabled="answerRecord.isFinish"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
|
||||
<!--填空题-->
|
||||
<div class="ui-input-box" v-if="subject.type==='text'">
|
||||
<input type="text" v-model="subject.userFillContent" :readonly="answerRecord.isFinish" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="last-content" style="margin-top: 0px" v-if="activity.lastContent">
|
||||
<div v-html="activity.lastContent"></div>
|
||||
</div>
|
||||
|
||||
<div class="button-control" v-if="!answerRecord.isFinish">
|
||||
<van-button type="primary" style="background-color: #0a84ff;border: 1px solid #0a84ff"
|
||||
@click="onSubmit" block :disabled="isEnd">{{isEnd ? '已结束' : '提交'}}</van-button>
|
||||
</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>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {
|
||||
pjaxType: '',
|
||||
list: [],
|
||||
id: null,
|
||||
subjects: [],
|
||||
activity: {},
|
||||
remainingTime: 0,
|
||||
isFinished: false,
|
||||
answerRecord: {},
|
||||
answerRecordId: null,
|
||||
|
||||
descShow:false,
|
||||
optionDesc:null,
|
||||
|
||||
selectOptionIds: [],
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
isEnd() {
|
||||
if (this.activity) {
|
||||
return this.$moment().unix() > this.$moment(this.activity.endTime).unix()
|
||||
}
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
//获取活动、题目
|
||||
listSubjects() {
|
||||
$.post("/platform/h5/welfare/evaluate/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() {
|
||||
$.post("/platform/h5/welfare/evaluate/answerRecord", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.answerRecord = res.data
|
||||
if (this.answerRecord.isFinish) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '您已完成该调查,感谢您的参与!',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
// this.$toast.success("您已完成该调查")
|
||||
}
|
||||
this.initAnswer()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//答案回显
|
||||
initAnswer() {
|
||||
this.subjects.forEach((subject, subjectIndex) => {
|
||||
const answer = this.answerRecord.extJson[subject.id]
|
||||
|
||||
if (["radio", "checkbox"].includes(subject.type)) {
|
||||
this.$refs["subject" + subject.id][0].toggleAll(false)
|
||||
answer?.optionIds.forEach((optionId) => {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["option" + optionId][0].toggle()
|
||||
})
|
||||
})
|
||||
|
||||
if (answer.optionContents && answer.optionContents.length > 0) {
|
||||
answer.optionContents.forEach((data) => {
|
||||
if (data.content) {
|
||||
this.selectOptionIds.push(data.optionId)
|
||||
const option = subject.options.find(option => option.id === data.optionId)
|
||||
option.content = data.content
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else if (subject.type === "text") {
|
||||
subject.userFillContent = answer?.text
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//选项点击
|
||||
cellToggle(subject, optionId) {
|
||||
if (this.answerRecord.isFinish) {
|
||||
return
|
||||
}
|
||||
|
||||
if (subject.type === "radio") {
|
||||
this.$refs["subject" + subject.id][0].toggleAll(false)
|
||||
const option = subject.options.find(option => option.id === optionId)
|
||||
this.selectOptionIds = this.selectOptionIds.filter(item => item !== optionId)
|
||||
if (option.isOpenContent == true) {
|
||||
this.selectOptionIds.push(optionId)
|
||||
}
|
||||
}
|
||||
this.$refs["option" + optionId][0].toggle()
|
||||
},
|
||||
|
||||
//预览图片
|
||||
previewOptionImg(img) {
|
||||
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() {
|
||||
if (this.isEnd) {
|
||||
this.$toast("调查已结束")
|
||||
return
|
||||
}
|
||||
|
||||
//提示那些题没有作答
|
||||
for (let i = 0; i < this.subjects.length; i++) {
|
||||
const subject = this.subjects[i]
|
||||
if (["radio", "checkbox"].includes(subject.type)) {
|
||||
if (!subject.userSelectOptionIds || subject.userSelectOptionIds.length === 0) {
|
||||
this.$toast.fail("第" + (i + 1) + "题未做答")
|
||||
return
|
||||
}
|
||||
} else if ("text" === subject.type) {
|
||||
if (!subject.userFillContent) {
|
||||
this.$toast.fail("第" + (i + 1) + "题未作答")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 提示确定提交吗
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '提交后不可修改哦,确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.autoSubmit()
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
|
||||
//自动提交
|
||||
autoSubmit(loading = null) {
|
||||
$.post("/platform/h5/welfare/evaluate/submitAnswer", {
|
||||
answer: JSON.stringify({
|
||||
activityId: this.id,
|
||||
answerRecordId: this.answerRecordId,
|
||||
subjects: this.subjects.map((subject) => {
|
||||
const isChoiceType = ["checkbox", "radio"].includes(subject.type);
|
||||
const userSelectOptions = isChoiceType ? subject.userSelectOptionIds.map((optionId) => {
|
||||
const option = subject.options.find((option) => option.id === optionId);
|
||||
return option ? {
|
||||
optionId: option.id,
|
||||
content: option.content
|
||||
} : '';
|
||||
}) : [];
|
||||
const userFillContent = subject.type === "text" ? subject.userFillContent : null;
|
||||
|
||||
return {
|
||||
id: subject.id,
|
||||
userSelectOptionIds: isChoiceType ? subject.userSelectOptionIds : [],
|
||||
userSelectOptionContent: userSelectOptions,
|
||||
userFillContent
|
||||
};
|
||||
})
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.getAnswerRecord()
|
||||
}
|
||||
if (loading) {
|
||||
loading.clear()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
doBack() {
|
||||
if (this.pjaxType === "welfare") {
|
||||
pjaxReplace('/mobile/welfare/mine/myWelfare')
|
||||
} else {
|
||||
pjaxReplace('/mobile/index')
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("id")
|
||||
this.pjaxType = GetQueryString("type")
|
||||
if (id) {
|
||||
this.id = id
|
||||
this.listSubjects()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -110,7 +110,7 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" style="margin-top: 10px;">
|
||||
<van-button @click="openEvaluate(item)" plain round size="small">评价商品
|
||||
<van-button v-if="item.evaId" @click="openEvaluate(item)" plain round size="small">评价商品
|
||||
</van-button>
|
||||
<van-button @click="openExpress(item)" plain round size="small"
|
||||
v-if="item.provideMode==3">
|
||||
@@ -424,17 +424,18 @@ layout("/mobile/platform.html"){
|
||||
|
||||
//打开评价
|
||||
async openEvaluate(item) {
|
||||
if (item.isChoose !== 1) {
|
||||
this.$modal.msg("选择后才能评价")
|
||||
return
|
||||
}
|
||||
|
||||
const resp = await this.getUserSelection(item.projectId)
|
||||
this.selectedOptions = resp.data
|
||||
if (this.selectedOptions && this.selectedOptions.length > 0) {
|
||||
await this.finOneWelfareEvaluate(item.id, this.selectedOptions[0].selectOptionId)
|
||||
}
|
||||
this.evaluatePopup = true
|
||||
pjaxReplace('/platform/h5/welfare/evaluate?id=' + item.evaId + '&type=welfare')
|
||||
// if (item.isChoose !== 1) {
|
||||
// this.$modal.msg("选择后才能评价")
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// const resp = await this.getUserSelection(item.projectId)
|
||||
// this.selectedOptions = resp.data
|
||||
// if (this.selectedOptions && this.selectedOptions.length > 0) {
|
||||
// await this.finOneWelfareEvaluate(item.id, this.selectedOptions[0].selectOptionId)
|
||||
// }
|
||||
// this.evaluatePopup = true
|
||||
},
|
||||
async finOneWelfareEvaluate(projectId, optionId) {
|
||||
const {
|
||||
|
||||
@@ -223,7 +223,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'optionName', label: '所选套餐', width: "100px"},
|
||||
// {prop: 'userSign', label: '签字', width: "100px"},
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'applyDate', label: '申请时间', sortable: true},
|
||||
{prop: 'stateId', label: '状态', sortable: true},
|
||||
|
||||
@@ -185,7 +185,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<div>
|
||||
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
|
||||
我将严格遵守工会章程 ,认真执行工会决议,积极参与工会活动,主动融入“杭医健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“杭医健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
</span>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
|
||||
@@ -615,7 +615,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'preparedBy', label: '人员性质', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
// {prop: 'campusName', label: '所属校区', sortable: true},
|
||||
],
|
||||
|
||||
@@ -606,7 +606,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'preparedBy', label: '人员性质', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
// {prop: 'campusName', label: '所属校区', sortable: true},
|
||||
],
|
||||
|
||||
@@ -261,7 +261,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
// {prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
// {prop: 'campusName', label: '所属校区', sortable: true},
|
||||
],
|
||||
|
||||
@@ -300,7 +300,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'political', label: '政治面貌', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'marriage', label: '婚否', checked: 0},
|
||||
|
||||
@@ -265,7 +265,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
],
|
||||
isThreeUnit: false,
|
||||
|
||||
@@ -373,7 +373,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'preparedBy', label: '人员性质', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'member', label: '是否会员', sortable: true},
|
||||
{prop: 'welfareMember', label: '是否福利会员', sortable: true},
|
||||
|
||||
@@ -245,7 +245,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
],
|
||||
userId: null,
|
||||
|
||||
@@ -470,16 +470,18 @@ layout("/layouts/platform.html"){
|
||||
v-loading="tableLoading">
|
||||
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
:index="indexMethod" label="序号" fixed
|
||||
width="50px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
:width="column.width"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:fixed="column.fixed"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop==='unitname'" scope="{row}">
|
||||
@@ -493,7 +495,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" width="100px">
|
||||
<el-table-column align="center" header-align="center" fixed="right" label="操作" width="100px">
|
||||
<template scope="{row:{id}}">
|
||||
<el-button size="small" @click="openView(id)">查看</el-button>
|
||||
</template>
|
||||
@@ -605,21 +607,21 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||
{prop: 'mobile', label: '联系电话'},
|
||||
{prop: 'loginname', label: '工号', width: 100, fixed: true},
|
||||
{prop: 'username', label: '姓名', width: 100, fixed: true},
|
||||
{prop: 'sex', label: '性别', width: 55},
|
||||
{prop: 'birthday', label: '出生年月', sortable: true, width: 100},
|
||||
{prop: 'mobile', label: '联系电话', width: 110},
|
||||
{prop: 'idcard', label: '身份证号', width: 170},
|
||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'preparedBy', label: '人员性质', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', width: 100, sortable: true},
|
||||
{prop: 'personType', label: '人员类型', width: 100, sortable: true},
|
||||
{prop: 'preparedBy', label: '人员性质', width: 100, sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', width: 170, sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', width: 170, sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
{prop: 'unionGroupName', label: '工会小组', width: 150, sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'marriage', label: '婚否', checked: 0},
|
||||
{prop: 'education', label: '学历', checked: 0},
|
||||
|
||||
@@ -155,7 +155,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
|
||||
@@ -112,7 +112,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true, checked: 0},
|
||||
{prop: 'nation', label: '民族', checked: 0},
|
||||
|
||||
@@ -147,7 +147,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'political', label: '政治面貌'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'retiredGroupName', label: '退休小组', sortable: true},
|
||||
{prop: 'retiredPartyBranchName', label: '退休党支部', sortable: true},
|
||||
@@ -193,4 +193,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -235,7 +235,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'political', label: '政治面貌'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'retiredGroupName', label: '退休小组', sortable: true},
|
||||
{prop: 'retiredPartyBranchName', label: '退休党支部', sortable: true},
|
||||
|
||||
@@ -148,7 +148,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'political', label: '政治面貌'},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
{prop: 'retiredGroupName', label: '退休小组', sortable: true},
|
||||
{prop: 'retiredPartyBranchName', label: '退休党支部', sortable: true},
|
||||
@@ -196,4 +196,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -371,7 +371,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'education', label: '学历', sortable: true},
|
||||
{prop: 'maritalStatus', label: '单身状况', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
],
|
||||
personTypeOptions: [],
|
||||
|
||||
@@ -66,7 +66,7 @@ layout("/layouts/platform.html"){
|
||||
label="联系方式" prop="baseContactNumber">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="已报人数" prop="signUpUserNum">
|
||||
label="出行时间" prop="specificTime">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-if="pageForm.theRapyRecuperationType!=3">
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :visible.sync="dialogVisible" title="基础设置" :close-on-click-modal="false">
|
||||
<div style="overflow-y: auto">
|
||||
<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 label="SURVEY" border>调查</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="所属福利" prop="welfareId">
|
||||
<el-select filterable="true" placeholder="福利项目"
|
||||
style="width: 99%" v-model="formData.welfareId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in welfareProjectList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="formData.title" placeholder="请输入标题" maxlength="50"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="描述" prop="description">
|
||||
<text-editor v-model="formData.description" :height="150"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="尾行内容" prop="lastContent">
|
||||
<text-editor v-model="formData.lastContent" :height="150"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="datetime" placeholder="选择日期时间"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker v-model="formData.endTime" type="datetime" placeholder="选择日期时间"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">确 定</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formData: {
|
||||
category: ''
|
||||
},
|
||||
formRules: {
|
||||
category: [{ required: true, message: "请选择类型", trigger: "change" }],
|
||||
title: [{ required: true, message: "请输入标题", trigger: "change" }],
|
||||
startTime: [{ required: true, message: "请选择开始时间", trigger: "change" }],
|
||||
endTime: [{ required: true, message: "请选择结束时间", trigger: "change" }],
|
||||
},
|
||||
welfareProjectList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.dialogVisible = true
|
||||
if (id) {
|
||||
$.post("/platform/welfare/evaluate/activity/findOne", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.formData = {}
|
||||
}
|
||||
this.queryWelfareProject(id)
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
$.post("/platform/welfare/evaluate/activity/save", this.formData).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.dialogVisible = false
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
queryWelfareProject(id){
|
||||
$.post("/platform/welfare/evaluate/activity/queryProject", {
|
||||
id: id
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.welfareProjectList = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<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-item">
|
||||
<div class="search-item-label">福利项目:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="doSearch" filterable="true"
|
||||
placeholder="福利项目"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.projectId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in welfareProjectList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :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">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
|
||||
<el-table-column label="标题" prop="title" sortable></el-table-column>
|
||||
<el-table-column label="所属福利" prop="welfareName" sortable></el-table-column>
|
||||
<el-table-column label="类型" prop="category" sortable width="200">
|
||||
<template scope="{row}">
|
||||
<dict-tag :options="dict.type.ACTIVITY_QSV_CATEGORY" :value="row.category"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="startTime" sortable></el-table-column>
|
||||
<el-table-column label="结束时间" prop="endTime" sortable></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="350px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button size="mini" type="primary" @click="openSendMsg(row)">推送通知</el-button>
|
||||
<el-button size="mini" type="primary" @click="openSubject(row.id)">题目设置</el-button>
|
||||
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<subject-form ref="subjectFormRef" @refresh="$refs.guava.index();pageData()"></subject-form>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="sendMsgDialogVisible"
|
||||
title="请在下方填写需要发送的内容"
|
||||
width="50%"
|
||||
>
|
||||
<el-form :model="formData" label-width="80px" ref="sendForm">
|
||||
|
||||
<!-- <el-form-item
|
||||
:rules="[{required: true, message: '请选择发送方式', trigger: ['blur', 'change']}]"
|
||||
label="发送方式"
|
||||
prop="sendTypes">
|
||||
<el-checkbox-group size="medium" v-model="formData.sendTypes">
|
||||
<el-checkbox border label="SMS">短信发送</el-checkbox>
|
||||
<el-checkbox border label="WeChat">微信发送</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
-->
|
||||
<el-form-item
|
||||
:rules="[{required: true, message: '请输入发送标题', trigger: ['blur', 'change']}]"
|
||||
label="发送标题"
|
||||
prop="title">
|
||||
<el-input
|
||||
:rows="6"
|
||||
placeholder="请输入发送标题"
|
||||
v-model="formData.title">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
:rules="[{required: true, message: '请选择发送内容', trigger: ['blur', 'change']}]"
|
||||
label="发送内容"
|
||||
prop="content">
|
||||
<el-input
|
||||
:rows="6"
|
||||
placeholder="请输入内容"
|
||||
type="textarea"
|
||||
v-model="formData.content">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="sendMsgDialogVisible = false">取 消</el-button>
|
||||
<el-button @click="sendMsgToNotWelfareUsers" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<basic-form ref="basicFormRef" @refresh="pageData"></basic-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
<!--#include('subjectForm.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
dicts: ["ACTIVITY_QSV_CATEGORY"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
"subject-form": subjectForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
welfareProjectList: [],
|
||||
sendMsgDialogVisible: false,
|
||||
formData: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openSendMsg(row){
|
||||
this.$set(this.formData, "content", "校工会邀您参加《" + row.title + "》")
|
||||
this.$set(this.formData, "id", row.id)
|
||||
this.sendMsgDialogVisible = true
|
||||
},
|
||||
async sendMsgToNotWelfareUsers() {
|
||||
const valid = await this.$refs['sendForm'].validate()
|
||||
if (!valid) return
|
||||
const confirm = await this.$confirm('您确定要向未参与的人员发送信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonTest: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post('/platform/welfare/evaluate/activity/sendMsgToNotWelfareUsers', {
|
||||
title: this.formData.title,
|
||||
activityId: this.formData.id,
|
||||
sendMsgValue: this.formData.content
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.sendMsgDialogVisible = false
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.basicFormRef.onOpen(row.id)
|
||||
},
|
||||
openSubject(id) {
|
||||
this.$refs.guava.edit()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.subjectFormRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("该操作将删除该评价下所有数据,您确认删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
$.post("/platform/welfare/evaluate/activity/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("删除成功")
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async getWelfareProjectList() {
|
||||
const resp = await $.get('/platform/welfare/project/statistics/single/welfareProjectList', {year: this.pageForm.year})
|
||||
this.welfareProjectList = resp.data
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getWelfareProjectList()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,83 @@
|
||||
const optionImg = {
|
||||
template: /*language=HTML*/ `
|
||||
<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="/file_server/uploadFile"
|
||||
:show-file-list="false"
|
||||
:on-success="handleSuccess"
|
||||
:before-upload="beforeUpload">
|
||||
<img v-if="img" :src="img" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div style="padding: 10px 0">
|
||||
请上传图片
|
||||
</div>
|
||||
<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 {
|
||||
visible: false,
|
||||
img: null,
|
||||
ext: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(img = null, ext) {
|
||||
this.img = img
|
||||
this.ext = ext
|
||||
this.visible = true
|
||||
},
|
||||
handleSuccess(response, file, fileList) {
|
||||
console.log(response)
|
||||
console.log(file)
|
||||
console.log(fileList)
|
||||
if (response.code === 0) {
|
||||
this.img = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + response.data.filepath
|
||||
// this.img = "/platform/sys/file/download?id=t38dmq4beuhrupqb54prl52t4u"
|
||||
this.$message.success("图片上传成功")
|
||||
}
|
||||
},
|
||||
beforeUpload(file) {},
|
||||
onConfirm() {
|
||||
this.$emit("confirm", {
|
||||
img: this.img,
|
||||
ext: this.ext
|
||||
})
|
||||
this.visible = false
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -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 })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,469 @@
|
||||
<!--#include('optionImg.js'){}#-->
|
||||
<!--#include('setting.js'){}#-->
|
||||
|
||||
const subjectForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div class="subject-form-dialog">
|
||||
<el-form ref="form" :model="formData" :rules="formRules" label-width="120px">
|
||||
<div style="min-height:50vh;overflow-y: auto">
|
||||
<draggable v-model="subjects" handle=".drag-handler">
|
||||
<transition-group>
|
||||
<div v-for="(subject, subjectIndex) in subjects" :key="subject.id" class="subject-item">
|
||||
<div class="subject-header">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<i class="el-icon-rank drag-handler"></i>
|
||||
<span style="font-weight: bold; margin-right: 10px;">第 {{subjectIndex + 1}} 题</span>
|
||||
<el-input
|
||||
v-model="subject.title"
|
||||
placeholder="请输入题目"
|
||||
style="flex: 1">
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div class="subject-meta">
|
||||
<div>
|
||||
题目类型:
|
||||
<el-select
|
||||
v-model="subject.type"
|
||||
@change="subjectTypeChange(subject, subjectIndex)"
|
||||
placeholder="请选择题目类型"
|
||||
style="width: 200px;">
|
||||
<el-option label="单选题" value="radio">
|
||||
<i class="el-icon-circle-check subject-type-icon"></i>单选题
|
||||
</el-option>
|
||||
<el-option label="多选题" value="checkbox">
|
||||
<i class="el-icon-check subject-type-icon"></i>多选题
|
||||
</el-option>
|
||||
<el-option label="填空题" value="text" v-if="activity.category!=='QUIZ'">
|
||||
<i class="el-icon-edit subject-type-icon"></i>填空题
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="subject.type === 'checkbox'">
|
||||
最大选择数:
|
||||
<el-input-number v-model="subject.maxMulti" placeholder="最多可选数量"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template>
|
||||
<draggable v-model="subject.options" handle=".option-drag-handle"
|
||||
v-if="subject.type !== 'text'">
|
||||
<transition-group>
|
||||
<div v-for="(option, optionIndex) in subject.options"
|
||||
:key="option.id"
|
||||
class="option-item">
|
||||
<i class="el-icon-rank option-drag-handle"></i>
|
||||
<div class="option-content">
|
||||
<el-input
|
||||
v-model="option.text"
|
||||
:placeholder="'选项'+optionIndex + 1">
|
||||
<template slot="prepend">选项{{optionIndex + 1}}</template>
|
||||
</el-input>
|
||||
<div v-if="option.imageUrl" style="margin-top: 10px;">
|
||||
<img :src="option.imageUrl" class="image-preview" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="option-tools">
|
||||
<template v-if="activity.category!=='QUIZ'">
|
||||
<div class="option-img-box" v-if="option.imgUrl">
|
||||
<i class="el-icon-remove"
|
||||
@click="removeOptionImg(subjectIndex,optionIndex)"></i>
|
||||
<img :src="option.imgUrl" alt=""
|
||||
@click="openOptionImg(subjectIndex,optionIndex,option)">
|
||||
</div>
|
||||
<i v-if="!option.imgUrl" class="el-icon-picture-outline"
|
||||
style="font-size: 40px;cursor: pointer;" title="上传图片"
|
||||
@click="openOptionImg(subjectIndex,optionIndex,option)"></i>
|
||||
</template>
|
||||
|
||||
<el-switch
|
||||
v-if="subject.type=='radio'"
|
||||
v-model="option.isOpenContent"
|
||||
active-text="内容填写">
|
||||
</el-switch>
|
||||
|
||||
<template v-if="option.isOpenContent == true">
|
||||
<el-tooltip class="item" effect="dark" content="您的其他建议:(前缀就是指这一段文字)" placement="top-start">
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
v-model="option.contentPrefix"
|
||||
placeholder="内容前缀">
|
||||
</el-input>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<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"
|
||||
size="mini"
|
||||
@click="removeOption(subject, optionIndex)">
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
<div class="subject-toolbar">
|
||||
<div>
|
||||
<el-button
|
||||
v-if="subject.type !== 'text'"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="small"
|
||||
@click="addOption(subject)">
|
||||
添加选项
|
||||
</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="small"
|
||||
@click="removeSubject(subjectIndex)">
|
||||
删除题目
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
<el-empty description="描述文字" v-if="subjects.length===0"></el-empty>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div style="border-top: 1px solid var(--border-color-lighter);padding: 12px;text-align: right;">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addSubject">
|
||||
添加题目
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-check" @click="saveQuestionnaire">
|
||||
保存题目
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<option-img ref="optionImgRef" @confirm="onOptionImgConfirm"></option-img>
|
||||
<setting ref="settingRef" @confirm="onSettingConfirm"></setting>
|
||||
</div>
|
||||
`,
|
||||
components: {
|
||||
'option-img': optionImg,
|
||||
'setting': setting
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: null,
|
||||
visible: false,
|
||||
formData: {},
|
||||
subjects: [],
|
||||
previewDialogVisible: false,
|
||||
activity: {},
|
||||
formRules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.visible = true
|
||||
if (id) {
|
||||
this.id = id
|
||||
$.post("/platform/welfare/evaluate/activity/findOne", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.activity = res.data
|
||||
}
|
||||
})
|
||||
$.post("/platform/welfare/evaluate/activity/listSubjects", {activityId: id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.subjects = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//生成随机id
|
||||
generateId() {
|
||||
return Date.now() + Math.random().toString(36).substr(2, 9)
|
||||
},
|
||||
|
||||
//添加题目
|
||||
addSubject() {
|
||||
this.subjects.push({
|
||||
id: this.generateId(),
|
||||
title: "",
|
||||
hint: "",
|
||||
type: "radio",
|
||||
score: 0,
|
||||
displayDate: "",
|
||||
options: [
|
||||
{
|
||||
id: this.generateId(),
|
||||
text: "选项1",
|
||||
hint: "",
|
||||
imgUrl: null,
|
||||
isCorrect: false
|
||||
},
|
||||
{
|
||||
id: this.generateId(),
|
||||
text: "选项2",
|
||||
hint: "",
|
||||
imgUrl: null,
|
||||
isCorrect: false
|
||||
}
|
||||
],
|
||||
})
|
||||
},
|
||||
|
||||
//题目类型切换
|
||||
subjectTypeChange(subject, subjectIndex){
|
||||
if(subject.type==='text'){
|
||||
subject.options = []
|
||||
}
|
||||
},
|
||||
|
||||
//删除题目
|
||||
removeSubject(index) {
|
||||
this.$confirm("确认删除该题目?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.subjects.splice(index, 1)
|
||||
this.$message.success("删除成功")
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
//添加选项
|
||||
addOption(subject) {
|
||||
subject.options.push({
|
||||
id: this.generateId(),
|
||||
text: "选项" + subject.options.length + 1,
|
||||
hint: "",
|
||||
imgUrl: null,
|
||||
isCorrect: false
|
||||
})
|
||||
},
|
||||
|
||||
//删除选项
|
||||
removeOption(subject, optionIndex) {
|
||||
subject.options.splice(optionIndex, 1)
|
||||
},
|
||||
|
||||
//打开选项上传图片
|
||||
openOptionImg(subjectIndex, optionIndex, option) {
|
||||
this.$refs.optionImgRef.onOpen(option.imgUrl, {
|
||||
subjectIndex,
|
||||
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
|
||||
},
|
||||
|
||||
//保存
|
||||
saveQuestionnaire() {
|
||||
$
|
||||
.post("/platform/welfare/evaluate/activity/saveSubjects", {
|
||||
activityId: this.id,
|
||||
subjects: JSON.stringify(this.subjects)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.visible = false
|
||||
this.$message.success(res.msg)
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/*.subject-form-dialog,.subject-form-dialog .el-dialog__body {*/
|
||||
/* background: rgb(248, 249, 250);*/
|
||||
/*}*/
|
||||
|
||||
.questionnaire-editor {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.editor-header {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.subject-item {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 25px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
border: 1px dashed #d9d9d9;
|
||||
}
|
||||
|
||||
.subject-item:hover {
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
|
||||
/*transform: translateY(-1px);*/
|
||||
}
|
||||
|
||||
.subject-header {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.subject-toolbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
background: white;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.toolbar-btn {
|
||||
margin: 5px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.option-item {
|
||||
background: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.option-drag-handle {
|
||||
cursor: move;
|
||||
margin-right: 10px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.option-content {
|
||||
flex-grow: 1;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.option-tools {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.preview-dialog {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.date-visible {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.subject-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
margin-top: 15px;
|
||||
background: #f8f9fa;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.image-preview {
|
||||
max-width: 200px;
|
||||
max-height: 200px;
|
||||
margin-top: 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
.drag-handler {
|
||||
cursor: move;
|
||||
color: #909399;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.meta-info {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.subject-type-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
.option-img-box{
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0
|
||||
}
|
||||
|
||||
.option-img-box:hover .el-icon-remove {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.option-img-box img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.option-img-box .el-icon-remove{
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
right: -7px;
|
||||
color: red;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.option-img-box .el-icon-remove:hover{
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
`
|
||||
}
|
||||
+55
-93
@@ -35,6 +35,18 @@ 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 clearable placeholder="请选择所选福利" style="width: 100%"
|
||||
v-model="pageForm.optionId">
|
||||
<el-option :label="item.optionName" :value="item.id"
|
||||
v-for="item in welfareOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">职工信息:</div>
|
||||
<div class="search-item-option">
|
||||
@@ -42,8 +54,8 @@ layout("/layouts/platform.html"){
|
||||
style="width: 100%" v-model="pageForm.searchKeyword">
|
||||
<el-select slot="prepend" style="width: 80px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="姓名" value="we.userName"></el-option>
|
||||
<el-option label="工号" value="we.loginName"></el-option>
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
@@ -79,46 +91,19 @@ layout("/layouts/platform.html"){
|
||||
</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.evaluateScore">
|
||||
<el-option
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
v-for="item in evaluateScores">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">套餐:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable placeholder="请选择所选福利" style="width: 100%"
|
||||
v-model="pageForm.optionId">
|
||||
<el-option :label="item.optionName" :value="item.id"
|
||||
v-for="item in welfareOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="福利项目">
|
||||
<template #func>
|
||||
|
||||
<el-button @click="exportXlsx" size="small" type="primary">导出xlsx</el-button>
|
||||
<el-button @click="dataReport" size="small" type="primary">查看分析</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
@@ -140,59 +125,31 @@ layout("/layouts/platform.html"){
|
||||
header-align="center"
|
||||
min-width="100px" show-overflow-tooltip
|
||||
v-for="column in tableColumns">
|
||||
<template scope="{row}" v-if="column.prop=='evaluateScore'">
|
||||
{{ row.evaluateScore }}分
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作"
|
||||
prop="userOnline" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openEvaluate(row)" size="mini" type="primary">查看评价
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="操作"-->
|
||||
<!-- prop="userOnline" width="150px">-->
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-button @click="openEvaluate(row)" size="mini" type="primary">查看评价</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="evaluateDialogVisible"
|
||||
title="评分内容"
|
||||
width="30%">
|
||||
<el-form :model="formData" label-width="80px" ref="form">
|
||||
<el-form-item :rules="[{ required: true, message: ''}]" label="评分">
|
||||
<div style="position: absolute; top: 20%;">
|
||||
<el-rate disabled
|
||||
show-score text-color="#ff9900"
|
||||
v-model="viewData.evaluateScore"></el-rate>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价">
|
||||
<el-input disabled
|
||||
maxlength="100"
|
||||
placeholder="请输入评价"
|
||||
rows="5"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
v-model="viewData.evaluateText"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="evaluateDialogVisible = false" type="primary">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<report ref="reportRef"></report>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include('report.js'){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
@@ -202,32 +159,25 @@ layout("/layouts/platform.html"){
|
||||
units: [],
|
||||
evaluateDialogVisible: false,
|
||||
welfareProjectList: [],
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitname', label: '单位'},
|
||||
{prop: 'unionname', label: '工会'},
|
||||
{prop: 'userState', label: '在职状态'},
|
||||
{prop: 'personType', label: '人员类型'},
|
||||
{prop: 'evaluateScore', label: '评分', sortable: true},
|
||||
{prop: 'evaluateText', label: '评价'},
|
||||
],
|
||||
tableColumns: [],
|
||||
pageForm: {
|
||||
searchName: "we.userName",
|
||||
searchName: "username",
|
||||
year: new Date().getFullYear().toString()
|
||||
},
|
||||
viewData: {},
|
||||
evaluateScores: [
|
||||
{name: "1分", code: 1},
|
||||
{name: "2分", code: 2},
|
||||
{name: "3分", code: 3},
|
||||
{name: "4分", code: 4},
|
||||
{name: "5分", code: 5},
|
||||
],
|
||||
welfareOptions: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
report
|
||||
},
|
||||
methods: {
|
||||
dataReport(){
|
||||
this.$refs.reportRef.onOpen(this.pageForm.projectId)
|
||||
},
|
||||
async exportXlsx() {
|
||||
this.$downLoad("/platform/welfare/evaluate/statistics/exportXlsx", this.pageForm)
|
||||
},
|
||||
openEvaluate(row) {
|
||||
this.viewData = {
|
||||
projectId: row.id,
|
||||
@@ -264,7 +214,19 @@ layout("/layouts/platform.html"){
|
||||
const resp = await $.post(loc() + '/welfareOptions', {projectId: this.pageForm.projectId})
|
||||
this.welfareOptions = resp.data
|
||||
},
|
||||
|
||||
pageData() {
|
||||
$.post("/platform/welfare/evaluate/statistics/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableColumns = res.data.tableColumns
|
||||
this.tableData = res.data.tableData.list
|
||||
this.pageForm.totalCount = res.data.tableData.totalCount
|
||||
} else {
|
||||
this.tableColumns = []
|
||||
this.tableData = []
|
||||
this.pageForm.totalCount = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.getWelfareProjectList()
|
||||
@@ -0,0 +1,113 @@
|
||||
const report = {
|
||||
/*language=HTML*/
|
||||
template: `
|
||||
<el-dialog title="分析报告" :visible.sync="dialogVisible" width="50%">
|
||||
<el-row type="flex" justify="end" class="mb10">
|
||||
<el-button type="primary" size="small" icon="el-icon-download" @click="exportReportXlsx">导出xlsx</el-button>
|
||||
</el-row>
|
||||
<div v-for="(subject,subjectIndex) in subjects" class="subject">
|
||||
<div>
|
||||
<div class="title">
|
||||
第{{subjectIndex+1}}题: {{subject.title}}
|
||||
<span class="type" v-if="subject.type==='text'">[填空题]
|
||||
<el-button type="text" @click="openDetailText(subject.id)">详情</el-button>
|
||||
</span>
|
||||
<span class="type" v-else-if="subject.type==='radio'">[单选题]</span>
|
||||
<span class="type" v-else-if="subject.type==='text'">[多选题]</span>
|
||||
</div>
|
||||
|
||||
<div v-if="subject.type==='text'">
|
||||
{{subject.texts.join('、')}}
|
||||
</div>
|
||||
|
||||
<div v-else-if="subject.type==='radio' || subject.type==='checkbox'">
|
||||
<el-table :data="subject.options" size="small">
|
||||
<el-table-column label="选项" prop="text"></el-table-column>
|
||||
<el-table-column label="小计" prop="selectCount" width="100"></el-table-column>
|
||||
<el-table-column label="比例" width="500">
|
||||
<template slot-scope="scope">
|
||||
<el-progress
|
||||
:percentage="Math.round(scope.row.selectCount / subject.selectTotal * 100)"></el-progress>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详情" width="100px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="openDetail(subject.id,row.id)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="选择详情" :visible.sync="optionVisible" width="50%" append-to-body>
|
||||
<el-table :data="optionUsers" size="small">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName"></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName"></el-table-column>
|
||||
<el-table-column label="选择时间" prop="attemptDate"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
</el-dialog>
|
||||
`,
|
||||
dicts: ["ACTIVITY_QSV_CATEGORY"],
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
activityId: null,
|
||||
report: null,
|
||||
subjects: [],
|
||||
optionVisible: false,
|
||||
optionUsers: [],
|
||||
welfareId: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(welfareId) {
|
||||
this.welfareId = welfareId
|
||||
this.dialogVisible = true
|
||||
$.post("/platform/welfare/evaluate/statistics/dataReport", { welfareId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
debugger
|
||||
this.subjects = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openDetailText(id){
|
||||
|
||||
},
|
||||
openDetail(subjectId, optionId) {
|
||||
console.log(subjectId)
|
||||
console.log(optionId)
|
||||
$.post("/platform/qsv/survey/selectOptionUsers", {
|
||||
activityId: this.activityId,
|
||||
subjectId,
|
||||
optionId
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.optionVisible = true
|
||||
this.optionUsers = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
exportReportXlsx(){
|
||||
this.$downLoad("/platform/welfare/evaluate/statistics/exportReportXlsx", { welfareId: this.welfareId })
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.subject{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.subject .title{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.subject .type{
|
||||
color: #a6a6a6;
|
||||
margin-left: 10px;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -110,7 +110,7 @@ let commonColumns = [
|
||||
{prop: 'userState', label: '在职状态', sortable: true, width: "100"},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0},
|
||||
// {prop: 'isReceive', label: '是否领取', sortable: true}
|
||||
]
|
||||
|
||||
@@ -632,7 +632,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'unitname', label: '所属单位', sortable: true},
|
||||
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
|
||||
{prop: 'unionGroupName', label: '工会小组', sortable: true, checked: 0}
|
||||
],
|
||||
welfareUnits: [],
|
||||
|
||||
@@ -132,7 +132,7 @@ layout("/layouts/platform.html"){
|
||||
type="primary">
|
||||
查看物流
|
||||
</el-button>-->
|
||||
<el-button :disabled="!row.courierNumber" @click="openEvaluate(row)"
|
||||
<el-button v-if="row.evaId" @click="openEvaluate(row)"
|
||||
size="mini"
|
||||
type="primary">
|
||||
评价
|
||||
@@ -354,8 +354,11 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
</el-drawer>
|
||||
|
||||
<!--快递物流信息-->
|
||||
<!-- 快递物流信息 -->
|
||||
<courier-number-info ref="courierNumberInfo"></courier-number-info>
|
||||
|
||||
<!-- qrcode -->
|
||||
<open-qr-code :url="activityH5Url" ref="openQRCode"></open-qr-code>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
@@ -400,10 +403,12 @@ layout("/layouts/platform.html"){
|
||||
expressDrawer: false,
|
||||
logisticsTrace: {},
|
||||
|
||||
activityH5Url: '',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'courier-number-info': httpVueLoader('/components/welfare/CourierNumberInfo.vue?v=' + new Date().getTime())
|
||||
'courier-number-info': httpVueLoader('/components/welfare/CourierNumberInfo.vue?v=' + new Date().getTime()),
|
||||
"open-qr-code": httpVueLoader("/components/plugins/OpenQRCode.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
//查看快递单号
|
||||
@@ -468,12 +473,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async openEvaluate(row) {
|
||||
await this.getUserSelection(row.id)
|
||||
if (this.userSelection && this.userSelection.length > 0) {
|
||||
await this.finOneWelfareEvaluate(row.id, this.userSelection[0].selectOptionId)
|
||||
}
|
||||
|
||||
this.evaluateDialogVisible = true
|
||||
this.$refs.openQRCode.openCode("/platform/h5/welfare/evaluate?id=" + row.evaId, "该评价只支持手机端,请使用钉钉扫描二维码!")
|
||||
// await this.getUserSelection(row.id)
|
||||
// if (this.userSelection && this.userSelection.length > 0) {
|
||||
// await this.finOneWelfareEvaluate(row.id, this.userSelection[0].selectOptionId)
|
||||
// }
|
||||
//
|
||||
// this.evaluateDialogVisible = true
|
||||
},
|
||||
async getProjectInfo(id) {
|
||||
const resp = await $.get('/platform/welfare/common/findOne', {projectId: id})
|
||||
|
||||
Reference in New Issue
Block a user