Compare commits

...

15 Commits

  1. 1
      .env.development
  2. 10549
      package-lock.json
  3. 2
      package.json
  4. 45
      src/api/activity.js
  5. 2
      src/api/basic.js
  6. 26
      src/api/democratic.js
  7. 8
      src/api/dynamic.js
  8. 10
      src/api/event.js
  9. 10
      src/api/good.js
  10. 26
      src/api/home.js
  11. 17
      src/api/lingCircle.js
  12. 11
      src/api/serviceList.js
  13. 8
      src/api/serviceRes.js
  14. 8
      src/api/servicephone.js
  15. 2
      src/assets/css/index.less
  16. BIN
      src/assets/images/Myservice/context.png
  17. BIN
      src/assets/images/Myservice/time.png
  18. BIN
      src/assets/images/govAffairs/ddls.png
  19. BIN
      src/assets/images/govAffairs/gjjzh.png
  20. BIN
      src/assets/images/govAffairs/jcmx.png
  21. BIN
      src/assets/images/govAffairs/ksyd.png
  22. BIN
      src/assets/images/govAffairs/mx.png
  23. BIN
      src/assets/images/govAffairs/tqmx.png
  24. BIN
      src/assets/images/govAffairs/ybdz.png
  25. BIN
      src/assets/images/govAffairs/ybjg.png
  26. BIN
      src/assets/images/home/activity.png
  27. BIN
      src/assets/images/home/biaoqian.png
  28. BIN
      src/assets/images/home/dianzan/1.png
  29. BIN
      src/assets/images/home/dianzan/2.png
  30. BIN
      src/assets/images/home/dianzan/3.png
  31. BIN
      src/assets/images/home/dianzan/4.png
  32. BIN
      src/assets/images/home/fangzi1.png
  33. BIN
      src/assets/images/home/how1.png
  34. BIN
      src/assets/images/home/how2.png
  35. BIN
      src/assets/images/home/how3.png
  36. BIN
      src/assets/images/home/jianyi.png
  37. BIN
      src/assets/images/home/laba.png
  38. BIN
      src/assets/images/home/manyidu.png
  39. BIN
      src/assets/images/home/serviceGuide.png
  40. BIN
      src/assets/images/home/serviceList.png
  41. BIN
      src/assets/images/home/servicePhone.png
  42. BIN
      src/assets/images/home/shangbao (2).png
  43. BIN
      src/assets/images/home/shangbao.png
  44. BIN
      src/assets/images/home/xiaoren2.png
  45. BIN
      src/assets/images/home/xunxi.png
  46. BIN
      src/assets/images/houseQR/10.png
  47. BIN
      src/assets/images/houseQR/11.png
  48. BIN
      src/assets/images/houseQR/9.png
  49. BIN
      src/assets/images/integral/banner.png
  50. BIN
      src/assets/images/livingCircle/address.png
  51. BIN
      src/assets/images/livingCircle/address1.png
  52. BIN
      src/assets/images/livingCircle/community.png
  53. BIN
      src/assets/images/livingCircle/list.png
  54. BIN
      src/assets/images/livingCircle/map-poi.png
  55. BIN
      src/assets/images/livingCircle/navigation.png
  56. BIN
      src/assets/images/livingCircle/organization.png
  57. BIN
      src/assets/images/livingCircle/position.png
  58. BIN
      src/assets/images/livingCircle/relaxation.png
  59. BIN
      src/assets/images/livingCircle/tel.png
  60. BIN
      src/assets/images/livingCircle/toCommunity.png
  61. BIN
      src/assets/images/peoSuggestion/1.png
  62. BIN
      src/assets/images/peoSuggestion/2.png
  63. BIN
      src/assets/images/peoSuggestion/3.png
  64. BIN
      src/assets/images/peoSuggestion/4.png
  65. BIN
      src/assets/images/peoSuggestion/5.png
  66. BIN
      src/assets/images/peoSuggestion/6.jpg
  67. BIN
      src/assets/images/peoSuggestion/7.jpg
  68. BIN
      src/assets/images/peoSuggestion/8.jpg
  69. BIN
      src/assets/images/peoSuggestion/daily.png
  70. BIN
      src/assets/images/peoSuggestion/special.png
  71. BIN
      src/assets/images/servicePhone/banner (1).png
  72. BIN
      src/assets/images/servicePhone/phone.png
  73. BIN
      src/assets/images/squaredPaper/1.png
  74. BIN
      src/assets/images/squaredPaper/10.png
  75. BIN
      src/assets/images/squaredPaper/11.png
  76. BIN
      src/assets/images/squaredPaper/12.png
  77. BIN
      src/assets/images/squaredPaper/2.png
  78. BIN
      src/assets/images/squaredPaper/3.png
  79. BIN
      src/assets/images/squaredPaper/4.png
  80. BIN
      src/assets/images/squaredPaper/5.png
  81. BIN
      src/assets/images/squaredPaper/6.png
  82. BIN
      src/assets/images/squaredPaper/7.png
  83. BIN
      src/assets/images/squaredPaper/8.png
  84. BIN
      src/assets/images/squaredPaper/9.png
  85. BIN
      src/assets/images/user1.png
  86. 4
      src/components/Share/index.vue
  87. 11
      src/plugins/vant.js
  88. 181
      src/router/router.config.js
  89. 113
      src/utils/wgs84_to_gcj02.js
  90. 378
      src/views/activity/detail.vue
  91. 28
      src/views/activity/index.vue
  92. 447
      src/views/activity/sing.vue
  93. 27
      src/views/appeal/index.vue
  94. 13
      src/views/appealDetail/index.less
  95. 55
      src/views/appealDetail/index.vue
  96. 34
      src/views/communityPublicity/detail.vue
  97. 73
      src/views/communityPublicity/index.vue
  98. 349
      src/views/democratic/detail.vue
  99. 231
      src/views/democratic/index.vue
  100. 192
      src/views/dynamic/index.vue

1
.env.development

@ -2,4 +2,5 @@ NODE_ENV='development'
# must start with VUE_APP_
VUE_APP_ENV = 'development'
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'

10549
package-lock.json

File diff suppressed because it is too large

2
package.json

@ -20,6 +20,7 @@
"@vue-office/pdf": "^1.0.0",
"amfe-flexible": "^2.2.1",
"axios": "^0.27.2",
"coordtransform": "^2.1.2",
"core-js": "^3.23.3",
"dayjs": "^1.11.7",
"eslint": "^8.12.0",
@ -28,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",

45
src/api/activity.js

