{"remainingRequest":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\yhxt-web\\src\\views\\virusManagement\\VirusManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\yhxt-web\\src\\views\\virusManagement\\VirusManagement.vue","mtime":1679940839653},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\yhxt-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import _defineProperty from \"D:/jenkins/workspace/yhxt-web/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar BigNumber = require('bignumber.js');\n\nimport * as echarts from 'echarts';\nexport default {\n name: 'VirusManagement',\n data: function data() {\n return {\n tableData: [],\n data: [],\n loading: false,\n pathName: '',\n year: '',\n total: {}\n };\n },\n created: function created() {\n this.loadData();\n },\n watch: {\n tableData: function tableData(newVal) {\n this.total.runCount = this.calculation('runCount', newVal);\n this.total.finishCount = this.calculation('finishCount', newVal);\n this.total.temporaryCount = this.calculation('temporaryCount', newVal);\n this.cloumnCharts(newVal);\n this.lineCharts(newVal);\n }\n },\n methods: {\n calculation: function calculation(key, arr) {\n var total = 0;\n if (!key || arr.length === 0) return total;\n arr.forEach(function (item) {\n total += parseInt(item[key]);\n });\n if (total === 0) return 0;\n return total;\n },\n changeYear: function changeYear(val) {\n var _this = this;\n\n if (!val) {\n return this.loadData();\n }\n\n this.loading = true;\n this.$http.post('${yhxt}/disease/v1/getDiseaseCountVo?year=' + val).then(function (res) {\n _this.tableData = res && res.status == 200 && res.data || [];\n _this.data = [];\n\n _this.data.push(_this.tableData);\n\n _this.loading = false;\n });\n },\n handleReset: function handleReset() {\n var length = this.data.length - 1;\n if (length === 0) return;\n this.tableData = this.data[this.data.length - 2];\n this.data.splice(length, 1);\n },\n hanldeRowClick: function hanldeRowClick(row) {\n if (row.chirldren.length == 0 && row.roadSegmentId) {\n return this.$router.push({\n name: this.pathName,\n params: {\n value: row\n }\n });\n }\n\n this.tableData = row.chirldren;\n this.data.push(row.chirldren);\n },\n handleCellClick: function handleCellClick(row, column) {\n this.pathName = column.columnKey;\n },\n loadData: function loadData() {\n var _this2 = this;\n\n this.loading = true;\n this.$http.post('${yhxt}/disease/v1/getDiseaseCountVo?year=' + new Date().getFullYear()).then(function (res) {\n _this2.tableData = res && res.status == 200 && res.data || [];\n _this2.data = [];\n\n _this2.data.push(_this2.tableData);\n\n _this2.loading = false;\n }).catch(function () {\n _this2.loading = false;\n });\n },\n cloumnCharts: function cloumnCharts(data) {\n var _legend;\n\n var chartDom = document.getElementById('column');\n var myChart = echarts.init(chartDom);\n var source = [];\n var obj = {\n run: '待处理病害',\n finish: '已处理',\n temporary: '暂存病害'\n };\n data.forEach(function (item) {\n var _source$push;\n\n source.push((_source$push = {\n product: item.name\n }, _defineProperty(_source$push, obj.run, item.runCount), _defineProperty(_source$push, obj.finish, item.finishCount), _defineProperty(_source$push, obj.temporary, item.temporaryCount), _source$push));\n });\n var option;\n option = {\n title: {\n textStyle: {\n color: '#fff'\n }\n },\n legend: (_legend = {\n itemHeight: 10,\n itemWidth: 10,\n bottom: 'bottom'\n }, _defineProperty(_legend, \"bottom\", 10), _defineProperty(_legend, \"textStyle\", {\n color: '#fff'\n }), _legend),\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n type: 'none'\n }\n },\n color: ['#16ffae', '#00e6f6', '#6255f8', '#0282b9', '#68c1e5', '#578bf1', '#56d0a3', '#596d90', '#6a5cf1'],\n dataset: {\n dimensions: ['product', '待处理病害', '已处理', '暂存病害'],\n source: source\n },\n xAxis: {\n type: 'category',\n axisLabel: {\n fontSize: 14,\n color: '#cefff2'\n },\n axisTick: {\n show: true,\n lineStyle: {\n color: '#fff'\n }\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#fff'\n }\n }\n },\n yAxis: {\n type: 'value',\n splitLine: {\n show: true\n },\n //去除网格线\n axisLabel: {\n textStyle: {\n color: '#fff'\n }\n },\n axisTick: {\n //y轴刻度线\n show: true,\n lineStyle: {\n color: '#fff'\n }\n },\n axisLine: {\n //y轴\n show: false,\n lineStyle: {\n color: '#fff'\n }\n }\n },\n series: [{\n type: 'bar',\n // // barGap: 0,\n // labelLine: {\n // length: 15,\n // length2: 0,\n // maxSurfaceAngle: 80\n // },\n itemStyle: {\n color: '#578af0'\n },\n barWidth: '15%'\n }, {\n type: 'bar',\n itemStyle: {\n color: '#56cfa2'\n },\n barWidth: '15%'\n }, {\n type: 'bar',\n itemStyle: {\n color: '#56cfa2'\n },\n barWidth: '15%'\n }]\n };\n option && myChart.setOption(option);\n },\n lineCharts: function lineCharts(data) {\n var _legend2;\n\n var chartDom = document.getElementById('line');\n var myChart = echarts.init(chartDom);\n var series = [];\n var XData = [];\n data.forEach(function (item) {\n XData.push(item.name);\n var val = new BigNumber(item.runCount);\n val = val.plus(item.finishCount).plus(item.temporaryCount);\n series.push(val.toNumber());\n });\n var option;\n option = {\n tooltip: {\n trigger: 'axis'\n },\n legend: (_legend2 = {\n bottom: 'bottom'\n }, _defineProperty(_legend2, \"bottom\", 10), _defineProperty(_legend2, \"textStyle\", {\n color: '#fff'\n }), _legend2),\n xAxis: {\n type: 'category',\n // boundaryGap: false,\n axisLabel: {\n fontSize: 14,\n color: '#cefff2'\n },\n axisLine: {\n show: true,\n lineStyle: {\n color: '#fff'\n }\n },\n data: XData\n },\n yAxis: {\n type: 'value',\n splitLine: {\n show: true\n },\n //去除网格线\n axisLabel: {\n textStyle: {\n color: '#fff'\n }\n },\n axisTick: {\n //y轴刻度线\n show: true,\n lineStyle: {\n color: '#fff'\n }\n },\n axisLine: {\n //y轴\n show: false,\n lineStyle: {\n color: '#fff'\n }\n }\n },\n series: [{\n data: series,\n type: 'line'\n }]\n };\n option && myChart.setOption(option);\n }\n }\n};",null]}