{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\form\\chart\\Chart.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\form\\chart\\Chart.vue","mtime":1675214577261},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _defineProperty from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.number.constructor\";\n//\n//\n//\n//\n\nimport echarts from \"echarts\";\nexport default {\n  props: {\n    option: {\n      type: Object,\n      default: function _default() {}\n    },\n    index: Number\n  },\n  watch: {\n    option: {\n      handler: function handler(newVal, oldVal) {\n        this.initChart();\n      },\n      deep: true\n    }\n  },\n  mounted: function mounted() {\n    this.initChart();\n  },\n  methods: {\n    initChart: function initChart() {\n      var chart = echarts.init(document.getElementById(\"chart\" + this.index));\n      var myOption = {};\n      if (this.option && this.option.series && this.option.series[0].type === \"pie\") {\n        myOption = {\n          title: {\n            text: this.option.name,\n            subtext: this.option.subtext\n          },\n          tooltip: {\n            trigger: \"item\",\n            formatter: \"{a} <br/>{b} : {c} ({d}%)\"\n          },\n          legend: {\n            data: this.option.legend\n          },\n          series: this.option.series\n        };\n      } else {\n        myOption = {\n          title: {\n            text: this.option.name,\n            subtext: this.option.subtext,\n            top: 20\n          },\n          tooltip: {\n            trigger: \"axis\",\n            axisPointer: {\n              type: \"shadow\"\n            }\n          },\n          calculable: true,\n          legend: {\n            x: \"right\",\n            data: this.option.legend\n          },\n          toolbox: {\n            show: true,\n            orient: \"vertical\",\n            y: \"center\",\n            right: 20,\n            itemGap: 13,\n            feature: _defineProperty({\n              mark: {\n                show: true\n              },\n              dataView: {\n                show: true,\n                readOnly: false\n              },\n              magicType: {\n                show: true,\n                type: [\"line\", \"bar\", \"stack\", \"tiled\"]\n              },\n              restore: {\n                show: true\n              },\n              saveAsImage: {\n                show: true\n              },\n              dataZoom: {\n                yAxisIndex: \"none\"\n              }\n            }, \"dataView\", {\n              show: true,\n              readOnly: true,\n              optionToContent: function optionToContent(opt) {\n                var axisData = opt.xAxis[0].data;\n                var series = opt.series;\n                var tdHeaders = \"<th></th>\"; //表头\n                series.forEach(function (item) {\n                  tdHeaders += \"<th>\" + item.name + \"</th>\"; //组装表头\n                });\n\n                var table = '<div class=\"table-responsive\"><table class=\"table table-bordered table-striped table-hover\" style=\"text-align:center\"><tbody><tr>' + tdHeaders + \"</tr>\";\n                var tdBodys = \"\"; //数据\n                for (var i = 0, l = axisData.length; i < l; i++) {\n                  for (var j = 0; j < series.length; j++) {\n                    tdBodys += \"<td>\" + series[j].data[i] + \"</td>\"; //组装表数据\n                  }\n\n                  table += '<tr><td style=\"padding: 0 10px\">' + axisData[i] + \"</td>\" + tdBodys + \"</tr>\";\n                  tdBodys = \"\";\n                }\n                table += \"</tbody></table></div>\";\n                return table;\n              }\n            })\n          },\n          grid: {\n            y: 80,\n            y2: 40,\n            x2: 40\n          },\n          xAxis: [{\n            type: \"category\",\n            data: this.option.xAxis\n          }],\n          yAxis: [{\n            type: \"value\"\n          }],\n          series: this.option.series\n        };\n      }\n      chart.setOption(myOption);\n    }\n  }\n};",null]}