案件上报、案件检查、上报历史

This commit is contained in:
itgaojian 2023-12-07 15:45:23 +08:00
parent 6ceacf9f42
commit 41c8e18d3f
23 changed files with 1562 additions and 991 deletions

106
app.json
View File

@ -1,54 +1,56 @@
{ {
"pages": [ "pages": [
"pages/index/index", "pages/index/index",
"pages/caseCheck/caseCheck", "pages/caseCheck/caseCheck",
"pages/caseReport/caseReport", "pages/caseReport/caseReport",
"pages/caseDetail/caseDetail", "pages/caseDetail/caseDetail",
"pages/process/process", "pages/process/process",
"pages/waitCheck/waitCheck", "pages/waitCheck/waitCheck",
"pages/census/census", "pages/census/census",
"pages/mine/mine", "pages/mine/mine",
"pages/censusinput/censusinput", "pages/censusinput/censusinput",
"pages/chooseArea/chooseArea", "pages/chooseArea/chooseArea",
"pages/censusDetail/censusDetail", "pages/censusDetail/censusDetail",
"pages/censusEdit/censusEdit" "pages/censusEdit/censusEdit",
], "pages/caseHistory/caseHistory"
"window": { ],
"backgroundTextStyle": "light", "window": {
"navigationBarBackgroundColor": "#4583FE", "backgroundTextStyle": "light",
"navigationBarTitleText": "包头高新网格化", "navigationBarBackgroundColor": "#4583FE",
"navigationBarTextStyle": "white" "navigationBarTitleText": "包头高新网格化",
}, "navigationBarTextStyle": "white"
"style": "v2", },
"sitemapLocation": "sitemap.json", "style": "v2",
"permission": { "sitemapLocation": "sitemap.json",
"scope.userLocation": { "permission": {
"desc": "你的位置信息将用于小程序位置接口的效果展示" "scope.userLocation": {
} "desc": "你的位置信息将用于小程序位置接口的效果展示"
}, }
"requiredPrivateInfos": [ },
"getLocation" "requiredPrivateInfos": [
], "getLocation"
"usingComponents": { ],
"scroller": "components/coolui-scroller/scroller/index" "usingComponents": {
}, "scroller": "components/coolui-scroller/scroller/index"
"tabBar": { },
"color": "#000", "tabBar": {
"borderStyle": "white", "color": "#000",
"selectedColor": "#4583FE", "borderStyle": "white",
"backgroundColor": "#F8F8F8", "selectedColor": "#4583FE",
"list": [{ "backgroundColor": "#F8F8F8",
"pagePath": "pages/index/index", "list": [
"iconPath": "images/ic_home_nomarl_icon.png", {
"text": "首页", "pagePath": "pages/index/index",
"selectedIconPath": "images/ic_home_sel_icon.png" "iconPath": "images/ic_home_nomarl_icon.png",
}, "text": "首页",
{ "selectedIconPath": "images/ic_home_sel_icon.png"
"pagePath": "pages/mine/mine", },
"iconPath": "images/ic_mine_nomarl_icon.png", {
"text": "我的", "pagePath": "pages/mine/mine",
"selectedIconPath": "images/ic_mine_sel_icon.png" "iconPath": "images/ic_mine_nomarl_icon.png",
} "text": "我的",
] "selectedIconPath": "images/ic_mine_sel_icon.png"
} }
]
}
} }

BIN
images/ic_clock_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
images/position_white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

View File

