Commit 13f1f2ed by fengzhaoyu

fix: conflict

parents 1f029a45 a0cac04c
......@@ -161,4 +161,8 @@
top: 0;
left: 0;
bottom: 0;
}
.icon-color {
opacity: 0.4;
}
\ No newline at end of file
......@@ -2,19 +2,19 @@
<import src="../../template/loading/loading.axml"/>
<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">
<scroll-view a:if="{{dynamicList.length > 0}}" scroll-y="{{true}}" lower-threshold="{{600}}" class="dynamicBox" onScrollToLower="onScrollToLower">
<view class="dynamicList">
<swipe onSetBodyDisableScroll="setBodyDisableScroll" rightWidth="{{ 78 }}" leftWidth="{{ 0 }}" a:for="{{dynamicList}}" class="dynamicContent">
<swipe onSetBodyDisableScroll="setBodyDisableScroll" rightWidth="{{ 78 }}" leftWidth="{{ 0 }}" a:for="{{dynamicList}}" class="dynamicContent" key="{{item.scheduleId}}">
<view class="dynamicDetails">
<view class="meetingtitle" catchTap="nextPage" data-item="{{item}}">
<view>
{{item.title}}
</view>
<view>
<text a:if="{{item.traceTime !== traceTime}}" class="iconfont iconicon_top1"></text>
<text a:if="{{item.traceTime !== traceTime}}" class="iconfont iconicon_top1 icon-color"></text>
</view>
</view>
<block a:for="{{item.meetingLogDataList.slice(0,2)}}" a:for-item="dynamicItem">
<block a:for="{{item.meetingLogDataList.slice(0,2)}}" a:for-item="dynamicItem" key="{{item.id}}">
<view class="userDynamic">
<view class="dynamicTime" catchTap="nextPage" data-item="{{dynamicItem}}">
<text>{{dynamicItem.content}}</text>
......
......@@ -3,7 +3,7 @@ import {
meetingCollection,
updateMeetingTask
} from "../../api/request";
import { getCreateShowTime, uniqueObject } from "../../utils/utils";
import { getCreateShowTime } from "../../utils/utils";
import create from 'dd-store';
create.Component({
......@@ -14,8 +14,6 @@ create.Component({
dynamicList: [],
current: 1,
pages: 1,
size: 10,
noData: false,
loading: true
},
props: {},
......@@ -36,7 +34,7 @@ create.Component({
this.$store.closeActiveSwipe()
}
},
getPages(current) {
getPages(current, callBack) {
getDynamicList({
current,
size: 10
......@@ -47,12 +45,7 @@ create.Component({
})
return;
}
// 第一层日程数据处理
const dynamicList = res.data.data.records.map((item, index) => {
// 第二层日程下的动态数据处理
let meetingLogDataList = {};
let meetingLogDataListArr = [];
for (let i = 0; i < item.meetingLogDataList.length; i++) {
if (item.meetingLogDataList[i].creatorInfo) {
item.meetingLogDataList[i].creatorInfo = JSON.parse(
......@@ -82,12 +75,7 @@ create.Component({
}
}
}
return {
scheduleId: item.scheduleId,
title: item.title,
traceTime: item.traceTime,
meetingLogDataList: item.meetingLogDataList
};
return item
});
//第一页数据会重新请求需要替换
......@@ -106,6 +94,9 @@ create.Component({
current: res.data.data.current,
pages: res.data.data.pages,
});
if (callBack) {
callBack()
}
});
},
changeCollection(e) {
......@@ -117,7 +108,11 @@ create.Component({
//取消置顶
if (collection === "N") {
// 重新获取第一页的数据
this.getPages(1);
this.getPages(1, () => {
dd.showToast({
content: '取消成功'
})
});
} else {
//置顶
const dynamicList = this.data.dynamicList;
......@@ -127,6 +122,10 @@ create.Component({
dynamicList.unshift(replaceItem);
this.setData({
dynamicList: dynamicList
}, () => {
dd.showToast({
content: '置顶成功'
})
});
}
});
......@@ -137,8 +136,7 @@ create.Component({
}
},
onChangeTaskStatusOnList(e) {
let that = this;
let data = {
const data = {
groupId: e.groupId,
scheduleId: e.scheduleId,
resourceType: "task",
......@@ -152,18 +150,18 @@ create.Component({
if (res.data.code === 0) {
let dataIndex1 = "";
let dataIndex2 = "";
that.data.dynamicList.map((item, index) => {
this.data.dynamicList.forEach((item, index) => {
if (item.scheduleId === e.scheduleId) {
dataIndex1 = index;
item.meetingLogDataList.map((it, index2) => {
item.meetingLogDataList.forEach((it, index2) => {
if (it.meetingLogResource.id == e.id) {
dataIndex2 = index2;
}
});
}
});
let setData = `dynamicList[${dataIndex1}].meetingLogDataList[${dataIndex2}].meetingLogResource.taskStatus`;
that.setData({
const setData = `dynamicList[${dataIndex1}].meetingLogDataList[${dataIndex2}].meetingLogResource.taskStatus`;
this.setData({
[setData]: e.status
});
}
......
......@@ -104,7 +104,7 @@
<text a:else>{{ userMsg.userName.slice(-1) }}</text>
</view>
<view>
{{ userMsg.userName }}
{{ userMsg.userName }}
</view>
</view>
<view class="hasAssociated">
......
......@@ -63,13 +63,14 @@ create.Component({
let now = new Date();
let year = now.getFullYear();
let scheduleList = [];
for (let i = 0; i <= year - 2019; i++) {
scheduleList.push(that.returnScheduleList(2019 + i));
for (let i = -1; i <= year - 2020; i++) {
scheduleList.push(that.returnScheduleList(2020 + i));
}
let scheduleList2 = scheduleList;
// 第一次加载
const finalDate = new Date();
that.setData({
scheduleList: scheduleList,
scheduleList: scheduleList2,
todayStr: finalDate.toLocaleDateString(),
thisYear: year,
maxYear: year
......@@ -78,7 +79,7 @@ create.Component({
);
that.setData({
loading: false
})
});
});
}, 1000),
nextDetail: throttle(function (e) {
......@@ -170,7 +171,6 @@ create.Component({
new Date(time).getTime() < excludeDateList.templateList &&
hasExclude
) {
let startTime =
getFormatDate(time, "yyyyMMdd") +
" " +
......@@ -267,6 +267,7 @@ create.Component({
if (i <= 7 && new Date(year, 0, i).getDay() === 0) {
isFirstWeek = true;
}
` `;
// 是第一个月第一个周一
if (isFirstWeek) {
DateMap.set(`${new Date(year, 0, i).toLocaleDateString()}`, {
......@@ -275,11 +276,17 @@ create.Component({
}
}
// 跨年的那几天不是周一的
let num = 6 - new Date(year, 0, 366).getDay();
let num =
6 - new Date(year, 0, isLeapYear).getDay() === 6
? 0
: 6 - new Date(year, 0, isLeapYear).getDay();
for (let i = 0; i <= num; i++) {
DateMap.set(`${new Date(year, 0, 366 + i).toLocaleDateString()}`, {
scheduleList: []
});
DateMap.set(
`${new Date(year, 0, isLeapYear + i).toLocaleDateString()}`,
{
scheduleList: []
}
);
}
let AllScheduleList = this.getCalendarList();
// 遍历所有日程
......
import { login } from './login'
import { login } from "./login";
export default function http(data) {
if (getApp().globalData.token !== '') {
if (getApp().globalData.token !== "") {
return new Promise((resolve, rejects) => {
dd.httpRequest({
headers: {
// "Content-Type": `${ data.method === 'POST' ? 'application/x-www-form-urlencoded' : 'application/json' }`,
"Content-Type": 'application/json;charset=UTF-8',
"Authorization": `Bearer ${getApp().globalData.token}`
"Content-Type": "application/json;charset=UTF-8",
Authorization: `Bearer ${getApp().globalData.token}`
},
url: `${getApp().globalData.globalUrl}${data.url}`,
method: data.method,
dataType: 'json',
dataType: "json",
data: data.data,
success: function (res) {
success: function(res) {
if (res.data.code == 0) {
resolve(res);
} else {
dd.alert({
content: '网络异常',
buttonText: '确定'
})
content: "网络异常",
buttonText: "确定"
});
}
},
fail: function (res) {
fail: function(res) {
dd.alert({
content: '网络异常',
buttonText: '确定'
})
rejects(res)
content: "网络异常",
buttonText: "确定"
});
rejects(res);
}
})
})
});
});
} else {
return new Promise((resolve, rejects) => {
login().then(res => {
const { oapiUser } = res.data.data;
getApp().globalData.token = res.data.data.accessToken.access_token
getApp().globalData.name = res.data.data.oapiUser.name
getApp().globalData.userid = res.data.data.oapiUser.userid
getApp().globalData.avatar = res.data.data.oapiUser.avatar
getApp().globalData.userInfo = JSON.stringify({ username: oapiUser.name, userId: oapiUser.userid, headUrl: oapiUser.avatar, "platform": "dingtalk" })
getApp().globalData.token = res.data.data.accessToken.access_token;
getApp().globalData.name = res.data.data.oapiUser.name;
getApp().globalData.userid = res.data.data.oapiUser.userid;
getApp().globalData.avatar = res.data.data.oapiUser.avatar;
getApp().globalData.userInfo = JSON.stringify({
username: oapiUser.name,
userId: oapiUser.userid,
headUrl: oapiUser.avatar,
platform: "dingtalk"
});
dd.httpRequest({
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${getApp().globalData.token}`
Authorization: `Bearer ${getApp().globalData.token}`
},
url: `${getApp().globalData.globalUrl}${data.url}`,
method: data.method,
data: data.data,
dataType: 'json',
success: function (res) {
resolve(res)
dataType: "json",
success: function(res) {
resolve(res);
},
fail: function (res) {
rejects(res)
fail: function(res) {
rejects(res);
}
})
})
})
});
});
});
}
}
\ No newline at end of file
}
......@@ -4,10 +4,6 @@ page {
background: #F6F6F6;
}
picker-view {
background: #F6F6F6;
}
view {
box-sizing: border-box;
}
\ No newline at end of file
{
"pages": [
"pages/index/index",
"pages/scheduleList/scheduleList",
"pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList",
"pages/createMeeting/createMeeting",
......
@import "../../template/loading/loading.acss";
.index {
background: #FFFFFF;
}
.scheduleHeader {
/* position: fixed;
top: 0;
left: 0; */
width: 100%;
height: 88rpx;
background: #FFFFFF;
line-height: 88rpx;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
box-shadow: 0 1rpx 8rpx 0 rgba(0, 0, 0, 0.04);
z-index: 9;
}
.scheduleHeader view:nth-of-type(1) {
flex: 1;
}
.scheduleHeader view:nth-of-type(2) {
width: 40rpx;
height: 40rpx;
}
.sidebar {
position: fixed;
left: -750rpx;
top: 0;
width: 750rpx;
height: 100%;
/* background: rgba(0, 0, 0, 0.19); */
z-index: 99;
}
.headerIcon {
position: relative;
}
.headerIcon>view {
position: absolute;
left: 28rpx;
top: 52rpx;
width: 12rpx;
height: 12rpx;
border: 2rpx solid #FFFFFF;
border-radius: 50%;
background: #EA0C28;
}
.headerIcon .iconicon_app1 {
font-size: 44rpx;
color: rgba(27, 38, 61, 0.4);
}
.sidebarContent {
background: #FFFFFF;
width: 640rpx;
height: 100%;
padding: 32rpx 0 32rpx 32rpx;
}
.sidebarLogo {
margin-bottom: 18rpx;
line-height: 64rpx;
font-size: 26rpx;
color: rgba(27, 38, 61, .56);
display: flex;
}
.sidebarLogo view:nth-of-type(1) {
margin-right: 34rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #3070F2;
color: white;
overflow: hidden;
}
.sidebarLogo view:nth-of-type(1) image {
width: 64rpx;
height: 64rpx;
}
.hasAssociated, .unAssociated {
margin-top: 48rpx;
}
.associated {
font-size: 24rpx;
color: rgba(25, 31, 37, .56);
line-height: 34px;
margin-bottom: 16rpx;
}
.applicationList {
height: 104rpx;
display: flex;
align-items: center;
}
.applicationLogo {
width: 72rpx;
height: 72rpx;
margin-right: 24rpx;
}
.applicationMsg {
flex: 1;
display: flex;
border-bottom: 1px solid rgba(241, 243, 249, 1);
height: 104rpx;
align-items: center;
padding-right: 32rpx;
}
.applicationMsg>view:nth-of-type(1) {
flex: 1;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) {
font-size: 28rpx;
color: #191F25;
margin-bottom: 8rpx;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(2) {
opacity: 0.56;
font-size: 20rpx;
color: #191F25;
}
.operateIcon {
width: 32rpx;
height: 32rpx;
}
.operateIcon .iconright {
font-size: 22rpx;
color: rgba(27, 38, 61, .5)
}
.year, .month, .week, .date {
height: 96rpx;
font-size: 48rpx;
}
.year, .month, .week {
line-height: 96rpx;
padding-left: 32rpx;
}
.year, .month {
font-weight: bold;
font-family: 'DINAlternate-Bold';
}
.week {
font-size: 26rpx;
color: rgba(25, 31, 37, 0.39);
padding-left: 120rpx;
}
.date {
display: flex;
padding: 0 32rpx 0 0;
margin-bottom: 32rpx;
}
.today {
border-left: 8rpx solid rgba(234, 12, 40, 1);
}
.todayNoData {
height: 96rpx;
line-height: 96rpx;
padding-left: 16rpx;
font-size: 28rpx;
color: rgba(25, 31, 37, 0.39);
}
.todayNoData text:nth-of-type(2) {
color: rgba(25, 31, 37, 0.39);
}
.todayNoData text:nth-of-type(2) {
color: #191F25;
}
.overdue {
background: rgba(10, 10, 10, .034) !important;
color: rgba(10, 10, 10, .353) !important;
}
.overdue text {
color: rgba(10, 10, 10, .353) !important;
}
.overdueLabel {
color: rgba(10, 10, 10, .353) !important;
}
.cancel {
background: url(../../assests/cancel.png) center /100% 100% !important;
border: 1rpx solid rgba(97, 155, 212, 0.28) !important;
color: rgba(25, 31, 37, 0.56) !important;
}
.cancel text {
text-decoration: line-through;
}
.hasDateTitle {
display: flex;
align-items: center;
justify-content: center;
height: 96rpx;
width: 112rpx;
flex-direction: column;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
padding-top: 6rpx;
}
.hasDateTitle view:nth-of-type(1) {
font-size: 24rpx;
}
.hasDateTitle view:nth-of-type(2) {
font-size: 48rpx;
}
.scheduleBox {
flex: 1;
height: 96rpx;
padding: 16rpx;
background: rgba(10, 10, 10, 0.05);
border-radius: 4px;
}
.scheduleTitle {
font-weight: 500;
color: rgba(10, 10, 10, .72);
font-size: 28rpx;
margin-bottom: 10rpx;
line-height: 28rpx;
}
.scheduleTime {
font-size: 26rpx;
font-weight: 400;
color: rgba(10, 10, 10, .72);
line-height: 26rpx;
}
.cancel {
width: 602rpx;
overflow: hidden;
background: url(../../assests/cancel.png) center /100% 100%;
border: 1rpx solid rgba(25, 31, 37, 0.28);
color: rgba(25, 31, 37, 0.56);
}
.indexScrollView {
height: calc( 100vh - 88rpx);
}
\ No newline at end of file
<import src="../../template/loading/loading.axml"/>
<view a:if="{{!loading}}">
<view class="scheduleHeader">
<view>2020年3月</view>
<view onTap="changesidebar" class="headerIcon">
<text class="iconfont iconicon_app1">
</text>
<view>
</view>
</view>
</view>
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="100" onScrollToLower="lower" onScrollToUpper="upper" scroll-into-view="{{todayStr}}">
<block a:for="{{scheduleList}}" key="{{item.dateStr}}">
<!-- 年 -->
<block a:if="{{item.type == 'year'}}">
<view class="year" id="{{item.dateStr}}">
{{item.value}}年
</view>
</block>
<!-- 月 -->
<block a:elif="{{item.type == 'month'}}">
<view class="month" id="{{item.dateStr}}">
{{item.value}}月
</view>
</block>
<!-- 周 -->
<block a:elif="{{item.type == 'week'}}">
<view class="week" id="{{item.dateStr}}">
{{item.value}}
</view>
</block>
<!-- 天 -->
<block a:elif="{{item.type == 'day' || item.type == 'today'}}">
<view class="date" id="{{item.dateStr}}">
<view class="hasDateTitle {{item.type == 'today' && item.hasDateLabel ? 'today' : ''}} {{item.value.isBeOverdue ? 'overdueLabel':''}}">
<view>
{{item.week}}
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
<view class="scheduleTitle">
<text>{{item.value.title}}{{item.value.isDaySpan ? `(第${item.value.isFewDays}天,共${item.value.duration}天)` : '' }}</text>
</view>
<view class="scheduleTime">
<text a:if="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '0'}}">{{item.value.thisDayStartTime}}</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '1'}}">全天</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">直到{{item.value.thisDayEndTime}}</text>
<text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text>
</view>
</view>
</view>
</block>
<!-- 今天有无会议 -->
<block a:elif="{{item.type == 'thisDay'}}">
<view class="date" id="{{item.dateStr}}">
<view class="hasDateTitle today">
<view>
{{item.week}}
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="todayNoData">
<text>暂无日程安排,</text>
<text onTap="nextPage">创建日程</text>
</view>
</view>
</block>
</block>
</scroll-view>
<popup show="{{show}}" onClose="closePop" position="left">
<view class="sidebarContent" catchTap="preventSort">
<view class="sidebarLogo">
<view>
<image a:if="{{userMsg.headUrl}}" mode="scaleToFill" src="{{userMsg.headUrl}}" />
<text a:else>{{ userMsg.userName.slice(-1) }}</text>
</view>
<view>
{{ userMsg.userName }}
</view>
</view>
<view class="hasAssociated">
<view class="associated">
已关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
<view class="unAssociated">
<view class="associated">
可关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
</view>
</popup>
</view>
<template is="loading" a:else>
</template>
\ No newline at end of file
{
"usingComponents": {
"popup": "../../components/popup/index"
}
}
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