| api/community/community.js | ●●●●● patch | view | raw | blame | history | |
| common/setting.js | ●●●●● patch | view | raw | blame | history | |
| components/noticeList/noticeList.vue | ●●●●● patch | view | raw | blame | history | |
| pages.json | ●●●●● patch | view | raw | blame | history | |
| pages/home/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/article/detail.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/article/list.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/bs/views/addRepair.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/bs/views/repair.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/house/family/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/house/list/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/task/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/workbench/views/report.vue | ●●●●● patch | view | raw | blame | history |
api/community/community.js
New file @@ -0,0 +1,51 @@ import http from '@/http/api.js' //获取报名列表 export const getApplyList = (params) => { return http.request({ url: '/blade-userPublicEnroll/userPublicEnroll/page', method: 'GET', params: { ...params } }) } //获取报名详情 export const getApplyDetail = (params) => { return http.request({ url: '/public_discuss/publicDiscuss/detail', method: 'GET', params: { ...params } }) } //添加报名 export const addApply = (params) => { return http.request({ url: '/blade-userPublicEnroll/userPublicEnroll/save', method: 'POST', data:params }) } //获取投票议题 export const getVoteTopics = (params) => { return http.request({ url: '/blade-topics/topics/lists', method: 'GET', params: { ...params } }) } //投票操作 export const addVoteOperate = (params) => { return http.request({ url: '/blade-topics/topics/updateBath', method: 'POST', data:params }) } common/setting.js
@@ -12,8 +12,8 @@ // devUrl: 'https://sk.hubeishuiyi.cn', // devUrl: 'http://192.168.1.156:9528', // devUrl:'http://192.168.1.50:9528', // devUrl: 'http://192.168.0.102:9528', devUrl:'https://srgdjczzxtpt.com:2080/api', devUrl: 'http://192.168.0.100:9528', // devUrl:'https://srgdjczzxtpt.com:2080/api', // devUrl: 'http://192.168.0.102:9528', // devUrl: 'https://srgdjczzxtpt.com:2080/api', minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/", components/noticeList/noticeList.vue
@@ -1,6 +1,6 @@ <template> <view class=""> <view class="notice-list" @click="navToDetail(item.id)" v-for="(item,index) in data" :key="index"> <view class="notice-list" @click="navToDetail(item.id,item.eventType,item.pdId)" v-for="(item,index) in data" :key="index"> <view v-if="item.url" class="notice-inner flex j-c-s-b"> <view class="notice-list-left flex f-d-c j-c-s-b"> <text class="notice-title f-28 fw">{{item.title}}</text> @@ -50,13 +50,19 @@ } }, methods: { navToDetail(id) { navToDetail(id,type,pdId) { if(type == 0 || type == 1){ uni.navigateTo({ url: `/subPackage/article/detail?id=${id}&type=${type}&pdId=${pdId}` }) }else { uni.navigateTo({ url: `/subPackage/article/detail?id=${id}` }) } } } } </script> <style scoped lang="scss"> pages.json
@@ -101,7 +101,7 @@ { "path": "detail", "style": { "navigationBarTitleText": "公告详情", "navigationBarTitleText": "详情", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black" pages/home/index.vue
@@ -72,11 +72,11 @@ <caption-row title="社区" /> <view class="mt-20"> <u-grid :border="false" col="4"> <u-grid-item @click="navigatorPage('/subPackage/article/list')"> <u-grid-item @click="navigatorPage(`/subPackage/article/list?type=0`)"> <u-icon name="/static/icon/nav-09.png" width="90rpx" height="70rpx"></u-icon> <text class="f-26 mt-10">公益报名</text> </u-grid-item> <u-grid-item @click="navigatorPage('/subPackage/article/list')"> <u-grid-item @click="navigatorPage(`/subPackage/article/list?type=1`)"> <u-icon name="/static/icon/nav-10.png" width="90rpx" height="70rpx"></u-icon> <text class="f-26 mt-10">选举调查</text> </u-grid-item> @@ -398,7 +398,6 @@ this.curSelectSite = dataList[0]; } this.curHouseCode = this.curSelectSite.id uni.setStorageSync('curSelectSite', this.curSelectSite) } }, subPackage/article/detail.vue
@@ -1,7 +1,5 @@ <template> <view class=""> <view class="container"> <view class="f-32 fw">{{detailInfo.title}}</view> <view class="row flex j-c-s-b a-i-c c-99"> @@ -24,63 +22,75 @@ <u-parse :content="detailInfo.content"></u-parse> </view> </view> <view class="" v-if="false"> <view class="explain-row c-main f-28"> 报名和投票先指定好房屋 </view> <view class="select-row flex j-c-s-b a-i-c"> <text class="f-28">指定房屋</text> <view class="select-row-content flex a-i-c"> <text class="f-26 c-99 mr-20"></text> <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> <!-- <view class="apply"> <view class="flex f-d-c a-i-c"> <view class="flex mb-20"> <image class="apply-user" src="/static/icon/nav-02.png" mode=""></image> <image class="apply-user" src="/static/icon/nav-02.png" mode=""></image> <image class="apply-user" src="/static/icon/nav-02.png" mode=""></image> </view> <text class="f-28 c-99">共3人</text> </view> <button class="apply-btn bgc-main c-ff f-30">报名</button> </view> --> <view class="mt-20" > <view class="" v-if="isLoad"> <view class="" v-if="eventType == 0 && applyInfo.openFlag == 0"> <!-- <view class="explain-row c-main f-28"> 报名和投票先指定好房屋 </view> --> <view class="select-row flex j-c-s-b a-i-c"> <text class="f-28">房屋</text> <view class="select-row-content flex a-i-c"> <text class="f-26 c-99 mr-20">{{siteInfo.name}}</text> <!-- <u-icon name="arrow-right" color="#999"></u-icon> --> </view> </view> <view class="apply"> <view class="flex f-d-c a-i-c" v-if="applyList.length"> <view class="flex mb-20"> <image v-for="i in applyList" class="apply-user" src="/static/icon/user-01.png" mode="aspectFill"> </image> </view> <text class="f-28 c-99">共{{applyList.length}}人</text> </view> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime > 0" @click="handleApply()" :disabled="applyInfo.userId">{{applyInfo.userId?"已报名":"报名"}}</button> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime <= 0" :disabled="true">已结束</button> </view> </view> <view class="mt-20" v-if="eventType == 1 && voteTopicList.length"> <view class="explain-row c-main f-28"> 投票进行中 </view> <view class="vote bgc-ff"> <view class="" v-for="(item,index) in voteTopicList" :key="index"> <view class="vote-title f-30 fw"> 是否同意安装充电桩 {{item.discussContent}} </view> <view class=""> <u-radio-group iconPlacement="right" activeColor="#017BFC" placement="column" > <view class="mb-20"> <u-radio label="同意" ></u-radio> <view class="flex j-c-s-b a-i-c mt-10"> <uv-line-progress :percentage="30" height="10" ></uv-line-progress> <text class="c-99 f-28">10</text> </view> </view> <view class=""> <u-radio label="不同意" ></u-radio> <view class="" v-if="item.optionRange == 0"> <u-radio-group iconPlacement="right" activeColor="#017BFC" placement="column" v-model="item.selected" @change="selectOption($event,index)" :disabled="isSubmit"> <view class="mb-20" v-for="(i,k) in item.children"> <u-radio :label="i.optionContent" :name="i.id"></u-radio> <view class="flex j-c-s-b a-i-c mt-10"> <uv-line-progress height="10" ></uv-line-progress> <text class="c-99 f-28">10</text> <text class="c-99 f-28" v-if="i.number">{{i.number}}人</text> </view> </view> </u-radio-group> </view> <view class="" v-if="item.optionRange == 1"> <u-checkbox-group iconPlacement="right" activeColor="#017BFC" placement="column" v-model="item.selected" :disabled="isSubmit" @change="selectOption($event,index)"> <view class="mb-20" v-for="(i,k) in item.children" :key="k"> <u-checkbox :label="i.optionContent" :name="i.id"></u-checkbox> <view class="flex j-c-s-b a-i-c mt-10"> <!-- <uv-line-progress :percentage="10" height="10"></uv-line-progress> --> <uv-line-progress height="10"></uv-line-progress> <text class="c-99 f-28" v-if="i.number">{{i.number}}人</text> </view> </view> </u-checkbox-group> </view> </view> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime > 0" @click="submitVote()" :disabled="isSubmit">{{isSubmit?"已提交":"提交"}}</button> <button class="apply-btn bgc-main c-ff f-30" v-if="computeEndTime <= 0" :disabled="true">已结束</button> </view> </view> </view> <!-- <view class="action flex flex_base"> @@ -98,25 +108,175 @@ import { getDetail } from '@/api/article/article.js' import * as communityModel from "@/api/community/community.js" import tagCell from '@/components/noticeList/tagCell.vue' import { jsonString } from '../../uni_modules/uv-ui-tools/libs/function/test' export default { components: { tagCell }, data() { return { params: { id: "" }, eventType: null, detailInfo: {}, pdId: "", siteInfo: {}, applyList: [], applyInfo: {}, isLoad: false, voteTopicList: [], isSubmit: false // 是否已提交投票 } }, onLoad(option) { this.getDetailInfo(option.id) this.$set(this.params, "id", option.id); if (option.type) { this.$set(this.params, "eventType", option.type); this.eventType = option.type; this.pdId = option.pdId; this.siteInfo = uni.getStorageSync("siteInfo") } this.getDetailInfo() }, computed: { computeEndTime() { let curTimestamp = new Date().getTime(); let endTimestamp = new Date(this.applyInfo.endTime).getTime(); return endTimestamp - curTimestamp } }, methods: { getDetailInfo(id) { getDetail({ id }).then(res => { toNumber(val) { return Number(val) }, getDetailInfo() { getDetail(this.params).then(res => { this.isLoad = true; this.detailInfo = res.data; if (this.pdId) { this.getApplyDetail() } if (this.eventType == 0) { this.getApplyList(); } if (this.eventType == 1) { this.getVoteList(); } }) }, //报名列表 getApplyList() { communityModel.getApplyList({ publicDiscussId: this.pdId }).then(res => { console.log(res) if (res.code == 200) { this.applyList = res.data.records; } }) }, //报名、投票详情 getApplyDetail() { communityModel.getApplyDetail({ id: this.pdId }).then(res => { console.log(res) if (res.code == 200) { this.applyInfo = res.data; } }) }, //获取投票议题 getVoteList() { communityModel.getVoteTopics({ publicDiscussId: this.pdId }).then(res => { if (res.code == 200) { let data = res.data; if (data.length) { for (let i of data) { if(i.selected){ if (typeof i.selected == "string" && i.optionRange == 0) { this.isSubmit = true; i.selected = Number(i.selected) } if(typeof i.selected == "string" && i.optionRange == 1){ this.isSubmit = true; i.selected = JSON.parse(i.selected) } } } } this.voteTopicList = data; } }) }, //报名 handleApply() { communityModel.addApply({ publicDiscussId: this.pdId }).then(res => { if (this.computeEndTime > 0) { if (res.code == 200) { uni.showToast({ title: "操作成功" }) this.getApplyList(); } } else { uni.showToast({ title: "报名已结束", icon: "none" }) } }) }, selectOption(id, index) { let item = this.voteTopicList[index]; item.selected = id; this.$set(this.voteTopicList, index, item); }, getParams() { let list = JSON.parse(JSON.stringify(this.voteTopicList)); let arr = []; for (let i of list) { if (i.selected) { delete i.children; i.selected = JSON.stringify(i.selected) arr.push(i) } } return arr; }, //提交投票 submitVote() { let data = this.getParams() communityModel.addVoteOperate(data).then(res => { if (res.code == 200) { uni.showToast({ title: "操作成功" }) this.$nextTick(() => { this.getApplyDetail(); this.getVoteList(); }) } }) } } @@ -127,6 +287,7 @@ page{ background-color: #f5f5f5; } .container { padding: 0 30rpx; background-color: #fff; @@ -155,17 +316,22 @@ background-color: rgb(236, 244, 255); padding: 20rpx; } .select-row{ padding:30rpx; background-color:#fff; box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); border-top: 1px solid #f5f5f5; .select-row-content{ flex:1; width: 80%; justify-content: flex-end; } } .apply{ padding:30rpx; .apply-user{ width:80rpx; height:80rpx; @@ -173,6 +339,10 @@ margin-right:-15rpx; border:1px solid #fff; } } .apply-btn{ width:100%; height:80rpx; @@ -182,9 +352,10 @@ border-radius: 40rpx; } } .vote{ padding:0 40rpx 30rpx; .vote-title{ padding:30rpx 0; } subPackage/article/list.vue
@@ -1,6 +1,6 @@ <template> <view class=""> <view class="tab"> <view class="tab" v-if="tabList.length"> <u-tabs :list="tabList" :current="tabIndex" keyName="dictValue" @change="changeTab" :inactiveStyle="{color:'#999999'}" :activeStyle="{color:'#017BFC'}"></u-tabs> </view> @@ -28,12 +28,28 @@ tabIndex: 0, list: [], currentPage: 1, loadingStatus: 'nomore' loadingStatus: 'nomore', eventType: "" } }, onLoad() { onLoad(option) { if (option.type) { this.eventType = option.type; if (option.type == 0) { this.tabList = [{ dictKey: "", dictValue: "公益报名" }] } else { this.tabList = [{ dictKey: "", dictValue: "选举调查" }] } this.getNoticeList() } else { this.getCateList() } }, onReachBottom() { this.currentPage++ @@ -52,7 +68,7 @@ getCateList() { getCategory({ parentId: '1722966265111248897' parentId: '1722966265111248897', }).then(res => { console.log(res) let data = res.data; @@ -71,7 +87,8 @@ const param = { size: 10, current: this.currentPage, articleType: this.tabId articleType: this.tabId, eventType: this.eventType } const res = await getPage(param) const { @@ -91,8 +108,8 @@ this.loadingStatus = 'nomore' }, navTo(id) { this.$u.func.globalNavigator(`detail?id=${id}`, "navTo") navTo(id, type) { this.$u.func.globalNavigator(`detail?id=${id}&type=${type}`, "navTo") } } } @@ -102,6 +119,7 @@ page { background-color: #f5f5f5; } .tab { width: 100%; height: 88rpx; @@ -118,6 +136,7 @@ box-sizing: border-box; z-index: 999; } .list { margin-top: 108rpx; padding:0 30rpx; subPackage/bs/views/addRepair.vue
@@ -86,7 +86,7 @@ this.info.type = option.type }, onShow() { this.curSelectSite = uni.getStorageSync('curSelectSite') this.curSelectSite = uni.getStorageSync('siteInfo') this.info.addressCode = this.curSelectSite.id console.log(this.curSelectSite); }, subPackage/bs/views/repair.vue
@@ -14,7 +14,7 @@ <view class="flex f-d-c ml-40"> <text class="f-36">总申请</text> <view class="flex a-i-c"> <text class="f-48 c-blue fw mr-6">{{statistic.total}}</text> <text class="f-48 c-blue fw mr-6">50</text> <text class="f-24 c-99">件</text> </view> </view> @@ -24,7 +24,7 @@ <view class="flex f-d-c ml-40"> <text class="f-36">已处理</text> <view class="flex a-i-c"> <text class="f-48 c-green fw mr-6">{{statistic.handle}}</text> <text class="f-48 c-green fw mr-6">50</text> <text class="f-24 c-99">件</text> </view> </view> @@ -37,12 +37,12 @@ <text class="f-28 c-aa ml-20">当前小区:</text> </view> <text class="address f-28">{{ curSelectSite.name }}</text> <text class="address f-28">万达华府26栋1903室 万达华府26栋1903室</text> </view> <view class="nav flex flex-wrap j-c-s-b"> <view class="nav-item" v-for="(i,k) in navList" :key="k" @click="navTo(i)"> <view class="nav-item" v-for="(i,k) in navList" :key="k" @click="navTo(i.path)"> <image class="nav-item-bg" :src="i.bgImg" mode="aspectFill"></image> <view class="nav-item-inner flex f-d-c"> <text class="f-32 mb-30">{{i.title}}</text> @@ -59,80 +59,45 @@ </template> <script> import { getStatistics } from '@/api/task/taskReportForRepairs' export default { data() { return { statistic: { total: 0, handle: 0, }, curSelectSite: {}, navList: [{ navList:[ { title: "公共维修", type: 1, bgImg: "/static/icon/nav-bg-06.png", path: `addRepair`, path:"addRepair", background: "#63C875" }, { title: "居家维修", type: 2, bgImg: "/static/icon/nav-bg-07.png", path: "addRepair", path:"", background: "#4D98E2" }, { title: "矛盾纠纷", type: 3, bgImg: "/static/icon/nav-bg-08.png", path: "addRepair", path:"", background: "#EC7E51" }, { title: "投诉举报", type: 4, bgImg: "/static/icon/nav-bg-09.png", path: "addRepair", background: "#F4B862" }, { title: "企业商户上报", type: 5, bgImg: "/static/icon/nav-bg-09.png", path: "addRepair", path:"", background: "#F4B862" }, ] } }, computed: { }, onShow() { this.getStatistics() this.curSelectSite = uni.getStorageSync('curSelectSite') console.log(this.curSelectSite); }, methods: { navTo(item) { if (item.path) { let url = item.path + "?title=" + item.title + "&type=" + item.type this.$u.func.globalNavigator(url, "navTo") } }, getStatistics() { getStatistics().then(res => { this.statistic = res.data }) navTo(path){ if(path){ this.$u.func.globalNavigator(path, "navTo") } } } } </script> @@ -142,7 +107,6 @@ width: 100%; height: 100%; } .top { width: 100%; height: 659rpx; @@ -150,13 +114,11 @@ position: fixed; top: 0; left: 0; .top-img { width: 100%; height: 659rpx; } } .container { width: 100%; padding: 0 30rpx; @@ -165,7 +127,6 @@ top: 130rpx; left: 0; z-index: 100; .serve-box { width: 100%; height: 213rpx; @@ -174,55 +135,42 @@ padding: 0 60rpx 0 40rpx; box-sizing: border-box; } .f-48 { font-size: 48rpx; } .c-blue { color: #677CF8; } .c-green { color: #30D17C; } .ml-40 { margin-left: 40rpx; } .site-box { width: 100%; padding: 30rpx; box-sizing: border-box; border-radius: 4rpx; .c-aa { color: #aaa; } .address { width: 60%; margin-left: 25rpx; } } .nav { width: 100%; .nav-item, .nav-item-bg, .nav-item-inner { .nav-item,.nav-item-bg,.nav-item-inner{ width: 330rpx; height: 167rpx; } .nav-item { position: relative; margin-top: 30rpx; } .nav-item-inner { padding: 30rpx 30rpx 0; position: absolute; @@ -230,7 +178,6 @@ left: 0; } .item-btn { width: 125rpx; height: 42rpx; subPackage/house/family/index.vue
@@ -33,7 +33,6 @@ 主 </view> </view> <view v-show="!!scItem.roleType == 1"> <u-icon name="/static/icon/selected.png" size="16"></u-icon> </view> @@ -42,13 +41,12 @@ <view class="flex floor-info-box"> <view class="l flex proprietor-box"> {{scItem.realName}} {{scItem.realName || ""}} </view> <view class="r floor-box"> {{scItem.houseNo}} </view> </view> </view> </u-grid-item> </u-grid> @@ -120,7 +118,7 @@ }, onShow() { this.curSelectSite = uni.getStorageSync('curSelectSite') this.curSelectSite = uni.getStorageSync('siteInfo') }, mounted() { this.getBuildingList() @@ -275,6 +273,7 @@ width: 0; flex: 1; padding: 12rpx; .room-box { padding: 10rpx; justify-content: center; subPackage/house/list/index.vue
@@ -67,7 +67,7 @@ }, onShow() { this.curSelectSite = uni.getStorageSync('curSelectSite') this.curSelectSite = uni.getStorageSync('siteInfo') }, mounted() { this.getHouseInfo() subPackage/task/index.vue
@@ -49,6 +49,16 @@ <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> <view class="nav-item flex j-c-s-b a-i-c" @click="navTo('/subPackage/task/taskList')"> <text class="f-28">标签报事</text> <view class="flex"> <block v-if="comprehensiveTask > 0"> <text class="f-28 c-99">待处理</text> <view class="dot bgc-main">{{countInfo.comprehensiveTask}}</view> </block> <u-icon name="arrow-right" color="#999"></u-icon> </view> </view> <!-- <view class="nav-item flex j-c-s-b a-i-c"> <text class="f-28">工作日志</text> <view class="flex"> subPackage/workbench/views/report.vue
@@ -28,7 +28,7 @@ </view> <view class="item-row flex a-i-c j-c-s-b"> <text class="f-28">地址</text> <text class="f-28 c-66">{{ item.addressName }}</text> <text class="address f-28 c-66">{{ item.addressName }}</text> </view> </view> </view> @@ -190,9 +190,8 @@ .item-row { padding: 10rpx 0; .address { width: 65%; width: 75%; } } }