123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const utils = require('../../utils/util')
- Page({
- data: {
- isPickerRender: false,
- isPickerShow: false,
- pickerConfig: {
- endDate: true,
- dateLimit: true,
- initStartTime: "2020-01-01",
- initEndTime: "2020-12-01",
- limitStartTime: "2015-01-01",
- limitEndTime: "2095-01-01"
- },
- searchParams: {
- startTime: "2019-01-01 ",
- endTime: "2019-12-01"
- },
- dataStr: '',
- isModel:false
- },
- onLoad: function (options) {
- },
- onReady: function (options) {
- },
- timePickerShow: function () {
- this.setData({
- isPickerShow: true,
- isPickerRender: true,
- chartHide: true
- });
- },
- pickerHide: function () {
- this.setData({
- isPickerShow: false,
- chartHide: false
- });
- },
- setPickerTime: function (val) {
- console.log(val);
- let data = val.detail;
- let startTime = utils.formatDate(data.startTime,'yyyy-MM-dd')
- let endTime = utils.formatDate(data.endTime,'yyyy-MM-dd')
- this.setData({
- ["searchParams.startTime"]: data.startTime,
- ["searchParams.endTime"]: data.endTime,
- dataStr: startTime +" ~ "+ endTime
- });
- },
- showDetail(){
- this.setData({
- isModel:true
- })
- },
- hideDetail(){
- this.setData({
- isModel:false
- })
- }
-
- })
|