mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 00:49:37 +08:00
字体调整
调整UI大小; 加入消息选中删除功能
This commit is contained in:
parent
d267842a86
commit
50c09303e8
@ -145,6 +145,15 @@ export function repairRemindReadRq(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除指定id消息
|
||||||
|
export function repairRemindRemoveRq(data) {
|
||||||
|
return request({
|
||||||
|
url: `/app/repairRemind/remove`,
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 清空消息列表
|
// 清空消息列表
|
||||||
export function repairRemindClearRq(data) {
|
export function repairRemindClearRq(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -3,11 +3,12 @@ const app = getApp()
|
|||||||
import {
|
import {
|
||||||
repairRemindListRq,
|
repairRemindListRq,
|
||||||
repairRemindReadRq,
|
repairRemindReadRq,
|
||||||
repairRemindClearRq
|
repairRemindClearRq,
|
||||||
|
repairRemindRemoveRq
|
||||||
} from "../../../api/repair/repair.js"
|
} from "../../../api/repair/repair.js"
|
||||||
|
|
||||||
import Dialog from '@vant/weapp/dialog/dialog';
|
import Dialog from '@vant/weapp/dialog/dialog';
|
||||||
|
import Notify from '@vant/weapp/notify/notify';
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,8 +23,26 @@ Page({
|
|||||||
dataList: [],
|
dataList: [],
|
||||||
isDataAll: false,
|
isDataAll: false,
|
||||||
},
|
},
|
||||||
|
checkedId: {},
|
||||||
|
showEdit: false
|
||||||
|
},
|
||||||
|
openEdit() {
|
||||||
|
this.setData({
|
||||||
|
showEdit: true,
|
||||||
|
checkedId: {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancelEdit() {
|
||||||
|
this.setData({
|
||||||
|
showEdit: false,
|
||||||
|
checkedId: {}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
removeChecked() {
|
||||||
|
this.setData({
|
||||||
|
showEdit: true
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
@ -83,6 +102,10 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
jumpInfoDetail(e) {
|
jumpInfoDetail(e) {
|
||||||
|
if (this.data.showEdit) {
|
||||||
|
// 编辑模式下不可跳转
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log('detail', e);
|
console.log('detail', e);
|
||||||
let id = e.currentTarget.dataset.obj.id
|
let id = e.currentTarget.dataset.obj.id
|
||||||
let repairId = e.currentTarget.dataset.obj.repairId
|
let repairId = e.currentTarget.dataset.obj.repairId
|
||||||
@ -100,6 +123,58 @@ Page({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
changeCheck(e) {
|
||||||
|
console.log(e)
|
||||||
|
let id = e.currentTarget.dataset.obj.id
|
||||||
|
let _this = this
|
||||||
|
let _checkedId = `checkedId[${id}]`
|
||||||
|
_this.setData({
|
||||||
|
[_checkedId]: e.detail
|
||||||
|
})
|
||||||
|
},
|
||||||
|
removeChecked() {
|
||||||
|
let _this = this
|
||||||
|
let _idArr = _this.data.checkedId
|
||||||
|
let _idStr = ''
|
||||||
|
for (let key in _idArr) {
|
||||||
|
// console.log(_idArr[key])
|
||||||
|
if(_idArr[key]) {
|
||||||
|
_idStr += key + ','
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_idStr != '') {
|
||||||
|
_idStr = _idStr.slice(0, -1)
|
||||||
|
} else {
|
||||||
|
Notify('请至少勾选一条消息!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// console.log(_idStr)
|
||||||
|
Dialog.confirm({
|
||||||
|
title: '请确认',
|
||||||
|
message: '是否删除选中的消息?',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
repairRemindRemoveRq({
|
||||||
|
id:_idStr
|
||||||
|
}).then(res => {
|
||||||
|
// 重新加载列表
|
||||||
|
_this.setData({
|
||||||
|
info: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
dataList: [],
|
||||||
|
isDataAll: false,
|
||||||
|
},
|
||||||
|
checkedId: {}
|
||||||
|
})
|
||||||
|
// 重新加载
|
||||||
|
_this.getDataList()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// on cancel
|
||||||
|
})
|
||||||
|
},
|
||||||
removeAll() {
|
removeAll() {
|
||||||
let _this = this
|
let _this = this
|
||||||
// 确认
|
// 确认
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "消息通知",
|
"navigationBarTitleText": "消息通知",
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-divider": "@vant/weapp/divider/index",
|
"van-divider": "@vant/weapp/divider/index",
|
||||||
"van-icon": "@vant/weapp/icon/index",
|
"van-icon": "@vant/weapp/icon/index",
|
||||||
"van-dialog": "@vant/weapp/dialog/index"
|
"van-dialog": "@vant/weapp/dialog/index",
|
||||||
},
|
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||||
"onReachBottomDistance": 100
|
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||||
|
"van-notify": "@vant/weapp/notify/index"
|
||||||
|
},
|
||||||
|
"onReachBottomDistance": 100
|
||||||
}
|
}
|
@ -1,22 +1,29 @@
|
|||||||
<view class="containerView public">
|
<view class="containerView public">
|
||||||
<view class="itemTitleView">
|
<view class="itemTitleView">
|
||||||
<view class="title"></view>
|
<view class="title"></view>
|
||||||
<view class="more" bind:tap="removeAll">清空</view>
|
<view class="more" wx:if="{{ !showEdit }}" bind:tap="openEdit">管理</view>
|
||||||
</view>
|
<view class="more" wx:if="{{ showEdit }}" bind:tap="cancelEdit">取消</view>
|
||||||
<view class="infoView">
|
<view class="more" wx:if="{{ showEdit }}" bind:tap="removeChecked">删除已选</view>
|
||||||
<view class="itemView {{item.read != '1' ? 'activity' : ''}} " wx:for="{{info.dataList}}" wx:for-item="item" wx:key="*this" data-obj="{{item}}" bind:tap="jumpInfoDetail">
|
<view class="more" wx:if="{{ showEdit }}" bind:tap="removeAll">清空全部</view>
|
||||||
<view class="contentView ellipsisFont">
|
</view>
|
||||||
<view class="title">消息提醒</view>
|
<view style="clear: both;"></view>
|
||||||
<view class="msg ellipsisFont">{{item.content}}</view>
|
<view class="infoView">
|
||||||
<view class="time">{{item.createTime}}</view>
|
|
||||||
</view>
|
|
||||||
<van-icon class="arrow" name="arrow" color="#c3c3c3" size="40rpx" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="loadAllLine" wx:if="{{info.isDataAll}}">
|
<view class="itemView {{item.read != '1' ? 'activity' : ''}} " wx:for="{{info.dataList}}" wx:for-item="item" wx:key="*this">
|
||||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
<van-checkbox wx:if="{{ showEdit }}" value="{{ checkedId[item.id] }}" data-obj="{{item}}" bind:change="changeCheck"></van-checkbox>
|
||||||
|
<view class="contentView ellipsisFont" data-obj="{{item}}" bind:tap="jumpInfoDetail">
|
||||||
|
<view class="title">消息提醒</view>
|
||||||
|
<view class="msg ellipsisFont">{{item.content}}</view>
|
||||||
|
<view class="time">{{item.createTime}}</view>
|
||||||
|
</view>
|
||||||
|
<van-icon class="arrow" name="arrow" color="#c3c3c3" size="40rpx" data-obj="{{item}}" bind:tap="jumpInfoDetail" />
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="loadAllLine" wx:if="{{info.isDataAll}}">
|
||||||
|
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<van-dialog id="van-dialog" />
|
<van-dialog id="van-dialog" />
|
||||||
|
<van-notify id="van-notify" />
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.itemTitleView {
|
.itemTitleView {
|
||||||
/* border-left: 8rpx solid #76aef9; */
|
/* border-left: 8rpx solid #76aef9; */
|
||||||
display: flex;
|
/* display: flex; */
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
@ -20,10 +20,14 @@
|
|||||||
|
|
||||||
|
|
||||||
.itemTitleView .more {
|
.itemTitleView .more {
|
||||||
font-size: 28rpx;
|
/* display: inline; */
|
||||||
|
float: right;
|
||||||
|
font-size: 32rpx;
|
||||||
color: #5482de;
|
color: #5482de;
|
||||||
|
margin-right: 15px;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.infoView {
|
.infoView {
|
||||||
/* border: 1px solid red; */
|
/* border: 1px solid red; */
|
||||||
background: white;
|
background: white;
|
||||||
@ -62,12 +66,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.infoView .itemView .contentView .title {
|
.infoView .itemView .contentView .title {
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
color: black;
|
color: black;
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.infoView .itemView .contentView .msg {
|
.infoView .itemView .contentView .msg {
|
||||||
font-size: 26rpx;
|
font-size: 30rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.topHead .contentView .label1 {
|
.topHead .contentView .label1 {
|
||||||
font-size: 28rpx;
|
font-size: 32rpx;
|
||||||
color: white;
|
color: white;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topHead .contentView .label2 {
|
.topHead .contentView .label2 {
|
||||||
@ -89,7 +90,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mainView .statusView .label {
|
.mainView .statusView .label {
|
||||||
font-size: 28rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +109,7 @@
|
|||||||
|
|
||||||
.mainView .statusView .time {
|
.mainView .statusView .time {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
font-size: 28rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainView .statusView .leftImg {
|
.mainView .statusView .leftImg {
|
||||||
@ -131,7 +132,7 @@
|
|||||||
|
|
||||||
.mainView .reportView .topTitle {
|
.mainView .reportView .topTitle {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
font-size: 28rpx;
|
font-size: 36rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,13 +147,13 @@
|
|||||||
|
|
||||||
.mainView .reportView .itemView .label {
|
.mainView .reportView .itemView .label {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 200rpx;
|
width: 240rpx;
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainView .reportView .itemView .content {
|
.mainView .reportView .itemView .content {
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,12 +190,12 @@
|
|||||||
.mainView .reportView .itemLineView .label {
|
.mainView .reportView .itemLineView .label {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainView .reportView .itemLineView .content {
|
.mainView .reportView .itemLineView .content {
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +214,7 @@
|
|||||||
|
|
||||||
.mainView .reportView .repairProgressView .label {
|
.mainView .reportView .repairProgressView .label {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 28rpx;
|
font-size: 32rpx;
|
||||||
color: #5176b1;
|
color: #5176b1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,21 +42,21 @@
|
|||||||
|
|
||||||
.itemView .centerView .rightView .labelName {
|
.itemView .centerView .rightView .labelName {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
font-size: 28rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemView .centerView .rightView .labelContent1 {
|
.itemView .centerView .rightView .labelContent1 {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
font-size: 24rpx;
|
font-size: 28rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemView .centerView .rightView .labelContent2 {
|
.itemView .centerView .rightView .labelContent2 {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
font-size: 24rpx;
|
font-size: 28rpx;
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
|
|
||||||
.itemView .centerView .rightView .labelContent {
|
.itemView .centerView .rightView .labelContent {
|
||||||
line-height: 1;
|
line-height: 1.2;
|
||||||
margin-top: 18rpx;
|
margin-top: 18rpx;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -50,7 +50,7 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
||||||
font-size: 26rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemView .centerView .rightView .labelContent:first-of-type {
|
.itemView .centerView .rightView .labelContent:first-of-type {
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
.contentView .rowColumnView .label {
|
.contentView .rowColumnView .label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 30rpx;
|
font-size: 34rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
/* max-width: 160rpx; */
|
/* max-width: 160rpx; */
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
@ -109,7 +109,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
font-size: 30rpx;
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -158,6 +158,7 @@
|
|||||||
height: 250rpx !important;
|
height: 250rpx !important;
|
||||||
/* border: 1px solid rgb(126, 126, 126, 0.2) !important; */
|
/* border: 1px solid rgb(126, 126, 126, 0.2) !important; */
|
||||||
padding: 10rpx !important;
|
padding: 10rpx !important;
|
||||||
|
font-size: 34rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialogBtnView {
|
.dialogBtnView {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user