@ -3,232 +3,189 @@ var bmap = require('../../lib/bmap-wx.js');
var app = getApp() var app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
caseId: '', caseId: '',
longitude: '111.759608', longitude: '111.759608',
latitude: '40.860318', latitude: '40.860318',
markers: [], markers: [],
caseDetail: {}, caseDetail: {},
token: '', token: '',
requestUrl: app.requestUrl, requestUrl: app.requestUrl,
evaluateContent: '', evaluateContent: '',
isPass: 1, isPass: 1,
grade: '', grade: '',
photoList: [] photoList: [],
}, scrollHeight: 0,
getDetail: function () { },
var self = this getDetail: function () {
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/getreportcase/' + self.data.caseId, [app.requestUrl]), {}, { var self = this
headers: { app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/getreportcase/' + self.data.caseId, [app.requestUrl]), {}, {
token: self.data.token headers: {
} token: self.data.token
}, function (code, data) { }
var imgArr, handleArr }, function (code, data) {
imgArr = data.casePhotos.split(',') var imgArr, handleArr
handleArr = data.handlePhotos.split(',') imgArr = data.casePhotos.split(',')
var arr = [{longitude: data.caseLongitude,latitude: data.caseLatitude,iconPath:'../../images/marker_red.png',width:'25px',height: '30px'}] handleArr = data.handlePhotos.split(',')
self.setData({ var arr = [{ longitude: data.caseLongitude, latitude: data.caseLatitude, iconPath: '../../images/marker_red.png', width: '25px', height: '30px', id: 0 }]
markers: arr self.setData({
}); markers: arr
self.setData({ });
caseDetail: data, self.setData({
longitude: data.caseLongitude, caseDetail: data,
latitude: data.caseLatitude, longitude: data.caseLongitude,
imageList: imgArr, latitude: data.caseLatitude,
handleList: handleArr imageList: imgArr,
}) handleList: handleArr
}); })
}, });
isQualified: function (e) { },
this.setData({ isQualified: function (e) {
isPass: e.detail.value this.setData({
}) isPass: e.detail.value
}, })
isSatisfied: function (e) { },
this.setData({ isSatisfied: function (e) {
grade: e.detail.value this.setData({
}) grade: e.detail.value
}, })
// 选择图片 },
chooseImage: function () { // 选择图片
var self = this chooseImage: function () {
wx.chooseImage({ var self = this
count: 9 - self.data.photoList.length, wx.chooseImage({
sourceType: ['album', 'camera'], count: 9 - self.data.photoList.length,
success: function (res) { sourceType: ['album', 'camera'],
self.setData({ success: function (res) {
showPhotoList: self.data.photoList.concat(res.tempFiles) self.setData({
}) showPhotoList: self.data.photoList.concat(res.tempFiles)
wx.showToast({ })
title: '上传中', wx.showToast({
icon: 'loading' title: '上传中',
}) icon: 'loading'
var arr = [] })
for (let i = 0; i < res.tempFiles.length; i++) { var arr = []
var path = res.tempFiles[i].path; for (let i = 0; i < res.tempFiles.length; i++) {
app.restAjax.file(app.restAjax.path('{requestUrl}app/file/uploadimage', [app.requestUrl]), path, 'image', { var path = res.tempFiles[i].path;
headers: { app.restAjax.file(app.restAjax.path('{requestUrl}app/file/uploadimage', [app.requestUrl]), path, 'image', {
token: self.data.token headers: {
} token: self.data.token
}, function (code, data) { }
var id = JSON.parse(data).data }, function (code, data) {
arr.push(id) var id = JSON.parse(data).data
if (arr.length == res.tempFiles.length) { arr.push(id)
self.setData({ if (arr.length == res.tempFiles.length) {
photoList: arr self.setData({
}) photoList: arr
wx.hideToast() })
} wx.hideToast()
}, function (code, data) { }
console.log(data) }, function (code, data) {
}) console.log(data)
} })
} }
}) }
}, })
// 删除图片 },
deleteImg: function (e) { // 删除图片
var idx = e.currentTarget.dataset.num deleteImg: function (e) {
var self = this var idx = e.currentTarget.dataset.num
self.data.photoList.splice(idx, 1) var self = this
self.data.showPhotoList.splice(idx, 1) self.data.photoList.splice(idx, 1)
self.setData({ self.data.showPhotoList.splice(idx, 1)
showPhotoList: self.data.showPhotoList, self.setData({
photoList: self.data.photoList showPhotoList: self.data.showPhotoList,
}) photoList: self.data.photoList
}, })
// 确认处理 },
submitHandle: function () { // 确认处理
var photo = '', self = this submitHandle: function () {
if (!self.data.evaluateContent) { var photo = '', self = this
wx.showToast({ if (!self.data.evaluateContent) {
title: '请输入评价内容', wx.showToast({
duration: 2000, title: '请输入评价内容',
icon: 'none' duration: 2000,
}) icon: 'none'
return })
} return
if (!self.data.grade) { }
wx.showToast({ if (!self.data.grade) {
title: '请选择满意度', wx.showToast({
duration: 2000, title: '请选择满意度',
icon: 'none' duration: 2000,
}) icon: 'none'
return })
} return
if (this.data.photoList.length == 0) { }
wx.showToast({ if (this.data.photoList.length == 0) {
title: '请至少上传一张照片', wx.showToast({
duration: 2000, title: '请至少上传一张照片',
icon: 'none' duration: 2000,
}) icon: 'none'
return })
} return
for (let i = 0; i < this.data.photoList.length; i++) { }
if (i == this.data.photoList.length - 1) { for (let i = 0; i < this.data.photoList.length; i++) {
photo += this.data.photoList[i] if (i == this.data.photoList.length - 1) {
} else { photo += this.data.photoList[i]
photo += this.data.photoList[i] + ',' } else {
} photo += this.data.photoList[i] + ','
} }
var info = { }
inspectPhotos: photo, var info = {
inspectOpinion: self.data.evaluateContent, inspectPhotos: photo,
isPass: self.data.isPass, inspectOpinion: self.data.evaluateContent,
grade: self.data.grade isPass: self.data.isPass,
} grade: self.data.grade
app.restAjax.post(app.restAjax.path('{reqesutUrl}app/reportcase/savereportcaseinspect/' + self.data.caseId, [app.requestUrl]), info, { }
headers: { app.restAjax.post(app.restAjax.path('{reqesutUrl}app/reportcase/savereportcaseinspect/' + self.data.caseId, [app.requestUrl]), info, {
token: self.data.token headers: {
} token: self.data.token
}, function (code, data) { }
if (code == '200') { }, function (code, data) {
wx.showToast({ if (code == '200') {
title: '处理成功', wx.showToast({
duration: 2000, title: '处理成功',
success: function () { duration: 2000,
setTimeout(function () { success: function () {
wx.reLaunch({ setTimeout(function () {
url: '../index/index', const eventChannel = self.getOpenerEventChannel();
}) eventChannel.emit('doNeedRefresh', { data: 'test' });
}, 2000) wx.navigateBack();
} }, 2000)
}) }
} })
}); }
}, });
/** },
* 生命周期函数--监听页面加载 /**
*/ * 生命周期函数--监听页面加载
onLoad: function (options) { */
this.setData({ onLoad: function (options) {
caseId: options.id this.setData({
}) caseId: options.id
var self = this })
wx.getStorage({ var self = this
key: 'token', wx.getStorage({
success: function (res) { key: 'token',
self.setData({ success: function (res) {
token: res.data self.setData({
}) token: res.data
self.getDetail() })
} self.getDetail()
}) }
})
var BMap = new bmap.BMapWX({ var BMap = new bmap.BMapWX({
ak: 'Zk732rbyjd327q7Zj9EOtRjUn2ED1GWK' ak: 'Zk732rbyjd327q7Zj9EOtRjUn2ED1GWK'
}); });
}, let screenHeight = wx.getSystemInfoSync().windowHeight;
this.setData({
scrollHeight: screenHeight - 75
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })

View File

@ -1,3 +1,4 @@
{ {
"usingComponents": {} "usingComponents": {},
"navigationBarTitleText": "案件详情"
} }

View File

@ -1,89 +1,94 @@
<view class="check"> <wxs src="/utils/checkutils.wxs" module="tools"></wxs>
<view class="case-info"> <view class="title-box">
<view class="title-status"> <image src="/images/ic_issue_state_title_icon.png" mode="aspectFill"></image>
<view class="title">{{caseDetail.communityName}}</view> <view class="status">{{tools.status(caseDetail.caseStatus)}}</view>
<view class="status">待处理</view>
</view>
<view class="info">
<view class="row">{{caseDetail.caseContent}}</view>
<view class="row">上报时间:{{caseDetail.reportDate}}</view>
<view class="row">上报类型:{{caseDetail.caseTypeName}}</view>
<view class="row">上报人员:{{caseDetail.caseReporter}}</view>
</view>
<view class="photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{imageList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
<view class="map">
<view class="position">{{caseDetail.casePosition}}</view>
<view class="map-box">
<map name="map" show-location longitude='{{longitude}}' latitude='{{latitude}}' scale='14' markers='{{markers}}'></map>
</view>
</view>
</view>
<view class="handle">
<view class="handle-title">案件处理详情</view>
<view class="info handle-info">
<view class="row">处理人员:{{caseDetail.handleUserName}}</view>
<view class="row">处理时间:{{caseDetail.handleCreateTime}}</view>
<view class="row">{{caseDetail.handleOpinion}}</view>
<view class="photo handle-photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{handleList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
</view>
</view>
<view class="check-container">
<view class="handle-title"><text>*</text>案件处理详情</view>
<view class="check-box">
<view class="check-content">
<textarea placeholder="请输入评价内容" model:value="{{evaluateContent}}"></textarea>
</view>
<view class="qualified">
<view class="text">是否合格</view>
<view class="input-box">
<radio-group bindchange="isQualified">
<label>
<radio value="1" color="#008cff" checked="checked">是</radio>
</label>
<label>
<radio value="0" color="#008cff">否</radio>
</label>
</radio-group>
</view>
</view>
<view class="satisfied">
<view class="satisfied-title">处理满意度</view>
<view class="satisfied-box">
<radio-group bindchange="isSatisfied">
<label>
<radio value="1" color="#008cff">非常不满意</radio>
</label>
<label>
<radio value="2" color="#008cff">不满意</radio>
</label>
<label>
<radio value="3" color="#008cff">一般</radio>
</label>
<label>
<radio value="4" color="#008cff">满意</radio>
</label>
<label>
<radio value="5" color="#008cff">非常满意</radio>
</label>
</radio-group>
</view>
</view>
<view class="choose-photo">
<view class="img-box" wx:for="{{showPhotoList}}" wx:key="index">
<image src="{{item.path}}"></image>
<image src="../../images/delete.png" class="delete-btn" data-num="{{index}}" bindtap="deleteImg"></image>
</view>
<view class="add" bindtap="chooseImage">
<image src="../../images/camera.png"></image>
</view>
</view>
</view>
</view>
<view class="submit" bindtap="submitHandle">
确认处理
</view>
</view> </view>
<scroll-view scroll-y style="height:{{scrollHeight}}px;" class="check">
<view style="width: 100%;">
<view class="case-info">
<view class="title-status">
<view class="title">{{caseDetail.communityName}}</view>
<view class="title-date">{{caseDetail.reportDate}}</view>
</view>
<view class="info">
<view class="row-desc">{{caseDetail.caseContent}}</view>
<view class="row">上报类型:{{caseDetail.caseTypeName}}</view>
<view class="row">上报人员:{{caseDetail.caseReporter}}</view>
</view>
<view class="photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{imageList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
<view class="map">
<view class="map-box">
<map name="map" show-location longitude='{{longitude}}' latitude='{{latitude}}' scale='14' markers='{{markers}}'></map>
</view>
<view class="position-box">
<image src="/images/position_white.png" mode="aspectFill"></image>
<view class="position">{{caseDetail.casePosition}}</view>
</view>
</view>
</view>
<view class="handle">
<view class="handle-title">
<view class="form-head-line"></view>
<view>案件处理详情</view>
</view>
<view class="info handle-info">
<view class="row">处理人员:{{caseDetail.handleUserName}}</view>
<view class="row">处理时间:{{caseDetail.handleCreateTime}}</view>
<view class="row">{{caseDetail.handleOpinion}}</view>
<view class="photo handle-photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{handleList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
</view>
</view>
<view class="check-container">
<view class="handle-title">
<view class="form-head-line"></view>
<view>案件检查</view>
</view>
<view class="check-box">
<view class="check-content">
<textarea placeholder="请输入评价内容" model:value="{{evaluateContent}}"></textarea>
</view>
<view class="qualified">
<view class="text">是否合格</view>
<view class="input-box">
<radio-group bindchange="isQualified">
<label>
<radio value="1" color="#008cff" checked="checked">是</radio>
</label>
<label>
<radio value="0" color="#008cff">否</radio>
</label>
</radio-group>
</view>
</view>
<view class="satisfied">
<view class="satisfied-title">处理满意度</view>
<view class="satisfied-box">
<radio-group bindchange="isSatisfied" class="radio-btns">
<radio value="1" color="#008cff">非常不满意</radio>
<radio value="2" color="#008cff">不满意</radio>
<radio value="3" color="#008cff">一般</radio>
<radio value="4" color="#008cff">满意</radio>
<radio value="5" color="#008cff">非常满意</radio>
</radio-group>
</view>
</view>
<view class="choose-photo">
<view class="img-box" wx:for="{{showPhotoList}}" wx:key="index">
<image src="{{item.path}}"></image>
<image src="../../images/delete.png" class="delete-btn" data-num="{{index}}" bindtap="deleteImg"></image>
</view>
<view class="add" bindtap="chooseImage">
<image src="../../images/camera.png"></image>
</view>
</view>
</view>
</view>
<view class="submit" bindtap="submitHandle">
确认处理
</view>
</view>
</scroll-view>

View File

@ -1,180 +1,293 @@
page{ page {
background: #f2f1f6; background: #f2f1f6;
} }
.check{
padding: 20rpx; .check {
padding: 20rpx;
position: fixed;
top: 70px;
width: 95%;
border-radius: 20px;
} }
.case-info{
background: #fff; .case-info {
border-radius: 10rpx; background: #fff;
padding: 20rpx; border-radius: 10rpx;
margin-bottom: 15rpx; padding: 20rpx;
margin-bottom: 15rpx;
} }
.title-status{
display: flex; .title-status {
justify-content: space-between; display: flex;
margin-bottom: 10rpx; justify-content: space-between;
margin-bottom: 10rpx;
} }
.title{
font-size: 36rpx; .radio-btns {
line-height: 60rpx; display: flex;
display: inline-block; flex-direction: column;
max-width: 65%; justify-content: flex-start;
white-space: nowrap; align-items: center;
overflow: hidden;
text-overflow: ellipsis;
color: #06a3f6;
} }
.status{
line-height: 60rpx; .radio-btns radio {
display: inline-block; width: 100%;
padding: 0 30rpx; margin-left: -25px;
background: #fff7ec;
color: #fdc36e;
border-radius: 30rpx;
} }
.status.green{
color: #2dfe2e; .title {
background: rgba(45,254,46,0.1) font-size: 36rpx;
line-height: 60rpx;
display: inline-block;
max-width: 65%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #000000;
} }
.status.red{
color: red; .status {
background: rgba(255,0,0,0.1) line-height: 60rpx;
display: inline-block;
padding: 0 30rpx;
color: #FFFFFF;
} }
.row{
border-bottom: 1px dashed #EEE; .status.green {
font-size: 32rpx; color: #2dfe2e;
color: #888; background: rgba(45, 254, 46, 0.1)
line-height: 60rpx;
} }
.photo{
margin: 50rpx 0; .status.red {
color: red;
background: rgba(255, 0, 0, 0.1)
} }
.photo image{
width: 140rpx; .row {
height: 140rpx; font-size: 14px;
margin-right: 10rpx; color: #101010;
margin-bottom: 10rpx; line-height: 60rpx;
} }
.position{
font-size: 36rpx; .row-desc {
color: #06a3f6; color: #9A9A9A;
margin-bottom: 10rpx;
} }
.map-box map{
width: 100%; .title-date {
height: 400rpx; font-size: 12px;
color: #101010;
} }
.handle-info{
border-radius: 10rpx; .photo {
background: #fff; margin: 50rpx 0;
margin-top: 15rpx;
padding: 20rpx 20rpx 10rpx;
} }
.handle-photo{
margin: 20rpx 0 0; .photo image {
width: 140rpx;
height: 140rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
} }
.handle-title{
font-size: 36rpx; .position {
color: #888; font-size: 14px;
} }
.handle-title text{
color: red; .position-box {
position: absolute;
bottom: 0;
width: 100%;
padding: 5px 2px;
color: #FFFFFF;
background-color: rgba(0, 0, 0, .65);
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
} }
.check-box{
padding: 20rpx; .position-box image {
background: #fff; width: 20px;
border-radius: 10rpx; height: 20px;
margin-top: 15rpx;
} }
.check-content{
background: #f2f1f6; .map-box map {
margin-bottom: 20rpx; width: 100%;
height: 400rpx;
} }
.check-content textarea{
width: 100%; .map {
height: 300rpx; width: 100%;
padding: 15rpx; height: 400rpx;
box-sizing: border-box; position: relative;
} }
.qualified{
display: flex; .handle-info {
justify-content: space-between; border-radius: 10rpx;
background: #f2f1f6; background: #fff;
padding: 15rpx; margin-top: 15rpx;
padding: 20rpx 20rpx 10rpx;
} }
.qualified label{
margin-right: 20rpx;
.handle-photo {
margin: 20rpx 0 0;
} }
.qualified label:last-child{
margin-right: 0; .handle-title {
color: #000000;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 5px 0px 0px 5px;
} }
.satisfied{
margin-top: 15rpx; .form-head-line {
background: #f2f1f6; height: 15px;
padding: 15rpx; width: 6px;
background-color: #4985f8;
margin-right: 5px;
} }
.satisfied-title{
font-size: 36rpx; radio {
transform: scale(.8);
} }
.satisfied-box label{
display: block; .handle-title text {
margin-top: 15rpx; color: red;
} }
.choose-photo{
margin-top: 15rpx; .handle {
background-color: #FFFFFF;
} }
.choose-photo .img-box{
width: 32%; .check-box {
height: 140rpx; padding: 20rpx;
margin-right: 2%; background: #fff;
margin-bottom: 10rpx; border-radius: 10rpx;
position: relative; margin-top: 15rpx;
display: inline-block;
} }
.img-box image{
width: 100%; .check-content {
height: 100%; background: #f2f1f6;
margin-bottom: 20rpx;
} }
.img-box .delete-btn{
position: absolute; .check-content textarea {
top: -10rpx; width: 100%;
right: -10rpx; height: 300rpx;
width: 40rpx; padding: 15rpx;
height: 40rpx; box-sizing: border-box;
} }
.choose-photo .img-box:nth-child(3n){
margin-right: 0; .qualified {
display: flex;
justify-content: space-between;
font-size: 14px;
padding: 5px 0px;
} }
.photo-main{
background: none; .qualified label {
padding: 0; margin-right: 20rpx;
} }
.add{
display: inline-block; .qualified label:last-child {
width: 32%; margin-right: 0;
height: 140rpx;
background: #f1f1f6;
position: relative;
} }
.add image{
position: absolute; .satisfied {
top: 50%; padding: 5px 0px;
left: 50%; font-size: 14px;
transform: translate(-50%, -50%);
width: 60rpx;
height: 60rpx;
} }
.submit{
width: 710rpx; .satisfied-title {
height: 100rpx; font-size: 14px;
background: #008cff;
line-height: 100rpx;
text-align: center;
color: #fff;
border-radius: 10rpx;
margin: 15rpx auto;
} }
.check-container{
margin-top: 15rpx; .satisfied-box label {
display: block;
margin-top: 15rpx;
}
.choose-photo {
margin-top: 15rpx;
}
.choose-photo .img-box {
width: 32%;
height: 140rpx;
margin-right: 2%;
margin-bottom: 10rpx;
position: relative;
display: inline-block;
}
.img-box image {
width: 100%;
height: 100%;
}
.img-box .delete-btn {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.choose-photo .img-box:nth-child(3n) {
margin-right: 0;
}
.photo-main {
background: none;
padding: 0;
}
.add {
display: inline-block;
width: 32%;
height: 140rpx;
background: #f1f1f6;
position: relative;
}
.add image {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60rpx;
height: 60rpx;
}
.submit {
width: 710rpx;
height: 100rpx;
background: #008cff;
line-height: 100rpx;
text-align: center;
color: #fff;
border-radius: 10rpx;
margin: 15rpx auto;
}
.check-container {
margin-top: 15rpx;
background-color: #FFFFFF;
}
.title-box {
display: flex;
flex-direction: row;
background-color: #4583fe;
height: 100px;
align-items: center;
padding-left: 10px;
}
.title-box image {
width: 32px;
height: 32px;
} }

View File

@ -4,120 +4,76 @@ var bmap = require('../../lib/bmap-wx.js');
// pages/caseDetail/caseDetail.js // pages/caseDetail/caseDetail.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
requestUrl: app.requestUrl, requestUrl: app.requestUrl,
token: '', token: '',
caseId: '', caseId: '',
caseDetail: {}, caseDetail: {},
longitude: '', longitude: '',
latitude: '', latitude: '',
markers: [], markers: [],
imageList: [] imageList: [],
}, scrollHeight: 0,
// 获取详情 },
getDetail: function () { // 获取详情
var self = this getDetail: function () {
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/getreportcase/' + self.data.caseId, [app.requestUrl]), {}, { var self = this
headers: { app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/getreportcase/' + self.data.caseId, [app.requestUrl]), {}, {
token: self.data.token headers: {
} token: self.data.token
}, function (code, data) { }
var imgArr }, function (code, data) {
imgArr = data.casePhotos.split(',') var imgArr, handleArr
var arr = [{longitude: data.caseLongitude,latitude: data.caseLatitude,iconPath:'../../images/marker_red.png',width:'25px',height: '30px'}] imgArr = data.casePhotos.split(',')
// varwxMarkerData = arr; handleArr = data.handlePhotos.split(',')
self.setData({ var arr = [{ longitude: data.caseLongitude, latitude: data.caseLatitude, iconPath: '../../images/marker_red.png', width: '25px', height: '30px', id: 0 }]
markers: arr self.setData({
}); markers: arr
self.setData({ });
caseDetail: data, self.setData({
longitude: data.caseLongitude, caseDetail: data,
latitude: data.caseLatitude, longitude: data.caseLongitude,
imageList: imgArr latitude: data.caseLatitude,
}) imageList: imgArr,
}); handleList: handleArr
}, })
// 查看流程 });
goProcess: function () { },
var self = this // 查看流程
wx.navigateTo({ goProcess: function () {
url: '../process/process?id=' + self.data.caseId, var self = this
}) wx.navigateTo({
}, url: '../process/process?id=' + self.data.caseId,
/** })
* 生命周期函数--监听页面加载 },
*/ /**
onLoad: function (options) { * 生命周期函数--监听页面加载
var self = this */
this.setData({ onLoad: function (options) {
caseId: options.id var self = this
}) this.setData({
wx.getStorage({ caseId: options.id
key: 'token', })
success: function (res) { wx.getStorage({
self.setData({ key: 'token',
token: res.data success: function (res) {
}) self.setData({
self.getDetail() token: res.data
} })
}) self.getDetail()
}
})
var BMap = new bmap.BMapWX({ var BMap = new bmap.BMapWX({
ak: 'Zk732rbyjd327q7Zj9EOtRjUn2ED1GWK' ak: 'Zk732rbyjd327q7Zj9EOtRjUn2ED1GWK'
}); });
let screenHeight = wx.getSystemInfoSync().windowHeight;
this.setData({
scrollHeight: screenHeight - 75
})
},
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })

