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