框架源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1979 lines
60 KiB

4 years ago
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 577);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 12:
  90. /***/ (function(module, exports) {
  91. /**
  92. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  93. * embed the css on the page. This breaks all relative urls because now they are relative to a
  94. * bundle instead of the current page.
  95. *
  96. * One solution is to only use full urls, but that may be impossible.
  97. *
  98. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  99. *
  100. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  101. *
  102. */
  103. module.exports = function (css) {
  104. // get current location
  105. var location = typeof window !== "undefined" && window.location;
  106. if (!location) {
  107. throw new Error("fixUrls requires window.location");
  108. }
  109. // blank or null?
  110. if (!css || typeof css !== "string") {
  111. return css;
  112. }
  113. var baseUrl = location.protocol + "//" + location.host;
  114. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  115. // convert each url(...)
  116. /*
  117. This regular expression is just a way to recursively match brackets within
  118. a string.
  119. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  120. ( = Start a capturing group
  121. (?: = Start a non-capturing group
  122. [^)(] = Match anything that isn't a parentheses
  123. | = OR
  124. \( = Match a start parentheses
  125. (?: = Start another non-capturing groups
  126. [^)(]+ = Match anything that isn't a parentheses
  127. | = OR
  128. \( = Match a start parentheses
  129. [^)(]* = Match anything that isn't a parentheses
  130. \) = Match a end parentheses
  131. ) = End Group
  132. *\) = Match anything and then a close parens
  133. ) = Close non-capturing group
  134. * = Match anything
  135. ) = Close capturing group
  136. \) = Match a close parens
  137. /gi = Get all matches, not the first. Be case insensitive.
  138. */
  139. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  140. // strip quotes (if they exist)
  141. var unquotedOrigUrl = origUrl
  142. .trim()
  143. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  144. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  145. // already a full url? no change
  146. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
  147. return fullMatch;
  148. }
  149. // convert the url to a full url
  150. var newUrl;
  151. if (unquotedOrigUrl.indexOf("//") === 0) {
  152. //TODO: should we add protocol?
  153. newUrl = unquotedOrigUrl;
  154. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  155. // path should be relative to the base url
  156. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  157. } else {
  158. // path should be relative to current directory
  159. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  160. }
  161. // send back the fixed url(...)
  162. return "url(" + JSON.stringify(newUrl) + ")";
  163. });
  164. // send back the fixed css
  165. return fixedCss;
  166. };
  167. /***/ }),
  168. /***/ 15:
  169. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  170. "use strict";
  171. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DEFAULT_THEME; });
  172. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_COLORS; });
  173. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return HEAT_MAP_COLOR; });
  174. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return HEAT_BMAP_COLOR; });
  175. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return itemPoint; });
  176. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return STATIC_PROPS; });
  177. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ECHARTS_SETTINGS; });
  178. var DEFAULT_THEME = {
  179. categoryAxis: {
  180. axisLine: { show: false },
  181. axisTick: { show: false },
  182. splitLine: { show: false }
  183. },
  184. valueAxis: {
  185. axisLine: { show: false }
  186. },
  187. line: {
  188. smooth: true
  189. },
  190. grid: {
  191. containLabel: true,
  192. left: 10,
  193. right: 10
  194. }
  195. };
  196. var DEFAULT_COLORS = ['#19d4ae', '#5ab1ef', '#fa6e86', '#ffb980', '#0067a6', '#c4b4e4', '#d87a80', '#9cbbff', '#d9d0c7', '#87a997', '#d49ea2', '#5b4947', '#7ba3a8'];
  197. var HEAT_MAP_COLOR = ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026'];
  198. var HEAT_BMAP_COLOR = ['blue', 'blue', 'green', 'yellow', 'red'];
  199. var itemPoint = function itemPoint(color) {
  200. return ['<span style="', 'background-color:' + color + ';', 'display: inline-block;', 'width: 10px;', 'height: 10px;', 'border-radius: 50%;', 'margin-right:2px;', '"></span>'].join('');
  201. };
  202. var STATIC_PROPS = ['initOptions', 'loading', 'dataEmpty', 'judgeWidth', 'widthChangeDelay'];
  203. var ECHARTS_SETTINGS = ['grid', 'dataZoom', 'visualMap', 'toolbox', 'title', 'legend', 'xAxis', 'yAxis', 'radar', 'tooltip', 'axisPointer', 'brush', 'geo', 'timeline', 'graphic', 'series', 'backgroundColor', 'textStyle'];
  204. /***/ }),
  205. /***/ 161:
  206. /***/ (function(module, exports) {
  207. module.exports = require("echarts/lib/chart/map");
  208. /***/ }),
  209. /***/ 162:
  210. /***/ (function(module, exports) {
  211. module.exports = require("echarts/extension/bmap/bmap");
  212. /***/ }),
  213. /***/ 163:
  214. /***/ (function(module, exports) {
  215. module.exports = require("echarts/lib/component/visualMap");
  216. /***/ }),
  217. /***/ 17:
  218. /***/ (function(module, exports) {
  219. module.exports = require("echarts/lib/echarts");
  220. /***/ }),
  221. /***/ 2:
  222. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  223. "use strict";
  224. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  225. /* globals __VUE_SSR_CONTEXT__ */
  226. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  227. // This module is a runtime utility for cleaner component module output and will
  228. // be included in the final webpack user bundle.
  229. function normalizeComponent (
  230. scriptExports,
  231. render,
  232. staticRenderFns,
  233. functionalTemplate,
  234. injectStyles,
  235. scopeId,
  236. moduleIdentifier, /* server only */
  237. shadowMode /* vue-cli only */
  238. ) {
  239. // Vue.extend constructor export interop
  240. var options = typeof scriptExports === 'function'
  241. ? scriptExports.options
  242. : scriptExports
  243. // render functions
  244. if (render) {
  245. options.render = render
  246. options.staticRenderFns = staticRenderFns
  247. options._compiled = true
  248. }
  249. // functional template
  250. if (functionalTemplate) {
  251. options.functional = true
  252. }
  253. // scopedId
  254. if (scopeId) {
  255. options._scopeId = 'data-v-' + scopeId
  256. }
  257. var hook
  258. if (moduleIdentifier) { // server build
  259. hook = function (context) {
  260. // 2.3 injection
  261. context =
  262. context || // cached call
  263. (this.$vnode && this.$vnode.ssrContext) || // stateful
  264. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  265. // 2.2 with runInNewContext: true
  266. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  267. context = __VUE_SSR_CONTEXT__
  268. }
  269. // inject component styles
  270. if (injectStyles) {
  271. injectStyles.call(this, context)
  272. }
  273. // register component module identifier for async chunk inferrence
  274. if (context && context._registeredComponents) {
  275. context._registeredComponents.add(moduleIdentifier)
  276. }
  277. }
  278. // used by ssr in case component is cached and beforeCreate
  279. // never gets called
  280. options._ssrRegister = hook
  281. } else if (injectStyles) {
  282. hook = shadowMode
  283. ? function () {
  284. injectStyles.call(
  285. this,
  286. (options.functional ? this.parent : this).$root.$options.shadowRoot
  287. )
  288. }
  289. : injectStyles
  290. }
  291. if (hook) {
  292. if (options.functional) {
  293. // for template-only hot-reload because in that case the render fn doesn't
  294. // go through the normalizer
  295. options._injectStyles = hook
  296. // register for functional component in vue file
  297. var originalRender = options.render
  298. options.render = function renderWithStyleInjection (h, context) {
  299. hook.call(context)
  300. return originalRender(h, context)
  301. }
  302. } else {
  303. // inject component registration as beforeCreate hook
  304. var existing = options.beforeCreate
  305. options.beforeCreate = existing
  306. ? [].concat(existing, hook)
  307. : [hook]
  308. }
  309. }
  310. return {
  311. exports: scriptExports,
  312. options: options
  313. }
  314. }
  315. /***/ }),
  316. /***/ 261:
  317. /***/ (function(module, exports) {
  318. module.exports = require("echarts/lib/chart/heatmap");
  319. /***/ }),
  320. /***/ 3:
  321. /***/ (function(module, exports) {
  322. module.exports = require("utils-lite");
  323. /***/ }),
  324. /***/ 31:
  325. /***/ (function(module, exports) {
  326. module.exports = require("numerify");
  327. /***/ }),
  328. /***/ 32:
  329. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  330. "use strict";
  331. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getFormated; });
  332. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getStackMap; });
  333. /* unused harmony export $get */
  334. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getMapJSON; });
  335. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getBmap; });
  336. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getAmap; });
  337. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return setArrayValue; });
  338. /* harmony import */ var numerify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
  339. /* harmony import */ var numerify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numerify__WEBPACK_IMPORTED_MODULE_0__);
  340. /* harmony import */ var utils_lite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
  341. /* harmony import */ var utils_lite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(utils_lite__WEBPACK_IMPORTED_MODULE_1__);
  342. var getFormated = function getFormated(val, type, digit) {
  343. var defaultVal = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '-';
  344. if (isNaN(val)) return defaultVal;
  345. if (!type) return val;
  346. if (Object(utils_lite__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(type)) return type(val, numerify__WEBPACK_IMPORTED_MODULE_0___default.a);
  347. digit = isNaN(digit) ? 0 : ++digit;
  348. var digitStr = '.[' + new Array(digit).join(0) + ']';
  349. var formatter = type;
  350. switch (type) {
  351. case 'KMB':
  352. formatter = digit ? '0,0' + digitStr + 'a' : '0,0a';
  353. break;
  354. case 'normal':
  355. formatter = digit ? '0,0' + digitStr : '0,0';
  356. break;
  357. case 'percent':
  358. formatter = digit ? '0,0' + digitStr + '%' : '0,0.[00]%';
  359. break;
  360. }
  361. return numerify__WEBPACK_IMPORTED_MODULE_0___default()(val, formatter);
  362. };
  363. var getStackMap = function getStackMap(stack) {
  364. var stackMap = {};
  365. Object.keys(stack).forEach(function (item) {
  366. stack[item].forEach(function (name) {
  367. stackMap[name] = item;
  368. });
  369. });
  370. return stackMap;
  371. };
  372. var $get = function $get(url) {
  373. /* eslint-disable */
  374. return new Promise(function (resolve, reject) {
  375. var xhr = new XMLHttpRequest();
  376. xhr.open('GET', url);
  377. xhr.send(null);
  378. xhr.onload = function () {
  379. resolve(JSON.parse(xhr.responseText));
  380. };
  381. xhr.onerror = function () {
  382. reject(JSON.parse(xhr.responseText));
  383. };
  384. });
  385. };
  386. var mapPromise = {};
  387. var getMapJSON = function getMapJSON(_ref) {
  388. var position = _ref.position,
  389. positionJsonLink = _ref.positionJsonLink,
  390. beforeRegisterMapOnce = _ref.beforeRegisterMapOnce,
  391. mapURLProfix = _ref.mapURLProfix;
  392. var link = positionJsonLink || '' + mapURLProfix + position + '.json';
  393. if (!mapPromise[link]) {
  394. mapPromise[link] = $get(link).then(function (res) {
  395. if (beforeRegisterMapOnce) res = beforeRegisterMapOnce(res);
  396. return res;
  397. });
  398. }
  399. return mapPromise[link];
  400. };
  401. var bmapPromise = null;
  402. var amapPromise = null;
  403. var getBmap = function getBmap(key, v) {
  404. if (!bmapPromise) {
  405. bmapPromise = new Promise(function (resolve, reject) {
  406. var callbackName = 'bmap' + Date.now();
  407. window[callbackName] = resolve;
  408. var script = document.createElement('script');
  409. script.src = ['https://api.map.baidu.com/api?v=' + (v || '2.0'), 'ak=' + key, 'callback=' + callbackName].join('&');
  410. document.body.appendChild(script);
  411. });
  412. }
  413. return bmapPromise;
  414. };
  415. var getAmap = function getAmap(key, v) {
  416. if (!amapPromise) {
  417. amapPromise = new Promise(function (resolve, reject) {
  418. var callbackName = 'amap' + Date.now();
  419. window[callbackName] = resolve;
  420. var script = document.createElement('script');
  421. script.src = ['https://webapi.amap.com/maps?v=' + (v || '1.4.3'), 'key=' + key, 'callback=' + callbackName].join('&');
  422. document.body.appendChild(script);
  423. });
  424. }
  425. return amapPromise;
  426. };
  427. function setArrayValue(arr, index, value) {
  428. if (arr[index] !== undefined) {
  429. arr[index].push(value);
  430. } else {
  431. arr[index] = [value];
  432. }
  433. }
  434. /***/ }),
  435. /***/ 39:
  436. /***/ (function(module, exports, __webpack_require__) {
  437. var content = __webpack_require__(57);
  438. if(typeof content === 'string') content = [[module.i, content, '']];
  439. var transform;
  440. var insertInto;
  441. var options = {"hmr":true}
  442. options.transform = transform
  443. options.insertInto = undefined;
  444. var update = __webpack_require__(6)(content, options);
  445. if(content.locals) module.exports = content.locals;
  446. if(false) {}
  447. /***/ }),
  448. /***/ 40:
  449. /***/ (function(module, exports, __webpack_require__) {
  450. var content = __webpack_require__(59);
  451. if(typeof content === 'string') content = [[module.i, content, '']];
  452. var transform;
  453. var insertInto;
  454. var options = {"hmr":true}
  455. options.transform = transform
  456. options.insertInto = undefined;
  457. var update = __webpack_require__(6)(content, options);
  458. if(content.locals) module.exports = content.locals;
  459. if(false) {}
  460. /***/ }),
  461. /***/ 43:
  462. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  463. "use strict";
  464. // EXTERNAL MODULE: external "echarts/lib/echarts"
  465. var echarts_ = __webpack_require__(17);
  466. var echarts_default = /*#__PURE__*/__webpack_require__.n(echarts_);
  467. // EXTERNAL MODULE: external "echarts/lib/component/tooltip"
  468. var tooltip_ = __webpack_require__(54);
  469. // EXTERNAL MODULE: external "echarts/lib/component/legend"
  470. var legend_ = __webpack_require__(55);
  471. // EXTERNAL MODULE: external "numerify"
  472. var external_numerify_ = __webpack_require__(31);
  473. var external_numerify_default = /*#__PURE__*/__webpack_require__.n(external_numerify_);
  474. // EXTERNAL MODULE: external "utils-lite"
  475. var external_utils_lite_ = __webpack_require__(3);
  476. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/utils/charts/components/loading.vue?vue&type=template&id=6d18fb16&
  477. var loadingvue_type_template_id_6d18fb16_render = function() {
  478. var _vm = this
  479. var _h = _vm.$createElement
  480. var _c = _vm._self._c || _h
  481. return _c("div", { staticClass: "v-charts-component-loading" }, [
  482. _c("div", { staticClass: "loader" }, [
  483. _c("div", { staticClass: "loading-spinner" }, [
  484. _c(
  485. "svg",
  486. { staticClass: "circular", attrs: { viewBox: "25 25 50 50" } },
  487. [
  488. _c("circle", {
  489. staticClass: "path",
  490. attrs: { cx: "50", cy: "50", r: "20", fill: "none" }
  491. })
  492. ]
  493. )
  494. ])
  495. ])
  496. ])
  497. }
  498. var staticRenderFns = []
  499. loadingvue_type_template_id_6d18fb16_render._withStripped = true
  500. // CONCATENATED MODULE: ./src/utils/charts/components/loading.vue?vue&type=template&id=6d18fb16&
  501. // EXTERNAL MODULE: ./src/utils/charts/components/loading.vue?vue&type=style&index=0&lang=css&
  502. var loadingvue_type_style_index_0_lang_css_ = __webpack_require__(56);
  503. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  504. var componentNormalizer = __webpack_require__(2);
  505. // CONCATENATED MODULE: ./src/utils/charts/components/loading.vue
  506. var script = {}
  507. /* normalize component */
  508. var component = Object(componentNormalizer["a" /* default */])(
  509. script,
  510. loadingvue_type_template_id_6d18fb16_render,
  511. staticRenderFns,
  512. false,
  513. null,
  514. null,
  515. null
  516. )
  517. /* hot reload */
  518. if (false) { var api; }
  519. component.options.__file = "src/utils/charts/components/loading.vue"
  520. /* harmony default export */ var loading = (component.exports);
  521. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./src/utils/charts/components/data-empty.vue?vue&type=template&id=1f2f0a80&
  522. var data_emptyvue_type_template_id_1f2f0a80_render = function() {
  523. var _vm = this
  524. var _h = _vm.$createElement
  525. var _c = _vm._self._c || _h
  526. return _c("div", { staticClass: "v-charts-data-empty" }, [
  527. _vm._v("\n 暂无数据\n")
  528. ])
  529. }
  530. var data_emptyvue_type_template_id_1f2f0a80_staticRenderFns = []
  531. data_emptyvue_type_template_id_1f2f0a80_render._withStripped = true
  532. // CONCATENATED MODULE: ./src/utils/charts/components/data-empty.vue?vue&type=template&id=1f2f0a80&
  533. // EXTERNAL MODULE: ./src/utils/charts/components/data-empty.vue?vue&type=style&index=0&lang=css&
  534. var data_emptyvue_type_style_index_0_lang_css_ = __webpack_require__(58);
  535. // CONCATENATED MODULE: ./src/utils/charts/components/data-empty.vue
  536. var data_empty_script = {}
  537. /* normalize component */
  538. var data_empty_component = Object(componentNormalizer["a" /* default */])(
  539. data_empty_script,
  540. data_emptyvue_type_template_id_1f2f0a80_render,
  541. data_emptyvue_type_template_id_1f2f0a80_staticRenderFns,
  542. false,
  543. null,
  544. null,
  545. null
  546. )
  547. /* hot reload */
  548. if (false) { var data_empty_api; }
  549. data_empty_component.options.__file = "src/utils/charts/components/data-empty.vue"
  550. /* harmony default export */ var data_empty = (data_empty_component.exports);
  551. // EXTERNAL MODULE: ./src/utils/charts/constants.js
  552. var constants = __webpack_require__(15);
  553. // CONCATENATED MODULE: ./src/utils/charts/modules/extend.js
  554. /* harmony default export */ var modules_extend = (function (options, extend) {
  555. Object.keys(extend).forEach(function (attr) {
  556. var value = extend[attr];
  557. if (~attr.indexOf('.')) {
  558. // eg: a.b.c a.1.b
  559. Object(external_utils_lite_["set"])(options, attr, value);
  560. } else if (typeof value === 'function') {
  561. // get callback value
  562. options[attr] = value(options[attr]);
  563. } else {
  564. // mixin extend value
  565. if (Object(external_utils_lite_["isArray"])(options[attr]) && Object(external_utils_lite_["isObject"])(options[attr][0])) {
  566. // eg: [{ xx: 1 }, { xx: 2 }]
  567. options[attr].forEach(function (option, index) {
  568. options[attr][index] = Object.assign({}, option, value);
  569. });
  570. } else if (Object(external_utils_lite_["isObject"])(options[attr])) {
  571. // eg: { xx: 1, yy: 2 }
  572. options[attr] = Object.assign({}, options[attr], value);
  573. } else {
  574. options[attr] = value;
  575. }
  576. }
  577. });
  578. });
  579. // CONCATENATED MODULE: ./src/utils/charts/modules/mark.js
  580. /* harmony default export */ var mark = (function (seriesItem, marks) {
  581. Object.keys(marks).forEach(function (key) {
  582. if (marks[key]) seriesItem[key] = marks[key];
  583. });
  584. });
  585. // CONCATENATED MODULE: ./src/utils/charts/modules/animation.js
  586. /* harmony default export */ var animation = (function (options, animation) {
  587. Object.keys(animation).forEach(function (key) {
  588. options[key] = animation[key];
  589. });
  590. });
  591. // CONCATENATED MODULE: ./src/utils/charts/core.js
  592. /* harmony default export */ var core = __webpack_exports__["a"] = ({
  593. render: function render(h) {
  594. return h('div', {
  595. class: [Object(external_utils_lite_["camelToKebab"])(this.$options.name || this.$options._componentTag)],
  596. style: this.canvasStyle
  597. }, [h('div', {
  598. style: this.canvasStyle,
  599. class: { 'v-charts-mask-status': this.dataEmpty || this.loading },
  600. ref: 'canvas'
  601. }), h(data_empty, {
  602. style: { display: this.dataEmpty ? '' : 'none' }
  603. }), h(loading, {
  604. style: { display: this.loading ? '' : 'none' }
  605. }), this.$slots.default]);
  606. },
  607. props: {
  608. data: { type: [Object, Array], default: function _default() {
  609. return {};
  610. }
  611. },
  612. settings: { type: Object, default: function _default() {
  613. return {};
  614. }
  615. },
  616. width: { type: String, default: 'auto' },
  617. height: { type: String, default: '400px' },
  618. beforeConfig: { type: Function },
  619. afterConfig: { type: Function },
  620. afterSetOption: { type: Function },
  621. afterSetOptionOnce: { type: Function },
  622. events: { type: Object },
  623. grid: { type: [Object, Array] },
  624. colors: { type: Array },
  625. tooltipVisible: { type: Boolean, default: true },
  626. legendVisible: { type: Boolean, default: true },
  627. legendPosition: { type: String },
  628. markLine: { type: Object },
  629. markArea: { type: Object },
  630. markPoint: { type: Object },
  631. visualMap: { type: [Object, Array] },
  632. dataZoom: { type: [Object, Array] },
  633. toolbox: { type: [Object, Array] },
  634. initOptions: { type: Object, default: function _default() {
  635. return {};
  636. }
  637. },
  638. title: [Object, Array],
  639. legend: [Object, Array],
  640. xAxis: [Object, Array],
  641. yAxis: [Object, Array],
  642. radar: Object,
  643. tooltip: Object,
  644. axisPointer: [Object, Array],
  645. brush: [Object, Array],
  646. geo: [Object, Array],
  647. timeline: [Object, Array],
  648. graphic: [Object, Array],
  649. series: [Object, Array],
  650. backgroundColor: [Object, String],
  651. textStyle: [Object, Array],
  652. animation: Object,
  653. theme: Object,
  654. themeName: String,
  655. loading: Boolean,
  656. dataEmpty: Boolean,
  657. extend: Object,
  658. judgeWidth: { type: Boolean, default: false },
  659. widthChangeDelay: { type: Number, default: 300 },
  660. tooltipFormatter: { type: Function },
  661. resizeable: { type: Boolean, default: true },
  662. resizeDelay: { type: Number, default: 200 },
  663. changeDelay: { type: Number, default: 0 },
  664. setOptionOpts: { type: [Boolean, Object], default: true },
  665. cancelResizeCheck: Boolean,
  666. notSetUnchange: Array,
  667. log: Boolean
  668. },
  669. watch: {
  670. data: {
  671. deep: true,
  672. handler: function handler(v) {
  673. if (v) {
  674. this.changeHandler();
  675. }
  676. }
  677. },
  678. settings: {
  679. deep: true,
  680. handler: function handler(v) {
  681. if (v.type && this.chartLib) this.chartHandler = this.chartLib[v.type];
  682. this.changeHandler();
  683. }
  684. },
  685. width: 'nextTickResize',
  686. height: 'nextTickResize',
  687. events: {
  688. deep: true,
  689. handler: 'createEventProxy'
  690. },
  691. theme: {
  692. deep: true,
  693. handler: 'themeChange'
  694. },
  695. themeName: 'themeChange',
  696. resizeable: 'resizeableHandler'
  697. },
  698. computed: {
  699. canvasStyle: function canvasStyle() {
  700. return {
  701. width: this.width,
  702. height: this.height,
  703. position: 'relative'
  704. };
  705. },
  706. chartColor: function chartColor() {
  707. return this.colors || this.theme && this.theme.color || constants["a" /* DEFAULT_COLORS */];
  708. }
  709. },
  710. methods: {
  711. dataHandler: function dataHandler() {
  712. if (!this.chartHandler) return;
  713. var data = this.data;
  714. var _data = data,
  715. _data$columns = _data.columns,
  716. columns = _data$columns === undefined ? [] : _data$columns,
  717. _data$rows = _data.rows,
  718. rows = _data$rows === undefined ? [] : _data$rows;
  719. var extra = {
  720. tooltipVisible: this.tooltipVisible,
  721. legendVisible: this.legendVisible,
  722. echarts: this.echarts,
  723. color: this.chartColor,
  724. tooltipFormatter: this.tooltipFormatter,
  725. _once: this._once
  726. };
  727. if (this.beforeConfig) data = this.beforeConfig(data);
  728. var options = this.chartHandler(columns, rows, this.settings, extra);
  729. if (options) {
  730. if (typeof options.then === 'function') {
  731. options.then(this.optionsHandler);
  732. } else {
  733. this.optionsHandler(options);
  734. }
  735. }
  736. },
  737. nextTickResize: function nextTickResize() {
  738. this.$nextTick(this.resize);
  739. },
  740. resize: function resize() {
  741. if (!this.cancelResizeCheck) {
  742. if (this.$el && this.$el.clientWidth && this.$el.clientHeight) {
  743. this.echartsResize();
  744. }
  745. } else {
  746. this.echartsResize();
  747. }
  748. },
  749. echartsResize: function echartsResize() {
  750. this.echarts && this.echarts.resize();
  751. },
  752. optionsHandler: function optionsHandler(options) {
  753. var _this = this;
  754. // legend
  755. if (this.legendPosition && options.legend) {
  756. options.legend[this.legendPosition] = 10;
  757. if (~['left', 'right'].indexOf(this.legendPosition)) {
  758. options.legend.top = 'middle';
  759. options.legend.orient = 'vertical';
  760. }
  761. }
  762. // color
  763. options.color = this.chartColor;
  764. // echarts self settings
  765. constants["c" /* ECHARTS_SETTINGS */].forEach(function (setting) {
  766. if (_this[setting]) options[setting] = _this[setting];
  767. });
  768. // animation
  769. if (this.animation) animation(options, this.animation);
  770. // marks
  771. if (this.markArea || this.markLine || this.markPoint) {
  772. var marks = {
  773. markArea: this.markArea,
  774. markLine: this.markLine,
  775. markPoint: this.markPoint
  776. };
  777. var series = options.series;
  778. if (Object(external_utils_lite_["isArray"])(series)) {
  779. series.forEach(function (item) {
  780. mark(item, marks);
  781. });
  782. } else if (Object(external_utils_lite_["isObject"])(series)) {
  783. mark(series, marks);
  784. }
  785. }
  786. // change inited echarts settings
  787. if (this.extend) modules_extend(options, this.extend);
  788. if (this.afterConfig) options = this.afterConfig(options);
  789. var setOptionOpts = this.setOptionOpts;
  790. // map chart not merge
  791. if ((this.settings.bmap || this.settings.amap) && !Object(external_utils_lite_["isObject"])(setOptionOpts)) {
  792. setOptionOpts = false;
  793. }
  794. // exclude unchange options
  795. if (this.notSetUnchange && this.notSetUnchange.length) {
  796. this.notSetUnchange.forEach(function (item) {
  797. var value = options[item];
  798. if (value) {
  799. if (Object(external_utils_lite_["isEqual"])(value, _this._store[item])) {
  800. options[item] = undefined;
  801. } else {
  802. _this._store[item] = Object(external_utils_lite_["cloneDeep"])(value);
  803. }
  804. }
  805. });
  806. if (Object(external_utils_lite_["isObject"])(setOptionOpts)) {
  807. setOptionOpts.notMerge = false;
  808. } else {
  809. setOptionOpts = false;
  810. }
  811. }
  812. if (this._isDestroyed) return;
  813. if (this.log) console.log(options);
  814. console.log('options------->', options);
  815. console.log('setOptions----->', setOptionOpts);
  816. // 设置一些基本参数
  817. options.legend.textStyle = {
  818. color: '#FFF'
  819. };
  820. this.echarts.setOption(options, setOptionOpts);
  821. this.$emit('ready', this.echarts, options, echarts_default.a);
  822. if (!this._once['ready-once']) {
  823. this._once['ready-once'] = true;
  824. this.$emit('ready-once', this.echarts, options, echarts_default.a);
  825. }
  826. if (this.judgeWidth) this.judgeWidthHandler(options);
  827. if (this.afterSetOption) this.afterSetOption(this.echarts, options, echarts_default.a);
  828. if (this.afterSetOptionOnce && !this._once['afterSetOptionOnce']) {
  829. this._once['afterSetOptionOnce'] = true;
  830. this.afterSetOptionOnce(this.echarts, options, echarts_default.a);
  831. }
  832. },
  833. judgeWidthHandler: function judgeWidthHandler(options) {
  834. var _this2 = this;
  835. var widthChangeDelay = this.widthChangeDelay,
  836. resize = this.resize;
  837. if (this.$el.clientWidth || this.$el.clientHeight) {
  838. resize();
  839. } else {
  840. this.$nextTick(function (_) {
  841. if (_this2.$el.clientWidth || _this2.$el.clientHeight) {
  842. resize();
  843. } else {
  844. setTimeout(function (_) {
  845. resize();
  846. if (!_this2.$el.clientWidth || !_this2.$el.clientHeight) {
  847. console.warn(' Can\'t get dom width or height ');
  848. }
  849. }, widthChangeDelay);
  850. }
  851. });
  852. }
  853. },
  854. resizeableHandler: function resizeableHandler(resizeable) {
  855. if (resizeable && !this._once.onresize) this.addResizeListener();
  856. if (!resizeable && this._once.onresize) this.removeResizeListener();
  857. },
  858. init: function init() {
  859. if (this.echarts) return;
  860. var themeName = this.themeName || this.theme || constants["b" /* DEFAULT_THEME */];
  861. this.echarts = echarts_default.a.init(this.$refs.canvas, themeName, this.initOptions);
  862. if (this.data) this.changeHandler();
  863. this.createEventProxy();
  864. if (this.resizeable) this.addResizeListener();
  865. },
  866. addResizeListener: function addResizeListener() {
  867. window.addEventListener('resize', this.resizeHandler);
  868. this._once.onresize = true;
  869. },
  870. removeResizeListener: function removeResizeListener() {
  871. window.removeEventListener('resize', this.resizeHandler);
  872. this._once.onresize = false;
  873. },
  874. addWatchToProps: function addWatchToProps() {
  875. var _this3 = this;
  876. var watchedVariable = this._watchers.map(function (watcher) {
  877. return watcher.expression;
  878. });
  879. Object.keys(this.$props).forEach(function (prop) {
  880. if (!~watchedVariable.indexOf(prop) && !~constants["f" /* STATIC_PROPS */].indexOf(prop)) {
  881. var opts = {};
  882. if (~['[object Object]', '[object Array]'].indexOf(Object(external_utils_lite_["getType"])(_this3.$props[prop]))) {
  883. opts.deep = true;
  884. }
  885. _this3.$watch(prop, function () {
  886. _this3.changeHandler();
  887. }, opts);
  888. }
  889. });
  890. },
  891. createEventProxy: function createEventProxy() {
  892. var _this4 = this;
  893. // 只要用户使用 on 方法绑定的事件都做一层代理,
  894. // 是否真正执行相应的事件方法取决于该方法是否仍然存在 events 中
  895. // 实现 events 的动态响应
  896. var self = this;
  897. var keys = Object.keys(this.events || {});
  898. keys.length && keys.forEach(function (ev) {
  899. if (_this4.registeredEvents.indexOf(ev) === -1) {
  900. _this4.registeredEvents.push(ev);
  901. _this4.echarts.on(ev, function (ev) {
  902. return function () {
  903. if (ev in self.events) {
  904. for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  905. args[_key] = arguments[_key];
  906. }
  907. self.events[ev].apply(null, args);
  908. }
  909. };
  910. }(ev));
  911. }
  912. });
  913. },
  914. themeChange: function themeChange(theme) {
  915. this.clean();
  916. this.echarts = null;
  917. this.init();
  918. },
  919. clean: function clean() {
  920. if (this.resizeable) this.removeResizeListener();
  921. this.echarts.dispose();
  922. }
  923. },
  924. created: function created() {
  925. this.echarts = null;
  926. this.registeredEvents = [];
  927. this._once = {};
  928. this._store = {};
  929. this.resizeHandler = Object(external_utils_lite_["debounce"])(this.resize, this.resizeDelay);
  930. this.changeHandler = Object(external_utils_lite_["debounce"])(this.dataHandler, this.changeDelay);
  931. this.addWatchToProps();
  932. },
  933. mounted: function mounted() {
  934. this.init();
  935. },
  936. beforeDestroy: function beforeDestroy() {
  937. this.clean();
  938. },
  939. _numerify: external_numerify_default.a
  940. });
  941. /***/ }),
  942. /***/ 5:
  943. /***/ (function(module, exports, __webpack_require__) {
  944. "use strict";
  945. /*
  946. MIT License http://www.opensource.org/licenses/mit-license.php
  947. Author Tobias Koppers @sokra
  948. */
  949. // css base code, injected by the css-loader
  950. module.exports = function (useSourceMap) {
  951. var list = []; // return the list of modules as css string
  952. list.toString = function toString() {
  953. return this.map(function (item) {
  954. var content = cssWithMappingToString(item, useSourceMap);
  955. if (item[2]) {
  956. return '@media ' + item[2] + '{' + content + '}';
  957. } else {
  958. return content;
  959. }
  960. }).join('');
  961. }; // import a list of modules into the list
  962. list.i = function (modules, mediaQuery) {
  963. if (typeof modules === 'string') {
  964. modules = [[null, modules, '']];
  965. }
  966. var alreadyImportedModules = {};
  967. for (var i = 0; i < this.length; i++) {
  968. var id = this[i][0];
  969. if (id != null) {
  970. alreadyImportedModules[id] = true;
  971. }
  972. }
  973. for (i = 0; i < modules.length; i++) {
  974. var item = modules[i]; // skip already imported module
  975. // this implementation is not 100% perfect for weird media query combinations
  976. // when a module is imported multiple times with different media queries.
  977. // I hope this will never occur (Hey this way we have smaller bundles)
  978. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  979. if (mediaQuery && !item[2]) {
  980. item[2] = mediaQuery;
  981. } else if (mediaQuery) {
  982. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  983. }
  984. list.push(item);
  985. }
  986. }
  987. };
  988. return list;
  989. };
  990. function cssWithMappingToString(item, useSourceMap) {
  991. var content = item[1] || '';
  992. var cssMapping = item[3];
  993. if (!cssMapping) {
  994. return content;
  995. }
  996. if (useSourceMap && typeof btoa === 'function') {
  997. var sourceMapping = toComment(cssMapping);
  998. var sourceURLs = cssMapping.sources.map(function (source) {
  999. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  1000. });
  1001. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  1002. }
  1003. return [content].join('\n');
  1004. } // Adapted from convert-source-map (MIT)
  1005. function toComment(sourceMap) {
  1006. // eslint-disable-next-line no-undef
  1007. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  1008. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  1009. return '/*# ' + data + ' */';
  1010. }
  1011. /***/ }),
  1012. /***/ 54:
  1013. /***/ (function(module, exports) {
  1014. module.exports = require("echarts/lib/component/tooltip");
  1015. /***/ }),
  1016. /***/ 55:
  1017. /***/ (function(module, exports) {
  1018. module.exports = require("echarts/lib/component/legend");
  1019. /***/ }),
  1020. /***/ 56:
  1021. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1022. "use strict";
  1023. /* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_loading_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
  1024. /* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_loading_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_loading_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  1025. /* unused harmony reexport * */
  1026. /***/ }),
  1027. /***/ 57:
  1028. /***/ (function(module, exports, __webpack_require__) {
  1029. exports = module.exports = __webpack_require__(5)(false);
  1030. // Module
  1031. exports.push([module.i, "\n.v-charts-component-loading {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(255, 255, 255, .9);\n}\n.v-charts-mask-status {\n filter: blur(1px);\n}\n.v-charts-component-loading .circular {\n width: 42px;\n height: 42px;\n animation: loading-rotate 2s linear infinite;\n}\n.v-charts-component-loading .path {\n animation: loading-dash 1.5s ease-in-out infinite;\n stroke-dasharray: 90,150;\n stroke-dashoffset: 0;\n stroke-width: 2;\n stroke: #20a0ff;\n stroke-linecap: round;\n}\n@keyframes loading-rotate {\n100% {\n transform: rotate(360deg);\n}\n}\n@keyframes loading-dash {\n0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n}\n50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -40px;\n}\n100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -120px;\n}\n}\n", ""]);
  1032. /***/ }),
  1033. /***/ 577:
  1034. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1035. "use strict";
  1036. // ESM COMPAT FLAG
  1037. __webpack_require__.r(__webpack_exports__);
  1038. // EXTERNAL MODULE: external "echarts/lib/chart/heatmap"
  1039. var heatmap_ = __webpack_require__(261);
  1040. // EXTERNAL MODULE: external "echarts/lib/component/visualMap"
  1041. var visualMap_ = __webpack_require__(163);
  1042. // EXTERNAL MODULE: external "echarts/extension/bmap/bmap"
  1043. var bmap_ = __webpack_require__(162);
  1044. // EXTERNAL MODULE: external "echarts/lib/chart/map"
  1045. var map_ = __webpack_require__(161);
  1046. // EXTERNAL MODULE: ./src/utils/charts/constants.js
  1047. var constants = __webpack_require__(15);
  1048. // EXTERNAL MODULE: ./src/utils/charts/utils.js
  1049. var utils = __webpack_require__(32);
  1050. // EXTERNAL MODULE: external "echarts/lib/echarts"
  1051. var echarts_ = __webpack_require__(17);
  1052. var echarts_default = /*#__PURE__*/__webpack_require__.n(echarts_);
  1053. // CONCATENATED MODULE: ./packages/c-heatmap/main.js
  1054. function getAxisList(rows, label) {
  1055. var result = [];
  1056. rows.forEach(function (row) {
  1057. if (!~result.indexOf(row[label])) result.push(row[label]);
  1058. });
  1059. return result;
  1060. }
  1061. function getData(args) {
  1062. var rows = args.rows,
  1063. innerXAxisList = args.innerXAxisList,
  1064. innerYAxisList = args.innerYAxisList,
  1065. xDim = args.xDim,
  1066. yDim = args.yDim,
  1067. metrics = args.metrics,
  1068. type = args.type,
  1069. extraMetrics = args.extraMetrics;
  1070. var result = null;
  1071. if (type === 'cartesian') {
  1072. result = rows.map(function (row) {
  1073. var xIndex = innerXAxisList.indexOf(row[xDim]);
  1074. var yIndex = innerYAxisList.indexOf(row[yDim]);
  1075. var value = metrics ? row[metrics] : 1;
  1076. var extraData = extraMetrics.map(function (m) {
  1077. return row[m] || '-';
  1078. });
  1079. return { value: [xIndex, yIndex, value].concat(extraData) };
  1080. });
  1081. } else {
  1082. result = rows.map(function (row) {
  1083. var value = metrics ? row[metrics] : 1;
  1084. return { value: [row[xDim], row[yDim], value] };
  1085. });
  1086. }
  1087. return result;
  1088. }
  1089. function getAxis(list, name) {
  1090. return {
  1091. type: 'category',
  1092. data: list,
  1093. name: name,
  1094. nameLocation: 'end',
  1095. splitArea: { show: true }
  1096. };
  1097. }
  1098. function getVisualMap(args) {
  1099. var min = args.innerMin,
  1100. max = args.innerMax,
  1101. type = args.type,
  1102. heatColor = args.heatColor,
  1103. series = args.series;
  1104. var result = {
  1105. min: min,
  1106. max: max,
  1107. calculable: true
  1108. };
  1109. var extra = null;
  1110. if (type === 'map') {
  1111. extra = {
  1112. orient: 'vertical',
  1113. left: 0,
  1114. bottom: 0,
  1115. inRange: { color: heatColor || constants["e" /* HEAT_MAP_COLOR */] }
  1116. };
  1117. if (!series[0].data.length) extra.show = false;
  1118. } else if (type === 'bmap' || type === 'amap') {
  1119. extra = {
  1120. show: false,
  1121. orient: 'vertical',
  1122. left: 0,
  1123. bottom: 0,
  1124. inRange: { color: heatColor || constants["d" /* HEAT_BMAP_COLOR */] }
  1125. };
  1126. } else {
  1127. extra = {
  1128. orient: 'horizontal',
  1129. left: 'center',
  1130. bottom: 10,
  1131. dimension: 2,
  1132. inRange: heatColor && { color: heatColor }
  1133. };
  1134. }
  1135. return Object.assign(result, extra);
  1136. }
  1137. function getSeries(args) {
  1138. var chartData = args.chartData;
  1139. return [{
  1140. type: 'heatmap',
  1141. data: chartData
  1142. }];
  1143. }
  1144. function getTooltip(args) {
  1145. var dataType = args.dataType,
  1146. innerXAxisList = args.innerXAxisList,
  1147. innerYAxisList = args.innerYAxisList,
  1148. digit = args.digit,
  1149. extraMetrics = args.extraMetrics,
  1150. metrics = args.metrics;
  1151. return {
  1152. trigger: 'item',
  1153. formatter: function formatter(_ref) {
  1154. var color = _ref.color,
  1155. _ref$data$value = _ref.data.value,
  1156. xDim = _ref$data$value[0],
  1157. yDim = _ref$data$value[1],
  1158. value = _ref$data$value[2],
  1159. extraData = _ref$data$value.slice(3);
  1160. var tpl = [];
  1161. tpl.push(innerXAxisList[xDim] + ' ~ ' + innerYAxisList[yDim] + '<br>');
  1162. extraMetrics.forEach(function (m, index) {
  1163. tpl.push(m + ': ' + extraData[index] + '<br>');
  1164. });
  1165. tpl.push(Object(constants["g" /* itemPoint */])(color) + ' ' + metrics + ': ' + Object(utils["c" /* getFormated */])(value, dataType, digit) + '<br>');
  1166. return tpl.join('');
  1167. }
  1168. };
  1169. }
  1170. var main_heatmap = function heatmap(columns, rows, settings, status) {
  1171. var _settings$type = settings.type,
  1172. type = _settings$type === undefined ? 'cartesian' : _settings$type,
  1173. xAxisList = settings.xAxisList,
  1174. yAxisList = settings.yAxisList,
  1175. _settings$dimension = settings.dimension,
  1176. dimension = _settings$dimension === undefined ? [columns[0], columns[1]] : _settings$dimension,
  1177. _settings$metrics = settings.metrics,
  1178. metrics = _settings$metrics === undefined ? columns[2] : _settings$metrics,
  1179. _settings$dataType = settings.dataType,
  1180. dataType = _settings$dataType === undefined ? 'normal' : _settings$dataType,
  1181. min = settings.min,
  1182. max = settings.max,
  1183. digit = settings.digit,
  1184. bmap = settings.bmap,
  1185. amap = settings.amap,
  1186. geo = settings.geo,
  1187. key = settings.key,
  1188. _settings$v = settings.v,
  1189. v = _settings$v === undefined ? '2.0' : _settings$v,
  1190. position = settings.position,
  1191. positionJsonLink = settings.positionJsonLink,
  1192. beforeRegisterMap = settings.beforeRegisterMap,
  1193. _settings$pointSize = settings.pointSize,
  1194. pointSize = _settings$pointSize === undefined ? 10 : _settings$pointSize,
  1195. _settings$blurSize = settings.blurSize,
  1196. blurSize = _settings$blurSize === undefined ? 5 : _settings$blurSize,
  1197. heatColor = settings.heatColor,
  1198. yAxisName = settings.yAxisName,
  1199. xAxisName = settings.xAxisName,
  1200. beforeRegisterMapOnce = settings.beforeRegisterMapOnce,
  1201. _settings$mapURLProfi = settings.mapURLProfix,
  1202. mapURLProfix = _settings$mapURLProfi === undefined ? 'https://unpkg.com/echarts@3.6.2/map/json/' : _settings$mapURLProfi,
  1203. _settings$specialArea = settings.specialAreas,
  1204. specialAreas = _settings$specialArea === undefined ? {} : _settings$specialArea;
  1205. var tooltipVisible = status.tooltipVisible;
  1206. var innerXAxisList = xAxisList;
  1207. var innerYAxisList = yAxisList;
  1208. var chartData = [];
  1209. // add extraMetrics prop for data which only display in tooltip
  1210. var extraMetrics = [];
  1211. var mainColumn = dimension.concat([metrics]);
  1212. columns.forEach(function (column) {
  1213. if (!~mainColumn.indexOf(column)) extraMetrics.push(column);
  1214. });
  1215. if (type === 'cartesian') {
  1216. if (!innerXAxisList || !innerXAxisList.length) {
  1217. innerXAxisList = getAxisList(rows, dimension[0]);
  1218. }
  1219. if (!innerYAxisList || !innerYAxisList.length) {
  1220. innerYAxisList = getAxisList(rows, dimension[1]);
  1221. }
  1222. chartData = getData({
  1223. rows: rows,
  1224. innerXAxisList: innerXAxisList,
  1225. innerYAxisList: innerYAxisList,
  1226. xDim: dimension[0],
  1227. yDim: dimension[1],
  1228. metrics: metrics,
  1229. type: type,
  1230. extraMetrics: extraMetrics
  1231. });
  1232. } else {
  1233. chartData = getData({
  1234. rows: rows,
  1235. xDim: dimension[0],
  1236. yDim: dimension[1],
  1237. metrics: metrics,
  1238. type: type,
  1239. extraMetrics: extraMetrics
  1240. });
  1241. }
  1242. var metricsList = metrics ? rows.map(function (row) {
  1243. return row[metrics];
  1244. }) : [0, 5];
  1245. if (!metricsList.length) metricsList = [0];
  1246. var innerMin = min || Math.min.apply(null, metricsList);
  1247. var innerMax = max || Math.max.apply(null, metricsList);
  1248. var xAxis = getAxis(innerXAxisList, xAxisName);
  1249. var yAxis = getAxis(innerYAxisList, yAxisName);
  1250. var series = getSeries({ chartData: chartData });
  1251. var visualMap = getVisualMap({ innerMin: innerMin, innerMax: innerMax, type: type, heatColor: heatColor, series: series });
  1252. var tooltip = tooltipVisible && getTooltip({
  1253. dataType: dataType,
  1254. innerXAxisList: innerXAxisList,
  1255. innerYAxisList: innerYAxisList,
  1256. digit: digit,
  1257. extraMetrics: extraMetrics,
  1258. metrics: metrics
  1259. });
  1260. var options = { visualMap: visualMap, series: series };
  1261. if (type === 'bmap') {
  1262. Object.assign(options.series[0], { coordinateSystem: 'bmap', pointSize: pointSize, blurSize: blurSize });
  1263. return Object(utils["b" /* getBmap */])(key, v).then(function (_) {
  1264. return Object.assign({ bmap: bmap }, options);
  1265. });
  1266. } else if (type === 'map') {
  1267. options.series[0].coordinateSystem = 'geo';
  1268. return Object(utils["d" /* getMapJSON */])({
  1269. position: position,
  1270. positionJsonLink: positionJsonLink,
  1271. beforeRegisterMapOnce: beforeRegisterMapOnce,
  1272. mapURLProfix: mapURLProfix
  1273. }).then(function (json) {
  1274. var geoAttr = Object.assign({ map: position }, geo);
  1275. if (beforeRegisterMap) json = beforeRegisterMap(json);
  1276. echarts_default.a.registerMap(position, json, specialAreas);
  1277. return Object.assign({ geo: geoAttr }, options);
  1278. });
  1279. } else if (type === 'amap') {
  1280. Object.assign(options.series[0], { coordinateSystem: 'amap', pointSize: pointSize, blurSize: blurSize });
  1281. return Object(utils["a" /* getAmap */])(key, v).then(function (_) {
  1282. return Object.assign({ amap: amap }, options);
  1283. });
  1284. } else {
  1285. return Object.assign({ xAxis: xAxis, yAxis: yAxis, tooltip: tooltip }, options);
  1286. }
  1287. };
  1288. // EXTERNAL MODULE: ./src/utils/charts/core.js + 9 modules
  1289. var core = __webpack_require__(43);
  1290. // CONCATENATED MODULE: ./packages/c-heatmap/index.js
  1291. /* harmony default export */ var c_heatmap = __webpack_exports__["default"] = (Object.assign({}, core["a" /* default */], {
  1292. name: 'VeHeatmap',
  1293. data: function data() {
  1294. this.chartHandler = main_heatmap;
  1295. return {};
  1296. }
  1297. }));
  1298. /***/ }),
  1299. /***/ 58:
  1300. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1301. "use strict";
  1302. /* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_data_empty_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
  1303. /* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_data_empty_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_data_empty_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
  1304. /* unused harmony reexport * */
  1305. /***/ }),
  1306. /***/ 59:
  1307. /***/ (function(module, exports, __webpack_require__) {
  1308. exports = module.exports = __webpack_require__(5)(false);
  1309. // Module
  1310. exports.push([module.i, "\n.v-charts-data-empty {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(255, 255, 255, .9);\n color: #888;\n font-size: 14px;\n}\n", ""]);
  1311. /***/ }),
  1312. /***/ 6:
  1313. /***/ (function(module, exports, __webpack_require__) {
  1314. /*
  1315. MIT License http://www.opensource.org/licenses/mit-license.php
  1316. Author Tobias Koppers @sokra
  1317. */
  1318. var stylesInDom = {};
  1319. var memoize = function (fn) {
  1320. var memo;
  1321. return function () {
  1322. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  1323. return memo;
  1324. };
  1325. };
  1326. var isOldIE = memoize(function () {
  1327. // Test for IE <= 9 as proposed by Browserhacks
  1328. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  1329. // Tests for existence of standard globals is to allow style-loader
  1330. // to operate correctly into non-standard environments
  1331. // @see https://github.com/webpack-contrib/style-loader/issues/177
  1332. return window && document && document.all && !window.atob;
  1333. });
  1334. var getTarget = function (target, parent) {
  1335. if (parent){
  1336. return parent.querySelector(target);
  1337. }
  1338. return document.querySelector(target);
  1339. };
  1340. var getElement = (function (fn) {
  1341. var memo = {};
  1342. return function(target, parent) {
  1343. // If passing function in options, then use it for resolve "head" element.
  1344. // Useful for Shadow Root style i.e
  1345. // {
  1346. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  1347. // }
  1348. if (typeof target === 'function') {
  1349. return target();
  1350. }
  1351. if (typeof memo[target] === "undefined") {
  1352. var styleTarget = getTarget.call(this, target, parent);
  1353. // Special case to return head of iframe instead of iframe itself
  1354. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  1355. try {
  1356. // This will throw an exception if access to iframe is blocked
  1357. // due to cross-origin restrictions
  1358. styleTarget = styleTarget.contentDocument.head;
  1359. } catch(e) {
  1360. styleTarget = null;
  1361. }
  1362. }
  1363. memo[target] = styleTarget;
  1364. }
  1365. return memo[target]
  1366. };
  1367. })();
  1368. var singleton = null;
  1369. var singletonCounter = 0;
  1370. var stylesInsertedAtTop = [];
  1371. var fixUrls = __webpack_require__(12);
  1372. module.exports = function(list, options) {
  1373. if (typeof DEBUG !== "undefined" && DEBUG) {
  1374. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  1375. }
  1376. options = options || {};
  1377. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  1378. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1379. // tags it will allow on a page
  1380. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  1381. // By default, add <style> tags to the <head> element
  1382. if (!options.insertInto) options.insertInto = "head";
  1383. // By default, add <style> tags to the bottom of the target
  1384. if (!options.insertAt) options.insertAt = "bottom";
  1385. var styles = listToStyles(list, options);
  1386. addStylesToDom(styles, options);
  1387. return function update (newList) {
  1388. var mayRemove = [];
  1389. for (var i = 0; i < styles.length; i++) {
  1390. var item = styles[i];
  1391. var domStyle = stylesInDom[item.id];
  1392. domStyle.refs--;
  1393. mayRemove.push(domStyle);
  1394. }
  1395. if(newList) {
  1396. var newStyles = listToStyles(newList, options);
  1397. addStylesToDom(newStyles, options);
  1398. }
  1399. for (var i = 0; i < mayRemove.length; i++) {
  1400. var domStyle = mayRemove[i];
  1401. if(domStyle.refs === 0) {
  1402. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  1403. delete stylesInDom[domStyle.id];
  1404. }
  1405. }
  1406. };
  1407. };
  1408. function addStylesToDom (styles, options) {
  1409. for (var i = 0; i < styles.length; i++) {
  1410. var item = styles[i];
  1411. var domStyle = stylesInDom[item.id];
  1412. if(domStyle) {
  1413. domStyle.refs++;
  1414. for(var j = 0; j < domStyle.parts.length; j++) {
  1415. domStyle.parts[j](item.parts[j]);
  1416. }
  1417. for(; j < item.parts.length; j++) {
  1418. domStyle.parts.push(addStyle(item.parts[j], options));
  1419. }
  1420. } else {
  1421. var parts = [];
  1422. for(var j = 0; j < item.parts.length; j++) {
  1423. parts.push(addStyle(item.parts[j], options));
  1424. }
  1425. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  1426. }
  1427. }
  1428. }
  1429. function listToStyles (list, options) {
  1430. var styles = [];
  1431. var newStyles = {};
  1432. for (var i = 0; i < list.length; i++) {
  1433. var item = list[i];
  1434. var id = options.base ? item[0] + options.base : item[0];
  1435. var css = item[1];
  1436. var media = item[2];
  1437. var sourceMap = item[3];
  1438. var part = {css: css, media: media, sourceMap: sourceMap};
  1439. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  1440. else newStyles[id].parts.push(part);
  1441. }
  1442. return styles;
  1443. }
  1444. function insertStyleElement (options, style) {
  1445. var target = getElement(options.insertInto)
  1446. if (!target) {
  1447. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  1448. }
  1449. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  1450. if (options.insertAt === "top") {
  1451. if (!lastStyleElementInsertedAtTop) {
  1452. target.insertBefore(style, target.firstChild);
  1453. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  1454. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  1455. } else {
  1456. target.appendChild(style);
  1457. }
  1458. stylesInsertedAtTop.push(style);
  1459. } else if (options.insertAt === "bottom") {
  1460. target.appendChild(style);
  1461. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  1462. var nextSibling = getElement(options.insertAt.before, target);
  1463. target.insertBefore(style, nextSibling);
  1464. } else {
  1465. throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  1466. }
  1467. }
  1468. function removeStyleElement (style) {
  1469. if (style.parentNode === null) return false;
  1470. style.parentNode.removeChild(style);
  1471. var idx = stylesInsertedAtTop.indexOf(style);
  1472. if(idx >= 0) {
  1473. stylesInsertedAtTop.splice(idx, 1);
  1474. }
  1475. }
  1476. function createStyleElement (options) {
  1477. var style = document.createElement("style");
  1478. if(options.attrs.type === undefined) {
  1479. options.attrs.type = "text/css";
  1480. }
  1481. if(options.attrs.nonce === undefined) {
  1482. var nonce = getNonce();
  1483. if (nonce) {
  1484. options.attrs.nonce = nonce;
  1485. }
  1486. }
  1487. addAttrs(style, options.attrs);
  1488. insertStyleElement(options, style);
  1489. return style;
  1490. }
  1491. function createLinkElement (options) {
  1492. var link = document.createElement("link");
  1493. if(options.attrs.type === undefined) {
  1494. options.attrs.type = "text/css";
  1495. }
  1496. options.attrs.rel = "stylesheet";
  1497. addAttrs(link, options.attrs);
  1498. insertStyleElement(options, link);
  1499. return link;
  1500. }
  1501. function addAttrs (el, attrs) {
  1502. Object.keys(attrs).forEach(function (key) {
  1503. el.setAttribute(key, attrs[key]);
  1504. });
  1505. }
  1506. function getNonce() {
  1507. if (false) {}
  1508. return __webpack_require__.nc;
  1509. }
  1510. function addStyle (obj, options) {
  1511. var style, update, remove, result;
  1512. // If a transform function was defined, run it on the css
  1513. if (options.transform && obj.css) {
  1514. result = typeof options.transform === 'function'
  1515. ? options.transform(obj.css)
  1516. : options.transform.default(obj.css);
  1517. if (result) {
  1518. // If transform returns a value, use that instead of the original css.
  1519. // This allows running runtime transformations on the css.
  1520. obj.css = result;
  1521. } else {
  1522. // If the transform function returns a falsy value, don't add this css.
  1523. // This allows conditional loading of css
  1524. return function() {
  1525. // noop
  1526. };
  1527. }
  1528. }
  1529. if (options.singleton) {
  1530. var styleIndex = singletonCounter++;
  1531. style = singleton || (singleton = createStyleElement(options));
  1532. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  1533. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  1534. } else if (
  1535. obj.sourceMap &&
  1536. typeof URL === "function" &&
  1537. typeof URL.createObjectURL === "function" &&
  1538. typeof URL.revokeObjectURL === "function" &&
  1539. typeof Blob === "function" &&
  1540. typeof btoa === "function"
  1541. ) {
  1542. style = createLinkElement(options);
  1543. update = updateLink.bind(null, style, options);
  1544. remove = function () {
  1545. removeStyleElement(style);
  1546. if(style.href) URL.revokeObjectURL(style.href);
  1547. };
  1548. } else {
  1549. style = createStyleElement(options);
  1550. update = applyToTag.bind(null, style);
  1551. remove = function () {
  1552. removeStyleElement(style);
  1553. };
  1554. }
  1555. update(obj);
  1556. return function updateStyle (newObj) {
  1557. if (newObj) {
  1558. if (
  1559. newObj.css === obj.css &&
  1560. newObj.media === obj.media &&
  1561. newObj.sourceMap === obj.sourceMap
  1562. ) {
  1563. return;
  1564. }
  1565. update(obj = newObj);
  1566. } else {
  1567. remove();
  1568. }
  1569. };
  1570. }
  1571. var replaceText = (function () {
  1572. var textStore = [];
  1573. return function (index, replacement) {
  1574. textStore[index] = replacement;
  1575. return textStore.filter(Boolean).join('\n');
  1576. };
  1577. })();
  1578. function applyToSingletonTag (style, index, remove, obj) {
  1579. var css = remove ? "" : obj.css;
  1580. if (style.styleSheet) {
  1581. style.styleSheet.cssText = replaceText(index, css);
  1582. } else {
  1583. var cssNode = document.createTextNode(css);
  1584. var childNodes = style.childNodes;
  1585. if (childNodes[index]) style.removeChild(childNodes[index]);
  1586. if (childNodes.length) {
  1587. style.insertBefore(cssNode, childNodes[index]);
  1588. } else {
  1589. style.appendChild(cssNode);
  1590. }
  1591. }
  1592. }
  1593. function applyToTag (style, obj) {
  1594. var css = obj.css;
  1595. var media = obj.media;
  1596. if(media) {
  1597. style.setAttribute("media", media)
  1598. }
  1599. if(style.styleSheet) {
  1600. style.styleSheet.cssText = css;
  1601. } else {
  1602. while(style.firstChild) {
  1603. style.removeChild(style.firstChild);
  1604. }
  1605. style.appendChild(document.createTextNode(css));
  1606. }
  1607. }
  1608. function updateLink (link, options, obj) {
  1609. var css = obj.css;
  1610. var sourceMap = obj.sourceMap;
  1611. /*
  1612. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  1613. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  1614. on by default. Otherwise default to the convertToAbsoluteUrls option
  1615. directly
  1616. */
  1617. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  1618. if (options.convertToAbsoluteUrls || autoFixUrls) {
  1619. css = fixUrls(css);
  1620. }
  1621. if (sourceMap) {
  1622. // http://stackoverflow.com/a/26603875
  1623. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  1624. }
  1625. var blob = new Blob([css], { type: "text/css" });
  1626. var oldSrc = link.href;
  1627. link.href = URL.createObjectURL(blob);
  1628. if(oldSrc) URL.revokeObjectURL(oldSrc);
  1629. }
  1630. /***/ })
  1631. /******/ });