View File

@ -1,3 +1,4 @@
{ {
"usingComponents": {} "usingComponents": {},
"navigationBarTitleText": "案件详情"
} }

View File

@ -1,31 +1,48 @@
<view class="case"> <wxs src="/utils/checkutils.wxs" module="tools"></wxs>
<view class="case-info"> <view class="title-box">
<view class="title-status"> <image src="/images/ic_issue_state_title_icon.png" mode="aspectFill"></image>
<view class="title">{{caseDetail.communityName}}</view> <view class="status">{{tools.status(caseDetail.caseStatus)}}</view>
<view class="status" wx:if="{{caseDetail.caseStatus == 0}}">待处理</view> <view class="progress-btn" bind:tap="goProcess">流程日志</view>
<view class="status" wx:if="{{caseDetail.caseStatus == 1}}">待立案</view>
<view class="status" wx:if="{{caseDetail.caseStatus == 2}}">待下派</view>
<view class="status" wx:if="{{caseDetail.caseStatus == 3}}">待处理</view>
<view class="status" wx:if="{{caseDetail.caseStatus == 4}}">待检查</view>
<view class="status" wx:if="{{caseDetail.caseStatus == 5}}">待结案</view>
<view class="status green" wx:if="{{caseDetail.caseStatus == 6}}">已归档</view>
<view class="status red" wx:if="{{caseDetail.caseStatus == -1}}">案件异常</view>
</view>
<view class="info">
<view class="row">{{caseDetail.caseContent}}</view>
<view class="row">上报时间:{{caseDetail.reportDate}}</view>
<view class="row">上报类型:{{caseDetail.caseTypeName}}</view>
<view class="row">上报人员:{{caseDetail.caseReporter}}</view>
</view>
<view class="photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{imageList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
<view class="map">
<view class="position">{{caseDetail.casePosition}}</view>
<view class="map-box">
<map name="map" show-location longitude='{{longitude}}' latitude='{{latitude}}' scale='14' markers='{{markers}}'></map>
</view>
</view>
<view class="process" bindtap="goProcess">查看流程</view>
</view>
</view> </view>
<scroll-view scroll-y style="height:{{scrollHeight}}px;" class="check">
<view style="width: 100%;">
<view class="case-info">
<view class="title-status">
<view class="title">{{caseDetail.communityName}}</view>
<view class="title-date">{{caseDetail.reportDate}}</view>
</view>
<view class="info">
<view class="row-desc">{{caseDetail.caseContent}}</view>
<view class="row">上报类型:{{caseDetail.caseTypeName}}</view>
<view class="row">上报人员:{{caseDetail.caseReporter}}</view>
</view>
<view class="photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{imageList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
<view class="map">
<view class="map-box">
<map name="map" show-location longitude='{{longitude}}' latitude='{{latitude}}' scale='14' markers='{{markers}}'></map>
</view>
<view class="position-box">
<image src="/images/position_white.png" mode="aspectFill"></image>
<view class="position">{{caseDetail.casePosition}}</view>
</view>
</view>
</view>
<view class="handle" wx:if="{{caseDetail.caseStatus=='4' || caseDetail.caseStatus=='5' || caseDetail.caseStatus=='6'}}">
<view class="handle-title">
<view class="form-head-line"></view>
<view>案件处理详情</view>
</view>
<view class="info handle-info">
<view class="row">处理人员:{{caseDetail.handleUserName}}</view>
<view class="row">处理时间:{{caseDetail.handleCreateTime}}</view>
<view class="row">{{caseDetail.handleOpinion}}</view>
<view class="photo handle-photo">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item}}" wx:for="{{handleList}}" wx:key="index" wx:if="{{item}}"></image>
</view>
</view>
</view>
</view>
</scroll-view>

