Commit b077ea55 by fengzhaoyu

feat:列表问题

parent 89583922
...@@ -8,3 +8,14 @@ export const repeatList = [ ...@@ -8,3 +8,14 @@ export const repeatList = [
{ id: 3, text: '每周的工作日', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR'] } }, { id: 3, text: '每周的工作日', icon: '', repeatable: 1, recurrenceModel: { model: 'weekly', interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: ['MO', 'TU', 'WE', 'TH', 'FR'] } },
{ id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absolute_Monthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } } { id: 4, text: '每月', icon: '', repeatable: 1, recurrenceModel: { model: 'absolute_Monthly', daysOfMonth: ['23'], interval: 1, initialTime: `2020-03-23`, terminateTime: `2022-03-23`, weekDayList: null } }
] ]
export const aheadTimeList = [
{ id: -1, text: '不提醒', icon: 'iconicon_cycle' },
{ id: 0, text: '会议开始时提醒', icon: '' },
{ id: 5, text: '提前5分钟提醒', icon: '' },
{ id: 15, text: '提前15分钟提醒', icon: '' },
{ id: 30, text: '提前30分钟提醒', icon: '' },
{ id: 60, text: '提前一小时提醒', icon: '' },
{ id: 120, text: '提前二小时提醒', icon: '' },
{ id: 1440, text: '提前一天提醒', icon: '' },
{ id: 105120, text: '提前一周提醒', icon: '' }
]
\ No newline at end of file
...@@ -61,7 +61,7 @@ input { ...@@ -61,7 +61,7 @@ input {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
} }
.place, .time, .participator, .meetingWay { .place, .time, .participator, .meetingWay, .aheadTime {
display: flex; display: flex;
padding: 0 32rpx; padding: 0 32rpx;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
...@@ -70,7 +70,7 @@ input { ...@@ -70,7 +70,7 @@ input {
margin-top: 48rpx; margin-top: 48rpx;
} }
.place>.icon, .time>.icon, .participator>.icon, .meetingWay>.icon { .place>.icon, .time>.icon, .participator>.icon, .meetingWay>.icon, .aheadTime>.icon {
margin-right: 24rpx; margin-right: 24rpx;
} }
...@@ -86,7 +86,7 @@ input { ...@@ -86,7 +86,7 @@ input {
overflow: hidden; overflow: hidden;
} }
.placeContaint, .timeContaint, .participatorContaint, .meetingWayContent { .placeContaint, .timeContaint, .participatorContaint, .meetingWayContent, .aheadTimeContent {
width: 622rpx; width: 622rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -247,3 +247,15 @@ input { ...@@ -247,3 +247,15 @@ input {
font-size: 30rpx; font-size: 30rpx;
color: rgba(10, 10, 10, 0.3)!important; color: rgba(10, 10, 10, 0.3)!important;
} }
.aheadTimeItem {
width: 100%;
white-space: nowrap;
overflow-x: scroll;
font-size: 34rpx;
line-height: 1.5
}
.aheadTimeText:last-child .divder {
display: none
}
\ No newline at end of file
...@@ -76,6 +76,21 @@ ...@@ -76,6 +76,21 @@
</view> </view>
</view> </view>
</view> </view>
<view class="aheadTime">
<view class="iconicon_time1 iconfont icon">
</view>
<view class="aheadTimeContent">
<view class="aheadTimeItem" onTap="handleSelectAheadTime">
<text class="aheadTimeText" a:for="{{aheadTime.aheadTimeList}}" a:if="{{aheadTime.aheadTimes.includes(item.id)}}">
{{item.text}}
<text class="divder">{{"、"}}</text>
</text>
</view>
<!--<view class="hasplace" onTap="goSelectPlace">
{{$data.locationName}}</view> -->
<view class=" icon iconfont iconicon_open"></view>
</view>
</view>
<!-- 保存 --> <!-- 保存 -->
<view class="save" onTap="addSchedule1"> <view class="save" onTap="addSchedule1">
<view class="button {{limitClick ? 'gray' : ''}}"> <view class="button {{limitClick ? 'gray' : ''}}">
...@@ -87,5 +102,6 @@ ...@@ -87,5 +102,6 @@
<popup title="{{popup.title}}" show="{{popup.show}}" mask="{{popup.mask}}" onClose="closePopup"> <popup title="{{popup.title}}" show="{{popup.show}}" mask="{{popup.mask}}" onClose="closePopup">
<meeting-time-picker a:if="{{'time' === popup.type}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker> <meeting-time-picker a:if="{{'time' === popup.type}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker>
<list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}" comSelectListId="{{repeat.selectRepeatId}}" onComSelectList="selectRepeatListItem"></list> <list a:if="{{popup.type=='repeat'}}" dataComList="{{repeat.repeatList}}" comSelectListId="{{repeat.selectRepeatId}}" onComSelectList="selectRepeatListItem"></list>
<list a:if="{{popup.type=='aheadTime'}}" onClose="closePopup" multiple="{{true}}" onCompelete="handleAheadTimeSave" complete="{{true}}" dataComList="{{aheadTime.aheadTimeList}}" onComSelectList="selectComList" comSelectList="{{aheadTime.aheadTimesListId}}" iconType="{{aheadTime.iconType}}"></list>
</popup> </popup>
</view> </view>
\ No newline at end of file
import { addSchedule, updateMeetingTask, getDeviceBySn } from '../../api/request.js' import { addSchedule, updateMeetingTask, getDeviceBySn } from '../../api/request.js'
import { selectPeople, modifyTimeImpactRepeat, throttle, dealRepeatModal, getInterTime, getShowTime, getTwoYearToday } from './../../utils/utils.js' import { selectPeople, modifyTimeImpactRepeat, throttle, dealRepeatModal, getInterTime, getShowTime, getTwoYearToday } from './../../utils/utils.js'
import { checkFullScren } from "../../utils/checkFullScren"; import { checkFullScren } from "../../utils/checkFullScren";
import { repeatList, repeatWeek } from "./constant" import { repeatList, repeatWeek, aheadTimeList } from "./constant"
import create from 'dd-store' import create from 'dd-store'
import pageStore from '../meetingDetail/store'; import pageStore from '../meetingDetail/store';
create.Page({ create.Page({
...@@ -28,6 +28,13 @@ create.Page({ ...@@ -28,6 +28,13 @@ create.Page({
placeholder: '', placeholder: '',
isIPX: false, isIPX: false,
limitClick: false, limitClick: false,
aheadTime: {
aheadTimeList: aheadTimeList,
aheadTimes: [15],
iconType: 'icon',
aheadTimesListId: [15],
},
}, },
onLoad(query) { onLoad(query) {
if (query && query.sn) { if (query && query.sn) {
...@@ -147,6 +154,26 @@ create.Page({ ...@@ -147,6 +154,26 @@ create.Page({
}, },
// 选择会前提醒
handleSelectAheadTime() {
this.setData({
popup: {
show: true,
title: "会前提醒",
mask: true,
type: 'aheadTime'
}
})
},
// 会前提醒点击完成
handleAheadTimeSave(event) {
this.closePopup()
this.setData({
'aheadTime.aheadTimes': event,
'aheadTime.aheadTimesListId': event,
})
},
// 关闭popup // 关闭popup
closePopup() { closePopup() {
...@@ -206,7 +233,8 @@ create.Page({ ...@@ -206,7 +233,8 @@ create.Page({
repeatable: this.data.repeat.repeatable, repeatable: this.data.repeat.repeatable,
remark: this.data.meetingRemark, remark: this.data.meetingRemark,
recurrenceModel: this.data.repeat.recurrenceModel, recurrenceModel: this.data.repeat.recurrenceModel,
meetingWayModel: { model: null } meetingWayModel: { model: null },
aheadTimes: this.data.aheadTime.aheadTimesListId
} }
const res = await addSchedule(data).catch(err => { const res = await addSchedule(data).catch(err => {
this.setData({ limitClick: false }); this.setData({ limitClick: false });
......
...@@ -332,8 +332,8 @@ input { ...@@ -332,8 +332,8 @@ input {
.headUrl>image { .headUrl>image {
vertical-align: top; vertical-align: top;
width: 100%; width: 80rpx;
height: 100%; height: 80rpx;
border-radius: 50%; border-radius: 50%;
} }
...@@ -748,3 +748,10 @@ input { ...@@ -748,3 +748,10 @@ input {
padding-right: 0; padding-right: 0;
border-right: none; border-right: none;
} }
.disableSelectAheadTime {
/* cursor: no-drop; */
/* background: #f5f6f7; */
/* background: #ccc; */
color: (10, 10, 10, 0.3)
}
\ No newline at end of file
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
</view> </view>
<!--参加状态--> <!--参加状态-->
<view class="participateStatus" a:if="{{confirmAttendance === 1}}"> <view class="participateStatus" a:if="{{confirmAttendance === 1}}">
<view class="remind" catchTap="handleAheadTime" data-type="aheadTime"> <view class="remind {{organizer == currentPeople ? '' : 'disableSelectAheadTime'}}" catchTap="{{organizer == currentPeople ? 'handleAheadTime' : '' }}" data-type="aheadTime">
<text class="iconfont iconicon_time1"></text> <text class="iconfont iconicon_time1"></text>
<text class="remindTimeContaint" a:if="{{aheadTime.aheadTimes.length}}"> <text class="remindTimeContaint" a:if="{{aheadTime.aheadTimes.length}}">
<block class="remindTime" decode="{{true}}" a:for="{{aheadTime.aheadTimeList}}" a:if="{{aheadTime.aheadTimes.includes(item.id)}}"> <block class="remindTime" decode="{{true}}" a:for="{{aheadTime.aheadTimeList}}" a:if="{{aheadTime.aheadTimes.includes(item.id)}}">
......
...@@ -859,12 +859,15 @@ create.Page({ ...@@ -859,12 +859,15 @@ create.Page({
if (res.data.code !== 0) { if (res.data.code !== 0) {
return return
} }
if (_that.data.currentPeople === _that.data.organizer) {
_that.setData({ _that.setData({
'aheadTime.aheadTimes': [15], 'aheadTime.aheadTimes': [15],
'aheadTime.aheadTimesListId': [15], 'aheadTime.aheadTimesListId': [15],
})
}
_that.setData({
confirmAttendance: dataParticipate.value confirmAttendance: dataParticipate.value
}) })
_that.$store.data.participatorList[_that.data.currentPeople].confirmAttendance = dataParticipate.value _that.$store.data.participatorList[_that.data.currentPeople].confirmAttendance = dataParticipate.value
_that.$store.data.showParticipatorList = Object.values(_that.$store.data.participatorList) _that.$store.data.showParticipatorList = Object.values(_that.$store.data.participatorList)
_that.$store.data.originUsers = [..._that.$store.data.showParticipatorList] _that.$store.data.originUsers = [..._that.$store.data.showParticipatorList]
...@@ -1374,7 +1377,8 @@ create.Page({ ...@@ -1374,7 +1377,8 @@ create.Page({
this.update() this.update()
}, },
// 图片加载完成 // 图片加载完成
imageLoad() { imageLoad(event) {
// debugger
}, },
......
...@@ -17,10 +17,15 @@ export function getSelectRepeatId(recurrenceModel, repeatList) { ...@@ -17,10 +17,15 @@ export function getSelectRepeatId(recurrenceModel, repeatList) {
export function getInitialPsarticipants(participants) { export function getInitialPsarticipants(participants) {
let people = {} let people = {}
for (let i = 0; i < participants.length; i++) { for (let i = 0; i < participants.length; i++) {
if (i < 11 && participants[i].headUrl) { // if (i < 11 && participants[i].participator && participants[i].participator.headUrl) {
let img = new new Image() // console.log(participants[i].participator.headUrl)
img.src = img.headUrl // // console.log(new Image)
} // // let img = new Image()
// // img.onload = function () {
// // // console.log(participants[i].participator.headUrl)
// // img.src = participants[i].participator.headUrl
// // };
// }
participants[i].participator.confirmAttendance = participants[i].confirmAttendance participants[i].participator.confirmAttendance = participants[i].confirmAttendance
people[participants[i].participator.userId] = participants[i].participator people[participants[i].participator.userId] = participants[i].participator
} }
......
...@@ -299,7 +299,7 @@ export function selectedelRequired(select, require) { ...@@ -299,7 +299,7 @@ export function selectedelRequired(select, require) {
// 文件格式化 // 文件格式化
export function renderSize(value) { export function renderSize(value) {
if (null == value || value == '' || value == 0) { if (null == value || value == '' || value == 0) {
return "0 B"; return "";
} }
var unitArr = new Array("B", "K", "M", "G", "T", "P", "E", "Z", "Y"); var unitArr = new Array("B", "K", "M", "G", "T", "P", "E", "Z", "Y");
var index = 0; var index = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment