Commit d7eefd4d by fengzhaoyu

1

parents 119407a4 de8acb25
......@@ -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.logId == logId ? 'file-box-mask' : ''}}" data-logId="{{fileView.logId}}" 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">
<view class="desc" a:if='{{fileView.description}}'>
{{fileView.description}}
</view>
<view class="task-list" a:if="{{fileView.fileInfos && fileView.fileInfos.length > 0}}">
......@@ -12,7 +12,7 @@
<view a:if="{{isCanDelete}}" class="iconfont iconicon_noAgreed1" catchTap="removeFile" data-id="{{item.fileId}}"></view>
</view>
</view>
<view class="btns-pop" a:if="{{fileView.logId == logId && (organizer === currentPeople ? true : currentPeople === fileView.creatorId)}}">
<view class="btns-pop" a:if="{{fileView.id == logId && (organizer === currentPeople ? true : currentPeople === fileView.creatorId)}}">
<view class="edit" catchTap="updateFile" data-fileView="{{fileView}}">
编辑
</view>
......
......@@ -19,17 +19,19 @@ create.Component({
},
didUnmount() { },
methods: {
test(e) {
console.log(e)
},
//移除文件
removeFile(e) {
this.store.data.logId = '';
const fileInfos = this.store.data.fileInfos.filter(it => it.fileId !== e.target.dataset.id);
this.store.data.fileInfos = fileInfos;
this.update();
},
//预览文件
preview(e) {
//如果出现编辑蒙层时阻止预览的点击事件
if (this.store.data.logId) {
return;
}
const file = e.target.dataset.file
const data = {
ddUserId: getApp().globalData.userid,
......@@ -72,14 +74,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}` })
})
}
},
......
......@@ -66,6 +66,7 @@ function getPostTimeByDate(date) {
}
function getPickerValue(date) {
const res = getYMDWHMIN(date);
return [timeData.indexOf(res.y + "年" + res.m + "月" + res.d + "日 " + res.w), timeHour.indexOf(res.h), timeMin.indexOf(res.min)];
}
// 将周几转换为今天,明天, 昨天
......@@ -238,7 +239,10 @@ Component({
},
onChange(e) {
const pickValue = e.detail.value;
console.log(pickValue)
//开始时间的分钟数必须是5的倍数才对的上
if (pickValue.includes(-1)) {
pickValue[pickValue.indexOf(-1)] = 0
}
if (this.data.currentTab === 'start') {
const startDate = getDateByPickValue(pickValue);
this.changeStart(startDate, pickValue);
......
......@@ -74,8 +74,9 @@
}
.edit-column>.checkbox {
width: 32rpx;
height: 32rpx;
width: 32rpx!important;
height: 32rpx!important;
line-height: 32rpx!important;
}
.margin-bottom {
......
import create from 'dd-store';
import pageStore from '../../pages/meetingDetail/store';
import { debounce } from '../../utils/utils';
import { debounce, throttle } from '../../utils/utils';
create.Component({
store: pageStore,
mixins: [],
......@@ -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) {
......@@ -62,13 +46,15 @@ create.Component({
}
},
//新建才有完成按钮
complete() {
const { currentTask } = this.store.data;
if (!currentTask.taskInfos) {
return
complete: throttle(
function () {
const { currentTask } = this.store.data;
if (!currentTask.taskInfos) {
return
}
this.props.onComplete()
}
this.props.onComplete()
},
, 1000),
//删除任务
handleDelete() {
dd.confirm({
......
......@@ -515,12 +515,12 @@ input {
.affair-placeholder {
border-top: 1px solid rgba(239, 242, 245, 1);
padding: 168rpx 72rpx;
padding: 168rpx 72rpx 0 72rpx;
text-align: center;
}
.affair-placeholder image {
width: 400rpx;
width: 280rpx;
}
.affair-placeholder .affair-placeholder-text {
......
......@@ -214,7 +214,7 @@
<view a:if="{{item.content}}" class='simple-column'>{{item.content}}{{item.createTime}}</view>
</block>
<view class="affair-placeholder" a:if="{{affairList.length <= 1}}">
<image mode="scaleToFill" src="../../assests/noDynamic.png"/>
<image mode="widthFix" src="../../assests/noDynamic.png"/>
<view class="affair-placeholder-text">我们不开无准备的会,快来上传会议文件吧。</view>
<view onTap="addMeetingFile" class="affair-placeholder-button">添加会议文件</view>
</view>
......
......@@ -1158,7 +1158,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)
});
<template name="deleteBtn">
<view class="delete-task-wrap">
<view class="delete-task" onTap="handleDelete">
<text class="iconfont iconicon_noAgreed1"></text>
<text class="iconfont iconicon_delete"></text>
{{title}}
</view>
</view>
......
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