View File

@ -1,81 +1,306 @@
page{ page {
background: #f2f1f6; background: #f2f1f6;
} }
.case{
width: 710rpx; .check {
margin: 20rpx auto; padding: 20rpx;
padding: 20rpx; position: fixed;
box-sizing: border-box; top: 70px;
background: #fff; width: 95%;
border-radius: 10rpx; border-radius: 20px;
} }
.case-info{
margin-bottom: 15rpx; .case-info {
background: #fff;
border-radius: 10rpx;
padding: 20rpx;
margin-bottom: 15rpx;
} }
.title-status{
display: flex; .title-status {
justify-content: space-between; display: flex;
margin-bottom: 10rpx; justify-content: space-between;
margin-bottom: 10rpx;
} }
.title{
font-size: 36rpx; .radio-btns {
line-height: 60rpx; display: flex;
display: inline-block; flex-direction: column;
max-width: 65%; justify-content: flex-start;
white-space: nowrap; align-items: center;
overflow: hidden;
text-overflow: ellipsis;
color: #06a3f6;
} }
.status{
line-height: 60rpx; .radio-btns radio {
display: inline-block; width: 100%;
padding: 0 30rpx; margin-left: -25px;
background: #fff7ec;
color: #fdc36e;
border-radius: 30rpx;
} }
.status.green{
color: #2dfe2e; .title {
background: rgba(45,254,46,0.1) font-size: 36rpx;
line-height: 60rpx;
display: inline-block;
max-width: 65%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #000000;
} }
.status.red{
color: red; .status {
background: rgba(255,0,0,0.1) line-height: 60rpx;
display: inline-block;
padding: 0 30rpx;
color: #FFFFFF;
} }
.row{
border-bottom: 1px dashed #EEE; .status.green {
font-size: 32rpx; color: #2dfe2e;
color: #888; background: rgba(45, 254, 46, 0.1)
line-height: 60rpx;
} }
.photo{
margin: 50rpx 0; .status.red {
color: red;
background: rgba(255, 0, 0, 0.1)
} }
.photo image{
width: 140rpx; .row {
height: 140rpx; font-size: 14px;
margin-right: 10rpx; color: #101010;
margin-bottom: 10rpx; line-height: 60rpx;
} }
.position{
font-size: 36rpx; .row-desc {
color: #06a3f6; color: #9A9A9A;
margin-bottom: 10rpx;
} }
.map-box map{
width: 100%; .title-date {
height: 400rpx; font-size: 12px;
color: #101010;
} }
.process{
width: 100%; .photo {
height: 80rpx; margin: 50rpx 0;
display: flex; }
justify-content: center;
align-items: center; .photo image {
border-radius: 10rpx; width: 140rpx;
background: #06a3f6; height: 140rpx;
color: #fff; margin-right: 10rpx;
font-size: 30rpx; margin-bottom: 10rpx;
margin-top: 15rpx; }
.position {
font-size: 14px;
}
.position-box {
position: absolute;
bottom: 0;
width: 100%;
padding: 5px 2px;
color: #FFFFFF;
background-color: rgba(0, 0, 0, .65);
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.position-box image {
width: 20px;
height: 20px;
}
.map-box map {
width: 100%;
height: 400rpx;
}
.map {
width: 100%;
height: 400rpx;
position: relative;
}
.handle-info {
border-radius: 10rpx;
background: #fff;
margin-top: 15rpx;
padding: 20rpx 20rpx 10rpx;
}
.handle-photo {
margin: 20rpx 0 0;
}
.handle-title {
color: #000000;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 5px 0px 0px 5px;
}
.form-head-line {
height: 15px;
width: 6px;
background-color: #4985f8;
margin-right: 5px;
}
radio {
transform: scale(.8);
}
.handle-title text {
color: red;
}
.handle {
background-color: #FFFFFF;
}
.check-box {
padding: 20rpx;
background: #fff;
border-radius: 10rpx;
margin-top: 15rpx;
}
.check-content {
background: #f2f1f6;
margin-bottom: 20rpx;
}
.check-content textarea {
width: 100%;
height: 300rpx;
padding: 15rpx;
box-sizing: border-box;
}
.qualified {
display: flex;
justify-content: space-between;
font-size: 14px;
padding: 5px 0px;
}
.qualified label {
margin-right: 20rpx;
}
.qualified label:last-child {
margin-right: 0;
}
.satisfied {
padding: 5px 0px;
font-size: 14px;
}
.satisfied-title {
font-size: 14px;
}
.satisfied-box label {
display: block;
margin-top: 15rpx;
}
.choose-photo {
margin-top: 15rpx;
}
.choose-photo .img-box {
width: 32%;
height: 140rpx;
margin-right: 2%;
margin-bottom: 10rpx;
position: relative;
display: inline-block;
}
.img-box image {
width: 100%;
height: 100%;
}
.img-box .delete-btn {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 40rpx;
height: 40rpx;
}
.choose-photo .img-box:nth-child(3n) {
margin-right: 0;
}
.photo-main {
background: none;
padding: 0;
}
.add {
display: inline-block;
width: 32%;
height: 140rpx;
background: #f1f1f6;
position: relative;
}
.add image {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60rpx;
height: 60rpx;
}
.submit {
width: 710rpx;
height: 100rpx;
background: #008cff;
line-height: 100rpx;
text-align: center;
color: #fff;
border-radius: 10rpx;
margin: 15rpx auto;
}
.check-container {
margin-top: 15rpx;
background-color: #FFFFFF;
}
.title-box {
display: flex;
flex-direction: row;
background-color: #4583fe;
height: 100px;
align-items: center;
padding-left: 10px;
}
.title-box image {
width: 32px;
height: 32px;
}
.progress-btn {
position: absolute;
right: 20px;
color: #000000;
border-radius: 5px;
background-color: #FCCA00;
padding: 2px 10px;
font-size: 14px;
}
.progress-btn:active{
transform: scale(.8);
} }

View File

@ -0,0 +1,135 @@
// pages/caseHistory/caseHistory.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
token: '',
list: [],
triggered: false,
page: {
page: 1,
rows: 10
},
scrollHeight: 400,
totalNum: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
var _self = this;
wx.getStorage({
key: 'token',
success: function (res) {
_self.setData({
token: res.data
})
_self.getCaseList();
}
})
let screenHeight = wx.getSystemInfoSync().windowHeight;
this.setData({
scrollHeight: screenHeight
})
},
//获取列表
getCaseList() {
var _self = this;
wx.showLoading({
title: '加载中...',
})
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listreportcaseofmine', [app.requestUrl]), _self.data.page, {
headers: {
token: _self.data.token
}
}, function (code, data) {
wx.hideLoading();
console.log(data);
_self.setData({
totalNum: data.total
})
if (data.rows.length == 0) {
if (_self.data.page.page == 1) {
_self.setData({
list: []
})
} else {
_self.setData({
[`page.page`]: _self.data.page.page - 1
})
wx.showToast({
title: '暂无更多数据',
icon: 'none'
})
return false;
}
}
if (_self.data.page.page == 1) {
_self.setData({
list: data.rows
})
} else {
_self.setData({
list: _self.data.list.concat(data.rows)
})
}
});
},
onScrollRefresh() {
console.log('加载中...')
var _self = this;
_self.setData({
list: [],
['page.page']: 1,
triggered: false,
totalNum: 0
})
_self.getCaseList()
},
//加载更多
onLoadMore() {
console.log(this.data.list.length + "==" + this.data.totalNum)
var self = this
if (self.data.totalNum === self.data.list.length) {
wx.showToast({
title: '暂无更多数据',
icon: 'none'
})
} else {
var pageNum = 'page.page'
self.setData({
[pageNum]: self.data.page.page + 1
})
this.getCaseList()
}
},
//详情
goDetail(e) {
var _self = this;
var id = e.currentTarget.dataset.id;
var status = e.currentTarget.dataset.status;
if ('4' == status) {
//待检查
wx.navigateTo({
url: '/pages/caseCheck/caseCheck?id=' + id,
events: {
doNeedRefresh(data) {
_self.onScrollRefresh();
}
}
})
} else {
//详情
wx.navigateTo({
url: '/pages/caseDetail/caseDetail?id=' + id,
})
}
}
})

