Commit 6e2ec912 by xiexiaoqin

Merge branch 'release_beta/1.0.0' of…

Merge branch 'release_beta/1.0.0' of ssh://gitlab.roboming.com:2018/fengzhaoyu/schedule into release_beta/1.0.0
parents c273514c 6357191f
import { getInterTime } from '../../utils/utils';
const currentDate = new Date();
const weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 120, label: '2小时' }];
const durationList = [{ value: 30, label: '30分钟' }, { value: 60, label: '1小时' }, { value: 90, label: '1.5小时' }, { value: 120, label: '2小时' }];
const timeData = generateDate(365);
const timeHour = generateHour(24);
const timeMin = generateMin(60);
......
......@@ -17,24 +17,8 @@ create.Component({
this.getData();
},
didUpdate() {
if (typeof this.$store.data.relatedAppNeedUpdate === "object") {
let relatedAppList = this.data.relatedAppList;
let relatedAppPlatformList = this.data.relatedAppPlatformList;
relatedAppList.push({
thirdUserIdentify: this.$store.data.relatedAppNeedUpdate.name,
platform: this.$store.data.relatedAppNeedUpdate.platform
});
relatedAppPlatformList.push(
this.$store.data.relatedAppNeedUpdate.platform
);
this.setData({
relatedAppList: relatedAppList,
relatedAppPlatformList: relatedAppPlatformList
});
this.$store.data.relatedAppNeedUpdate = "";
this.update();
} else if (this.$store.data.relatedAppNeedUpdate === "1") {
this.$store.data.relatedAppNeedUpdate = "";
if (this.$store.data.relatedAppNeedUpdate) {
this.$store.data.relatedAppNeedUpdate = false;
this.update();
this.getData();
}
......@@ -56,16 +40,9 @@ create.Component({
preventSort() {
return false;
},
bindingApp(e) {
dd.navigateTo({
url: `./../bindingApp/bindingApp?platform=${e.target.dataset.platform}`
});
},
toAppDetails(e) {
dd.navigateTo({
url: `./../unbindApp/unbindApp?item=${JSON.stringify(
e.target.dataset.item
)}`
url: `./../appDetails/appDetails?userName=${e.target.dataset.name}&platform=${e.target.dataset.platform}`
});
}
}
......
......@@ -47,7 +47,7 @@ create.Component({
complete: throttle(
function () {
const { currentTask } = this.store.data;
if (!currentTask.taskInfos.taskTitle) {
if ((currentTask.taskInfos && !currentTask.taskInfos.taskTitle) || !currentTask.taskInfos) {
return
}
this.props.onComplete()
......
......@@ -4,7 +4,7 @@ Component({
},
props: {
showToast: false,
duration: 2000,
duration: 1000,
title: '保存成功',
toastIcon: 'iconcanjia3'
......
<web-view id="web-view-1" src="{{url}}" onMessage="test">
</web-view>
\ No newline at end of file
import {
getOutlookUrl,
getZoomUrl,
authorizationCodeReplacementToken,
sendZoomCode
} from "../../api/request";
import "dingtalk-jsapi/entry/mobile";
import openLink from "dingtalk-jsapi/api/biz/util/openLink";
import create from "dd-store";
create.Page({
data: {
$data: null,
url: "",
platform: ""
},
onLoad(e) {
this.setData({
platform: e.platform
});
this.webViewContext = dd.createWebViewContext("web-view-1");
if (e.platform === "outlook") {
let data = `${getApp().globalData.userid},${dd.corpId}`;
getOutlookUrl(data).then(res => {
openLink({
url: res.data.data
});
// this.setData({
// url: res.data.data
// });
});
} else if (e.platform === "zoom") {
getZoomUrl("").then(res => {
this.setData({
url: res.data.data
});
});
}
},
test(e) {
const code = e.detail.code;
const state = e.detail.state;
if (this.data.platform === "outlook") {
const data = {
code: code,
state: state
};
authorizationCodeReplacementToken(data).then(res => {
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = {
name: res.data.data,
platform: this.data.platform
};
this.update();
dd.navigateBack({
delta: 1
});
}
});
} else if (this.data.platform === "zoom") {
const data = {
code: code,
userId: getApp().globalData.userid,
orgId: dd.corpId
};
sendZoomCode(data).then(res => {
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = {
name: res.data.data,
platform: this.data.platform
};
this.update();
dd.navigateBack({
delta: 1
});
}
});
}
}
});
{}
\ No newline at end of file
......@@ -19,6 +19,7 @@ import {
padZero,
getCreateShowTime
} from "../../utils/utils";
import { checkFullScren } from "../../utils/checkFullScren";
const currentDate = new Date();
const minYear = 2020;
const maxYear = currentDate.getFullYear() + 1;
......@@ -28,6 +29,7 @@ import create from "dd-store";
let maxClickCount = 5;
create.Page({
data: {
sign: '',
refresh: false,
$data: null,
iconDay: currentDate.getDate(),
......@@ -44,7 +46,7 @@ create.Page({
current: 1,
pages: 1,
listLoading: true,
isFullscreen: false
isIPX: checkFullScren()
},
scrollTop: 0,
pageSize: 10,
......@@ -60,6 +62,7 @@ create.Page({
maxYear: maxYear,
todayIndex: 0,
onShow() {
//如果是重复会议重新算
if (this.$store.data.indexNeedUpdate) {
dd.setNavigationBar({
......@@ -83,22 +86,31 @@ create.Page({
this.$store.data.isIndexAffairListNeedUpdate = false;
this.update();
}
//开启一个定时器
this.timer = setInterval(() => {
this.getData()
}, 30000)
},
onHide() {
clearInterval(this.timer);
this.timer = null;
},
onLoad(event) {
if (JSON.stringify(event) != "{}") {
refresh() {
this.onLoad()
},
onLoad(query) {
console.log(query);
if (query && JSON.stringify(query) !== '{}') {
this.setData({
listLoading: false
});
let scheduleItem = JSON.parse(Object.keys(event)[0].split("=")[1]);
const scheduleItem = JSON.parse(Object.keys(query)[0].split("=")[1]);
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${encodeURIComponent(
JSON.stringify(scheduleItem)
)}`
});
}
this.setData({
isFullscreen: getApp().globalData.isFullscreen
});
dd.setNavigationBar({
title: "动态"
});
......@@ -186,11 +198,11 @@ create.Page({
callBack();
}
}).catch(err => {
// if (err && err.refresh) {
// this.setData({
// refresh: true
// })
// }
if (err && err.refresh) {
this.setData({
refresh: true
})
}
});
},
//动态置顶
......@@ -291,7 +303,23 @@ create.Page({
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
}).then(res => {
this.getScheduleList(res.data.data);
//是否刷新页面
if (this.data.sign && res.data.data.sign !== this.data.sign) {
DateMap = getDateMap(this.minYear, this.maxYear);
}
if (res.data.data.sign !== this.data.sign) {
this.getScheduleList(res.data.data);
}
this.setData({
sign: res.data.data.sign
})
}).catch(err => {
if (err && err.refresh) {
this.setData({
refresh: true
})
}
});
},
//生成DateMap值
......@@ -322,7 +350,7 @@ create.Page({
pushItem.duration = nextDateList.length;
for (let i = 1; i < nextDateList.length; i++) {
if (DateMap.has(nextDateList[i])) {
DateMap.get(nextDateList[i]).unshift({
DateMap.get(nextDateList[i]).push({
...pushItem,
isFewDays: i + 1,
isfirstDayOrEndDay: nextDateList.length - 1 === i ? "2" : "1" // 0 第一天,1中间的天,2结束的天
......@@ -782,7 +810,7 @@ create.Page({
maxClickCount--;
if (maxClickCount == 0) {
dd.alert({
content: "版本号222"
content: "0.0.11"
});
maxClickCount = 5;
}
......
......@@ -77,26 +77,23 @@ create.Page({
parentStr: "",
onLoad(query) {
let date = new Date(this.$store.data.startTime.replace(/-/g, "/"));
// let date = new Date();
let year = date.getFullYear();
let month = padZero(date.getMonth() + 1);
let day = padZero(date.getDate());
let hour = padZero(date.getHours());
let minute = padZero(date.getMinutes());
let todayTime = `${year}/${padZero(date.getMonth() + 1)}/${padZero(
date.getDate()
)}`;
let tomorrowTime = new Date(date);
let toDayDate = new Date();
let tomorrowTime = new Date(toDayDate);
tomorrowTime.setDate(tomorrowTime.getDate() + 1);
let afterTomorrowTime = new Date(date);
let afterTomorrowTime = new Date(toDayDate);
afterTomorrowTime.setDate(afterTomorrowTime.getDate() + 2);
this.setData({
"search.time": `${year}-${month}-${day}`,
"TimeSlot.todayTime": todayTime,
"TimeSlot.tomorrowTime": `${year}/${padZero(
"TimeSlot.todayTime": `${toDayDate.getFullYear()}/${padZero(
toDayDate.getMonth() + 1
)}/${padZero(toDayDate.getDate())}`,
"TimeSlot.tomorrowTime": `${tomorrowTime.getFullYear()}/${padZero(
tomorrowTime.getMonth() + 1
)}/${padZero(tomorrowTime.getDate())}`,
"TimeSlot.afterTomorrowTime": `${year}/${padZero(
"TimeSlot.afterTomorrowTime": `${afterTomorrowTime.getFullYear()}/${padZero(
afterTomorrowTime.getMonth() + 1
)}/${padZero(afterTomorrowTime.getDate())}`,
userId: getApp().globalData.userid
......@@ -1266,6 +1263,10 @@ create.Page({
};
getReserveRoomList(data).then(res => {
if (res.data.data) {
for (let value of res.data.data) {
value.name = `${this.getParentStr(value.locationId)}${value.name}`;
this.parentStr = "";
}
let reserveRoomList = res.data.data.map(item => {
let startTime = parseInt(
item.timeSlotWithMeetingVOS[0].reserveStartTime.substring(0, 2)
......
......@@ -30,7 +30,7 @@ create.Page({
unbind() {
unbindingApp(this.data.item.platform).then(res => {
if (res.data.data) {
this.$store.data.relatedAppNeedUpdate = "1";
this.$store.data.relatedAppNeedUpdate = true;
this.update();
dd.navigateBack({
delta: 1
......
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