小程序产品库完成

This commit is contained in:
aixianling
2022-02-14 17:25:54 +08:00
parent cb5f434edb
commit 8d2905428e
145 changed files with 22037 additions and 0 deletions

View File

@@ -0,0 +1,466 @@
<template>
<section class="AppOnlineAnswer">
<div class="page" v-if="list.length">
<img src="./static/img/answer-bg.png" alt="" class="bg-img">
<div class="subject-content" v-if="!showAnwser">
<div class="btn" v-if="showTopBtn" @click="confirm()">{{ topBtnText }}</div>
<div class="bg-fff pad-b48">
<div class="title">
<div class="left">
<span class="tips"></span>{{ list[index].type == 1 ? '单选' : '多选' }}
</div>
<div class="right">
<span class="big-num">{{ index + 1 }}</span>/{{ list.length }}
</div>
</div>
<div class="text">{{ list[index].title }}</div>
<!-- 单选 -->
<div v-if="list[index].type == 1">
<div class="item" v-for="(item, i) in list[index].items" :key="i" @click="itemClick(i)"
:class="{ 'item-click': clickIndex === i, 'item-success': showAnalysis && item.checked == 1, 'item-error': showAnalysis && clickIndex == i && item.checked == 0}">
<img src="./static/img/success-icon.png" alt="" v-if="showAnalysis && item.checked == 1">
<img src="./static/img/error-icon.png" alt=""
v-if="showAnalysis && clickIndex == i && item.checked == 0">
{{ item.sort }} &nbsp;{{ item.content }}
</div>
</div>
<!-- 多选 -->
<div v-if="list[index].type == 2">
<div class="item" v-for="(item, i) in list[index].items" :key="i" @click="itemClick(i)"
:class="{ 'item-click': item.isCheked, 'item-success': showAnalysis && item.checked == 1, 'item-error': showAnalysis && item.isCheked && item.checked == 0}">
<img src="./static/img/success-icon.png" alt="" v-if="showAnalysis && item.checked == 1">
<img src="./static/img/error-icon.png" alt=""
v-if="showAnalysis && clickIndex == i && item.checked == 0">
{{ item.sort }} &nbsp;{{ item.content }}
</div>
</div>
<!-- <div class="item item-click">A. 吴起镇</div>
<div class="item item-success"> <img src="./static/img/success-icon.png" alt="">吴起镇</div>
<div class="item item-error"> <img src="./static/img/error-icon.png" alt="">吴起镇</div>
<div class="item">A. 吴起镇</div> -->
</div>
<div class="bg-fff mar-t32" v-if="showAnalysis">
<div class="title">
<div class="left">
<span class="tips"></span>答案解析
</div>
</div>
<div class="success-title">正确答案{{ list[index].answer }}</div>
<div class="success-text">
<u-parse :html="list[index].analysis"></u-parse>
</div>
</div>
</div>
<div class="subject-content" v-else>
<div class="bg-fff pad-b48">
<img src="./static/img/answer-head.png" alt="" class="head-img">
<div class="head-content">
<p>本次答对题目数</p>
<div>{{ resultInfo.right }}</div>
</div>
<div class="info-content">
<span class="info-item">正确率: {{ resultInfo.rate }}</span>
<span class="info-item">用时: {{ useTime }}</span>
<span class="info-item mar-b132">错题数: {{ resultInfo.wrong }}</span>
</div>
<span class="big-btn mar-r22" @click="back">返回</span>
<span class="big-btn bg-red" @click="again">再来一组</span>
</div>
</div>
</div>
<AiEmpty v-if="list.length == 0"/>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "AppOnlineAnswer",
appName: "在线答题",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
showAnwser: false,
index: 0,
clickIndex: '',
list: [],
showTopBtn: false,
topBtnText: '',
showAnalysis: false,
createdTime: '',
endTime: '',
useTime: '',
resultInfo: {}
};
},
onLoad() {
this.createdTime = Date.parse(new Date())
this.getList()
},
methods: {
itemClick(i) {
if (this.showAnalysis) return
if (this.list[this.index].type == 1) { //单选
this.clickIndex = i
this.showTopBtn = true
}
if (this.list[this.index].type == 2) { //多选
this.showTopBtn = false
this.list[this.index].items[i].isCheked = !this.list[this.index].items[i].isCheked
this.list[this.index].items.map((item) => {
if (item.isCheked) {
this.showTopBtn = true
}
})
}
this.topBtnText = '确定'
},
confirm() {
if (this.list[this.index].type == 1) { //单选
this.list[this.index].result = this.list[this.index].items[this.clickIndex].sort
}
if (this.list[this.index].type == 2) { //多选
var resultList = []
this.list[this.index].items.map((item) => {
if (item.isCheked) {
resultList.push(item.sort)
}
})
this.list[this.index].result = resultList.join(',')
}
console.log(this.list)
if (this.topBtnText == '下一题') { //next
if (this.index < this.list.length - 1) {
this.index++
this.init()
} else { //答完了
this.showTopBtn = false
this.endTime = Date.parse(new Date());
this.useTime = this.intervalTime(this.endTime - this.createdTime)
this.getResult()
}
}
if (this.topBtnText == '确定') { //确定选项
this.showAnalysis = true
this.topBtnText = '下一题'
}
},
getResult() {
this.$instance.post(`/app/apppartyquestion/checkAnswer`, this.list).then((res) => {
if (res.code == 0) {
this.resultInfo = res.data
this.showAnwser = true
}
});
},
getList() {
this.$instance.post(`/app/apppartyquestion/getQuestions`).then((res) => {
if (res.code == 0) {
res.data.map((item) => {
item.answerList = []
item.items.map((i) => {
if (i.checked == 1) {
item.answerList.push(i.sort)
}
})
item.answer = item.answerList.join(',')
if (item.type == 2) { //多选
item.isCheck = false
}
})
this.list = res.data
}
});
},
intervalTime(time) {
var leave1 = time % (24 * 3600 * 1000); //计算天数后剩余的毫秒数
var hours = Math.floor(leave1 / (3600 * 1000));
hours = hours < 10 ? '0' + hours : hours
var leave2 = leave1 % (3600 * 1000); //计算小时数后剩余的毫秒数
var minutes = Math.floor(leave2 / (60 * 1000));
minutes = minutes < 10 ? '0' + minutes : minutes
var leave3 = leave2 % (60 * 1000); //计算分钟数后剩余的毫秒数
var seconds = Math.round(leave3 / 1000);
seconds = seconds < 10 ? '0' + seconds : seconds
return hours + ":" + minutes + ":" + seconds
},
back() {
uni.navigateBack({delta: 1})
},
again() {
this.init()
this.index = 0
this.list = []
this.getList()
this.createdTime = Date.parse(new Date())
},
init() {
this.showAnwser = false
this.clickIndex = ''
this.showTopBtn = false
this.topBtnText = ''
this.showAnalysis = false
}
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.AppOnlineAnswer {
width: 100%;
height: 100%;
}
.page {
width: 100%;
height: 100%;
background-color: #F6F6F6;
.bg-img {
width: 100%;
height: 800px;
}
.subject-content {
width: 100%;
border-radius: 4px;
padding: 24px 36px 48px 36px;
box-sizing: border-box;
position: absolute;
top: 124px;
z-index: 9;
.btn {
padding: 0 30px;
height: 64px;
line-height: 64px;
text-align: center;
background: #D03A28;
border-radius: 4px;
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
position: absolute;
top: -100px;
right: 36px;
z-index: 99;
}
.pad-top {
padding-top: 100px;
}
.pad-b48 {
padding-bottom: 48px;
}
.mar-t32 {
margin-top: 32px;
}
.bg-fff {
width: 100%;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 6px 8px 4px rgba(218, 227, 234, 0.42);
position: relative;
.title {
width: 100%;
height: 100px;
border-bottom: 1px solid #F2F3F5;
padding: 24px 30px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.left {
font-size: 36px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 50px;
.tips {
display: inline-block;
width: 8px;
height: 36px;
background: #E02617;
margin-right: 16px;
}
}
.right {
font-size: 34px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #999;
line-height: 48px;
.big-num {
font-size: 72px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
}
}
}
.text {
padding: 48px 40px;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 48px;
word-break: break-all;
}
.item {
width: 612px;
background: #FAFBFC;
border-radius: 12px;
border: 1px solid #F2F3F5;
margin-bottom: 28px;
margin-left: 32px;
padding: 26px 48px;
box-sizing: border-box;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #687178;
line-height: 44px;
img {
width: 36px;
height: 36px;
vertical-align: middle;
margin-right: 14px;
}
}
.item-click {
background: #F5F5F2;
border: 1px solid #AD9B8D;
color: #B7A38E;
}
.item-success {
background: #E9FAF0;
border: 1px solid #E9FAF0;
color: #40BF6F;
}
.item-error {
background: #FDEBEB;
border: 1px solid #FDEBEB;
color: #D03A28;
}
.success-title {
padding: 32px 0 0 40px;
font-size: 32px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 44px;
}
.success-text {
padding: 32px 40px 56px;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 48px;
word-break: break-all;
}
.head-img {
width: 100%;
height: 260px;
}
.head-content {
position: absolute;
width: 100%;
height: 260px;
top: 0;
left: 0;
padding: 56px 0 0 72px;
box-sizing: border-box;
p {
font-size: 38px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FBE5E6;
line-height: 52px;
}
div {
font-size: 100px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FBE5E6;
line-height: 140px;
}
}
.info-content {
padding: 88px 32px 40px;
.info-item {
display: inline-block;
width: 300px;
font-size: 34px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666;
line-height: 48px;
margin-bottom: 42px;
}
.mar-b132 {
margin-bottom: 132px;
}
}
.big-btn {
display: inline-block;
width: 296px;
height: 88px;
line-height: 88px;
text-align: center;
border-radius: 4px;
border: 1px solid #E4E5E7;
font-size: 34px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666;
}
.bg-red {
border: 0;
background: #D03A28;
color: #fff;
}
.mar-r22 {
margin: 0 22px 0 32px;
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,389 @@
<template>
<section class="AppPartyHistory">
<div v-if="isShow" style="height: 100%">
<!-- 头部搜索样式 -->
<div class="fixed-top" style="width:100%;">
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<img src="https://cdn.cunwuyun.cn/img/search-red.svg"/>
<span class="color-fff">请输入文章标题</span>
</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" :value="index" :range="array" range-key="dictName">
<div class="uni-input">{{ partyType }}</div>
<img src="https://cdn.cunwuyun.cn/img/down.svg"/>
</picker>
</div>
</div>
</div>
<!-- 时间选择 -->
<div class="uni-list type-slect">
<div class="uni-list-cell">
<div class="uni-list-cell-db">
<picker
mode="date"
:value="date"
:start="startDate"
:end="endDate"
@change="bindDateChange"
fields="month"
>
<div class="uni-input">{{ day }}</div>
<img src="https://cdn.cunwuyun.cn/img/down.svg"/>
</picker>
</div>
</div>
</div>
</div>
</div>
<!-- 党务公开列表 -->
<div class="affairs-list">
<div class="affairs" v-if="affairsList.length > 0">
<!-- 循环 v-for -->
<div v-for="(item, index) in affairsList" :key="index">
<div class="affairs-item" @click="getDetail(item.id)">
<div class="break-word">
<span class="type">{{ $dict.getLabel(`partyHistoryType${style}`, item.type) }}</span>
<span class="affirs-title">{{ item.title }}</span>
</div>
<div class="created-unit flex-row">
<span>{{ item.organizationName || "" }}</span>
<span>{{ item.createDate }}</span>
</div>
</div>
</div>
</div>
</div>
<AiEmpty v-if="affairsList.length == 0"/>
</div>
<div v-if="!isShow" class="search-input">
<div class="input-box flex-row">
<input
type="text"
class="input"
placeholder="请输入文章标题"
focus="false"
v-model="searchValue"
@blur="onBlur"
/>
<img
class="sousuo"
src="https://cdn.cunwuyun.cn/img/search-active.svg"
/>
<img
v-if="searchValue"
@tap="clearInput"
class="clear"
src="https://cdn.cunwuyun.cn/img/empty-Input.svg"
/>
<div class="search-word" @click="search">搜索</div>
</div>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "AppPartyHistory",
appName: "党史文章",
data() {
const currentDate = this.getDate({
format: true,
});
return {
inputValue: "请输入文章标题",
isShow: true,
array: [],
index: 0,
partyType: "类型",
partyTypeIndex: "", //类型index 0:党务公开,1:三会一课
date: currentDate,
day: "时间",
createData: "", //创建时间
affairsList: [],
searchValue: "", //搜索框输入值
pageNum: 1,
pageSize: 10,
pages: 2,
style: '',
};
},
computed: {
startDate() {
return this.getDate("start");
},
endDate() {
return this.getDate("end");
},
...mapState(["user"]),
},
onLoad(option) {
this.style = option.style
this.$dict.load("partyHistoryType0", "partyHistoryType1", "partyHistoryType2").then(() => {
this.array = this.$dict.getDict(`partyHistoryType${this.style}`)
this.array.unshift({dictName: "全部类型", dictValue: ""})
this.getPartyList()
})
},
methods: {
bindPickerChange(e) {
this.partyType = this.array[e.detail.value].dictName;
this.partyTypeIndex = this.array[e.detail.value].dictValue;
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getPartyList();
},
bindDateChange: function (e) {
this.day = e.target.value;
this.createData =
e.target.value + "-" + "08" + " " + "00" + ":" + "00" + ":" + "00";
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getPartyList();
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === "start") {
year = year - 60;
} else if (type === "end") {
year = year + 2;
}
month = month > 9 ? month : "0" + month;
day = day > 9 ? day : "0" + day;
return `${year}-${month}-08 00:00:00 `;
},
changeSearchBox() {
this.isShow = false;
},
onBlur(e) {
this.searchValue = e.target.value;
if (this.searchValue) {
this.inputValue = this.searchValue;
} else {
this.inputValue = "请输入文章标题";
}
},
search() {
this.isShow = true;
this.pageNum = 1;
this.pageSize = 10;
this.pages = 2;
this.getPartyList();
},
clearInput() {
this.searchValue = "";
this.inputValue = "请输入文章标题";
},
getDetail(id) {
uni.navigateTo({
url: `./detail?id=${id}`,
});
},
getPartyList() {
if (this.pageNum > this.pages) return;
this.$instance.post(`/app/apppartyhistory/listWechat`, {
condition: this.searchValue,
style: this.style,
type: this.partyTypeIndex,
createDate: this.createData,
current: this.pageNum,
size: this.pageSize,
// organizationId: this.user.partyOrgId
}).then((res) => {
if (res.code == 0) {
const affairsList = this.pageNum > 1 ? [...this.affairsList, ...res.data.records] : res.data.records;
this.pages = Math.ceil(res.data.total / 10);
this.affairsList = affairsList;
}
});
},
},
onReachBottom() {
this.pageNum = this.pageNum + 1;
this.getPartyList();
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.AppPartyHistory {
.search-box {
width: 100%;
height: 112px;
background-color: #D7261E;
padding: 24px 32px;
box-sizing: border-box;
.search-input {
line-height: 64px;
width: 100%;
height: 100%;
background: #ce0010;
// background:rgba(0,0,0,1);
border-radius: 32px;
// opacity: 0.1;
color: #f0cbcd;
font-size: 26px;
img {
width: 40px;
height: 40px;
margin: 8px 8px 8px 24px;
position: relative;
top: 6px;
}
.color-fff {
color: #fff;
}
}
}
.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;
}
img {
width: 32px;
height: 32px;
display: inline-block;
position: relative;
top: 6px;
margin-left: 8px;
}
}
.type-slect:nth-child(2) {
border: none;
}
}
.affairs-list {
width: 100%;
// height:calc(100% - 210px);
// overflow-y: auto;
padding-top: 200px;
.affairs {
background-color: #fff;
margin: 32px;
.affairs-item {
padding: 32px;
box-sizing: border-box;
.type {
padding: 8px;
box-sizing: border-box;
background-color: #e6edf7;
color: #135ab8;
font-size: 26px;
margin-right: 16px;
border-radius: 8px;
}
.affirs-title {
color: #333333;
font-size: 32px;
}
.created-unit {
font-size: 28px;
color: #999;
justify-content: space-between;
margin-top: 16px;
}
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;
}
.search-input {
// width:100%;
// height:112px;
.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;
}
}
}
}
</style>

View File

@@ -0,0 +1,147 @@
<template>
<div>
<scroll-view
scroll-y
class="commentList"
@scrolltolower="page.current++, getComments()"
>
<div class="comments-list" v-if="commentList.length">
<div
class="comments-item flex-row"
v-for="(item, i) in commentList"
:key="i"
>
<div class="user-avatar">
<image v-if="item.avatar" :src="item.avatar"></image>
<image v-else src="https://cdn.cunwuyun.cn/img/personal.png"></image>
</div>
<div class="content flex-column">
<div class="flex-row" style="justify-content: space-between">
<text>{{ item.createUser }}</text>
<text class="commentTime">{{ item.commentTime }}</text>
</div>
<div>{{ item.content }}</div>
</div>
</div>
</div>
<AiEmpty v-else/>
<view class="tips" v-if="commentList.length"> 已加载全部评论</view>
</scroll-view>
</div>
</template>
<script>
export default {
name: "commentList",
props: {
detail: Object,
},
data() {
return {
commentList: [],
page: {
current: 1,
size: 10000,
},
};
},
methods: {
getComments() {
this.$instance.post(`/app/apppartyhistorycomment/list?partyHistoryId=${this.detail.id}&size=10000`).then((res) => {
if (res && res.data) {
this.commentList = res.data.records;
this.$emit("comments", res.data.total);
}
});
},
},
mounted() {
this.$nextTick(() => this.getComments());
},
};
</script>
<style lang="scss" scoped>
.commentList {
width: 100%;
margin-bottom: 135px;
overflow-y: auto;
.comments-list {
width: 100%;
overflow-y: auto;
box-sizing: border-box;
.user-avatar {
display: inline-block;
width: 80px;
margin: 46px 20px 0 0;
image {
width: 80px;
height: 80px;
border-radius: 50%;
}
.user-bg {
display: inline-block;
width: 80px;
height: 80px;
border-radius: 50%;
line-height: 80px;
text-align: center;
background-color: #26f;
color: #fff;
font-size: 28px;
}
}
.comments-item {
border-bottom: 1px solid #f7f7f7;
padding: 0 32px;
color: #333;
font-size: 28px;
background-color: #fff;
& + .comments-item {
border-top: 4px solid #eee;
}
.content {
display: inline-block;
width: calc(100% - 120px);
background-color: #fff;
padding: 46px 0 32px 0;
box-sizing: border-box;
.name {
margin-bottom: 10px;
}
}
.commentTime {
color: #999;
font-size: 24px;
}
}
}
.tips {
line-height: 90px;
width: 100%;
color: #999;
font-size: 24px;
text-align: center;
background-color: #f3f6f9;
}
.no-comment-list {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
}
}
</style>

View File

@@ -0,0 +1,280 @@
<template>
<div class="page">
<div>
<div v-if="!showCommentList" class="detail">
<!-- 文章标题 -->
<div class="created-unit">
<div class="artical-title break-word">{{ affairs.title }}</div>
<div class="artical-unit">
<span> 发布党组织 {{ affairs.organizationName || "-" }}</span>
</div>
<div class="artical-unit">
<text>发布时间{{ affairs.createDate }}</text>
<text/>
</div>
</div>
<!-- 文章内容 -->
<div class="artical-content break-word">
<u-parse :html="affairs.content" class="content" v-if="affairs.content"></u-parse>
</div>
<!-- 语音播报-->
<AiTransSpeech :src="affairs.speech" v-if="affairs.speech"/>
</div>
<commentList v-else :detail="affairs"></commentList>
<AiComment
:comment-count="commentCount"
@submitComment="submitComment"
@showCommentList="showCommentList = true"
/>
</div>
</div>
</template>
<script>
import {mapState} from "vuex";
import commentList from './commentList'
export default {
name: "policyDetail",
components: {commentList},
computed: {
...mapState(["user"]),
},
data() {
return {
affairs: {},
showCommentList: false,
commentCount: 0,
};
},
onLoad(options) {
this.$dict.load("policyPromotionType");
this.id = options.id;
this.getPartyAffairsDetail(this.id);
this.getCount();
},
methods: {
getCount() {
this.$instance.post(`/app/apppartyhistorycomment/list?partyHistoryId=${this.id}`).then((res) => {
if (res && res.data) {
this.commentCount = res.data.total;
}
});
},
getPartyAffairsDetail(id) {
this.$instance.post(`/app/apppartyhistory/queryDetailByIdWeChat?id=${id}`).then((res) => {
if (res && res.data) {
res.data.createDate = res.data.createDate.substring(0, 10);
const regex = new RegExp("<img", "gi");
res.data.content = res.data.content
.replace(
regex,
`<img style="max-width:100%!important;" calss="img"`
)
.replace(/<p([\s\w"=\/\.:;]+)((?:(class="[^"]+")))/gi, "<p")
.replace(/<p>/gi, '<p class="p_class">')
.replace(/style=""/g, 'style="max-width:100%!important;"');
res.data.content = res.data.content.replace(
/<img[^>]*>/gi,
function (match) {
return match.replace(
/style\s*?=\s*?(["])[\s\S]*?\1/gi,
'style="max-width:100%;"'
); // 替换style
}
);
if (res.data.files && res.data.files.length) {
res.data.files.map(item => {
var size = item.size / 1024;
item.fileSize = size.toFixed(0);
return item
})
}
this.affairs = {...res.data};
}
});
},
back() {
if (getCurrentPages().length === 1) {
uni.switchTab({
url: "/pages/home/home",
});
return false;
}
this.showCommentList
? (this.showCommentList = false)
: uni.navigateBack();
},
submitComment(content) {
this.$instance
.post("/app/apppartyhistorycomment/addOrUpdate", {
partyHistoryId: this.affairs.id,
content: content,
name: this.user.nickName,
avatar: this.user.avatarUrl,
organizationId: this.affairs.organizationId
})
.then((res) => {
if (res && res.code == 0) {
uni.showToast({icon: "success", title: "评论成功"});
this.showCommentList = true
this.getCount()
} else {
uni.showToast({icon: "none", title: res.msg});
}
})
.catch((err) => {
uni.showToast({icon: "none", title: err});
});
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
.navHeadBar {
display: flex;
justify-content: space-between;
align-items: center;
background: #135ab8;
color: #fff;
font-size: 13px;
height: 40px;
}
.detail {
width: 100%;
overflow-y: auto;
.created-unit {
width: 100%;
padding: 32px;
box-sizing: border-box;
background-color: #D40A05;
color: #fff;
.artical-title {
font-size: 40px;
}
.artical-unit {
font-size: 28px;
margin-top: 16px;
opacity: 0.8;
}
}
.artical-content {
color: #666666;
font-size: 32px;
padding: 32px 32px 128px 32px;
box-sizing: border-box;
background-color: #fff;
.p_class {
margin-top: 40px;
font-size: 32px;
color: #333;
text-indent: 0;
width: 100%;
}
.img {
width: 100% !important;
}
}
.attachment {
width: 100%;
padding: 32px 32px 96px 32px;
box-sizing: border-box;
background-color: #ffffff;
margin-top: 16px;
.attachment-title {
font-size: 32px;
color: #333333;
font-weight: 500;
image {
width: 48px;
height: 48px;
vertical-align: middle;
}
}
}
}
}
.p_class {
margin-top: 40px;
font-size: 32px;
color: #333;
text-indent: 0;
width: 100%;
}
.img {
max-width: 100% !important;
}
.attachment {
width: 100%;
padding: 32px;
box-sizing: border-box;
background-color: #FFFFFF;
margin-top: 16px;
.attachment-title {
font-size: 32px;
color: #333333;
font-weight: 500;
image {
width: 48px;
height: 48px;
vertical-align: middle;
}
}
.attachment-item {
border: 1px solid rgba(204, 204, 204, 1);
padding: 16px;
box-sizing: border-box;
margin-top: 34px;
display: flex;
flex-direction: row;
justify-content: space-between;
border-radius: 8px;
.file-name {
justify-content: flex-start;
align-items: center;
image {
width: 96px;
height: 96px;
vertical-align: middle;
}
.title {
color: #333333;
font-size: 32px;
word-break: break-all;
flex: 1;
}
}
.size {
color: #999;
font-size: 28px;
display: flex;
justify-content: cemter;
align-items: center;
}
}
}
</style>

View File

@@ -0,0 +1,335 @@
<template>
<section class="AppPartyHistoryEducation">
<div class="page">
<div class="title">
<div class="left">
<span class="tips"></span>党史上的今天
</div>
<div class="right" @click="handleGoto('./todayList')">
查看全部
<img src="https://cdn.cunwuyun.cn/img/down.svg" class="right-icon">
</div>
</div>
<div class="header" v-for="(item, index) in todayList" :key="index"
@click="handleGoto(`./todayDetail?id=${item.id}`)">
<img :src="item.thumbUrl[0].url" alt="" v-if="item.thumbUrl && item.thumbUrl.length">
<p class="text">{{ item.title }}</p>
<p class="time">{{ item.organizationName }} {{ item.publishDate || '' }}</p>
</div>
<AiEmpty v-if="todayList.length == 0"/>
<div class="line-bg"></div>
<div class="title">
<div class="left">
<span class="tips"></span>党史课堂
</div>
<div class="right" @click="handleGoto('./classroomList')">
查看全部
<img src="https://cdn.cunwuyun.cn/img/down.svg" class="right-icon">
</div>
</div>
<div class="tab-content">
<div class="tab-item" v-for="(item, index) in classList" :key="index"
@click="handleGoto(`./videoDetail?id=${item.id}`)">
<img :src="item.thumbUrl[0].url" alt="" v-if="item.thumbUrl && item.thumbUrl.length">
<p>{{ item.title }}</p>
</div>
</div>
<AiEmpty v-if="classList.length == 0"/>
<div class="line-bg"></div>
<div class="title">
<div class="left">
<span class="tips"></span>党史知识
</div>
<div class="right" @click="handleGoto('./knowledgeList?type=knowledge')">
查看全部
<img src="https://cdn.cunwuyun.cn/img/down.svg" class="right-icon">
</div>
</div>
<div class="new-list">
<div class="list-content">
<div class="bg-fff" v-for="(item, index) in knowledgeList" :key="index"
@click="handleGoto(`./todayDetail?type=know&id=${item.id}`)">
<div class="item">
<div class="info">
<p>{{ item.title }}</p>
<span>{{ item.organizationName }} {{ item.createDate }}</span>
</div>
<img :src="item.thumbUrl[0].url" alt="" v-if="item.thumbUrl && item.thumbUrl.length"/>
</div>
</div>
<AiEmpty v-if="knowledgeList.length == 0"/>
</div>
</div>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "AppPartyHistoryEducation",
appName: "党史教育",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
todayList: [],
classList: [],
knowledgeList: []
};
},
onLoad() {
this.getTodayList()
this.getClassList()
this.getKnowledgeList()
},
methods: {
getTodayList() {
this.$instance.post(`/app/apppartyeducation/list?style=2&size=1&status=1`).then((res) => {
if (res.code == 0) {
if (res.data && res.data.records) {
res.data.records.map((item) => {
if (item.thumbUrl) {
item.thumbUrl = JSON.parse(item.thumbUrl)
}
if (item.publishDate) {
item.publishDate = item.publishDate.substring(0, 10)
}
})
this.todayList = res.data.records
}
}
});
},
getClassList() {
this.$instance.post(`/app/apppartyclassroom/list?size=3&status=1`).then((res) => {
if (res.code == 0) {
if (res.data && res.data.records) {
res.data.records.map((item) => {
item.thumbUrl = JSON.parse(item.thumbUrl)
})
this.classList = res.data.records
}
}
});
},
getKnowledgeList() {
this.$instance.post(`/app/apppartyeducation/list?style=0&size=4&status=1`).then((res) => {
if (res.code == 0) {
if (res.data && res.data.records) {
res.data.records.map((item) => {
if (item.thumbUrl) {
item.thumbUrl = JSON.parse(item.thumbUrl)
}
if (item.createDate) {
item.createDate = item.createDate.substring(0, 10)
}
})
this.knowledgeList = res.data.records
}
}
});
},
handleGoto(url) {
uni.navigateTo({url});
},
toNewDetail(id) {
this.handleGoto(`/pages/party/partyHistory/detail?id=${id}`);
},
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.AppPartyHistoryEducation {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.title {
padding: 28px 16px 28px 28px;
background-color: #fff;
display: flex;
justify-content: space-between;
.tips {
display: inline-block;
width: 8px;
height: 32px;
background: #E02617;
vertical-align: middle;
margin-right: 18px;
}
.right-icon {
width: 32px;
height: 32px;
float: right;
vertical-align: middle;
transform: rotate(270deg);
padding: 0 8px 0 0;
}
.left {
font-size: 34px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 48px;
}
.right {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666;
line-height: 40px;
}
}
.header {
padding: 0 34px 40px 34px;
img {
width: 684px;
height: 252px;
margin-bottom: 32px;
}
.text {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 48px;
word-break: break-all;
margin-bottom: 16px;
height: 96px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.time {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 30px;
}
}
.line-bg {
width: 100%;
height: 12px;
background: #F2F2F2;
}
.tab-content {
padding: 0 0 40px 30px;
overflow-x: hidden;
height: 236px;
width: 800px;
.tab-item {
float: left;
width: 236px;
height: 236px;
background: #FFF;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
border-radius: 8px;
margin-right: 16px;
img {
width: 236px;
height: 160px;
}
p {
padding: 12px 8px 0;
font-size: 26px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.new-list {
background-color: #fff;
.list-content {
.bg-fff {
padding: 0 30px;
border-top: 1px solid #ddd;
.item {
padding: 24px 0 32px 0;
border-bottom: 2px solid #eee;
display: flex;
justify-content: space-between;
.info {
// width: 410px;
p {
// width: 410px;
font-size: 30px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 46px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 52px;
}
span {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 30px;
}
}
img {
width: 224px;
height: 168px;
margin-left: 56px;
}
}
}
.view-more {
background-color: #fff;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #c50000;
line-height: 40px;
padding: 30px 0 40px 30px;
}
}
}
}
</style>

View File

@@ -0,0 +1,114 @@
<template>
<section class="home">
<div class="page">
<div class="item" v-for="(item, index) in classList" :key="index" @click.stop="toDetail(item.id)">
<img :src="item.thumbUrl[0].url" alt="" class="banner-img">
<img src="https://cdn.cunwuyun.cn/dvcp/pay-btn.png" alt="" class="play-img">
<p>{{ item.title }}</p>
<div>{{ item.organizationName }} {{ item.createDate }}</div>
</div>
<AiEmpty v-if="classList.length == 0"/>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
current: 1,
pages: 2,
classList: []
};
},
onLoad() {
this.getClassList()
},
methods: {
getClassList() {
if (this.current > this.pages) return;
this.$instance.post(`/app/apppartyclassroom/list?size=10&status=1&current=${this.current}`).then((res) => {
if (res.code == 0) {
if (res.data && res.data.records) {
res.data.records.map((item) => {
item.thumbUrl = JSON.parse(item.thumbUrl)
item.createDate = item.createDate.substring(0, 10)
})
const classList = this.current > 1 ? [...this.classList, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
this.classList = classList
this.classList = res.data.records
}
}
});
},
toDetail(id) {
uni.navigateTo({url: `./videoDetail?id=${id}`})
}
},
onReachBottom() {
this.current = this.current + 1
this.getClassList()
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.item {
position: relative;
video {
width: 100%;
height: 416px;
// background: rgba(0, 0, 0, 0.3);
}
.banner-img {
width: 100%;
height: 416px;
}
.play-img {
width: 80px;
height: 80px;
position: absolute;
top: 148px;
left: 334px;
}
p {
padding: 20px 32px;
width: 686px;
font-size: 34px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 48px;
}
div {
padding: 0 0 34px 32px;
font-size: 22px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 22px;
}
}
}
</style>

View File

@@ -0,0 +1,111 @@
<template>
<section class="home">
<div class="page">
<div class="header">
<p class="title">{{ info.title }}</p>
<div class="info mar-b16"><span class="label">发布单位</span><span class="value">{{ info.organizationName }}</span>
</div>
<div class="info">发布时间{{ info.publishDate || info.createDate }}</div>
</div>
<div class="content">
<u-parse :html="info.content"></u-parse>
</div>
<AiTransSpeech :src="info.speech" v-if="info.speech"/>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
id: '',
info: {},
content: ''
};
},
onLoad(options) {
this.id = options.id
this.getDetail()
},
methods: {
getDetail() {
this.$instance.post(`/app/apppartyhistory/queryDetailByIdWeChat?id=${this.id}`).then((res) => {
if (res.code == 0) {
if (res.data.publishDate) {
res.data.publishDate = res.data.publishDate.substring(0, 10)
}
if (res.data.createDate) {
res.data.createDate = res.data.createDate.substring(0, 10)
}
this.info = res.data
}
});
},
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.header {
width: 100%;
padding: 24px 32px 32px;
box-sizing: border-box;
background: #D03A28;
.title {
width: 100%;
font-size: 40px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
line-height: 64px;
letter-spacing: 1px;
word-break: break-all;
margin-bottom: 16px;
}
.info {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFF;
line-height: 40px;
.label {
width: 140px;
}
.value {
width: calc(100% - 140px);
word-break: break-all;
}
}
.mar-b16 {
margin-bottom: 16px;
}
}
.content {
padding: 32px;
}
}
</style>

View File

@@ -0,0 +1,320 @@
<template>
<div class="page">
<div style="height: 100%">
<div class="fixed-top">
<!-- 选择时间和类型 -->
<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="array"
range-key="dictName"
>
<div class="uni-input">{{ styleText }}</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
mode="date"
:value="date"
:start="startDate"
:end="endDate"
@change="bindDateChange"
fields="month"
>
<div class="uni-input">{{ day }}</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
</div>
</div>
<div class="session-list">
<div class="session-item" v-for="(item, index) in meetList" :key="index" @click="toDetail(item.id)">
<div class="info">
<p v-if="fromType != 'style'"><span
:class="item.style == 0 ? 'status0' : 'status1'">{{
item.style == 0 ? '党史知识' : '党史图书馆'
}}</span>{{ item.title }}
</p>
<p v-else><span class="status0">{{
$dict.getLabel(`partyHistoryType${optionStyle}`, item.type)
}}</span>{{ item.title }}</p>
<span class="time">{{ item.organizationName }} {{ item.createDate }}</span>
</div>
<div class="img" v-if="item.thumbUrl && item.thumbUrl.length">
<img :src="item.thumbUrl[0].url" alt="">
</div>
</div>
</div>
<AiEmpty v-if="meetList.length == 0"/>
</div>
</div>
</template>
<script>
export default {
data() {
const currentDate = this.getDate({
format: true,
});
return {
array: [],
partyStudyType: "",
date: currentDate,
day: "时间",
createDate: "", //创建时间
meetList: [],
pageNum: 1,
pageSize: 10,
pages: 2,
fromType: '', //style 0、党建要闻 1、政策解读 knowledge 党史知识 policy 党史图书馆
style: '4',
styleText: '类型',
optionStyle: ''
};
},
computed: {
startDate() {
return this.getDate("start");
},
endDate() {
return this.getDate("end");
},
},
onLoad(options) {
console.log(options)
if (options.type == 'knowledge') {
this.array = [{dictName: "全部类型", dictValue: "4"}, {dictName: "党史知识 ", dictValue: 0}, {
dictName: "党史图书馆",
dictValue: 1
}]
}
if (options.type == 'style') {
this.style = ''
this.optionStyle = options.style
this.$dict.load("partyHistoryType0", "partyHistoryType1").then(() => {
this.array = this.$dict.getDict(`partyHistoryType${options.style}`)
this.array.unshift({dictName: "全部类型", dictValue: ""})
})
}
this.fromType = options.type
this.getList();
},
methods: {
bindPickerChange(e) {
console.log(e)
this.style = this.array[e.detail.value].dictValue
if (this.style === '') {
this.styleText = '类型'
} else {
this.styleText = this.array[e.detail.value].dictName
}
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList();
},
bindDateChange(e) {
this.day = e.target.value;
this.createDate = e.target.value;
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList();
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === "start") {
year = year - 60;
} else if (type === "end") {
year = year + 2;
}
month = month > 9 ? month : "0" + month;
day = day > 9 ? day : "0" + day;
return `${year}-${month}-08 00:00:00 `;
},
search() {
this.pageNum = 1;
this.pageSize = 10;
this.pages = 2;
this.getList();
},
getList() {
if (this.pageNum > this.pages) return;
var createDate = ''
if (this.createDate) {
createDate = this.createDate + '-01'
}
this.$instance.post(`/app/apppartyeducation/list?size=10&current=${this.pageNum}&createDateParam=${createDate}&style=${this.style}&status=1`).then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
if (item.thumbUrl) {
item.thumbUrl = JSON.parse(item.thumbUrl)
}
if (item.createDate) {
item.createDate = item.createDate.substring(0, 10)
}
})
const meetList = this.pageNum > 1 ? [...this.meetList, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
this.meetList = meetList
}
});
},
toDetail(id) {
uni.navigateTo({
url: "./todayDetail?type=know&id=" + id,
});
},
},
onReachBottom() {
this.pageNum = this.pageNum + 1;
this.getList();
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
.search-box {
width: 100%;
height: 112px;
background-color: #D7261E;
padding: 24px 32px;
box-sizing: border-box;
}
.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: 8 spx;
}
}
.type-slect:nth-child(2) {
border: none;
}
}
.session-list {
padding-top: 112px;
.session-item {
width: 686px;
padding: 32px;
box-sizing: border-box;
margin: 0 auto 32px auto;
background-color: #fff;
position: relative;
overflow: hidden;
display: flex;
justify-content: space-between;
border-radius: 8px;
.info {
p {
height: 88px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 24px;
span {
display: inline-block;
padding: 0 8px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
line-height: 44px;
margin-right: 16px;
border-radius: 8px;
}
.status0 {
color: #2266FF;
background-color: #E8EFFF;
}
.status1 {
color: #FF8822;
background-color: #FFF3E9;
}
}
.time {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 22px;
}
}
.img {
padding-left: 24px;
img {
width: 192px;
height: 144px;
}
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@@ -0,0 +1,330 @@
<template>
<div class="page">
<div style="height: 100%">
<div class="fixed-top">
<!-- 选择时间和类型 -->
<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="array"
range-key="dictName"
>
<div class="uni-input">{{ styleText }}</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
mode="date"
:value="date"
:start="startDate"
:end="endDate"
@change="bindDateChange"
fields="month"
>
<div class="uni-input">{{ day }}</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
</div>
</div>
<div class="session-list">
<div class="session-item" v-for="(item, index) in meetList" :key="index" @click="toDetail(item.id)">
<div class="info">
<p v-if="fromType != 'style'"><span
:class="item.style == 0 ? 'status0' : 'status1'">{{
item.style == 0 ? '党史知识' : '党史图书馆'
}}</span>{{ item.title }}
</p>
<p v-else><span class="status0">{{
$dict.getLabel(`partyHistoryType${optionStyle}`, item.type)
}}</span>{{ item.title }}</p>
<span class="time">{{ item.organizationName }} {{ item.createDate }}</span>
</div>
<div class="img" v-if="item.thumbUrl && item.thumbUrl.length">
<img :src="item.thumbUrl[0].url" alt="">
</div>
</div>
</div>
<AiEmpty v-if="meetList.length == 0"/>
</div>
</div>
</template>
<script>
export default {
data() {
const currentDate = this.getDate({
format: true,
});
return {
array: [],
partyStudyType: "",
date: currentDate,
day: "时间",
createDate: "", //创建时间
meetList: [],
pageNum: 1,
pageSize: 10,
pages: 2,
fromType: '', //style 0、党建要闻 1、政策解读 knowledge 党史知识 policy 党史图书馆
style: '',
styleText: '类型',
optionStyle: ''
};
},
computed: {
startDate() {
return this.getDate("start");
},
endDate() {
return this.getDate("end");
},
},
onLoad(options) {
console.log(options)
if (options.type == 'knowledge') {
this.array = [{dictName: "全部类型", dictValue: "0|1"}, {dictName: "党史知识 ", dictValue: 0}, {
dictName: "党史图书馆",
dictValue: 1
}]
}
if (options.type == 'style') {
this.style = ''
this.optionStyle = options.style
this.$dict.load("partyHistoryType0", "partyHistoryType1").then(() => {
this.array = this.$dict.getDict(`partyHistoryType${options.style}`)
this.array.unshift({dictName: "全部类型", dictValue: ""})
})
}
this.fromType = options.type
this.getList();
},
methods: {
bindPickerChange(e) {
console.log(e)
this.style = this.array[e.detail.value].dictValue
if (this.style === '') {
this.styleText = '类型'
} else {
this.styleText = this.array[e.detail.value].dictName
}
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList();
},
bindDateChange(e) {
this.day = e.target.value;
this.createDate = e.target.value;
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList();
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === "start") {
year = year - 60;
} else if (type === "end") {
year = year + 2;
}
month = month > 9 ? month : "0" + month;
day = day > 9 ? day : "0" + day;
return `${year}-${month}-08 00:00:00 `;
},
search() {
this.pageNum = 1;
this.pageSize = 10;
this.pages = 2;
this.getList();
},
getList() {
if (this.pageNum > this.pages) return;
var createDate = ''
if (this.createDate) {
createDate = this.createDate + '-01 00:00:00'
}
this.$instance.post(`/app/apppartyhistory/listWechat`, {
style: this.fromType == 'style' ? this.optionStyle : this.style,
type: this.style,
createDate: createDate,
current: this.pageNum,
size: this.pageSize,
status: 1
}).then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
if (item.thumbUrl) {
item.thumbUrl = JSON.parse(item.thumbUrl)
}
if (item.createDate) {
item.createDate = item.createDate.substring(0, 10)
}
})
const meetList = this.pageNum > 1 ? [...this.meetList, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
this.meetList = meetList
// this.meetList.map((item) => {
// item.thumbUrl = JSON.parse(item.thumbUrl)
// })
}
});
},
toDetail(id) {
uni.navigateTo({
url: "./detail?id=" + id,
});
},
},
onReachBottom() {
this.pageNum = this.pageNum + 1;
this.getList();
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
.search-box {
width: 100%;
height: 112px;
background-color: #D7261E;
padding: 24px 32px;
box-sizing: border-box;
}
.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: 8 spx;
}
}
.type-slect:nth-child(2) {
border: none;
}
}
.session-list {
padding-top: 112px;
.session-item {
width: 686px;
padding: 32px;
box-sizing: border-box;
margin: 0 auto 32px auto;
background-color: #fff;
position: relative;
overflow: hidden;
display: flex;
justify-content: space-between;
border-radius: 8px;
.info {
p {
height: 88px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
margin-bottom: 24px;
span {
display: inline-block;
padding: 0 8px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
line-height: 44px;
margin-right: 16px;
border-radius: 8px;
}
.status0 {
color: #2266FF;
background-color: #E8EFFF;
}
.status1 {
color: #FF8822;
background-color: #FFF3E9;
}
}
.time {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 22px;
}
}
.img {
padding-left: 24px;
img {
width: 192px;
height: 144px;
}
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@@ -0,0 +1,84 @@
<template>
<section class="home">
<div class="page">
<p class="title">点击进入月份</p>
<div class="tab-content">
<span v-for="(item, index) in tabList" :key="index" class="tab-item" :class="tabIndex == index ? 'active' : ''"
@click="back(index)">{{ item }}</span>
</div>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
tabList: ['全部', '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
tabIndex: 0,
};
},
onLoad(options) {
this.tabIndex = options.index
},
methods: {
back(index) {
this.tabIndex = index
uni.setStorageSync('partyTabIndex', this.tabIndex)
uni.navigateBack({delta: 1})
}
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.title {
padding: 32px 0 40px 30px;
font-size: 26px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #B9B9B9;
line-height: 36px;
}
.tab-content {
padding-left: 30px;
.tab-item {
display: inline-block;
width: 144px;
height: 48px;
text-align: center;
line-height: 48px;
border-radius: 24px;
box-sizing: border-box;
border: 1px solid #CBCBCB;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333;
margin: 0 38px 32px 0;
}
.active {
color: #DA2D1A;
}
}
}
</style>

View File

@@ -0,0 +1,115 @@
<template>
<section class="home">
<div class="page">
<div class="header">
<p class="title">{{ info.title }}</p>
<div class="info mar-b16"><span class="label">发布单位</span><span class="value">{{ info.organizationName }}</span>
</div>
<div class="info" v-if="type == 'know'">发布时间{{ info.createDate || '-' }}</div>
<div class="info" v-else>发布时间{{ info.publishDate || '-' }}</div>
</div>
<div class="content">
<u-parse :html="info.content"></u-parse>
</div>
<AiTransSpeech :src="info.speech" v-if="info.speech"/>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
id: '',
info: {},
content: '',
type: '', //know 党史知识
};
},
onLoad(options) {
console.log(options)
this.id = options.id
this.type = options.type
this.getDetail()
},
methods: {
getDetail() {
this.$instance.post(`/app/apppartyeducation/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
if (res.data.createDate) {
res.data.createDate = res.data.createDate.substring(0, 10)
}
if (res.data.publishDate) {
res.data.publishDate = res.data.publishDate.substring(0, 10)
}
this.info = res.data
}
});
},
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.header {
width: 100%;
padding: 24px 32px 32px;
box-sizing: border-box;
background: #D03A28;
.title {
width: 100%;
font-size: 40px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
line-height: 64px;
letter-spacing: 1px;
word-break: break-all;
margin-bottom: 16px;
}
.info {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFF;
line-height: 40px;
display: flex;
.label {
width: 140px;
}
.value {
width: calc(100% - 140px);
word-break: break-all;
}
}
.mar-b16 {
margin-bottom: 16px;
}
}
.content {
padding: 32px;
}
}
</style>

View File

@@ -0,0 +1,175 @@
<template>
<section class="home">
<div class="page">
<div class="tab-content">
<span v-for="(item, index) in tabList" :key="index" class="tab-item" :class="tabIndex == index ? 'active' : ''"
@click="timeSelect(index)">{{ item }}</span>
<img src="https://cdn.cunwuyun.cn/img/party_detail.png" alt=""
@click="handleGoto(`./select?index=${tabIndex}`)">
</div>
<div class="item" v-for="(item, index) in todayList" :key="index"
@click="handleGoto(`./todayDetail?id=${item.id}`)">
<div class="header">
<img :src="item.thumbUrl[0].url" alt="" v-if="item.thumbUrl && item.thumbUrl.length"/>
<p class="text">{{ item.title }}</p>
<p class="time">{{ item.organizationName }} {{ item.publishDate || '' }}</p>
</div>
<div class="line-bg"></div>
</div>
<AiEmpty v-if="todayList.length == 0"/>
</div>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
tabList: ['全部', '一月', '二月', '三月', '四月', '五月'],
tabIndex: 0,
todayList: [],
current: 1,
pages: 2
};
},
onLoad() {
this.getTodayList();
},
onShow() {
if (uni.getStorageSync('partyTabIndex')) {
this.tabIndex = uni.getStorageSync('partyTabIndex')
uni.setStorageSync('partyTabIndex', '')
this.timeSelect(this.tabIndex);
}
},
methods: {
getTodayList() {
if (this.current > this.pages) return;
var publishDate = ''
if (this.tabIndex > 0) {
var myDate = new Date();
var tYear = myDate.getFullYear();
var month = this.tabIndex < 10 ? '0' + this.tabIndex : this.tabIndex
publishDate = tYear + '-' + month + '-01'
}
this.$instance.post(`/app/apppartyeducation/list?style=2&current=${this.current}&size=10&publishDate=${publishDate}&status=1`).then((res) => {
if (res.code == 0) {
if (res.data.records && res.data.records.length) {
res.data.records.map((item) => {
console.log(item.thumbUrl)
if (item.thumbUrl) {
item.thumbUrl = JSON.parse(item.thumbUrl)
}
if (item.publishDate) {
item.publishDate = item.publishDate.substring(0, 10)
}
})
const todayList = this.current > 1 ? [...this.todayList, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
this.todayList = todayList
}
}
});
},
handleGoto(url) {
uni.navigateTo({url})
},
timeSelect(index) {
this.tabIndex = index
this.current = 1
this.pages = 2
this.todayList = []
this.getTodayList()
}
},
onReachBottom() {
this.current = this.current + 1
this.getTodayList()
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
width: 100%;
height: 100%;
}
.page {
width: 100%;
overflow-x: hidden;
background-color: #fff;
.tab-content {
width: 100%;
height: 84px;
padding: 0 30px;
box-sizing: border-box;
background: #FCF0ED;
.tab-item {
display: inline-block;
width: 60px;
line-height: 80px;
height: 80px;
margin-right: 48px;
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #70737B;
}
.active {
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #DA2D1A;
border-bottom: 4px solid #DE2C19;
}
img {
width: 32px;
vertical-align: middle;
}
}
.header {
padding: 0 34px;
img {
width: 684px;
height: 252px;
margin: 32px 0;
}
.text {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 48px;
word-break: break-all;
margin-bottom: 16px;
}
.time {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 30px;
padding-bottom: 40px;
}
}
.line-bg {
width: 100%;
height: 12px;
background: #f2f2f2;
}
}
</style>

View File

@@ -0,0 +1,199 @@
<template>
<section class="home" v-if="pageShow">
<div class="page" v-if="videoList.length">
<video :src="videoList[activeIndex].videoUrl" :id="`video${activeIndex+1}`"></video>
<p class="video-name">{{ videoList[activeIndex].title }}</p>
<div class="time">{{ info.organizationName }} {{ info.createDate }}</div>
<div class="title">
<span>选集</span>
<p @click="show=true" v-if="videoList.length > 7">查看全部&nbsp;&nbsp;></p>
</div>
<div class="select page-select">
<div class="item" :class="index == activeIndex ? 'active' : ''" v-for="(item, index) in videoList" :key="index"
@click="activeIndex=index">{{ item.num }}
</div>
</div>
<div class="title">
<span>内容简介</span>
</div>
<div class="detail-content">
<u-parse :html="info.content"></u-parse>
</div>
<u-popup v-model="show" mode="bottom">
<div class="title">
<span>选集</span>
</div>
<div class="select pop-select">
<div class="item" :class="index == activeIndex ? 'active' : ''" v-for="(item, index) in videoList"
:key="index" @click="activeIndex=index;show=false">{{ item.num }}
</div>
</div>
</u-popup>
</div>
<AiEmpty v-else/>
</section>
</template>
<script>
import {mapState} from "vuex";
export default {
name: "home",
computed: {
...mapState(["user", "token"]),
},
data() {
return {
show: false,
id: '',
info: {},
videoList: [],
activeIndex: 0,
pageShow: false
};
},
onLoad(options) {
this.id = options.id
this.getClassDetail()
this.getVideoList()
},
methods: {
change(index) {
this.current = index;
},
getClassDetail() {
this.$instance.post(`/app/apppartyclassroom/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
if (res.data) {
res.data.createDate = res.data.createDate.substring(0, 10)
this.info = res.data
}
}
});
},
getVideoList() {
this.$instance.post(`/app/apppartyclassroomepisode/list?classroomId=${this.id}&size=10000`).then((res) => {
if (res.code == 0) {
console.log(res)
if (res.data && res.data.records) {
this.videoList = res.data.records
this.pageShow = true
}
}
});
},
},
};
</script>
<style scoped lang="scss">
@import "../../../common/common.css";
.home {
width: 100%;
height: 100%;
}
.page {
width: 100%;
height: 100%;
overflow-x: hidden;
background-color: #fff;
video {
width: 100%;
height: 416px;
}
.video-name {
padding: 24px 32px 20px;
width: 686px;
font-size: 34px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 48px;
}
.time {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 30px;
margin-bottom: 32px;
padding-left: 32px;
}
.title {
width: 100%;
height: 80px;
line-height: 80px;
padding: 0 32px 16px 32px;
display: flex;
justify-content: space-between;
box-sizing: border-box;
span {
display: inline-block;
font-size: 34px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 80px;
}
p {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999;
line-height: 80px;
}
}
.select {
padding: 0 0 24px 32px;
width: 800px;
overflow-x: hidden;
.item {
width: 96px;
height: 96px;
line-height: 96px;
text-align: center;
background: #F0F4FB;
border-radius: 8px;
float: left;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
margin-right: 11px;
}
.active {
color: #DA2D1A;
}
}
.page-select {
height: 96px;
padding-bottom: 0;
overflow-y: hidden;
}
.detail-content {
padding: 0 32px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 48px;
word-break: break-all;
}
.pop-select {
.item {
margin: 0 22px 22px 0;
}
}
}
</style>