View File

@ -0,0 +1,8 @@
{
"usingComponents": {
"t-empty": "/miniprogram_npm/tdesign-miniprogram/empty/empty"
},
"navigationBarTitleText": "上报历史",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
}

View File

@ -0,0 +1,21 @@
<!--pages/census/census.wxml-->
<wxs src="/utils/checkutils.wxs" module="tools" />
<view class="page-container">
<scroll-view scroll-y class="scroll-content" style="height: {{scrollHeight}}px;" refresher-enabled="{{true}}" refresher-threshold="{{100}}" refresher-default-style="black" refresher-background="white" refresher-triggered="{{triggered}}" bindrefresherrefresh="onScrollRefresh" enhanced="true" show-scrollbar="false" bindscrolltolower="onLoadMore">
<block wx:if="{{list.length>0}}">
<view class="item-container" wx:for="{{list}}" wx:for-index="index" wx:for-item="listItem" wx:key="index" data-id="{{listItem.reportCaseId}}" data-status="{{listItem.caseStatus}}" bind:tap="goDetail">
<view class="item-title-box">
<view class="title-status">{{tools.status(listItem.caseStatus)}}</view>
<view class="item-title">{{listItem.caseTypeName}}</view>
</view>
<view class="item-desc">{{listItem.handleUserDepartmentName}}</view>
<view class="item-desc">{{listItem.caseContent}}</view>
<view class="item-position">
<image src="/images/ic_clock_icon.png" mode="aspectFill"></image>
<view>{{listItem.reportDate}}</view>
</view>
</view>
</block>
<t-empty wx:else t-class="empty-cls" image="/images/ic_empty_data.png" t-class-image="t-empty_image" description="暂无数据" />
</scroll-view>
</view>

