迁移党史

This commit is contained in:
aixianling
2021-12-20 10:31:12 +08:00
parent 58bd5237da
commit 6d0810031d
12 changed files with 34 additions and 2795 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="page">
<section class="AppPartyHistory">
<div v-if="isShow" style="height: 100%">
<!-- 头部搜索样式 -->
<div class="fixed-top" style="width:100%;">
@@ -86,11 +86,14 @@
<div class="search-word" @click="search">搜索</div>
</div>
</div>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "AppPartyHistory",
appName: "党史文章",
data() {
const currentDate = this.getDate({
format: true,
@@ -124,7 +127,6 @@ export default {
},
onLoad(option) {
this.style = option.style
console.log(this.style)
this.$dict.load("partyHistoryType0", "partyHistoryType1", "partyHistoryType2").then(() => {
this.array = this.$dict.getDict(`partyHistoryType${this.style}`)
this.array.unshift({dictName: "全部类型", dictValue: ""})
@@ -133,7 +135,6 @@ export default {
},
methods: {
bindPickerChange(e) {
console.log(e)
this.partyType = this.array[e.detail.value].dictName;
this.partyTypeIndex = this.array[e.detail.value].dictValue;
this.pageNum = 1;
@@ -214,7 +215,6 @@ export default {
},
},
onReachBottom() {
console.log(123)
this.pageNum = this.pageNum + 1;
this.getPartyList();
},
@@ -223,7 +223,7 @@ export default {
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
.AppPartyHistory {
.search-box {
width: 100%;
height: 112px;
@@ -249,6 +249,7 @@ export default {
position: relative;
top: 6px;
}
.color-fff {
color: #fff;
}
@@ -293,6 +294,7 @@ export default {
// height:calc(100% - 210rpx);
// overflow-y: auto;
padding-top: 200px;
.affairs {
background-color: #fff;
margin: 32px;

View File

@@ -74,7 +74,7 @@ export default {
.replace(/style=""/g, 'style="max-width:100%!important;"');
res.data.content = res.data.content.replace(
/<img[^>]*>/gi,
function (match, capture) {
function (match) {
return match.replace(
/style\s*?=\s*?(["])[\s\S]*?\1/gi,
'style="max-width:100%;"'

View File

@@ -1,488 +0,0 @@
<template>
<div class="page">
<div v-if="isShow" style="height:100%;width:100%">
<div class="party_header" v-if="list.length > 0">
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<image src="https://cdn.cunwuyun.cn/img/search-red.svg"/>
<span>{{ title || '请输入活动名称或活动地点' }}</span>
</div>
</div>
</div>
<div class="party_header" v-if="list.length == 0" style="height: auto;">
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<image src="https://cdn.cunwuyun.cn/img/search-red.svg"/>
<span>{{ title || '请输入活动名称或活动地点' }}</span>
</div>
</div>
</div>
<div class='slect flex-row'>
<div class="uni-list type-slect">
<div class="uni-list-cell">
<div class="uni-list-cell-db">
<picker @change="bindPickerChange" :range="activeTypeArr">
<div class="uni-input">{{ actionName }}</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
<div class="uni-list type-slect">
<div class="uni-list-cell">
<div class="uni-list-cell-db">
<picker @change="bindStatusChange" :range="applyStatusArr">
<div class="uni-input">{{ signupName }}</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
</div>
<div class="list_content" v-if="list.length > 0">
<ul class="list_div">
<li v-for="(e,index) in list" :key="index">
<div class="up" @click="goToDetail(e)">
<h3>{{ e.title }}</h3>
<div class="info">
<span>活动时间</span>
<p>{{ e.beginTime|timeVal }}<br/>{{ e.endTime|timeVal }}</p>
</div>
<div class="info">
<span>活动地点</span>
<p>{{ e.address }}</p>
</div>
</div>
<div class="btn">
<div class="button callBtn"
:class="{color4:e.actionStatus==0,color5:e.actionStatus==1&&e.signupStatus==1 || e.actionStatus==2&&e.signupStatus==1}"
@click="handlerCall(e)" v-if="e.nowUsersignupStatus">
<span>呼叫联系人</span>
</div>
<div class="button" :class="{color4:e.nowUsersignupStatus==null,color5:e.nowUsersignupStatus==1}"
v-if="e.nowUsersignupStatus==null&&e.actionStatus!=2&&e.signupStatus==0">
<span @click="signUp(e)">去报名</span>
</div>
<div class="button color4"
v-if="e.nowUsersignupStatus && e.signupContent==null && e.signupStatus==1 && ['1','2'].includes(e.actionStatus)">
<span @click="goToLog(e)">填写日志</span>
</div>
<div class="button color4"
v-if="e.nowUsersignupStatus && e.signupContent && e.signupStatus==1 && ['1','2'].includes(e.actionStatus)">
<span @click="goToLog(e)">编辑日志</span>
</div>
</div>
<p class="tip" :class="{color1:e.actionStatus==0,color2:e.actionStatus==1,color3:e.actionStatus==2}">
<span v-if="e.actionStatus==0">未开始</span>
<span v-if="e.actionStatus==1">进行中</span>
<span v-if="e.actionStatus==2">已结束</span>
</p>
</li>
</ul>
</div>
<AiEmpty v-if="list.length==0" />
</div>
<div v-if="!isShow" class="search-input">
<div class="input-box flex-row">
<input type="span" class="input" placeholder="请输入活动名称或活动地点" focus="false" v-model="title"/>
<image class="sousuo" src="https://cdn.cunwuyun.cn/img/search-active.svg"/>
<image v-if="title" @tap="clearInput" class="clear" src="https://cdn.cunwuyun.cn/img/empty-Input.svg"/>
<div class="search-word" @click="getList()">搜索</div>
</div>
</div>
</div>
</template>
<script>
import mixins from "@/pages/party/partyReport/mixins/mixin";
import {mapState} from 'vuex'
export default {
name: "partyReportList",
mixins: [mixins],
computed: {
...mapState(['user']),
},
data() {
return {
navId: 0,
list: [],
title: '',
isShow: true,
applyStatusArr: [],
activeTypeArr: [],
actionStatus: '',
signupStatus: '',
actionName: '活动状态',
signupName: '报名状态'
}
},
filters: {
timeVal(val) {
if (val) {
return val.substring(0, 16)
}
}
},
onLoad(options) {
this.navId = options.id;
this.$dict.load('partyReportActionStatus', 'partyReportSignupStatus');
this.$dict.getDict('partyReportActionStatus').map(i => {
this.activeTypeArr.push(i.dictName)
});
this.$dict.getDict('partyReportSignupStatus').map(i => {
this.applyStatusArr.push(i.dictName)
})
this.getList();
},
onShow() {
this.getList();
},
methods: {
getList() {
this.$http.post(`/app/apppartyreport/list-xcx?listType=${this.navId}&partyId=${this.user.id}&partyOrgId=${this.user.partyOrgId}&title=${this.title}&actionStatus=${this.actionStatus}&signupStatus=${this.signupStatus}&size=${10000}`, null, {}).then(res => {
if (res.code == 0) {
if (res.data.records == null) {
this.list = [];
} else {
this.list = res.data.records;
}
this.isShow = true;
} else {
}
}).catch(err => {
})
},
changeSearchBox() {
this.isShow = false
},
clearInput() {
this.title = ''
},
bindPickerChange(e) {
this.actionName = this.activeTypeArr[Number(e.detail.value)];
this.actionStatus = e.detail.value;
this.getList();
},
bindStatusChange(e) {
this.signupName = this.applyStatusArr[Number(e.detail.value)];
this.signupStatus = e.detail.value;
this.getList();
},
goToDetail(e) {
uni.navigateTo({
url: `/pages/party/partyReport/partyDetail?id=${e.id}&listType=${this.navId}`
})
},
signUp(e) {
uni.navigateTo({
url: `/pages/party/partyReport/signUp?reportId=${e.id}`
})
}
}
}
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
width: 100%;
height: 100%;
overflow: hidden;
.slect {
width: 100%;
height: 96px;
background-color: #fff;
color: #666;
.type-slect {
width: 50%;
border-right: 1px solid #F7F7F7;
margin: 30px 0;
box-sizing: border-box;
text-align: center;
font-size: 26px;
.uni-input {
display: inline-block;
}
image {
width: 32px;
height: 32px;
display: inline-block;
position: relative;
top: 6px;
margin-left: 8px;
}
}
.type-slect:nth-child(2) {
border: none;
}
}
.party_header {
background: #E60012;
.search-box {
width: 100%;
padding: 24px 32px;
box-sizing: border-box;
background: #E60012;
.search-input {
line-height: 64px;
width: 100%;
height: 100%;
border-radius: 32px;
background: #CE0010;
color: #fff;
font-size: 26px;
span {
white-space: nowrap;
overflow: hidden;
color: #fff;
span-overflow: ellipsis;
}
image {
width: 40px;
height: 40px;
margin: 8px 8px 8px 24px;
position: relative;
top: 6px;
}
}
}
}
.search-input {
.input-box {
width: 100%;
height: 112px;
background-color: #fff;
padding: 24px 32px;
box-sizing: border-box;
position: relative;
.sousuo {
position: absolute;
top: 35px;
left: 60px;
width: 40px;
height: 40px;
}
.input {
background-color: #F3F3F3;
width: 598px;
height: 64px;
color: #999999;
font-size: 26px;
margin-left: 8px;
border-radius: 32px;
padding-left: 70px;
padding-right: 60px;
box-sizing: border-box;
}
.clear {
width: 32px;
height: 32px;
position: absolute;
top: 40px;
right: 130px;
z-index: 10;
}
.search-word {
font-size: 28px;
color: #135AB8;
line-height: 60px;
margin-left: 20px;
}
}
}
.list_content {
width: calc(100% - 64rpx);
height: calc(100% - 260rpx);
padding: 32px 32px 0 32px;
overflow: auto;
.list_div {
width: 100%;
height: 100%;
li {
width: 100%;
height: 426px;
background-color: #fff;
border-radius: 4px;
margin-bottom: 32px;
position: relative;
overflow: hidden;
.up {
height: 330px;
width: 100%;
padding: 32px;
box-sizing: border-box;
border-bottom: 2px solid #eeeeee;
h3 {
color: #333333;
font-size: 32px;
font-weight: bold;
width: 90%;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 1;
overflow: hidden;
span-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.info {
width: 100%;
display: flex;
font-size: 30px;
margin-top: 32px;
span {
width: 150px;
color: rgba(153, 153, 153, 1);
}
p {
flex: 1;
color: #343D65;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
span-overflow: ellipsis;
-webkit-box-orient: vertical;
}
}
}
.btn {
height: 96px;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 32px;
box-sizing: border-box;
.button {
width: 152px;
height: 56px;
border-radius: 28px;
color: #1365DD;
text-align: center;
line-height: 56px;
font-size: 28px;
margin-left: 16px;
border: 2px solid rgba(19, 101, 221, 1);
}
.callBtn {
width: 196px !important;
margin-left: 0 !important;
}
.color4 {
color: #1365DD;
border: 2px solid rgba(19, 101, 221, 1);
}
.color5 {
color: #606060;
border: 2px solid #E1E1E1;
}
}
.tip {
position: absolute;
width: 200px;
height: 56px;
text-align: center;
line-height: 56px;
right: -50rpx;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
top: 20px;
&.color1 {
color: #ff8822;
background-color: #FFF3E9;
}
&.color2 {
color: #5A98F2;
background-color: #EEF5FF;
}
&.color3 {
color: #999999;
background-color: #F2F2F2;
}
}
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210rpx);
display: flex;
justify-content: center;
align-items: center;
}
.footer {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
height: 104px;
background: rgba(255, 228, 221, 1);
color: #D73D3D;
display: flex;
justify-content: center;
align-items: center;
font-size: 32px;
p {
width: 50%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
&.active {
background-color: #D73D3D;
color: #ffffff;
}
}
}
}
</style>

View File

@@ -1,436 +0,0 @@
<template>
<div class="page">
<header></header>
<div class="form">
<div class="main">
<div class="textarea">
<div class="color-333"><span class="color-red">*</span>活动总结</div>
<textarea
type="textarea"
placeholder="填写本次活动参与心得体会200字以内"
v-model="baseInfo.content"
adjust-position="false"
maxlength="200"
></textarea>
</div>
<div class="uni-uploader">
<div class="title-box title-box-margin">
<span class="title">活动照片最多9张</span>
</div>
<div class="uni-uploader-body">
<div class="uni-uploader__files">
<div v-for="(image, index) in imageList" :key="index">
<div class="uni-uploader__file">
<image
class="uni-uploader__img"
:src="image.url"
:data-index="index"
@tap="previewImage(index)"
></image>
<AiUniIcon
type="clear"
class="icon"
color="#8f8f94"
size="20"
@click="deleteImage(index)"
></AiUniIcon>
</div>
</div>
<div
class="pre-div"
@tap="chooseImageType"
v-if="imageList.length < 9"
>
<span class="pre-label">+</span>
<span class="add-image">添加照片</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="report" @click="report()">提交</div>
</div>
</template>
<script>
import axios from "@/utils/axios.js";
export default {
name: "fillLog",
data() {
return {
reportId: "",
baseInfo: {
content: "",
fileIds: [],
reportId: "",
id: "",
},
imageList: [],
sourceTypeIndex: 2,
sourceType: [
// 图片来源类型
["camera"],
["album"],
],
};
},
onLoad(options) {
this.baseInfo.reportId = options.reportId;
this.baseInfo.id = options.signupId;
options.signupContent ? this.logReport() : null;
},
methods: {
// 选择照片类型
chooseImageType() {
let that = this;
uni.showActionSheet({
itemList: ["拍照", "从相册选择"],
success: function (res) {
that.sourceTypeIndex = res.tapIndex;
that.chooseImage();
},
});
},
showModel(title) {
uni.showModal({
title: "温馨提示",
content: title,
showCancel: false,
confirmColor: "#135AB8",
});
},
chooseImage () {
let params = {
count: 9,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
let count = this.fileList?.length + (res.tempFiles?.length || res.tempFile ? 1 : 0)
if (count > 9) {
return this.$u.toast(`不能超过9个`)
}
if (res.tempFiles) {
res.tempFiles.map((item, index) => {
this.uploadFile(item, index)
})
}
}
}
uni.chooseImage(params)
},
uploadFile (img, index) {
uni.showLoading({title: '上传中'})
let formData = new FormData()
formData.append('file', img)
this.$http.post('/admin/file/add', formData).then((res) => {
uni.hideLoading()
if (res?.data) {
this.$u.toast('上传成功!')
console.log(res.data)
this.imageList.push({
id: res.data[0].split(';')[1],
url: res.data[0].split(';')[0]
})
console.log(this.imageList)
}
}).catch(res => {
this.$u.toast(res)
uni.hideLoading()
})
},
// chooseImage: async function () {
// let that = this;
// if (that.imageList.length === 9) {
// let isContinue = await that.isFullImg();
// if (!isContinue) {
// return;
// }
// }
// uni.chooseImage({
// // 从相册选择或相机拍摄
// sourceType: that.sourceType[that.sourceTypeIndex],
// // 最多可以选择的图片数量
// count: 9,
// success: (res) => {
// // 图片的本地文件路径列表
// that.tempFilePaths = res.tempFilePaths;
// console.log(res.tempFilePaths)
// for (let i = 0; i < that.tempFilePaths.length; i++) {
// let str = "";
// let token = uni.getStorageSync("token");
// // console.log('token',token)
// let params = {
// token: token,
// };
// // url String 是 开发者服务器 url
// // files Aarry 否 需要上传的文件列表。使用 files 时filePath 和 name 不生效。 5+App
// // filePath String 是 要上传文件资源的路径。
// // name String 是 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容
// // header Object 否 HTTP 请求 Header, header 中不能设置 Referer
// // formData Object 否 HTTP 请求中其他额外的 form data
// // success Function 否 接口调用成功的回调函数
// // fail Function 否 接口调用失败的回调函数
// // complete Function 否 接口调用结束的回调函数(调用成功、失败都会执行)
// let formData = new FormData()
// formData.append('file', that.tempFilePaths[i])
// that.$http.post('/admin/file/add2', formData).then((res) => {
// if(res.data) {
// str = JSON.stringify(JSON.parse(res.data).data[0]).replace(
// /\"/g,
// ""
// );
// var temp = {
// fileId: str.split(";")[1],
// accessUrl: str.split(";")[0],
// };
// that.imageList = that.imageList.concat(temp);
// if (that.imageList.length > 9) {
// that.imageList = that.imageList.slice(0, 9);
// uni.showToast({
// title: "图片最多只能上传9张",
// icon: "none",
// });
// }
// that.imgUrl = JSON.stringify(that.imageList);
// }
// });
// }
// },
// });
// },
// 预览图片(大图预览)
previewImage(index) {
var tempList = [];
for (var i in this.imageList) {
tempList.push(this.imageList[i].url);
}
uni.previewImage({
// 当前图片的索引、链接
current: index,
urls: tempList
});
},
// 删除照片
deleteImage(index) {
this.imageList.splice(index, 1);
},
report() {
let arr = [];
if (!this.baseInfo.content) {
this.showModel("请填写活动总结");
return false;
}
this.imageList.map((e) => {
arr.push(e.id);
});
this.baseInfo.fileIds = arr;
this.$http
.post(`/app/apppartyreport/log-add`, this.baseInfo, null)
.then((res) => {
if (res.code == 0) {
uni.showToast({
title: "提交",
icon: "success",
duration: 2000,
});
uni.navigateBack({
delta: 1,
});
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
duration: 1000,
});
});
},
logReport() {
const userInfo = uni.getStorageSync("userInfo");
this.$http
.post(
`/app/apppartyreport/log-report?partyId=${userInfo.id}&reportId=${this.baseInfo.reportId}`
)
.then((res) => {
if (res.code == 0 && res.data) {
this.baseInfo.content = res.data.content;
this.baseInfo.fileIds = res.data.fileIds;
res.data.files.map((e) => {
this.imageList.push({ url: e.accessUrl, id: e.id });
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
width: 100%;
height: 100%;
header {
width: 100%;
height: 112rpx;
background-color: #e60012;
}
.form {
width: 100%;
padding: 32rpx;
box-sizing: border-box;
margin-top: -100rpx;
.main {
background-color: #fff;
border-radius: 8rpx;
padding: 16rpx;
box-sizing: border-box;
}
.basic-item {
font-size: 32rpx;
justify-content: space-between;
width: 100%;
height: 112rpx;
padding: 32rpx 32rpx 32rpx 12rpx;
box-sizing: border-box;
background-color: #fff;
border-bottom: 1rpx solid #eee;
input {
text-align: right;
}
.wid-110 {
width: 214rpx;
}
.skill-span {
max-width: 432rpx;
text-align: right;
display: inline-block;
overflow: hidden;
span-overflow: ellipsis;
white-space: nowrap;
font-size: 30rpx;
}
.picker {
justify-content: flex-end;
align-items: center;
color: #999999;
font-size: 32rpx;
background-color: #ffffff;
}
.picker > .AiArea {
background-color: #fff !important;
}
.image {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
.wei-span {
width: 40%;
}
.msg-value {
width: 60%;
}
.msg-btn {
width: 160px;
text-align: right;
background-color: #fff !important;
}
button {
font-size: 28rpx;
background-color: #fff;
line-height: 48rpx;
padding: 0;
}
button::after {
border: 0;
}
.button-hover {
background-color: #fff;
}
button[disabled] {
background-color: #fff !important;
font-size: 28rpx;
border-radius: 0;
}
}
/* 上传照片 */
.uni-uploader {
flex: 1;
flex-direction: column;
}
.uni-uploader-head {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.uni-uploader-info {
color: #b2b2b2;
}
.uni-uploader-body {
margin-top: 16rpx;
}
.uni-uploader__files {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.uni-uploader__file {
margin-right: 7rpx;
margin-bottom: 20rpx;
width: 160rpx;
height: 160rpx;
position: relative;
}
.uni-uploader__img {
display: block;
width: 160rpx;
height: 160rpx;
}
.pre-label {
font-size: 80rpx;
color: #dddddd;
}
.add-image {
color: #dddddd;
font-size: 24rpx;
}
.pre-div {
width: 160rpx;
height: 160rpx;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
border-radius: 8rpx;
border: 2rpx solid #dddddd;
}
.icon {
position: absolute;
top: -15rpx;
right: -10rpx;
}
}
.report {
position: fixed;
left: 0;
bottom: 0;
height: 112rpx;
line-height: 112rpx;
font-size: 32rpx;
text-align: center;
background: rgba(230, 0, 18, 1);
color: #fff;
}
}
</style>

View File

@@ -1,373 +0,0 @@
<template>
<div class="page">
<ul class="nav_bar">
<li v-for="(e,index) in navList" :key="index" :class="{active:navId==e.id}" @click="getList(e.id)">{{ e.name }}
</li>
</ul>
<div class="list_content" v-if="list.length>0">
<ul class="list_div">
<li v-for="(e,index) in list" :key="index">
<div class="up" @click="goToDetail(e)">
<h3>{{ e.title }}</h3>
<div class="info">
<span>活动时间</span>
<p>{{ e.beginTime|timeVal }}<br/>{{ e.endTime|timeVal }}</p>
</div>
<div class="info">
<span>活动地点</span>
<span class="address">{{ e.address }}</span>
</div>
</div>
<div class="btn">
<div class="button" :class="{color4:e.nowUsersignupStatus==null,color5:e.nowUsersignupStatus==1}"
v-if="e.nowUsersignupStatus==null&&e.actionStatus!=2&&e.signupStatus==0">
<span @click="signUp(e)">去报名</span>
</div>
<div class="button callBtn"
:class="{color4:e.actionStatus==0,color5:e.actionStatus==1&&e.signupStatus==1 || e.actionStatus==2&&e.signupStatus==1}"
v-if="navId==1" @click="handlerCall(e)">
<span>呼叫联系人</span>
</div>
<div class="button color4"
v-if="navId==1 && e.nowUsersignupStatus && e.signupContent==null && e.signupStatus==1 && ['1','2'].includes(e.actionStatus)">
<span @click="goToLog(e)">填写日志</span>
</div>
<div class="button color4"
v-if="navId==1 && e.nowUsersignupStatus && e.signupContent && e.signupStatus==1 && ['1','2'].includes(e.actionStatus)">
<span @click="goToLog(e)">编辑日志</span>
</div>
</div>
<p class="tip" :class="{color1:e.actionStatus==0,color2:e.actionStatus==1,color3:e.actionStatus==2}">
<span v-if="e.actionStatus==0">未开始</span>
<span v-if="e.actionStatus==1">进行中</span>
<span v-if="e.actionStatus==2">已结束</span>
</p>
</li>
</ul>
</div>
<AiEmpty v-if="list.length==0"/>
<div class="footer">
<p v-for="(e,index) in footerList" :key="index" :class="{active:navId==e.id}" @click="goToList(e.id)">
<image src="https://cdn.cunwuyun.cn/img/party_detail.png" v-if='e.id==2'></image>
<image src="https://cdn.cunwuyun.cn/img/party_now_reg.png" v-if='e.id==3'></image>
<span>{{ e.name }}</span>
</p>
</div>
</div>
</template>
<script>
import mixins from "@/pages/party/partyReport/mixins/mixin";
import {mapState} from 'vuex'
export default {
name: "partyReportList",
mixins: [mixins],
computed: {
...mapState(['user'])
},
data() {
return {
navList: [
{name: "可报名的活动", id: 0},
{name: "我的活动日程", id: 1}
],
footerList: [
{name: "社区活动列表", id: 2},
{name: "我的活动记录", id: 3}
],
navId: 0,
list: [],
}
},
filters: {
timeVal(val) {
if (val) {
return val.substring(0, 16)
}
}
},
onLoad() {
this.getList(0)
},
onShow() {
this.getList(this.navId);
},
methods: {
getList(id) {
this.navId = id;
this.list = [];
this.$http.post(`/app/apppartyreport/list-xcx?listType=${id}&partyId=${this.user.id}&partyOrgId=${this.user.reportOrgId}&size=${10000}`).then(res => {
if (res.code == 0) {
if (res.data.records == null) {
this.list = [];
} else {
this.list = res.data.records;
}
}
})
},
goToList(id) {
if (id == 2) {
uni.navigateTo({
url: `/pages/party/partyReport/communityList?id=${id}`
})
} else if (id == 3) {
uni.navigateTo({
url: `/pages/party/partyReport/myList?id=${id}`
})
}
},
goToDetail(e) {
uni.navigateTo({
url: `/pages/party/partyReport/partyDetail?id=${e.id}&listType=${this.navId}`
})
},
}
}
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
width: 100%;
height: 100%;
overflow: hidden;
.nav_bar {
width: 100%;
height: 112px;
background: #E60012;
li {
width: 50%;
float: left;
height: 90px;
line-height: 90px;
text-align: center;
color: #fff;
font-size: 28px;
opacity: 0.8;
position: relative;
&:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
height: 4px;
width: 40px;
background-color: transparent;
}
}
li.active {
opacity: 1;
&:after {
background-color: #fff;
}
}
}
.list_content {
width: calc(100% - 64px);
height: calc(100% - 284px);
padding: 32px;
overflow: auto;
.list_div {
width: 100%;
height: 100%;
padding: 0 0 400px 0;
li {
width: 100%;
height: 446px;
background-color: #fff;
border-radius: 4px;
margin-bottom: 32px;
position: relative;
overflow: hidden;
.up {
height: 330px;
width: 100%;
padding: 32px;
word-break: break-all;
box-sizing: border-box;
border-bottom: 2px solid #eeeeee;
h3 {
color: #333333;
font-size: 32px;
font-weight: bold;
width: 90%;
display: -webkit-box;
word-break: break-all;
-webkit-line-clamp: 1;
overflow: hidden;
span-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.info {
width: 100%;
display: flex;
font-size: 30px;
margin-top: 32px;
span {
width: 150px;
color: rgba(153, 153, 153, 1);
}
p {
flex: 1;
color: #343D65;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
span-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.address {
width: 320px;
}
}
.endTime {
box-sizing: border-box;
padding-left: 150px;
font-size: 30px;
color: #343D65;
}
}
.btn {
height: 118px;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 32px;
box-sizing: border-box;
.button {
width: 152px;
height: 56px;
border-radius: 28px;
color: #1365DD;
text-align: center;
line-height: 56px;
margin-left: 16px;
font-size: 28px;
border: 2px solid rgba(19, 101, 221, 1);
}
.callBtn {
width: 196px !important;
margin-left: 0 !important;
}
.color4 {
color: #1365DD;
border: 2px solid rgba(19, 101, 221, 1);
}
.color5 {
color: #606060;
border: 2px solid #E1E1E1;
}
}
.tip {
position: absolute;
width: 200px;
height: 56px;
text-align: center;
line-height: 56px;
right: -50px;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
top: 20px;
&.color1 {
color: #ff8822;
background-color: #FFF3E9;
}
&.color2 {
color: #5A98F2;
background-color: #EEF5FF;
}
&.color3 {
color: #999999;
background-color: #F2F2F2;
}
}
}
}
}
.footer {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
height: 104px;
background: rgba(255, 228, 221, 1);
color: #D73D3D;
display: flex;
justify-content: center;
align-items: center;
font-size: 32px;
image {
width: 32px;
height: 32px;
}
p {
width: 50%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
&.active {
background-color: #D73D3D;
color: #ffffff;
}
}
p:nth-child(1) {
border-right: 2px solid rgb(241, 178, 178);
box-sizing: border-box;
}
p:nth-child(2) {
background-color: #FE5A49;
box-sizing: border-box;
color: #fff;
}
}
}
</style>

View File

@@ -1,36 +0,0 @@
export default {
methods:{
handlerCall({contactPerson,contactPhone}){
uni.showModal({
title:contactPerson,
content:contactPhone,
confirmspan:"拨打",
cancelspan:"复制",
confirmColor:"#135AB8",
success(res){
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: contactPhone
});
} else if (res.cancel) {
// uni.setClipboardData({
// data:contactPhone,
// })
}
}
})
},
goToLog(e){
uni.navigateTo({
url:`/pages/party/partyReport/fillLog?reportId=${e.id}&signupId=${e.signupId}&signupContent=${e.signupContent}`
})
},
signUp(e){
uni.navigateTo({
url:`/pages/party/partyReport/signUp?reportId=${e.id}`
})
}
}
}

View File

@@ -1,495 +0,0 @@
<template>
<div class="page">
<div v-if="isShow" style="height:100%;width:100%">
<ul class="nav_bar">
<li v-for="(e,index) in navList" :key="index" :class="{active:navId==e.id}" @click="navClick(e.id)">
<span>{{ e.name }}</span>
<span v-if="e.id==4">({{ total }})</span>
</li>
</ul>
<div class="party_header" v-if="list.length > 0">
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<image src="https://cdn.cunwuyun.cn/img/search-red.svg"/>
<span>{{ title || '请输入活动名称或活动地点' }}</span>
</div>
</div>
</div>
<div class="party_header" v-if="list.length == 0" style="height: auto;">
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<image src="https://cdn.cunwuyun.cn/img/search-red.svg"/>
<span>{{ title || '请输入活动名称或活动地点' }}</span>
</div>
</div>
</div>
<div class="list_content" v-if="list.length > 0">
<ul class="list_div">
<li v-for="(e,index) in list" :key="index">
<div class="up" @click="goToDetail(e)">
<h3>{{ e.title }}</h3>
<div class="info">
<span>活动时间</span>
<p>{{ e.beginTime }}<br/>{{ e.endTime }}</p>
</div>
<div class="info">
<span>活动地点</span>
<p>{{ e.address }}</p>
</div>
</div>
<div class="btn">
<div class="button callBtn"
:class="{color4:e.actionStatus==0,color5:e.actionStatus==1&&e.signupStatus==1 || e.actionStatus==2&&e.signupStatus==1}"
@click="handlerCall(e)">
<span>呼叫联系人</span>
</div>
<div class="button color4"
v-if="e.logStatus==0 && e.nowUsersignupStatus==1 && ['1','2'].includes(e.actionStatus)">
<span @click="goToLog(e)">填写日志</span>
</div>
<div class="button color4"
v-if="['1','3'].includes(e.logStatus)&& e.nowUsersignupStatus==1 && ['1','2'].includes(e.actionStatus)">
<span @click="goToLog(e)">编辑日志</span>
</div>
</div>
<p class="tip" :class="{color1:e.actionStatus==0,color2:e.actionStatus==1,color3:e.actionStatus==2}">
<span v-if="e.actionStatus==0">未开始</span>
<span v-if="e.actionStatus==1">进行中</span>
<span v-if="e.actionStatus==2">已结束</span>
</p>
</li>
</ul>
</div>
<AiEmpty v-if="list.length==0" />
</div>
<div v-if="!isShow" class="search-input">
<div class="input-box flex-row">
<input type="span" class="input" placeholder="请输入活动名称或活动地点" focus="false" v-model="title"/>
<image class="sousuo" src="https://cdn.cunwuyun.cn/img/search-active.svg"/>
<image v-if="title" @tap="clearInput" class="clear" src="https://cdn.cunwuyun.cn/img/empty-Input.svg"/>
<div class="search-word" @click="getList()">搜索</div>
</div>
</div>
</div>
</template>
<script>
import mixins from "@/pages/party/partyReport/mixins/mixin";
import {mapState} from 'vuex'
export default {
name: "partyReportList",
mixins: [mixins],
data() {
return {
navId: 0,
list: [],
title: '',
isShow: true,
applyStatusArr: [],
activeTypeArr: [],
actionStatus: '',
signupStatus: '',
navList: [
{name: "全部活动", id: 3},
{name: "日志未提交", id: 4}
],
total: 0
}
},
computed: {
...mapState(['user'])
},
onLoad(options) {
this.navId = options.id;
this.$dict.load('partyReportActionStatus', 'partyReportSignupStatus').then(() => {
this.$dict.getDict('partyReportActionStatus').map(i => {
this.activeTypeArr.push(i.dictName)
});
this.$dict.getDict('partyReportSignupStatus').map(i => {
this.applyStatusArr.push(i.dictName)
})
});
this.getList();
this.getToatal();
},
filters: {
timeVal(val) {
if (val) {
return val.substring(0, 16)
}
}
},
onShow() {
this.getList();
},
methods: {
getList() {
this.$http.post(`/app/apppartyreport/list-xcx?listType=${this.navId}&partyId=${this.user.id}&partyOrgId=${this.user.partyOrgId}&title=${this.title}&size=${10000}`, null, {}).then(res => {
if (res.code == 0) {
if (res.data.records == null) {
this.list = [];
} else {
this.list = res.data.records;
if (this.navId == 4) {
this.total = res.data.total;
}
}
this.isShow = true;
} else {
}
}).catch(err => {
})
},
getToatal() {
this.$http.post(`/app/apppartyreport/list-xcx?listType=4&partyId=${this.user.id}&partyOrgId=${this.user.partyOrgId}&title=${this.title}&size=${10000}`, null, {}).then(res => {
if (res.code == 0) {
if (res.data.records == null) {
this.total = 0
} else {
this.total = res.data.total;
}
} else {
}
}).catch(err => {
})
},
changeSearchBox() {
this.isShow = false
},
clearInput() {
this.title = ''
},
bindPickerChange(e) {
this.actionStatus = e.detail.value;
this.getList();
},
bindStatusChange(e) {
this.signupStatus = e.detail.value;
this.getList();
},
navClick(id) {
this.navId = id;
this.getList();
},
goToDetail(e) {
uni.navigateTo({
url: `/pages/party/partyReport/partyDetail?id=${e.id}&listType=${this.navId}`
})
},
}
}
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
@import "../../../common/style.scss";
.page {
width: 100%;
height: 100%;
overflow: hidden;
.party_header {
background: #E60012;
.search-box {
width: 100%;
padding: 24px 32px;
box-sizing: border-box;
background: #E60012;
.search-input {
line-height: 64px;
width: 100%;
height: 100%;
border-radius: 32px;
background: #CE0010;
color: #fff;
font-size: 26px;
span {
white-space: nowrap;
overflow: hidden;
color: #fff;
span-overflow: ellipsis;
}
image {
width: 40px;
height: 40px;
margin: 8px 8px 8px 24px;
position: relative;
top: 6px;
}
}
}
}
.nav_bar {
width: 100%;
height: 112px;
background: #E60012;
li {
width: 50%;
float: left;
height: 90px;
line-height: 90px;
text-align: center;
color: #fff;
font-size: 28px;
opacity: 0.8;
position: relative;
&:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: auto;
height: 4px;
width: 40px;
background-color: transparent;
}
}
li.active {
opacity: 1;
&:after {
background-color: #fff;
}
}
}
.search-input {
.input-box {
width: 100%;
height: 112px;
background-color: #fff;
padding: 24px 32px;
box-sizing: border-box;
position: relative;
.sousuo {
position: absolute;
top: 35px;
left: 60px;
width: 40px;
height: 40px;
}
.input {
background-color: #F3F3F3;
width: 598px;
height: 64px;
color: #999999;
font-size: 26px;
margin-left: 8px;
border-radius: 32px;
padding-left: 70px;
padding-right: 60px;
box-sizing: border-box;
}
.clear {
width: 32px;
height: 32px;
position: absolute;
top: 40px;
right: 130px;
z-index: 10;
}
.search-word {
font-size: 28px;
color: #135AB8;
line-height: 60px;
margin-left: 20px;
}
}
}
.list_content {
width: calc(100% - 64rpx);
height: calc(100% - 300rpx);
padding: 32px 32px 0 32px;
overflow: auto;
.list_div {
width: 100%;
height: 100%;
li {
width: 100%;
height: 426px;
background-color: #fff;
border-radius: 4px;
margin-bottom: 32px;
position: relative;
overflow: hidden;
.up {
height: 330px;
width: 100%;
padding: 32px;
box-sizing: border-box;
border-bottom: 2px solid #eeeeee;
h3 {
color: #333333;
font-size: 32px;
font-weight: bold;
word-break: break-all;
width: 90%;
display: -webkit-box;
-webkit-line-clamp: 1;
overflow: hidden;
span-overflow: ellipsis;
-webkit-box-orient: vertical;
}
.info {
width: 100%;
display: flex;
font-size: 30px;
margin-top: 32px;
span {
width: 150px;
color: rgba(153, 153, 153, 1);
}
p {
flex: 1;
color: #343D65;
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
span-overflow: ellipsis;
-webkit-box-orient: vertical;
}
}
}
.btn {
height: 96px;
display: flex;
align-items: center;
justify-content: flex-end;
padding: 0 32px;
box-sizing: border-box;
.button {
width: 152px;
height: 56px;
border-radius: 28px;
color: #1365DD;
text-align: center;
font-size: 28px;
line-height: 56px;
margin-left: 16px;
border: 2px solid rgba(19, 101, 221, 1);
}
.callBtn {
width: 196px !important;
margin-left: 0 !important;
}
.color4 {
color: #1365DD;
border: 2px solid rgba(19, 101, 221, 1);
}
.color5 {
color: #606060;
border: 2px solid #E1E1E1;
}
}
.tip {
position: absolute;
width: 200px;
height: 56px;
text-align: center;
line-height: 56px;
right: -50rpx;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
top: 20px;
&.color1 {
color: #ff8822;
background-color: #FFF3E9;
}
&.color2 {
color: #5A98F2;
background-color: #EEF5FF;
}
&.color3 {
color: #999999;
background-color: #F2F2F2;
}
}
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210rpx);
display: flex;
justify-content: center;
align-items: center;
}
.footer {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
height: 104px;
background: rgba(255, 228, 221, 1);
color: #D73D3D;
display: flex;
justify-content: center;
align-items: center;
font-size: 32px;
p {
width: 50%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
&.active {
background-color: #D73D3D;
color: #ffffff;
}
}
}
}
</style>

View File

@@ -1,165 +0,0 @@
<template>
<div class="page">
<header>
<p class="title">{{ title }}</p>
<div class="time">
<span>提交时间</span>
<span>{{ baseInfo.submitTime }}</span>
</div>
</header>
<div class="mylog_main">
<div class="mylog_main_summary">
<p class="word">活动总结</p>
<p class="value">{{ baseInfo.content }}</p>
</div>
<div class="imageList">
<p class="word">活动照片</p>
<image v-for="(e, index) in baseInfo.files" :key="index" @click="previewImage(baseInfo.files,index)"
mode="aspectFill" :src="e.accessUrl"></image>
</div>
</div>
<div class="editLog" @click="editLog">
<div class="iconfont">&#xe6c2;</div>
</div>
</div>
</template>
<script>
export default {
name: "myLog",
data() {
return {
signupId: '',
baseInfo: {},
title: ''
}
},
onLoad(options) {
this.signupId = options.signupId;
this.title = options.title;
},
methods: {
editLog() {
uni.navigateTo({
url: `/pages/party/partyReport/fillLog?reportId=${this.baseInfo.reportId}&signupId=${this.signupId}&signupContent=${this.baseInfo.signupContent}`
})
},
searchDetail() {
this.$http.post(`/app/apppartyreport/log?id=${this.signupId}`).then(res => {
if (res.code == 0) {
this.baseInfo = {...res.data};
}
})
},
previewImage(arr, index) {
let list = [];
let current = index;
arr.map((e, index) => {
list.push(e.accessUrl)
})
uni.previewImage({
urls: list,
current: current,
longPressActions: {
itemList: ['发送给朋友', '保存图片'],
success: function (data) {
},
fail: function (err) {
}
}
});
},
},
onShow(){
this.searchDetail();
}
}
</script>
<style lang="scss" scoped>
.page{
width: 100%;
height: 100%;
position: relative;
header{
width: 100%;
min-height: 256rpx;
background:rgba(230,0,18,1);
padding: 32rpx;
box-sizing: border-box;
.title{
font-size:40rpx;
color:#fff;
}
.time{
height: 112rpx;
line-height: 112rpx;
font-size:28rpx;
color:#fff;
span:nth-child(2){
opacity: 0.7;
}
}
}
.mylog_main{
width: 100%;
.word{
height: 44rpx;
width: 100%;
border-left: 6rpx solid #E60012;
box-sizing: border-box;
color:#333333;
font-size:38rpx;
line-height: 44rpx;
span-indent: 16rpx;
font-weight: 600;
}
.mylog_main_summary{
width: 100%;
padding: 32rpx;
background-color: #fff;
box-sizing: border-box;
.value{
margin-top: 56rpx;
color:#333333;
font-size:32rpx;
word-break: break-all;
}
}
.imageList{
width: 100%;
background-color: #fff;
padding: 32rpx;
box-sizing: border-box;
margin-top: 16rpx;
image{
width: 100%;
height: 384rpx;
border-radius: 4rpx;
margin-top:32rpx;
}
}
}
.editLog{
width: 96px;
height: 96px;
border-radius: 48px;
background: #FFFFFF;
position: fixed;
right: 0;
top: calc(100% - 400px);
display: flex;
align-items: center;
justify-content: center;
box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);
.iconfont {
font-size: 66px;
color: #F85461;
}
}
}
</style>

View File

@@ -1,331 +0,0 @@
<template>
<div class="page">
<div class="baseInfo">
<div class="content" style="transition:height .5s ease;">
<p class="title">{{ baseInfo.title }}</p>
<ul>
<li>
<span class="label">活动发起方</span>
<div class="value">{{ baseInfo.orgName }}</div>
</li>
<li>
<span class="label">活动时间</span>
<div class="value"> {{ baseInfo.beginTime|timeVal }} {{ baseInfo.endTime|timeVal }}</div>
</li>
<template v-if="stretchWord=='收起'">
<li>
<span class="label">活动地点</span>
<div class="value">{{ baseInfo.address || '-' }}</div>
</li>
<li>
<span class="label">参与名额</span>
<div class="value">{{ baseInfo.total ? baseInfo.total : "不限" }}</div>
</li>
<li>
<span class="label">报名截止时间</span>
<div class="value">
{{ baseInfo.stopSignupTime || '-' }}
<span v-if="baseInfo.signupStatus==0">({{ "剩余" + baseInfo.timeRemaining }})</span>
</div>
<!-- <div class="value" v-else>-</div> -->
</li>
<li>
<span class="label">活动报名人数</span>
<div class="value">{{ baseInfo.signupCount || '-' }}</div>
</li>
<li>
<span class="label">活动状态</span>
<div class="value">{{ $dict.getLabel('partyReportActionStatus', baseInfo.actionStatus) }}</div>
<!-- <div class="value">{{ activeStatus }}</div> -->
</li>
<li>
<span class="label">联系人</span>
<div class="value">{{ baseInfo.contactPerson || '-' }}</div>
</li>
<li>
<span class="label">联系电话</span>
<div class="value">{{ baseInfo.contactPhone || '-' }}</div>
</li>
</template>
</ul>
</div>
<div class="footer" @click="stretch()">
<span>{{ stretchWord }}</span>
<image :src="dowm" v-if="stretchWord=='展开'"></image>
<image :src="up" v-if="stretchWord=='收起'"></image>
</div>
</div>
<div class="html">
<header>活动介绍</header>
<u-parse :html="baseInfo.content" class="content" v-if="baseInfo.content"></u-parse>
<AiTransSpeech v-if="showTrans" :src="baseInfo.speech"/>
</div>
<div class="page_footer">
<p @click="seeSignUpList(baseInfo)">
<image src="https://cdn.cunwuyun.cn/img/party_detail.png"></image>
<span>查看报名情况</span>
</p>
<p v-if="baseInfo.nowUsersignupStatus==null&&baseInfo.actionStatus!=2&&baseInfo.signupStatus==0"
@click="signUp(baseInfo)">
<image src="https://cdn.cunwuyun.cn/img/party_now_reg.png"></image>
<span>立即报名</span>
</p>
<p v-if="baseInfo.nowUsersignupStatus==1&&baseInfo.actionStatus!=2&&baseInfo.signupStatus==0"
@click="open()">
<image src="https://cdn.cunwuyun.cn/img/party_cancel_reg.png"></image>
<span>取消报名</span>
</p>
<p v-if="baseInfo.nowUsersignupStatus==1&&baseInfo.signupContent==null&&['1','2'].includes(baseInfo.actionStatus)&&baseInfo.signupStatus==1"
@click="goLog(baseInfo)">
<image src="https://cdn.cunwuyun.cn/img/party_add_log.png"></image>
<span>填写活动日志</span>
</p>
<p v-if="baseInfo.nowUsersignupStatus==1&&baseInfo.signupContent!=null&&['1','2'].includes(baseInfo.actionStatus)&&baseInfo.signupStatus==1"
@click="goMyLog(baseInfo)">
<image src="https://cdn.cunwuyun.cn/img/party_log.png"></image>
<span>我的活动日志</span>
</p>
</div>
</div>
</template>
<script>
export default {
name: 'partyDetail',
computed: {
user() {
return uni.getStorageSync("userInfo")
}
},
data() {
return {
baseInfo: {},
height: 210,
stretchWord: "展开",
listType: '',
footerList: [
{name: "查看报名情况", id: 0},
{name: "立即报名", id: 1}
],
id: '',
dowm: 'https://cdn.cunwuyun.cn/img/party_down.png',
up: 'https://cdn.cunwuyun.cn/img/party_up.png',
showTrans: false,
activeStatus:""
}
},
onLoad(options) {
this.id = options.id;
this.searchDetail(options.id);
this.listType = options.listType;
this.$dict.load('partyReportActionStatus');
},
onShow() {
this.showTrans = true;
this.searchDetail(this.id);
},
onHide() {
this.showTrans = false
},
filters: {
timeVal(val) {
if (val) {
return val.substring(0, 16)
}
}
},
methods: {
searchDetail(id) {
this.$http.post(`/app/apppartyreport/queryDetailById?id=${id}&partyId=${this.user.id}`).then(res => {
if (res && res.data) {
this.baseInfo = {...res.data};
this.baseInfo.stopSignupTime = this.baseInfo.stopSignupTime && this.baseInfo.stopSignupTime.substring(0, 16);
}
})
},
stretch() {
this.stretchWord == '展开' ? this.stretchWord = '收起' : this.stretchWord = '展开';
this.height == 210 ? this.height = 506 : this.height = 210;
},
signUp(e) {
uni.navigateTo({
url: `/pages/party/partyReport/signUp?reportId=${e.id}`
})
},
seeSignUpList(e) {
uni.navigateTo({
url: `/pages/party/partyReport/signUpList?reportId=${e.id}`
})
},
goLog(e) {
uni.navigateTo({
url: `/pages/party/partyReport/fillLog?reportId=${e.id}&signupId=${e.signupId}`
})
},
goMyLog(e) {
uni.navigateTo({
url: `/pages/party/partyReport/myLog?signupId=${e.signupId}&title=${e.title}`
})
},
open() {
uni.showModal({
title: '提示',
content: '取消报名后,本次活动不允许再次报名,是否确定取消?',
success: (res) => {
if (res.confirm) {
this.cale();
} else if (res.cancel) {
}
}
});
},
cale() {
this.$http.post(`/app/apppartyreport/signup-cancel?id=${this.baseInfo.signupId}`,).then(res => {
if (res.code == 0) {
uni.navigateBack({
delta: 1
});
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000
})
})
}
},
}
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
width: 100%;
height: 100%;
background-color: #fff;
.baseInfo {
width: 100%;
background: rgba(230, 0, 18, 1);
overflow: hidden;
.content {
width: 100%;
background: rgba(230, 0, 18, 1);
overflow: hidden;
padding: 0 32px;
box-sizing: border-box;
.title {
font-size: 40px;
color: #fff;
word-break: break-all;
}
ul {
width: 100%;
li {
width: 100%;
display: flex;
font-size: 30px;
margin-bottom: 16px;
.label {
font-size: 28px;
color: #fff;
}
.value {
flex: 1;
font-size: 28px;
color: rgba(255, 232, 232, 1);
opacity: 0.8;
}
}
}
}
.footer {
width: 100%;
height: 80px;
color: #fff;
font-size: 28px;
display: flex;
align-items: center;
justify-content: center;
image {
width: 28px;
height: 28px;
}
}
}
.html {
width: 100%;
padding: 0 32px 180px 32px;
box-sizing: border-box;
background-color: #fff;
header {
height: 96px;
line-height: 96px;
}
}
.page_footer {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
height: 104px;
background: rgba(255, 228, 221, 1);
color: #D73D3D;
display: flex;
justify-content: center;
align-items: center;
font-size: 32px;
image {
width: 32px;
height: 32px;
}
p {
width: 50%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
&.active {
background-color: #D73D3D;
color: #ffffff;
}
}
p:nth-child(1) {
border-right: 2px solid rgb(241, 178, 178);
box-sizing: border-box;
}
p:nth-child(2) {
background-color: #FE5A49;
box-sizing: border-box;
color: #fff;
}
p:only-child {
width: 100%;
border-right: none;
}
}
}
</style>

View File

@@ -1,336 +0,0 @@
<template>
<div class="page">
<div class="form">
<div class=" basic-item flex-row">
<div class="color-333"><span class="color-red">*</span>活动报名类型</div>
<div class="select" @click="open()">
<span class="content-span" :class="reportName == '请选择' ? 'colo-999' : 'color-333'">{{ reportName }}</span>
<image src="https://cdn.cunwuyun.cn/img/jiantou.png" class="image"></image>
</div>
</div>
<div class=" basic-item flex-row">
<div class="color-333"><span class="color-red">*</span>联系手机</div>
<input type="span" placeholder="请输入手机号码" maxlength="11" v-model="baseInfo.phone" adjust-position="false">
</div>
<div class="textarea">
<div class="color-333">报名备注</div>
<textarea type="textarea" v-if="showtextarea" placeholder="填写报名备注100字以内" v-model="baseInfo.remark"
adjust-position="false" maxlength="100"></textarea>
<p v-else style="color:#999;font-size:34rpx;width:100%;height:302rpx;">填写报名备注100字以内</p>
</div>
</div>
<div class="notice">
<p>报到类型说明</p>
<p>1单位联系社区报到服务党员所属单位联系的社区参与活动到社区服务</p>
<p>2居住地社区报到服务党员所在本人居住的社区参与活动到社区服务</p>
<p>3其他村(社区)报到服务党员所在除单位联系社区与居住社区以外的其他社区参与活动到社区服务</p>
</div>
<div class="report" @click="report()">提交</div>
<AiDrawer mode="right" ref="drawer" @status="drawerStatus">
<div class="drawer_main">
<header>
<p>活动报到类型</p>
<span>单选</span>
</header>
<ul>
<li v-for="(e,index) in list" :key="index" @click="selectType(e)" :class="{active:activeId==e.dictValue}">
{{ e.dictName }}
</li>
</ul>
<div class="footer" @click="saveType()">
保存
</div>
</div>
</AiDrawer>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: "signUp",
computed: {
...mapState(['user'])
},
data() {
return {
baseInfo: {
reportId: '',
remark: '',
phone: '',
reportType: '',
partyId: ''
},
reportName: '请选择',
show: false,
list: [],
activeId: '',
activeObj: {},
showtextarea: true
}
},
onLoad(options) {
this.$dict.load('partyReportSignupReportType');
this.baseInfo.reportId = options.reportId;
this.baseInfo.partyId = this.user.id;
this.baseInfo.phone = this.user.phone;
},
methods: {
showModel(title) {
uni.showModal({
title: '温馨提示',
content: title,
showCancel: false,
confirmColor: "#135AB8",
success(res) {
if (res.confirm) {
}
}
})
},
open() {
this.list = this.$dict.getDict('partyReportSignupReportType');
this.$refs.drawer.open();
},
selectType(e) {
this.activeId = e.dictValue;
this.activeObj = e;
},
drawerStatus(val) {
this.showtextarea = !val;
},
saveType() {
this.reportName = this.activeObj.dictName;
this.$refs.drawer.close();
},
report() {
if (this.reportName == null || this.reportName == '' || this.reportName == '请选择') {
this.showModel('请选择活动报名类型')
return false
}
if (!this.baseInfo.phone) {
this.showModel('请填写手机号码')
return false
}
this.baseInfo.reportType = this.$dict.getValue('partyReportSignupReportType', this.reportName);
this.$http.post(`/app/apppartyreport/signup`, this.baseInfo, null).then(res => {
if (res.code == 0) {
uni.showToast({
title: '提交成功',
icon: 'success',
duration: 2000
})
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 2000)
}
}).catch(err => {
uni.showToast({
title: err,
icon: "none",
duration: 1000
})
})
}
}
}
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
width: 100%;
height: 100%;
.form {
width: 100%;
background-color: #fff;
.basic-item {
font-size: 32px;
justify-content: space-between;
width: 100%;
height: 112px;
padding: 32px 32px 32px 12px;
box-sizing: border-box;
background-color: #fff;
border-bottom: 1px solid #eee;
input {
text-align: right;
}
.wid-110 {
width: 214px;
}
.skill-span {
max-width: 432px;
text-align: right;
display: inline-block;
overflow: hidden;
span-overflow: ellipsis;
white-space: nowrap;
font-size: 30px;
}
.picker {
justify-content: flex-end;
align-items: center;
color: #999999;
font-size: 32px;
background-color: #FFFFFF;
}
.picker > .AiArea {
background-color: #fff !important;
}
.image {
width: 32px;
height: 32px;
vertical-align: middle;
}
.wei-span {
width: 40%;
}
.msg-value {
width: 60%;
}
.msg-btn {
width: 160px;
text-align: right;
background-color: #fff !important;
}
button {
font-size: 28px;
background-color: #fff;
line-height: 48px;
padding: 0;
}
button::after {
border: 0;
}
.button-hover {
background-color: #fff;
}
button[disabled] {
background-color: #fff !important;
font-size: 28px;
border-radius: 0;
}
}
.textarea {
padding: 32px;
}
}
/deep/ .uni-drawer {
z-index: 20000 !important;
}
.drawer_main {
width: 100%;
height: 100%;
padding: 64px 32px 0 32px;
box-sizing: border-box;
position: relative;
header {
width: 100%;
height: 96px;
display: flex;
align-items: center;
p {
color: #333333;
font-size: 32px;
width: 192px;
font-weight: 600;
}
span {
font-size: 24px;
color: #666;
}
}
ul {
width: 100%;
overflow: hidden;
height: 500px;
li {
width: 344px;
height: 96px;
background: rgba(249, 249, 249, 1);
margin-bottom: 40px;
font-size: 28px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 2px;
}
li.active {
background: rgba(255, 228, 221, 1);
color: #D73D3D;
}
}
.footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
color: #ffffff;
font-size: 36px;
background: rgba(230, 0, 18, 1);
}
}
.notice {
width: 100%;
font-weight: 400;
box-sizing: border-box;
padding: 64px 32px 0 32px;
color: rgba(153, 153, 153, 1);
font-size: 24px;
}
.report {
position: fixed;
left: 0;
bottom: 0;
height: 112px;
line-height: 112px;
font-size: 32px;
text-align: center;
background: rgba(230, 0, 18, 1);
color: #fff;
}
}
</style>

View File

@@ -1,103 +0,0 @@
<template>
<div class="page">
<header>
报名记录已有 <span class="num">{{list.length}}</span>人报名
</header>
<ul>
<li v-for="(e,index) in list" :key="index">
<p>
<image :src="e.partyAvatar" v-if="e.partyAvatar"></image>
<image src="https://cdn.cunwuyun.cn/img/no-content.png" v-else></image>
<span>{{e.partyName.replace(/^./g,'*')}}</span>
</p>
<p>{{e.signupTime.substring(0,16)}}</p>
</li>
</ul>
</div>
</template>
<script>
export default {
name:"signUpList",
data(){
return{
reportId:'',
list:[]
}
},
onLoad(options){
this.reportId= options.reportId;
this.getList();
},
methods:{
getList(){
this.$http.post(`/app/apppartyreport/signup-info?id=${this.reportId}`,null,{}).then( res => {
if(res.code == 0){
this.list = res.data;
}else{
}
}).catch( err => {
})
},
}
}
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page{
width: 100%;
height: 100%;
background-color: #fff;
header{
width: 100%;
height: 112rpx;
padding: 0 32rpx;
font-size:32rpx;
line-height: 112rpx;
color:#333333;
border-bottom: 1px solid #eee;
box-sizing: border-box;
.num{
color:#D73D3D;
}
}
ul{
width: 100%;
height: calc(100% - 112rpx) ;
overflow: auto;
li{
width: 100%;
height: 148rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #eee;
padding: 0 32rpx;
box-sizing: border-box;
p:nth-child(2){
color:#999999;
font-size:30rpx;
}
p:nth-child(1){
display: flex;
align-items: center;
image{
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
span{
font-size:30rpx;
color:#2D2D2E;
margin-left: 8rpx;
}
}
}
}
}
</style>