module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 147);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
        injectStyles.call(
          this,
          (options.functional ? this.parent : this).$root.$options.shadowRoot
        )
      }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 13:
/***/ (function(module, exports) {

module.exports = require("bi-element/lib/utils/date");

/***/ }),

/***/ 147:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/complex-time-popover/src/main.vue?vue&type=template&id=5591debd&
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    { staticClass: "el-complex-time-popover" },
    [
      _c(
        "el-popover",
        {
          ref: "popoverRef",
          attrs: {
            "popper-class": "el-complex-time-popover__popover",
            placement: "bottom",
            width: "324",
            trigger: "click",
            disabled: _vm.disabled,
          },
        },
        [
          _c(
            "div",
            {
              staticClass: "el-complex-time-popover__tabs",
              class: _vm.errorShow ? "is-error" : "",
              attrs: { slot: "reference" },
              slot: "reference",
            },
            [
              _c(
                "el-input",
                {
                  attrs: {
                    readonly: "",
                    disabled: _vm.disabled,
                    placeholder: "请选择",
                  },
                  on: {
                    focus: _vm.handleFocus,
                    blur: _vm.handleBlur,
                    clear: _vm.clear,
                  },
                  nativeOn: {
                    mouseenter: function ($event) {
                      _vm.hovering = true
                    },
                    mouseleave: function ($event) {
                      _vm.hovering = false
                    },
                  },
                },
                [
                  _vm.showClear
                    ? _c("i", {
                        staticClass:
                          "el-input__icon bi-iconfont-close-circle-fill",
                        attrs: { slot: "suffix" },
                        on: {
                          click: function ($event) {
                            $event.stopPropagation()
                            return _vm.clear($event)
                          },
                        },
                        slot: "suffix",
                      })
                    : _c("i", {
                        staticClass: "el-input__icon bi-iconfont-calendar",
                        attrs: { slot: "suffix" },
                        slot: "suffix",
                      }),
                ]
              ),
              _vm.showTabsList.length > 0
                ? _c(
                    "div",
                    {
                      class: [
                        "el-complex-time-popover__tags",
                        { "is-disabled": _vm.disabled },
                      ],
                    },
                    [
                      _c("span", [
                        _vm._v(
                          "\n          " +
                            _vm._s(_vm.showTabsList[0]) +
                            "\n        "
                        ),
                      ]),
                      _vm.showTabsList.length > 1
                        ? _c(
                            "span",
                            {
                              staticClass: "el-complex-time-popover__tags-icon",
                            },
                            [_vm._v("+ " + _vm._s(_vm.showTabsList.length - 1))]
                          )
                        : _vm._e(),
                    ]
                  )
                : _vm._e(),
            ],
            1
          ),
          _c("div", { staticClass: "el-complex-time-popover__content" }, [
            _c(
              "div",
              { staticClass: "el-complex-time-popover__content--top" },
              [
                _vm._v(
                  "\n        " +
                    _vm._s(
                      _vm.btnKey === "fixedTime"
                        ? "日期选择（去重后/" +
                            (_vm.relation === 2 ? "且" : "或") +
                            "关系）：" +
                            (_vm.showTabsList[0] ? "" : "-")
                        : "日期选择：" +
                            (_vm.showTabsList[0] ? _vm.showTabsList[0] : "-")
                    ) +
                    "\n        "
                ),
                _vm.btnKey === "fixedTime"
                  ? _c(
                      "div",
                      { staticClass: "complex-top-text" },
                      _vm._l(_vm.showTabsList, function (item, index) {
                        return _c("div", { key: index }, [
                          _c(
                            "span",
                            {
                              directives: [
                                {
                                  name: "show",
                                  rawName: "v-show",
                                  value: index !== 0,
                                  expression: "index !== 0",
                                },
                              ],
                            },
                            [
                              _vm._v(
                                "\n              " +
                                  _vm._s(_vm.relation === 2 ? "且" : "或") +
                                  " "
                              ),
                            ]
                          ),
                          _vm._v(_vm._s(item) + "\n          "),
                        ])
                      }),
                      0
                    )
                  : _vm._e(),
              ]
            ),
            _c(
              "div",
              { staticClass: "el-complex-time-popover__content--bottom" },
              [
                _c(
                  "div",
                  { staticClass: "complex-btns-class" },
                  _vm._l(_vm.btnList, function (item, index) {
                    return _c(
                      "span",
                      {
                        key: index,
                        class: [
                          "complex-btns-span",
                          { "is-selected": _vm.btnKey === item.key },
                          { "is-disabled": item.disabled },
                        ],
                        attrs: { value: item.key },
                        on: {
                          click: function ($event) {
                            _vm.btnsTypeClick(item.key)
                          },
                        },
                      },
                      [
                        _c("span", [_vm._v(_vm._s(item.chooseTag))]),
                        item.text
                          ? _c(
                              "el-tooltip",
                              {
                                attrs: {
                                  content: item.text,
                                  placement: "bottom",
                                },
                              },
                              [_c("i", { staticClass: "bi-iconfont-help" })]
                            )
                          : _vm._e(),
                      ],
                      1
                    )
                  }),
                  0
                ),
                _c("div", { staticClass: "complex-btns-content" }, [
                  _vm.btnKey === "fixedTime"
                    ? _c(
                        "div",
                        { staticClass: "complex-btns-content-fixed" },
                        [
                          _c(
                            "el-form",
                            {
                              ref: "fixedForm",
                              staticClass:
                                "complex-btns-content-fixed__form-dynamic",
                              attrs: { model: _vm.fixedForm },
                            },
                            [
                              _vm._l(
                                _vm.fixedForm.items,
                                function (item, index) {
                                  return _c(
                                    "el-form-item",
                                    {
                                      key:
                                        "" + index + (item.key ? item.key : ""),
                                      attrs: {
                                        prop: "items." + index + ".value",
                                      },
                                    },
                                    [
                                      _c(
                                        "el-date-picker",
                                        _vm._b(
                                          {
                                            attrs: {
                                              type: "daterange",
                                              "range-separator": "至",
                                              "start-placeholder": "开始日期",
                                              "end-placeholder": "结束日期",
                                              format: "yyyy/MM/dd",
                                              "value-format": "yyyy/MM/dd",
                                            },
                                            on: { change: _vm.fixedChange },
                                            model: {
                                              value: item.value,
                                              callback: function ($$v) {
                                                _vm.$set(item, "value", $$v)
                                              },
                                              expression: "item.value",
                                            },
                                          },
                                          "el-date-picker",
                                          _vm.$attrs,
                                          false
                                        )
                                      ),
                                      _vm.fixedForm.items.length > 1
                                        ? _c("i", {
                                            staticClass: "bi-iconfont-close",
                                            on: {
                                              click: function ($event) {
                                                _vm.handleRemove(item)
                                              },
                                            },
                                          })
                                        : _vm._e(),
                                    ],
                                    1
                                  )
                                }
                              ),
                              _c(
                                "el-form-item",
                                [
                                  _c(
                                    "el-button",
                                    {
                                      attrs: {
                                        type: "dashed",
                                        icon: "bi-iconfont-add",
                                      },
                                      on: { click: _vm.handleAdd },
                                    },
                                    [_vm._v("添加日期段")]
                                  ),
                                ],
                                1
                              ),
                            ],
                            2
                          ),
                        ],
                        1
                      )
                    : _vm._e(),
                  _vm.btnKey === "dynamicTime"
                    ? _c(
                        "div",
                        { staticClass: "complex-btns-content-dynamic" },
                        [
                          _c(
                            "el-radio-group",
                            {
                              model: {
                                value: _vm.dynamicRadio,
                                callback: function ($$v) {
                                  _vm.dynamicRadio = $$v
                                },
                                expression: "dynamicRadio",
                              },
                            },
                            [
                              _c(
                                "el-radio-button",
                                {
                                  attrs: { label: 0 },
                                  nativeOn: {
                                    click: function ($event) {
                                      _vm.dynamicTabClick()
                                    },
                                  },
                                },
                                [_vm._v("具体日期段")]
                              ),
                              _c(
                                "el-radio-button",
                                {
                                  attrs: { label: 1 },
                                  nativeOn: {
                                    click: function ($event) {
                                      _vm.dynamicTabClick()
                                    },
                                  },
                                },
                                [_vm._v("过去N（天/月/年）")]
                              ),
                            ],
                            1
                          ),
                          _c(
                            "el-form",
                            {
                              ref: "dynamicForm",
                              attrs: { model: _vm.dynamicForm },
                            },
                            [
                              _vm.dynamicRadio === 0
                                ? _c(
                                    "el-form-item",
                                    {
                                      key: "dynamicDate",
                                      attrs: { prop: "dynamicDate" },
                                    },
                                    [
                                      _c(
                                        "el-date-picker",
                                        _vm._b(
                                          {
                                            attrs: {
                                              type: "daterange",
                                              "range-separator": "至",
                                              "start-placeholder": "开始日期",
                                              "end-placeholder": "结束日期",
                                              format: "yyyy/MM/dd",
                                              "value-format": "yyyy/MM/dd",
                                            },
                                            on: { change: _vm.dynamicChange },
                                            model: {
                                              value:
                                                _vm.dynamicForm.dynamicDate,
                                              callback: function ($$v) {
                                                _vm.$set(
                                                  _vm.dynamicForm,
                                                  "dynamicDate",
                                                  $$v
                                                )
                                              },
                                              expression:
                                                "dynamicForm.dynamicDate",
                                            },
                                          },
                                          "el-date-picker",
                                          _vm.$attrs,
                                          false
                                        )
                                      ),
                                    ],
                                    1
                                  )
                                : _c(
                                    "div",
                                    [
                                      _c(
                                        "el-form-item",
                                        {
                                          key: "dynamicNum",
                                          attrs: { prop: "dynamicNum" },
                                        },
                                        [
                                          _c("el-input-number", {
                                            attrs: {
                                              "controls-position": "right",
                                              placeholder: "请输入",
                                              min: 1,
                                              step: 1,
                                              precision: 0,
                                            },
                                            on: { change: _vm.handleChange },
                                            model: {
                                              value: _vm.dynamicForm.dynamicNum,
                                              callback: function ($$v) {
                                                _vm.$set(
                                                  _vm.dynamicForm,
                                                  "dynamicNum",
                                                  $$v
                                                )
                                              },
                                              expression:
                                                "dynamicForm.dynamicNum",
                                            },
                                          }),
                                        ],
                                        1
                                      ),
                                      _c(
                                        "el-form-item",
                                        {
                                          key: "dynamicSelect",
                                          attrs: { prop: "dynamicSelect" },
                                        },
                                        [
                                          _c(
                                            "el-select",
                                            {
                                              on: { change: _vm.handleChange },
                                              model: {
                                                value:
                                                  _vm.dynamicForm.dynamicSelect,
                                                callback: function ($$v) {
                                                  _vm.$set(
                                                    _vm.dynamicForm,
                                                    "dynamicSelect",
                                                    $$v
                                                  )
                                                },
                                                expression:
                                                  "dynamicForm.dynamicSelect",
                                              },
                                            },
                                            _vm._l(
                                              _vm.optionList,
                                              function (item) {
                                                return _c("el-option", {
                                                  key: item.value,
                                                  attrs: {
                                                    label: item.label,
                                                    value: item.value,
                                                  },
                                                })
                                              }
                                            ),
                                            1
                                          ),
                                        ],
                                        1
                                      ),
                                    ],
                                    1
                                  ),
                            ],
                            1
                          ),
                        ],
                        1
                      )
                    : _vm._e(),
                ]),
              ]
            ),
          ]),
        ]
      ),
      _vm.errorShow
        ? _c("div", { staticClass: "el-complex-time-popover__error-tip" }, [
            _vm._v("\n    " + _vm._s(_vm.errorTxt) + "\n  "),
          ])
        : _vm._e(),
    ],
    1
  )
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./packages/complex-time-popover/src/main.vue?vue&type=template&id=5591debd&

