Browse Source

使用反馈我的活动我的积分等

dongming-master
是小王呀\24601 11 months ago
parent
commit
946cb16ec5
  1. 23
      package-lock.json
  2. 3
      package.json
  3. 8
      src/api/home.js
  4. 11
      src/api/integral.js
  5. 8
      src/api/reservationService.js
  6. 26
      src/api/user.js
  7. 6
      src/router/router.config.js
  8. 1
      src/store/index.js
  9. 25
      src/store/modules/app.js
  10. 31
      src/views/home/index.vue
  11. 83
      src/views/mine/Feedback/index.vue
  12. 24
      src/views/mine/index.vue
  13. 46
      src/views/mine/integral/index.vue
  14. 23
      src/views/mine/myActivity/index.vue
  15. 304
      src/views/mine/mySuggestions/index.vue
  16. 18
      src/views/peoSuggestion/solicitationDaily.vue
  17. 69
      src/views/serviceList/reservationService.vue

23
package-lock.json

@ -1986,7 +1986,7 @@
}, },
"dependencies": { "dependencies": {
"@vue/vue-loader-v15": { "@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1", "version": "15.11.1",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz", "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==", "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true, "dev": true,
@ -8500,6 +8500,11 @@
"integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
"dev": true "dev": true
}, },
"shvl": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/shvl/-/shvl-2.0.3.tgz",
"integrity": "sha512-V7C6S9Hlol6SzOJPnQ7qzOVEWUQImt3BNmmzh40wObhla3XOYMe4gGiYzLrJd5TFa+cI2f9LKIRJTTKZSTbWgw=="
},
"side-channel": { "side-channel": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.6.tgz", "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.6.tgz",
@ -10048,6 +10053,22 @@
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmmirror.com/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==" "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
}, },
"vuex-persistedstate": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/vuex-persistedstate/-/vuex-persistedstate-4.1.0.tgz",
"integrity": "sha512-3SkEj4NqwM69ikJdFVw6gObeB0NHyspRYMYkR/EbhR0hbvAKyR5gksVhtAfY1UYuWUOCCA0QNGwv9pOwdj+XUQ==",
"requires": {
"deepmerge": "^4.2.2",
"shvl": "^2.0.3"
},
"dependencies": {
"deepmerge": {
"version": "4.3.1",
"resolved": "https://registry.npmmirror.com/deepmerge/-/deepmerge-4.3.1.tgz",
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="
}
}
},
"watchpack": { "watchpack": {
"version": "2.4.2", "version": "2.4.2",
"resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.2.tgz", "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.2.tgz",

3
package.json

@ -36,7 +36,8 @@
"vue": "^2.7.8", "vue": "^2.7.8",
"vue-demi": "^0.14.0", "vue-demi": "^0.14.0",
"vue-router": "^3.5.4", "vue-router": "^3.5.4",
"vuex": "^3.6.2" "vuex": "^3.6.2",
"vuex-persistedstate": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.10", "@babel/core": "^7.18.10",

8
src/api/home.js

@ -9,6 +9,14 @@ export function communityActivity(data) {
data data
}) })
} }
//活动志愿者(新)
export function activitylist(data) {
return request({
url: `/voluntary/activityInfo/list`,
method: 'post',
data
})
}
//获取新闻列表 //获取新闻列表
export function newsTrends(data) { export function newsTrends(data) {
return request({ return request({

11
src/api/integral.js

@ -0,0 +1,11 @@
// axios
import request from '@/utils/request'
// 获取积分记录
export function selectChangeByUserId(data) {
return request({
url: '/voluntary/points/selectChangeByUserId',
method: 'post',
data
})
}

8
src/api/reservationService.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
export function userdemandAdd(data) {
return request({
url: `/governance/userdemand/add`,
method: 'post',
data
})
}

26
src/api/user.js

@ -1,5 +1,31 @@
// axios // axios
import request from '@/utils/request' import request from '@/utils/request'
//志愿者信息
export function volunteerInfo(data) {
return request({
url: '/voluntary/volunteerInfo/page',
method: 'post',
data
})
}
//意见反馈类型字典
export function dictlist(data) {
return request({
url: `/sys/dict/data/dictlist`,
method: 'post',
message: '获取中...',
data
})
}
//意见反馈上报
export function resiFeedbacksave(data) {
return request({
url: `/sys/resiFeedback/save`,
method: 'post',
message: '上报中...',
data
})
}
// 登录 // 登录
export function login(data) { export function login(data) {

6
src/router/router.config.js

@ -74,6 +74,12 @@ export const constantRouterMap = [
component: () => import('@/views/appeal'), component: () => import('@/views/appeal'),
meta: { title: '我上报的问题', keepAlive: false } meta: { title: '我上报的问题', keepAlive: false }
}, },
{
path: '/appeal',
name: 'appeal',
component: () => import('@/views/appeal'),
meta: { title: '我提交的人民建议', keepAlive: false }
},
{ {
path: '/appealDetail', path: '/appealDetail',
name: 'appealDetail', name: 'appealDetail',

1
src/store/index.js

@ -3,6 +3,7 @@ import Vuex from 'vuex'
import getters from './getters' import getters from './getters'
import app from './modules/app' import app from './modules/app'
Vue.use(Vuex) Vue.use(Vuex)
const store = new Vuex.Store({ const store = new Vuex.Store({

25
src/store/modules/app.js

@ -1,7 +1,8 @@
import {checkWxmpRegister, getUserWechatByUserId} from '@/api/user' import {checkWxmpRegister, getUserWechatByUserId,volunteerInfo} from '@/api/user'
import vuexPersistedstate from 'vuex-persistedstate';
const state = { const state = {
userInfo: {}, userInfo: {},
volunteerInfo:{},
appId: '', appId: '',
realNameFlag:null, realNameFlag:null,
agencyId:null, agencyId:null,
@ -14,6 +15,10 @@ const mutations = {
state.agencyId = userInfo.agencyId; state.agencyId = userInfo.agencyId;
state.realNameFlag = userInfo.realName; state.realNameFlag = userInfo.realName;
}, },
SET_VOLUNTTER_INFO(state,volunteerInfo){
console.log(volunteerInfo,'志愿者用户信息');
state.volunteerInfo = volunteerInfo;
},
SET_APP_ID(state, appId){ SET_APP_ID(state, appId){
state.appId = appId state.appId = appId
}, },
@ -21,11 +26,16 @@ const mutations = {
// console.log(houseId,'houseIdVueX'); // console.log(houseId,'houseIdVueX');
state.houseId = houseId; state.houseId = houseId;
}, },
} }
const actions = { const actions = {
// 设置是否注册 // 设置是否注册
getUserInfo({ commit}) { getUserInfo({ commit}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log("sdf;ll;sdf");
if (Object.keys(state.userInfo).length) { if (Object.keys(state.userInfo).length) {
resolve(state.userInfo) resolve(state.userInfo)
} }
@ -38,10 +48,19 @@ const actions = {
reject(error) reject(error)
}) })
}) })
},
setvolunteerInfo({commit},setvolunteerInfo){
commit('SET_VOLUNTTER_INFO',setvolunteerInfo)
} }
} }
export default { export default {
state, state,
mutations, mutations,
actions actions,
plugins: [
vuexPersistedstate({
storage: window.localStorage, // 使用 localStorage 保持 Vuex 状态
})
]
} }

31
src/views/home/index.vue

@ -226,6 +226,7 @@ import registerDialog from '@/components/registerDialog';
import {guidecategoryTags,guidecategorylist,newsTrends,communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike } from '@/api/home'; import {guidecategoryTags,guidecategorylist,newsTrends,communityActivity, icEventOldDiscuss, advertisingTag, communityPublicity,handelClicsupport,communityPublicityGiveLike } from '@/api/home';
import { querystaffmessage } from '@/api/message'; import { querystaffmessage } from '@/api/message';
import { inspRecord } from '@/api/satisfaction'; import { inspRecord } from '@/api/satisfaction';
import { volunteerInfo } from '@/api/activity';
var timer = null var timer = null
export default { export default {
data() { data() {
@ -285,10 +286,12 @@ export default {
}; };
}, },
created() { created() {
console.log(this.$store.state.app,"sdflkgjskdlfgjskl");
this.agencyId = this.$store.state.app.agencyId; this.agencyId = this.$store.state.app.agencyId;
this.userId = this.$store.state.app.userInfo.id; this.userId = this.$store.state.app.userInfo.id;
this.customerId = this.$store.state.app.userInfo.customerId; this.customerId = this.$store.state.app.userInfo.customerId;
this.userInfo()
console.log(this.$store.state.app,"sdflkgjskdlfgjskl");
this.guidecategoryTag() this.guidecategoryTag()
this.communityActivity()// this.communityActivity()//
this.icEventOldDiscuss()// this.icEventOldDiscuss()//
@ -304,13 +307,29 @@ export default {
this.guidecategorylists() this.guidecategorylists()
var that = this; var that = this;
timer = setInterval(function () { // timer = setInterval(function () {
that.changefunction(); // that.changefunction();
}, 7000) // }, 7000)
}, },
methods: { methods: {
//
userInfo() {
let parm = {
"loginFlag": 1,
"pageNo": 1,
"pageSize": 100
}
volunteerInfo(parm).then(res => {
console.log(res, "lskdfjlkdsf");
this.$store.dispatch('setvolunteerInfo',res.data.list[0])
})
},
// //
changefunction() { changefunction() {
if (this.noticeList.length) {
// console.log(this.noticeList); // console.log(this.noticeList);
let length = this.noticeList.length; let length = this.noticeList.length;
if (this.noticeIndex <= length) { if (this.noticeIndex <= length) {
@ -319,6 +338,10 @@ export default {
this.noticeIndex=0 this.noticeIndex=0
} }
this.noticeText=this.noticeList[this.noticeIndex]//testflaseturefalse this.noticeText=this.noticeList[this.noticeIndex]//testflaseturefalse
}else{
return
}
}, },
// //
newsTrends() { newsTrends() {

83
src/views/mine/Feedback/index.vue

@ -30,40 +30,42 @@
</div> </div>
<div class="container"> <div class="container">
<div class="cell-group"> <div class="cell-group">
<div class="textarea"> <van-field v-model="eventContent" autosize label="诉求描述" maxlength="500" <div class="textarea"> <van-field v-model="content" autosize label="诉求描述" maxlength="500"
placeholder="不超过500字" required rows="6" type="textarea"> placeholder="不超过500字" required rows="6" type="textarea">
</van-field></div> </van-field></div>
</div> </div>
</div> </div>
<van-popup v-model="showType" position="bottom"> <van-popup v-model="showType" position="bottom">
<van-cascader v-model="cascaderValue" title="请选择所属类别" :options="cateOptions" @close="show = false" <van-picker show-toolbar v-model="cascaderValue" title="请选择类别" :columns="backList" :value-key="label" :values="label" @close="show = false" @confirm="onChange" />
:field-names="{ text: 'categoryName', value: 'categoryCode', children: 'children', }" @finish="onChange"
/>
<!-- <van-cascader :options="cateOptions"
:height="400"
@close="close1" @change="onChange" /> -->
</van-popup> </van-popup>
<div style="width: 100%;" class="flex flex-center1 flex-center2 "> <div style="width: 100%;" class="flex flex-center1 flex-center2 ">
<van-button style="width: 300px;" round block @click="submit" color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button> <van-button style="width: 300px;" round block @click="submit"
color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button>
</div> </div>
<Android @send-number="handleNumber"></Android> <Android @send-number="handleNumber"></Android>
</div> </div>
</template> </template>
<script> <script>
import { dictlist,resiFeedbacksave } from '@/api/user'
export default { export default {
name: 'mine', name: 'mine',
data() { data() {
return { return {
showType:false,
cascaderValue:"请选择", cascaderValue:"请选择",
userInfo: {} userInfo: {},
backList:[],
val:[],
type:"",
content:""
} }
}, },
components:{ components:{
}, },
mounted() { mounted() {
this.getDictionaries()
this.$nextTick(()=>{ this.$nextTick(()=>{
setTimeout(()=>{ setTimeout(()=>{
this.userInfo = this.$store.state.app.userInfo; this.userInfo = this.$store.state.app.userInfo;
@ -71,6 +73,67 @@
}) })
}, },
methods: { methods: {
onChange(value,index){
console.log(value,index);
this.showType=false
this.type=this.val[index].value
this.cascaderValue=value
},
onShowPicker(){
this.showType=true
},
//
async getDictionaries () {
// const url = "/sys/dict/data/dictlist";
let params = {
dictType: "feedback_type",
};
dictlist(params).then(res=>{
this.val=res.data
console.log(res.data,"sadflkjsldfk");
this.backList=res.data.map(item=>{
console.log(item.label,"lkdfhkl");
return item.label
})
console.log(this.backList);
})
// const { data, code, msg } = await requestPost(url, params);
// if (code === 0) {
// this.typeList = data;
// } else {
// this.$message.error(msg);
// }
},
//
async submit () {
// const url = "/sys/dict/data/dictlist";
console.log(this.userInfo);
let params = {
dictType: "feedback_type",
customerId:this.userInfo.customerId,
resiId:this.userInfo.id,
type:this.type,
content:this.content
};
resiFeedbacksave(params).then(res=>{
if (res.code==0) {
this.$toast.success('上报成功')
setTimeout(() => {
let query = this.$route.query
this.$router.go(-1)
}, 5000)
}else{
this.$toast.fail(res.msg)
}
})
},
handleNumber(value){ handleNumber(value){
console.log(value,"wl kgnsl, "); console.log(value,"wl kgnsl, ");
this.phone=value this.phone=value

24
src/views/mine/index.vue

@ -21,20 +21,23 @@
</div> </div>
</div> </div>
</div> </div>
<div class="container" style=""> <div class="container">
<div class="integral" > <div class="integral" >
<div class="container flex flex-y" > <div class="container flex flex-y" style="padding-left: 20px;" >
<div class="flex flex-center2 " style="margin-top: 24px;"> <div class="flex flex-center2 " style="margin-top: 24px;">
<img style="width: 50px; height: 50px;" src="../../assets/images/mine/1.png"> <img style="width: 50px; height: 50px;" src="../../assets/images/mine/1.png">
<span style=" color: #BB8022;line-height: 24px;font-size: 25px;font-weight: 600; margin-left: 5px;"> LV4</span> <span style=" color: #BB8022;line-height: 24px;font-size: 25px;font-weight: 600; margin-left: 5px;"> LV4</span>
</div> </div>
<div class="flex flex-center2 " style="margin-top: 24px;"> <div class="flex flex-center2 " style="margin-top: 24px;">
<div class="flex flex-y"> <div class="flex flex-y" style="margin-right: 20px;">
<span>3015</span> <span style="font-size: 20px;color: #A87C35;font-weight: bold;">3015</span>
<span>可用文明币</span> <span style="font-size: 15px;color: #A87C35;font-weight: bold;">可用文明币</span>
</div>
<img style="width: 1px; height:40px;" src="../../assets/images/mine/2.png">
<div class="flex flex-y" style="margin-left: 20px;">
<span style="font-size: 15px;color: #C9A365;font-weight: bold;">3015</span>
<span style="font-size: 13px;color: #C9A365;font-weight: bold;">可用文明币</span>
</div> </div>
<img style="width: 2px; height:40px;" src="../../assets/images/mine/2.png">
<span style=" color: #BB8022;line-height: 24px;font-size: 25px;font-weight: 600; margin-left: 5px;"> LV4</span>
</div> </div>
</div> </div>
</div> </div>
@ -51,6 +54,11 @@
<van-image style="margin-right: 5px" :src="require('@/assets/sq.png')" width="20" height="20" /> <van-image style="margin-right: 5px" :src="require('@/assets/sq.png')" width="20" height="20" />
</template> </template>
</van-cell> </van-cell>
<van-cell title=" 我提交的人民建议" is-link to="/appeal">
<template #icon>
<van-image style="margin-right: 5px" :src="require('@/assets/sq.png')" width="20" height="20" />
</template>
</van-cell>
<van-cell title="我的预约服务" is-link to="/myService"> <van-cell title="我的预约服务" is-link to="/myService">
<template #icon> <template #icon>
<van-image style="margin-right: 5px" :src="require('@/assets/sq.png')" width="20" height="20" /> <van-image style="margin-right: 5px" :src="require('@/assets/sq.png')" width="20" height="20" />
@ -104,6 +112,8 @@ export default {
}, },
mounted() { mounted() {
console.log(this.$store.state,"ds;lf;lsd");
this.$nextTick(()=>{ this.$nextTick(()=>{
setTimeout(()=>{ setTimeout(()=>{
this.userInfo = this.$store.state.app.userInfo; this.userInfo = this.$store.state.app.userInfo;

46
src/views/mine/integral/index.vue

@ -3,7 +3,7 @@
<div class="user-con"> <div class="user-con">
<div class="user-top"> <div class="user-top">
<div class="" style="padding: 40px;"> <div class="" style="padding: 40px;">
<div class="text1"><span class="text2">864</span>积分</div> <div class="text1"><span class="text2">{{ volunteerInfo.points }}</span>积分</div>
<div class="text3"><span>我的积分信息</span></div> <div class="text3"><span>我的积分信息</span></div>
</div> </div>
<!-- <div class="" style="padding: 40px;"><span>864</span>我的积分</div> --> <!-- <div class="" style="padding: 40px;"><span>864</span>我的积分</div> -->
@ -11,28 +11,22 @@
</div> </div>
<div class="container"> <div class="container">
<div class="card" style="position: relative;top: 117px"> <div class="card" style="position: relative;top: 117px">
<div> <div v-for="(item,index) in integralList ">
<div class="flex flex-x flex-end flex-center1 flex-center2"> <div class="flex flex-x flex-end flex-center1 flex-center2">
<div class="flex flex-y"> <div class="flex flex-y">
<div class="text4">积分明细</div>
<div class="text5">积分明细</div>
</div>
<div class="text6">+15</div>
</div>
<div class="van-hairline--bottom"></div>
</div>
<div class="m-top12">
<div class="flex flex-x flex-end flex-center1 flex-center2">
<div class="flex flex-y"> <div class="flex flex-y">
<div class="text4">积分明细</div> <div class="text4">{{item.operationName}}</div>
<div class="text5">积分明细</div> <div class="text5">{{item.createdTime}}</div>
</div>
</div> </div>
<div class="text6">+15</div> <div class="text6">{{ item.pointsDelta}}</div>
</div> </div>
<div class="van-hairline--bottom"></div> <div class="van-hairline--bottom"></div>
</div> </div>
</div> </div>
</div> </div>
@ -58,19 +52,26 @@
</template> </template>
<script> <script>
import { selectChangeByUserId } from '@/api/integral';
export default { export default {
name: 'mine', name: 'mine',
data() { data() {
return { return {
pageNo:1,
pageSize:100,
cascaderValue:"请选择", cascaderValue:"请选择",
userInfo: {} userInfo: {},
volunteerInfo:{},
integralList:[]
} }
}, },
components:{ components:{
}, },
mounted() { mounted() {
this.volunteerInfo=this.$store.state.app.volunteerInfo
console.log(this.volunteerInfo);
this.selectChangeByUserId()
this.$nextTick(()=>{ this.$nextTick(()=>{
setTimeout(()=>{ setTimeout(()=>{
this.userInfo = this.$store.state.app.userInfo; this.userInfo = this.$store.state.app.userInfo;
@ -78,6 +79,19 @@
}) })
}, },
methods: { methods: {
selectChangeByUserId(){
let parm ={
pageNo:this.pageNo,
pageSize:this.pageSize,
startTime:"",
endTime:""
}
selectChangeByUserId(parm).then(res=>{
console.log(res);
this.integralList=res.data.list
})
},
handleNumber(value){ handleNumber(value){
console.log(value,"wl kgnsl, "); console.log(value,"wl kgnsl, ");
this.phone=value this.phone=value

23
src/views/mine/myActivity/index.vue

@ -2,16 +2,18 @@
<div class='container'> <div class='container'>
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communityActivity" class="card" <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communityActivity" class="card"
:offset="50"> :offset="50">
<div class="activity_content flex" v-for="(item, index) in list" :key="index"@click="$router.push({ path: `/activityDetail`,query:{id:item.item} })"> <div class="activity_content flex" v-for="(item, index) in list" :key="index"@click="$router.push({ path: `/activityDetail`,query:{id:item.id} })">
<img :src="item.coverPic" alt="" class="mr10 img_round" style="width: 75px;height: 95px;"> <img :src="item.imgs" alt="" class="mr10 img_round" style="width: 75px;height: 95px;">
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;"> <div class="flex flex-y flex1 flex-end" style="overflow: hidden;">
<div class="van-ellipsis">{{ item.activityName }}</div> <div class="van-ellipsis">{{ item.activityName }}</div>
<div class="address font-size14 van-ellipsis gray">地点{{ item.address }}</div> <div class="address font-size14 van-ellipsis gray">地点{{ item.address }}</div>
<div class="time gray font-size14">时间{{ item.startTime }}</div> <div class="time gray font-size14">时间{{ item.strTime }} {{ item.endTime }}</div>
<div class="flex flex-end"> <div class="flex flex-end">
<div> <div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.participants }}</span>/<span <span>报名人数</span> <span class="font-size18 orange">{{ item.registered }}</span>/<span
class="font-size14">{{ item.participants }}</span> v-if="item.notQuota ===1" class="font-size14">{{ item.quota }}</span>
<span
v-els class="font-size14">不限名额</span>
</div> </div>
<van-button type="info" size="small" round <van-button type="info" size="small" round
:disabled="item.online !== 1">报名</van-button> :disabled="item.online !== 1">报名</van-button>
@ -24,7 +26,7 @@
</template> </template>
<script> <script>
import { communityActivity } from '@/api/home'; import { activitylist } from '@/api/home';
export default { export default {
@ -48,12 +50,17 @@ export default {
const {pageSize,agencyId} = this const {pageSize,agencyId} = this
let parm = { let parm = {
agencyId, agencyId,
content:"",
status:"",
pageNo:this.pageNo++, pageNo:this.pageNo++,
pageSize, pageSize,
userId:this.$store.state.app.userInfo.id, userId:this.$store.state.app.userInfo.id,
online:1 online:1,
strTime:"",
endTime:"",
title:""
} }
let res = await communityActivity(parm) let res = await activitylist(parm)
if (res.code === 0) { if (res.code === 0) {
this.loading = false; this.loading = false;
if (!res.data || res.data.list.length < this.pageSize) { if (!res.data || res.data.list.length < this.pageSize) {

304
src/views/mine/mySuggestions/index.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>

18
src/views/peoSuggestion/solicitationDaily.vue

@ -11,7 +11,7 @@
</div> </div>
<div class="block"> <div class="block">
<div class="textarea"> <div class="textarea">
<van-field v-model="eventContent" autosize label="建议内容" maxlength="800" <van-field v-model="formData.eventContent" autosize label="建议内容" maxlength="800"
placeholder="请输入主要建议内容(内容描述不少于10个 字,不超过800字)" required rows="6" type="textarea"> placeholder="请输入主要建议内容(内容描述不少于10个 字,不超过800字)" required rows="6" type="textarea">
<template #extra> <template #extra>
<span style="color:#C1C1C1; font-size: 15px;line-height: 0">800字以内简要陈述基本事实和情况以及对我市经济建 <span style="color:#C1C1C1; font-size: 15px;line-height: 0">800字以内简要陈述基本事实和情况以及对我市经济建
@ -25,7 +25,7 @@
<div class="block"> <div class="block">
<van-field v-model="eventContent" label="是否愿意公开"> <van-field v-model="eventContent" label="是否愿意公开">
<template #extra> <template #extra>
<van-radio-group v-model="radio" direction="horizontal"> <van-radio-group v-model="openFlag" direction="horizontal">
<van-radio name="1"></van-radio> <van-radio name="1"></van-radio>
<van-radio name="2"></van-radio> <van-radio name="2"></van-radio>
</van-radio-group> </van-radio-group>
@ -41,7 +41,7 @@
</van-cell> </van-cell>
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="name" label="建议人" placeholder="请输入联系人" required> <van-field v-model="formData.name" label="建议人" placeholder="请输入联系人" required>
<template #message> <template #message>
<div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;"> <div style="color:#C1C1C1; font-size: 15px; line-height: 1.5; padding-top: 4px;">
请输入公民姓名法人或社会组织名称 请输入公民姓名法人或社会组织名称
@ -53,7 +53,7 @@
</div> </div>
<div class="block"> <div class="block">
<van-field v-model="phone" label="联系电话" maxlength="11" placeholder="请输入联系电话" required type="number" /> <van-field v-model="formData.mobile" label="联系电话" maxlength="11" placeholder="请输入联系电话" required type="number" />
</div> </div>
<div class="flex flex-center1 "> <div class="flex flex-center1 ">
@ -77,6 +77,16 @@ import { Toast, Dialog } from 'vant'
export default { export default {
data() { data() {
return { return {
formData:{
operationType:"4",
demandType:"idea",
name:"",
mobile:"",
openFlag:"",
eventContent:""
},
radio:"", radio:"",
fileList: [], fileList: [],

69
src/views/serviceList/reservationService.vue

@ -5,23 +5,24 @@
<van-cell required title="服务事项" :value="ServiceProject" /> <van-cell required title="服务事项" :value="ServiceProject" />
</div> </div>
<div class="block"> <div class="block">
<van-cell required title="服务时间" is-link :value="serviceTime" @click="onserviceTime()" /> <van-cell required title="服务时间" is-link :value="formData.wantServiceTime" @click="onserviceTime()" />
<div class="textarea"> <van-field v-model="eventContent" autosize label="诉求描述" maxlength="500" <div class="textarea"> <van-field v-model="formData.content" autosize label="诉求描述" maxlength="500"
placeholder="不超过500字" required rows="6" type="textarea"> placeholder="不超过500字" required rows="6" type="textarea">
</van-field></div> </van-field></div>
<van-field required label="需求人" v-model="surName" placeholder="请输入" /> <van-field required label="需求人" v-model="formData.reportUserName" placeholder="请输入" />
<template> <template>
<van-field required label="联系电话" v-model="mobile" placeholder="请输入" /> <van-field required label="联系电话" v-model="formData.reportUserMobile" placeholder="请输入" />
</template> </template>
</div> </div>
</div> </div>
<van-popup v-model="showserviceTime" position="bottom"> <van-popup v-model="showserviceTime" position="bottom">
<van-datetime-picker v-model="currentDate" type="datetime" title="选择完整时间" :min-date="minDate" <van-datetime-picker v-model="formData.wantServiceTime" type="datetime" title="选择完整时间" :min-date="minDate"
:max-date="maxDate" @confirm="confirm" @cancel="cancel" /> :max-date="maxDate" @confirm="confirm" @cancel="cancel" />
</van-popup> </van-popup>
<Android></Android> <Android></Android>
<div style="width: 100%;" class="flex flex-center1 flex-center2 "> <div style="width: 100%;" class="flex flex-center1 flex-center2 ">
<van-button style="width: 200px;" round block @click="submit" color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button> <van-button style="width: 200px;" round block @click="submit"
color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button>
</div> </div>
</div> </div>
@ -30,12 +31,28 @@
<script> <script>
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { listAllCategory } from '@/api/serviceRes'; import { userdemandAdd } from '@/api/reservationService';
import Picker from '@/components/Picker' import Picker from '@/components/Picker'
import Perfect from '@/components/Perfect' import Perfect from '@/components/Perfect'
export default { export default {
data() { data() {
return { return {
formData:{
finishAttachments: [],
reportTime:dayjs().format('YYYY-MM-DD HH:mm:ss'),
reportType:"self_help",
gridId: "",//
categoryCode: "",//
wantServiceTime: "",//
content: "",//
demandUserName: "",//
reportUserMobile: "",//
reportUserName:"",//
demandUserId:"" //id
},
minDate: new Date(2020, 0, 1), minDate: new Date(2020, 0, 1),
maxDate: new Date(2025, 10, 1), maxDate: new Date(2025, 10, 1),
currentDate: "请选择", currentDate: "请选择",
@ -63,14 +80,18 @@ export default {
}; };
}, },
created() { created() {
// this.agencyId = this.$route.query.agencyId?this.$route.query.agencyId: this.$store.state.app.agencyId;
}, },
mounted() { mounted() {
console.log(this.$store.state.app,"sdkljsdfkl");
console.log(this.$store.state.app.userInfo.id,this.$store.state.app.userInfo.id,"dsklfjklsd");
this.formData.gridId =this.$store.state.app.userInfo.id;
this.formData.demandUserId = this.$store.state.app.userInfo.id;
console.log(this.formData.demandUserId ,this.$store.state.app.id,":dklfdjsklf");
console.log(this.$route.query.name, "sdlkjfklsdjfkldsjfl");
this.ServiceProject=this.$route.query.name; this.ServiceProject=this.$route.query.name;
this.formData.categoryCode=this.$route.query.id;
const pageContent = document.getElementById('page'); const pageContent = document.getElementById('page');
const screenWidth = window.innerWidth; const screenWidth = window.innerWidth;
const screenHeight = window.innerHeight; const screenHeight = window.innerHeight;
@ -81,31 +102,21 @@ export default {
}, },
methods: { methods: {
submit() { submit() {
this.formData.demandUserName = this.formData.reportUserName
const parms={
...this.formData
}
console.log(parms,"dslkjfds");
// saveOfficialAccountEvent({ userdemandAdd(parms).then(() => {
// agencyId:this.agencyId, this.$toast.success('提交成功')
// duration: this.audio.duration,
// serverId: this.audio.serverId,
// imageList: this.fileList.map(item => item.url),
// latitude: this.latitude,
// longitutd: this.longitude,
// address: this.address,
// reporterName: this.name,
// reporterMobile: this.phone,
// eventContent: this.eventContent ? this.eventContent : '',
// userId: this.$store.state.app.userInfo.userId,
// customerId: this.$store.state.app.userInfo.customerId,
// openFlag : 0,
// categoryId: this.categoryId,
// }).then(() => {
// this.$toast.success('')
// this.type = 1 // this.type = 1
// // this.$router.replace('/appeal') // this.$router.replace('/appeal')
// }) })
}, },
confirm(value){ confirm(value){
console.log(value) console.log(value)
this.serviceTime=dayjs(value).format('YYYY-MM-DD HH:mm:ss').toString() this.formData.wantServiceTime=dayjs(value).format('YYYY-MM-DD HH:mm:ss').toString()
console.log(this.currentDate,"时间"); console.log(this.currentDate,"时间");
this.showserviceTime=false this.showserviceTime=false

Loading…
Cancel
Save