Commit dbb96ef0 by liang ce

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

parents 309be951 7dea8f44
......@@ -4,6 +4,7 @@
overflow: hidden;
box-sizing: border-box;
padding-bottom: 120rpx;
height: 100vh;
}
.dynamicList {
......@@ -156,4 +157,7 @@
height: 100%;
overflow-y: hidden;
position: fixed;
top: 0;
left: 0;
bottom: 0;
}
\ No newline at end of file
<import src="../../template/affairBlank/index.axml"/>
<view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe">
<view a:if="{{dynamicList.length !== 0}}" scroll-y="{{true}}" class="dynamicBox" onScrollToLower="onScrollToLower">
<view class="{{isStopBodyScroll ? 'scroll-lock' : ''}}" onTap="closeSwipe" onTouchStart="closeSwipe" onTouchMove="closeSwipe" onTouchEnd="closeSwipe">
<block a:if="{{!loading}}">
<scroll-view a:if="{{dynamicList.length > 0}}" scroll-y="{{true}}" class="dynamicBox" onScrollToLower="onScrollToLower">
<view class="dynamicList">
<swipe onSetBodyDisableScroll="setBodyDisableScroll" rightWidth="{{ 78 }}" leftWidth="{{ 0 }}" a:for="{{dynamicList}}" class="dynamicContent">
<view class="dynamicDetails">
......@@ -9,7 +10,7 @@
{{item.title}}
</view>
<view>
<text a:if="{{item.traceTime !== '1970-03-01 00:00:00'}}" class="iconfont iconicon_top1"></text>
<text a:if="{{item.traceTime !== traceTime}}" class="iconfont iconicon_top1"></text>
</view>
</view>
<block a:for="{{item.meetingLogDataList.slice(0,2)}}" a:for-item="dynamicItem">
......@@ -25,13 +26,17 @@
</view>
</block>
</view>
<view slot="right" class="placedTop" onTap="changeCollection" data-scheduleid="{{item.scheduleId}}" data-index="{{index}}" data-collection="{{item.traceTime === '1970-03-01 00:00:00' ? 'Y':'N'}}">
<text class="iconfont iconicon_top1 {{item.traceTime === '1970-03-01 00:00:00' ? '': 'isTopIcon'}}"></text>
<view slot="right" class="placedTop" onTap="changeCollection" data-scheduleId="{{item.scheduleId}}" data-index="{{index}}" data-collection="{{item.traceTime === traceTime ? 'Y':'N'}}">
<text class="iconfont iconicon_top1 {{item.traceTime === traceTime ? '': 'isTopIcon'}}"></text>
</view>
</swipe>
</view>
</view>
</scroll-view>
<view class="noDate" a:else>
<template is="affair-placeholder" data="{{title: '展示安排的所有动态', tip: '实时同步所有事件的最新动态,便于随时处理工作内容'}}"/>
</view>
</block>
<view class="noDate" a:else>
正在加载
</view>
</view>
\ No newline at end of file
......@@ -9,16 +9,14 @@ import create from 'dd-store';
create.Component({
mixins: [],
data: {
traceTime: '1970-03-01 00:00:00',
isStopBodyScroll: false,
isTop: false,
isTouchMove: false,
touchMoveId: "",
startX: "",
startY: "",
loading: true,
dynamicList: [],
current: 1,
size: 10,
noData: false
pages: 1,
size: 10
},
props: {},
didMount() {
......@@ -34,21 +32,22 @@ create.Component({
},
//点击页面关闭侧滑模块
closeSwipe() {
if (this.$store.closeActiveSwipe) {
this.$store.closeActiveSwipe()
}
},
getPages(current) {
let that = this;
let data = {
current: current,
getDynamicList({
current,
size: 10
};
getDynamicList(data).then(res => {
}).then(res => {
if (!res.data.data) {
return;
}
// 第一层日程数据处理
if (res.data.data) {
let dynamicList = res.data.data.records.map((item, index) => {
const dynamicList = res.data.data.records.map((item, index) => {
// 第二层日程下的动态数据处理
let meetingLogDataList = {};
let meetingLogDataListArr = [];
......@@ -79,82 +78,60 @@ create.Component({
if (itemData.acceptorInfo) {
itemData.acceptorInfo = JSON.parse(itemData.acceptorInfo);
}
meetingLogDataList[item.meetingLogDataList[i].resourceId] =
item.meetingLogDataList[i];
}
}
}
for (let item in meetingLogDataList) {
meetingLogDataListArr.push(meetingLogDataList[item]);
}
return {
scheduleId: item.scheduleId,
title: item.title,
traceTime: item.traceTime,
meetingLogDataList: meetingLogDataListArr
meetingLogDataList: item.meetingLogDataList
};
});
//第一页数据会重新请求需要替换
if (current === 1) {
that.setData({
dynamicList: dynamicList,
current: current,
noData: dynamicList.length === that.data.size ? true : false
this.setData({
dynamicList
});
} else {
let dynamicListData = [...that.data.dynamicList];
dynamicListData.push.apply(dynamicListData, dynamicList);
that.setData({
dynamicList: dynamicListData,
current: current,
noData: dynamicList.length === that.data.size ? true : false
const newDynamicList = this.data.dynamicList.concat(dynamicList);
this.setData({
dynamicList: newDynamicList
});
}
}
this.setData({
current: res.data.data.current,
pages: res.data.data.pages,
loading: false
});
});
},
changeCollection(e) {
let that = this;
let index = e.target.dataset.index;
let data = {
scheduleId: e.target.dataset.scheduleid,
collection: e.target.dataset.collection
};
meetingCollection(data).then(res => {
console.log(res);
if (e.target.dataset.collection === "N") {
that.setData(
{
current: 1
},
() => {
that.getPages(1);
}
);
const { index, scheduleId, collection } = e.target.dataset;
meetingCollection({
scheduleId,
collection
}).then(res => {
//取消置顶
if (collection === "N") {
// 重新获取第一页的数据
this.getPages(1);
} else {
let dynamicList = [...this.data.dynamicList];
let ReplaceItem = dynamicList[index];
ReplaceItem.traceTime = res.data.data;
//置顶
const dynamicList = this.data.dynamicList;
const replaceItem = dynamicList[index];
dynamicList[index].traceTime = res.data.data;
dynamicList.splice(index, 1);
dynamicList.unshift(ReplaceItem);
that.setData({
dynamicList.unshift(replaceItem);
this.setData({
dynamicList: dynamicList
});
}
});
},
previewFileInDingTalk(e) {
let fileMsg = e.currentTarget.dataset.file;
dd.previewFileInDingTalk({
corpId: dd.corpId,
spaceId: fileMsg.spaceId,
fileId: fileMsg.fileId,
fileName: fileMsg.fileName,
fileSize: fileMsg.fileSize,
fileType: fileMsg.fileType
});
},
onScrollToLower() {
if (!this.data.noData) {
if (this.data.current < this.data.pages) {
this.getPages(this.data.current + 1);
}
},
......@@ -193,3 +170,4 @@ create.Component({
}
}
});
......@@ -22,7 +22,6 @@ function range(num, min, max) {
}
create.Component({
mixins: [],
offset: 0,
data: {
wrapperStyle: ''
},
......@@ -114,7 +113,9 @@ create.Component({
this.swipeMove(0);
}
//恢复页面竖向滚动
setTimeout(() => {
this.props.onSetBodyDisableScroll(false);
})
},
open: function (position) {
......
......@@ -82,3 +82,7 @@
.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 {{!currentTask.taskInfos.taskTitle ? '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>
......
......@@ -30,10 +30,8 @@ create.Component({
},
inputChange: debounce(function (e) {
const value = e.detail.value;
if (value) {
this.store.data.currentTask.taskInfos = { taskTitle: value };
this.update();
}
}, 100),
handleExcutorChange(e) {
//执行人页面删除执行人
......@@ -49,7 +47,7 @@ create.Component({
complete: throttle(
function () {
const { currentTask } = this.store.data;
if (!currentTask.taskInfos) {
if (!currentTask.taskInfos.taskTitle) {
return
}
this.props.onComplete()
......
<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="avater" data="{{item}}"/>
<view class="name">{{item.username}}</view>
</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
......@@ -344,6 +344,7 @@ create.Page({
addSchedule(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
dd.navigateBack({
delta: 1
......
<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();
}
......
<view style="position:absolute">
版本176
</view>
<view a:if="{{tabBarIndex === '0'}}">
<!--<<<<<<< Updated upstream<view a:if="{{tabBarIndex === '0'}}">
=======<view style="position:absolute"></view> -->
<view a:if="{{$data.tabBarIndex === '0'}}">
<!-- >>>>>>> Stashed changes -->
<my-dynamic>
</my-dynamic>
</view>
<view a:if="{{tabBarIndex === '1'}}">
<view a:if="{{$data.tabBarIndex === '1'}}">
<my-schedule update="{{$data.indexNeedUpdate}}">
</my-schedule>
</view>
<view class="tabBar">
<view onTap="changeTabBar" data-tabbar='0'>
<view class="tabBarView tabBarView1 {{tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="tabBarView tabBarView1 {{$data.tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_dynamic"></view>
<view>动态</view>
</view>
</view>
<view onTap="changeTabBar" data-tabbar='1'>
<view class="tabBarView tabBarView2 {{tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="tabBarView tabBarView2 {{$data.tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_Calendarbox1">
<text class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
......
......@@ -2,7 +2,6 @@ import { getFormatDate } from "../../utils/utils";
import create from "dd-store";
create.Page({
data: {
tabBarIndex: "0",
$data: null,
iconDay: "",
isLocation: false
......@@ -23,14 +22,13 @@ create.Page({
},
// 修改tabBar
changeTabBar(e) {
let nowtabBarIndex = this.data.tabBarIndex;
this.setData({
tabBarIndex: e.currentTarget.dataset.tabbar
});
let nowtabBarIndex = this.$store.data.tabBarIndex;
this.$store.data.tabBarIndex = e.currentTarget.dataset.tabbar
this.update()
let title = "动态";
switch (e.currentTarget.dataset.tabbar) {
case "0":
title = "动态";
case '0':
title = '动态177';
break;
case "1":
title = "日程";
......
......@@ -6,23 +6,25 @@ page {
.affair-list {
background: #fff;
padding: 48rpx 32rpx 220rpx 32rpx;
margin-top: 16rpx;
}
.affair-list>view {
margin-bottom: 48rpx;
.affair-list-margin-top {
margin-top: 16rpx;
}
.simple-column {
color: rgba(25, 31, 37, 0.4);
font-size: 26rpx;
line-height: 68rpx;
line-height: 1.5;
text-align: center;
margin-bottom: 48rpx;
}
.compose-column {
position: relative;
padding-left: 104rpx;
margin-bottom: 48rpx;
padding-top: 16rpx;
}
.compose-column>.avater {
......@@ -32,7 +34,7 @@ page {
border-radius: 50%;
position: absolute;
left: 0;
top: 0;
top: 16rpx;
}
.compose-column>.task-avater {
......@@ -109,9 +111,11 @@ page {
.hideDetail {
padding: 28rpx 32rpx 24rpx;
border-bottom: 1rpx solid rgba(25, 31, 37, 0.12);
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
box-shadow: 0 0px 4px 1px rgba(0, 0, 0, 0.08);
background: #fff;
z-index: 1;
position: relative;
padding-bottom: 0;
}
.hideTitle {
......@@ -131,8 +135,8 @@ page {
}
.hideIcon {
color: #A7ABB3;
margin-top: 28rpx;
color: #9599A2;
font-size: 64rpx;
text-align: center;
}
......@@ -360,7 +364,6 @@ input {
bottom: 0;
left: 0;
right: 0;
box-shadow: 1rpx 1rpx 4rpx 0 rgba(0, 0, 0, 0.08);
background: rgb(255, 255, 255);
z-index: 100
}
......@@ -481,8 +484,8 @@ input {
color: rgba(216, 216, 216, 1)!important;
}
.footNavTop .devider {
margin: 0;
.footNavTop {
box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.08);
}
.permissions {
......@@ -498,6 +501,7 @@ input {
.affair-list-title {
font-size: 40rpx;
color: rgba(25, 31, 37, 1);
margin-bottom: 64rpx;
}
.permissionContant {
......
......@@ -13,7 +13,7 @@
{{`${$data.startTime.substring(5, 7)}月${$data.startTime.substring(8, 10)}日 ${week} ${$data.startTime.substring(11, 16)}-${$data.endTime.substring(11, 16)}`}}
</text>
</view>
<view class="hideIcon iconfont iconicon_expand" onTap="expand">
<view class="hideIcon iconfont iconicon_slide" onTap="expand">
</view>
</view>
<view class="editeMeeting" a:else>
......@@ -199,8 +199,8 @@
<!-- 动态列表 -->
<import src="../../template/avater/index.axml"/>
<import src="../../template/affairBlank/index.axml"/>
<view class="affair-list" onTap="hideFileOperate">
<view class="affair-list-title">会议动态</view>
<view class="affair-list {{isExpand? '' : 'affair-list-margin-top'}}" onTap="hideFileOperate">
<view a:if="{{!isExpand}}" class="affair-list-title">会议动态</view>
<block a:for="{{affairList}}">
<view a:if="{{item.category == '3' && item.taskViewList && item.taskViewList.length > 0}}" class='compose-column'>
<view class="avater task-avater">
......
......@@ -580,6 +580,7 @@ create.Page({
modifySchedule(Object.assign(data, obj)).then(res => {
if (res.data.code === 0) {
that.$store.data.indexNeedUpdate = true
that.$store.data.tabBarIndex = '1'
that.update()
this.setData({
'conToastData.showToast': true,
......@@ -667,6 +668,7 @@ create.Page({
break
case 'noParticipateStatus':
let data1 = {
scheduleId: this.data.scheduleItem.id,
type: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
......@@ -674,6 +676,9 @@ create.Page({
}
isParticipate(data1).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 0,
'conToastData.showToast': true,
......@@ -684,6 +689,7 @@ create.Page({
break
case 'participateStatus':
let data = {
scheduleId: this.data.scheduleItem.id,
type: event.currentTarget.dataset.item.id,
templateId: this.data.scheduleItem.scheduleTemplateId,
planDate: this.data.scheduleItem.planDate,
......@@ -691,6 +697,9 @@ create.Page({
}
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 1,
'conToastData.showToast': true,
......@@ -1121,6 +1130,9 @@ create.Page({
} else {
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 1,
'conToastData.showToast': true,
......@@ -1145,6 +1157,9 @@ create.Page({
} else {
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: 0,
'conToastData.showToast': true,
......@@ -1170,6 +1185,9 @@ create.Page({
}
isParticipate(data).then(res => {
if (res.data.code === 0) {
this.$store.data.indexNeedUpdate = true
this.$store.data.tabBarIndex = '1'
this.update()
this.setData({
confirmAttendance: -9
})
......@@ -1250,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();
}
//修改任务状态
......
<view class="outLookContact">
<!-- 输入邮箱联系人 -->
<view class="addContact">
<input placeholder="请输入邮箱" onInput="onInput" value="{{value}}" />
<input placeholder="请输入邮箱" onInput="onInput" value="{{value}}" focus="{{false}}" />
<view class="icon iconfont iconicon_add " onTap="addEmail">
</view>
</view>
......
......@@ -9,7 +9,8 @@ class Store {
originUsersId: [],
originalData: null,
indexNeedUpdate: false,
locationSchedule: () => {}
tabBarIndex: '0',
locationSchedule: () => { }
}
}
export default new Store()
\ No newline at end of file
.delete-task-wrap {
display: flex;
justify-content: center;
margin-bottom: 34rpx;
padding-bottom: 34rpx;
}
.delete-task {
......
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