Commit e10bad17 by xiexiaoqin

fix: task

parent 01758447
......@@ -81,4 +81,8 @@
.margin-bottom {
margin-bottom: 300rpx;
}
.btn-disabled {
opacity: 0.4;
}
\ No newline at end of file
<import src="../../template/avater/index.axml"/>
<import src="../../template/deleteBtn/index.axml"/>
<import src="../../template/checkbox/index.axml"/>
<view a:if="{{action == 'create'}}" class="picker-complete" onTap='complete'>完成</view>
<view a:if="{{action == 'create'}}" class="picker-complete {{disabled ? 'btn-disabled' : ''}}" onTap='complete'>完成</view>
<view class="task-column edit-column">
<template a:if="{{action == 'update'}}" is="checkbox" data="{{status: currentTask.taskStatus, id:currentTask.id}}"></template>
<input onInput="inputChange" value="{{currentTask.taskInfos.taskTitle}}" placeholder="请输入任务标题"/>
</view>
<view class="margin-bottom">
<view class="task-column participator-top">
<view class="task-column participator-top" data-acceptorId="{{currentTask.acceptorId}}" onTap="handleExcutorChange">
<text class="iconicon_attender iconfont icon"></text>
<text class="participator-title">{{currentTask.acceptorInfo ? '执行人' : '设置执行人'}}</text>
<text class="iconright iconfont icon" data-acceptorId="{{currentTask.acceptorId}}" onTap="handleExcutorChange"></text>
<text class="iconright iconfont icon"</text>
</view>
<view class="participator-bottom" a:if="{{currentTask.acceptorInfo}}">
<view class="people">
<view class="people" data-acceptorId="{{currentTask.acceptorId}}" onTap="handleExcutorChange">
<template is="avater" data="{{item: currentTask.acceptorInfo}}"/>
<view class="name">{{currentTask.acceptorInfo.username}}</view>
</view>
......
......@@ -5,7 +5,8 @@ create.Component({
store: pageStore,
mixins: [],
data: {
currentTask: null //store
currentTask: null, //store
disabled: true
},
props: {
action: ''
......@@ -30,10 +31,11 @@ create.Component({
},
inputChange: debounce(function (e) {
const value = e.detail.value;
if (value) {
this.store.data.currentTask.taskInfos = { taskTitle: value };
this.update();
}
this.setData({
disabled: !value
})
this.store.data.currentTask.taskInfos = { taskTitle: value };
this.update();
}, 100),
handleExcutorChange(e) {
//执行人页面删除执行人
......@@ -49,7 +51,7 @@ create.Component({
complete: throttle(
function () {
const { currentTask } = this.store.data;
if (!currentTask.taskInfos) {
if (this.data.disabled) {
return
}
this.props.onComplete()
......
<import src="../../template/avater/index.axml"/>
<view class="column" a:for="{{$data.participatorList}}">
<template is="radio" data="{{status: item.userId == currentTask.acceptorId, item: item}}"/>
<template is="avater" data="{{item}}"/>
<view class="name">{{item.username}}</view>
</view>
<block a:for="{{$data.participatorList}}">
<view class="column" data-item="{{item}}" onTap="radioChange">
<template is="radio" data="{{status: item.userId == currentTask.acceptorId, item: item}}"/>
<template is="avater" data="{{item}}"/>
<view class="name">{{item.username}}</view>
</view>
</block>
<!-- radio模板 {status: status, userId: userId}-->
<template name='radio'>
<view class="radio {{status ? 'radio-checked' : 'radio-uncheck'}}" data-item="{{item}}" onTap="radioChange">
<view class="radio {{status ? 'radio-checked' : 'radio-uncheck'}}">
<text a:if="{{status}}" class="iconfont iconicon_ok"></text>
</view>
</template>
\ No newline at end of file
<import src="../../template/avater/index.axml"/>
<view class="column" a:if="{{item: currentTask.acceptorInfo}}">
<view class="column" a:if="{{currentTask.acceptorId}}">
<template is="avater" data="{{item: currentTask.acceptorInfo}}"/>
<view class="name">{{currentTask.acceptorInfo.username}}
<text class="iconfont iconicon_close" onTap="deleteExcutor"></text>
......
......@@ -3,13 +3,9 @@ import pageStore from '../meetingDetail/store';
create.Page({
store: pageStore,
data: {
// action: "",
currentTask: '',//store
currentTask: ''
},
onLoad(query) {
// this.setData({
// action: query.action
// })
onLoad() {
},
deleteExcutor() {
dd.confirm({
......@@ -21,10 +17,6 @@ create.Page({
if (res.confirm) {
this.store.data.currentTask.acceptorInfo = null;
this.store.data.currentTask.acceptorId = '';
// //更新保存添加标示
// if (this.data.action == 'update') {
// this.store.data.isDeleteAcceptorInfo = true;
// }
this.update();
dd.navigateBack();
}
......
......@@ -1268,7 +1268,7 @@ create.Page({
this.updateTaskExcutor();
}
//修改任务标题
if (currentTask.taskInfos.taskTitle !== oldTask.taskInfos.taskTitle) {
if (currentTask.taskInfos.taskTitle && currentTask.taskInfos.taskTitle !== oldTask.taskInfos.taskTitle) {
this.editTaskTitle();
}
//修改任务状态
......
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