{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/components/widget_chart.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/src/components/widget_chart.vue","mtime":1740130327259},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-mobile/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n//import { setTimeout } from 'timers';\n// import axios from \"axios\";\n// 引入基本模板\n//let echarts = require('echarts/lib/echarts')\n// // 引入柱状图组件\n// require('echarts/lib/chart/bar')\n// // 引入提示框和title组件\n// require('echarts/lib/component/tooltip')\n// require('echarts/lib/component/title')\nimport { mapMutations } from 'vuex';\nexport default {\n inject: [\"reload\"],\n props: [\"chart\"],\n mounted() {\n this.getChart();\n },\n watch: {\n chartData() {\n this.drawLine();\n },\n },\n data() {\n return{\n chartData:'',\n }\n },\n methods: {\n ...mapMutations({\n setView: 'setWidgetChartView'// 将 `this.increase()` 映射为 `this.$store.commit('increase')`\n }),\n getChart() {\n this.$api.getChart(this.chart.wgtData.actionContent, {\n onSucess: response => { \n let chartData = JSON.parse(response.data.data.result);\n this.chartData = chartData;\n this.view = response.data.data.view;\n }\n })\n },\n drawLine(){\n let that = this;\n let myChart = this.$echarts.init(this.$refs.myChart);\n myChart.setOption(this.chartData);\n myChart.on('click', function (){\n if(that.view && that.view.id) {\n let obj = {};\n obj.appId = that.$root.appid;\n obj.actionContent = that.view.id;\n obj.isWidgetChartView = true;\n obj.linkType = '01';\n that.setView(that.view);\n that.$router.push({ name: \"open\", query: obj });\n } \t\n });\n }\n }\n};\n",null]}