Commit 69ab5f95 by fengzhaoyu

Merge branch 'release/2.0.0' of http://gitlab.roboming.com/fengzhaoyu/schedule into release/2.0.0

parents 3eec677b e635b0f0
......@@ -16,8 +16,9 @@ export default function xFetch({ url, method, data, type }) {
dd.httpRequest({
headers: {
"Content-Type": "application/json; charset=utf-8",
timeZone: timeZone[`timeZone${offSet}`],
Authorization: `Bearer ${getApp().globalData.token}`
'timeZone': timeZone[`timeZone${offSet}`],
'Authorization': `Bearer ${getApp().globalData.token}`,
'Accept-Language': 'zh'
},
url: url,
method: method,
......
......@@ -226,7 +226,7 @@
<view class="affair-placeholder" a:if="{{!affairList || affairList.length == 0}}">
<template is="affair-placeholder" data="{{title: '添加文件', tip: '我们不开无准备的会,快来上传会议文件吧。'}}"/>
</view>
<view class="loading-more" onTap="loadAffairMore" a:if="{{current < pages}}">点击加载更多动态...</view>
<!--<view class="loading-more" onTap="loadAffairMore" a:if="{{current < pages}}">点击加载更多动态...</view> -->
<popup title="{{popup.title}}" show="{{popup.show}}" mask="true" onClose="closePopup">
<remark a:if="{{popup.type == 'remarkModal'}}" onGetRemark="getRemark"/>
<comment a:if="{{popup.type == 'commentModal'}}" isEdit="{{true}}" onGetComment="getComment"/>
......@@ -235,17 +235,8 @@
<meeting-time-picker a:if="{{'time' === popup.type}}" startTime="{{$data.startTime}}" endTime="{{$data.endTime}}" onComplete="onComplete" isIPX="{{isIPX}}"></meeting-time-picker>
<list a:if="{{popup.type=='aheadTime'}}" onClose="closePopup" multiple="{{true}}" onCompelete="handleAheadTimeSave" complete="{{true}}" dataComList="{{aheadTime.aheadTimeList}}" onComSelectList="selectComList" comSelectList="{{aheadTime.aheadTimesListId}}" iconType="{{aheadTime.iconType}}"></list>
</popup>
<!--<popup a:show="{{popupShow}}" title="{{popupTitle}}" show="{{popupShow}}" mask="true" onClose="closePopup"><comment a:if="{{comType == 'commentModal'}}" isEdit="{{true}}" onGetComment="getComment"/></popup> -->
<!-- 分享的弹窗 -->
<!--<popup a:if="{{comShareData.isShow}}" show="{{comShareData.isShow}}" title="{{comShareData.shareTitle}}" mask="{{true}}" onClose="closeShare"><sharelist dataComList="{{comShareData.shareDataList}}" onSelectComHList="closeShare"></sharelist></popup> -->
<!--<popup show="{{show}}" onClose="closePop" title="{{pop.title}}">
<!-- 任务创建弹出框 -->
<!--<task-panel a:if="{{pop.type === 'createTask'}}" onComplete="complete" action='create'/> -->
<!-- 任务修改弹出框 -->
<!--<task-panel a:if="{{pop.type === 'updateTask'}}" action='update' onDeleteTask="deleteTask"/></popup> -->
</view>
</view>
</block>
<!--<view class="loading" a:if="{{loading.details && loading.dynamic}}"><view class="image"></view></view> -->
<template is="loading" a:if="{{loading.details && loading.dynamic}}">
</template>
\ No newline at end of file
......@@ -1192,8 +1192,14 @@ create.Page({
this.update();
} else {
if (index !== -1) {
this.store.data.affairList.splice(index, 1);
const deleteData = this.store.data.affairList.splice(index, 1);
this.update();
// 如果删除的动态包含文件和任务,需要修改
console.log(deleteData)
if (deleteData[0].fileDetailList || deleteData[0].meetingTaskSimpleViewModel) {
this.getTaskAndFiles(this.store.data.affairList);
}
}
}
}
......
import { getCreateShowTime } from '../../utils/utils';
import { getCreateShowTime, dealRepeatModal } from '../../utils/utils';
import { updateMeetingTask } from '../../api/request';
class Store {
data = {
......@@ -20,16 +20,15 @@ class Store {
relatedAppPlatform: null
}
changeStatus(meetingId, taskModifyModel, callBack) {
const data = {
meetingId: meetingId,
platform: 'dingTalk',
taskModifyModel
};
// 提前改
// 修改详情列表
const index = this.data.affairList.findIndex(it => it.commentId === taskModifyModel.commentId);
if (index !== -1) {
// 修改详情列表数据
const changeData = this.data.affairList[index];
changeData.meetingTaskSimpleViewModel.processState = taskModifyModel.processState;
changeData.updateTime = getCreateShowTime(new Date());
......@@ -37,39 +36,23 @@ class Store {
this.data.affairList.splice(index, 1);
this.data.affairList.unshift(changeData);
// 修改任务列表页面数据
this.data.tasks[index].processState = taskModifyModel.processState;
this.data.tasks[index].updateTime = getCreateShowTime(new Date());
this.update();
// 页面定位到最上面
if (callBack) {
callBack()
}
}
updateMeetingTask(data).then(res => {
if (res.data.code === 0) {
// const index = this.data.affairList.findIndex(it => it.commentId === taskModifyModel.commentId);
// if (index !== -1) {
// // 修改详情列表数据
// const changeData = this.data.affairList[index];
// changeData.meetingTaskSimpleViewModel.processState = taskModifyModel.processState;
// changeData.updateTime = getCreateShowTime(new Date());
// this.data.affairList.splice(index, 1);
// this.data.affairList.unshift(changeData);
// // 修改任务列表页面数据
// this.data.tasks[index].processState = taskModifyModel.processState;
// this.data.tasks[index].updateTime = getCreateShowTime(new Date());
// this.update();
// if (callBack) {
// callBack()
// }
// }
// 修改任务列表页面
const tasksIndex = this.data.tasks.findIndex(it => it.commentId === taskModifyModel.commentId);
if (tasksIndex !== -1) {
this.data.tasks[tasksIndex].processState = taskModifyModel.processState;
this.data.tasks[tasksIndex].updateTime = getCreateShowTime(new Date());
}
updateMeetingTask(data).then(res => {
if (res.data.code !== 0) {
dd.alert('操作失败,请重试')
}
});
}
......
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