Commit 684add59 by xiexiaoqin

feat: 新建创建任务页面

parent 14f73c6d
...@@ -25,3 +25,32 @@ view { ...@@ -25,3 +25,32 @@ view {
.gray { .gray {
background: rgba(10, 10, 10, 0.2)!important; background: rgba(10, 10, 10, 0.2)!important;
} }
/* 底部长条的红色按钮 */
.save {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 32rpx;
background: #fff;
position: fixed;
}
.button {
width: 100%;
height: 72rpx;
background: #EA0C28;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 72rpx;
}
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
\ No newline at end of file
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
"pages/uploadFile/uploadFile", "pages/uploadFile/uploadFile",
"pages/participantsDetail/participantsDetail", "pages/participantsDetail/participantsDetail",
"pages/applicationDetails/applicationDetails", "pages/applicationDetails/applicationDetails",
"pages/attendeeList/attendeeList" "pages/attendeeList/attendeeList",
"pages/createTask/createTask"
], ],
"window": { "window": {
"allowsBounceVertical": "YES" "allowsBounceVertical": "YES"
......
<import src="../../template/avater/index.axml"/> <import src="../../template/avater/index.axml"/>
<block a:for="{{$data.participatorList}}"> <block a:for="{{$data.participatorList}}">
<view class="column" data-item="{{item}}" onTap="radioChange"> <view class="column" data-item="{{item}}" onTap="radioChange">
<template is="radio" data="{{status: item.userId == currentTask.acceptorId, item: item}}"/> <template is="radio" data="{{status: item.userId == currentTask.excutorId, item: item}}"/>
<template is="avater" data="{{item}}"/> <template is="avater" data="{{item: {...item, name: item.username}}}"/>
<view class="name">{{item.username}}</view> <view class="name">{{item.username}}</view>
</view> </view>
</block> </block>
......
...@@ -14,8 +14,13 @@ create.Page({ ...@@ -14,8 +14,13 @@ create.Page({
}, },
radioChange(e) { radioChange(e) {
const item = e.target.dataset.item; const item = e.target.dataset.item;
this.store.data.currentTask.acceptorInfo = item; this.store.data.currentTask.excutor = {
this.store.data.currentTask.acceptorId = item.userId; ...item,
name: item.username,
id: item.userId,
avatar: item.headUrl
};
this.store.data.currentTask.excutorId = item.userId;
this.update(); this.update();
dd.navigateBack(); dd.navigateBack();
} }
......
...@@ -209,29 +209,6 @@ input { ...@@ -209,29 +209,6 @@ input {
color: #BBBEC5; color: #BBBEC5;
} }
.save {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 32rpx;
background: #fff;
position: fixed;
bottom: 0;
}
.button {
font-family: PingFangSC-Regular;
width: 686rpx;
height: 72rpx;
background: #EA0C28;
border-radius: 48rpx;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 72rpx;
}
.noValueIcon { .noValueIcon {
color: rgba(216, 216, 216, 1)!important; color: rgba(216, 216, 216, 1)!important;
} }
...@@ -262,12 +239,6 @@ input { ...@@ -262,12 +239,6 @@ input {
color: rgba(10, 10, 10, 0.4) color: rgba(10, 10, 10, 0.4)
} }
.tabBarBottom {
height: 68rpx;
width: 100%;
background: #fff;
}
.iconicon_description1 { .iconicon_description1 {
color: rgba(10, 10, 10, 0.4)!important; color: rgba(10, 10, 10, 0.4)!important;
} }
......
@import "../../template/avater/index.acss";
page {
background: #fff;
overflow: hidden;
}
.task-column {
box-sizing: border-box;
padding: 0 42rpx 0 32rpx;
width: 100%;
display: flex;
align-items: center;
}
.edit-column {
color: rgba(27, 38, 61, 1);
margin: 46rpx 0;
height: 84rpx;
}
.task-time {
margin-top: 46rpx;
}
.edit-column input {
flex: 1;
margin-left: 8rpx;
font-size: 40rpx;
caret-color: #3070F2;
padding: 0;
height: 84rpx;
}
.participator-top {
height: 62rpx;
line-height: 62rpx;
}
.icon {
color: #1B263D;
font-size: 34rpx;
}
.participator-title {
color: rgba(25, 31, 37, 1);
font-size: 34rpx;
flex: 1;
margin-left: 26rpx;
}
.participator-bottom {
padding: 14rpx 42rpx 14rpx 96rpx;
}
.people {
text-align: center;
width: 80rpx;
margin-right: 16rpx;
}
.people>.avater, .fake-avater {
width: 80rpx;
height: 80rpx;
line-height: 80rpx;
position: relative;
}
.fake-name {
height: 48rpx;
}
.name {
font-size: 24rpx;
line-height: 40rpx;
color: rgba(25, 31, 37, 0.56);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
height: 40rpx;
}
.error {
color: red;
font-size: 24rpx;
flex: 1;
}
.edit-column>.checkbox {
width: 32rpx!important;
height: 32rpx!important;
line-height: 32rpx!important;
}
.btn-disabled {
opacity: 0.4;
}
\ No newline at end of file
<import src="../../template/avater/index.axml"/>
<view class="task-column edit-column">
<input onInput="inputChange" value="{{currentTask.title}}" placeholder="请输入任务标题"/>
</view>
<view>
<view class="task-column participator-top" data-excutorId="{{currentTask.excutorId}}" onTap="handleExcutorChange">
<text class="iconicon_attender iconfont icon"></text>
<text class="participator-title">{{currentTask.excutorId ? '执行人' : '设置执行人'}}</text>
<text class="iconright iconfont icon"></text>
</view>
<view class="participator-bottom" a:if="{{currentTask.excutorId}}">
<view class="people" data-excutorId="{{currentTask.excutorId}}" onTap="handleExcutorChange">
<template is="avater" data="{{item: currentTask.excutor}}"/>
<view class="name">{{currentTask.excutor.name}}</view>
</view>
</view>
</view>
<view class="task-column participator-top task-time" data-excutorId="{{currentTask.endTime}}" onTap="handleOpenTime">
<text class="iconicon_conflict iconfont icon"></text>
<text class="participator-title">{{currentTask.endTime ? `${currentTask.endTime} 截止`: '设置截止时间'}}</text>
</view>
<view class="save" onTap="addTask">
<view class="button {{limitClick ? 'gray' : ''}}">
立即创建
</view>
<view class="tabBarBottom" a:if="{{isIPX}}">
</view>
</view>
<popup a:if="{{show}}" title="设置截止时间" show="{{show}}" mask="true" onClose="closePopup">
<meeting-time-picker onComplete="onComplete" startTime="{{currentTask.startTime}}" endTime="{{currentTask.endTime}}" isIPX="{{isIPX}}"/>
</popup>
\ No newline at end of file
import create from 'dd-store';
import pageStore from '../meetingDetail/store';
import { debounce } from '../../utils/utils';
import { checkFullScren } from "../../utils/checkFullScren";
import { updateMeetingTask } from '../../api/request';
create.Page({
store: pageStore,
data: {
currentTask: {},
show: false,
isIPX: false,
limitClick: false
},
onLoad(query) {
this.setData({
meetingId: query.meetingId,
isIPX: checkFullScren()
})
},
inputChange: debounce(function (e) {
const value = e.detail.value;
this.store.data.currentTask.title = value;
this.update();
}, 100),
handleExcutorChange(e) {
//执行人页面删除执行人
if (e.target.dataset.excutorId) {
dd.navigateTo({ url: `/pages/excutorList/excutorList` })
}
//参会人列表页面选择参会人
else {
dd.navigateTo({ url: `/pages/attendeeList/attendeeList` })
}
},
handleOpenTime() {
this.setData({
show: true
})
},
closePopup() {
this.setData({
show: false
})
},
onComplete(event) {
this.store.data.currentTask.startTime = `${event.startTime}:00`;
this.store.data.currentTask.endTime = `${event.endTime}:00`;
this.update();
this.closePopup();
},
addTask() {
if (this.data.limitClick) {
return
}
this.setData({ limitClick: true });
updateMeetingTask({
meetingId: this.data.meetingId,
platform: 'dingTalk',
taskCreateModel: {
endTime: this.store.data.currentTask.endTime.replace(/\//g, '-'),
title: this.store.data.currentTask.title,
executorList: [this.store.data.currentTask.excutor]
}
}).then(res => {
if (res.data.code == 0) {
//重置
this.store.data.currentTask = {};
this.update();
// 修改动态列表
dd.navigateBack();
}
this.setData({ limitClick: false });
})
}
});
{
"window": {
"defaultTitle": "创建任务"
},
"usingComponents": {
"popup": "../../components/popup/index",
"meeting-time-picker": "../../components/meetingTimePicker/meetingTimePicker"
}
}
\ No newline at end of file
<import src="../../template/avater/index.axml"/> <import src="../../template/avater/index.axml"/>
<view class="column" a:if="{{currentTask.acceptorId}}"> <view class="column" a:if="{{currentTask.excutorId}}">
<template is="avater" data="{{item: currentTask.acceptorInfo}}"/> <template is="avater" data="{{item: currentTask.excutor}}"/>
<view class="name">{{currentTask.acceptorInfo.username}} <view class="name">{{currentTask.excutor.name}}
<text class="iconfont iconicon_close" onTap="deleteExcutor"></text> <text class="iconfont iconicon_close" onTap="deleteExcutor"></text>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -15,8 +15,8 @@ create.Page({ ...@@ -15,8 +15,8 @@ create.Page({
cancelButtonText: '取消', cancelButtonText: '取消',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
this.store.data.currentTask.acceptorInfo = null; this.store.data.currentTask.excutor = null;
this.store.data.currentTask.acceptorId = ''; this.store.data.currentTask.excutorId = '';
this.update(); this.update();
dd.navigateBack(); dd.navigateBack();
} }
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
</view> </view>
</view> </view>
<view class="footerBottom"> <view class="footerBottom">
<view onTap="showCreateTask" data-pop="{{title: '创建任务', type: 'createTask'}}"> <view onTap="goCreateTask">
<text class="iconfont iconicon_task1"></text>任务 <text class="iconfont iconicon_task1"></text>任务
</view> </view>
<!--<view onTap="addMeetingFile"><text class="iconfont iconicon_data"></text>文件</view> --> <!--<view onTap="addMeetingFile"><text class="iconfont iconicon_data"></text>文件</view> -->
......
...@@ -1897,6 +1897,9 @@ create.Page({ ...@@ -1897,6 +1897,9 @@ create.Page({
} }
}) })
} }
},
goCreateTask(e) {
dd.navigateTo({ url: '/pages/createTask/createTask?meetingId=' + this.store.data.scheduleId })
} }
}); });
...@@ -2,11 +2,10 @@ class Store { ...@@ -2,11 +2,10 @@ class Store {
data = { data = {
affairList: [], affairList: [],
currentTask: { currentTask: {
id: '', endTime: '',
acceptorInfo: null, excutor: null,
acceptorId: '', title: '',
taskStatus: '', excutorId: ''
taskInfos: null
}, },
fileInfos: null, fileInfos: null,
description: '', description: '',
......
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