{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\views\\StatePrediction\\LifePrediction.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\views\\StatePrediction\\LifePrediction.vue","mtime":1667804639696},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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//\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//\nimport req from '@/api/biz/statePrediction.js';\nimport prediction from '@/api/biz/healthData.js';\nimport { Chart } from '@antv/g2';\nexport default {\n name: 'life-prediction',\n data: function data() {\n return {\n params: {\n collTime: '',\n fanCode: ''\n },\n dateTime: '',\n value1: '',\n options: [],\n partsForm: {\n name: '',\n model: ''\n },\n crewList: [],\n //剩余寿命列表\n pageBean: {\n page: 1,\n pageSize: -1\n },\n total: 0\n };\n },\n created: function created() {\n this.getWindData();\n this.getDateTime();\n },\n mounted: function mounted() {\n this.getCrewList();\n this.initChart3();\n this.initChart4(); // 单机寿命\n\n this.initChart2();\n },\n methods: {\n // 获取当前日期\n getDateTime: function getDateTime() {\n var yesterday = new Date().getTime() - 24 * 60 * 60 * 1000;\n var date = new Date(yesterday);\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n\n if (month >= 1 && month <= 9) {\n month = '0' + month;\n }\n\n if (day >= 0 && day <= 9) {\n day = '0' + day;\n }\n\n this.dateTime = year + '-' + month + '-' + day;\n this.params.collTime = this.dateTime;\n },\n // 统计机组全场剩余寿命\n getCrewList: function getCrewList() {\n var _this = this;\n\n // 选择日期则查询当天健康状态台数,否则不查询\n var dateTime = this.dateTime;\n\n if (this.params.collTime) {\n dateTime = this.params.collTime;\n }\n\n var data = {\n pageBean: this.pageBean,\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'collTime',\n relation: 'AND',\n value: this.params.collTime\n }]\n };\n prediction.getCrewList(data).then(function (res) {\n _this.total = res.total;\n _this.crewList = res.rows;\n\n _this.initChart1();\n }); // 全场寿命\n },\n initChart1: function initChart1() {\n var data = this.crewList;\n var chart = new Chart({\n container: 'container1',\n autoFit: true,\n height: 500,\n forceFit: true\n });\n chart.data(data);\n chart.scale('residualLife', {\n nice: true,\n alias: '剩余寿命 %',\n max: 100,\n min: 0\n });\n chart.axis('residualLife', {\n label: {\n formatter: function formatter(val) {\n return val + '%';\n }\n },\n grid: {\n line: {\n style: {\n stroke: '#586377',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n }\n }\n });\n chart.option('scrollbar', {\n type: 'horizontal',\n categorySize: 40,\n animate: false,\n style: {\n thumbColor: '#199FD7',\n //滚动条背景颜色\n thumbHighlightColor: '#199FD7'\n }\n });\n chart.axis('fanCode', {\n line: {\n style: {\n lineWidth: 1,\n stroke: '#586377'\n }\n },\n label: {\n rotate: 45,\n offset: 20\n }\n });\n chart.legend('fanCode', {\n maxItemWidth: 50,\n maxWidthRatio: 50\n });\n chart.tooltip({\n showTitle: true,\n showMarkers: false,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n chart.interaction('element-active');\n chart.interaction('active-region');\n chart.interval().position('fanName*residualLife').style({\n fill: 'l(90) 0:#22C3FE 0.5:#199FD7 1:#044879'\n });\n chart.render();\n },\n initChart2: function initChart2() {\n var data = [{\n month: '1',\n city: '寿命设计曲线',\n temperature: 1\n }, {\n month: '1',\n city: '寿命预测曲线',\n temperature: 0.9\n }, {\n month: '2',\n city: '寿命设计曲线',\n temperature: 0.8\n }, {\n month: '2',\n city: '寿命预测曲线',\n temperature: 0.8\n }, {\n month: '3',\n city: '寿命设计曲线',\n temperature: 0.7\n }, {\n month: '3',\n city: '寿命预测曲线',\n temperature: 0.8\n }, {\n month: '4',\n city: '寿命设计曲线',\n temperature: 0.8\n }, {\n month: '4',\n city: '寿命预测曲线',\n temperature: 0.7\n }, {\n month: '5',\n city: '寿命设计曲线',\n temperature: 0.7\n }, {\n month: '5',\n city: '寿命预测曲线',\n temperature: 0.6\n }, {\n month: '6',\n city: '寿命设计曲线',\n temperature: 0.5\n }, {\n month: '6',\n city: '寿命预测曲线',\n temperature: 0.6\n }, {\n month: '7',\n city: '寿命设计曲线',\n temperature: 0.5\n }, {\n month: '7',\n city: '寿命预测曲线',\n temperature: 0.5\n }, {\n month: '8',\n city: '寿命设计曲线',\n temperature: 0.4\n }, {\n month: '8',\n city: '寿命预测曲线',\n temperature: 0.3\n }, {\n month: '9',\n city: '寿命设计曲线',\n temperature: 0.3\n }, {\n month: '9',\n city: '寿命预测曲线',\n temperature: 0.3\n }, {\n month: '10',\n city: '寿命设计曲线',\n temperature: 0.2\n }, {\n month: '10',\n city: '寿命预测曲线',\n temperature: 0.1\n }, {\n month: '11',\n city: '寿命设计曲线',\n temperature: 0\n }, {\n month: '11',\n city: '寿命预测曲线',\n temperature: 0\n }];\n var chart = new Chart({\n container: 'container2',\n autoFit: true,\n height: 300\n });\n chart.data(data);\n chart.scale({\n month: {\n nice: true\n },\n temperature: {\n min: 0,\n tickCount: 5,\n tickInterval: 0.2,\n nice: true\n }\n });\n chart.tooltip({\n showCrosshairs: true,\n shared: true,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n chart.axis('month', {\n line: {\n style: {\n lineWidth: 1,\n stroke: '#586377'\n }\n }\n });\n chart.axis('temperature', {\n grid: {\n line: {\n style: {\n stroke: '#586377',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n },\n alignTick: true\n }\n });\n chart.legend('city', {\n itemName: {\n style: {\n fill: '#979ba4'\n }\n }\n });\n chart.line().position('month*temperature').color('city');\n chart.render();\n },\n initChart3: function initChart3() {\n var data = [{\n month: '0',\n key: 'series1',\n value: 0\n }, {\n month: '0',\n key: 'series2',\n value: 0.002\n }, {\n month: '500',\n key: 'series1',\n value: 0.005\n }, {\n month: '500',\n key: 'series2',\n value: 0.006\n }, {\n month: '1000',\n key: 'series1',\n value: 0.01\n }, {\n month: '1000',\n key: 'series2',\n value: 0.013\n }, {\n month: '1500',\n key: 'series1',\n value: 0.015\n }, {\n month: '1500',\n key: 'series2',\n value: 0.015\n }, {\n month: '2000',\n key: 'series1',\n value: 0.02\n }, {\n month: '2000',\n key: 'series2',\n value: 0.022\n }, {\n month: '2500',\n key: 'series1',\n value: 0.025\n }, {\n month: '2500',\n key: 'series2',\n value: 0.026\n }, // {month: '3000', key: 'series1', value: 0.03},\n {\n month: '3000',\n key: 'series2',\n value: 0.031\n }];\n var chart = new Chart({\n container: 'container3',\n autoFit: true,\n height: 300\n });\n chart.data(data);\n chart.scale('month', {\n range: [0, 1]\n });\n chart.scale({\n value: {\n min: 0,\n tickInterval: 0.005,\n nice: true\n }\n }); // chart.scale('value', {\n // nice: true\n // })\n\n chart.axis('value', {\n title: {\n text: '损伤',\n style: {\n fill: '#979ba4'\n }\n },\n line: {\n style: {\n lineWidth: 1,\n stroke: '#586377'\n }\n },\n grid: {\n line: {\n style: {\n stroke: '#586377',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n },\n alignTick: true\n }\n });\n chart.axis('month', {\n // title: {\n // text: '时间 Hours',\n // style: {\n // fill: '#979ba4'\n // }\n // },\n line: {\n style: {\n lineWidth: 1,\n stroke: '#586377'\n }\n }\n });\n chart.legend('key', {\n itemName: {\n style: {\n fill: '#979ba4'\n }\n }\n });\n chart.tooltip({\n showCrosshairs: true,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n chart.line().position('month*value') // .shape('hv')\n .color('key');\n chart.render();\n },\n initChart4: function initChart4() {\n var data = [{\n month: '1',\n city: '瞬时载荷',\n temperature: 7\n }, {\n month: '1',\n city: '累计载荷',\n temperature: 3.9\n }, {\n month: '3',\n city: '瞬时载荷',\n temperature: 150\n }, {\n month: '3',\n city: '累计载荷',\n temperature: 1500\n }, {\n month: '5',\n city: '瞬时载荷',\n temperature: 200\n }, {\n month: '5',\n city: '累计载荷',\n temperature: 2000\n }, {\n month: '7',\n city: '瞬时载荷',\n temperature: 800\n }, {\n month: '7',\n city: '累计载荷',\n temperature: 3300\n }, {\n month: '9',\n city: '瞬时载荷',\n temperature: 500\n }, {\n month: '9',\n city: '累计载荷',\n temperature: 4100\n }, {\n month: '11',\n city: '瞬时载荷',\n temperature: 200\n }, {\n month: '11',\n city: '累计载荷',\n temperature: 5800\n }, {\n month: '13',\n city: '瞬时载荷',\n temperature: 600\n }, {\n month: '13',\n city: '累计载荷',\n temperature: 8000\n }, {\n month: '15',\n city: '瞬时载荷',\n temperature: 300\n }, {\n month: '15',\n city: '累计载荷',\n temperature: 11000\n }, {\n month: '17',\n city: '瞬时载荷',\n temperature: 700\n }, {\n month: '17',\n city: '累计载荷',\n temperature: 15000\n }, {\n month: '19',\n city: '瞬时载荷',\n temperature: 500\n }, {\n month: '19',\n city: '累计载荷',\n temperature: 18900\n }];\n var chart = new Chart({\n container: 'container4',\n autoFit: true,\n height: 300\n });\n chart.data(data);\n chart.scale({\n month: {\n range: [0, 1]\n },\n temperature: {\n min: 0,\n tickInterval: 2000,\n nice: true\n }\n });\n chart.axis('month', {\n line: {\n style: {\n lineWidth: 1,\n stroke: '#586377'\n }\n }\n });\n chart.axis('temperature', {\n grid: {\n line: {\n style: {\n stroke: '#586377',\n lineWidth: 1,\n lineDash: [3, 3]\n }\n },\n alignTick: true\n }\n });\n chart.tooltip({\n showCrosshairs: true,\n shared: true,\n domStyles: {\n 'g2-tooltip': {\n background: 'rgba(0,0,0, 0.8)',\n color: '#d6e0ec'\n }\n }\n });\n chart.legend('city', {\n itemName: {\n style: {\n fill: '#979ba4'\n }\n }\n });\n chart.line().position('month*temperature').color('city');\n chart.render();\n },\n getWindData: function getWindData() {\n var _this2 = this;\n\n var query = {\n sorter: [{\n direction: 'ASC',\n property: 'fanCode'\n }]\n };\n this.$http.post('${cssc}/biz/base/fanInfo/v1/list', query).then(function (resp) {\n var row = resp.data;\n\n for (var i = 0; i < row.length; i++) {\n var obj = {};\n obj.label = row[i].fanName;\n _this2.selecteCode = row[i].fanCode;\n obj.value = row[i].fanCode;\n\n _this2.options.push(obj);\n }\n });\n }\n }\n};",null]}