View File

@@ -0,0 +1,304 @@
<template>
<div class="AppPartyOrganization">
<div class="header"></div>
<div class="content">
<div class="party-org">
<div class="title">所在组织</div>
<p class="org-select" @click="selectShow = true">{{ detail.name || '请选择' }}<img
src="https://cdn.cunwuyun.cn/img/down.svg"/></p>
</div>
<div class="org-info">
<div class="title">组织信息</div>
<div class="flex-row">
<span class="color-666">组织类型</span>
<span class="color-333">{{ $dict.getLabel("orgType", detail.orgType) }}</span>
</div>
<div class="flex-row">
<span class="color-666">组织级别</span>
<span class="color-333">{{ $dict.getLabel("orgPartyType", detail.partyType) }}</span>
</div>
<div class="flex-row">
<span class="color-666">党员人数</span>
<span class="color-333">{{ count }}</span>
</div>
</div>
<div class="org-info">
<div class="flex-row">
<span class="title">报到状态</span>
<span :class="userInfo.reportOrgId ? 'status1' : 'status0'">{{ userInfo.reportOrgId ? '已报到' : '未报到' }}</span>
</div>
</div>
</div>
<u-select v-model="selectShow" :list="treeData" @confirm="confirm"></u-select>
<u-popup v-model="dialog" mode="center" border-radius="8">
<div class="estateNotice">
<b>您已加入过党组织,是否变更</b>
<u-gap height="40"/>
<div class="curEstate">
<div class="flexRow">
<b>当前党组织</b>
<span>{{ detail.name }}</span>
</div>
<div class="flexRow">
<b>当前报到状态</b>
<span
:class="userInfo.reportOrgId ? 'status1' : 'status0'">{{ userInfo.reportOrgId ? '已报到' : '未报到' }}</span>
</div>
<div class="flexRow">
<b>变更党组织</b>
<span>{{ changeOrgInfo.label }}</span>
</div>
</div>
<u-gap height="34"/>
<div class="alert">变更党组织后需尽快前往新党组织报到</div>
<u-gap height="62"/>
<div class="flexRow footer">
<div class="fill"/>
<span @click="dialog=false">取消</span>
<span @click="dialog=false,bindEstate()">确认</span>
</div>
</div>
</u-popup>
</div>
</template>
<script>
export default {
name: "AppPartyOrganization",
appName: "党组织",
data() {
return {
dialog: false,
detail: {},
treeData: [],
selectShow: false,
reportOrgName: '', //报到党组织名称
reportOrgId: '',
changeOrgInfo: {},
userInfo: {},
count: 0
}
},
onLoad() {
this.$dict.load("orgType", "orgPartyType").then(() => {
this.getUserInfo()
})
},
methods: {
getUserInfo() {
this.$instance.post("/app/appparty/chanhudetail").then(res => {
if (res?.data) {
if (res.data.reportOrgId) {
this.reportOrgName = res.data.reportOrgName
this.reportOrgId = res.data.reportOrgId
} else {
this.reportOrgName = res.data.partyOrgName
this.reportOrgId = res.data.partyOrgId
}
this.userInfo = res.data
this.getDetail()
this.getTree()
}
})
},
getTree() {
this.$instance.post(`/admin/partyOrganization/queryAllChildren?id=${this.userInfo.topOrgId}`).then(res => {
if (res?.data) {
res.data.map((item) => {
item.label = item.name
item.value = item.id
})
this.treeData = res.data
}
})
},
getDetail() {
this.$instance.post(`/admin/partyOrganization/detail?id=${this.userInfo.reportOrgId}`).then(res => {
if (res?.data) {
this.detail = res.data
this.count = res.data.memberCount.one || 0
}
})
},
confirm(e) {
this.treeData.map((item) => {
if (item.id == e[0].value) {
this.changeOrgInfo = item
}
})
this.dialog = true
},
bindEstate() {
this.$instance.post("/app/apppartyreportorgchange/changeReportOrg", {
orgId: this.changeOrgInfo.id,
orgName: this.changeOrgInfo.name,
partyId: this.userInfo.id,
}).then(res => {
if (res?.code == 0) {
this.$toast('党组织变更成功')
this.getUserInfo()
this.$store.commit("getUserInfo")
}
})
},
}
}
</script>
<style lang="scss" scoped>
.AppPartyOrganization {
height: 100%;
padding-bottom: 112px;
box-sizing: border-box;
position: relative;
.header {
height: 160px;
background: #D7261E;
}
.content {
width: 686px;
position: absolute;
top: 50px;
left: 32px;
.party-org {
padding: 32px;
margin-bottom: 16px;
background: #FFFFFF;
.title {
font-size: 34px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #333;
line-height: 60px;
}
.org-select {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666;
line-height: 42px;
img {
width: 32px;
height: 32px;
vertical-align: middle;
transform: rotate(270deg);
}
}
}
.org-info {
padding: 0 32px;
background: #FFFFFF;
margin-bottom: 16px;
div {
line-height: 100px;
font-size: 30px;
border-bottom: 2px solid #eee;
box-sizing: content-box;
}
div:nth-last-of-type(1) {
border-bottom: 0;
}
.title {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #333;
}
.flex-row {
display: flex;
justify-content: space-between;
.color-666 {
color: #666;
}
.color-333 {
color: #333;
}
}
.status0 {
color: #FF8822;
}
.status1 {
color: #2EA222;
}
}
}
::v-deep .estateNotice {
width: 560px;
background: #FFFFFF;
padding: 48px;
box-sizing: border-box;
.status0 {
color: #FF8822;
}
.status1 {
color: #2EA222;
}
.curEstate {
color: #666;
font-size: 28px;
b {
color: #333
}
}
.alert {
font-size: 28px;
font-weight: 400;
color: #F14242;
}
.footer {
span {
width: 128px;
height: 40px;
line-height: 40px;
text-align: center;
color: #1365DD;
font-size: 28px;
transform: translateX(32px);
& + span {
margin-left: 16px;
}
}
}
}
.bottomBtn {
position: fixed;
width: 100%;
bottom: 0;
text-align: center;
height: 112px;
line-height: 112px;
background: #D7261E;
font-size: 32px;
font-weight: 500;
color: #FFFFFF;
}
}
</style>