View File

@ -0,0 +1,113 @@
/* pages/census/census.wxss */
.page-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #f5f5f5;
width: 100%;
height: 100%;
}
.btn-submit {
width: 100%;
position: fixed;
bottom: 0;
height: 48px;
background-color: #4985f8;
display: flex;
justify-content: center;
align-items: center;
align-self: center;
color: #FFFFFF;
z-index: 23;
}
.scroll-content {
border-radius: 10px;
padding: 5px;
width: 97%;
margin-top: 10px;
}
.item-container {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 10px;
background-color: #ffffff;
margin-top: 10px;
border-radius: 10px;
}
.item-title {
font-size: 16px;
color: #000000;
margin-left: 3px;
}
.item-title-box {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.title-status {
border-top-right-radius: 10px;
font-size: 12px;
padding: 2px 10px;
color: #FFFFFF;
margin-left: -10px;
border-bottom-right-radius: 10px;
background-color: #4985f8;
}
.item-desc {
font-size: 12px;
color: #101010;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
margin-top: 3px;
}
.item-position {
margin-top: 5px;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
font-size: 12px;
color: #101010;
}
.item-position image {
width: 14px;
height: 14px;
margin-right: 5px;
}
.line {
margin-top: 5px;
margin-bottom: 5px;
border: 1px dashed #ebe9e9;
width: 100%;
}
.t-empty_image {
width: 48px !important;
height: 48px !important;
}
.empty-cls {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

View File

@ -129,9 +129,13 @@ Page({
}) })
}, },
doCheck() { doCheck() {
wx.navigateTo({
url: '/pages/waitCheck/waitCheck',
})
}, },
doCaseHistory() { doCaseHistory() {
wx.navigateTo({
url: '/pages/caseHistory/caseHistory',
})
} }
}) })

