Commit 91344048 by xiexiaoqin

fix:出现蒙层时阻止预览事件

parent 7f8cf2bb
......@@ -39,9 +39,9 @@ create.Component({
}
},
didUnmount() {},
didUnmount() { },
methods: {
getDate: throttle(function(e) {
getDate: throttle(function (e) {
let data = {
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
......@@ -77,7 +77,7 @@ create.Component({
);
});
}, 1000),
nextDetail: throttle(function(e) {
nextDetail: throttle(function (e) {
let item = e.target.dataset.item;
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(
......@@ -180,8 +180,8 @@ create.Component({
item.recurrenceModel.startTime;
let endTime = new Date(
getFormatDate(item2, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime
" " +
item.recurrenceModel.startTime
);
endTime.setMinutes(
endTime.getMinutes() + item.recurrenceModel.duration
......@@ -216,7 +216,7 @@ create.Component({
);
}
});
scheduleMap.forEach(function(value, key, map) {
scheduleMap.forEach(function (value, key, map) {
scheduleList.push(value);
});
return scheduleList;
......@@ -298,9 +298,9 @@ create.Component({
thisDayEndTime: AllScheduleList[y].endTime.slice(11, 16),
isBeOverdue:
new Date().getTime() >
new Date(
AllScheduleList[y].endTime.replace(/-/g, "/")
).getTime()
new Date(
AllScheduleList[y].endTime.replace(/-/g, "/")
).getTime()
? true
: false
});
......@@ -335,9 +335,9 @@ create.Component({
duration: count + 1,
isBeOverdue:
new Date().getTime() >
new Date(
AllScheduleList[y].endTime.replace(/-/g, "/")
).getTime()
new Date(
AllScheduleList[y].endTime.replace(/-/g, "/")
).getTime()
? true
: false
});
......@@ -354,7 +354,7 @@ create.Component({
value: year
});
let thisDay = new Date().toLocaleDateString();
DateMap.forEach(function(value, key, map) {
DateMap.forEach(function (value, key, map) {
if (
new Date(key).getDay() === 0 &&
that.count(
......@@ -380,7 +380,7 @@ create.Component({
type: "week",
value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${
rangeMonth2 == rangeMonth1 ? "" : rangeMonth2 + 1 + "月"
}${rangeDay2}日`,
}${rangeDay2}日`,
dayStr: key
});
}
......@@ -396,7 +396,7 @@ create.Component({
type: "week",
value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${
rangeMonth2 == rangeMonth1 ? "" : rangeMonth2 + 1 + "月"
}${rangeDay2}日`,
}${rangeDay2}日`,
dayStr: key
});
}
......@@ -418,7 +418,7 @@ create.Component({
type: "week",
value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${
rangeMonth2 == rangeMonth1 ? "" : rangeMonth2 + 1 + "月"
}${rangeDay2}日`,
}${rangeDay2}日`,
dayStr: key
});
}
......
......@@ -65,7 +65,7 @@
}
.file-box-mask {
background: rgba(10, 10, 10, 0.04);
background: rgba(10, 10, 10, 0.08);
position: relative;
}
......
<view class="{{fileView.id == logId ? 'file-box-mask' : ''}}" data-logId="{{fileView.id}}" catchLongTap="showOperate" catchTap="test">
<view class="desc" meeta:if='{{fileView.description}}'>
<view class="{{fileView.id == logId ? 'file-box-mask' : ''}}" data-logId="{{fileView.id}}" catchLongTap="showOperate" catchTouchStart="touchStart" catchTouchEnd="touchEnd">
<view class="desc" meeta:if='{{fileView.description}}'
{{fileView.description}}
</view>
<view class="task-list" a:if="{{fileView.fileInfos && fileView.fileInfos.length > 0}}">
......
......@@ -30,6 +30,9 @@ create.Component({
},
//预览文件
preview(e) {
if (this.store.data.logId) {
return;
}
const file = e.target.dataset.file
const data = {
ddUserId: getApp().globalData.userid,
......@@ -55,6 +58,12 @@ create.Component({
this.update();
}
},
touchStart(e) {
console.log(e)
},
touchEnd(e) {
console.log(e)
},
//删除动态下的文件和描述
deleteFile(e) {
dd.confirm({
......@@ -72,14 +81,14 @@ create.Component({
//去编辑文件页面
updateFile(e) {
this.store.data.logId = '';
const { fileInfos, description } = e.target.dataset.fileView;
const { fileInfos, description, id } = e.target.dataset.fileView;
this.store.data.oldFileInfos = JSON.stringify(fileInfos);
this.store.data.oldDescription = description;
this.store.data.fileInfos = fileInfos;
this.store.data.description = e.target.dataset.fileView.description;
this.update();
setTimeout(() => {
dd.navigateTo({ url: `./../uploadFile/uploadFile?action=update` })
dd.navigateTo({ url: `./../uploadFile/uploadFile?id=${id}` })
})
}
},
......
......@@ -27,30 +27,14 @@ create.Component({
}
this.store.data.currentTask.taskStatus = status;
this.update();
// this.props.onCheckChange({ status, id });
},
// inputChange(e) {
// const value = e.detail.value;
// if (value) {
// this.store.data.currentTask.taskInfos = { taskTitle: value };
// this.update();
// }
// },
inputChange: debounce(function (e) {
const value = e.detail.value;
if (value) {
this.store.data.currentTask.taskInfos = { taskTitle: value };
this.update();
//更新要调用更新接口
// if (this.props.action === 'update') {
// if (value !== this.props.oldTask.taskInfos.taskTitle) {
// this.store.data.isEditTaskTitle = true;
// // this.props.onInputChange(value);
// }
// }
}
}, 1000),
}, 100),
handleExcutorChange(e) {
//执行人页面删除执行人
if (e.target.dataset.acceptorId) {
......
......@@ -158,7 +158,6 @@ create.Page({
participatorUserId.push(value.participator.userId)
originUsers.push(value.participator)
if (value.userId === getApp().globalData.userid) {
debugger
this.setData({
aheadTimes: !!value.aheadList ? value.aheadList : [-1]
})
......@@ -1152,7 +1151,6 @@ create.Page({
const newAffairList = affairList.map(it => {
if (it.createTime) {
it.createTime = getCreateShowTime(it.createTime);
console.log(it.createTime)
}
if (it.category == '2' && it.fileView) {
if (it.fileView.creatorInfo) {
......
import create from 'dd-store'
import { saveFileInfo, addSchedule, uploadPermissions, previewPermissions } from '../../api/request.js'
import { saveFileInfo, addSchedule, uploadPermissions, previewPermissions, updateMeetingTask } from '../../api/request.js'
import { throttle, debounce } from './../../utils/utils.js'
import pageStore from '../meetingDetail/store';
......@@ -8,16 +8,16 @@ create.Page({
data: {
fileInfos: null, //store
description: '',//store
action: ''
id: ''
},
onLoad(query) {
dd.setNavigationBar({
title: '添加会议文件'
});
// 编辑的时候传action=update
if (query && query.action == 'update') {
// 编辑的时候传了文件ID
if (query && query.id) {
this.setData({
action: query.action
id: query.id
});
dd.setNavigationBar({
title: '编辑会议文件'
......@@ -26,20 +26,14 @@ create.Page({
},
onShow() {
},
// inputDes(event) {
// let value = event.detail.value
// this.setData({
// description: value
// })
// },
inputChange: debounce(function (e) {
const value = e.detail.value;
if (value) {
this.store.data.description = value;
this.update();
}
}, 1000),
}, 100),
//添加会议文件
add() {
const data = {
ddUserId: getApp().globalData.userid,
......@@ -64,7 +58,7 @@ create.Page({
})
},
// 保存的接口
// 保存
saveUpload: throttle(function () {
const { fileInfos, oldFileInfos, description, oldDescription } = this.store.data;
......@@ -76,7 +70,7 @@ create.Page({
}
//如果实际没有修改,不生成记录
if (this.data.action == 'update') {
if (this.data.id) {
if (oldFileInfos == JSON.stringify(fileInfos) && description == oldDescription) {
return dd.navigateBack()
}
......@@ -96,14 +90,23 @@ create.Page({
logType: 'schedule_accessory_add'
}
if (this.data.action == 'update') {
//编辑文件
if (this.data.id) {
data.logType = 'schedule_accessory_modify';
data.id = this.data.id
updateMeetingTask(data).then(res => {
this.store.data.isNeedReloadList = true;
this.update();
dd.navigateBack()
})
}
//新增文件
else {
saveFileInfo(data).then(res => {
this.store.data.isNeedReloadList = true;
this.update();
dd.navigateBack()
})
}
saveFileInfo(data).then(res => {
this.store.data.isNeedReloadList = true;
this.update();
dd.navigateBack()
})
}, 1000)
});
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