diff --git a/components/status-navs/status-nav.vue b/components/status-navs/status-nav.vue index 263b83c..a5f55fd 100644 --- a/components/status-navs/status-nav.vue +++ b/components/status-navs/status-nav.vue @@ -1,151 +1,151 @@ -<template> - <view class="status-box" :style="{marginBottom: marginBottom}"> - <!-- 网络、电量栏 start --> - <view :style="{height: statusBarHeight+'px',background: backgroudColor}"></view> - <!-- 网络、电量栏 end --> - - <!-- 头部状态栏 start --> - <view class="status-nav disac" :style="{background: backgroudColor,height:navBarHeight}"> - <!-- 返回键 start --> - <view class="disjcac left-box" @tap="backEv" v-if="ifReturn" :style="{height: navBarHeight}" > - <slot name="leftcontent"> - <i class="icon icon-return" style="font-size: 38rpx;" :style="{color: returnColor}"></i> - </slot> - </view> - <!-- 返回键 end --> - - <!-- 标题 start --> - <view class=" tab-title " - :style="{ - color: titleColor, - justifyContent: ifCenter ? 'center' : '', - padding: ifCenter ? '0px' : `${ifReturn ? '0 38' : '0 15'}px`}"> - <view class="title-box" :class="['','clips1','clips2'][clipNumber*1]" :style="{maxWidth: ifCenter ? '360rpx' : '70%'}"> - <!-- 有网络 --> - <view v-if="ifTitle && ifNet" >{{navBarTitle}}</view> - <!-- 无网络 --> - <view v-if="!ifNet">{{netText}}<text @tap="refreshEv" style="color: #3875F6;margin-left: 20rpx;">刷新</text></view> - </view> - </view> - <!-- 标题 end --> - - <!-- 右侧图标 start --> - <view class="right-box disjcac" :style="{height: navBarHeight}"> - <slot name="rightcontent"></slot> - </view> - <!-- 右侧图标 end --> - </view> - <!-- 头部状态栏 end --> - </view> -</template> - -<script> - export default { - name:'status-nav', - props:{ - //状态栏、导航栏背景颜色 - backgroudColor:{ - type:String, - default:'#FFFFFF' - }, - // 默认导航栏高度 - navBarHeight: { - type:String, - default:'42px' - }, - //是否显示返回键 - ifReturn:{ - type:Boolean, - default:true - }, - // 返回键颜色 - returnColor: { - type:String, - default:'#000' - }, - //是否显示标题 - ifTitle:{ - type:Boolean, - default:true - }, - // 导航栏标题 - navBarTitle: { - type:String, - default:'' - }, - // 标题最多几行显示 - clipNumber: { - type:String, - default:'1' - }, - //标题颜色 - titleColor:{ - type:String, - default:'#333333' - }, - // 标题是否居中 - ifCenter: { - type:Boolean, - default: true - }, - // 底部距离内容多高 - marginBottom: { - type:String, - default:'20rpx' - }, - }, - data(){ - return { - statusBarHeight: uni.getSystemInfoSync().statusBarHeight, - ifNet:true ,// 是否有网络 - netText:'当前无网络', - netTimer:null - } - }, - mounted() { - // 网络监测 - this.$toolAll.tools.networkStatus(); - // 获取当前页面路径 - this.$toolAll.tools.obtainPagePath(); - setTimeout(()=>{ - this.ifNet = uni.getStorageSync('isNet'); - },500) - }, - methods:{ - // 刷新网络事件 - refreshEv(){ - this.netText = '正在刷新...'; - let outTime = 0;//十秒超时 - this.netTimer = setInterval(()=>{ - outTime++; - this.$toolAll.tools.networkStatus(); - if(uni.getStorageSync('isNet')) { - clearInterval(this.netTimer); - this.ifNet = true; - } - if(outTime==10) { - clearInterval(this.netTimer); - this.netText = '刷新失败'; - outTime = 0; - } - },1000) - }, - //返回事件 - backEv(){ - uni.navigateBack({delta:1}) - } - } - } -</script> - -<style scoped> - .disjcac{display: flex;justify-content: center;align-items: center;} - .clips1{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} - .clips2{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} - .status-box{position: sticky;top: 0;left: 0;right: 0;z-index: 10;} - .status-nav{width: 100%;position: relative;} - .left-box {position: absolute;padding: 0 20rpx;} - .right-box {position: absolute;right: 0; padding: 0 20rpx;} - .tab-title {width: 100%;font-size: 32rpx;display: flex;font-weight: bold;} - .tab-title .title-box {margin-top: -4rpx;} -</style> +<template> + <view class="status-box-all" :style="{marginBottom: marginBottom}"> + <!-- 网络、电量栏 start --> + <view :style="{height: statusBarHeight+'px',background: backgroudColor}"></view> + <!-- 网络、电量栏 end --> + + <!-- 头部状态栏 start --> + <view class="status-nav disac" :style="{background: backgroudColor,height:navBarHeight}"> + <!-- 返回键 start --> + <view class="disjcac left-box" @tap="backEv" v-if="ifReturn" :style="{height: navBarHeight}" > + <slot name="leftcontent"> + <i class="icon icon-return" style="font-size: 38rpx;" :style="{color: returnColor}"></i> + </slot> + </view> + <!-- 返回键 end --> + + <!-- 标题 start --> + <view class=" tab-title " + :style="{ + color: titleColor, + justifyContent: ifCenter ? 'center' : '', + padding: ifCenter ? '0px' : `${ifReturn ? '0 38' : '0 15'}px`}"> + <view class="title-box" :class="['','clips1','clips2'][clipNumber*1]" :style="{maxWidth: ifCenter ? '360rpx' : '70%'}"> + <!-- 有网络 --> + <view v-if="ifTitle && ifNet" >{{navBarTitle}}</view> + <!-- 无网络 --> + <view v-if="!ifNet">{{netText}}<text @tap="refreshEv" style="color: #3875F6;margin-left: 20rpx;">刷新</text></view> + </view> + </view> + <!-- 标题 end --> + + <!-- 右侧图标 start --> + <view class="right-box disjcac" :style="{height: navBarHeight}"> + <slot name="rightcontent"></slot> + </view> + <!-- 右侧图标 end --> + </view> + <!-- 头部状态栏 end --> + </view> +</template> + +<script> + export default { + name:'status-nav', + props:{ + //状态栏、导航栏背景颜色 + backgroudColor:{ + type:String, + default:'#FFFFFF' + }, + // 默认导航栏高度 + navBarHeight: { + type:String, + default:'42px' + }, + //是否显示返回键 + ifReturn:{ + type:Boolean, + default:true + }, + // 返回键颜色 + returnColor: { + type:String, + default:'#000' + }, + //是否显示标题 + ifTitle:{ + type:Boolean, + default:true + }, + // 导航栏标题 + navBarTitle: { + type:String, + default:'' + }, + // 标题最多几行显示 + clipNumber: { + type:String, + default:'1' + }, + //标题颜色 + titleColor:{ + type:String, + default:'#333333' + }, + // 标题是否居中 + ifCenter: { + type:Boolean, + default: true + }, + // 底部距离内容多高 + marginBottom: { + type:String, + default:'20rpx' + }, + }, + data(){ + return { + statusBarHeight: uni.getSystemInfoSync().statusBarHeight, + ifNet:true ,// 是否有网络 + netText:'当前无网络', + netTimer:null + } + }, + mounted() { + // 网络监测 + this.$toolAll.tools.networkStatus(); + // 获取当前页面路径 + this.$toolAll.tools.obtainPagePath(); + setTimeout(()=>{ + this.ifNet = uni.getStorageSync('isNet'); + },500) + }, + methods:{ + // 刷新网络事件 + refreshEv(){ + this.netText = '正在刷新...'; + let outTime = 0;//十秒超时 + this.netTimer = setInterval(()=>{ + outTime++; + this.$toolAll.tools.networkStatus(); + if(uni.getStorageSync('isNet')) { + clearInterval(this.netTimer); + this.ifNet = true; + } + if(outTime==10) { + clearInterval(this.netTimer); + this.netText = '刷新失败'; + outTime = 0; + } + },1000) + }, + //返回事件 + backEv(){ + uni.navigateBack({delta:1}) + } + } + } +</script> + +<style scoped> + .disjcac{display: flex;justify-content: center;align-items: center;} + .clips1{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} + .clips2{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;text-overflow: ellipsis;word-wrap: break-word;word-break:break-all;} + .status-box-all{position: sticky;top: 0;left: 0;right: 0;z-index: 10;} + .status-nav{width: 100%;position: relative;} + .left-box {position: absolute;padding: 0 20rpx;} + .right-box {position: absolute;right: 0; padding: 0 20rpx;} + .tab-title {width: 100%;font-size: 32rpx;display: flex;font-weight: bold;} + .tab-title .title-box {margin-top: -4rpx;} +</style> diff --git a/pagesA/community/handle/handle.vue b/pagesA/community/handle/handle.vue index ecdcdd1..641d359 100644 --- a/pagesA/community/handle/handle.vue +++ b/pagesA/community/handle/handle.vue @@ -1,36 +1,78 @@ -<template> - <view class="pad-x50 pad-zy30"> - <view class="disac fon36 pad-sx30">调查情况</view> - <view class="disjcac"> - <view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;"> - <textarea class="col9 fon30" style="height: 272rpx;" placeholder="请输入调查结果"></textarea> - </view> - </view> - <view class="disac fon36 pad-sx30">处理结果</view> - <view class="disjcac"> - <view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;"> - <textarea class="col9 fon30" style="height: 272rpx;" placeholder="请输入处理结果"></textarea> - </view> - </view> - <view class="disjbac mar-s70"> - <view class="enter-btn disjcac" style="width: 45%;margin: 0;">立即提交</view> - <view class="enter-btn disjcac" style="width: 45%;margin: 0;color: #000000;background-color: #e5e5e5;border-color: #d9d9d9;">无效</view> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - methods: { - - } - } -</script> - -<style> -</style> +<template> + <view class="pad-x50 pad-zy30"> + <view class="disac fon36 pad-sx30">调查情况</view> + <view class="disjcac"> + <view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;"> + <textarea class="col9 fon30" v-model="findings" style="height: 272rpx;" placeholder="请输入调查结果"></textarea> + </view> + </view> + <view class="disac fon36 pad-sx30">处理结果</view> + <view class="disjcac"> + <view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;"> + <textarea class="col9 fon30" v-model="results" style="height: 272rpx;" placeholder="请输入处理结果"></textarea> + </view> + </view> + <view class="disjbac mar-s70"> + <view @tap="submitEv(id,1)" class="enter-btn disjcac" style="width: 45%;margin: 0;">立即提交</view> + <view @tap="submitEv(id,0)" class="enter-btn disjcac" style="width: 45%;margin: 0;color: #000000;background-color: #e5e5e5;border-color: #d9d9d9;">无效</view> + </view> + </view> +</template> + +<script> + export default { + data() { + return { + findings:'', //调查结果 + results:'', //处理结果 + flag:true, + } + }, + methods: { + // 提交或取消 + submitEv(id,type){ + if(this.checkEmpty() && this.flag){ + this.flag = false; + let params = { + opinion_id:id, + desc:this.findings, + result:this.results, + invalid:type + } + this.$requst.post('/api/opinion/worker-handle',params).then(res => { + if(res.code==0){ + this.$toolAll.tools.showToast('提交成功'); + // 返回 + uni.navigateBack({ + delta:2 + }) + } else { + this.$toolAll.tools.showToast(res.msg); + } + uni.hideLoading(); + this.isLoading = true; + setTimeout(()=>{ + this.flag = true; + },2000) + }) + } + }, + + // 验证表单 + checkEmpty(){ + let result = false; + if(!this.findings) { + this.$toolAll.tools.showToast('请填写调查结果'); + } else if(!this.results) { + this.$toolAll.tools.showToast('请填写处理结果'); + } else { + result = true; + } + return result; + }, + } + } +</script> + +<style> +</style> diff --git a/pagesA/community/opinion-handle/opinion-handle.vue b/pagesA/community/opinion-handle/opinion-handle.vue index 4739c33..6166139 100644 --- a/pagesA/community/opinion-handle/opinion-handle.vue +++ b/pagesA/community/opinion-handle/opinion-handle.vue @@ -1,62 +1,113 @@ -<template> - <view> - <statusContainer titlet="民意办理" :ifReturn="false"> - <view slot="content"> - <view class="bacf disja pad-sx20 fon30" :style="{top:newtop+42+'px'}" style="margin: -20rpx -20rpx 0 -20rpx;position: sticky;z-index: 10;"> - <view @tap="switchEv(0)" class="pad-sx20 disjcac radius20" :style="switchIndex==0?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">待办理</view> - <view @tap="switchEv(1)" class="pad-sx20 disjcac radius20" :style="switchIndex==1?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">已办理</view> - </view> - <view class="mar-s20 radius20 fon24 bacf posir" v-for="(item,index) in 50" :key="index"> - <view class="pad-sx20 pad-zy50 status-box" :style="{backgroundColor:['#f8bf00','#39d091'][switchIndex]}">{{['待办理','已办理'][switchIndex]}}</view> - <view class="pad20 bbot line-h46 pad-x40"> - <view class="fon30">LH20220729130234</view> - <view class="">用户名:匿名提交</view> - <view class="">金牛社区A村</view> - <view class="">反馈问题:我就是想问下我们村的路多久能修好?</view> - </view> - <view class="dis fon30 disjcac" v-if="switchIndex==0"> - <view @tap="handleEv(0)" class="pad-sx30 disac"> - <image class="mar-y20" src="/static/icon/icon-handle.png" mode="" style="width: 34rpx;height: 34rpx;"></image> - 立即办理 - </view> - </view> - </view> - </view> - </statusContainer> - </view> -</template> - -<script> - import statusContainer from '@/components/containers/status-container.vue'; - export default { - components:{ - statusContainer - }, - data() { - return { - switchIndex:0, - newtop:uni.getSystemInfoSync().statusBarHeight - } - }, - methods: { - // 切换事件 - switchEv(index){ - console.log(index); - this.switchIndex = index; - }, - // 前往详情页面 - handleEv(id){ - uni.navigateTo({ - url:`/pagesA/detail/detail?id=${id}&manager=0` - }) - }, - } - } -</script> - -<style> -page{ - background-color: #f5f5f5; -} -.status-box{position: absolute;right: 0;top: 0;border-radius: 0 0 0 30rpx;} -</style> +<template> + <view> + <statusContainer titlet="民意办理" :ifReturn="false"> + <view slot="content"> + <view class="bacf disja pad-sx20 fon30" :style="{top:newtop+42+'px'}" style="margin: -20rpx -20rpx 0 -20rpx;position: sticky;z-index: 10;"> + <view @tap="switchEv(0)" class="pad-sx20 disjcac radius20" :style="switchIndex==0?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">待办理</view> + <view @tap="switchEv(1)" class="pad-sx20 disjcac radius20" :style="switchIndex==1?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">已办理</view> + </view> + <view class="mar-s20 radius20 fon24 bacf posir" v-for="(item,index) in communityList" :key="index"> + <view class="pad-sx20 pad-zy50 status-box" :style="{backgroundColor:['#f8bf00','#39d091'][switchIndex]}">{{['待办理','已办理'][switchIndex]}}</view> + <view class="pad20 bbot line-h46 pad-x40"> + <view class="fon30">{{item.coding}}</view> + <view class="">用户名:{{item.is_anonymous==1?'匿名提交':item.u_name}}</view> + <view class="">金牛社区A村</view> + <view class="">反馈问题:{{item.description}}</view> + </view> + <view class="dis fon30 disjcac" v-if="switchIndex==0"> + <view @tap="handleEv(item.id)" class="pad-sx30 disac"> + <image class="mar-y20" src="/static/icon/icon-handle.png" mode="" style="width: 34rpx;height: 34rpx;"></image> + 立即办理 + </view> + </view> + </view> + </view> + </statusContainer> + </view> +</template> + +<script> + import statusContainer from '@/components/containers/status-container.vue'; + export default { + components:{ + statusContainer + }, + data() { + return { + switchIndex:0, + newtop:uni.getSystemInfoSync().statusBarHeight, + communityList:[], //数据列表 + type:['doing','done','all'], //办理状态 + page:1, //页数 + size:15, //条数 + total:0, //总数 + noMore:false, // 没有更多 + isLoading:false, + } + }, + onShow() { + // 查询列表 + this.getListEv(); + }, + onReachBottom() { + if(!this.noMore){ + this.page++; + // 查询列表 + this.getListEv(); + } + }, + methods: { + // 切换事件 + switchEv(index){ + if(index !== this.switchIndex){ + this.switchIndex = index; + // 重置数据 + this.communityList= []; + this.page = 1; + // 查询列表 + this.getListEv(); + } + }, + + // 查询列表 + getListEv(){ + uni.showLoading({ + title:'加载中' + }) + let params = { + page:this.page, + size:this.size, + type:this.type[this.switchIndex] + } + this.$requst.get('opinion/community-list',params).then(res => { + if(res.code==0){ + console.log(res,'社区工单列表'); + this.total = res.data.total; + this.communityList = this.communityList.concat(res.data.list) + if(this.communityList.length == this.total){ + this.noMore =true; + } + } else { + this.$toolAll.tools.showToast(res.msg); + } + uni.hideLoading(); + this.isLoading = true; + }) + }, + + // 前往详情页面 + handleEv(id){ + uni.navigateTo({ + url:`/pagesA/detail/detail?id=${id}&manager=0` + }) + }, + } + } +</script> + +<style> +page{ + background-color: #f5f5f5; +} +.status-box{position: absolute;right: 0;top: 0;border-radius: 0 0 0 30rpx;} +</style> diff --git a/pagesA/detail/detail.vue b/pagesA/detail/detail.vue index 9297f3d..d6ec15d 100644 --- a/pagesA/detail/detail.vue +++ b/pagesA/detail/detail.vue @@ -1,138 +1,175 @@ -<template> - <view> - <view class="pad-zy20 fon24"> - <view class="disjbac fon30 bbot pad-sx30"> - <view class="colb bold flexs">序号</view> - <view class="col9">LH20220729130234</view> - </view> - <view class="disjbac fon30 bbot pad-sx30"> - <view class="colb bold flexs">审核状态</view> - <view class="col9">待审核</view> - </view> - <view class="disjbac bbot pad-sx20"> - <view class="fon30 colb bold flexs">真实姓名</view> - <view class="col9">测试村</view> - </view> - <view class="disjbac bbot pad-sx20"> - <view class="fon30 colb bold flexs">联系方式</view> - <view class="col9">测试村</view> - </view> - <view class="disjbac fon30 bbot pad-sx30"> - <view class="colb bold flexs">社区</view> - <view class="col9">新华社区</view> - </view> - <view class="disjbac fon30 bbot pad-sx30"> - <view class="colb bold flexs">村</view> - <view class="col9">测试村</view> - </view> - <view class="dis fon30 bbot pad-sx30"> - <view class="colb bold flexs">图片</view> - <view class="disac width100 fe"> - <image src="" mode="aspectFill" class="width155 radius30 mar-z20"></image> - </view> - </view> - <view class="dis fon30 bbot pad-sx30"> - <view class="colb bold flexs">视频</view> - <view class="disac width100 fe"> - <image src="" mode="aspectFill" class="width155 radius30 mar-z20"></image> - </view> - </view> - <view class="disjb bbot pad-sx20"> - <view class="fon30 colb bold flexs">描述文案</view> - <view class="col9 tright line-h40" style="max-width: 60%;">我想问下我们村的机耕道什么 时候可以弄好?当前以及严重 影响我们出行了!</view> - </view> - <view class="dis fon30 bbot pad-sx30"> - <view class="colb bold flexs">语音</view> - <view class="disac col9 width100 fe"> - <view @tap="playVoice" class="col9 radius30 disjcac fc posir mar-y20 item-box width155" style="border: 1px solid #d9d9d9;"> - <image src="/static/icon/icon-audio.png" mode="aspectFill" style="width: 74rpx;height: 85rpx;"></image> - </view> - </view> - </view> - <view class="disjbac fon30 bbot pad-sx30"> - <view class="colb bold flexs">类别</view> - <view class="col9">测试村</view> - </view> - <view class="" style="margin: 0 -20rpx;" v-if="ifManager!=2"> - <view class="disac pad-zy20 pad-x30 pad-s40"> - <view class="cricle-box"></view> - <view class="fon36 mar-z20 bold">处理反馈</view> - </view> - <view class="pad-zy20 fon30" style="background-color: #f5f5f5;"> - <view class="col9 pad-sx30">2021年7月19日 21:30</view> - <view class="disjb bbot pad-x30"> - <view class="">调查情况</view> - <view class="col9 tright" style="max-width: 50%;">情况属实,马上安排人员 处理,请耐心等待</view> - </view> - <view class="disjb bbot pad-sx30"> - <view class="">处理结果</view> - <view class="col9 tright" style="max-width: 50%;">情况属实,马上安排人员 处理,请耐心等待</view> - </view> - </view> - <view class="disac pad-zy20 pad-x30 pad-s40"> - <view class="cricle-box"></view> - <view class="fon36 mar-z20 bold">群众反馈</view> - </view> - <view class="pad-zy20 fon30" style="background-color: #f5f5f5;"> - <view class="col9 pad-sx30">2021年7月19日 21:30</view> - <view class="disjb bbot pad-x30"> - <view class="">反馈意见(不满意)</view> - <view class="col9 tright" style="max-width: 50%;">等了好久了还没有上门 处理!</view> - </view> - </view> - </view> - </view> - <view class="disjcac pad-sx50" v-if="ifManager==0"> - <view class="disjcac enter-btn" style="margin: 0;" @tap="handleEv">立即办理</view> - </view> - <view class="disjcac pad-sx50" v-if="ifManager==1"> - <view class="disjcac enter-btn" style="margin: 0;background-color: #f71200;border-color: #f71200;" @tap="handleEv">督办复审</view> - </view> - </view> -</template> - -<script> - const recorderManager = uni.getRecorderManager(); - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.autoplay = true; - export default { - data() { - return { - audioText:'', - ifManager:0//是否是管理员 - } - }, - onLoad(op) { - if(op.manager) this.ifManager = op.manager; - }, - onHide() { - innerAudioContext.stop(); - }, - methods: { - // 播放录音 - playVoice() { - if (this.audioText) { - innerAudioContext.src = this.audioText; - innerAudioContext.play(); - } - }, - // 前往立即办理页面 - handleEv(id){ - uni.navigateTo({ - url:`/pagesA/community/handle/handle?id=${id}` - }) - }, - } - } -</script> - -<style> -.del-btn{ - background-color: #39d091;width: 45rpx;height: 45rpx;border-radius: 100%;top: -20rpx;right: -20rpx; -} -.width155{ - width: 155rpx; - height: 150rpx; -} -.item-box{border: 1px solid #FFFFFF;} -</style> +<template> + <view> + <view class="pad-zy20 fon24"> + <view class="disjbac fon30 bbot pad-sx30"> + <view class="colb bold flexs">序号</view> + <view class="col9">LH20220729130234</view> + </view> + <view class="disjbac fon30 bbot pad-sx30"> + <view class="colb bold flexs">审核状态</view> + <view class="col9">待审核</view> + </view> + <view class="disjbac bbot pad-sx20"> + <view class="fon30 colb bold flexs">真实姓名</view> + <view class="col9">测试村</view> + </view> + <view class="disjbac bbot pad-sx20"> + <view class="fon30 colb bold flexs">联系方式</view> + <view class="col9">测试村</view> + </view> + <view class="disjbac fon30 bbot pad-sx30"> + <view class="colb bold flexs">社区</view> + <view class="col9">新华社区</view> + </view> + <view class="disjbac fon30 bbot pad-sx30"> + <view class="colb bold flexs">村</view> + <view class="col9">测试村</view> + </view> + <view class="dis fon30 bbot pad-sx30"> + <view class="colb bold flexs">图片</view> + <view class="disac width100 fe"> + <image src="" mode="aspectFill" class="width155 radius30 mar-z20"></image> + </view> + </view> + <view class="dis fon30 bbot pad-sx30"> + <view class="colb bold flexs">视频</view> + <view class="disac width100 fe"> + <image src="" mode="aspectFill" class="width155 radius30 mar-z20"></image> + </view> + </view> + <view class="disjb bbot pad-sx20"> + <view class="fon30 colb bold flexs">描述文案</view> + <view class="col9 tright line-h40" style="max-width: 60%;">我想问下我们村的机耕道什么 时候可以弄好?当前以及严重 影响我们出行了!</view> + </view> + <view class="dis fon30 bbot pad-sx30"> + <view class="colb bold flexs">语音</view> + <view class="disac col9 width100 fe"> + <view @tap="playVoice" class="col9 radius30 disjcac fc posir mar-y20 item-box width155" style="border: 1px solid #d9d9d9;"> + <image src="/static/icon/icon-audio.png" mode="aspectFill" style="width: 74rpx;height: 85rpx;"></image> + </view> + </view> + </view> + <view class="disjbac fon30 bbot pad-sx30"> + <view class="colb bold flexs">类别</view> + <view class="col9">测试村</view> + </view> + <view class="" style="margin: 0 -20rpx;" v-if="ifManager!=2"> + <view class="disac pad-zy20 pad-x30 pad-s40"> + <view class="cricle-box"></view> + <view class="fon36 mar-z20 bold">处理反馈</view> + </view> + <view class="pad-zy20 fon30" style="background-color: #f5f5f5;"> + <view class="col9 pad-sx30">2021年7月19日 21:30</view> + <view class="disjb bbot pad-x30"> + <view class="">调查情况</view> + <view class="col9 tright" style="max-width: 50%;">情况属实,马上安排人员 处理,请耐心等待</view> + </view> + <view class="disjb bbot pad-sx30"> + <view class="">处理结果</view> + <view class="col9 tright" style="max-width: 50%;">情况属实,马上安排人员 处理,请耐心等待</view> + </view> + </view> + <view class="disac pad-zy20 pad-x30 pad-s40"> + <view class="cricle-box"></view> + <view class="fon36 mar-z20 bold">群众反馈</view> + </view> + <view class="pad-zy20 fon30" style="background-color: #f5f5f5;"> + <view class="col9 pad-sx30">2021年7月19日 21:30</view> + <view class="disjb bbot pad-x30"> + <view class="">反馈意见(不满意)</view> + <view class="col9 tright" style="max-width: 50%;">等了好久了还没有上门 处理!</view> + </view> + </view> + </view> + </view> + <view class="disjcac pad-sx50" v-if="ifManager==0"> + <view class="disjcac enter-btn" style="margin: 0;" @tap="handleEv">立即办理</view> + </view> + <view class="disjcac pad-sx50" v-if="ifManager==1"> + <view class="disjcac enter-btn" style="margin: 0;background-color: #f71200;border-color: #f71200;" @tap="reexamineEv">督办复审</view> + </view> + </view> +</template> + +<script> + const recorderManager = uni.getRecorderManager(); + const innerAudioContext = uni.createInnerAudioContext(); + innerAudioContext.autoplay = true; + export default { + data() { + return { + audioText:'', + detail:{}, //工单详情 + ifManager:0, // 是否是管理员 + id:0, //工单id + } + }, + onLoad(op) { + if(op.manager) this.ifManager = op.manager; + if(op.id) this.id = op.id; + // 查询详情 + this.getDetailEv(); + }, + onHide() { + innerAudioContext.stop(); + }, + methods: { + // 播放录音 + playVoice() { + if (this.audioText) { + innerAudioContext.src = this.audioText; + innerAudioContext.play(); + } + }, + + // 查询工单详情 + getDetailEv(){ + this.$requst.post('user/opinionInfo',{id:this.id}).then(res => { + if(res.code==0){ + console.log(res,'社区工单详情'); + this.detail = res.data; + } else { + this.$toolAll.tools.showToast(res.msg); + } + uni.hideLoading(); + this.isLoading = true; + }) + }, + + // 督办复审 + reexamineEv(){ + this.$requst.post('/api/administrator/examine',{id:this.id}).then(res => { + if(res.code==0){ + console.log(res,'督办复审'); + // 返回 + uni.navigateBack({ + delta:1 + }) + } else { + this.$toolAll.tools.showToast(res.msg); + } + uni.hideLoading(); + this.isLoading = true; + }) + }, + + // 前往立即办理 + handleEv(id){ + uni.navigateTo({ + url:`/pagesA/community/handle/handle?id=${id}` + }) + }, + } + } +</script> + +<style> +.del-btn{ + background-color: #39d091;width: 45rpx;height: 45rpx;border-radius: 100%;top: -20rpx;right: -20rpx; +} +.width155{ + width: 155rpx; + height: 150rpx; +} +.item-box{border: 1px solid #FFFFFF;} +</style> diff --git a/pagesA/manager/examine-list/examine-list.vue b/pagesA/manager/examine-list/examine-list.vue index db6e202..e2d64f0 100644 --- a/pagesA/manager/examine-list/examine-list.vue +++ b/pagesA/manager/examine-list/examine-list.vue @@ -1,70 +1,146 @@ -<template> - <view> - <statusContainer titlet="民意审核" :ifReturn="false"> - <view slot="content"> - <view class="bacf disja pad-sx20 fon30" :style="{top:newtop+42+'px'}" style="margin: -20rpx -20rpx 0 -20rpx;position: sticky;z-index: 10;"> - <view @tap="switchEv(0)" class="pad-sx20 disjcac radius20" :style="switchIndex==0?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">已处理</view> - <view @tap="switchEv(1)" class="pad-sx20 disjcac radius20" :style="switchIndex==1?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">未处理</view> - </view> - <view class="mar-s20 radius20 fon24 bacf posir" v-for="(item,index) in 50" :key="index"> - <view class="pad-sx20 pad-zy50 status-box" :style="{backgroundColor:['#39d091','#f8bf00','#f41500'][switchIndex]}">{{['已处理','待处理','已督办'][switchIndex]}}</view> - <view class="pad20 bbot line-h46 pad-x40"> - <view class="fon30">LH20220729130234</view> - <view class="">用户名:匿名提交</view> - <view class="">金牛社区A村</view> - <view class="">反馈问题:我就是想问下我们村的路多久能修好?</view> - </view> - <view class="dis fon30" v-if="switchIndex==0"> - <view @tap="goDetail(0)" class="width50 pad-sx30 disjcac border-r"> - <image class="mar-y20" src="/static/icon/icon-check.png" mode="" style="width: 34rpx;height: 34rpx;"></image>查看处理详情 - </view> - <view class="width50 pad-sx30 disjcac"> - <image class="mar-y20" src="/static/icon/icon-revie.png" mode="" style="width: 34rpx;height: 34rpx;"></image> - 督办复审 - </view> - </view> - <view class="dis fon30 disjcac" v-if="switchIndex==1"> - <view @tap="goDetail(0)" class="pad-sx30 disac"> - <image class="mar-y20" src="/static/icon/icon-check.png" mode="" style="width: 34rpx;height: 34rpx;"></image> - 查看处理详情 - </view> - </view> - </view> - </view> - </statusContainer> - </view> -</template> - -<script> - import statusContainer from '@/components/containers/status-container.vue'; - export default { - components:{ - statusContainer - }, - data() { - return { - switchIndex:0, - newtop:uni.getSystemInfoSync().statusBarHeight - } - }, - methods: { - // 切换事件 - switchEv(index){ - this.switchIndex = index; - }, - // 前往详情页 - goDetail(id){ - uni.navigateTo({ - url:`/pagesA/detail/detail?id=${id}&manager=1` - }) - }, - } - } -</script> - -<style> -page{ - background-color: #f5f5f5; -} -.status-box{position: absolute;right: 0;top: 0;background-color: #39d091;border-radius: 0 0 0 30rpx;} -</style> +<template> + <view v-if="isLoading"> + <statusContainer titlet="民意审核" :ifReturn="false"> + <view slot="content"> + <view class="bacf disja pad-sx20 fon30" :style="{top:newtop+42+'px'}" style="margin: -20rpx -20rpx 0 -20rpx;position: sticky;z-index: 10;"> + <view @tap="switchEv(0)" class="pad-sx20 disjcac radius20" :style="switchIndex==0?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">已处理</view> + <view @tap="switchEv(1)" class="pad-sx20 disjcac radius20" :style="switchIndex==1?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">未处理</view> + </view> + <view class="mar-s20 radius20 fon24 bacf posir" v-for="(item,index) in reviewedList" :key="index"> + <view class="pad-sx20 pad-zy50 status-box" :style="{backgroundColor:['#39d091','#f8bf00','#f41500'][switchIndex]}">{{['已处理','待处理','已督办'][switchIndex]}}</view> + <view class="pad20 bbot line-h46 pad-x40"> + <view class="fon30">{{item.coding}}</view> + <view class="">用户名:{{item.is_anonymous==1?'匿名提交':item.u_name}}</view> + <view class="">{{item.state_text}}</view> + <view class="">反馈问题:{{item.description}}</view> + </view> + <view class="dis fon30" v-if="switchIndex==0"> + <view @tap="goDetail(item.id)" class="width50 pad-sx30 disjcac border-r"> + <image class="mar-y20" src="/static/icon/icon-check.png" mode="" style="width: 34rpx;height: 34rpx;"></image>查看处理详情 + </view> + <view @tap="reexamineEv(item.id)" class="width50 pad-sx30 disjcac"> + <image class="mar-y20" src="/static/icon/icon-revie.png" mode="" style="width: 34rpx;height: 34rpx;"></image> + 督办复审 + </view> + </view> + <view class="dis fon30 disjcac" v-if="switchIndex==1"> + <view @tap="goDetail(item.id)" class="pad-sx30 disac"> + <image class="mar-y20" src="/static/icon/icon-check.png" mode="" style="width: 34rpx;height: 34rpx;"></image> + 查看处理详情 + </view> + </view> + </view> + </view> + </statusContainer> + </view> +</template> + +<script> + import statusContainer from '@/components/containers/status-container.vue'; + export default { + components:{ + statusContainer + }, + data() { + return { + switchIndex:0, + newtop:uni.getSystemInfoSync().statusBarHeight, + reviewedList:[], //数据列表 + type:[1,0], // 办理状态 + page:1, //页数 + size:15, //条数 + total:0, //总数 + noMore:false, // 没有更多 + isLoading:false, + } + }, + onShow() { + // 查询列表 + this.getListEv(); + }, + onReachBottom() { + if(!this.noMore){ + this.page++; + // 查询列表 + this.getListEv(); + } + }, + methods: { + // 切换事件 + switchEv(index){ + if(index!==this.switchIndex){ + this.switchIndex = index; + // 重置数据 + this.reviewedList= []; + this.page = 0; + // 查询列表 + this.getListEv(); + } + }, + // 查询列表 + getListEv(){ + uni.showLoading({ + title:'加载中' + }) + let params = { + page:this.page, + size:this.size, + state:this.type[this.switchIndex] + } + this.$requst.post('administrator/reviewedList',params).then(res => { + if(res.code==0){ + console.log(res,'处理情况列表'); + this.total = res.data.total; + let reviewedArr = []; + res.data.list.forEach(item=>{ + let obj = { + id:item.id, + coding:item.coding, + state_text:item.state_text, + u_name:item.u_name, + u_phone:item.u_phone, + description:item.description, + is_anonymous:item.is_anonymous, + } + reviewedArr.push(obj); + }) + this.reviewedList = this.reviewedList.concat(reviewedArr) + if(this.reviewedList.length == this.total){ + this.noMore =true; + } + } else { + this.$toolAll.tools.showToast(res.msg); + } + uni.hideLoading(); + this.isLoading = true; + }) + }, + // 督办复审 + reexamineEv(id){ + this.$requst.post('administrator/examine',{id:id}).then(res => { + if(res.code==0){ + console.log(res,'督办复审'); + this.$toolAll.tools.showToast('审核成功'); + } else { + this.$toolAll.tools.showToast(res.msg); + } + uni.hideLoading(); + this.isLoading = true; + }) + }, + // 前往详情页 + goDetail(id){ + uni.navigateTo({ + url:`/pagesA/detail/detail?id=${id}&manager=1` + }) + }, + } + } +</script> + +<style> +page{ + background-color: #f5f5f5; +} +.status-box{position: absolute;right: 0;top: 0;background-color: #39d091;border-radius: 0 0 0 30rpx;} +</style> diff --git a/store/index.js b/store/index.js index 5eaa368..6fe4ffd 100644 --- a/store/index.js +++ b/store/index.js @@ -1,14 +1,14 @@ -// 组装模块并导出 store 的地方 -import Vue from 'vue' -import Vuex from 'vuex' -import moduleA from '@/store/modules/moduleA' - -Vue.use(Vuex);//vue的插件机制 - -//Vuex.modules 模块选项 -const store = new Vuex.Store({ - modules: { - moduleA - } -}) +// 组装模块并导出 store 的地方 +import Vue from 'vue' +import Vuex from 'vuex' +import moduleA from '@/store/modules/moduleA' + +Vue.use(Vuex);//vue的插件机制 + +//Vuex.modules 模块选项 +const store = new Vuex.Store({ + modules: { + moduleA + } +}) export default store \ No newline at end of file diff --git a/store/modules/moduleA.js b/store/modules/moduleA.js index 33ed795..8f25ae8 100644 --- a/store/modules/moduleA.js +++ b/store/modules/moduleA.js @@ -1,14 +1,14 @@ -// 用户模块 -export default { - state:{//存放状态 - userInfo:{}, - ifAnonymous:false//是否匿名通道 - }, - // Vuex中store数据改变的唯一方法就是mutations 不适合异步方法 - mutations: { - // 设置是否是匿名通道 - setAnonymous(state,str) { - state.ifAnonymous = str; - }, - } +// 用户模块 +export default { + state:{//存放状态 + userInfo:{}, + ifAnonymous:false//是否匿名通道 + }, + // Vuex中store数据改变的唯一方法就是mutations 不适合异步方法 + mutations: { + // 设置是否是匿名通道 + setAnonymous(state,str) { + state.ifAnonymous = str; + }, + } } \ No newline at end of file diff --git a/uni.scss b/uni.scss index f0f426c..0b7deda 100644 --- a/uni.scss +++ b/uni.scss @@ -1,76 +1,76 @@ -/** - * 这里是uni-app内置的常用样式变量 - * - * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 - * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App - * - */ - -/** - * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 - * - * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 - */ - -/* 颜色变量 */ - -/* 行为相关颜色 */ -$uni-color-primary: #007aff; -$uni-color-success: #4cd964; -$uni-color-warning: #f0ad4e; -$uni-color-error: #dd524d; - -/* 文字基本颜色 */ -$uni-text-color:#333;//基本色 -$uni-text-color-inverse:#fff;//反色 -$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 -$uni-text-color-placeholder: #808080; -$uni-text-color-disable:#c0c0c0; - -/* 背景颜色 */ -$uni-bg-color:#ffffff; -$uni-bg-color-grey:#f8f8f8; -$uni-bg-color-hover:#f1f1f1;//点击状态颜色 -$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 - -/* 边框颜色 */ -$uni-border-color:#c8c7cc; - -/* 尺寸变量 */ - -/* 文字尺寸 */ -$uni-font-size-sm:24upx; -$uni-font-size-base:28upx; -$uni-font-size-lg:32upx; - -/* 图片尺寸 */ -$uni-img-size-sm:40upx; -$uni-img-size-base:52upx; -$uni-img-size-lg:80upx; - -/* Border Radius */ -$uni-border-radius-sm: 4upx; -$uni-border-radius-base: 6upx; -$uni-border-radius-lg: 12upx; -$uni-border-radius-circle: 50%; - -/* 水平间距 */ -$uni-spacing-row-sm: 10px; -$uni-spacing-row-base: 20upx; -$uni-spacing-row-lg: 30upx; - -/* 垂直间距 */ -$uni-spacing-col-sm: 8upx; -$uni-spacing-col-base: 16upx; -$uni-spacing-col-lg: 24upx; - -/* 透明度 */ -$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 - -/* 文章场景相关 */ -$uni-color-title: #2C405A; // 文章标题颜色 -$uni-font-size-title:40upx; -$uni-color-subtitle: #555555; // 二级标题颜色 -$uni-font-size-subtitle:36upx; -$uni-color-paragraph: #3F536E; // 文章段落颜色 +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:24upx; +$uni-font-size-base:28upx; +$uni-font-size-lg:32upx; + +/* 图片尺寸 */ +$uni-img-size-sm:40upx; +$uni-img-size-base:52upx; +$uni-img-size-lg:80upx; + +/* Border Radius */ +$uni-border-radius-sm: 4upx; +$uni-border-radius-base: 6upx; +$uni-border-radius-lg: 12upx; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 10px; +$uni-spacing-row-base: 20upx; +$uni-spacing-row-lg: 30upx; + +/* 垂直间距 */ +$uni-spacing-col-sm: 8upx; +$uni-spacing-col-base: 16upx; +$uni-spacing-col-lg: 24upx; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:40upx; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:36upx; +$uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-font-size-paragraph:30upx; \ No newline at end of file