修改样式

This commit is contained in:
tsdongbo 2021-04-06 14:30:36 +08:00
parent f70cc2e38b
commit 152fcabe03
14 changed files with 316 additions and 67 deletions

View File

@ -4,7 +4,8 @@
"pages/caseCheck/caseCheck",
"pages/caseReport/caseReport",
"pages/caseDetail/caseDetail",
"pages/process/process"
"pages/process/process",
"pages/waitCheck/waitCheck"
],
"window":{
"backgroundTextStyle":"light",
@ -18,5 +19,31 @@
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"tabBar": {
"color": "#000",
"borderStyle": "black",
"selectedColor": "#fff",
"backgroundColor": "#1089f2",
"list": [
{
"pagePath": "pages/caseReport/caseReport",
"iconPath": "images/report.png",
"text": "案件上报",
"selectedIconPath": "images/report-on.png"
},
{
"pagePath": "pages/index/index",
"iconPath": "images/history.png",
"text": "上报历史",
"selectedIconPath": "images/history-on.png"
},
{
"pagePath": "pages/waitCheck/waitCheck",
"iconPath": "images/check.png",
"text": "待检查",
"selectedIconPath": "images/check-on.png"
}
]
}
}

BIN
images/check-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
images/check.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
images/history-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
images/history.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
images/report-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
images/report.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -89,64 +89,6 @@ Page({
}
},
// 前往上报
goReport: function () {
wx.navigateTo({
url: '../caseReport/caseReport',
})
},
// 切换
changeTab: function (e) {
var cur = e.currentTarget.dataset.tab
if (this.data.tab != cur) {
this.setData({
tab: cur,
[`page.page`]: 1
})
if (cur == '0') {
this.getList()
} else {
this.getCheckList()
}
}
},
// 获取待检查列表
getCheckList: function () {
var self = this
wx.showToast({
title: '加载中',
icon: 'loading'
})
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listpagereportcaseinspectofmine', [app.requestUrl]), self.data.page, {
headers: {
token: self.data.token
}
}, function (code, data) {
if(data.rows.length == 0) {
if (self.data.page.page == 1) {
self.setData({
areaList: []
})
} 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()
});
},
/**
* 生命周期函数--监听页面加载
*/

View File

@ -1,7 +1,3 @@
<view class="tab-box">
<view class="tab {{tab == '0'?'active':''}}" data-tab="0" bindtap="changeTab">上报历史</view>
<view class="tab {{tab == '1'?'active':''}}" data-tab="1" bindtap="changeTab">待检查</view>
</view>
<view class="list">
<view class="list-box" wx:for="{{areaList}}" wx:key="index" data-id="{{item.reportCaseId}}" bindtap="goDetail" data-status="{{item.caseStatus}}">
<view class="avatar">
@ -31,4 +27,4 @@
</view>
</view>
</view>
<view class="new-case" bindtap="goReport">案件上报</view>
<!-- <view class="new-case" bindtap="goReport">案件上报</view> -->

View File

@ -1,7 +1,7 @@
page{
background: #f2f1f6;
}
.tab-box{
/* .tab-box{
position: fixed;
top: 0;
left: 0;
@ -24,9 +24,9 @@ page{
font-size: 36rpx;
color: #226cd9;
border-bottom: 3px solid #226cd9;
}
} */
.list{
margin-top: 100rpx;
/* margin-top: 100rpx; */
padding: 20rpx 20rpx 0;
}
.list-box{

View File

@ -0,0 +1,141 @@
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
token: '',
areaList: [],
requestUrl: app.requestUrl,
page: {
page: 1,
rows: 20,
totalPage: 1
},
},
// 查看详情
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
wx.showToast({
title: '加载中',
icon: 'loading'
})
app.restAjax.get(app.restAjax.path('{reqesutUrl}app/reportcase/listpagereportcaseinspectofmine', [app.requestUrl]), self.data.page, {
headers: {
token: self.data.token
}
}, function (code, data) {
if(data.rows.length == 0) {
if (self.data.page.page == 1) {
self.setData({
areaList: []
})
} 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()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
var self = this
this.setData({
['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

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,30 @@
<view class="list">
<view class="list-box" wx:for="{{areaList}}" wx:key="index" data-id="{{item.reportCaseId}}" bindtap="goDetail" data-status="{{item.caseStatus}}">
<view class="avatar">
<image src="{{requestUrl}}route/file/downloadfile/true/{{item.casePhotos}}"></image>
</view>
<view class="case">
<view class="case-info">
<view class="case-title">
<view class="title">{{item.communityName}}</view>
<view class="status" wx:if="{{item.caseStatus == 0}}">待受理</view>
<view class="status" wx:if="{{item.caseStatus == 1}}">待立案</view>
<view class="status" wx:if="{{item.caseStatus == 2}}">待下派</view>
<view class="status" wx:if="{{item.caseStatus == 3}}">待处理</view>
<view class="status" wx:if="{{item.caseStatus == 4}}">待检查</view>
<view class="status" wx:if="{{item.caseStatus == 5}}">待结案</view>
<view class="status green" wx:if="{{item.caseStatus == 6}}">已归档</view>
<view class="status red" wx:if="{{item.caseStatus == -1}}">案件异常</view>
</view>
<view class="case-desc">
{{item.caseContent}}
</view>
</view>
<view class="case-postion">
<image src="../../images/position.png"></image>
{{item.casePosition}}
</view>
</view>
</view>
</view>
<!-- <view class="new-case" bindtap="goReport">案件上报</view> -->

View File

@ -0,0 +1,110 @@
page{
background: #f2f1f6;
}
/* .tab-box{
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100rpx;
display: flex;
background: #fff;
overflow-x: auto;
}
.tab{
display: flex;
flex: 1;
flex-shrink: 0;
justify-content: center;
align-items: center;
font-size: 30rpx;
box-sizing: border-box;
}
.tab.active{
font-size: 36rpx;
color: #226cd9;
border-bottom: 3px solid #226cd9;
} */
.list{
/* margin-top: 100rpx; */
padding: 20rpx 20rpx 0;
}
.list-box{
padding: 20rpx;
background: #fff;
border-radius: 10rpx;
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
}
.avatar, .avatar image{
width: 150rpx;
height: 150rpx;
}
.case{
width: 500rpx;
}
.case-info{
border-bottom: 1px dashed #EEE;
}
.case-title{
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
}
.title{
font-size: 36rpx;
line-height: 60rpx;
display: inline-block;
max-width: 65%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.status{
line-height: 60rpx;
display: inline-block;
padding: 0 30rpx;
background: #fff7ec;
color: #fdc36e;
border-radius: 30rpx;
}
.status.green{
color: #2dfe2e;
background: rgba(45,254,46,0.1)
}
.status.red{
color: red;
background: rgba(255,0,0,0.1)
}
.case-desc{
font-size: 28rpx;
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;
}