View File

@ -1,3 +1,4 @@
{ {
"usingComponents": {} "usingComponents": {},
"navigationBarTitleText": "流程日志"
} }

View File

@ -1,141 +1,126 @@
const app = getApp() // pages/caseHistory/caseHistory.js
const app = getApp();
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
token: '', token: '',
areaList: [], list: [],
requestUrl: app.requestUrl, triggered: false,
page: { page: {
page: 1, page: 1,
rows: 20, rows: 10
totalPage: 1 },
}, scrollHeight: 400,
}, totalNum: 0,
// 查看详情 },
goDetail: function (e) {
if (e.currentTarget.dataset.status == '4') {
wx.navigateTo({
url: '../caseCheck/caseCheck?id=' + e.currentTarget.dataset.id,
})
} else {
wx.navigateTo({
url: '../caseDetail/caseDetail?id=' + e.currentTarget.dataset.id,
})
}
}, /**
// 获取待检查列表 * 生命周期函数--监听页面加载
getCheckList: function () { */
var self = this onLoad(options) {
wx.showToast({ var _self = this;
title: '加载中', wx.getStorage({
icon: 'loading' key: 'token',
}) success: function (res) {
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listpagereportcaseinspectofmine', [app.requestUrl]), self.data.page, { _self.setData({
headers: { token: res.data
token: self.data.token })
} _self.getCaseList();
}, function (code, data) { }
if(data.rows.length == 0) { })
if (self.data.page.page == 1) { let screenHeight = wx.getSystemInfoSync().windowHeight;
self.setData({ this.setData({
areaList: [] scrollHeight: screenHeight
}) })
} else { },
self.setData({
[`page.page`] : self.data.page.page - 1
})
app.dialog.msg('暂无更多')
return false;
}
}
if (self.data.page.page == 1) {
self.setData({
areaList: data.rows
})
} else {
self.setData({
areaList: self.data.areaList.concat(data.rows)
})
}
wx.hideToast()
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var self = this
wx.getStorage({
key: 'token',
success: function (res) {
self.setData({
token: res.data
})
self.getCheckList()
}
})
},
/** //获取列表
* 生命周期函数--监听页面初次渲染完成 getCaseList() {
*/ var _self = this;
onReady: function () { wx.showLoading({
title: '加载中...',
})
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listpagetotalreportcasehandleofmine', [app.requestUrl]), _self.data.page, {
headers: {
token: _self.data.token
}
}, function (code, data) {
wx.hideLoading();
console.log(data);
_self.setData({
totalNum: data.total
})
if (data.rows.length == 0) {
if (_self.data.page.page == 1) {
_self.setData({
list: []
})
} else {
_self.setData({
[`page.page`]: _self.data.page.page - 1
})
wx.showToast({
title: '暂无更多数据',
icon: 'none'
})
return false;
}
}
if (_self.data.page.page == 1) {
_self.setData({
list: data.rows
})
} else {
_self.setData({
list: _self.data.list.concat(data.rows)
})
}
});
},
onScrollRefresh() {
console.log('加载中...')
var _self = this;
_self.setData({
list: [],
['page.page']: 1,
triggered: false,
totalNum: 0
}, })
_self.getCaseList()
/** },
* 生命周期函数--监听页面显示 //加载更多
*/ onLoadMore() {
onShow: function () { console.log(this.data.list.length + "==" + this.data.totalNum)
var self = this
}, if (self.data.totalNum === self.data.list.length) {
wx.showToast({
/** title: '暂无更多数据',
* 生命周期函数--监听页面隐藏 icon: 'none'
*/ })
onHide: function () { } else {
var pageNum = 'page.page'
}, self.setData({
[pageNum]: self.data.page.page + 1
/** })
* 生命周期函数--监听页面卸载 this.getCaseList()
*/ }
onUnload: function () { },
//详情
}, goDetail(e) {
var _self = this;
/** var id = e.currentTarget.dataset.id;
* 页面相关事件处理函数--监听用户下拉动作 wx.navigateTo({
*/ url: '/pages/caseCheck/caseCheck?id=' + id,
onPullDownRefresh: function () { events: {
var self = this doNeedRefresh(data) {
this.setData({ _self.onScrollRefresh();
['page.page']: 1 }
}) }
this.getCheckList() })
}, }
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
var self = this
var pageNum = 'page.page'
self.setData({
[pageNum]: self.data.page.page + 1
})
this.getCheckList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
}) })

View File

@ -1,3 +1,8 @@
{ {
"usingComponents": {} "usingComponents": {
"t-empty": "/miniprogram_npm/tdesign-miniprogram/empty/empty"
},
"navigationBarTitleText": "待检查",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
} }