@ -11,7 +11,30 @@ export function addActivityRecord(data) {
}
export function detail(id) {
return request({
url: `/actual/base/communityActivity/detail/${id}`,
url: `/voluntary/activityInfo/detail/${id}`,
method: 'get',
})
}
//取消报名
export function clockIn(data) {
return request({
url: '/voluntary/activitySignIn/clockIn',
method: 'post',
data
})
}
//发布实况
export function cancelSignUp1(id) {
return request({
url: `voluntary/activityApply/cancelSignUp/${id}`,
method: 'post',
})
}
//活动报名
export function activityApplySave(id) {
return request({
url: `voluntary/activityApply/signUp/${id}`,
method: 'get',
})
}
@ -29,4 +52,22 @@ export function communityActivityApplicationRecordDelete(data) {
method: 'post',
data
})
}
}
//报名列表
export function activityApply(data) {
return request({
url: `/voluntary/activityApply/list?activityId=${data.activityId}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
method: 'get',
})
}
//活动打卡记录
export function activitySignIn(data) {
return request({
url: `/voluntary/activitySignIn/list?activityId=${data.activityId}&pageNo=${data.pageNo}&pageSize=${data.pageSize}&whether=${data.whether}`,
method: 'get',
})
}

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)

26
src/api/democratic.js

@ -0,0 +1,26 @@
// axios
import request from '@/utils/request'
//扫描二维码获取房屋信息
export function communityDemocry(data) {
return request({
url: `/governance/democracyelection/resi/list`,
method: 'post',
data
})
}
export function getDemocryDetail(data) {
return request({
url: `/governance/democracyelection/resi/info?electionId=${data.electionId}&resiId=${data.resiId}`,
method: 'get'
})
}
export function democraticVote(data) {
return request({
url: `/governance/democracyelection/resi/vote`,
method: 'post',
data
})
}

8
src/api/dynamic.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
//扫描二维码获取房屋信息
export function newsTrendsdetail(id) {
return request({
url: `/voluntary/newsTrends/detail/${id}`,
method: 'get',
})
}

10
src/api/event.js

@ -65,4 +65,14 @@ export function eventDetail(data) {
message: '获取事件详情中...',
data
})
}
// 获取事件类别
export function getCategoryTree(data) {
return request({
url: `/governance/icEvent/getCategoryTree`,
method: 'post',
message: '获取事件类别中...',
data
})
}

10
src/api/good.js

@ -0,0 +1,10 @@
// axios
import request from '@/utils/request'
//扫描二维码获取房屋信息
export function getGoodInfoQR(id) {
return request({
url: `/actual/base/materialcode/hfive/info/${id}`,
method: 'get',
})
}

26
src/api/home.js

@ -4,7 +4,15 @@ import request from '@/utils/request'
// 【社区服务】活动列表+轮播图
export function communityActivity(data) {
return request({
url: `/actual/base/communityActivity/page`,
url: `/voluntary/activityInfo/list`,
method: 'post',
data
})
}
//获取新闻列表
export function newsTrends(data) {
return request({
url: `/voluntary/newsTrends/list`,
method: 'post',
data
})
@ -26,6 +34,22 @@ export function icEventOldDiscuss(data) {
data
})
}
// 【办事指南】菜单
export function listAllCategory(data) {
return request({
url: `/governance/guidecategory/page`,
method: 'post',
data
})
}
// 【办事指南】菜单
export function guidecategorylist(data) {
return request({
url: `/govrnance/guidecategory/page`,
method: 'post',
data
})
}
// 【社区讯息】菜单
export function communityPublicity(data) {
return request({

17
src/api/lingCircle.js

@ -0,0 +1,17 @@
// axios
import request from '@/utils/request'
//获取生活圈
export function sphereLifeSearchList(parm) {
return request({
url: `/voluntary/sphereLife/searchList?lon=${parm.lon}&lat=${parm.lat}&name=${parm.name}`,
method: 'get',
})
}
//获取生活圈
export function sphereLifeSearcdetail(id) {
return request({
url: `/voluntary/sphereLife/detail/${id}`,
method: 'get',
})
}

11
src/api/serviceList.js

@ -0,0 +1,11 @@
// axios
import request from '@/utils/request'
// 获取需求列表
export function treeList(data) {
return request({
url: `/governance/commonServiceType/treeList`,
method: 'get',
message: '获取列表中...',
data
})
}

8
src/api/serviceRes.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
export function listAllCategory(data) {
return request({
url: `/actual/base/serviceitem/listAllCategory`,
method: 'post',
data
})
}

8
src/api/servicephone.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
export function allgrids(data) {
return request({
url: `/gov/org/grid/allgrids`,
method: 'post',
data
})
}

2
src/assets/css/index.less

@ -113,7 +113,7 @@ body #app {
margin-left: 12px;
}
&-left5{
margin-left: 12px;
margin-left: 5px;
}
&-left012{
margin-left: -5px;

BIN
src/assets/images/Myservice/context.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

BIN
src/assets/images/Myservice/time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

BIN
src/assets/images/govAffairs/ddls.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
src/assets/images/govAffairs/gjjzh.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
src/assets/images/govAffairs/jcmx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
src/assets/images/govAffairs/ksyd.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/assets/images/govAffairs/mx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
src/assets/images/govAffairs/tqmx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/images/govAffairs/ybdz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/assets/images/govAffairs/ybjg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/assets/images/home/activity.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
src/assets/images/home/biaoqian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

BIN
src/assets/images/home/dianzan/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

BIN
src/assets/images/home/dianzan/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

BIN
src/assets/images/home/dianzan/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

BIN
src/assets/images/home/dianzan/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

BIN
src/assets/images/home/fangzi1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/images/home/how1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
src/assets/images/home/how2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
src/assets/images/home/how3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
src/assets/images/home/jianyi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

BIN
src/assets/images/home/laba.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
src/assets/images/home/manyidu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
src/assets/images/home/serviceGuide.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/assets/images/home/serviceList.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src/assets/images/home/servicePhone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
src/assets/images/home/shangbao (2).png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
src/assets/images/home/shangbao.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/images/home/xiaoren2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/images/home/xunxi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
src/assets/images/houseQR/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
src/assets/images/houseQR/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
src/assets/images/houseQR/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
src/assets/images/integral/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
src/assets/images/livingCircle/address.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/images/livingCircle/address1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
src/assets/images/livingCircle/community.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
src/assets/images/livingCircle/list.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/images/livingCircle/map-poi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/images/livingCircle/navigation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
src/assets/images/livingCircle/organization.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
src/assets/images/livingCircle/position.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/assets/images/livingCircle/relaxation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
src/assets/images/livingCircle/tel.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
src/assets/images/livingCircle/toCommunity.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 KiB

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
src/assets/images/servicePhone/banner (1).png

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

BIN
src/assets/images/servicePhone/phone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/assets/images/squaredPaper/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/images/squaredPaper/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/images/squaredPaper/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/images/squaredPaper/12.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

BIN
src/assets/images/squaredPaper/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/images/squaredPaper/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/assets/images/squaredPaper/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/assets/images/squaredPaper/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/images/squaredPaper/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/images/squaredPaper/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/images/squaredPaper/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/images/user1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

4
src/components/Share/index.vue

@ -25,6 +25,10 @@ export default {
required: false
},
},
created(){
console.log("sdlkfjlsdf");
},
computed: {
},

11
src/plugins/vant.js

@ -28,9 +28,11 @@ import {
SwipeItem,
NoticeBar,
CellGroup,
Overlay
Overlay,
Cascader,
TreeSelect,
DatetimePicker,
} from 'vant'
Vue.use(Button)
.use(Field)
.use(Cell)
@ -58,4 +60,7 @@ Vue.use(Button)
.use(SwipeItem)
.use(NoticeBar)
.use(CellGroup)
.use(Overlay)
.use(Overlay)
.use(Cascader)
.use(TreeSelect)
.use(DatetimePicker)

181
src/router/router.config.js

@ -9,6 +9,24 @@ export const constantRouterMap = [
component: () => import('@/views/home'),
meta: { title: '首页', keepAlive: false }
},
{
path: '/index1',
name: 'index1',
component: () => import('@/views/home2'),
meta: { title: '设备关闭', keepAlive: false }
},
{
path: '/livingCircle',
name: 'livingCircle',
component: () => import('@/views/livingCircle'),
meta: { title: '生活圈', keepAlive: false }
},
{
path: '/livingCircleDetail',
name: 'livingCircleDetail',
component: () => import('@/views/livingCircle/detail.vue'),
meta: { title: '生活圈详情', keepAlive: false }
},
{
path: '/mine',
name: 'mine',
@ -101,12 +119,88 @@ export const constantRouterMap = [
component: () => import('@/views/discussion'),
meta: { title: '居民议事', keepAlive: false }
},
{
path: '/servicePhone',
name: 'servicePhone',
component: () => import('@/views/servicePhone'),
meta: { title: '服务电话', keepAlive: false }
},
{
path: '/activityDetail',
name: 'activityDetail',
component: () => import('@/views/activity/detail'),
meta: { title: '活动详情', keepAlive: false }
},
{
path: '/peoSuggestion',
name: 'peoSuggestion',
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',
@ -130,12 +224,36 @@ export const constantRouterMap = [
component: () => import('@/views/communityPublicity'),
meta: { title: '社区讯息', keepAlive: false }
}
,{
path: '/serviceGuide',
name: 'serviceGuide',
component: () => import('@/views/serviceGuide'),
meta: { title: '办事指南', keepAlive: false }
}
,{
path: '/communityPublicityDetail',
name: 'communityPublicityDetail',
component: () => import('@/views/communityPublicity/detail'),
meta: { title: '详情', keepAlive: false }
},{
path: '/serviceGuideDetail',
name: 'serviceGuideDetail',
component: () => import('@/views/serviceGuide/detail'),
meta: { title: '办事详情', keepAlive: false }
},
{
path: '/serviceList',
name: 'serviceList',
component: () => import('@/views/serviceList/index'),
meta: { title: '服务清单', keepAlive: false }
},
{
path: '/reservationService',
name: 'reservationService',
component: () => import('@/views/serviceList/reservationService'),
meta: { title: '预约服务', keepAlive: false }
},
{
path: '/mySatisfaction',
name: 'mySatisfaction',
component: () => import('@/views/mine/mySatisfaction'),
@ -146,6 +264,69 @@ export const constantRouterMap = [
component: () => import('@/views/mine/myActivity'),
meta: { title: '我参与的活动', keepAlive: false }
}
,{
path: '/Feedback',
name: 'Feedback',
component: () => import('@/views/mine/Feedback'),
meta: { title: '意见反馈', keepAlive: false }
},
{
path: '/myService',
name: 'myService',
component: () => import('@/views/mine/myService'),
meta: { title: '意见反馈', keepAlive: false }
},
{
path: '/integral',
name: 'integral',
component: () => import('@/views/mine/integral'),
meta: { title: '积分记录', keepAlive: false }
},
{
path: '/dynamic',
name: 'dynamic',
component: () => import('@/views/dynamic'),
meta: { title: '动态详情', keepAlive: false }
},
{
path: '/govAffairs',
name: 'govAffairs',
component: () => import('@/views/govAffairs'),
meta: { title: '政务办理', keepAlive: false }
},
{
path: '/supervision',
name: 'supervision',
component: () => import('@/views/supervision'),
meta: { title: '民主监督', keepAlive: false }
},
{
path: '/employment',
name: 'employment',
component: () => import('@/views/employment'),
meta: { title: '就业服务', keepAlive: false }
},{
path: '/checklist',
name: 'communityPublicity',
component: () => import('@/views/communityPublicity'),
meta: { title: '一次办结清单', keepAlive: false }
},{
path: '/goodsQR',
name: 'goodsQR',
component: () => import('@/views/goodsQR'),
meta: { title: '物品详情', keepAlive: false }
},{
path: '/democratic',
name: 'democratic',
component: () => import('@/views/democratic'),
meta: { title: '民主选举', keepAlive: false }
},{
path: '/democraticDetail',
name: 'democraticDetail',
component: () => import('@/views/democratic/detail'),
meta: { title: '民主选举', keepAlive: false }
}
]

113
src/utils/wgs84_to_gcj02.js

@ -0,0 +1,113 @@
var x_PI = (3.14159265358979324 * 3000.0) / 180.0;
var PI = 3.1415926535897932384626;
var a = 6378245.0; //卫星椭球坐标投影到平面地图坐标系的投影因子。
var ee = 0.00669342162296594323; //椭球的偏心率。
//判断是否在国内,在中国国内的经纬度才需要做偏移
function out_of_china(lng, lat) {
return (
lng < 72.004 ||
lng > 137.8347 ||
(lat < 0.8293 || lat > 55.8271 || false)
);
}
//转化经度
function transformlng(lng, lat) {
var ret =
300.0 +
lng +
2.0 * lat +
0.1 * lng * lng +
0.1 * lng * lat +
0.1 * Math.sqrt(Math.abs(lng));
ret +=
((20.0 * Math.sin(6.0 * lng * PI) +
20.0 * Math.sin(2.0 * lng * PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(lng * PI) +
40.0 * Math.sin((lng / 3.0) * PI)) *
2.0) /
3.0;
ret +=
((150.0 * Math.sin((lng / 12.0) * PI) +
300.0 * Math.sin((lng / 30.0) * PI)) *
2.0) /
3.0;
return ret;
}
//转化纬度
function transformlat(lng, lat) {
var ret =
-100.0 +
2.0 * lng +
3.0 * lat +
0.2 * lat * lat +
0.1 * lng * lat +
0.2 * Math.sqrt(Math.abs(lng));
ret +=
((20.0 * Math.sin(6.0 * lng * PI) +
20.0 * Math.sin(2.0 * lng * PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(lat * PI) +
40.0 * Math.sin((lat / 3.0) * PI)) *
2.0) /
3.0;
ret +=
((160.0 * Math.sin((lat / 12.0) * PI) +
320 * Math.sin((lat * PI) / 30.0)) *
2.0) /
3.0;
return ret;
}
//wgs84 to gcj02 地球坐标系 转 火星坐标系
export function wgs84_to_gcj02(lng, lat) {
if (out_of_china(lng, lat)) {
return [lng, lat];
} else {
var dlat = transformlat(lng - 105.0, lat - 35.0);
var dlng = transformlng(lng - 105.0, lat - 35.0);
var radlat = (lat / 180.0) * PI;
var magic = Math.sin(radlat);
magic = 1 - ee * magic * magic;
var sqrtmagic = Math.sqrt(magic);
dlat =
(dlat * 180.0) /
(((a * (1 - ee)) / (magic * sqrtmagic)) * PI);
dlng =
(dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * PI);
var mglat = lat + dlat;
var mglng = lng + dlng;
return [mglng, mglat];
}
}
//gcj02 to wgs84 火星坐标系 转 地球坐标系
export function gcj02_to_wgs84(lng, lat) {
if (out_of_china(lng, lat)) {
return [lng, lat]
}
else {
var dlat = transformlat(lng - 105.0, lat - 35.0);
var dlng = transformlng(lng - 105.0, lat - 35.0);
var radlat = lat / 180.0 * PI;
var magic = Math.sin(radlat);
magic = 1 - ee * magic * magic;
var sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI);
dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI);
mglat = lat + dlat;
mglng = lng + dlng;
return [lng * 2 - mglng, lat * 2 - mglat]
}
}

378
src/views/activity/detail.vue

@ -1,11 +1,24 @@
<template>
<div>
<div class='container m-bot50' :style="this.phone=='Phone'?'':'height: 85vh; overflow: auto;'">
<div class="card">
<img :src="info.coverPic" alt="" style="width: 100%;">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">{{ info.activityName }}</h2>
<van-cell class="m-top15" :border="false" :title-style="{ 'max-width': '100px' }"
<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="info" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="info.imgs" style="width: 100%; height: 150px;" />
</div>
<div class='' style="position: relative;top: -10px;">
<div class="card">
<div class=" flex flex-y p0">
<div class="flex flex-x"> <van-tag
:color="info.status ===1? '#0a998c':info.status ===0?'#f79b41':'#dbdbdb'" size="small"
text-color="#fff7e5">{{info.status === 0?'未开始':info.status === 1?'进行中':'已结束'}}</van-tag>
<h2 style="margin: 0; font-size: 21px; margin-left: 10px;">{{ info.title }}</h2>
</div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动地点: </span><span>{{
info.address }}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时间:
</span><span>{{info.strTime}} {{info.endTime}}</span></div>
<!-- <van-cell class="m-top15" :border="false" :title-style="{ 'max-width': '100px' }"
:value-style="{ 'max-width': '250px' }" title="活动时间:"
:value="`${info.startTime} 至 ${info.endTime}`"></van-cell>
<van-cell :border="false" :title-style="{ 'max-width': '140px' }" title="报名开始时间:"
@ -17,58 +30,162 @@
<van-cell :border="false" :title-style="{ 'max-width': '80px' }" title="举办方:"
:value="info.assistingParty"></van-cell>
<van-divider />
<div v-html="info.content"></div>
<div v-html="info.content"></div> -->
</div>
</div>
</div>
<div class="card m-top10" v-if="info.online === 1">
<div class="title"><span>活动报名</span></div>
<van-cell-group v-for="(item, index) in signUp" :border="false">
<van-field v-model="signUp[index].name" required :label="`姓名${index + 1}`" placeholder="请输入用户名" />
<van-field v-model="signUp[index].mobile" required label="联系电话" placeholder="请输入您的电话号码" />
<van-field v-model="signUp[index].remark" label="备注" placeholder="请输入" rows="3" autosize
type="textarea" />
<div class="flex flex-center1 m-top12">
<div class="flex flex-center2 flex-center1 flex1" @click="handelAddResi"
v-if="index + 1 === signUp.length"> <img src="@/assets/images/icons/add.png" alt=""
class="img_20 m-right7">添加</div>
<div class="flex flex-center2 flex-center1 flex1" v-show="signUp.length > 1"
@click="handelDelResi(item, index)">
<img src="@/assets/images/icons/del.png" alt="" class="img_20 m-right7">删除
</div>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">活动信息</h2>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>所属项目: </span><span
style="color: black;">{{info.projectName}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>招募截止: </span><span
style="color: black;">{{info.deadline}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>签到时间: </span><span
style="color: black;">{{info.signInTime+' 至 '+info.signOutTime}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动名额: </span><span
style="color: black;"><span v-if="info.notQuota === 1">{{info.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;">{{info.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>联系电话: </span><span
style="color: black;">{{info.linkman}}</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>活动时长: </span><span
style="color: black;">{{info.serviceTime}}小时</span></div>
<div style="font-size: 16px;color: #999999; line-height: 30px;"><span>积分奖励: </span><span
style="color: black;">{{info.points}}</span></div>
</div>
</van-cell-group>
</div>
</div>
<div class="bot_btn flex flex-center2 " :style="this.phone=='Phone'?'height:50px;bottom:0':'height: 50px;bottom:5vh;'">
<div class="flex1 flex flex-center1 flex-center2">报名人数<span class="orange font-size18">{{
info.currentParticipants || 0 }}</span> / {{ info.participants }}</div>
<div class="flex1 flex flex-center1 flex-center2">
<van-button size="small" class="m-right7" round @click="showShare = true">
<template #icon>
<img src="@/assets/images/icons/share.png" alt="" class="img_20">
</template> 转发</van-button>
<van-button type="info" size="small" :disabled="disabledRecord(info)" round @click="save" v-if="info.online === 1">立即报名</van-button>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">招募要求</h2>
<div v-html="info.conditions"></div>
</div>
</div>
</div>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">活动详情</h2>
<div v-html="info.content"></div>
</div>
</div>
</div>
<div class='container' style="position: relative;top: -10px;">
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">报名志愿者{{applyList.length}}</h2>
<div v-for="(item, index) in applyList" :key="index" class="flex m-top12"
style="width: 100%; overflow-x: scroll;overflow-y: hidden;">
<div>
<img :src="item.headImg" style="width: 35px; height: 35px;">
<div> <span style="font-size: 14px;">{{item.realName}}</span></div>
</div>
</div>
</div>
</div>
</div>
<Share :show="showShare" @closeShare="showShare = false" />
<register-dialog v-if="showRegister" @close="showRegister = false" :registerFlag="registerFlag" :content="'请您先进行注册。'"></register-dialog>
<div class='container m-bot50' :style="this.phone=='Phone'?'':'height: 85vh; overflow: auto;'">
<div class="card m-top10">
<div class="title"><span>活动打卡</span></div>
<div v-for="(item, index) in signInList" :key="index" class="m-top15 p0">
<div class="flex flex-x">
<img :src="item.headImg?item.headImg:require('@/assets/images/user1.png')"
style="width: 35px; height: 35px;">
<div class="m-left12">
<div style="font-size: 14px;">{{item.realName}}</div>
<div style="font-size: 14px;">{{item.applyTime}}</div>
</div>
</div>
<div class="van-hairline--bottom"></div>
</div>
</div>
<div class="card m-top10">
<div class="title"><span>活动实况</span></div>
<div v-for="(item, index) in realTimeList" :key="index" class="m-top15 p0">
<div>
<div class="flex flex-x">
<img :src="item.headImg ? item.headImg : require('@/assets/images/user1.png')"
style="width: 35px; height: 35px;">
<div class="m-left12">
<div style="font-size: 14px;">{{ item.realName }}</div>
<div style="font-size: 14px;">{{ item.applyTime }}</div>
</div>
</div>
<div>{{ item.content }}</div>
</div>
</div>
</div>
<div class="bot_btn flex flex-center2 flex-center1 "
:style="this.phone=='Phone'?'height:50px;bottom:0':'height: 50px;bottom:5vh;'">
<!-- <div class="flex1 flex flex-center1 flex-center2">报名人数<span class="orange font-size18">{{
info.currentParticipants || 0 }}</span> / {{ info.participants }}</div>
<div class="flex1 flex flex-center1 flex-center2">
<van-button size="small" class="m-right7" round @click="showShare = true">
<template #icon>
<img src="@/assets/images/icons/share.png" alt="" class="img_20">
</template> 转发</van-button>
<van-button type="info" size="small" :disabled="disabledRecord(info)" round @click="save"
v-if="info.online === 1">立即报名</van-button>
</div> -->
<div v-if="info.status === 1 || info.status === 0">
<van-button round @click="toApply"
custom-style="background-color:#ffecec;height:76rpx;width:240rpx;"style="background-color:#ffecec;height:76rpx;width:240rpx;" color="#fd4845" plain
hairline v-if="applyType && applyedTimeType">报名</van-button>
<van-button v-if="!applyType && info.signFlag != 1" round
custom-style="height:76rpx;color:#333333;font-weight: 600;margin-right:73rpx; width:240rpx;" style="background-color:#ffecec;height:76rpx;width:240rpx;"
color="#333333" plain hairline type="info" @click="cancelSignUp">取消报名</van-button>
<van-button v-if="!applyType && signOutTimeType && info.signFlag !== 1" round @click="toSign"
custom-style="background-color:#ffecec;height:76rpx;width:240rpx;" color="#fd4845" plain style="background-color:#ffecec;height:76rpx;width:240rpx;"
hairline data-type="sign">打卡签到</van-button>
<van-button v-if="info.signFlag === 1" round @click="toSign"
custom-style="background-color:#ffecec;height:76rpx;width:240rpx;" color="#fd4845" plain style="background-color:#ffecec;height:76rpx;width:240rpx;"
hairline>发布实况</van-button>
</div>
</div>
<Share :show="showShare" @closeShare="showShare = false" />
<register-dialog v-if="showRegister" @close="showRegister = false" :registerFlag="registerFlag"
:content="'请您先进行注册。'"></register-dialog>
</div>
<Android @send-number="handleNumber"/>
</div>
<Android @send-number="handleNumber" />
</div>
</template>
<script>
import { addActivityRecord, detail, communityActivityApplicationRecordDelete,getById } from "@/api/activity"
import { activitySignIn,activityApply,addActivityRecord,cancelSignUp1, detail,
communityActivityApplicationRecordDelete,getById,activityApplySave} from "@/api/activity"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
applyedTimeType:false,
ActName:"",
info: null,
signInList: [],
applyType: false,
activityId: null,
realTimeList: [],
projectList: [],
realTimeList:[],
signInList:[],
applyList:[],
activityList: [],
signUp: [
{ name: "", mobile: "", remark: "" },
@ -84,16 +201,112 @@ export default {
},
async mounted() {
setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
if (this.$route.query.id) {
this.activityId= 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.activitySignIn(1)
this.activitySignIn(0)
}
},
methods: {
toSign(e) {
console.log(e.currentTarget.dataset, "e.currentTarget.dataset ");
this.$router.push({ path: `/sing`, query: { id: this.activityId,type:e.currentTarget.dataset.type } });
// wx.navigateTo({
// url: `/subpages/activity/pages/sign/sign?activityId=${this.data.activityId}&type=${e.currentTarget.dataset.type}&latitude=${e.currentTarget.dataset.latitude}&longitude=${e.currentTarget.dataset.longitude}`,
// })
},
//
cancelSignUp() {
Dialog.confirm({
title: '标题',
message: '弹窗内容',
})
.then(() => {
console.log("用户点击了确认");
cancelSignUp1(this.activityId).then(res => {
console.log(res, "取消报名返回结果");
if (res.code === 0) {
this.applyType = true; //
this.$toast.success("取消报名成功"); //
} else {
this.$toast.fail(res.message || "取消报名失败");
}
})
})
.catch(() => {
console.log("取消");
});
// Dialog.confirm({
// title: '',
// message: '',
// })
// .then(() => {
// //
// console.log("");
// cancelSignUp1(this.data.activityId)
// .then(res => {
// console.log(res, "");
// if (res.code === 0) {
// this.applyType = true; //
// this.$toast.success(""); //
// } else {
// this.$toast.fail(res.message || "");
// }
// })
// .catch(error => {
// console.error("", error);
// this.$toast.fail("");
// })
// .finally(() => {
// // loading
// });
// })
// .catch(() => {
// //
// console.log("");
// });
},
//
toApply() {
console.log("dsklfjklsf");
Dialog.confirm({
title: '提示',
message: '您确定要报名吗?',
})
.then(() => {
activityApplySave(this.activityId).then(res => {
console.log(res,"sdflkjlsfjd");
Dialog.alert({
// title: '',
message: '报名成功',
})
// wx.showToast({
// title: '',
// duration: 2000,
// success: () => {
// setTimeout(() => {
// wx.navigateBack()
// }, 2000)
// }
// })
}).catch(err => {
console.log(err);
})
})
.catch(() => {
// on cancel
});
},
share() {
let than = this
if (wx.updateAppMessageShareData) {
@ -122,6 +335,46 @@ export default {
success: function () {}
})
}
},
//
activitySignIn(whether) {
let parm = {
pageNo: 1,
pageSize: 100,
activityId: this.activityId,
whether: whether
}
activitySignIn(parm).then(res => {
if (res.code === 0) {
if (whether === 1) {
this.signInList=res.data.list
} else {
this.realTimeList=res.data.list
}
}
}).catch(err => {
})
},
//
activityApplyList() {
let parm = {
pageNo: 1,
pageSize: 100,
activityId: this.activityId
}
activityApply(parm).then(res => {
if (res.code === 0) {
this.applyList=res.data.list
}
}).catch(err => {
})
},
handleNumber(value){
console.log(value,"wl kgnsl, ");
@ -132,24 +385,32 @@ export default {
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime();
this.isPast = specifiedTimestamp < currentTimestamp;
},
//
async detail(id, delId) {
const handleResponse = (res) => {
if (res.code === 0) {
this.info = res.data;
this.info.participants = res.data.participants;
this.info.currentParticipants = res.data.currentParticipants;
if (res.data.recordList && res.data.recordList.length > 0) {
this.signUp = res.data.recordList;
}
if (res.data.cutOffTime) {
this.checkIfPast();
}
this.info.signInTime=res.data.signInTime.slice(0, 16),
this.info.signOutTime=res.data.signOutTime.slice(0, 16),
console.log(this.info,"wl info");
// this.applyType = res.data.applyed === 0 ? true : false,
this.applyedTimeType = this.isCurrentTimeBefore(res.data.deadline),
console.log(this.applyedTimeType,"sdfkjdskfl");
this.signOutTimeType = this.isCurrentTimeBetween(res.data.signInTime, res.data.signOutTime)
// this.info.participants = res.data.participants;
// this.info.currentParticipants = res.data.currentParticipants;
// if (res.data.recordList && res.data.recordList.length > 0) {
// this.signUp = res.data.recordList;
// }
// if (res.data.cutOffTime) {
// this.checkIfPast();
// }
}
};
if (delId) {
this.signUp = this.signUp.filter(item => item.id != delId);
}
// if (delId) {
// this.signUp = this.signUp.filter(item => item.id != delId);
// }
let res = await detail(id);
handleResponse(res);
},
@ -177,6 +438,17 @@ export default {
handelAddResi() {
this.signUp.push({ name: "", mobile: "", remark: "", })
},
isCurrentTimeBetween(startTime, endTime) {
const current = new Date().getTime();
const startTimestamp = new Date(startTime).getTime();
const endTimestamp = new Date(endTime).getTime();
return current >= startTimestamp && current <= endTimestamp;
},
isCurrentTimeBefore(targetTime) {
const current = new Date().getTime();
const targetTimestamp = new Date(targetTime).getTime();
return current < targetTimestamp;
},
handelDelResi(item, index) {
if (item.id) {
let than = this

28
src/views/activity/index.vue

@ -4,15 +4,15 @@
:offset="50">
<div class="activity_content flex" v-for="(item, index) in activityList" :key="index"
@click="handelClickJump('activityDetail', item)">
<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="van-ellipsis">{{ item.activityName }}</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" v-if="item.online === 1">
<div>
<span>报名人数</span> <span class="font-size18 orange">{{ item.currentParticipants
}}</span>/<span class="font-size14">{{ item.participants }}</span>
<span>报名人数</span> <span class="font-size18 orange">{{ item.registered
}}</span>/<span class="font-size14">{{ item.quota }}</span>
</div>
<van-button type="info" size="small" round @click="handelClickJump('activityDetail', item)"
:disabled="disabledRecord(item)">{{ recordFlag(item) ? '已报名' : '报名' }}</van-button>
@ -47,16 +47,18 @@ export default {
methods: {
async communityActivity() {
let parm = {
pageSize: this.pageSize,
pageNo: this.pageNo++,
agencyId: this.agencyId,
activityName: "",
status: "",
typeId: "",
startTime: "",
content: '',
pageNo: 1,
pageSize: 100,
online: '1',
endTime: "",
address: "",
assistingParty: "",
progessFlag: 1,
strTime: "",
title: "",
district: "",
type: "",
status: "",
progessFlag: 1
}
let res = await communityActivity(parm)
if (res.code === 0) {

447
src/views/activity/sing.vue

@ -0,0 +1,447 @@
<template>
<div>
<div class="content">
<div class="card">
<div class="title"> {{type==='sign'?'打卡描述':'实况描述'}}</div>
<textarea style="width: 100%; height: 260px; border: none; resize: none; margin-top: 10px;" v-model="content" bind:input="handelChangTextarea" placeholder="请输入500字以内" maxlength="500px"/>
</div>
<div class="card">
<div class="title">上传图片或视频</div>
<van-uploader v-model="fileList" :after-read="afterRead" :max-count="3" :max-size="10 * 1024 * 1024" style="margin-top: 10px;" />
</div>
<div class="card flex flex-sb address flex-center-i" style="margin-top: 20px;" >
<image src="../../../../images/icon/address.png" mode="" />
<span class="flex-1">{{address}}</span>
<van-icon name="replay" color="#0d957f"/>
</div>
</div>
<div class="bot-btn">
<van-button style="width: 120px; margin-top: 20px;" slot="button" size="small" type="primary" round color="#f53e1f"@click="submit">
{{type==='sign'?'打卡签到':'发布实况'}}
</van-button>
</div>
<Android @send-number="handleNumber" />
</div>
</template>
<script>
import {clockIn,activitySignIn,activityApply,addActivityRecord,cancelSignUp, detail, communityActivityApplicationRecordDelete,getById,activityApplySave} from "@/api/activity"
import Share from "@/components/Share"
import registerDialog from '@/components/registerDialog';
import { setConfig } from '@/utils/jweixin'
import { Toast, Dialog } from 'vant'
import {uploadvariedfile} from '@/api/basic'
import Map from '@/components/Map'
import {mapKey} from '@/config'
export default {
data() {
return {
content:"",
address:"",
fileList: [],
applyedTimeType:false,
ActName:"",
info:null,
signInList:[],
applyType:false,
activityId:null,
realTimeList:[],
projectList:[],
realTimeList:[],
signInList:[],
applyList:[],
activityList: [],
signUp: [
{ name: "", mobile: "", remark: "" },
],
info: {},
isPast: false,
showShare: false,
showRegister: false,
phone:""
};
},
created() {
},
async mounted() {
//
this.geolocation = new qq.maps.Geolocation(mapKey, 'myapp')
//
this.getMyLocation()
setConfig(['updateAppMessageShareData', 'onMenuShareAppMessage', 'updateTimelineShareData'])
if (this.$route.query.id) {
this.activityId= 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.activitySignIn(1)
this.activitySignIn(0)
}
},
methods: {
//
submit(){
if (!this.content || this.content==='undefined') {
Dialog.alert({
// title: '',
message: '实况描述不能为空',
}).then(() => {
return
});
}
if (!this.fileList) {
Dialog.alert({
// title: '',
message: '请上传图片或视频',
}).then(() => {
return
});
}
let parm = {
activityId: this.activityId,
address: this.address,
content: this.content,
longitude: this.longitude,
latitude: this.latitude,
attrs: this.fileList
}
clockIn(parm).then(res => {
if (res.code === 0) {
}
}).catch(err => {
console.log(err);
})
},
getMyLocation() {
this.geolocation.getLocation(this.showPosition, this.errorPosition) //
},
showPosition(position) {
this.longitude = position.lng
this.latitude = position.lat
this.address = position.city + position.addr
console.log(position, this.longitude, this.latitude ,"dsjfdsk");
},
locationChange(data) {
this.longitude = data.latlng.lng
this.latitude = data.latlng.lat
this.address = data.poiaddress
this.ifRange(this.longitude,this.latitude)
},
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 = '上传失败'
})
},
//
cancelSignUp(){
Dialog.confirm({
title: '提示',
message: '确定取消报名吗?',
})
.then(() => {
cancelSignUp(this.data.activityId).then(res=>{
if(res.code === 0){
this.setData({
applyType:true
})
}
})
})
.catch(() => {
});
},
//
toApply() {
console.log("dsklfjklsf");
Dialog.confirm({
title: '提示',
message: '您确定要报名吗?',
})
.then(() => {
activityApplySave(this.activityId).then(res => {
console.log(res,"sdflkjlsfjd");
Dialog.alert({
// title: '',
message: '报名成功',
})
// wx.showToast({
// title: '',
// duration: 2000,
// success: () => {
// setTimeout(() => {
// wx.navigateBack()
// }, 2000)
// }
// })
}).catch(err => {
console.log(err);
})
})
.catch(() => {
// on cancel
});
},
share() {
let than = this
if (wx.updateAppMessageShareData) {
wx.ready(function () {
wx.updateAppMessageShareData({
title: than.info.activityName || '活动详情',
desc: '',
link: `https://epmet-prediv.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}&flag=share`,
imgUrl: than.info.coverPic || 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png',
success: function () {}
})
wx.updateTimelineShareData({
title: than.info.activityName,
desc: '',
link: `https://epmet-prediv.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}`,
imgUrl: than.info.coverPic || 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png',
success: function () {}
})
});
} else {
wx.onMenuShareAppMessage({
title: than.info.activityName,
desc: '',
link: `https://epmet-prediv.elinkservice.cn/epmet-wx-pa/#/activityDetail?id=${than.$route.query.id}&appId=${than.$store.state.app.appId}`,
imgUrl: than.info.coverPic || 'https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/20240710/617f7fb327064d89892823b81b11cd70.png',
success: function () {}
})
}
},
//
activitySignIn(whether) {
let parm = {
pageNo: 1,
pageSize: 100,
activityId: this.activityId,
whether: whether
}
activitySignIn(parm).then(res => {
if (res.code === 0) {
if (whether === 1) {
this.signInList=res.data.list
} else {
this.realTimeList=res.data.list
}
}
}).catch(err => {
})
},
//
activityApplyList() {
let parm = {
pageNo: 1,
pageSize: 100,
activityId: this.activityId
}
activityApply(parm).then(res => {
if (res.code === 0) {
this.applyList=res.data.list
}
}).catch(err => {
})
},
handleNumber(value){
console.log(value,"wl kgnsl, ");
this.phone=value
},
checkIfPast() {
const currentTimestamp = Date.now();
const specifiedTimestamp = new Date(this.info.cutOffTime.replace(/-/g, '/')).getTime();
this.isPast = specifiedTimestamp < currentTimestamp;
},
//
async detail(id, delId) {
const handleResponse = (res) => {
if (res.code === 0) {
this.info = res.data;
this.info.signInTime=res.data.signInTime.slice(0, 16),
this.info.signOutTime=res.data.signOutTime.slice(0, 16),
console.log(this.info,"wl info");
// this.applyType = res.data.applyed === 0 ? true : false,
this.applyedTimeType = this.isCurrentTimeBefore(res.data.deadline),
console.log(this.applyedTimeType,"sdfkjdskfl");
this.signOutTimeType = this.isCurrentTimeBetween(res.data.signInTime, res.data.signOutTime)
// this.info.participants = res.data.participants;
// this.info.currentParticipants = res.data.currentParticipants;
// if (res.data.recordList && res.data.recordList.length > 0) {
// this.signUp = res.data.recordList;
// }
// if (res.data.cutOffTime) {
// this.checkIfPast();
// }
}
};
// if (delId) {
// this.signUp = this.signUp.filter(item => item.id != delId);
// }
let res = await detail(id);
handleResponse(res);
},
async getById(id) {
const handleResponse = (res) => {
if (res.code === 0) {
this.info = res.data;
this.info.participants = res.data.participants;
this.info.currentParticipants = res.data.currentParticipants;
if (res.data.recordList && res.data.recordList.length > 0) {
this.signUp = res.data.recordList;
}
if (res.data.cutOffTime) {
this.checkIfPast();
}
}
};
if (delId) {
this.signUp = this.signUp.filter(item => item.id != delId);
}
let res = await getById(id);
handleResponse(res);
},
handelAddResi() {
this.signUp.push({ name: "", mobile: "", remark: "", })
},
isCurrentTimeBetween(startTime, endTime) {
const current = new Date().getTime();
const startTimestamp = new Date(startTime).getTime();
const endTimestamp = new Date(endTime).getTime();
return current >= startTimestamp && current <= endTimestamp;
},
isCurrentTimeBefore(targetTime) {
const current = new Date().getTime();
const targetTimestamp = new Date(targetTime).getTime();
return current < targetTimestamp;
},
handelDelResi(item, index) {
if (item.id) {
let than = this
communityActivityApplicationRecordDelete([item.id]).then(res => {
if (res.code === 0) {
than.detail(this.$route.query.id, item.id);
}
}).catch(err => {
console.log(err);
})
} else {
this.signUp.splice(index, 1)
}
},
async save() {
if (this.$store.state.app.userInfo.mobile) {
this.signUp.forEach((item) => {
item.activityId = this.info.id;
item.applicationId = this.$store.state.app.userInfo.id;
item.customerId = this.$store.state.app.userInfo.customerId;
})
if(this.signUp.findIndex(item=>!item.name) != -1){
this.$toast('人员姓名不能为空')
return
}
if(this.signUp.findIndex(item=>!item.mobile) != -1){
this.$toast('联系电话不能为空')
return
}
let parm = {
formDTOList: this.signUp
}
let res = await addActivityRecord(parm)
if (res.code === 0) {
this.$toast.success(res.data)
this.signUp = [{ name: "", mobile: "", remark: "" }]
this.detail(this.$route.query.id)
}
} else {
this.showRegister = true;
}
},
},
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;
}
/* subpages/activity/pages/sign/sign.wxss */
page {
height: 100vh;
background-color:#f7f7f7;
}
.title{
color: #222222;
font-size: 32rpx;
font-weight: 600;
}
.content{
width: calc(100% - 40rpx);
margin: 0 auto;
}
textarea{
margin-top: 24rpx;
background-color:#f7f7f7 ;
width: 100%;
height: 460rpx;
padding: 24rpx;
box-sizing: border-box;
}
.address{
image{
width: 24rpx;
height: 24rpx;
margin-right: 11rpx;
}
}
.card{
margin-top: 14rpx;
}
.bot-btn{
margin-top: 84rpx;
text-align: center;
button{
width:400rpx ;
}
}
</style>