View File

@@ -0,0 +1,485 @@
<template>
<div class="page">
<div v-if="isShow" style="height: 100%">
<div class="fixed-top">
<!-- 头部搜索样式 -->
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<image src="https://cdn.cunwuyun.cn/img/search-red.svg"></image>
<span>{{ inputValue }}</span>
</div>
</div>
<!-- 选择时间和类型 -->
<div class="slect flex-row">
<!-- 类型选择 -->
<div class="uni-list type-select">
<div class="uni-list-cell">
<div class="uni-list-cell-db">
<picker
@change="bindPickerChange"
:range="array"
range-key="dictName"
>
<div class="uni-input" v-if="partyStudyType === ''">
学习类别
</div>
<div class="uni-input" v-else>
{{ array[partyStudyType + 1].dictName }}
</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
<!-- 时间选择 -->
<div class="uni-list type-select">
<div class="uni-list-cell">
<div class="uni-list-cell-db">
<picker
mode="date"
:value="date"
:start="startDate"
:end="endDate"
@change="bindDateChange"
fields="month"
>
<div class="uni-input">{{ day }}</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
</div>
</div>
<div class="session-list">
<div
class="session-item"
v-for="(item, index) in meetList"
:key="index"
>
<div class="item-top" @click="toDetail(item.id)">
<div class="item-title mar-b12">{{ item.title }}</div>
<div class="item-info">
<span class="info-label">学习类别</span>
<span class="info-value">{{
$dict.getLabel("partyStudyType", item.type)
}}</span>
</div>
<div class="item-info">
<span class="info-label">发布时间</span>
<span class="info-value">{{ item.publishTime }}</span>
</div>
<div class="item-info mar-b12">
<span class="info-label">发布人员</span>
<span class="info-value">{{ item.publishUserName }}</span>
</div>
</div>
<div class="item-status" :class="'item-status' + item.studyStatus">
{{ $dict.getLabel("partyStudyStatus", item.studyStatus) }}
</div>
</div>
</div>
<AiEmpty v-if="meetList.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="searchValue"
@blur="onBlur"
/>
<image
class="sousuo"
src="https://cdn.cunwuyun.cn/img/search-active.svg"
></image>
<image
v-if="searchValue"
@tap="clearInput"
class="clear"
src="https://cdn.cunwuyun.cn/img/empty-Input.svg"
></image>
<div class="search-word" @click="search">搜索</div>
</div>
</div>
</div>
</template>
<script>
export default {
appName: "党员学习",
data() {
const currentDate = this.getDate({
format: true,
});
return {
inputValue: "请输入学习标题",
isShow: true,
array: [],
meetType: "",
partyStudyType: "",
index: 0,
date: currentDate,
day: "时间",
createDate: "", //创建时间
meetList: [],
searchValue: "", //搜索框输入值
pageNum: 1,
pageSize: 10,
pages: 2,
userId: "",
partyId: "",
};
},
computed: {
startDate() {
return this.getDate("start");
},
endDate() {
return this.getDate("end");
},
},
onLoad(options) {
this.partyId = options.partyId;
this.$dict.load("partyStudyStatus", "partyStudyType").then((res) => {
this.array = this.$dict.getDict("partyStudyType");
this.array.unshift({dictName: "全部类型", dictValue: ""})
this.getList();
});
},
onShow() {
this.$dict.load("partyStudyStatus", "partyStudyType");
this.getList();
},
methods: {
bindPickerChange(e) {
if (e.detail.value - 1 >= 0) {
this.partyStudyType = e.detail.value - 1;
} else {
this.partyStudyType = "";
}
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList();
},
bindDateChange: function (e) {
this.day = e.target.value;
this.createDate = e.target.value;
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList();
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === "start") {
year = year - 60;
} else if (type === "end") {
year = year + 2;
}
month = month > 9 ? month : "0" + month;
day = day > 9 ? day : "0" + day;
return `${year}-${month}-08 00:00:00 `;
},
changeSearchBox() {
this.isShow = false;
},
onBlur(e) {
this.searchValue = e.target.value;
if (this.searchValue) {
this.inputValue = this.searchValue;
} else {
this.inputValue = "请输入学习标题";
}
},
search() {
this.isShow = true;
this.pageNum = 1;
this.pageSize = 10;
this.pages = 2;
this.getList();
},
clearInput() {
this.searchValue = "";
this.inputValue = "请输入学习标题";
},
getList() {
if (this.pageNum > this.pages) return;
this.$instance.post(`/app/apppartystudy/listWechat`, {
title: this.searchValue,
type: this.partyStudyType,
searchMonth: this.createDate,
current: this.pageNum,
size: this.pageSize,
}).then((res) => {
if (res.code == 0) {
const meetList = this.pageNum > 1 ? [...this.meetList, ...res.data.records] : res.data.records;
this.pages = Math.ceil(res.data.total / 10);
this.meetList = meetList;
}
});
},
toDetail(id) {
uni.navigateTo({
url: "./partyStudyDetail?id=" + id,
});
},
},
onReachBottom() {
this.pageNum = this.pageNum + 1;
this.getList();
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
.search-box {
width: 100%;
height: 112px;
background-color: #D7261E;
padding: 24px 32px;
box-sizing: border-box;
.search-input {
line-height: 64px;
width: 100%;
height: 100%;
background: #ce0010;
border-radius: 32px;
color: #f0cbcd;
font-size: 26px;
image {
width: 34px;
height: 34px;
margin: 8px 8px 8px 24px;
position: relative;
top: 6px;
}
span {
display: inline-block;
overflow: hidden;
white-space: nowrap;
span-overflow: ellipsis;
width: 600px;
}
}
}
.slect {
width: 100%;
height: 96px;
background-color: #fff;
color: #666;
.type-select {
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-select:nth-child(2) {
border: none;
}
}
.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: 34px;
height: 34px;
}
.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;
}
}
}
.session-list {
padding-top: 224px;
.session-item {
width: 686px;
margin: 0 auto 32px auto;
background-color: #fff;
position: relative;
overflow: hidden;
.item-top {
padding: 32px 32px 0 32px;
}
.item-title {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
word-break: break-all;
width: 600px;
}
.item-info {
line-height: 42px;
font-size: 28px;
margin-bottom: 8px;
.info-label {
color: #999;
}
}
.item-bottom {
border-top: 2px solid #eee;
text-align: right;
padding-right: 64px;
box-sizing: border-box;
line-height: 96px;
.item-btn {
display: inline-block;
width: 152px;
height: 52px;
line-height: 52px;
border-radius: 28px;
text-align: center;
font-size: 28px;
margin-left: 32px;
border: 2px solid #e1e1e1;
}
}
.info-value {
color: #343d65;
background-color: #fff !important;
}
.item-status {
position: absolute;
top: 14px;
right: -30px;
width: 140px;
text-align: center;
line-height: 44px;
font-size: 24px;
transform: rotate(45deg);
}
.item-status1 {
color: #5a98f2;
background-color: #f1f6ff;
}
.item-status0 {
color: #ff9b2b;
background-color: #fff3e8;
}
.color-1365DD {
color: #1365dd;
}
.color-FF4466 {
color: #ff4466;
}
.color-333333 {
color: #333;
}
.color-606060 {
color: #606060;
}
.border-1365DD {
border-color: #1365dd !important;
color: #1365dd !important;
}
.border-E1E1E1 {
border-color: #e1e1e1 !important;
color: #606060;
}
.border-E1E1E1 {
border-color: #e1e1e1 !important;
}
.mar-b12 {
margin-bottom: 26px !important;
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@@ -0,0 +1,220 @@
<template>
<div class="page">
<header></header>
<div class="form">
<div class="main">
<div class="textarea">
<div class="color-333 fs32">
<span class="color-red">*</span>学习心得
</div>
<textarea
type="textarea"
placeholder="请输入学习心得200字以内"
v-model="content"
adjust-position="false"
maxlength="200"
class="fs32"
></textarea>
</div>
</div>
</div>
<p class="tips-span">说明 : 提交学习心得意味着完成本次内容的学习</p>
<div class="report" @click="changeStatus()">提交</div>
</div>
</template>
<script>
export default {
name: "fillLog",
data() {
return {
id: "",
content: "",
};
},
onLoad(options) {
this.id = options.id;
this.getDetailInfo();
},
methods: {
getDetailInfo() {
this.$instance
.post(`/app/apppartystudylog/queryStudyLog?id=${this.id}`, null, {})
.then((res) => {
if (res.data) {
if (res.data.content != null) {
this.content = res.data.content;
} else {
this.content = "";
}
}
});
},
changeStatus() {
if (!this.content) {
this.$toast("请输入学习心得");
return;
}
let params = {
studyId: this.id,
content: this.content,
};
this.$instance
.post(`/app/apppartystudylog/addStudyLog`, params)
.then((res) => {
if (res.code == 0) {
this.$toast("学习心得提交完成");
setTimeout(function () {
uni.navigateBack({
delta: 2,
});
}, 1000);
}
});
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../common/common.css";
.page {
width: 100%;
height: 100%;
.tips-span {
width: 626px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: rgba(153, 153, 153, 1);
line-height: 40px;
margin-top: 20px;
padding-left: 32px;
}
textarea {
width: 100%;
height: 688px;
margin-top: 16px;
}
header {
width: 100%;
height: 112px;
background-color: #D7261E;
}
.form {
width: 100%;
padding: 32px;
box-sizing: border-box;
margin-top: -100px;
.main {
background-color: #fff;
border-radius: 8px;
padding: 16px;
box-sizing: border-box;
}
.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;
}
}
}
.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;
}
.fs32 {
font-size: 32px;
}
}
</style>

View File

@@ -0,0 +1,351 @@
<template>
<div class="page">
<div class="detail-content">
<div class="detail-info">
<div class="info-title">{{ data.title }}</div>
<div class="item-info">
<span class="info-label">学习类别</span>
<span class="info-value">{{ $dict.getLabel('partyStudyType', data.type) }}</span>
</div>
<div class="item-info">
<span class="info-label">发布人员</span>
<span class="info-value">{{ data.publishUserName }}</span>
</div>
<div class="item-info">
<span class="info-label">发布时间</span>
<span class="info-value">{{ data.publishTime }}</span>
</div>
<div class="item-info">
<span class="info-label">学习时间</span>
<span class="info-value">{{ data.studyBeginDate }}{{ data.studyEndDate }}</span>
</div>
<div class="item-info">
<span class="info-label">学习状态</span>
<span class="info-value">{{ $dict.getLabel('partyStudyStatus', data.studyStatus) }}</span>
</div>
<div class="item-info" v-if="data.studyStatus == 1">
<span class="info-label">完成时间</span>
<span class="info-value">{{ data.finishDate || '-' }}</span>
</div>
</div>
<!-- <div class="page-title">学习内容</div> -->
<u-parse :html="data.content" class="content" v-if="data.content"></u-parse>
<AiTransSpeech :src="data.speech"/>
</div>
<div class="btn-box" @click="toContent()">
<span class="active">学习心得</span>
</div>
</div>
</template>
<script>
export default {
data() {
return {
id: '',
data: {},
};
},
onLoad(options) {
this.$dict.load('partyStudyStatus', 'partyStudyType')
this.id = options.id
this.getDetailInfo()
},
onShow() {
this.getDetailInfo()
},
methods: {
toContent() {
uni.navigateTo({url: `./AppPartyStudy?id=${this.id}`})
},
getDetailInfo() {
this.$instance.post(`/app/apppartystudy/queryDetailByIdWeChat?id=${this.id}`, null, {}).then(res => {
if (res.data) {
if (res.data.files && res.data.files.length) {
res.data.files.map(item => {
var size = item.size / 1024;
item.fileSize = size.toFixed(0);
return item
})
}
this.data = res.data
}
})
},
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
background-color: #fff;
.detail-content {
padding-bottom: 140px;
}
.content {
padding: 20px;
background-color: #fff;
}
.detail-info {
padding: 16px 32px 8px 32px;
border-bottom: 2px solid #D8DDE6;
background-color: #D7261E;
padding-bottom: 80px;
position: relative;
.info-title {
line-height: 64px;
font-size: 40px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
word-break: break-all;
margin-bottom: 16px;
}
.item-info {
line-height: 48px;
font-size: 30px;
margin-bottom: 8px;
.info-label {
display: inline-block;
color: #fff;
vertical-align: top;
}
.info-value {
display: inline-block;
width: 510px;
word-break: break-all;
color: #FFE8E8;
}
.item-status0 {
color: #FF9B2B;
}
.item-status1 {
color: #2EA222;
}
.item-status2 {
color: #343D65;
}
.item-status3 {
color: #5A98F2;
}
.item-status4 {
color: #f46;
}
}
.retract-btn {
line-height: 80px;
text-align: center;
font-size: 28px;
color: #fff;
position: absolute;
bottom: 0;
width: 690px;
.down-icon {
width: 32px;
height: 32px;
margin-left: 4px;
vertical-align: middle;
transition: all .3s ease-in-out;
}
.icon-active {
transform: rotate(180deg);
}
}
}
.page-title {
line-height: 96px;
color: #333;
font-size: 32px;
padding-left: 32px;
background-color: #fff;
span {
font-size: 28px;
}
}
.info-content {
padding: 16px 32px;
background-color: #fff;
line-height: 48px;
color: #333;
font-size: 32px;
box-sizing: border-box;
}
.user-list {
background-color: #fff;
.user-item {
height: 112px;
padding-top: 16px;
box-sizing: border-box;
.user-bg {
display: inline-block;
width: 80px;
height: 80px;
background-color: #4E8EEE;
color: #fff;
text-align: center;
line-height: 80px;
margin: 0 16px 0 32px;
font-size: 28px;
border-radius: 50%;
vertical-align: top;
}
.user-info {
display: inline-block;
width: 622px;
height: 96px;
border-bottom: 2px solid #D8DDE6;
box-sizing: border-box;
.user-name {
line-height: 44px;
color: #333;
font-size: 32px;
}
.user-unit {
line-height: 34px;
color: #999;
font-size: 24px;
}
}
}
.user-item:nth-last-of-type(1) {
.user-info {
border-bottom: 0;
}
}
}
.mar-b8 {
margin-bottom: 16px;
}
.color-1365DD {
color: #1365DD;
}
.color-999999 {
color: #999999;
}
.pad-l7 {
padding-left: 14px;
}
.attachment {
width: 100%;
padding: 32px;
box-sizing: border-box;
background-color: #FFFFFF;
margin-top: 16px;
.attachment-title {
font-size: 32px;
color: #333333;
font-weight: 500;
image {
width: 48px;
height: 48px;
vertical-align: middle;
}
}
.attachment-item {
border: 1px solid rgba(204, 204, 204, 1);
padding: 16px;
box-sizing: border-box;
margin-top: 34px;
display: flex;
flex-direction: row;
justify-content: space-between;
border-radius: 8px;
.file-name {
justify-content: flex-start;
align-items: center;
image {
width: 96px;
height: 96px;
vertical-align: middle;
}
.title {
color: #333333;
font-size: 32px;
word-break: break-all;
flex: 1;
}
}
.size {
color: #999;
font-size: 28px;
display: flex;
justify-content: cemter;
align-items: center;
}
}
}
.btn-box {
position: fixed;
display: flex;
bottom: 0;
height: 112px;
line-height: 112px;
width: 100%;
color: #333;
background-color: #fff;
font-size: 36px;
span {
flex: 1;
text-align: center;
}
.active {
background-color: #D7261E;
color: #fff;
}
}
}
.partyStudyContent {
width: 100%;
height: calc(100% - 184px);
padding: 32px;
box-sizing: border-box;
color: #666;
font-size: 32px;
background-color: #fff;
word-break: break-all;
}
</style>

View File

@@ -0,0 +1,576 @@
<template>
<div class="page">
<div v-if="isShow" style="height:100%;">
<div class="fixed-top" style="width:100%;">
<!-- 头部搜索样式 -->
<div class="search-box">
<div class="search-input flex-row" @click="changeSearchBox">
<image src="https://cdn.cunwuyun.cn/img/search-red.svg"></image>
<span>{{ inputValue }}</span>
</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="array" range-key="dictName">
<div class="uni-input">{{ meetTypespan }}</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 mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange"
fields='month'>
<div class="uni-input">{{ day }}</div>
<image src="https://cdn.cunwuyun.cn/img/down.svg"></image>
</picker>
</div>
</div>
</div>
</div>
</div>
<div class="session-list">
<div class="session-item" v-for="(item, index) in meetList" :key="index">
<div class="item-top" @click="toSessionDetail(item.meetingId, item.status)">
<div class="item-title mar-b12">{{ item.meetingAgenda }}</div>
<div class="item-info">
<span class="info-label">会议状态</span>
<span :class="'item-status'+item.postStatus" class="info-value">
{{ $dict.getLabel('postStatus', item.postStatus) }}
</span>
</div>
<div class="item-info">
<span class="info-label">开始时间</span>
<span class="info-value">{{ item.startTime || '-' }}</span>
</div>
<div class="item-info">
<span class="info-label">会议地点</span>
<span class="info-value">{{ item.meetingAddress || '-' }}</span>
</div>
<div class="item-info">
<span class="info-label">主持人员</span>
<span class="info-value">{{ item.hostName || '-' }}</span>
</div>
<div class="item-info mar-b12">
<span class="info-label">会议类型</span>
<span class="info-value">{{ item.meetingClassification || '-' }}</span>
</div>
</div>
<div class="item-bottom">
<span class="item-btn border-E1E1E1" v-if="item.status == 3">已请假</span>
<span class="item-btn border-1365DD" v-if="item.status == 0 && item.isSignEnd"
@click="signMeeting(item.meetingId)">签到</span>
<span class="item-btn border-E1E1E1" v-if="item.status == 1">已签到</span>
<!-- <span class="item-btn border-E1E1E1" v-if="item.status == 4">不签到</span> -->
</div>
<div class="item-status" :class="'item-status'+item.postStatus">
{{ $dict.getLabel('postStatus', item.postStatus) }}
</div>
</div>
</div>
<AiEmpty v-if="meetList.length == 0"/>
</div>
<div v-if="!isShow" class="search-input">
<div class="input-box flex-row">
<input class="input" placeholder="请输入会议标题" focus="false" v-model="searchValue" @blur="onBlur"/>
<image class="sousuo" src="https://cdn.cunwuyun.cn/img/search-active.svg"></image>
<image v-if="searchValue" @tap="clearInput" class="clear"
src="https://cdn.cunwuyun.cn/img/empty-Input.svg"></image>
<div class="search-word" @click="search">搜索</div>
</div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
appName: "三会一课",
data() {
const currentDate = this.getDate({
format: true
})
return {
inputValue: "请输入会议标题",
isShow: true,
array: [],
meetType: "",
meetTypespan: "会议类型",
index: 0,
date: currentDate,
day: "会议时间",
createDate: "",//创建时间
meetList: [],
searchValue: "",//搜索框输入值
pageNum: 1,
pageSize: 10,
pages: 2,
userId: '',
partyId: '',
meetTypeIndex: '',
};
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
},
...mapState(['user']),
},
onLoad() {
this.partyId = this.user.id
this.$dict.load('postStatus', 'meetingClassification').then(() => {
this.array = this.$dict.getDict('meetingClassification')
this.getList()
})
uni.$on('updateList', () => {
this.pageNum = 1;
this.pages = 2;
this.getList()
})
},
methods: {
signMeeting(id) {
this.$instance.post(`/app/appthreemeetinguser/signByMeetingIdAndUserIdForWX?meetingId=${id}&userId=${this.user.partyId}`, null, {}).then(res => {
if (res.code == 0) {
this.$toast('签到成功')
this.pageNum = 1;
this.pages = 2;
this.getList()
}
}).catch(err => {
uni.showToast({
icon: 'none',
title: err,
duration: 2000
});
})
},
btnClick(span) {
uni.showToast({
icon: 'none',
title: span,
duration: 2000
});
},
bindPickerChange(e) {
this.array.map((item, index) => {
if (e.detail.value == item.dictValue) {
this.meetTypespan = this.array[index].dictName
}
})
this.meetTypeIndex = e.detail.value
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList()
},
bindDateChange: function (e) {
this.day = e.target.value;
this.createDate = e.target.value + '-' + "01"
this.pageNum = 1;
this.pages = 2;
this.pageSize = 10;
this.getList()
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-08 00:00:00 `;
},
changeSearchBox() {
this.isShow = false;
},
onBlur(e) {
this.searchValue = e.target.value;
if (this.searchValue) {
this.inputValue = this.searchValue;
} else {
this.inputValue = "请输入会议标题";
}
},
search() {
this.isShow = true;
this.pageNum = 1;
this.pageSize = 10;
this.pages = 2;
this.getList()
},
clearInput() {
this.searchValue = ''
this.inputValue = "请输入会议标题";
},
getList() {
if (this.pageNum > this.pages) return
// var searchYMD = ''
// if(this.createDate) {
// searchYMD = this.createDate + '-01'
// }
this.$instance.post(`/app/appthreemeetinguser/listForWX?meetingUserId=${this.user.partyId}&meetingAgenda=${this.searchValue}&meetingClassification=${this.meetTypeIndex}&searchYMD=${this.createDate}&current=${this.pageNum}&size=${this.pageSize}`
).then(res => {
if (res.code == 0) {
const meetList = this.pageNum > 1 ? [...this.meetList, ...res.data.records] : res.data.records
meetList.map(item => {
if (item.meetingAfter) {
var dEnd = new Date(item.startTime.replaceAll('-', '/'));
item.isSignEnd = new Date(dEnd.getTime() + (Number(item.meetingAfter)) * 60000).getTime() > new Date().getTime()
}
if (item.meetingClassification.length == 1) {
item.meetingClassification = this.$dict.getLabel('meetingClassification', item.meetingClassification)
} else {
var typeList = item.meetingClassification.split(',')
typeList.map((items, index) => {
if (index == 0) {
item.meetingClassification = this.$dict.getLabel('meetingClassification', items)
} else {
item.meetingClassification = item.meetingClassification + ',' + this.$dict.getLabel('meetingClassification', items)
}
return item.meetingClassification
})
return item.meetingClassification
}
return item
})
this.pages = Math.ceil(res.data.total / 10)
this.meetList = meetList
}
})
},
toSessionDetail(id, signStatus) {
uni.navigateTo({
url: `./threeSessionsDetail?id=${id}&signStatus=${signStatus}&token=${uni.getStorageSync("token")}`
})
},
leave() {
uni.showModal({
title: '如需请假,请联系签到负责人',
confirmspan: "确认",
confirmColor: "#135AB8",
success: function (res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
});
},
changeStatus(id, signStatus, joinStatus, signMethod, absence, meetingUserId, meetingId, successspan) {
let signTime = new Date().getFullYear() + '-' + this.isDate(new Date().getMonth() + 1) + '-' + this.isDate(new Date().getDate()) + ' ' + this.isDate(new Date().getHours()) + ':' + this.isDate(new Date().getMinutes()) + ':' + this.isDate(new Date().getSeconds())
var params = {
id,
signStatus,
joinStatus,
signMethod,
absence,
signUserId: this.user.id,
signUserName: this.user.realName,
signTime,
meetingUserId,
meetingId
}
this.$instance.post(`/app/appthreemeetinguser/addOrUpdate`, null, {
data: params
}).then(res => {
if (res?.code == 0) {
uni.showToast({
title: successspan + '成功!',
duration: 2000
});
this.pageNum = 1;
this.pages = 2;
this.getList()
}
})
},
isDate(num) {
if (num < 10) {
num = '0' + num
}
return num
},
},
onReachBottom() {
this.pageNum = this.pageNum + 1
this.getList()
}
};
</script>
<style lang="scss" scope>
.page {
.fixed-top {
z-index: 9999;
}
.search-box {
width: 100%;
height: 112px;
background-color: #D7261E;
padding: 24px 32px;
box-sizing: border-box;
.search-input {
display: flex;
align-items: center;
line-height: 64px;
width: 100%;
height: 100%;
background: #CE0010;
border-radius: 32px;
color: #F0CBCD;
font-size: 26px;
image {
width: 34px;
height: 34px;
margin: 8px 8px 8px 24px;
}
}
}
.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;
}
}
.search-input {
.input-box {
width: 100%;
height: 112px;
background-color: #fff;
padding: 24px 32px;
box-sizing: border-box;
position: relative;
.sousuo {
position: absolute;
top: 50%;
left: 60px;
width: 34px;
height: 34px;
transform: translateY(-50%);
}
.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;
}
}
}
.session-list {
padding-top: 224px;
.session-item {
width: 686px;
margin: 0 auto 32px auto;
background-color: #fff;
// height:462px; position: relative;
overflow: hidden;
.item-top {
padding: 32px 32px 0 32px;
}
.item-title {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
word-break: break-all;
}
.item-info {
line-height: 42px;
font-size: 28px;
margin-bottom: 8px;
.info-label {
display: inline-block;
color: #999;
width: 200px;
}
.info-value {
display: inline-block;
width: calc(100% - 200px);
vertical-align: top;
word-break: break-all;
}
}
.item-bottom {
border-top: 2px solid #EEE;
text-align: right;
padding-right: 64px;
box-sizing: border-box;
line-height: 96px;
.item-btn {
display: inline-block;
width: 152px;
height: 52px;
line-height: 52px;
border-radius: 28px;
text-align: center;
font-size: 28px;
margin-left: 32px;
border: 2px solid #E1E1E1;
}
}
.info-value {
color: #343D65;
background-color: #fff !important;
}
.item-status {
position: absolute;
top: 14px;
right: -36px;
width: 140px;
text-align: center;
line-height: 44px;
font-size: 24px;
transform: rotate(45deg);
}
.item-status1 {
color: #FF9B2B;
background-color: #FFF3E8;
}
.item-status0 {
color: #2EA222;
background-color: #EAF5E8;
}
.item-status3 {
color: #999;
background-color: #F2F2F2;
}
.item-status2 {
color: #5A98F2;
background-color: #F1F6FF;
}
.color-1365DD {
color: #1365DD;
}
.color-FF4466 {
color: #FF4466;
}
.color-333333 {
color: #333;
}
.color-606060 {
color: #606060;
}
.border-1365DD {
border-color: #1365DD !important;
color: #1365DD !important;
}
.border-E1E1E1 {
border-color: #E1E1E1 !important;
color: #606060;
}
.border-E1E1E1 {
border-color: #E1E1E1 !important;
}
.mar-b12 {
margin-bottom: 26px !important;
}
}
}
.no-affairs {
width: 100%;
height: calc(100% - 210px);
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@@ -0,0 +1,209 @@
<template>
<div class="page">
<!-- <span class="close-img" @click="closePage()">×</span> -->
<image src="https://cdn.cunwuyun.cn/img/qrcode-sign-img.png" class="banner-img"></image>
<div class="btn" @click="btnClick()">{{ btnspan }}</div>
<div class="mask" v-if="showFail">
<div class="mask-content">
<image src="https://cdn.cunwuyun.cn/img/qrcode-sign-fail.png" class="fail-img"></image>
<div class="mask-span">签到失败请重新签到</div>
<div class="mask-btn" @click="btnClick()">确认签到</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
showFail: false,
meetingId: '',
btnspan: '',
scene: '',
userId: '',
isSign: true
};
},
onShow() {
if (uni.getStorageSync('token')) {
this.meetingId = this.$mp.query.scene
// this.meetingId = 'c29aacb54f074c14ab93532e384a6daa'
this.getUserInfo()
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录!',
confirmspan: "去登录",
showCancel: false,
success(res) {
if (res.confirm) {
wx.switchTab({
url: '../mine/mine',
})
}
}
})
}
},
methods: {
getUserInfo() {
this.$store.commit("getUserInfo", v => {
if (v) {
this.userId = res.data.id
this.getDetailInfo()
}
})
},
getDetailInfo() {
this.$instance.post(`/app/appthreemeetinguser/queryWeathersignByMeetingIdAndUserIdForWX?meetingId=${this.meetingId}&userId=${this.userId}`, null, {}).then(res => {
if (res.data) {
this.isSign = true
// if(res.data.status == 1) { //已签到
// this.btnspan = '已签到'
// }
if (res.data.status == 0) { //未签
this.btnspan = '确认签到'
} else {
this.btnspan = '已签到'
}
} else {
this.btnspan = '确认签到'
this.isSign = false //不是参会人员
}
}).catch(err => {
uni.showToast({
icon: 'none',
title: err,
duration: 2000
});
})
},
btnClick() {
// if(!this.isSign) {
// uni.showToast({
// icon: 'none',
// title: '您不是参会人员',
// duration: 2000
// });
// return
// }
if (this.btnspan == '已签到') {
uni.showToast({
icon: 'none',
title: '已签到',
duration: 2000
});
return
}
this.$instance.post(`/app/appthreemeetinguser/signByMeetingIdAndUserIdForWX?meetingId=${this.meetingId}&userId=${this.userId}`, null, {}).then(res => {
if (res.code == 0) {
this.btnspan = '已签到'
uni.showToast({
title: '签到成功',
duration: 2000
});
} else {
this.showFail = true
}
}).catch(err => {
uni.showToast({
icon: 'none',
title: err,
duration: 2000
});
})
},
closePage() {
uni.reLaunch({
url: "../home/portal"
})
}
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
background-color: #FFFFFF;
position: relative;
.close-img {
position: absolute;
font-size: 50px;
left: 32px;
}
.banner-img {
width: 514px;
height: 340px;
margin: 48px 0 118px 96px;
}
.btn {
width: 622px;
line-height: 96px;
text-align: center;
background: rgba(19, 90, 184, 1);
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
border-radius: 8px;
margin: 0 auto;
color: #fff;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .3);
.mask-content {
width: 686px;
height: 640px;
background: #fff;
border-radius: 8px;
border: 2px solid rgba(151, 151, 151, 1);
margin: 260px auto 0;
.fail-img {
width: 160px;
height: 160px;
margin: 112px 0 32px 264px;
}
.mask-span {
width: 100%;
line-height: 50px;
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: rgba(51, 51, 51, 1);
text-align: center;
margin-bottom: 134px;
}
.mask-btn {
width: 560px;
line-height: 96px;
text-align: center;
background: rgba(19, 90, 184, 1);
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
border-radius: 8px;
margin: 0 auto;
color: #fff;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
}
}
}
</style>

View File

@@ -0,0 +1,460 @@
<template>
<div class="page">
<header></header>
<div class="form">
<div class="main">
<div class="textarea">
<div class="color-666"><span class="color-red">*</span>会议内容</div>
<textarea
type="textarea"
placeholder="请输入会议内容3000字以内"
v-model="baseInfo.content"
adjust-position="false"
maxlength="3000"
></textarea>
</div>
<div class="uni-uploader">
<div class="title-box title-box-margin">
<span class="title color-666">图片资料最多9张</span>
</div>
<div class="uni-uploader-body">
<div class="uni-uploader__files">
<block v-for="(image, index) in imageList" :key="index">
<div class="uni-uploader__file">
<image
class="uni-uploader__img"
:src="image.accessUrl"
:data-index="index"
@tap="previewImage"
></image>
<AiUniIcon
type="clear"
class="icon"
color="#8f8f94"
size="26"
@click="deleteImage(index)"
></AiUniIcon>
</div>
</block>
<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 {mapState} from 'vuex'
export default {
name: "fillLog",
data() {
return {
reportId: "",
baseInfo: {
content: "",
fileIds: [],
reportId: "",
id: "",
images: [],
meetingId: "",
createUserName: "",
},
imageList: [],
sourceTypeIndex: 2,
sourceType: [
// 图片来源类型
["camera"],
["album"],
],
};
},
computed: {
...mapState(['user']),
},
onLoad(options) {
this.baseInfo.meetingId = options.id;
this.getDetailInfo();
},
methods: {
getDetailInfo() {
this.$instance.post(`/app/appthreemeetinginfoexpand/queryDetailById?id=${this.baseInfo.meetingId}`).then((res) => {
if (res.data) {
if (res.data.images != null) {
this.imageList = JSON.parse(res.data.images);
}
this.baseInfo = {...res.data};
}
})
.catch((err) => {
});
},
// 选择照片类型
chooseImageType() {
let that = this;
uni.showActionSheet({
itemList: ["拍照", "从相册选择"],
success: function (res) {
// console.log(res.tapIndex)
that.sourceTypeIndex = res.tapIndex;
// console.log(that.sourceTypeIndex)
that.chooseImage();
},
});
},
showModel(title) {
uni.showModal({
title: "温馨提示",
content: title,
showCancel: false,
confirmColor: "#135AB8",
success(res) {
if (res.confirm) {
}
},
});
},
chooseImage: async function () {
let that = this;
if (that.imageList.length === 9) {
let isContinue = await that.isFullImg();
// console.log("是否继续?", isContinue);
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 否 接口调用结束的回调函数(调用成功、失败都会执行)
uni.uploadFile({
url: this.$instance.baseURL + "/admin/file/add",
filePath: that.tempFilePaths[i],
name: "file",
// formData:params,
header: {
"Content-Type": "multipart/form-data",
access_token: token,
Authorization: token,
},
success(res) {
// console.log('uploader',res)
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);
// console.log('imageList-upload',that.imageList)
},
fail(res) {
console.log("error", res);
},
});
}
},
});
},
// 预览图片(大图预览)
previewImage: function (e) {
let that = this;
// console.log('预览',e)
var current = e.target.dataset.index;
// console.log(current)
var tempList = [];
for (var i in that.imageList) {
tempList.push(that.imageList[i].accessUrl);
}
uni.previewImage({
// 当前图片的索引、链接
current: tempList[current],
urls: tempList,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {
// console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
},
fail: function (err) {
// console.log(err.errMsg);
},
},
});
},
// 删除照片
deleteImage(index) {
this.imageList.splice(index, 1);
},
report() {
if (!this.baseInfo.content) {
uni.showToast({title: "会议内容不能为空", icon: "none"});
return false;
}
this.baseInfo.fileIds = [];
this.imageList.forEach((e) => {
this.baseInfo.fileIds.push(e.fileId);
});
this.baseInfo.images = JSON.stringify(this.imageList);
this.baseInfo.createUserName = this.user.realName;
this.$instance
.post(`/app/appthreemeetinginfoexpand/addOrUpdate`, this.baseInfo, null)
.then((res) => {
if (res.code == 0) {
uni.showToast({
title: "会议纪要提交成功",
icon: "none",
duration: 2000,
});
setTimeout(() => {
uni.navigateBack({
delta: 2,
});
}, 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%;
font-size: 32px;
header {
width: 100%;
height: 112px;
background-color: #D7261E;
}
.form {
width: 100%;
padding: 32px;
box-sizing: border-box;
margin-top: -100px;
.main {
background-color: #fff;
border-radius: 8px;
padding: 16px;
box-sizing: border-box;
}
.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;
}
}
/* 上传照片 */
.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: 16px;
}
.uni-uploader__files {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.uni-uploader__file {
margin-right: 10px;
margin-bottom: 20px;
width: 160px;
height: 160px;
position: relative;
}
.uni-uploader__img {
display: block;
width: 160px;
height: 160px;
}
.pre-label {
font-size: 80px;
color: #dddddd;
}
.add-image {
color: #dddddd;
font-size: 24px;
}
.pre-div {
width: 160px;
height: 160px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
border-radius: 8px;
border: 2px solid #dddddd;
}
.icon {
position: absolute;
top: -15px;
right: -10px;
}
}
.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

@@ -0,0 +1,528 @@
<template>
<div class="page">
<div class="detail-info">
<div class="info-title">{{ data.meetingAgenda }}</div>
<div class="item-info">
<span class="info-label">会议状态</span>
<span class="info-value">{{ $dict.getLabel('postStatus', data.postStatus) }}</span>
</div>
<div class="item-info">
<span class="info-label">举办方式</span>
<span class="info-value">{{ data.isOnline == 1 ? '线上会议' : '线下会议' }}</span>
</div>
<div class="item-info">
<span class="info-label">会议分类</span>
<span class="info-value" v-if="data.meetingClassification && data.meetingClassification.length">
<span v-for="(item, index) in data.meetingClassification" :key="index">
{{ $dict.getLabel('meetingClassification', item) }}
<span v-if="index < data.meetingClassification.length - 1">,</span>
</span>
</span>
<span class="info-value" v-else>-</span>
</div>
<div class="item-info" v-if="showAll">
<span class="info-label">会议时间</span>
<span class="info-value">{{ data.startTime || '-' }}</span>
</div>
<div class="item-info" v-if="showAll">
<span class="info-label">签到时间</span>
<div class="info-value">
<i v-if="data.signMethod == 1 && signStart">{{ signStart }}</i>
<i class="sign-end" v-if="data.signMethod == 1 && signEnd"> {{ signEnd }}</i>
<i v-if="data.signMethod != 1">-</i>
</div>
</div>
<div class="item-info" v-if="showAll">
<span class="info-label">会议地点</span>
<span class="info-value">{{ data.meetingAddress || '-' }}</span>
</div>
<!-- <div class="item-info" v-if="showAll">
<span class="info-label">会议主题</span>
<span class="info-value" v-if="data.topicClassification && data.topicClassification.length">
<span v-for="(item, index) in data.topicClassification" :key="index">
{{ $dict.getLabel('topicClassification', item) }}
<span v-if="index < data.topicClassification.length - 1">,</span>
</span>
</span>
<span class="info-value" v-else>-</span>
</div> -->
<div class="item-info" v-if="showAll">
<span class="info-label">主持人员</span>
<span class="info-value">{{ data.hostName || '-' }}</span>
</div>
<div class="item-info" v-if="showAll">
<span class="info-label">发布人员</span>
<span class="info-value">{{ data.createUserName || '-' }}</span>
</div>
<div class="item-info" v-if="showAll">
<span class="info-label">签到人员</span>
<span class="info-value" v-if="data.chargeOfSignInList && data.chargeOfSignInList.length">
<span v-for="(item, index) in data.chargeOfSignInList" :key="index">
{{ item.userName }}
<span v-if="index < data.chargeOfSignInList.length - 1">,</span>
</span>
</span>
<span class="info-value" v-else>-</span>
</div>
<div class="item-info" v-if="showAll">
<span class="info-label">记录人员</span>
<span class="info-value">{{ data.recorderName || '-' }}</span>
</div>
<div class="retract-btn" @click="divAll()">
<span>{{ btnspan }}</span>
<image src="https://cdn.cunwuyun.cn/img/down-icon-fff.png"
:class="btnspan == '收起' ? 'down-icon icon-active' : 'down-icon'"></image>
</div>
</div>
<div class="page-title">会议内容</div>
<div class="info-content mar-b8" v-html="data.meetingDescription"></div>
<div class="page-title mar-b8" @click="toSessionUser">参会情况
<span class="pad-l7" v-for="(item, index) in titleList" :key="index">
<span class="color-999999">{{ item.label }}</span>
<span class="color-1365DD">({{ item.value }})</span>
</span>
<img src="https://cdn.cunwuyun.cn/img/down.svg" class="right-icon">
</div>
<div class="user-list">
<div class="user-item" v-for="(item, index) in data.appThreeMeetingUserList" :key="index"
v-if="item.meetingUserRole == 0 || item.meetingUserRole == 3">
<div class="user-bg">{{ formatName(item.meetingUserName) }}</div>
<div class="user-info">
<div class="user-name">{{ item.meetingUserName }}</div>
</div>
</div>
</div>
<div class="btn-bottom" v-if="signStatus < 1 || data.isOnline == 1">
<div class="btn" @click="signMeeting" v-if="data.isOnline != 1 && isSignEnd">签到</div>
<div class="btn" @click="isWeiXin" v-if="data.isOnline == 1">进入直播间</div>
</div>
<div class="mask" v-if="showMask" @click="showMask=false">
<img src="https://cdn.cunwuyun.cn/guangdong/h5/mask-text.png" alt="" class="text-img">
</div>
<img src="https://cdn.cunwuyun.cn/guangdong/h5/vote-img.png" alt="" class="vote-img" v-if="data.isVote == 1"
@click="toVote">
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data() {
return {
titleList: [
{label: '参与', value: '0'},
{label: '已到', value: '0'},
{label: '未到', value: '0'},
// {label: '请假', value: '0'}
],
id: '',
data: {},
btnspan: '展开',
showAll: false,
partyId: '',
signStart: '',
signEnd: '',
signStatus: '', //0表示显示签到
showMask: false,
isSignEnd: false
};
},
computed: {
...mapState(['user']),
},
onLoad(options) {
if (!uni.getStorageSync("token")) {
uni.setStorageSync("token", options.token)
}
this.$dict.load('postStatus', 'meetingClassification', 'topicClassification').then(() => {
this.id = options.id
this.signStatus = options.signStatus
this.getDetailInfo()
})
},
methods: {
isWeiXin() {
uni.navigateTo({url: `./ylinkMeetingRoom?meetingNum=${this.data.onlineNum}&pwd=${this.data.onlinePwd}`})
},
copy() {
var token = uni.getStorageSync('token')
uni.setClipboardData({data: `https://gdpartyh5.cunwuyun.cn/pages/party/threeSessions/threeSessionsDetail?id=${this.id}&signStatus=${this.signStatus}&token=${token}`});
},
signMeeting() {
this.$instance.post(`/app/appthreemeetinguser/signByMeetingIdAndUserIdForWX?meetingId=${this.data.id}&userId=${this.user.partyId}`, null, {}).then(res => {
if (res.code == 0) {
this.$toast('签到成功')
this.getDetailInfo()
this.signStatus = 1
uni.$emit('updateList')
}
}).catch(err => {
uni.showToast({
icon: 'none',
title: err,
duration: 2000
});
})
},
toContent() {
uni.navigateTo({
url: './threeSessionsContent?id=' + this.id
})
},
toSessionUser() {
uni.navigateTo({
url: './threeSessionsUser?id=' + this.id
})
},
getDetailInfo() {
this.$loading()
this.$instance.post(`/app/appthreemeetinginfo/queryDetailById?id=${this.id}`, null, {}).then(res => {
if (res.data) {
var data = res.data
if (data.startTime && data.meetingBefore) {
var dStart = new Date(data.startTime.replaceAll('-', '/'));
var timeStart = dStart.getTime();
var minStart = (Number(data.meetingBefore)) * 60000
var totalStart = timeStart - minStart;
this.signStart = this.countTime(totalStart);
}
if (data.startTime && data.meetingAfter) {
var dEnd = new Date(data.startTime.replaceAll('-', '/'));
var timeEnd = dEnd.getTime();
var minEnd = (Number(data.meetingAfter)) * 60000
var totalEnd = timeEnd + minEnd;
this.signEnd = this.countTime(totalEnd);
this.isSignEnd = new Date(dEnd.getTime() + minEnd).getTime() > new Date().getTime()
}
data.meetingClassification = data.meetingClassification.split(',')
this.titleList[0].value = data.participantList.length || '0'
if (data.isArriveLIst) {
this.titleList[1].value = data.isArriveLIst.length
}
if (data.isArriveLIst) {
this.titleList[2].value = data.notArriveLIst.length
}
// if (data.isArriveLIst) {
// this.titleList[3].value = data.leaveLIst.length
// }
this.data = data
// var methodsObj = data.reminderMethod
// this.objInit(methodsObj, 'reminderMethod')
// var meetingClassificationObj = data.meetingClassification
// this.objInit(meetingClassificationObj, 'meetingClassification')
// var topicClassificationObj = data.topicClassification
// this.objInit(topicClassificationObj, 'topicClassification')
this.$hideLoading()
}
})
},
objInit(obj, name) {
this.data[name] = []
for (let i in obj) {
if (obj[i] !== '') {
this.data[name].push(obj[i])
}
}
},
//会议签到时间计算
countTime(total) {
var now = new Date(total)
var y = now.getFullYear();
var m = now.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var da = now.getDate();
da = da < 10 ? ('0' + da) : da;
var h = now.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = now.getMinutes();
minute = minute < 10 ? ('0' + minute) : minute;
var seconds = now.getSeconds();
seconds = seconds < 10 ? ('0' + seconds) : seconds;
var resDate = y + '-' + m + '-' + da + ' ' + h + ':' + minute + ":" + seconds;
resDate = resDate.substring(0, 16)
return resDate;
},
formatName(name) {
if (name == undefined) {
return
}
return name.substr(name.length - 2, name.length > 2 ? (name.length - 1) : name.length)
},
divAll() {
if (this.btnspan == '展开') {
this.btnspan = '收起'
this.showAll = true
} else {
this.btnspan = '展开'
this.showAll = false
}
},
toVote() {
var myVote = ''
if (this.data.myVote) {
myVote = this.data.myVote
}
uni.navigateTo({
url: `./vote?id=${this.id}`
})
}
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
width: 100%;
overflow-x: hidden;
background-color: #F4F6F8;
.mask {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .8);
position: fixed;
top: 0;
left: 0;
z-index: 999;
.cancel-img {
width: 219px;
height: 94px;
margin: 580px 0 166px 266px;
}
.text-img {
position: absolute;
top: 0;
right: 0;
width: 90%;
}
.btn {
width: 50%;
line-height: 112px;
background: #D7261E;
color: #fff;
font-size: 32px;
text-align: center;
position: absolute;
bottom: 0;
right: 0;
}
}
.right-icon {
width: 32px;
height: 32px;
float: right;
vertical-align: middle;
transform: rotate(270deg);
padding: 0 72px 0 0;
}
.vote-img {
width: 140px;
height: 140px;
position: fixed;
bottom: 344px;
right: 48px;
}
.sign-end {
padding-left: 150px;
}
.btn-bottom {
position: fixed;
bottom: 0;
left: 0;
z-index: 9;
width: 100%;
display: flex;
.btn {
flex: 1;
line-height: 112px;
background: #D7261E;
color: #fff;
font-size: 32px;
text-align: center;
}
.sign {
background-color: #fff;
color: #666;
}
}
.detail-info {
padding: 16px 0 8px 32px;
border-bottom: 2px solid #D8DDE6;
background-color: #D7261E;
padding-bottom: 80px;
position: relative;
.info-title {
line-height: 64px;
font-size: 40px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
word-break: break-all;
margin-bottom: 16px;
}
.item-info {
display: flex;
line-height: 48px;
font-size: 28px;
margin-bottom: 8px;
.info-label {
color: #fff;
}
div {
display: flex;
align-items: center;
}
.info-value {
flex: 1;
color: #FFE8E8;
}
.item-status0 {
color: #FF9B2B;
}
.item-status1 {
color: #2EA222;
}
.item-status2 {
color: #343D65;
}
.item-status3 {
color: #5A98F2;
}
.item-status4 {
color: #f46;
}
}
.retract-btn {
line-height: 80px;
text-align: center;
font-size: 28px;
color: #fff;
position: absolute;
bottom: 0;
width: 690px;
.down-icon {
width: 32px;
height: 32px;
margin-left: 4px;
vertical-align: middle;
transition: all .3s ease-in-out;
}
.icon-active {
transform: rotate(180deg);
}
}
}
.page-title {
line-height: 96px;
color: #333;
font-size: 32px;
padding-left: 32px;
background-color: #fff;
span {
font-size: 28px;
}
}
.info-content {
padding: 16px 32px;
background-color: #fff;
line-height: 48px;
color: #333;
font-size: 32px;
box-sizing: border-box;
}
.user-list {
padding-bottom: 140px;
.user-item {
background-color: #fff;
height: 112px;
padding-top: 16px;
box-sizing: border-box;
.user-bg {
display: inline-block;
width: 80px;
height: 80px;
background-color: #4E8EEE;
color: #fff;
text-align: center;
line-height: 80px;
margin: 0 16px 0 32px;
font-size: 28px;
border-radius: 50%;
vertical-align: top;
}
.user-info {
display: inline-block;
width: 622px;
height: 96px;
border-bottom: 2px solid #D8DDE6;
box-sizing: border-box;
.user-name {
line-height: 44px;
color: #333;
font-size: 32px;
margin-top: 16px;
}
}
}
.user-item:nth-last-of-type(1) {
.user-info {
border-bottom: 0;
}
}
}
.mar-b8 {
margin-bottom: 16px;
}
.color-1365DD {
color: #1365DD;
}
.color-999999 {
color: #999999;
}
.pad-l7 {
padding-left: 14px;
}
}
</style>

View File

@@ -0,0 +1,201 @@
<template>
<div class="page">
<div class="tab-list">
<div
class="tab-item"
v-for="(item, index) in tabList"
:key="index"
:class="tabIndex == index ? 'tab-active' : ''"
@click="tabClick(index)"
>
{{ item.label }}({{ item.value }})
<span class="line"></span>
</div>
</div>
<div
class="user-list"
v-for="(item, index) in list"
:key="index"
v-if="tabIndex != 0"
>
<div class="user-item">
<div class="user-bg">{{ formatName(item.meetingUserName) }}</div>
<div class="user-info">
<div class="user-name">{{ item.meetingUserName }}</div>
</div>
</div>
</div>
<div
class="user-list"
v-for="(item, index) in list"
:key="index"
v-if="tabIndex == 0"
>
<div
class="user-item"
v-if="item.meetingUserRole == 0 || item.meetingUserRole == 3"
>
<div class="user-bg">{{ formatName(item.meetingUserName) }}</div>
<div class="user-info">
<div class="user-name">{{ item.meetingUserName }}</div>
</div>
</div>
</div>
<AiEmpty v-if="list.length == 0 || list == null"/>
</div>
</template>
<script>
export default {
data() {
return {
tabList: [
{label: "参与", value: "0"},
{label: "已到", value: "0"},
{label: "未到", value: "0"},
// { label: "请假", value: "0" },
],
tabIndex: 0,
id: "",
data: {},
list: [],
};
},
onLoad(options) {
this.id = options.id;
this.getDetailInfo();
},
methods: {
tabClick(index) {
this.tabIndex = index;
if (index == 0) {
this.list = this.data.appThreeMeetingUserList;
}
if (index == 1) {
this.list = this.data.isArriveLIst;
}
if (index == 2) {
this.list = this.data.notArriveLIst;
}
if (index == 3) {
this.list = this.data.leaveLIst;
}
},
getDetailInfo() {
this.$instance
.post(
`/app/appthreemeetinginfo/queryDetailById?id=${this.id}`,
null,
{}
)
.then((res) => {
if (res.data) {
var data = res.data;
if (data.appThreeMeetingUserList) {
this.tabList[0].value = data.participantList.length;
}
if (data.isArriveLIst) {
this.tabList[1].value = data.isArriveLIst.length;
}
if (data.isArriveLIst) {
this.tabList[2].value = data.notArriveLIst.length;
}
// if (data.isArriveLIst) {
// this.tabList[3].value = data.leaveLIst.length;
// }
this.data = data;
this.list = this.data.appThreeMeetingUserList;
}
});
},
formatName(name) {
if (name == undefined) {
return;
}
return name.substr(
name.length - 2,
name.length > 2 ? name.length - 1 : name.length
);
},
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
background-color: #f4f6f8;
.tab-list {
display: flex;
background-color: #D7261E;
line-height: 96px;
.tab-item {
flex: 1;
text-align: center;
color: #fff;
font-size: 28px;
position: relative;
}
.tab-active {
.line {
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -20px;
display: inline-block;
width: 40px;
height: 4px;
border-radius: 4px;
background: #fff;
}
}
}
.user-list {
background-color: #fff;
.user-item {
height: 112px;
padding-top: 16px;
box-sizing: border-box;
.user-bg {
display: inline-block;
width: 80px;
height: 80px;
background-color: #4e8eee;
color: #fff;
text-align: center;
line-height: 80px;
margin: 0 16px 032px;
font-size: 28px;
border-radius: 50%;
vertical-align: top;
}
.user-info {
display: inline-block;
width: 622px;
height: 96px;
border-bottom: 2px solid #d8dde6;
box-sizing: border-box;
.user-name {
line-height: 44px;
color: #333;
font-size: 32px;
margin-top: 16px;
}
}
}
.user-item:nth-last-of-type(1) {
.user-info {
border-bottom: 0;
}
}
}
}
</style>

View File

@@ -0,0 +1,155 @@
<template>
<div class="page">
<img src="https://cdn.cunwuyun.cn/guangdong/h5/bg@2x.png" alt="" class="bg-img">
<div class="title">会议投票</div>
<div class="content">
<img src="https://cdn.cunwuyun.cn/guangdong/h5/dh@2x.png" alt="">
<div>投票主题</div>
<p v-html="info.voteTopic"></p>
</div>
<div class="footer">
<div class="bg-gray" v-if="info.myVote">已投票</div>
<div class="bg-pink" @click="voteSubmit(0)" v-if="!info.myVote">不同意</div>
<div class="bg-red" @click="voteSubmit(1)" v-if="!info.myVote">同意观点</div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
computed: {
...mapState(['user']),
},
data() {
return {
id: '',
info: {},
};
},
onLoad(options) {
this.id = options.id
this.getDetailInfo()
},
methods: {
voteSubmit(myVote) {
this.$instance.post(`/app/appthreemeetinguser/voteMeetting?meetingId=${this.id}&myVote=${myVote}&userId=${this.user.partyId}`).then((res) => {
if (res.code == 0) {
this.$toast('投票成功')
this.getDetailInfo()
}
}).catch((err) => {
this.$toast(err)
})
},
getDetailInfo() {
this.$instance.post(`/app/appthreemeetinginfo/queryDetailById?id=${this.id}&partyId=${this.user.partyId}`, null, {}).then(res => {
if (res.data) {
this.info = res.data
}
})
},
},
};
</script>
<style lang="scss" scope>
@import "../../../common/common.css";
.page {
background-color: #F3F6F9;
position: relative;
width: 100%;
overflow-x: hidden;
.bg-img {
width: 100%;
height: 340px;
}
.title {
width: 100%;
height: 60px;
font-size: 44px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #FFF;
line-height: 60px;
position: absolute;
top: 50px;
left: 290px;
}
.content {
position: absolute;
top: 210px;
left: 20px;
width: 710px;
background: #FFF;
border-radius: 24px;
padding: 100px 32px 172px;
box-sizing: border-box;
img {
position: absolute;
top: -60px;
left: 310px;
width: 120px;
height: 120px;
}
div {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
margin-bottom: 36px;
}
p {
font-size: 28px;
color: #333;
line-height: 40px;
}
}
.footer {
display: flex;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
div {
flex: 1;
text-align: center;
height: 112px;
line-height: 112px;
}
.bg-gray {
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #999;
background: #EAE9E9;
}
.bg-pink {
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #D73D3D;
background: #FFE4DD;
}
.bg-red {
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fff;
background: #FE5A49;
}
}
}
</style>