Commit e10bad17 by xiexiaoqin

fix: task

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