Browse Source

人民建议征集

feature
是小王呀\24601 9 months ago
parent
commit
ee0cba27c6
  1. 3
      .env.development
  2. 5
      package-lock.json
  3. 1
      package.json
  4. 2
      src/api/basic.js
  5. BIN
      src/assets/images/peoSuggestion/5.png
  6. BIN
      src/assets/images/peoSuggestion/6.jpg
  7. BIN
      src/assets/images/peoSuggestion/7.jpg
  8. BIN
      src/assets/images/peoSuggestion/8.jpg
  9. 52
      src/router/router.config.js
  10. 122
      src/views/peoSuggestion/Specialsolicitation.vue
  11. 165
      src/views/peoSuggestion/SpecialsolicitationFill.vue
  12. 310
      src/views/peoSuggestion/explain.vue
  13. 306
      src/views/peoSuggestion/goldenIdea.vue
  14. 264
      src/views/peoSuggestion/goldenIdeaDetail.vue
  15. 129
      src/views/peoSuggestion/index.vue
  16. 161
      src/views/peoSuggestion/solicitationDaily.vue
  17. 218
      src/views/peoSuggestion/specialTopicList.vue
  18. 304
      src/views/peoSuggestion/topicList.vue
  19. 271
      src/views/peoSuggestion/topicListDetail.vue
  20. 4
      vue.config.js

3
.env.development

@ -1,5 +1,6 @@
NODE_ENV='development'
# must start with VUE_APP_
VUE_APP_ENV = 'development'
VUE_APP_BASE_URL = http://192.168.1.140/api'
VUE_APP_BASE_URL = 'http://192.168.1.144/api'
# VUE_APP_BASE_URL = http://192.168.1.140/api'
outputDir = 'epmet-work-wx-dev'

5
package-lock.json

@ -7787,6 +7787,11 @@
"resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="
},
"qrcodejs2": {
"version": "0.0.2",
"resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
"integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
},
"qs": {
"version": "6.13.0",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.13.0.tgz",

1
package.json

@ -29,6 +29,7 @@
"html-webpack-plugin": "^5.5.3",
"less-loader": "^11.1.0",
"postcss-pxtorem": "^6.0.0",
"qrcodejs2": "0.0.2",
"regenerator-runtime": "^0.13.5",
"vant": "^2.12.48",
"vconsole": "^3.15.0",

2
src/api/basic.js

@ -12,6 +12,8 @@ export function getAutograph(data) {
// 上传文件
export function uploadvariedfile(file) {
console.log(file,"神的");
var files = new File([file], new Date().getTime() + file.name)
const data = new FormData()
data.append('file', files)

BIN
src/assets/images/peoSuggestion/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 KiB

BIN
src/assets/images/peoSuggestion/6.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/assets/images/peoSuggestion/7.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/assets/images/peoSuggestion/8.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

52
src/router/router.config.js

@ -137,18 +137,70 @@ export const constantRouterMap = [
component: () => import('@/views/peoSuggestion'),
meta: { title: '人民意见征集', keepAlive: false }
},
{
path: '/peoSuggestionexplain',
name: 'peoSuggestionexplain',
component: () => import('@/views/peoSuggestion/explain.vue'),
meta: { title: '征集说明', keepAlive: false }
},
{
path: '/solicitationDaily',
name: 'solicitationDaily',
component: () => import('@/views/peoSuggestion/solicitationDaily.vue'),
meta: { title: '日常征集', keepAlive: false }
},
{
path: '/specialTopicList',
name: 'specialTopicList',
component: () => import('@/views/peoSuggestion/specialTopicList.vue'),
meta: { title: '专题征集列表', keepAlive: false }
},
{
path: '/SpecialsolicitationFill',
name: 'SpecialsolicitationFill',
component: () => import('@/views/peoSuggestion/SpecialsolicitationFill.vue'),
meta: { title: '专题征集', keepAlive: false }
},
// {
// path: '/SpecialsolicitationFill',
// name: 'SpecialsolicitationFill',
// component: () => import('@/views/peoSuggestion/SpecialsolicitationFill.vue'),
// meta: { title: '专题征集', keepAlive: false }
// },
{
path: '/goldenIdea',
name: 'goldenIdea',
component: () => import('@/views/peoSuggestion/goldenIdea.vue'),
meta: { title: '金点子列表', keepAlive: false }
},
{
path: '/goldenIdeaDetail',
name: 'goldenIdeaDetail',
component: () => import('@/views/peoSuggestion/goldenIdeaDetail.vue'),
meta: { title: '金点子详情', keepAlive: false }
},
{
path: '/topicList',
name: 'topicList',
component: () => import('@/views/peoSuggestion/topicList.vue'),
meta: { title: '最新专题', keepAlive: false }
},
{
path: '/topicListDetail',
name: 'topicListDetail',
component: () => import('@/views/peoSuggestion/topicListDetail.vue'),
meta: { title: '专题详情', keepAlive: false }
},
{
path: '/sing',
name: 'sing',
component: () => import('@/views/activity/sing'),
meta: { title: '', keepAlive: false }
},
{
path: '/discusionDetail',
name: 'discusionDetail',

122
src/views/peoSuggestion/Specialsolicitation.vue

@ -0,0 +1,122 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF; height: 200px;">
<img src="../../assets/images/peoSuggestion/6.jpg" style="width: 100%; height: 200px;" />
<span class="title" style="position: fixed; top: 30;">{{ tableList.title }}</span>
</div>
<div class='' style="position: relative;top: -10px;">
<div class="card">
<div v-html=" tableList.content"></div>
<!-- <span>
各位建议人:
</span>
<br>
<span>&emsp;&emsp;为贯彻落实"以人民为中心"的发展思想坚持 新时代党的群众路线,践行'大社会大治理大服 "工作</span>
<br>
<span>
注意事项:
</span>
<br>
<span> 1人民建议是指公民法人或社会组织(简称建 议人)为了社会公共利益针对社会公共事务 我市经济建设政治建 </span>
<br>
<span> 2人民建议是指公民法人或社会组织(简称建 议人)为了社会公共利益针对社会公共事务 我市经济建设政治建 </span>
--> </div>
</div>
<div class="flex flex-center1 ">
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" style="width: 300px;" round @click="onClickdaily">开始填写</van-button>
</div>
<Android @send-number="handleNumber" />
</div>
</template>
<script>
import {sphereLifeSearcdetail } from "@/api/lingCircle"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
tableList:{
title:"70岁以上高龄老人补贴福利发放于1月1日",
content:" 2、人民建议,是指公民、法人或社会组织(简称建 议人)为了社会公共利益,针对社会公共事务,对 我市经济建设、政治建 "
}
};
},
created() {
},
async mounted() {
},
methods: {
//
onClickdaily(){
this.$router.push({path:`solicitationDaily`})
},
},
components: { Share, registerDialog },
computed: {
disabledRecord() {
return (item) => {
if (!item.cutOffTime || item.online != 1) return true
let flag = new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants || item.currentParticipants >= item.participants;
return flag || false
}
},
},
watch: {},
}
</script>
<style lang='less' scoped>
.phone{
height: 50px;
bottom:8vh;
}
:deep img{
max-width: 100%;
}
:deep(.p0>.van-cell) {
padding: 0;
}
:deep(.van-cell) {
padding: 16px 8px;
}
:deep(.van-cell__title) {
color: #666666;
display: flex;
&>span {
flex: 1;
}
}
:deep(.van-cell__value) {
text-align: left;
}
:deep(.van-cell--required) {
&::before {
left: -5px;
}
}
.title{
padding: 0 24px;
position: fixed;
color: #FFFF;
font-size: 27px;
top: 55px;
}
</style>

165
src/views/peoSuggestion/SpecialsolicitationFill.vue

@ -0,0 +1,165 @@
<template>
<div>
<div style="width: 100%;background: #fff; padding: 10px 10px 10px 20px; text-align: left; font-weight: 500;">请输入公民姓名法人或社会组织名称</div>
<div class="container">
<!-- <div class="block">
<div class="textarea">
<van-field v-model="eventContent" autosize label="诉求描述" maxlength="20" placeholder="请输入建议主题(20字以内)"
required rows="2" type="textarea">
<template #extra>
</template>
</van-field>
</div>
</div> -->
<div class="block">
<div class="textarea">
<van-field v-model="eventContent" autosize label="建议内容" maxlength="800"
placeholder="请输入主要建议内容(内容描述不少于10个 字,不超过800字)" required rows="6" type="textarea">
<template #extra>
<span style="color:#C1C1C1; font-size: 15px;line-height: 0">800字以内简要陈述基本事实和情况以及对我市经济建
政治建设文化建设社会建设生态文明建设等方 面提出的对策措施</span>
</template>
</van-field>
</div>
</div>
<div class="block">
<van-field v-model="eventContent" label="是否愿意公开">
<template #extra>
<van-radio-group v-model="radio" direction="horizontal">
<van-radio name="1"></van-radio>
<van-radio name="2"></van-radio>
</van-radio-group>
</template>
</van-field>
</div>
<div class="block">
<van-cell title="上传图片/视频">
<template #label>
<van-uploader v-model="fileList" :after-read="afterRead" :max-count="3" accept="image/*,video/*"
:max-size="10 * 1024 * 1024" />
</template>
</van-cell>
</div>
<div class="block">
<van-field v-model="name" label="建议人" placeholder="请输入联系人" required>
<template #message>
<div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;">
请输入公民姓名法人或社会组织名称
</div>
</template>
</van-field>
</div>
<div class="block">
<van-field v-model="phone" label="手机号码" maxlength="11" placeholder="请输入联系电话" required type="number" />
</div>
<div class="flex flex-center1 ">
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" style="width: 300px;" round
@click="onClickdaily">提交</van-button>
</div>
<Android @send-number="handleNumber" />
</div>
</div>
</template>
<script>
import {uploadvariedfile} from '@/api/basic'
import {sphereLifeSearcdetail } from "@/api/lingCircle"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
radio:"",
fileList: [],
title:"",
};
},
created() {
this.title= console.log(this.$route.query.title,"sdlkfjsdlkfj");
},
async mounted() {
},
methods: {
//
onClickdaily(){
// this.$router.push({path:`solicitationDaily`})
},
//
afterRead(file) {
file.status = 'uploading'
file.message = '上传中...'
uploadvariedfile(file.file)
.then(res => {
file.status = ''
file.message = '上传成功'
file.url = res.data.url
// this.uploadFileList.push(res.url)
})
.catch(() => {
file.status = 'failed'
file.message = '上传失败'
})
},
},
components: { Share, registerDialog },
computed: {
disabledRecord() {
return (item) => {
if (!item.cutOffTime || item.online != 1) return true
let flag = new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants || item.currentParticipants >= item.participants;
return flag || false
}
},
},
watch: {},
}
</script>
<style lang='less' scoped>
.phone{
height: 50px;
bottom:8vh;
}
.block {
border-radius: 8px;
overflow: hidden;
margin-bottom: 10px;
}
.textarea {
/deep/ .van-cell {
display: block;
}
/deep/ .van-field__label {
width: 100%;
}
/deep/ .van-cell__value {
margin-top: 20px;
background: #F7F7F7;
padding: 14px 16px;
}
}
.speech {
margin-top: 17px;
}
</style>

