处理数据看板
This commit is contained in:
66
unpackage/dist/dev/mp-weixin/pages/data/index.js
vendored
Normal file
66
unpackage/dist/dev/mp-weixin/pages/data/index.js
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_calendar2 = common_vendor.resolveComponent("nut-calendar");
|
||||
_easycom_nut_calendar2();
|
||||
}
|
||||
const _easycom_nut_calendar = () => "../../uni_modules/nutui-uni/components/calendar/calendar.js";
|
||||
if (!Math) {
|
||||
_easycom_nut_calendar();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const getLastMonthFirstDay = () => {
|
||||
const date2 = /* @__PURE__ */ new Date();
|
||||
date2.setMonth(date2.getMonth() - 1);
|
||||
date2.setDate(1);
|
||||
return formatDate(date2);
|
||||
};
|
||||
const getCurrentMonthLastDay = () => {
|
||||
const date2 = /* @__PURE__ */ new Date();
|
||||
date2.setMonth(date2.getMonth() + 1);
|
||||
date2.setDate(0);
|
||||
return formatDate(date2);
|
||||
};
|
||||
const formatDate = (date2) => {
|
||||
const year = date2.getFullYear();
|
||||
const month = (date2.getMonth() + 1).toString().padStart(2, "0");
|
||||
const day = date2.getDate().toString().padStart(2, "0");
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
const startDate = common_vendor.ref(getLastMonthFirstDay());
|
||||
const endDate = common_vendor.ref(getCurrentMonthLastDay());
|
||||
const date = common_vendor.ref("");
|
||||
const onChoose = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/data/index.vue:57", "onChoose", e);
|
||||
};
|
||||
const onSelect = (e) => {
|
||||
common_vendor.index.__f__("log", "at pages/data/index.vue:60", "onSelect", e);
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/data/list?date=${e[3]}`
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(onChoose),
|
||||
b: common_vendor.o(onSelect),
|
||||
c: common_vendor.p({
|
||||
title: "选择想要的日期",
|
||||
["show-sub-title"]: false,
|
||||
poppable: false,
|
||||
["default-value"]: date.value,
|
||||
["start-date"]: startDate.value,
|
||||
["end-date"]: endDate.value
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-af28c7f4"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/data/index.js.map
|
||||
Reference in New Issue
Block a user