{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/chart.vue?vue&type=script&lang=js","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/src/components/chart.vue","mtime":1725957645720},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["\nimport form_searchform from \"@/components/form_searchform.vue\";\nexport default {\n name: \"chart\",\n props: ['openParams'],\n components: {\n form_searchform,\n },\n watch: {\n chartData() {\n this.drawLine();\n },\n },\n created() {\n \n },\n mounted() {\n this.getChart();\n },\n\n data() {\n return{\n chartData:'',\n view:'',\n isShowDelegate:false,\n openViewParams:{},\n isShowBtn: false,\n isOpenTemplate: false,\n chartType:'chart',\n chartHeight:0,\n }\n },\n methods: {\n hiddenCustomizeVisible() { //该方法实现视图修改数据,或者删除数据重新加载视图数据\n if(this.view.simpleClassName == 'GanttView') { //当是甘特视图直接刷新整个页面\n // this.updateView();\n this.$refs.delegate.reloadListView();\n }else {\n setTimeout(() => {\n this.customizeVisible = false;\n this.$refs.chart.$refs.delegate.reloadListView();\n },1000)\n }\n },\n handleSearch(data, searchData){\n this.$api.getChartData(\n this.openParams.actionContent,\n searchData,\n {\n onSucess: response => { \n this.chartData = JSON.parse(response.data.data.result);\n this.view = response.data.data.view;\n }\n }\n )\n },\n showBtn(val){\n this.isShowBtn = val;\n },\n openSearchTemplate(){\n this.isOpenTemplate = !this.isOpenTemplate;\n this.$nextTick(()=>{\n this.chartHeight = this.$refs.viewChartDelegate.offsetHeight - this.$refs.chartSearchBox.offsetHeight - 58; \n })\n \n },\n onAction(params){\n this.$emit(\"add-tab\", params);\n },\n getChart(){\n this.$api.getChart(\n this.openParams.actionContent,\n {\n onSucess: response => { \n this.chartData = JSON.parse(response.data.data.result);\n this.view = response.data.data.view;\n }\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 (param){\n if(that.view && that.view.id) {\n let obj = {};\n obj.appId = that.$root.appid;\n obj.actionContent = that.view.id;\n obj.id = that.openParams.id;\n that.openViewParams = obj;\n that.isShowDelegate = true;\n } \t\n });\n },\n }\n};\n",null]}