// EXTERNAL MODULE: external "bi-element/lib/utils/date"
var date_ = __webpack_require__(13);
var date_default = /*#__PURE__*/__webpack_require__.n(date_);

// EXTERNAL MODULE: external "moment"
var external_moment_ = __webpack_require__(22);
var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/complex-time-popover/src/main.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'ElComplexTimePopover',
  props: {
    required: {
      type: Boolean,
      default: false
    },
    clearable: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    },
    relation: {
      type: Number,
      default: 1
    },
    value: Object,
    errorTxt: {
      type: String,
      default: '请选择'
    },
    optionList: {
      type: Array,
      default: function _default() {
        return [{
          value: 'day',
          label: '天'
        }, {
          value: 'month',
          label: '月'
        }, {
          value: 'year',
          label: '年'
        }];
      }
    },
    btnList: {
      type: Array,
      default: function _default() {
        return [{ key: 'today', chooseTag: '今日', disabled: false }, { key: 'yesterday', chooseTag: '昨日' }, { key: 'thisWeek', chooseTag: '本周' }, { key: 'lastWeek', chooseTag: '上周' }, { key: 'thisMonth', chooseTag: '本月' }, { key: 'lastMonth', chooseTag: '上月' }, { key: 'thisYear', chooseTag: '本年', disabled: false }, { key: 'lastYear', chooseTag: '去年', disabled: false }, {
          key: 'fixedTime',
          chooseTag: '固定日期',
          text: '设置固定日期则认为在此日期内有效，超出日期无效'
        }, {
          key: 'dynamicTime',
          chooseTag: '动态日期',
          text: '动态日期为一段时间的日期窗口，会跟随时间的变化进行推移计算'
        }];
      }
    }
  },
  data: function data() {
    return {
      hovering: false,
      focused: false,
      errorShow: false,
      btnKey: 'fixedTime',
      complexValue: {},
      showTabsList: [],
      dynamicRadio: 0,
      dynamicForm: {
        dynamicDate: [],
        dynamicNum: undefined,
        dynamicSelect: ''
      },
      dynamicDateList: [], // 动态日期（转过去xxx天数组传给后台）
      fixedFormList: [], // 固定日期（转时间戳传给后台）
      fixedForm: {
        items: [{
          value: []
        }]
      }
    };
  },

  computed: {
    showClear: function showClear() {
      return this.clearable && !this.disabled && (this.focused || this.hovering) && this.showTabsList.length > 0;
    }
  },
  watch: {
    complexValue: {
      handler: function handler(newVal) {
        this.$emit('getComplexValue', newVal);
      },

      deep: true
    },
    showTabsList: {
      handler: function handler(newVal) {
        if (newVal.length) {
          this.errorShow = false;
        }
      },

      deep: true
    },
    btnKey: function btnKey(newVal, oldVal) {
      if (oldVal === 'fixedTime') {
        this.fixedFormList = [];
        this.fixedForm = {
          items: [{
            value: []
          }]
        };
      } else if (oldVal === 'dynamicTime') {
        this.dynamicRadio = 0;
        this.dynamicDateList = [];
        this.$refs['dynamicForm'].resetFields();
      }
    }
  },
  created: function created() {
    this.echoData(this.value);
  },
  mounted: function mounted() {
    var _this = this;

    this.$watch('$refs.popoverRef.showPopper', function (newVal, oldVal) {
      _this.handleVertify(false, newVal, oldVal);
    }, {
      immediate: true
    });
  },

  methods: {
    echoData: function echoData(echoVal) {
      var _this2 = this;

      if (Object.prototype.toString.call(echoVal) === '[object Object]' && echoVal.key) {
        this.btnsTypeClick(echoVal.key);
        if (echoVal.key === 'fixedTime') {
          // 固定日期：{key: "fixedTime", value: [[1630425600000, 1630771200000], [1631030400000, 1634486400000]]}
          if (echoVal.value.length > 0) {
            var itemsArr = [];
            for (var _iterator = echoVal.value, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
              var _ref;

              if (_isArray) {
                if (_i >= _iterator.length) break;
                _ref = _iterator[_i++];
              } else {
                _i = _iterator.next();
                if (_i.done) break;
                _ref = _i.value;
              }

              var iterator = _ref;

              var obj = {};
              var arr = [];
              arr[0] = date_default.a.format(new Date(parseInt(iterator[0], 10)), 'yyyy/MM/dd');
              arr[1] = date_default.a.format(new Date(parseInt(iterator[1], 10)), 'yyyy/MM/dd');
              obj.value = arr;
              itemsArr.push(obj);
            }
            this.fixedForm.items = itemsArr;
            this.fixedChange();
          } else {
            this.fixedForm = {
              items: [{
                value: []
              }]
            };
          }
        } else if (echoVal.key === 'dynamicTime') {
          // 动态日期-具体时间段：{key: "dynamicTime", value: [-15, 14]}；
          // 动态日期-过去N（天/月/年）：{key: "dynamicTime", value: [2, "year"]}
          if (echoVal.value.length > 0) {
            if (typeof echoVal.value[1] === 'number' && !isNaN(echoVal.value[1])) {
              // 第二个值是数字-具体时间段
              var _arr = [];
              var now = date_default.a.format(new Date());
              this.$nextTick(function () {
                _arr[0] = external_moment_default()(now).add(echoVal.value[0], 'days').format('YYYY/MM/DD');
                _arr[1] = external_moment_default()(now).add(echoVal.value[1], 'days').format('YYYY/MM/DD');
                _this2.dynamicForm.dynamicDate = _arr;
                _this2.dynamicChange(_arr);
              });
            } else {
              this.dynamicRadio = 1;
              this.$nextTick(function () {
                _this2.dynamicForm = {
                  dynamicDate: [],
                  dynamicNum: echoVal.value[0],
                  dynamicSelect: echoVal.value[1]
                };
                _this2.handleChange();
              });
            }
          } else {
            this.dynamicForm = {
              dynamicDate: [],
              dynamicNum: undefined,
              dynamicSelect: ''
            };
          }
        }
      }
    },

    /**
     * @description: 校验
     * @param {*} flag
     * @param {*} newVal
     * @param {*} oldVal
     * @return {*}
     */
    handleVertify: function handleVertify() {
      var flag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
      var newVal = arguments[1];
      var oldVal = arguments[2];

      if (this.required) {
        if ((flag || oldVal && !newVal && !this.disabled) && this.showTabsList.length <= 0) {
          this.errorShow = true;
        }
      } else {
        this.errorShow = false;
      }
    },
    handleReset: function handleReset() {
      this.complexValue = {};
      this.showTabsList = [];
      this.btnKey = 'fixedTime';
      this.fixedFormList = [];
      this.fixedForm = {
        items: [{
          value: []
        }]
      };
      this.errorShow = false;
    },
    handleFocus: function handleFocus() {
      this.focused = true;
    },
    handleBlur: function handleBlur() {
      this.focused = false;
    },

    /**
     * @description: 清空
     * @return {*}
     */
    clear: function clear() {
      this.handleReset();
      if (this.required) {
        this.errorShow = true;
      }
    },
    btnsTypeClick: function btnsTypeClick(key) {
      if (this.btnKey !== key) {
        this.btnKey = key;
        this.showTabsList = [];
      }
      if (key !== 'fixedTime' && key !== 'dynamicTime') {
        this.complexValue = { key: this.btnKey };
        this.$refs.popoverRef && this.$refs.popoverRef.doClose();
      } else {
        this.complexValue = { key: this.btnKey, value: [] };
      }
      switch (this.btnKey) {
        case 'today':
          this.showTabsList[0] = date_default.a.format(new Date(), 'yyyy/MM/dd');
          break;
        case 'yesterday':
          var date = new Date();
          date.setTime(date.getTime() - 3600 * 1000 * 24);
          this.showTabsList[0] = date_default.a.format(date, 'yyyy/MM/dd');
          break;
        case 'thisWeek':
          var start = new Date();
          var end = new Date();
          var nows = start.getDay() || 7;
          start.setTime(start.getTime() - 3600 * 1000 * 24 * (nows - 1));
          this.showTabsList[0] = date_default.a.format(start, 'yyyy/MM/dd') + ' - ' + date_default.a.format(end, 'yyyy/MM/dd');
          break;
        case 'lastWeek':
          var dataValue = new Date();
          var year = dataValue.getFullYear();
          var month = dataValue.getMonth() + 1;
          var day = dataValue.getDate();
          var thisWeekStart; // 本周周一的时间
          if (dataValue.getDay() === 0) {
            // 周天的情况；
            thisWeekStart = new Date(year + '/' + month + '/' + day).getTime() - (dataValue.getDay() + 6) * 86400000;
          } else {
            thisWeekStart = new Date(year + '/' + month + '/' + day).getTime() - (dataValue.getDay() - 1) * 86400000;
          }
          var prevWeekStart = thisWeekStart - 7 * 86400000; // 上周周一的时间
          var prevWeekEnd = thisWeekStart - 1 * 86400000; // 上周周日的时间
          var lastWeekStart = new Date(prevWeekStart); // 开始时间
          var lastWeekEnd = new Date(prevWeekEnd); // 结束时间
          this.showTabsList[0] = date_default.a.format(lastWeekStart, 'yyyy/MM/dd') + ' - ' + date_default.a.format(lastWeekEnd, 'yyyy/MM/dd');
          break;
        case 'thisMonth':
          var thisMonthEnd = new Date();
          var thisMonthStart = new Date();
          thisMonthStart.setDate(1);
          this.showTabsList[0] = date_default.a.format(thisMonthStart, 'yyyy/MM/dd') + ' - ' + date_default.a.format(thisMonthEnd, 'yyyy/MM/dd');
          break;
        case 'lastMonth':
          var lastMonthStart = new Date();
          var lastMonthEnd = new Date(lastMonthStart);
          lastMonthEnd.setMonth(lastMonthStart.getMonth());
          lastMonthStart.setMonth(lastMonthStart.getMonth() - 1);
          lastMonthEnd.setDate(0);
          lastMonthStart.setDate(1);
          this.showTabsList[0] = date_default.a.format(lastMonthStart, 'yyyy/MM/dd') + ' - ' + date_default.a.format(lastMonthEnd, 'yyyy/MM/dd');
          break;
        case 'thisYear':
          var thisYearEnd = new Date();
          var thisYearStart = new Date();
          thisYearStart.setDate(1);
          thisYearStart.setMonth(0);
          this.showTabsList[0] = date_default.a.format(thisYearStart, 'yyyy/MM/dd') + ' - ' + date_default.a.format(thisYearEnd, 'yyyy/MM/dd');
          break;
        case 'lastYear':
          var lastYearStart = new Date();
          var lastYearEnd = new Date();
          lastYearStart.setFullYear(lastYearStart.getFullYear() - 1);
          lastYearStart.setDate(1);
          lastYearStart.setMonth(0);
          lastYearEnd.setFullYear(lastYearStart.getFullYear());
          lastYearEnd.setDate(0);
          lastYearEnd.setMonth(11);
          this.showTabsList[0] = date_default.a.format(lastYearStart, 'yyyy/MM/dd') + ' - ' + date_default.a.format(lastYearEnd, 'yyyy/MM/dd');
          break;
        default:
          return '未匹配到合适的弹窗！';
      }
    },


    // 固定日期
    handleAdd: function handleAdd() {
      this.fixedForm.items.push({
        value: '',
        key: Date.now()
      });
    },
    handleRemove: function handleRemove(item) {
      var index = this.fixedForm.items.indexOf(item);
      if (index !== -1) {
        this.fixedForm.items.splice(index, 1);
      }
      // this.$refs.popoverRef.updatePopper();
      this.fixedChange();
    },

    /**
     * @description: 判断一组数字是否连续
     * @param {*} arr
     * @return {*}
     */
    continuous: function continuous(arr) {
      var t;
      var ta;
      var r = [];
      arr.forEach(function (v) {
        if (t === v) {
          ta.push(t);
          t++;
          return;
        }
        ta = [v];
        t = v + 1;
        r.push(ta);
      });
      return r;
    },

    /**
     * @description: 转换时间戳并去重数据
     * @param {*}
     * @return {*}
     */
    fixedChange: function fixedChange() {
      var arr = [];
      var now = date_default.a.format(new Date(), 'yyyy/MM/dd');
      for (var _iterator2 = this.fixedForm.items, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
        var _ref2;

        if (_isArray2) {
          if (_i2 >= _iterator2.length) break;
          _ref2 = _iterator2[_i2++];
        } else {
          _i2 = _iterator2.next();
          if (_i2.done) break;
          _ref2 = _i2.value;
        }

        var iterator = _ref2;

        var e = iterator.value;
        if (e && e.length > 0 && e[0]) {
          var one = external_moment_default()(e[0]).diff(external_moment_default()(now), 'days');
          var two = external_moment_default()(e[1]).diff(external_moment_default()(now), 'days');
          var temp = one;
          while (temp <= two) {
            arr.push(temp);
            temp++;
          }
        }
      }
      var tempArr = Array.from(new Set(arr));
      // 排序
      tempArr = tempArr.sort(function (a, b) {
        return a - b;
      });
      // console.log(this.continuous(tempArr))
      // 去重之后的时间段数组（距离多少天）
      var continuousArr = this.continuous(tempArr);
      var showTabsArr = [];
      var tempList = [];
      for (var _iterator3 = continuousArr, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
        var _ref3;

        if (_isArray3) {
          if (_i3 >= _iterator3.length) break;
          _ref3 = _iterator3[_i3++];
        } else {
          _i3 = _iterator3.next();
          if (_i3.done) break;
          _ref3 = _i3.value;
        }

        var continuousItem = _ref3;

        var str = '';
        var start = external_moment_default()(now).add(continuousItem[0], 'days').format('YYYY/MM/DD');
        var end = external_moment_default()(now).add(continuousItem[continuousItem.length - 1], 'days').format('YYYY/MM/DD');
        str = start + ' - ' + end;
        showTabsArr.push(str);
        var _tempArr = [];
        _tempArr[0] = new Date(start).getTime();
        _tempArr[1] = new Date(end).getTime();
        tempList.push(_tempArr);
      }
      this.fixedFormList = tempList;
      this.showTabsList = showTabsArr;
      this.complexValue = {
        key: this.btnKey,
        value: this.fixedFormList
      };
    },


    // 动态日期
    /**
     * @description: 动态时间-具体时间
     * @param {*} e
     * @return {*}
     */
    dynamicChange: function dynamicChange(e) {
      if (e && e.length > 0 && e[0]) {
        this.showTabsList = [e[0] + ' - ' + e[1]];
        var now = date_default.a.format(new Date());
        this.dynamicDateList[0] = external_moment_default()(e[0]).diff(external_moment_default()(now), 'days');
        this.dynamicDateList[1] = external_moment_default()(e[1]).diff(external_moment_default()(now), 'days');
        this.complexValue = {
          key: this.btnKey,
          value: this.dynamicDateList // 具体时间、以当天（0）为基准
        };
      } else {
        this.complexValue = {
          key: this.btnKey,
          value: []
        };
        this.showTabsList = [];
      }
    },
    dynamicTabClick: function dynamicTabClick() {
      var _this3 = this;

      var oldRadio = JSON.parse(JSON.stringify(this.dynamicRadio));
      this.$nextTick(function () {
        if (oldRadio !== _this3.dynamicRadio) {
          _this3.$refs['dynamicForm'].resetFields();
          _this3.dynamicDateList = [];
          _this3.showTabsList = [];
          _this3.complexValue = {
            key: 'dynamicTime',
            value: []
          };
        }
      });
    },

    /**
     * @description: 动态时间-过去N（天/月/年）
     * @param {*}
     * @return {*}
     */
    handleChange: function handleChange() {
      var num = this.dynamicForm.dynamicNum;
      var e = this.dynamicForm.dynamicSelect;
      var now = date_default.a.format(new Date());
      if (num && e) {
        var start = '';
        var end = external_moment_default()(now).subtract(1, 'days').format('YYYY/MM/DD');
        if (e === 'day') {
          start = external_moment_default()(now).subtract(num, 'days').format('YYYY/MM/DD');
          this.showTabsList[0] = start + ' - ' + end;
        } else if (e === 'month') {
          start = external_moment_default()(now).subtract(num, 'months').subtract(1, 'days').format('YYYY/MM/DD');
          this.showTabsList[0] = start + ' - ' + end;
        } else if (e === 'year') {
          start = external_moment_default()(now).subtract(num, 'years').subtract(1, 'days').format('YYYY/MM/DD');
          this.showTabsList[0] = start + ' - ' + end;
        }
        var arr = [num, e];
        this.complexValue = { key: this.btnKey, value: arr };
        this.errorShow = false;
      } else {
        if (!num) {
          this.dynamicTabClick();
        }
      }
    }
  }
});
// CONCATENATED MODULE: ./packages/complex-time-popover/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/complex-time-popover/src/main.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_mainvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
component.options.__file = "packages/complex-time-popover/src/main.vue"
/* harmony default export */ var main = (component.exports);
// CONCATENATED MODULE: ./packages/complex-time-popover/index.js


/* istanbul ignore next */
main.install = function (Vue) {
  Vue.component(main.name, main);
};

/* harmony default export */ var complex_time_popover = __webpack_exports__["default"] = (main);

/***/ }),

/***/ 22:
/***/ (function(module, exports) {

module.exports = require("moment");

/***/ })

/******/ });