Commit b3420bd6 by fengzhaoyu

fix:添加展开全部 收起 任务为空的时候的创建

parent dad0b226
.name {
font-size: 24rpx;
margin-top: 8rpx;
opacity: 0.56;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.participate-status {
line-height: 15px;
vertical-align: top;
width: 15px;
height: 15px;
position: absolute;
background: #fff;
bottom: 0rpx;
font-size: 12px;
right: -3rpx;
border-radius: 50%;
text-align: center;
}
.participate {
color: #15BC83;
}
.noParticipateStatus {
color: #F25643;
}
\ No newline at end of file
<view class="{{className}}">
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" />
<view a:else>
{{item.username.substring(item.username.length-numLength)}}
</view>
<view a:if="{{item.confirmAttendance == 0}}" class=" noParticipateStatus participate-status iconicon_noAgreed1 iconfont">
</view>
<view a:if="{{item.confirmAttendance == 1}}" class=" participate participate-status iconicon_Agreed1 iconfont">
</view>
</view>
\ No newline at end of file
Component({
mixins: [],
data: {},
props: {
numLength: 2
},
didMount() { },
didUpdate() { },
didUnmount() { },
methods: {},
});
{
"component": true
}
\ No newline at end of file
......@@ -9,4 +9,30 @@
min-height: 400rpx;
padding: 32rpx;
margin-bottom: 16rpx;
}
.parent-node {
max-height: 200rpx;
display: block;
display: -webkit-box;
/*关键属性(必须有的) */
-webkit-box-orient: vertical;
/*规定子元素的排列方向 */
-webkit-line-clamp: 5;
/*行数*/
/* 实现多余的文字隐藏并用省略号来代表被隐藏的文字 */
overflow: hidden;
text-overflow: ellipsis;
}
.state {
margin-top: 16rpx;
color: rgba(10, 10, 10)
}
.hide {
max-height: max-content;
text-overflow: unset;
max-height: unset;
-webkit-line-clamp: unset;
}
\ No newline at end of file
<view a:if="{{isEdit}}">
<form onSubmit="complete">
<textarea value="{{notes ? notes.meetingNotes : ''}}" class="notes-edit" name="textarea" auto-height placeholder="输入笔记内容"></textarea>
<textarea value="{{notes ? notes.meetingNotes : ''}}" maxlength= "-1" class="notes-edit" name="textarea" auto-height placeholder="输入笔记内容"></textarea>
<button form-type="submit" class="picker-complete">完成</button>
</form>
</view>
<view a:else class="notes">
{{meetingNotes}}
<view a:else class="notes ">
<!--<view id="parent" class="parent-node {{isExpand == false ? 'hide' : ''}}"><text id="content">{{meetingNotes}}</text></view> -->
<view>
<text id="content">
{{meetingNotes.length > 50&&!isExpand ? `${meetingNotes.substring(0,50)} ${" "}...` :meetingNotes }}
</text>
</view>
<view a:if="{{meetingNotes.length > 50}}" class="state" onTap="handleState">
{{isExpand ?"收起": "展开全部" }}
</view>
</view>
\ No newline at end of file
......@@ -4,11 +4,39 @@ create.Component({
store: pageStore,
mixins: [],
data: {
notes: null //store
notes: null,//store
isExpand: null,
},
props: {},
didMount() { },
didUpdate() { },
didMount() {
// const _that = this
// dd.createSelectorQuery()
// .select('#parent').boundingClientRect()
// .select('#content').boundingClientRect().exec((ret) => {
// if (ret[1].height > ret[0].height) {
// _that.setData({
// isExpand: true,
// })
// } else {
// _that.setData({
// showState: null
// })
// }
// // if (ret[1].height > 50) {
// // _that.setData({
// // isExpand: true,
// // })
// // } else {
// // _that.setData({
// // showState: null
// // })
// // }
// console.log(JSON.stringify(ret, null, 2));
// });
},
didUpdate() {
},
didUnmount() { },
methods: {
complete: function (e) {
......@@ -18,5 +46,10 @@ create.Component({
}
this.props.onGetNotes(e.detail.value.textarea)
},
handleState() {
this.setData({
isExpand: !this.data.isExpand
})
}
},
});
.dm-popup-content {
position: fixed;
max-height: 100vh;
overflow-y: scroll;
}
.dm-popup-mask {
......
......@@ -20,7 +20,7 @@
<text class="participator-title">{{currentTask.endTime ? `${currentTask.endTime} 截止`: '设置截止时间'}}</text>
</view>
<view class="save" onTap="addTask">
<view class="button {{limitClick ? 'gray' : ''}}">
<view class="button {{limitClick || !currentTask.title.trim() ? 'gray' : ''}}">
立即创建
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
......
......@@ -7,6 +7,7 @@ import { updateMeetingTask } from '../../api/request';
create.Page({
store: pageStore,
data: {
$data: null,
currentTask: {},
show: false,
isIPX: false,
......@@ -34,9 +35,21 @@ create.Page({
}
},
handleOpenTime() {
this.setData({
show: true
})
const _that = this
dd.datePicker({
format: 'yyyy-MM-dd HH:mm',
currentDate: this.$store.data.startTime,
success: (res) => {
if (!res.date) {
return
}
_that.store.data.currentTask.endTime = `${res.date}:00`
_that.update()
},
});
// this.setData({
// show: true
// })
},
closePopup() {
this.setData({
......@@ -50,11 +63,12 @@ create.Page({
this.closePopup();
},
addTask() {
if (this.data.limitClick) {
const task = this.store.data.currentTask;
if (this.data.limitClick || !(task.title.trim())) {
return
}
this.setData({ limitClick: true });
const task = this.store.data.currentTask;
updateMeetingTask({
meetingId: this.data.meetingId,
platform: 'dingTalk',
......
......@@ -331,21 +331,6 @@ input {
position: relative;
}
.conflict {
line-height: 15px;
vertical-align: top;
width: 15px;
height: 15px;
position: absolute;
background: #fff;
bottom: 0rpx;
color: #FF943E;
font-size: 12px;
right: -3rpx;
border-radius: 50%;
text-align: center;
}
.headUrl>image {
vertical-align: top;
width: 100%;
......@@ -691,4 +676,8 @@ input {
white-space: nowrap;
padding: 0 15px;
font-size: 24rpx;
}
.iconpeople1 {
line-height: 40rpx;
}
\ No newline at end of file
......@@ -53,8 +53,7 @@
<!-- $data.startTime $data.endTime repeatable recurrenceModel 时间 重复 -->
<view class="permissionContant">
<view class="time">
<view class="iconicon_conflict iconfont icon">
</view>
<view class="iconicon_conflict iconfont icon"></view>
<view class="timeContaint">
<view>
<view class="timeText" catchTap="handleTime" data-type='time'>
......@@ -88,14 +87,8 @@
</view>
<view class="participatorListBottom" catchTap="goParticipantsDetail">
<view class="people" a:for="{{$data.showParticipatorList.length > 10 ? [...$data.showParticipatorList].splice(0, 11) : $data.showParticipatorList}}">
<view class="headUrl">
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" />
<text a:else>{{item.platform==="outlook" ? item.username.substring(0, 2) : item.username.substring(item.username.length-2, item.username.length)}}
</text>
<view class="conflict iconicon_conflict iconfont" a:if="{{conflictPeople.includes(item.userId)}}">
</view>
</view>
<!--<view class="name">{{item.name}}</view> -->
<head-img className="headUrl" item="{{item}}"></head-img>
<!--<view class="headUrl"><image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" /><view class="conflict iconicon_conflict iconfont" a:if="{{conflictPeople.includes(item.userId)}}"></view></view><view class="name">{{item.name}}</view> -->
</view>
<view class="addPeople iconfont iconicon_add1" catchTap="handleAddParticipator" data-type='participator'></view>
</view>
......
......@@ -556,7 +556,7 @@ create.Page({
let participatorList = {}
if (this.data.organizer === this.data.currentPeople) {
participatorList[getApp().globalData.userid] = {
userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk'
userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk', confirmAttendance: this.data.confirmAttendance
}
}
......@@ -637,7 +637,7 @@ create.Page({
},
// 参会人详情
goParticipantsDetail() {
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${this.store.data.scheduleItem}&organizer=${this.data.organizer}` })
dd.navigateTo({ url: `./../participantsDetail/participantsDetail?scheduleItem=${this.store.data.scheduleItem}&organizer=${this.data.organizer}&confirmAttendance=${this.data.confirmAttendance}` })
},
......@@ -831,6 +831,10 @@ create.Page({
this.setData({
confirmAttendance: -9
})
this.$store.data.participatorList[this.data.currentPeople].confirmAttendance = -9
this.$store.data.showParticipatorList = Object.values(this.$store.data.participatorList)
this.$store.data.originUsers = [...this.$store.data.showParticipatorList]
this.update()
if (this.data.repeat.repeatable === 1) {
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
......@@ -844,26 +848,33 @@ create.Page({
},
// 参加状态保存
participateSave(dataParticipate) {
const _that = this
return new Promise((resolve) => {
isParticipate(dataParticipate).then(res => {
resolve(res)
if (res.data.code !== 0) {
console.log(res)
return
}
this.setData({
_that.setData({
'aheadTime.aheadTimes': [15],
'aheadTime.aheadTimesListId': [15],
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.originUsers = [..._that.$store.data.showParticipatorList]
_that.update()
if (dataParticipate.type === "only") {
if (this.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: dataParticipate.value })
if (_that.$store.modifyOnceMeetingContent) {
_that.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: dataParticipate.value })
}
return
}
if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting()
if (_that.$store.modifyErpeatMeeting) {
_that.$store.modifyErpeatMeeting()
}
})
......
......@@ -12,6 +12,7 @@
"toast": "../../components/toast/toast",
"selectpopup": "../../components/selectPopup/selectPopup",
"centerpopup": "../../components/centerPopup/centerPopup",
"meeting-time-picker": "../../components/meetingTimePicker/meetingTimePicker"
"meeting-time-picker": "../../components/meetingTimePicker/meetingTimePicker",
"head-img": "../../components/head-img/head-img"
}
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ export function getSelectRepeatId(recurrenceModel, repeatList) {
export function getInitialPsarticipants(participants) {
let people = {}
for (let i = 0; i < participants.length; i++) {
participants[i].participator.confirmAttendance = participants[i].confirmAttendance
people[participants[i].participator.userId] = participants[i].participator
}
return people
......
<view class="participantsDetail">
<view class="peopleContaint">
<view class="peopleList" a:for="{{!!scheduleItem ? showContactPeople : $data.showParticipatorList}}" a:for-item="item">
<view class="headImg">
<image a:if="{{!!item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}"/>
<text a:else>{{item.username.substring(0, 1)}}</text>
<!--<text a:if="{{conflictPeople.includes(item.userId)}}" class="conflict iconicon_conflict iconfont"></text> -->
</view>
<head-img className="headImg" numLength="{{1}}" item="{{item}}"></head-img>
<view class="info">
<text class="name">{{item.username}}</text>
<text a:if="{{(!scheduleItem || currentPeople === organizer) ? !(item.userId == currentPeople) : !(originUsersId.includes(item.userId)) }}" class="close iconicon_close iconfont" data-userId="{{item.userId}}" onTap="delParticipants"></text>
......
......@@ -19,9 +19,11 @@ create.Page({
contactPeople: {},
showContactPeople: [],
originUsersId: [],
confirmAttendance: null
},
onLoad(event) {
this.setData({
confirmAttendance: event.confirmAttendance,
isIPX: checkFullScren(),
scheduleItem: event.scheduleItem,
organizer: event.organizer,
......@@ -67,7 +69,7 @@ create.Page({
// 发起人 可选 必选
else if (this.data.currentPeople === this.data.organizer) {
participatorList[getApp().globalData.userid] = {
userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk'
userId: getApp().globalData.userid, username: getApp().globalData.name, headUrl: getApp().globalData.avatar, platform: 'dingtalk', confirmAttendance: this.data.confirmAttendance
}
}
// 编辑 参会人可选必选
......
{
"usingComponents": {
"head-img": "../../components/head-img/head-img",
"popup": "../../components/popup/index",
"list": "../../components/list/list",
"toast": "../../components/toast/toast",
......
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