310
src/views/peoSuggestion/explain.vue

@ -1,91 +1,29 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF; height: 150px;">
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="applyList" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="applyList.attrs && applyList.attrs[0] && applyList.attrs[0].url ? applyList.attrs[0].url : 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240927/087bb3a330a6494b9b09b5341c309ced.png'" style="width: 100%; height: 150px;" />
<div class="flex flex-mean" style="background-color: #FFFFFF; height: 200px;">
<img src="../../assets/images/peoSuggestion/5.png" style="width: 100%; height: 200px;" />
</div>
<div class='' style="position: relative;top: -10px;">
<div class="card">
<div class=" flex flex-y p0">
<div class="flex flex-x flex-center2">
<h2 style="margin: 0; font-size: 21px; ">{{ applyList.name }}</h2>
<van-tag size="medium" color="#ffefd6" style="margin-left: 10px;"
text-color="#ff8707">{{applyList.type}}/{{typeNames}}</van-tag>
</div>
<div class="flex flex-x flex-center2 flex-end">
<div>
<van-tag v-for=" (item,index) in tabs" round type="warning" color="#f2f2f2" size="medium"
text-color="#6e6e6e">{{item.tab}}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<img style="width: 14px; height: 14px;"
src="../../assets/images/livingCircle/address1.png">
<span>{{ applyList.address }} </span>
</div>
</div>
<img style="width: 40px; height: 40px;" src="../../assets/images/livingCircle/navigation.png">
</div>
<div class="">
<span style="font-size: 16px;color: #999999;"> 营业时间:</span>
<span style="font-size: 16px;color: #000000;"> 营业时间:</span>
</div>
<div class="">
<span style="font-size: 16px;color: #999999;"> 联系电话:</span>
<span style="font-size: 16px;color: #000000;"> 营业时间:</span>
<img style="width: 15px ;height: 15px;" src="../../assets/images/livingCircle/tel.png">
</div>
</div>
<span>
各位建议人:
</span>
<br>
<span>&emsp;&emsp;为贯彻落实"以人民为中心"的发展思想坚持 新时代党的群众路线,践行'大社会大治理大服 "工作</span>
<br>
<span>
注意事项:
</span>
<br>
<span> 1人民建议是指公民法人或社会组织(简称建 议人)为了社会公共利益针对社会公共事务 我市经济建设政治建 </span>
<br>
<span> 2人民建议是指公民法人或社会组织(简称建 议人)为了社会公共利益针对社会公共事务 我市经济建设政治建 </span>
</div>
</div>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top10 p0">
<h2 style="margin-bottom: 10px; font-size: 21px;">优惠卷</h2>
<div class="container" style="background:linear-gradient(0deg, #FFF9F5 65%, #FEF1E9 100%)">
<div class="card">
<div class="flex flex-x flex-center2 flex-end">
<div>
<h2 style="margin: 0; font-size: 21px; ">{{ applyList.name }}</h2>
<van-tag v-for=" (item, index) in tabs" style=" border: 1px solid #FFAA07; " round type="warning" color="#FFFFFF"
size="medium" text-color="#FFAA07">{{ item.tab }}</van-tag>
<div style="font-size: 16px;color: #999999; line-height: 30px;">
<span>有效期至</span> <span>{{ applyList.address }} </span>
</div>
</div>
<button style="width: 40px; height: 40px;"
></button>
</div>
</div>
</div>
<div style="margin-top: 10px;">
<span style=" font-size: 14px;
color: #999999;">使用方法凭当前页面进点享受优惠</span>
</div>
<!-- <div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span
style="color: black;">{{applyList.deadline}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>签到时间: </span><span
style="color: black;">{{applyList.signInTime+' 至 '+applyList.signOutTime}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动名额: </span><span
style="color: black;"><span v-if="applyList.notQuota === 1">{{applyList.quota}}</span>
<tspanext v-else>不限名额</tspanext>
</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>主办方: </span><span
style="color: black;">{{ActName?ActName:'-'}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系人: </span><span
style="color: black;">{{applyList.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系电话: </span><span
style="color: black;">{{applyList.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时长: </span><span
style="color: black;">{{applyList.serviceTime}}小时</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>积分奖励: </span><span
style="color: black;">{{applyList.points}}</span></div> -->
</div>
</div>
<div class="flex flex-center1 ">
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" style="width: 300px;" round @click="onClickdaily">开始填写</van-button>
</div>
<Android @send-number="handleNumber" />
</div>
@ -101,183 +39,8 @@ import { Toast, Dialog } from 'vant'
export default {
data() {
return {
options: [
{
"children": [
{
"pv": "1",
"value": "11",
"label": "托儿所"
},
{
"pv": "1",
"value": "12",
"label": "幼儿园"
},
{
"pv": "1",
"value": "13",
"label": "小学"
},
{
"pv": "1",
"value": "14",
"label": "中学"
},
{
"pv": "1",
"value": "15",
"label": "培训机构"
},
{
"pv": "1",
"value": "16",
"label": "其它"
}
],
"value": "1",
"label": "教育培训"
},
{
"children": [
{
"pv": "2",
"value": "21",
"label": "门诊"
},
{
"pv": "2",
"value": "22",
"label": "社区医院"
},
{
"pv": "2",
"value": "23",
"label": "医院"
},
{
"pv": "2",
"value": "24",
"label": "其它"
}
],
"value": "2",
"label": "医疗卫生"
},
{
"children": [
{
"pv": "3",
"value": "31",
"label": "餐饮"
},
{
"pv": "3",
"value": "32",
"label": "超市"
},
{
"pv": "3",
"value": "33",
"label": "理发"
},
{
"pv": "3",
"value": "34",
"label": "书店"
},
{
"pv": "3",
"value": "35",
"label": "便利店"
},
{
"pv": "3",
"value": "36",
"label": "市场"
},
{
"pv": "3",
"value": "37",
"label": "五金"
},
{
"pv": "3",
"value": "38",
"label": "照相"
},
{
"pv": "3",
"value": "39",
"label": "综合修理"
},
{
"pv": "3",
"value": "30",
"label": "服务站"
},
{
"pv": "3",
"value": "330",
"label": "农贸市场"
},
{
"pv": "3",
"value": "331",
"label": "其它"
}
],
"value": "3",
"label": "商业服务"
},
{
"children": [
{
"pv": "4",
"value": "41",
"label": "电影院"
},
{
"pv": "4",
"value": "42",
"label": "歌剧院"
},
{
"pv": "4",
"value": "43",
"label": "图书馆"
},
{
"pv": "4",
"value": "44",
"label": "游泳馆"
},
{
"pv": "4",
"value": "45",
"label": "活动中心"
},
{
"pv": "4",
"value": "46",
"label": "体育馆"
},
{
"pv": "4",
"value": "47",
"label": "其它"
}
],
"value": "4",
"label": "文化体育"
},
{
"value": "5",
"label": "其它"
}
],
tabs:[],
applyList:{},
};
},
created() {
@ -285,37 +48,12 @@ export default {
},
async mounted() {
// setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
if (this.$route.query.id) {
console.log(this.$route.query.id);
this.sphereLifeId= this.$route.query.id
// await this.detail(this.$route.query.id)
// if(this.$route.query.flag === 'share'){
// await this.getById(this.$route.query.id)
// }
// await this.share()
this.activityApplyList( this.$route.query.id)
// this.activitySignIn(1)
// this.activitySignIn(0)
}
},
methods: {
//
activityApplyList(id) {
sphereLifeSearcdetail(id).then(res => {
if (res.code === 0) {
this.applyList = res.data
this.tabs = res.data.tags.split(',').map(tag => ({ tab: tag.trim() }))
console.log(tabs, "sdalkjflksdf");
}
}).catch(err => {
})
},
//
onClickdaily(){
this.$router.push({path:`solicitationDaily`})
},

306
src/views/peoSuggestion/goldenIdea.vue

@ -0,0 +1,306 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF;">
<van-search class="flex flex-1" v-model="searchValue" shape="round" placeholder="请输入搜索关键词">
<template #action>
<!-- 添加样式确保按钮显示并设置合适的宽高和对齐 -->
<!-- <div @click="onSearch"
style="display: flex; align-items: center; justify-content: center; padding: 0 10px; cursor: pointer;">
a搜索
</div> -->
</template>
</van-search>
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="handleSearch">查询</van-button>
</div>
<!-- <van-search v-model="searchKey" placeholder="请输入搜索关键词" shape="round" class="custom-search"
@search="$router.push({ path: '/search', query: { searchKey: searchKey } })" /> -->
<div class='container'>
<van-tabs v-mow="handelChangeTags">
<van-tab v-for="item in tagList" :key="item.id" :title="item.tagName">
<div class="flex flex-y flex1 flex-end" v-if="PublicityList.length !== 0">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了"
@load="communityPublicity" class="card" :offset="50">
<div class="activity_content flex flex-y" v-for="(item, index) in PublicityList"
:key="index" @click="toDetail(item)">
<div class="flex flex1 oh">
<div class="flex flex-y flex1 m-right10 oh">
<span class="van-multi-ellipsis--l2 text1" >
{{ item.title }}
</span>
<div class="flex flex-end text2">
<span class="van-ellipsis y66666 font-size15">
{{ item.name }} </span>
<div class="">{{ item.time }}</div>
</div>
</div>
<img v-if="item.coverPic" :src="item.coverPic" style="width: 130px;height: 100px;border-radius: 20;"
alt="">
</div>
<div class="flex flex-end flex-center gray m-top10 font-size13">
<!-- <div class="flex flex-center"><img src="@/assets/images/icons/support.png" alt=""
class="img_16 m-right7"><span>{{ item.likes || 0 }}</span>
</div> -->
</div>
</div>
</van-list>
</div>
<div v-else class="no-data">
暂无数据~
</div>
</van-tab>
</van-tabs>
</div>
<Android></Android>
</div>
</template>
<script>
import { advertisingTag, communityPublicity } from '@/api/home';
export default {
data() {
return {
PublicityList: [
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
],
tagList:[{
id:"0",
tagName:"日常征集"
},
{
id:"1",
tagName:"专题征集"
},
],
tagActive: 'new',
tagId: null,
pageSize: 5,
pageNo: 1,
agencyId: null,
finished: false,
loading: true,
showRegister: false,
searchValue: ""
};
},
created() {
// this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
// this.advertisingTag();//
// this.communityPublicity()//
},
methods: {
toDetail(item){
this.$router.push({name:'goldenIdeaDetail',query:{id:item.id}})
},
handleSearch(){
this.PublicityList = [];
this.pageNo = 1;
this.communityPublicity()
},
filterTagId(tagId) {
return this.tagList.filter(item => item.id === tagId)[0].tagName || '--';
},
// async advertisingTag() {
// let parm = {
// pageSize: 10,
// pageNo: 1,
// status: 1,
// tagName: null
// }
// let res = await advertisingTag(parm)
// if (res.code === 0) {
// this.tagList = res.data.list;
// this.tagList.unshift({ tagName: '', id: 'new' })
// }
// },
async communityPublicity() {
let parm = {
pageSize: 10,
pageNo: 1,
title: this.searchValue,
tagId: this.tagId,
startTime: '',
endTime: '',
agencyId: this.agencyId,
status:1
}
let res = await communityPublicity(parm)
if (res.code === 0) {
this.loading = false;
res.data.list.forEach(item => {
if (item.content) {
item.newContent = this.extractChineseCharactersAndPunctuation(item.content)
}
})
if (!res.data || res.data.list.length < this.pageSize) {
this.finished = true;
}
this.PublicityList = this.PublicityList.concat(res.data.list);
}
},
extractChineseCharactersAndPunctuation(str) {
const chineseCharsAndPunctuation = str.match(/[\u4e00-\u9fa5\u3000-\u303F\uff00-\uffef]/g);
return chineseCharsAndPunctuation ? chineseCharsAndPunctuation.join('') : '';
},
handelChangeTags(val, title) {
this.PublicityList = [];
if (val !== 0) {
this.tagId = this.tagList[val].id;
} else {
this.tagId = '';
}
this.communityPublicity()
},
},
components: {},
computed: {},
watch: {},
}
</script>
<style lang='less' scoped>
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 12px;
color: #999999;
line-height: 30px;
}
.text1{
font-family: PingFang SC;
font-weight: 500;
font-size: 18px;
color: #000000;
;
}
.custom-button {
width: 60px;
height: 33px;
}
.activity_content {
padding-bottom: 10px;
box-sizing: border-box;
width: 100%;
border-bottom: 1px solid #EAEAEA;
margin-top: 14px;
min-height: 50px;
.img {
width: 231px;
height: 33px;
margin: 5px 3px 0 3px;
}
&:last-child {
border-bottom: none;
}
.content {
width: 325px;
height: 40px;
font-family: PingFang SC;
font-weight: 500;
font-size: 16px;
color: #333333;
line-height: 23px;
}
.dianzan {
width: 325px;
height: 20px;
display: flex;
font-size: 13px;
color: #AAAAAA;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
.img {
width: 14.5px;
height: 15px;
}
}
}
.header {}
.header .input_search {
width: 279px;
height: 33px;
background: rgba(193, 193, 193, 0.16);
border-radius: 17px;
// flex: 1;
color: #333333;
border: none;
/* 取消边框 */
margin-left: 10px;
}
.header .btn_search {
width: 60px;
height: 33px;
background: #3974F6;
border-radius: 17px;
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 23px;
border: none;
/* 取消边框 */
margin-right: 10px;
}
::v-deep .van-search__content {
background-color: white;
border: 1px solid #3974F6;
}
::v-deep .van-search__input {
color: #000;
}
::v-deep .van-field__control::placeholder {
color: #A0A0A0;
}
:deep(.van-field__control) {
font-size: 13px;
}
.van-tab__title {
padding: 5px 12px; /* 内边距调整 */
font-size: 14px; /* 字体大小 */
}
.van-tabs__nav {
justify-content: space-between; /* 平均分布 */
}
</style>

264
src/views/peoSuggestion/goldenIdeaDetail.vue

@ -0,0 +1,264 @@
<template>
<div>
<div class='container' style="height: 85vh; overflow: auto;">
<div class="card flex flex-y ">
<div class="m-bottom5">{{ ProblemDescription.eventContent }}</div>
<div class="font-size13 gray">{{ ProblemDescription.happenTime }}</div>
<div class="image-grid" v-for="item in ProblemDescription.imageList" >
<div class="grid-item ">
<img :src="item" style="width: 105px; height: 75px;">
</div>
</div>
<div class="flex flex-y flex-center1 flex-center2 gray back_color m-top15">
<div class="flex m-top16 flex-center1 flex-center2 vote white">
<div :style="{ width:support1Width}">
<span class="van-ellipsis" style="width: 100px;">支持 {{ ProblemDescription.supportNum }}</span>
<img src="@/assets/images/discusion/VS.png" alt="">
</div>
<div :style="{ width:oppose1Width}"class="text-right van-ellipsis">
反对 {{ ProblemDescription.opposeNum }}
</div>
</div>
<div class="gray font-size13 p-12">{{dataValue}}人参与</div>
</div>
</div>
<div class="bot_btn flex flex-x flex-mean m-bot50 back_color back_color">
<van-button :disabled="disableAllButtons" round class="support"
:icon="require('@/assets/images/icons/support.png')" type="info" @click="handelClicsupport">
支持
</van-button>
<van-button :disabled="disableAllButtons" round class="support"
:icon="require('@/assets/images/icons/oppose.png')" type="info" @click="handelClicopposeNum">
反对
</van-button>
</div>
</div>
<Android/>
</div>
</template>
<script>
import { andelClicDetail, handelClicsupport } from '@/api/home';
export default {
data() {
return {
signUp: [
{},
],
dataValue: null,
support: false,
oppose: false,
supportNum: null,
opposeNum: null,
disableAllButtons: false,
eventId: "",
ProblemDescription: {},
vote: {}
};
},
components:{},
created() {
this.eventId = this.$route.query.eventId
this.id = this.$route.query.eventId
this.agencyId = this.$store.state.app.agencyId;
this.userId = this.$store.state.app.userInfo.id;
this.icEventOldDiscussDetil1()
},
computed: {
support1() {
return (this.ProblemDescription.supportNum / this.dataValue)
},
oppose1() {
return (this.ProblemDescription.opposeNum / this.dataValue)
},
support1Width() {
return (!this.support1?50:this.support1.toFixed(2) * 100) + '%';
},
oppose1Width() {
return (!this.oppose1?50:this.oppose1.toFixed(2) * 100) + '%';
}
},
methods: {
async handelClicsupport() {
let parm = {
eventId: this.eventId,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag: 0
}
let res = await handelClicsupport(parm)
if(res.code == 0){
await this.icEventOldDiscussDetil1()
}
},
async handelClicopposeNum(data) {
let parm = {
eventId: this.eventId,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag: 1
}
let res = await handelClicsupport(parm)
if(res.code === 0){
await this.icEventOldDiscussDetil1()
}
},
async icEventOldDiscussDetil1() {
console.log(this.id, "this.id");
let parm = {
icEventId: this.eventId
}
await andelClicDetail(parm).then(res => {
this.ProblemDescription = res.data;
this.dataValue = res.data.opposeNum + res.data.supportNum
})
},
handsupport() {
this.support = true;
},
},
}
</script>
<style lang='less' scoped>
.image-container {
position: relative;
display: inline-block;
}
.image-grid {
margin-top: 20px;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-flow: row;
/* 自动换行 */
}
.z_img {
width: 10px;
height: 35px;
background: url('@/assets/images/discusion/f-y.png');
background-size: cover;
}
.image-with-text {
position: relative;
display: inline-block;
}
.grid-item {
text-align: center;
}
.support {
background-color: #ffffff;
color: black;
}
.t_sup {
display: inline-flex;
position: absolute;
}
.support_img1 {
height: 35px;
}
.support_img2 {
height: 35px;
}
.header_img_left {
// background:"@/assets/images/discusion/1.png";
background: url('@/assets/images/discusion/h-l.png');
width: 10px;
height: 35px;
background-size: cover;
/* 使背景图片覆盖整个元素 */
}
.header_img_right {
background: url('@/assets/images/discusion/f-l.png');
width: 10px;
height: 35px;
background-size: cover;
/* 使背景图片覆盖整个元素 */
}
.text-overlay {
position: absolute;
bottom: 10px;
/* 文字距离图片底部的距离 */
color: white;
/* 文字颜色,可以根据需要调整 */
padding: 5px;
border-radius: 3px;
/* 可选,圆角 */
font-size: 13px;
text-align: center;
}
.text-overlay1 {
position: absolute;
bottom: 10px;
/* 文字距离图片底部的距离 */
color: white;
/* 文字颜色,可以根据需要调整 */
padding: 5px;
border-radius: 3px;
/* 可选,圆角 */
font-size: 13px;
text-align: center;
right: 0px;
}
.footer_img_left {
background: url('@/assets/images/discusion/h-y.png');
width: 10px;
height: 35px;
background-size: cover;
}
.vote {
width: 100%;
&>:nth-child(1),
>:nth-child(2) {
height: 35px;
line-height: 35px;
padding: 0 11px;
box-sizing: border-box;
font-size: 13px;
}
&>:nth-child(1) {
background: url('@/assets/images/discusion/left-bg.png') no-repeat;
background-size: 97% 100%;
padding: 0 10px;
box-sizing: border-box;
position: relative;
z-index: 4;
&>img{
width: 25px;
height: 25px;
position: absolute;
right: -10px;
top: 5px;
z-index: 10;
}
}
&>:nth-child(2) {
background: url('@/assets/images/discusion/right-bg.png') no-repeat;
background-size: 100% 100%;
z-index: 3;
}
}
</style>

129
src/views/peoSuggestion/index.vue

@ -8,8 +8,8 @@
</div>
<div class='container' style="position: relative;top: -35px;">
<div class="flex flex-x flex-end">
<img @click="onClickdaily" src="../../assets/images/peoSuggestion/special.png" style="width: 180px;">
<img src="../../assets/images/peoSuggestion/daily.png" style="width: 180px;">
<img @click="onClickdaily" src="../../assets/images/peoSuggestion/7.jpg" style="width: 180px;">
<img @click="toSpecialList" src="../../assets/images/peoSuggestion/8.jpg" style="width: 180px;">
</div>
</div>
<div class='container' style="position: relative;top: -40px;">
@ -20,8 +20,8 @@
<span class="m-left5" style=" color: black; font-family:pingfang-bold;
font-size: 20px;">最新专题 </span>
</div>
<span @click="$router.push('/activity')">更多</span>
<span @click="$router.push('/topicList')">更多</span>
</div>
<div class="activity_content flex m-top10" v-for="(item, index) in eventList" :key="index"
@click="$router.push({ path: `/discusionDetail`, query: { eventId: item.eventId } })">
@ -37,7 +37,7 @@
<div class="flex flex-center">
<span> {{ item.data }}</span>
</div>
</div>
</div>
@ -53,14 +53,15 @@
<span class="m-left5" style=" color: black; font-family:pingfang-bold;
font-size: 20px;">金点子 </span>
</div>
<span @click="$router.push('/activity')">更多</span>
<span @click="$router.push('/goldenIdea')">更多</span>
</div>
<van-tabs v-model="tagActive" style="width: 100%;" :title-style="titleStyle" title-class="custom-title-class">
<van-tab v-for="item in tagList" :key="item.id" :title="item.tagName">
</van-tab>
</van-tabs>
<van-tabs v-model="tagActive" style="width: 100%;" :title-style="titleStyle"
title-class="custom-title-class">
<van-tab v-for="item in tagList" :key="item.id" :title="item.tagName">
</van-tab>
</van-tabs>
<div class="activity_content flex m-top10" v-for="(item, index) in eventList" :key="index"
@click="$router.push({ path: `/discusionDetail`, query: { eventId: item.eventId } })">
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;">
@ -75,7 +76,7 @@
<div class="flex flex-center">
<span> {{ item.data }}</span>
</div>
</div>
</div>
@ -83,18 +84,22 @@
</div>
</div>
</div>
<div style="position: fixed; right: 0px; bottom:40px;display: flex; flex-direction:column;" >
<img @click="onClickQCcode" style="width: 80px; height: 80px;" src="../../assets/images/peoSuggestion/2.png">
<div style="position: fixed; right: 0px; bottom:40px;display: flex; flex-direction:column;">
<img @click="onClickQCcode" style="width: 80px; height: 80px;"
src="../../assets/images/peoSuggestion/2.png">
<img @click="onClickShare" style="width: 80px; height: 80px;" src="../../assets/images/peoSuggestion/3.png">
</div>
<Android @send-number="handleNumber" />
<Share :show="showShare" @closeShare="showShare = false"></Share>
<van-popup v-model="showQCcode">
<div class="QCcode" >
<div class="QCcode">
<div style="padding: 30px">
<img width="230px" height="230px" src="../../assets/images/peoSuggestion/3.png">
<div v-if="qrCodeImage" class="flex flex-center1 flex-center2">
<img :src="qrCodeImage" alt="二维码" />
</div>
<div style="padding: 20px; text-align: center;">人民意见征集二维码</div>
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" round @click="submit">下载二维码</van-button>
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" round
@click="submit">下载二维码</van-button>
</div>
</div>
</van-popup>
@ -103,17 +108,21 @@
</template>
<script>
import { activitySignIn,activityApply,addActivityRecord,cancelSignUp1, detail,
communityActivityApplicationRecordDelete,getById,activityApplySave} from "@/api/activity"
import {
activitySignIn, activityApply, addActivityRecord, cancelSignUp1, detail,
communityActivityApplicationRecordDelete, getById, activityApplySave
} from "@/api/activity"
import {uploadvariedfile} from '@/api/basic'
import Share from "@/components/Share/"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
// import { Share } from '@/components/Share'
import { Toast, Dialog } from 'vant'
import QRCode from "qrcodejs2";
export default {
data() {
return {
qrCodeImage: null,
showQCcode:false,
tagActive:"",
showShare:false,
@ -148,9 +157,87 @@ export default {
},
async mounted() {
const currentUrl = window.location.href;
//
this.generateQRCode(currentUrl);
},
methods: {
generateQRCode(url) {
console.log(url, "dsfijsdlkf");
// 使 qrcodejs2
const tempDiv = document.createElement('div');
new QRCode(tempDiv, {
text: url,
width: 128,
height: 128,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H,
});
// Canvas
const canvas = tempDiv.querySelector('canvas');
return canvas;
},
async uploadQRCode() {
const currentUrl = window.location.href;
const canvas = this.generateQRCode(currentUrl);
if (canvas) {
console.log(canvas,"dslkjfl");
// Canvas Base64
this.qrCodeImage = canvas.toDataURL("image/png");
console.log(this.qrCodeImage,"dslkjfl");
}
canvas.toBlob((blob) => {
console.log(blob,"sdflkjsldkf");
const file = new File([blob], 'qrcode.png', {
type: 'image/png',
});
uploadvariedfile(file)
.then(res => {
file.status = ''
file.message = '上传成功'
file.url = res.data.url
console.log(this.fileList)
})
.catch(() => {
file.status = 'failed'
file.message = '上传失败'
})
}, 'image/png');
},
submit(){
Dialog.confirm({
title: '',
message: '长按图片即可保存',
})
.then(() => {
// on confirm
})
.catch(() => {
// on cancel
});
// const link = document.createElement('a');
// link.href = this.qrCodeImage; //
// link.download = 'qrcode.png'; //
// console.log(link);
// link.click(); //
},
toSpecialList(){
this.$router.push({path:`specialTopicList`})
},
//
onClickdaily(){
this.$router.push({path:`peoSuggestionexplain`})
},
onClickQCcode(){
this.uploadQRCode()
this.showQCcode=true
},
closeShare(){

161
src/views/peoSuggestion/solicitationDaily.vue

@ -0,0 +1,161 @@
<template>
<div class="container">
<div class="block">
<div class="textarea">
<van-field v-model="eventContent" autosize label="诉求描述" maxlength="20" placeholder="请输入建议主题(20字以内)"
required rows="2" type="textarea">
<template #extra>
</template>
</van-field>
</div>
</div>
<div class="block">
<div class="textarea">
<van-field v-model="eventContent" autosize label="建议内容" maxlength="800"
placeholder="请输入主要建议内容(内容描述不少于10个 字,不超过800字)" required rows="6" type="textarea">
<template #extra>
<span style="color:#C1C1C1; font-size: 15px;line-height: 0">800字以内简要陈述基本事实和情况以及对我市经济建
政治建设文化建设社会建设生态文明建设等方 面提出的对策措施</span>
</template>
</van-field>
</div>
</div>
<div class="block">
<van-field v-model="eventContent" label="是否愿意公开">
<template #extra>
<van-radio-group v-model="radio" direction="horizontal">
<van-radio name="1"></van-radio>
<van-radio name="2"></van-radio>
</van-radio-group>
</template>
</van-field>
</div>
<div class="block">
<van-cell title="上传图片/视频">
<template #label>
<van-uploader v-model="fileList" :after-read="afterRead" :max-count="3" accept="image/*,video/*"
:max-size="10 * 1024 * 1024" />
</template>
</van-cell>
</div>
<div class="block">
<van-field v-model="name" label="建议人" placeholder="请输入联系人" required>
<template #message>
<div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;">
请输入公民姓名法人或社会组织名称
</div>
</template>
</van-field>
</div>
<div class="block">
<van-field v-model="phone" label="联系电话" maxlength="11" placeholder="请输入联系电话" required type="number" />
</div>
<div class="flex flex-center1 ">
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" style="width: 300px;" round
@click="onClickdaily">提交</van-button>
</div>
<Android @send-number="handleNumber" />
</div>
</template>
<script>
import {uploadvariedfile} from '@/api/basic'
import {sphereLifeSearcdetail } from "@/api/lingCircle"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
radio:"",
fileList: [],
};
},
created() {
},
async mounted() {
},
methods: {
//
onClickdaily(){
this.$router.push({path:`solicitationDaily`})
},
//
afterRead(file) {
file.status = 'uploading'
file.message = '上传中...'
uploadvariedfile(file.file)
.then(res => {
file.status = ''
file.message = '上传成功'
file.url = res.data.url
// this.uploadFileList.push(res.url)
})
.catch(() => {
file.status = 'failed'
file.message = '上传失败'
})
},
},
components: { Share, registerDialog },
computed: {
disabledRecord() {
return (item) => {
if (!item.cutOffTime || item.online != 1) return true
let flag = new Date(item.cutOffTime.replace(/-/g, '/')).getTime() < Date.now() || item.currentParticipants >= item.participants || item.currentParticipants >= item.participants;
return flag || false
}
},
},
watch: {},
}
</script>
<style lang='less' scoped>
.phone{
height: 50px;
bottom:8vh;
}
.block {
border-radius: 8px;
overflow: hidden;
margin-bottom: 10px;
}
.textarea {
/deep/ .van-cell {
display: block;
}
/deep/ .van-field__label {
width: 100%;
}
/deep/ .van-cell__value {
margin-top: 20px;
background: #F7F7F7;
padding: 14px 16px;
}
}
.speech {
margin-top: 17px;
}
</style>

218
src/views/peoSuggestion/specialTopicList.vue

@ -0,0 +1,218 @@
<template>
<div>
<div class='container'>
<van-list class="card" :offset="50">
<div class="activity_content " v-for="(item, index) in discussionList" :key="index" >
<div @click="$router.push({ path: `/SpecialsolicitationFill`,query: { title:item.title} })">
<div class="van-multi-ellipsis--l2 m-bottom10" style="line-height: 28px; font-size: 20px; font-weight: 500; line-height: 28px; font-family: PingFang SC;" >
{{ item.title }}
</div>
<div class="flex flex-end">
<div class="font-size13 AAA flex flex-center2">
{{ item.total }}
</div>
<div class="font-size13 AAA flex flex-center2">{{ item.time }}</div>
</div>
</div>
</div>
</van-list>
<register-dialog v-if="showRegister" @close="showRegister = false" :registerFlag="registerFlag" :content="'请您先进行注册。'"></register-dialog>
</div>
<Android></Android>
</div>
</template>
<script>
// import { communityActivity,icEventOldDiscuss,handelClicsupport } from '@/api/home';
import registerDialog from '@/components/registerDialog';
export default {
data() {
return {
discussionList: [
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
total:110,
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
total:110,
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
total:110,
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
total:110,
time:"2024-09-10 09:30"
},
],
pageSize: 5,
pageNo: 1,
agencyId: null,
finished: false,
loading: false,
showRegister: false,
searchValue: "",
userId:""
};
},
created() {
this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
this.userId = this.$store.state.app.appId;
// this.icEventOldDiscuss();
},
methods: {
async handelClicsupport(data){
let parm = {
eventId:data,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag:0
}
console.log(parm);
let res = await handelClicsupport(parm)
if(res.code === 0){
this.icEventOldDiscuss()
}
},
async handelClicopposeNum(data){
let parm = {
eventId:data,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag:1
}
console.log(parm);
let res = await handelClicsupport(parm)
if(res.code === 0){
this.icEventOldDiscuss()
}
},
async icEventOldDiscuss(){
let parm = {
pageSize: 10,
pageNo: 1,
agencyId: this.agencyId,
icEventId:null
}
let res = await icEventOldDiscuss(parm)
if (res.code === 0) {
this.discussionList = res.data.list
}
},
handelClickJump(path) {
if (path === 'activityDetail') {
if (this.$store.state.app.userInfo.mobile) {
this.$router.push({ path: `/${path}` });
} else {
this.showRegister = true;
}
}
}
},
components: { registerDialog },
computed: {},
watch: {},
}
</script>
<style lang='less' scoped>
.custom-button {
width: 60px;
height: 33px;
}
.activity_content {
padding-bottom: 10px;
box-sizing: border-box;
width: 100%;
border-bottom: 1px solid #EAEAEA;
margin-top: 14px;
min-height: 50px;
.img {
width: 231px;
height: 33px;
margin: 5px 3px 0 3px;
}
&:last-child {
border-bottom: none;
}
.content {
width: 325px;
height: 40px;
font-family: PingFang SC;
font-weight: 500;
font-size: 16px;
color: #333333;
line-height: 23px;
}
.dianzan {
width: 325px;
height: 20px;
display: flex;
font-size: 13px;
color: #AAAAAA;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
.img {
width: 14.5px;
height: 15px;
}
}
}
.header {}
.header .input_search {
width: 279px;
height: 33px;
background: rgba(193, 193, 193, 0.16);
border-radius: 17px;
// flex: 1;
color: #333333;
border: none;
/* 取消边框 */
margin-left: 10px;
}
.header .btn_search {
width: 60px;
height: 33px;
background: #3974F6;
border-radius: 17px;
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 23px;
border: none;
/* 取消边框 */
margin-right: 10px;
}
</style>

304
src/views/peoSuggestion/topicList.vue

@ -0,0 +1,304 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF;">
<van-search class="flex flex-1" v-model="searchValue" shape="round" placeholder="请输入搜索关键词">
<template #action>
<!-- 添加样式确保按钮显示并设置合适的宽高和对齐 -->
<!-- <div @click="onSearch"
style="display: flex; align-items: center; justify-content: center; padding: 0 10px; cursor: pointer;">
a搜索
</div> -->
</template>
</van-search>
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="handleSearch">查询</van-button>
</div>
<!-- <van-search v-model="searchKey" placeholder="请输入搜索关键词" shape="round" class="custom-search"
@search="$router.push({ path: '/search', query: { searchKey: searchKey } })" /> -->
<div class='container'>
<div class="flex flex-y flex1 flex-end" v-if="PublicityList.length !== 0">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了"
@load="communityPublicity" class="card" :offset="50">
<div class="activity_content flex flex-y" v-for="(item, index) in PublicityList"
:key="index" @click="toDetail(item)">
<div class="flex flex1 oh">
<div class="flex flex-y flex1 m-right10 oh">
<span class="van-multi-ellipsis--l2 text1" >
{{ item.title }}
</span>
<div class="flex flex-end text2">
<span class="van-ellipsis y66666 font-size15">
{{ item.name }} </span>
<div class="">{{ item.time }}</div>
</div>
</div>
<img v-if="item.coverPic" :src="item.coverPic" style="width: 130px;height: 100px;border-radius: 20;"
alt="">
</div>
<div class="flex flex-end flex-center gray m-top10 font-size13">
<!-- <div class="flex flex-center"><img src="@/assets/images/icons/support.png" alt=""
class="img_16 m-right7"><span>{{ item.likes || 0 }}</span>
</div> -->
</div>
</div>
</van-list>
</div>
<div v-else class="no-data">
暂无数据~
</div>
</div>
<Android></Android>
</div>
</template>
<script>
import { advertisingTag, communityPublicity } from '@/api/home';
export default {
data() {
return {
PublicityList: [
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
{
title:"70岁以上高龄老人补贴福利发放于1月1日",
name:"胡冰",
time:"2024-09-10 09:30"
},
],
tagList:[{
id:"0",
tagName:"日常征集"
},
{
id:"1",
tagName:"专题征集"
},
],
tagActive: 'new',
tagId: null,
pageSize: 5,
pageNo: 1,
agencyId: null,
finished: false,
loading: true,
showRegister: false,
searchValue: ""
};
},
created() {
// this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
// this.advertisingTag();//
// this.communityPublicity()//
},
methods: {
toDetail(item){
this.$router.push({name:'topicListDetail',query:{id:item.id}})
},
handleSearch(){
this.PublicityList = [];
this.pageNo = 1;
this.communityPublicity()
},
filterTagId(tagId) {
return this.tagList.filter(item => item.id === tagId)[0].tagName || '--';
},
// async advertisingTag() {
// let parm = {
// pageSize: 10,
// pageNo: 1,
// status: 1,
// tagName: null
// }
// let res = await advertisingTag(parm)
// if (res.code === 0) {
// this.tagList = res.data.list;
// this.tagList.unshift({ tagName: '', id: 'new' })
// }
// },
async communityPublicity() {
let parm = {
pageSize: 10,
pageNo: 1,
title: this.searchValue,
tagId: this.tagId,
startTime: '',
endTime: '',
agencyId: this.agencyId,
status:1
}
let res = await communityPublicity(parm)
if (res.code === 0) {
this.loading = false;
res.data.list.forEach(item => {
if (item.content) {
item.newContent = this.extractChineseCharactersAndPunctuation(item.content)
}
})
if (!res.data || res.data.list.length < this.pageSize) {
this.finished = true;
}
this.PublicityList = this.PublicityList.concat(res.data.list);
}
},
extractChineseCharactersAndPunctuation(str) {
const chineseCharsAndPunctuation = str.match(/[\u4e00-\u9fa5\u3000-\u303F\uff00-\uffef]/g);
return chineseCharsAndPunctuation ? chineseCharsAndPunctuation.join('') : '';
},
handelChangeTags(val, title) {
this.PublicityList = [];
if (val !== 0) {
this.tagId = this.tagList[val].id;
} else {
this.tagId = '';
}
this.communityPublicity()
},
},
components: {},
computed: {},
watch: {},
}
</script>
<style lang='less' scoped>
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 12px;
color: #999999;
line-height: 30px;
}
.text1{
font-family: PingFang SC;
font-weight: 500;
font-size: 18px;
color: #000000;
;
}
.custom-button {
width: 60px;
height: 33px;
}
.activity_content {
padding-bottom: 10px;
box-sizing: border-box;
width: 100%;
border-bottom: 1px solid #EAEAEA;
margin-top: 14px;
min-height: 50px;
.img {
width: 231px;
height: 33px;
margin: 5px 3px 0 3px;
}
&:last-child {
border-bottom: none;
}
.content {
width: 325px;
height: 40px;
font-family: PingFang SC;
font-weight: 500;
font-size: 16px;
color: #333333;
line-height: 23px;
}
.dianzan {
width: 325px;
height: 20px;
display: flex;
font-size: 13px;
color: #AAAAAA;
flex-direction: row;
justify-content: space-evenly;
align-items: center;
.img {
width: 14.5px;
height: 15px;
}
}
}
.header {}
.header .input_search {
width: 279px;
height: 33px;
background: rgba(193, 193, 193, 0.16);
border-radius: 17px;
// flex: 1;
color: #333333;
border: none;
/* 取消边框 */
margin-left: 10px;
}
.header .btn_search {
width: 60px;
height: 33px;
background: #3974F6;
border-radius: 17px;
font-family: PingFang SC;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 23px;
border: none;
/* 取消边框 */
margin-right: 10px;
}
::v-deep .van-search__content {
background-color: white;
border: 1px solid #3974F6;
}
::v-deep .van-search__input {
color: #000;
}
::v-deep .van-field__control::placeholder {
color: #A0A0A0;
}
:deep(.van-field__control) {
font-size: 13px;
}
.van-tab__title {
padding: 5px 12px; /* 内边距调整 */
font-size: 14px; /* 字体大小 */
}
.van-tabs__nav {
justify-content: space-between; /* 平均分布 */
}
</style>

271
src/views/peoSuggestion/topicListDetail.vue

@ -0,0 +1,271 @@
<template>
<div>
<div class='container' style="height: 85vh; overflow: auto;">
<div class="card flex flex-y ">
<div class="m-bottom5">{{ ProblemDescription.eventContent }}</div>
<div class="font-size13 gray">{{ ProblemDescription.happenTime }}</div>
<div class="image-grid" v-for="item in ProblemDescription.imageList" >
<div class="grid-item ">
<img :src="item" style="width: 105px; height: 75px;">
</div>
</div>
<!-- <div class="flex flex-y flex-center1 flex-center2 gray back_color m-top15">
<div class="flex m-top16 flex-center1 flex-center2 vote white">
<div :style="{ width:support1Width}">
<span class="van-ellipsis" style="width: 100px;">支持 {{ ProblemDescription.supportNum }}</span>
<img src="@/assets/images/discusion/VS.png" alt="">
</div>
<div :style="{ width:oppose1Width}"class="text-right van-ellipsis">
反对 {{ ProblemDescription.opposeNum }}
</div>
</div>
<div class="gray font-size13 p-12">{{dataValue}}人参与</div>
</div> -->
</div>
<!-- <div class="bot_btn flex flex-x flex-mean m-bot50 back_color back_color">
<van-button :disabled="disableAllButtons" round class="support"
:icon="require('@/assets/images/icons/support.png')" type="info" @click="handelClicsupport">
支持
</van-button>
<van-button :disabled="disableAllButtons" round class="support"
:icon="require('@/assets/images/icons/oppose.png')" type="info" @click="handelClicopposeNum">
反对
</van-button>
</div> -->
<div class="flex flex-center1 ">
<van-button block color="linear-gradient(to right, #81B5FB, #3E92FF)" style="width: 300px;" round @click="onClickdaily">我要征集</van-button>
</div>
</div>
<Android/>
</div>
</template>
<script>
import { andelClicDetail, handelClicsupport } from '@/api/home';
export default {
data() {
return {
signUp: [
{},
],
dataValue: null,
support: false,
oppose: false,
supportNum: null,
opposeNum: null,
disableAllButtons: false,
eventId: "",
ProblemDescription: {},
vote: {}
};
},
components:{},
created() {
this.eventId = this.$route.query.eventId
this.id = this.$route.query.eventId
this.agencyId = this.$store.state.app.agencyId;
this.userId = this.$store.state.app.userInfo.id;
this.icEventOldDiscussDetil1()
},
computed: {
support1() {
return (this.ProblemDescription.supportNum / this.dataValue)
},
oppose1() {
return (this.ProblemDescription.opposeNum / this.dataValue)
},
support1Width() {
return (!this.support1?50:this.support1.toFixed(2) * 100) + '%';
},
oppose1Width() {
return (!this.oppose1?50:this.oppose1.toFixed(2) * 100) + '%';
}
},
methods: {
onClickdaily(){
this.$router.push({path:'peoSuggestionexplain'})
},
async handelClicsupport() {
let parm = {
eventId: this.eventId,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag: 0
}
let res = await handelClicsupport(parm)
if(res.code == 0){
await this.icEventOldDiscussDetil1()
}
},
async handelClicopposeNum(data) {
let parm = {
eventId: this.eventId,
agencyId: this.agencyId,
userId: this.userId,
opinionFlag: 1
}
let res = await handelClicsupport(parm)
if(res.code === 0){
await this.icEventOldDiscussDetil1()
}
},
async icEventOldDiscussDetil1() {
console.log(this.id, "this.id");
let parm = {
icEventId: this.eventId
}
await andelClicDetail(parm).then(res => {
this.ProblemDescription = res.data;
this.dataValue = res.data.opposeNum + res.data.supportNum
})
},
handsupport() {
this.support = true;
},
},
}
</script>
<style lang='less' scoped>
.image-container {
position: relative;
display: inline-block;
}
.image-grid {
margin-top: 20px;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-flow: row;
/* 自动换行 */
}
.z_img {
width: 10px;
height: 35px;
background: url('@/assets/images/discusion/f-y.png');
background-size: cover;
}
.image-with-text {
position: relative;
display: inline-block;
}
.grid-item {
text-align: center;
}
.support {
background-color: #ffffff;
color: black;
}
.t_sup {
display: inline-flex;
position: absolute;
}
.support_img1 {
height: 35px;
}
.support_img2 {
height: 35px;
}
.header_img_left {
// background:"@/assets/images/discusion/1.png";
background: url('@/assets/images/discusion/h-l.png');
width: 10px;
height: 35px;
background-size: cover;
/* 使背景图片覆盖整个元素 */
}
.header_img_right {
background: url('@/assets/images/discusion/f-l.png');
width: 10px;
height: 35px;
background-size: cover;
/* 使背景图片覆盖整个元素 */
}
.text-overlay {
position: absolute;
bottom: 10px;
/* 文字距离图片底部的距离 */
color: white;
/* 文字颜色,可以根据需要调整 */
padding: 5px;
border-radius: 3px;
/* 可选,圆角 */
font-size: 13px;
text-align: center;
}
.text-overlay1 {
position: absolute;
bottom: 10px;
/* 文字距离图片底部的距离 */
color: white;
/* 文字颜色,可以根据需要调整 */
padding: 5px;
border-radius: 3px;
/* 可选,圆角 */
font-size: 13px;
text-align: center;
right: 0px;
}
.footer_img_left {
background: url('@/assets/images/discusion/h-y.png');
width: 10px;
height: 35px;
background-size: cover;
}
.vote {
width: 100%;
&>:nth-child(1),
>:nth-child(2) {
height: 35px;
line-height: 35px;
padding: 0 11px;
box-sizing: border-box;
font-size: 13px;
}
&>:nth-child(1) {
background: url('@/assets/images/discusion/left-bg.png') no-repeat;
background-size: 97% 100%;
padding: 0 10px;
box-sizing: border-box;
position: relative;
z-index: 4;
&>img{
width: 25px;
height: 25px;
position: absolute;
right: -10px;
top: 5px;
z-index: 10;
}
}
&>:nth-child(2) {
background: url('@/assets/images/discusion/right-bg.png') no-repeat;
background-size: 100% 100%;
z-index: 3;
}
}
</style>

4
vue.config.js

@ -32,8 +32,8 @@ module.exports = defineConfig({
//配置跨域
'/api': {
// target: `https://epmet-preview.elinkservice.cn`,
// target: `http://219.146.91.110:30801`,
target: `http://192.168.1.140`,
target: `http://219.146.91.110:30801`,
// target: `http://192.168.1.140`,
// target: `http://127.0.0.1:8080`,
changeOrigin: true,
ws: false,

Loading…
Cancel
Save