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 @@ ...@@ -9,4 +9,30 @@
min-height: 400rpx; min-height: 400rpx;
padding: 32rpx; padding: 32rpx;
margin-bottom: 16rpx; 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}}"> <view a:if="{{isEdit}}">
<form onSubmit="complete"> <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> <button form-type="submit" class="picker-complete">完成</button>
</form> </form>
</view> </view>
<view a:else class="notes"> <view a:else class="notes ">
{{meetingNotes}} <!--<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> </view>
\ No newline at end of file
...@@ -4,11 +4,39 @@ create.Component({ ...@@ -4,11 +4,39 @@ create.Component({
store: pageStore, store: pageStore,
mixins: [], mixins: [],
data: { data: {
notes: null //store notes: null,//store
isExpand: null,
}, },
props: {}, props: {},
didMount() { }, didMount() {
didUpdate() { }, // 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() { }, didUnmount() { },
methods: { methods: {
complete: function (e) { complete: function (e) {
...@@ -18,5 +46,10 @@ create.Component({ ...@@ -18,5 +46,10 @@ create.Component({
} }
this.props.onGetNotes(e.detail.value.textarea) this.props.onGetNotes(e.detail.value.textarea)
}, },
handleState() {
this.setData({
isExpand: !this.data.isExpand
})
}
}, },
}); });
.dm-popup-content { .dm-popup-content {
position: fixed; position: fixed;
max-height: 100vh;
overflow-y: scroll;
} }
.dm-popup-mask { .dm-popup-mask {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<text class="participator-title">{{currentTask.endTime ? `${currentTask.endTime} 截止`: '设置截止时间'}}</text> <text class="participator-title">{{currentTask.endTime ? `${currentTask.endTime} 截止`: '设置截止时间'}}</text>
</view> </view>
<view class="save" onTap="addTask"> <view class="save" onTap="addTask">
<view class="button {{limitClick ? 'gray' : ''}}"> <view class="button {{limitClick || !currentTask.title.trim() ? 'gray' : ''}}">
立即创建 立即创建
</view> </view>
<view class="tabBarBottom" a:if="{{isIPX}}"> <view class="tabBarBottom" a:if="{{isIPX}}">
......
...@@ -7,6 +7,7 @@ import { updateMeetingTask } from '../../api/request'; ...@@ -7,6 +7,7 @@ import { updateMeetingTask } from '../../api/request';
create.Page({ create.Page({
store: pageStore, store: pageStore,
data: { data: {
$data: null,
currentTask: {}, currentTask: {},
show: false, show: false,
isIPX: false, isIPX: false,
...@@ -34,9 +35,21 @@ create.Page({ ...@@ -34,9 +35,21 @@ create.Page({
} }
}, },
handleOpenTime() { handleOpenTime() {
this.setData({ const _that = this
show: true 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() { closePopup() {
this.setData({ this.setData({
...@@ -50,11 +63,12 @@ create.Page({ ...@@ -50,11 +63,12 @@ create.Page({
this.closePopup(); this.closePopup();
}, },
addTask() { addTask() {
if (this.data.limitClick) { const task = this.store.data.currentTask;
if (this.data.limitClick || !(task.title.trim())) {
return return
} }
this.setData({ limitClick: true }); this.setData({ limitClick: true });
const task = this.store.data.currentTask;
updateMeetingTask({ updateMeetingTask({
meetingId: this.data.meetingId, meetingId: this.data.meetingId,
platform: 'dingTalk', platform: 'dingTalk',
......
...@@ -331,21 +331,6 @@ input { ...@@ -331,21 +331,6 @@ input {
position: relative; 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 { .headUrl>image {
vertical-align: top; vertical-align: top;
width: 100%; width: 100%;
...@@ -691,4 +676,8 @@ input { ...@@ -691,4 +676,8 @@ input {
white-space: nowrap; white-space: nowrap;
padding: 0 15px; padding: 0 15px;
font-size: 24rpx; font-size: 24rpx;
}
.iconpeople1 {
line-height: 40rpx;
} }
\ No newline at end of file
...@@ -53,8 +53,7 @@ ...@@ -53,8 +53,7 @@
<!-- $data.startTime $data.endTime repeatable recurrenceModel 时间 重复 --> <!-- $data.startTime $data.endTime repeatable recurrenceModel 时间 重复 -->
<view class="permissionContant"> <view class="permissionContant">
<view class="time"> <view class="time">
<view class="iconicon_conflict iconfont icon"> <view class="iconicon_conflict iconfont icon"></view>
</view>
<view class="timeContaint"> <view class="timeContaint">
<view> <view>
<view class="timeText" catchTap="handleTime" data-type='time'> <view class="timeText" catchTap="handleTime" data-type='time'>
...@@ -88,14 +87,8 @@ ...@@ -88,14 +87,8 @@
</view> </view>
<view class="participatorListBottom" catchTap="goParticipantsDetail"> <view class="participatorListBottom" catchTap="goParticipantsDetail">
<view class="people" a:for="{{$data.showParticipatorList.length > 10 ? [...$data.showParticipatorList].splice(0, 11) : $data.showParticipatorList}}"> <view class="people" a:for="{{$data.showParticipatorList.length > 10 ? [...$data.showParticipatorList].splice(0, 11) : $data.showParticipatorList}}">
<view class="headUrl"> <head-img className="headUrl" item="{{item}}"></head-img>
<image a:if="{{item.headUrl}}" mode="scaleToFill" src="{{item.headUrl}}" /> <!--<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> -->
<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> -->
</view> </view>
<view class="addPeople iconfont iconicon_add1" catchTap="handleAddParticipator" data-type='participator'></view> <view class="addPeople iconfont iconicon_add1" catchTap="handleAddParticipator" data-type='participator'></view>
</view> </view>
......
...@@ -556,7 +556,7 @@ create.Page({ ...@@ -556,7 +556,7 @@ create.Page({
let participatorList = {} let participatorList = {}
if (this.data.organizer === this.data.currentPeople) { if (this.data.organizer === this.data.currentPeople) {
participatorList[getApp().globalData.userid] = { 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({ ...@@ -637,7 +637,7 @@ create.Page({
}, },
// 参会人详情 // 参会人详情
goParticipantsDetail() { 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({ ...@@ -831,6 +831,10 @@ create.Page({
this.setData({ this.setData({
confirmAttendance: -9 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.data.repeat.repeatable === 1) {
if (this.$store.modifyErpeatMeeting) { if (this.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting() this.$store.modifyErpeatMeeting()
...@@ -844,26 +848,33 @@ create.Page({ ...@@ -844,26 +848,33 @@ create.Page({
}, },
// 参加状态保存 // 参加状态保存
participateSave(dataParticipate) { participateSave(dataParticipate) {
const _that = this
return new Promise((resolve) => { return new Promise((resolve) => {
isParticipate(dataParticipate).then(res => { isParticipate(dataParticipate).then(res => {
resolve(res) resolve(res)
if (res.data.code !== 0) { if (res.data.code !== 0) {
console.log(res)
return return
} }
this.setData({ _that.setData({
'aheadTime.aheadTimes': [15], 'aheadTime.aheadTimes': [15],
'aheadTime.aheadTimesListId': [15], 'aheadTime.aheadTimesListId': [15],
confirmAttendance: dataParticipate.value 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 (dataParticipate.type === "only") {
if (this.$store.modifyOnceMeetingContent) { if (_that.$store.modifyOnceMeetingContent) {
this.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: dataParticipate.value }) _that.$store.modifyOnceMeetingContent({ id: this.data.scheduleItem.id, confirmAttendance: dataParticipate.value })
} }
return return
} }
if (this.$store.modifyErpeatMeeting) { if (_that.$store.modifyErpeatMeeting) {
this.$store.modifyErpeatMeeting() _that.$store.modifyErpeatMeeting()
} }
}) })
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"toast": "../../components/toast/toast", "toast": "../../components/toast/toast",
"selectpopup": "../../components/selectPopup/selectPopup", "selectpopup": "../../components/selectPopup/selectPopup",
"centerpopup": "../../components/centerPopup/centerPopup", "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) { ...@@ -13,6 +13,7 @@ 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++) {
participants[i].participator.confirmAttendance = participants[i].confirmAttendance
people[participants[i].participator.userId] = participants[i].participator people[participants[i].participator.userId] = participants[i].participator
} }
return people return people
......
<view class="participantsDetail"> <view class="participantsDetail">
<view class="peopleContaint"> <view class="peopleContaint">
<view class="peopleList" a:for="{{!!scheduleItem ? showContactPeople : $data.showParticipatorList}}" a:for-item="item"> <view class="peopleList" a:for="{{!!scheduleItem ? showContactPeople : $data.showParticipatorList}}" a:for-item="item">
<view class="headImg"> <head-img className="headImg" numLength="{{1}}" item="{{item}}"></head-img>
<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>
<view class="info"> <view class="info">
<text class="name">{{item.username}}</text> <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> <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({ ...@@ -19,9 +19,11 @@ create.Page({
contactPeople: {}, contactPeople: {},
showContactPeople: [], showContactPeople: [],
originUsersId: [], originUsersId: [],
confirmAttendance: null
}, },
onLoad(event) { onLoad(event) {
this.setData({ this.setData({
confirmAttendance: event.confirmAttendance,
isIPX: checkFullScren(), isIPX: checkFullScren(),
scheduleItem: event.scheduleItem, scheduleItem: event.scheduleItem,
organizer: event.organizer, organizer: event.organizer,
...@@ -67,7 +69,7 @@ create.Page({ ...@@ -67,7 +69,7 @@ create.Page({
// 发起人 可选 必选 // 发起人 可选 必选
else if (this.data.currentPeople === this.data.organizer) { else if (this.data.currentPeople === this.data.organizer) {
participatorList[getApp().globalData.userid] = { 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": { "usingComponents": {
"head-img": "../../components/head-img/head-img",
"popup": "../../components/popup/index", "popup": "../../components/popup/index",
"list": "../../components/list/list", "list": "../../components/list/list",
"toast": "../../components/toast/toast", "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