Commit 25b7e3de by liang ce

提交代码

parent da9f6976
......@@ -17,9 +17,25 @@ Component({
didMount() {
this.getPages(1);
},
didUpdate() { },
didUnmount() { },
didUpdate() {
this.test();
},
didUnmount() {},
methods: {
test() {
console.log(1);
const promise = new Promise((resolve, reject) => {
console.log(123);
resolve(2);
});
setTimeout(() => {
console.log(3);
});
promise.then(res => {
console.log(res);
});
},
getPages(current) {
let that = this;
let data = {
......@@ -28,7 +44,7 @@ Component({
};
getDynamicList(data).then(res => {
if (!res.data.data) {
return
return;
}
// 第一层日程数据处理
if (res.data.data) {
......@@ -36,7 +52,7 @@ Component({
// 第二层日程下的动态数据处理
let meetingLogResourceList = item.meetingLogDataList.map(
(item2, index2) => {
if (item2.category === "2") {
if (item2.category === "2" || item2.category === "3") {
// 第三层处理动态下的文件或者任务数据
let meetingLogResourceList = item2.meetingLogResourceList.map(
(item3, index3) => {
......
......@@ -6,13 +6,11 @@ import {
getCurrentMonthLast,
throttle
} from "../../utils/utils";
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import create from "dd-store";
create.Component({
mixins: [],
store: exampleStore,
useAll: true,
data: {
$data: null,
response: "",
scheduleList: [],
todayStr: "",
......@@ -35,14 +33,14 @@ create.Component({
},
didUpdate() {
if (this.props.update) {
this.store.data.indexNeedUpdate = false;
this.$store.data.indexNeedUpdate = false;
this.update();
this.getDate();
}
},
didUnmount() { },
didUnmount() {},
methods: {
getDate: throttle(function (e) {
getDate: throttle(function(e) {
let data = {
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
......@@ -78,10 +76,12 @@ create.Component({
);
});
}, 1000),
nextDetail: throttle(function (e) {
nextDetail: throttle(function(e) {
let item = e.target.dataset.item;
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(item)}`
url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(
item
)}`
});
}, 1000),
closePop() {
......@@ -215,7 +215,7 @@ create.Component({
);
}
});
scheduleMap.forEach(function (value, key, map) {
scheduleMap.forEach(function(value, key, map) {
scheduleList.push(value);
});
return scheduleList;
......@@ -353,7 +353,7 @@ create.Component({
value: year
});
let thisDay = new Date().toLocaleDateString();
DateMap.forEach(function (value, key, map) {
DateMap.forEach(function(value, key, map) {
if (
new Date(key).getDay() === 0 &&
that.count(
......
import { getFormatDate } from '../../utils/utils'
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { getFormatDate } from "../../utils/utils";
import create from "dd-store";
create.Page({
store: exampleStore,
useAll: true,
data: {
tabBarIndex: '1',
},
onLoad() {
tabBarIndex: "0",
$data: null
},
onLoad() {},
// 修改tabBar
changeTabBar(e) {
this.setData({
tabBarIndex: e.currentTarget.dataset.tabbar
})
});
},
createMeeting() {
// isClicked(this)
......
import { getMeetingRoom, getLabelTree, myMeetingPage, getReserveRoomList, getAllScheduleWithMeetingRoomByTime } from '../../api/request'
import { EEXIST } from 'constants'
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
create.Page({
store: exampleStore,
useAll: true,
data: {
$data: null,
equipFacilityList: [],
reserveRoomList: [],
lableTreeList: [],
......@@ -45,9 +43,9 @@ create.Page({
afterTomorrowTime: ''
},
onLoad(query) {
let date = new Date(this.store.data.startTime.replace(/-/g, "/"))
let date = new Date(this.$store.data.startTime.replace(/-/g, "/"))
console.log(date, 111)
console.log(this.store.data.startTime, 111)
console.log(this.$store.data.startTime, 111)
// let date = new Date()
let year = date.getFullYear()
let month = `${date.getMonth() + 1}`
......@@ -640,18 +638,18 @@ create.Page({
if (startTime && this.data.meetingTime.endTime) {
var endTimeDate = new Date(this.data.meetingTime.endTime.replace(/-/g, '/'))
endTimeDate.setMinutes(endTimeDate.getMinutes() + 30)
this.store.data.startTime = `${startTime.replace(/-/g, '/')}:00`
this.store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}/${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
this.store.data.locationName = this.data.meetingTime.meetingRoomName
this.store.data.roomId = this.data.meetingTime.meetingRoomId
this.$store.data.startTime = `${startTime.replace(/-/g, '/')}:00`
this.$store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}/${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
this.$store.data.locationName = this.data.meetingTime.meetingRoomName
this.$store.data.roomId = this.data.meetingTime.meetingRoomId
this.update()
} else if (startTime) {
var endTimeDate = new Date(this.data.meetingTime.startTime.replace(/-/g, '/'))
endTimeDate.setMinutes(endTimeDate.getMinutes() + 30)
this.store.data.startTime = `${startTime.replace(/-/g, '/')}:00`
this.store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}/${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
this.store.data.locationName = this.data.meetingTime.meetingRoomName
this.store.data.roomId = this.data.meetingTime.meetingRoomId
this.$store.data.startTime = `${startTime.replace(/-/g, '/')}:00`
this.$store.data.endTime = `${endTimeDate.getFullYear()}/${endTimeDate.getMonth() + 1 < 10 ? '0' + (endTimeDate.getMonth() + 1) : endTimeDate.getMonth() + 1}/${endTimeDate.getDate() < 10 ? '0' + endTimeDate.getDate() : endTimeDate.getDate()} ${endTimeDate.getHours() < 10 ? '0' + endTimeDate.getHours() : endTimeDate.getHours()}:${endTimeDate.getMinutes() < 10 ? '0' + endTimeDate.getMinutes() : endTimeDate.getMinutes()}:00`
this.$store.data.locationName = this.data.meetingTime.meetingRoomName
this.$store.data.roomId = this.data.meetingTime.meetingRoomId
this.update()
}
dd.navigateBack({
......
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