View File

@ -1,30 +1,21 @@
<view class="list"> <!--pages/census/census.wxml-->
<view class="list-box" wx:for="{{areaList}}" wx:key="index" data-id="{{item.reportCaseId}}" bindtap="goDetail" data-status="{{item.caseStatus}}"> <wxs src="/utils/checkutils.wxs" module="tools" />
<view class="avatar"> <view class="page-container">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item.casePhotos}}"></image> <scroll-view scroll-y class="scroll-content" style="height: {{scrollHeight}}px;" refresher-enabled="{{true}}" refresher-threshold="{{100}}" refresher-default-style="black" refresher-background="white" refresher-triggered="{{triggered}}" bindrefresherrefresh="onScrollRefresh" enhanced="true" show-scrollbar="false" bindscrolltolower="onLoadMore">
</view> <block wx:if="{{list.length>0}}">
<view class="case"> <view class="item-container" wx:for="{{list}}" wx:for-index="index" wx:for-item="listItem" wx:key="index" data-id="{{listItem.reportCaseId}}" bind:tap="goDetail">
<view class="case-info"> <view class="item-title-box">
<view class="case-title"> <view class="title-status">{{tools.status(listItem.caseStatus)}}</view>
<view class="title">{{item.communityName}}</view> <view class="item-title">{{listItem.caseTypeName}}</view>
<view class="status" wx:if="{{item.caseStatus == 0}}">待受理</view> </view>
<view class="status" wx:if="{{item.caseStatus == 1}}">待立案</view> <view class="item-desc">{{listItem.handleUserDepartmentName}}</view>
<view class="status" wx:if="{{item.caseStatus == 2}}">待下派</view> <view class="item-desc">{{listItem.caseContent}}</view>
<view class="status" wx:if="{{item.caseStatus == 3}}">待处理</view> <view class="item-position">
<view class="status" wx:if="{{item.caseStatus == 4}}">待检查</view> <image src="/images/ic_clock_icon.png" mode="aspectFill"></image>
<view class="status" wx:if="{{item.caseStatus == 5}}">待结案</view> <view>{{listItem.reportDate}}</view>
<view class="status green" wx:if="{{item.caseStatus == 6}}">已归档</view> </view>
<view class="status red" wx:if="{{item.caseStatus == -1}}">案件异常</view> </view>
</view> </block>
<view class="case-desc"> <t-empty wx:else t-class="empty-cls" image="/images/ic_empty_data.png" t-class-image="t-empty_image" description="暂无数据" />
{{item.caseContent}} </scroll-view>
</view>
</view>
<view class="case-postion">
<image src="../../images/position.png"></image>
{{item.casePosition}}
</view>
</view>
</view>
</view> </view>
<!-- <view class="new-case" bindtap="goReport">案件上报</view> -->

View File

@ -1,110 +1,113 @@
page{ /* pages/census/census.wxss */
background: #f2f1f6; .page-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #f5f5f5;
width: 100%;
height: 100%;
} }
/* .tab-box{
position: fixed; .btn-submit {
top: 0; width: 100%;
left: 0; position: fixed;
right: 0; bottom: 0;
height: 100rpx; height: 48px;
display: flex; background-color: #4985f8;
background: #fff; display: flex;
overflow-x: auto; justify-content: center;
align-items: center;
align-self: center;
color: #FFFFFF;
z-index: 23;
} }
.tab{
display: flex; .scroll-content {
flex: 1;
flex-shrink: 0; border-radius: 10px;
justify-content: center; padding: 5px;
align-items: center; width: 97%;
font-size: 30rpx; margin-top: 10px;
box-sizing: border-box;
} }
.tab.active{
font-size: 36rpx; .item-container {
color: #226cd9; display: flex;
border-bottom: 3px solid #226cd9; flex-direction: column;
} */ align-items: flex-start;
.list{ justify-content: center;
/* margin-top: 100rpx; */ padding: 10px;
padding: 20rpx 20rpx 0; background-color: #ffffff;
margin-top: 10px;
border-radius: 10px;
} }
.list-box{
padding: 20rpx; .item-title {
background: #fff; font-size: 16px;
border-radius: 10rpx; color: #000000;
margin-bottom: 20rpx; margin-left: 3px;
display: flex;
justify-content: space-between;
} }
.avatar, .avatar image{
width: 150rpx; .item-title-box {
height: 150rpx; display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
} }
.case{
width: 500rpx; .title-status {
border-top-right-radius: 10px;
font-size: 12px;
padding: 2px 10px;
color: #FFFFFF;
margin-left: -10px;
border-bottom-right-radius: 10px;
background-color: #4985f8;
} }
.case-info{
border-bottom: 1px dashed #EEE; .item-desc {
font-size: 12px;
color: #101010;
width: 100%;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
margin-top: 3px;
} }
.case-title{
display: flex; .item-position {
justify-content: space-between; margin-top: 5px;
margin-bottom: 10rpx; display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
font-size: 12px;
color: #101010;
} }
.title{
font-size: 36rpx; .item-position image {
line-height: 60rpx; width: 14px;
display: inline-block; height: 14px;
max-width: 65%; margin-right: 5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.status{
line-height: 60rpx; .line {
display: inline-block; margin-top: 5px;
padding: 0 30rpx; margin-bottom: 5px;
background: #fff7ec; border: 1px dashed #ebe9e9;
color: #fdc36e; width: 100%;
border-radius: 30rpx;
} }
.status.green{
color: #2dfe2e;
background: rgba(45,254,46,0.1) .t-empty_image {
width: 48px !important;
height: 48px !important;
} }
.status.red{
color: red; .empty-cls {
background: rgba(255,0,0,0.1) display: flex;
} flex-direction: column;
.case-desc{ align-items: center;
font-size: 28rpx; justify-content: center;
color: #888;
margin-bottom: 10rpx;
line-height: 60rpx;
}
.case-postion{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 28rpx;
color: #108aff;
margin-top: 10rpx;
}
.case-postion image{
width: 30rpx;
height: 28rpx;
}
.new-case{
position: fixed;
bottom: 40rpx;
right: 40rpx;
width: 120rpx;
height: 120rpx;
background: #108aff;
color: #fff;
border-radius: 50%;
padding: 20rpx;
box-sizing: border-box;
text-align: center;
} }

View File

@ -4,4 +4,32 @@ var check = function (s) {
} }
return s; return s;
} }
var getStatus = function (s) {
var status = '';
switch (s) {
case '0':
status = '待受理';
break;
case '1':
status = '待立案';
break;
case '2':
status = '待下派';
break;
case '3':
status = '待处理';
break;
case '4':
status = '待检查';
break;
case '5':
status = '待结案';
break;
case '6':
status = '已归档';
break;
}
return status;
}
module.exports.check = check; module.exports.check = check;
module.exports.status = getStatus;