社区、管理员列表调用

master
Lee1203 2022-07-31 16:27:56 +08:00
parent 14cae43bb6
commit 3a13f8feef
8 changed files with 764 additions and 558 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="status-box" :style="{marginBottom: marginBottom}"> <view class="status-box-all" :style="{marginBottom: marginBottom}">
<!-- 网络电量栏 start --> <!-- 网络电量栏 start -->
<view :style="{height: statusBarHeight+'px',background: backgroudColor}"></view> <view :style="{height: statusBarHeight+'px',background: backgroudColor}"></view>
<!-- 网络电量栏 end --> <!-- 网络电量栏 end -->
@ -142,7 +142,7 @@
.disjcac{display: flex;justify-content: center;align-items: center;} .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;} .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;} .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-box-all{position: sticky;top: 0;left: 0;right: 0;z-index: 10;}
.status-nav{width: 100%;position: relative;} .status-nav{width: 100%;position: relative;}
.left-box {position: absolute;padding: 0 20rpx;} .left-box {position: absolute;padding: 0 20rpx;}
.right-box {position: absolute;right: 0; padding: 0 20rpx;} .right-box {position: absolute;right: 0; padding: 0 20rpx;}

View File

@ -3,18 +3,18 @@
<view class="disac fon36 pad-sx30">调查情况</view> <view class="disac fon36 pad-sx30">调查情况</view>
<view class="disjcac"> <view class="disjcac">
<view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;"> <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> <textarea class="col9 fon30" v-model="findings" style="height: 272rpx;" placeholder="请输入调查结果"></textarea>
</view> </view>
</view> </view>
<view class="disac fon36 pad-sx30">处理结果</view> <view class="disac fon36 pad-sx30">处理结果</view>
<view class="disjcac"> <view class="disjcac">
<view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;"> <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> <textarea class="col9 fon30" v-model="results" style="height: 272rpx;" placeholder="请输入处理结果"></textarea>
</view> </view>
</view> </view>
<view class="disjbac mar-s70"> <view class="disjbac mar-s70">
<view class="enter-btn disjcac" style="width: 45%;margin: 0;">立即提交</view> <view @tap="submitEv(id,1)" 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 @tap="submitEv(id,0)" class="enter-btn disjcac" style="width: 45%;margin: 0;color: #000000;background-color: #e5e5e5;border-color: #d9d9d9;">无效</view>
</view> </view>
</view> </view>
</template> </template>
@ -23,11 +23,53 @@
export default { export default {
data() { data() {
return { return {
findings:'', //
results:'', //
flag:true,
} }
}, },
methods: { 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> </script>

View File

@ -6,16 +6,16 @@
<view @tap="switchEv(0)" class="pad-sx20 disjcac radius20" :style="switchIndex==0?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">待办理</view> <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 @tap="switchEv(1)" class="pad-sx20 disjcac radius20" :style="switchIndex==1?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">已办理</view>
</view> </view>
<view class="mar-s20 radius20 fon24 bacf posir" v-for="(item,index) in 50" :key="index"> <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="pad-sx20 pad-zy50 status-box" :style="{backgroundColor:['#f8bf00','#39d091'][switchIndex]}">{{['待办理','已办理'][switchIndex]}}</view>
<view class="pad20 bbot line-h46 pad-x40"> <view class="pad20 bbot line-h46 pad-x40">
<view class="fon30">LH20220729130234</view> <view class="fon30">{{item.coding}}</view>
<view class="">用户名匿名提交</view> <view class="">用户名{{item.is_anonymous==1?'匿名提交':item.u_name}}</view>
<view class="">金牛社区A村</view> <view class="">金牛社区A村</view>
<view class="">反馈问题我就是想问下我们村的路多久能修好</view> <view class="">反馈问题{{item.description}}</view>
</view> </view>
<view class="dis fon30 disjcac" v-if="switchIndex==0"> <view class="dis fon30 disjcac" v-if="switchIndex==0">
<view @tap="handleEv(0)" class="pad-sx30 disac"> <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> <image class="mar-y20" src="/static/icon/icon-handle.png" mode="" style="width: 34rpx;height: 34rpx;"></image>
立即办理 立即办理
</view> </view>
@ -35,15 +35,66 @@
data() { data() {
return { return {
switchIndex:0, switchIndex:0,
newtop:uni.getSystemInfoSync().statusBarHeight 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: { methods: {
// //
switchEv(index){ switchEv(index){
console.log(index); if(index !== this.switchIndex){
this.switchIndex = index; 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){ handleEv(id){
uni.navigateTo({ uni.navigateTo({

View File

@ -86,7 +86,7 @@
<view class="disjcac enter-btn" style="margin: 0;" @tap="handleEv"></view> <view class="disjcac enter-btn" style="margin: 0;" @tap="handleEv"></view>
</view> </view>
<view class="disjcac pad-sx50" v-if="ifManager==1"> <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 class="disjcac enter-btn" style="margin: 0;background-color: #f71200;border-color: #f71200;" @tap="reexamineEv"></view>
</view> </view>
</view> </view>
</template> </template>
@ -99,11 +99,16 @@
data() { data() {
return { return {
audioText:'', audioText:'',
ifManager:0// detail:{}, //
ifManager:0, //
id:0, //id
} }
}, },
onLoad(op) { onLoad(op) {
if(op.manager) this.ifManager = op.manager; if(op.manager) this.ifManager = op.manager;
if(op.id) this.id = op.id;
//
this.getDetailEv();
}, },
onHide() { onHide() {
innerAudioContext.stop(); innerAudioContext.stop();
@ -116,7 +121,39 @@
innerAudioContext.play(); 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){ handleEv(id){
uni.navigateTo({ uni.navigateTo({
url:`/pagesA/community/handle/handle?id=${id}` url:`/pagesA/community/handle/handle?id=${id}`

View File

@ -1,30 +1,30 @@
<template> <template>
<view> <view v-if="isLoading">
<statusContainer titlet="民意审核" :ifReturn="false"> <statusContainer titlet="民意审核" :ifReturn="false">
<view slot="content"> <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 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(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 @tap="switchEv(1)" class="pad-sx20 disjcac radius20" :style="switchIndex==1?'background-color:#39d091;color:#FFFFFF;':''" style="width: 288rpx;">未处理</view>
</view> </view>
<view class="mar-s20 radius20 fon24 bacf posir" v-for="(item,index) in 50" :key="index"> <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="pad-sx20 pad-zy50 status-box" :style="{backgroundColor:['#39d091','#f8bf00','#f41500'][switchIndex]}">{{['已处理','待处理','已督办'][switchIndex]}}</view>
<view class="pad20 bbot line-h46 pad-x40"> <view class="pad20 bbot line-h46 pad-x40">
<view class="fon30">LH20220729130234</view> <view class="fon30">{{item.coding}}</view>
<view class="">用户名匿名提交</view> <view class="">用户名{{item.is_anonymous==1?'匿名提交':item.u_name}}</view>
<view class="">金牛社区A村</view> <view class="">{{item.state_text}}</view>
<view class="">反馈问题我就是想问下我们村的路多久能修好</view> <view class="">反馈问题{{item.description}}</view>
</view> </view>
<view class="dis fon30" v-if="switchIndex==0"> <view class="dis fon30" v-if="switchIndex==0">
<view @tap="goDetail(0)" class="width50 pad-sx30 disjcac border-r"> <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>查看处理详情 <image class="mar-y20" src="/static/icon/icon-check.png" mode="" style="width: 34rpx;height: 34rpx;"></image>查看处理详情
</view> </view>
<view class="width50 pad-sx30 disjcac"> <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> <image class="mar-y20" src="/static/icon/icon-revie.png" mode="" style="width: 34rpx;height: 34rpx;"></image>
督办复审 督办复审
</view> </view>
</view> </view>
<view class="dis fon30 disjcac" v-if="switchIndex==1"> <view class="dis fon30 disjcac" v-if="switchIndex==1">
<view @tap="goDetail(0)" class="pad-sx30 disac"> <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> <image class="mar-y20" src="/static/icon/icon-check.png" mode="" style="width: 34rpx;height: 34rpx;"></image>
查看处理详情 查看处理详情
</view> </view>
@ -44,13 +44,89 @@
data() { data() {
return { return {
switchIndex:0, switchIndex:0,
newtop:uni.getSystemInfoSync().statusBarHeight 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: { methods: {
// //
switchEv(index){ switchEv(index){
this.switchIndex = 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){ goDetail(id){