27
src/views/appeal/index.vue

@ -6,19 +6,26 @@
@click="$router.push({ path: '/appealDetail', query: { pageType: 'event', ...item } })">
<div class=" flex flex-y">
<div class="flex">
<van-tag round size="medium" style="margin-right: 5px"
<van-tag v-if="!item.satisfaction" size="medium" style="margin-right: 5px"
:color="item.statusName == '处理中' ? processing1.bg : completion.bg"
:text-color="item.statusName == '处理中' ? processing1.text : completion.text">
{{ item.statusName }}
</van-tag>
<van-tag v-if="item.satisfaction" size="medium" style="margin-right: 5px"
:color="processing.bg"
:text-color="processing.text">
已评价
</van-tag>
<!-- <van-tag size="medium" style="margin-right: 5px"
:color="item.statusName == '处理中' ? processing.bg : completion.bg"
:text-color="item.statusName == '处理中' ? processing.text : completion.text">
{{ item.statusName }}
</van-tag>
</van-tag> -->
<div class="y66666 font-size13">{{ item.happenTime }}</div>
</div>
<span class="text">{{ item.eventContent }}</span>
</div>
<div class="imgs">
<van-image fit="cover" v-for="(item2, index2) in item.imageList"
@click.prevent.stop="previewImage(index2, item.imageList)" :src="item2" :key="index2" />
</div>
</div>
<Android v-if="router=='/appeal'"/>
</van-list>
@ -35,9 +42,13 @@ export default {
type: 0,
list: [],
pageSize: 5,
completion: {
processing1: {
bg: 'rgba(79,148,255,0.14)',
text: '#4F94FF'
text: '#638ff8'
},
completion: {
bg: 'rgba(18,184,174,0.1)',
text: '#12B8AE'
},
processing: {
bg: 'rgba(255,120,60,0.14)',

13
src/views/appealDetail/index.less

@ -48,15 +48,22 @@
.step-title {
margin-left: -5px;
font-size: 16px;
font-size: 14px;
font-weight: 500;
color: #333333!important;
}
.step-title0 {
margin-left: -5px;
font-size: 14px;
font-weight: 500;
color: #0800ec!important;
}
.step-time {
font-size: 12px;
font-weight: 400;
color: #999999;
margin: 10px 0 15px;
margin-left: 5px;
}
.content {
display: flex;
@ -68,7 +75,7 @@
line-height: 20px;
}
.value {
font-size: 14px;
font-size: 12px;
font-weight: 400;
color: #333333;
line-height: 20px;

55
src/views/appealDetail/index.vue

@ -13,7 +13,9 @@
:key="index2"
/>
</div>
<div class="address">详细地址{{ detail.address }}</div>
<div class="address">问题位置{{ detail.address }}</div>
<div class="address">联系人{{ detail.name }}</div>
<div class="address">联系电话{{ detail.mobile }}</div>
</div>
<div class="block container" v-if="detail.status === 'closed_case'">
@ -58,12 +60,23 @@
<van-divider />
<van-steps v-if="process.length > 0 && detail.pageType === 'event'" direction="vertical" :active="0">
<van-step v-for="(item, index) in process" :key="index">
<div class="step-title" v-if="item.agencyId">指派</div>
<div class="step-title" v-if="!item.timeLimit">完成并回复</div>
<div class="step-title" v-if="!item.agencyId && item.timeLimit">{{ item.processName }}</div>
<div class="step-time">{{ item.processTime ? item.processTime : '' }}</div>
<!-- <div class="step-title" v-if="item.agencyId">指派</div>
<div class="step-title" v-if="!item.timeLimit">完成并回复</div> -->
<!-- <div class="step-title" v-if="!item.agencyId && item.timeLimit">{{ item.processName }}</div> -->
<div style="background-color: #f8f8f8;" class="container">
<div class="flex flex-center2">
<div :class="index==0?'step-title0':'step-title'">{{ item.processName }}</div>
<div class="step-time">{{ item.processTime ? item.processTime : '' }}</div></div>
<template v-if="item.type === 'event'">
<template v-if="item.agencyId">
<div class="content">
<!-- <div class="label">回复内容</div> -->
<div class="value">
{{ item.publicReply }}
</div>
</div>
<!-- <template v-if="item.agencyId">
<div class="content">
<div class="label">指派人</div>
<div class="value">
@ -88,28 +101,24 @@
{{ item.timeLimit }}
</div>
</div>
</template>
<template v-else>
<div class="content">
</template> -->
<!-- <template v-else> -->
<!-- <div class="content">
<div class="label">回复人</div>
<div class="value">
{{ item.departmentName }}
</div>
</div>
<div class="content">
<div class="label">回复内容</div>
<div class="value">
{{ item.publicReply }}
</div>
</div>
<div class="content" v-if="item.limitTime">
</div> -->
<!-- <div class="content" v-if="item.limitTime">
<div class="label">办结时限</div>
<div class="value">
{{item.limitTime }}
</div>
</div>
</template>
</template>
</div> -->
<!-- </template> -->
</template></div>
</van-step>
</van-steps>
@ -201,6 +210,7 @@
import { ImagePreview } from 'vant'
import { process, updateEvent } from '@/api/event'
import { getUserDemandUnSolvedDetail } from '@/api/demand'
import dayjs from 'dayjs'
export default {
@ -220,6 +230,8 @@ export default {
},
mounted() {
this.detail = this.$route.query;
console.log(this.detail,"sd;lfjlsd");
if(this.detail.satisfaction){
this.btnFlag = this.detail.satisfaction
}
@ -255,6 +267,9 @@ export default {
icEventId: this.detail.icEventId
}).then(res => {
this.process = res.data
this.process.forEach(item => {
item.processTime = dayjs(item.processTime*1000).format('YYYY-MM-DD hh:mm:ss')
})
})
} else {
getUserDemandUnSolvedDetail({

34
src/views/communityPublicity/detail.vue

@ -1,12 +1,19 @@
<template>
<div>
<div class='container m-bot50' :style="this.phone=='Phone'?'':'height: 85vh; overflow: auto;'">
<div class="flex flex-mean" style="background-color: #FFFFFF;">
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src=" info.coverPic" style="width: 100%; height: 150px;" />
</div>
<div class='container m-bot50' :style="this.phone=='Phone'?'':'height: 85vh; overflow: auto;'"style="position: relative;top: -47px;">
<div class="card">
<div class="m-top15 p0">
<h2 style="margin: 0; font-size: 21px;">{{ info.title }}</h2>
<div class="flex flex-end">
<van-cell :border="false" :value="info.agencyName" class="font-size13 y66666"></van-cell>
<van-cell :border="false" :value="info.releaseTime" class="font-size13 y66666"></van-cell>
<div class=" p0">
<div class="text1">{{c }}</div>
<div class="flex flex-x text2">
<div class="font-size13 y66666">{{ info.agencyName }}</div>
<div class="font-size13 y66666 m-left5">{{ info.releaseTime }}</div>
</div>
<van-divider />
<div v-html="info.content">
@ -120,6 +127,21 @@ export default {
</script>
<style lang='less' scoped>
.text1{
font-family: PingFang SC;
font-weight: bold;
font-size: 25px;
color: #333333;
}
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 15px;
color: #999999;
}
:deep(.p0>.van-cell) {
padding: 0;
}

73
src/views/communityPublicity/index.vue

@ -1,11 +1,22 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF;">
<van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<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-model="tagActive" style="width: 100%;" @change="handelChangeTags">
<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="没有更多了"
@ -14,21 +25,25 @@
: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 " style="line-height: 28px;">
<span class="van-multi-ellipsis--l2 text1" style="line-height: 28px;">
{{ item.title }}
</span>
<span class="van-ellipsis y66666 font-size15">
{{ item.newContent }}
</span>
<div class="flex flex-end text2">
<span class="van-ellipsis y66666 font-size15">
{{ item.newContent }} </span>
<div class="">{{ item.releaseTime }}</div>
</div>
</div>
<img v-if="item.coverPic" :src="item.coverPic" style="width: 100px;height: 60px;"
<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=""
<!-- <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 class="flex1 text-align-right">{{ item.releaseTime }}</div>
</div> -->
</div>
</div>
</van-list>
@ -139,6 +154,20 @@ export default {
</script>
<style lang='less' scoped>
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 12px;
color: #999999;
line-height: 48px;
}
.text1{
font-family: PingFang SC;
font-weight: 500;
font-size: 20px;
color: #000000;
line-height: 44px;
}
.custom-button {
width: 60px;
height: 33px;
@ -221,4 +250,28 @@ export default {
/* 取消边框 */
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>

349
src/views/democratic/detail.vue

@ -0,0 +1,349 @@
<template>
<div>
<div class='container'>
<div class="flex flex-y flex1 flex-end" >
<div class="activity_content flex flex-y">
<div class="flex flex1 oh">
<div class="flex flex-y flex1 m-right10 oh">
<span class="van-multi-ellipsis--l2 text1" style="line-height: 28px;">
{{ info.title }}({{ info.multiFlag==1 ? '多选' : '单选' }})
</span>
</div>
</div>
<div class="flex flex-end flex-center gray m-top10 font-size13">
<div class="flex flex-center">
<span style="color: #FF9C00;margin-right: 10px;">{{ info.multiFlag==1 ? '进行中' : '已截止' }}</span>
<span>{{ info.resiCount || 0 }}人参与</span>
</div>
<div v-if="info.endTime">截止{{ info.endTime }}</div>
</div>
</div>
</div>
<div class="intro" v-html="info.introduce"></div>
<div class="vote-page">
<div v-for="(option, index) in voteOptions" :key="index" class="vote-option">
<input
type="radio"
:id="'option-' + index"
:value="option.electionId"
:checked="selectedOption === option.electionId"
@click="toggleSelection(option.electionId)"
:disabled="hasVoted"
class="custom-radio"
/>
<label :for="'option-' + index" class="vote-label">
<img :src="option.avatar || require('@/assets/images/user1.png')" alt="avatar" class="avatar" />
<div class="option-details">
<div class="option-header">
<h2 class="option-name">{{ option.name }}</h2>
<span class="vote-count" v-if="hasVoted">
{{ option.optionCount }}
</span>
</div>
<div class="progress-bar" v-if="hasVoted">
<div
class="progress-fill"
:style="{ width: (option.optionCount / totalVotes * 100) + '%' }"
></div>
</div>
<p class="option-description">{{ option.remark }}</p>
</div>
</label>
</div>
</div>
<div class="button-container">
<button
:class="{'voted': hasVoted}"
class="vote-button"
@click="handleVote"
:disabled="hasVoted"
>
{{ hasVoted ? '已投票' : '投票' }}
</button>
</div>
</div>
<Android></Android>
</div>
</template>
<script>
import {getDemocryDetail,democraticVote } from '@/api/democratic';
import { Toast, Dialog } from 'vant'
export default {
data() {
return {
info: {
},
selectedOption: null, //
voteOptions: [
],
hasVoted: false, //
electionId:null,
resiId:null,
};
},
created() {
this.electionId = this.$route.query.id;
this.resiId = this.$store.state.app.userInfo.id;
this.communityDemocryDetail()
},
mounted() {
},
methods: {
toggleSelection(optionId) {
this.selectedOption = this.selectedOption === optionId ? null : optionId;
},
handleVote() {
if (this.selectedOption) {
//
let params = {
electionOptionId:this.electionId,
resiId:this.resiId
}
democraticVote(params).then(res => {
if (res.code === 0) {
if (!this.hasVoted) {
this.hasVoted = true; //
}
Dialog.confirm({
title: '提示',
message: '投票成功',
})
.then(() => {})
.catch(() => {});
}
}).catch(err => {
})
}else{
Dialog.confirm({
title: '提示',
message: '您尚未选择投票人',
})
.then(() => {
})
.catch(() => {
});
}
},
//
async communityDemocryDetail() {
const handleResponse = (res) => {
if (res.code === 0) {
this.info = res.data;
//
if (res.data.option && res.data.option.length > 0) {
this.voteOptions = res.data.option;
}
//
if (res.data.isCanSelect==0) {
console.log("已投票")
this.hasVoted = true; //
}
}
}
let params = {
electionId:this.electionId,
resiId:this.resiId
}
let res = await getDemocryDetail(params);
handleResponse(res);
}
},
components: {},
computed: {
totalVotes() {
return this.voteOptions.reduce((sum, option) => sum + option.votes, 0);
},
},
watch: {},
}
</script>
<style lang='less' scoped>
.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;
}
}
}
.vote-page {
width: 100%;
// max-width: 600px;
margin: auto;
// padding: 5px;
// background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
background: linear-gradient(to top, #E1F7F3, #DAE6FF);
}
.vote-option {
display: flex;
align-items: center;
padding: 5px 0;
border-bottom: 1px solid #eee;
width: 100%;
}
.custom-radio {
appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
border: 2px solid white;
margin-right: 15px;
cursor: pointer;
position: relative;
}
.custom-radio:checked::before {
content: '';
display: block;
width: 10px;
height: 10px;
background-color: #007bff;
border-radius: 50%;
position: absolute;
top: 3px;
left: 2px;
}
.vote-label {
display: flex;
align-items: center;
cursor: pointer;
width: 100%;
min-height: 60px;
background-color: white;
border-radius: 5px; /* 修改为圆角 */
}
.avatar {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 15px;
}
.option-details {
flex: 1;
}
.option-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.option-name {
font-size: 0.8em;
margin: 0;
}
.option-description {
color: #666;
font-size: 0.7em;
margin: 5px 0;
}
.vote-count {
font-size: 0.9em;
color: orange;
}
.progress-bar {
width: 100%;
height: 8px;
background-color: #eee;
border-radius: 4px;
overflow: hidden;
margin-top: 8px;
}
.progress-fill {
height: 100%;
background: linear-gradient(to right, #3887F8, #3FC7FF);
}
.button-container {
display: flex;
justify-content: center; /* 水平居中 */
width: 100%;
margin-top: 20px; /* 可选,设置按钮上方的间距 */
}
.vote-button {
width: 100px;
height: 40px;
background-color: #3887F8;
color: white;
border: none;
border-radius: 20px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s;
}
.vote-button.voted {
background-color: #cccccc;
cursor: not-allowed;
}
.intro {
text-indent: 2em;
font-size: 16px;
color: #333333;
line-height: 25px;
}
</style>

231
src/views/democratic/index.vue

@ -0,0 +1,231 @@
<template>
<div>
<div class='container'>
<div class="flex flex-y flex1 flex-end" v-if="democraticList.length !== 0">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了"
@load="democraticList" class="card" :offset="50">
<div class="activity_content flex flex-y" v-for="(item, index) in democraticList"
: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" style="line-height: 28px;">
{{ item.title }}
</span>
</div>
</div>
<div class="flex flex-end flex-center gray m-top10 font-size13">
<div class="flex flex-center">
<span style="color: #FF9C00;margin-right: 10px;">进行中</span>
<span>{{ item.resiCount || 0 }}人参与</span>
</div>
<div v-if="item.endTime">截止{{ item.endTime }}</div>
</div>
</div>
</van-list>
</div>
<div v-else class="no-data">
暂无数据~
</div>
</div>
<Android></Android>
</div>
</template>
<script>
import {communityDemocry } from '@/api/democratic';
export default {
data() {
return {
democraticList: [
],
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;
// todo:
// this.agencyId = "1846432703164649473";
this.communityDemocryList()
},
methods: {
toDetail(item){
this.$router.push({name:'democraticDetail',query:{id:item.id}})
},
handleSearch(){
this.PublicityList = [];
this.pageNo = 1;
this.communityDemocryList()
},
async communityDemocryList() {
let parm = {
pageSize: 10,
pageNo: 1,
agencyId: this.agencyId
}
let res = await communityDemocry(parm)
console.log("***********************************")
console.log(res)
if (res.code === 0) {
this.loading = false;
if (!res.data || res.data.list.length < this.pageSize) {
this.finished = true;
}
this.democraticList = this.democraticList.concat(res.data.list);
}
},
},
components: {},
computed: {},
watch: {},
}
</script>
<style lang='less' scoped>
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 12px;
color: #999999;
line-height: 48px;
}
.text1{
font-family: PingFang SC;
font-weight: 500;
font-size: 20px;
color: #000000;
line-height: 44px;
}
.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; /* 平均分布 */
}
.grid-container {
display: grid;
grid-template-columns: repeat(4, 1fr); /* 每列4个 */
gap: 10px; /* 图片之间的间距 */
// padding: 16px;
align-items: start; /* 子元素顶对齐 */
}
.font-size12{
font-size: 12px;
}
</style>

192
src/views/dynamic/index.vue

@ -0,0 +1,192 @@
<template>
<div>
<div class="flex flex-mean" style="background-color: #FFFFFF;">
<!-- <van-search class=".flex flex-1" v-model="searchValue" left-icon="" shape="round" placeholder="请输入搜索关键词" />
<van-button round type="info" class="custom-button font-size13 m-top10 m-right12" @click="onSearch()">查询</van-button> -->
<!-- <van-image src="../../assets/images/servicePhone/" /> -->
<img :src="discussionList.coverImg" style="width: 100%; height: 150px; " />
</div>
<div class='' style="position: relative;top: -10px;">
<div class="activity_content card" >
<div class="van-multi-ellipsis--l2 text">
{{ discussionList.title }}
</div>
<div class="flex flex-end">
<div class="font-size13 flex flex-y">
<!-- <img src="@/assets/images/icons/resi.png" class="img_17"> -->
<!-- <div class="text3"><span class="text2">联系人:</span>{{ discussionList.releaseTime }}</div> -->
<div class="text3"><span class="text2">发布单位:</span>{{ discussionList.agencyName }}</div>
</div>
</div>
<div class="van-hairline--bottom"></div>
<div v-html="discussionList.content" ></div>
</div>
<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 {newsTrendsdetail} from '@/api/dynamic'
import registerDialog from '@/components/registerDialog';
export default {
data() {
return {
discussionList: [
],
pageSize: 5,
pageNo: 1,
agencyId: null,
finished: false,
loading: false,
showRegister: false,
searchValue: "",
userId:""
};
},
created() {
this.id = this.$route.query.id?this.$route.query.id:'';
this.userId = this.$store.state.app.appId;
this.newsTrendsdetail()
},
methods: {
callPhone(phone){
window.location.href = `tel:${phone}`;
},
async newsTrendsdetail(){
let res = await newsTrendsdetail(this.id)
if (res.code === 0) {
this.discussionList = res.data
}
},
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>
.text{
font-family: PingFang SC;
font-weight: 600;
font-size: 16px;
color: #000000;
}
.text2{
font-family: PingFang SC;
font-weight: 500;
font-size: 15px;
color: #999999;
line-height:25px
}
.text3{
font-family: PingFang SC;
font-weight: 500;
font-size: 15px;
color: #333333;
line-height:25px
}
.custom-button {
width: 60px;
height: 33px;
}
.activity_content {
padding-bottom: 10px;
box-sizing: border-box;
width: 100%;
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>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save