Просмотр исходного кода

默认显示24小时数据,以此类推

yf_wsy 3 лет назад
Родитель
Сommit
9f9f7dba67

+ 13 - 13
bigdata2/config/index.js

@@ -14,27 +14,27 @@ module.exports = {
         // target: 'http://192.168.1.3:8000/',
         // target: 'http://192.168.1.77:8005/',
         // target: 'http://192.168.1.106:8000/',
-        target: 'http://192.168.1.123:8005/',
+        target: 'http://192.168.1.66:9000/',
         // target: 'http://192.168.1.120:8001/',
         changeOrigin: true,
         pathRewrite: {
           '': ''   //重写接口
         }
       },
-      '/api': {
-        // target: 'http://192.168.1.4:8000/',
-        // target: 'http://192.168.1.120:8001/',
-        // target: 'http://192.168.1.106:8000/',
-        target: 'http://192.168.1.123:8007/',
-        // target: 'http://192.168.1.177:8000/',
-        changeOrigin: true,
-        pathRewrite: {
-          '^/api': '/api'   //重写接口
-        }
-      },
+      // '/api': {
+      // target: 'http://192.168.1.4:8000/',
+      // target: 'http://192.168.1.120:8001/',
+      // target: 'http://192.168.1.106:8000/',
+      // target: 'http://192.168.1.123:8007/',
+      // target: 'http://192.168.1.177:8000/',
+      //   changeOrigin: true,
+      //   pathRewrite: {
+      //     '^/api': '/api'   //重写接口
+      //   }
+      // },
     },
     // Various Dev Server settings
-    host: '192.168.1.123', // can be overwritten by process.env.HOST
+    host: '192.168.1.66', // can be overwritten by process.env.HOST
     port: 8000, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

Разница между файлами не показана из-за своего большого размера
+ 15704 - 20
bigdata2/package-lock.json


+ 3 - 3
bigdata2/src/components/DateSearch/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div>
+	<div >
 		<el-button
 			:type="btnSelected == '1'?'primary':'default'"
 			size="mini"
@@ -24,7 +24,7 @@
 export default {
 	data() {
 		return {
-			btnSelected: '2',
+			btnSelected: '1',
 			queryInfo: {
 				begin: '',
 				end: ''
@@ -33,7 +33,7 @@ export default {
 		}
 	},
 	mounted(){
-		this.timeBtnClick(2)
+		this.timeBtnClick(1)
 	},
 	methods: {
 		//筛选时间

+ 238 - 6
bigdata2/src/pages/forecasting/bzy/DataDetail.vue

@@ -10,7 +10,7 @@
 				<span>设备ID:{{id}}</span>
 				<span>设备名称:{{name||'无'}}</span>
 			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
+			<DateSearch @dateChange="dateChange" ref="setSelected"></DateSearch>
 		</div>
 		<div class="ctrl-check">
 			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
@@ -18,8 +18,9 @@
 		<el-row :gutter="20">
 			<el-col :md="24" :lg="12">
 				<el-card class="box-card">
-					<div style="text-align:center;font-size:20px;height:360px;position: relative;" v-if="Object.keys(option1).length<=0"><div class="el-loading-mask" style=""><div class="el-loading-spinner"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg><!----></div></div></div>
-					<div v-else class="charts">
+					<!-- <div style="text-align:center;font-size:20px;height:360px;position: relative;" v-if="Object.keys(option1).length<=0"><div class="el-loading-mask" style=""><div class="el-loading-spinner"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div></div> -->
+					<!-- <div v-else class="charts"> -->
+					<div class="charts">
 						<highcharts :options="option1" v-if="Object.keys(option1).length>0"></highcharts>
 						<div v-else style="text-align:center;font-size:20px;line-height:360px">暂无数据</div>
 					</div>
@@ -27,8 +28,9 @@
 			</el-col>
 			<el-col :md="24" :lg="12">
 				<el-card class="box-card">
-					<div style="text-align:center;font-size:20px;height:360px;position: relative;" v-if="Object.keys(option2).length<=0"><div class="el-loading-mask" style=""><div class="el-loading-spinner"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg><!----></div></div></div>
-					<div v-else class="charts">
+					<!-- <div style="text-align:center;font-size:20px;height:360px;position: relative;" v-if="Object.keys(option2).length<=0"><div class="el-loading-mask" style=""><div class="el-loading-spinner"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div></div> -->
+					<!-- <div v-else class="charts"> -->
+					<div class="charts">
 						<highcharts :options="option2" v-if="Object.keys(option2).length>0"></highcharts>
 						<div v-else style="text-align:center;font-size:20px;line-height:360px">暂无数据</div>
 					</div>
@@ -72,6 +74,10 @@ export default {
 	},
 	data() {
 		return {
+			isOne:true,
+			isSelect:true,
+			isSelectNian:true,
+			isSelectYear:true,
 			loading:true,
 			id: this.$route.params.e_id,
 			name: this.$route.query.name,
@@ -113,6 +119,226 @@ export default {
 	},
 	methods: {
 		//获取折线数据
+		initChartDataList() {
+			this.$axios({
+				method: 'POST',
+				url: '/bzy_report_detail_chart',
+				data: this.qs.stringify({
+					req: 'filter',
+					id: this.queryInfo.e_id,
+					begin: this.queryInfo.begin,
+					end: this.queryInfo.end
+				})
+			}).then((res) => {
+				if (res.data.length) {
+					var ChartData = [
+						{
+							name: '温度(°C)',
+							dat: []
+						},
+						{
+							name: '湿度(RH)',
+							dat: []
+						},
+						{
+							name: '保温仓温度(°C)',
+							dat: []
+						}
+					]
+					var data = res.data
+					for (let item of data) {
+						ChartData[0].dat.unshift([
+							this.returnTime(item.tim),
+							parseFloat(item.at)
+						])
+						ChartData[1].dat.unshift([
+							this.returnTime(item.tim),
+							parseFloat(item.ah)
+						])
+						ChartData[2].dat.unshift([
+							this.returnTime(item.tim),
+							parseFloat(item.pre_temp)
+						])
+					}
+					this.option1 = {
+						chart: {
+							zoomType: 'x'
+						},
+						title: {
+							text: '环境温湿度',
+							align: 'left'
+						},
+						subtitle: {
+							text: ''
+						},
+						xAxis: {
+							crosshair: true, //十字基准线
+							type: 'datetime',
+							dateTimeLabelFormats: {
+								//根据时间间距X轴自动显示哪种格式
+								millisecond: '%H:%M:%S.%L',
+								second: '%H:%M:%S',
+								minute: '%H:%M',
+								hour: '%H:%M',
+								day: '%m-%d',
+								week: '%m-%d',
+								month: '%Y-%m',
+								year: '%Y'
+							}
+						},
+						yAxis: {
+							title: {
+								text: ''
+							}
+						},
+						legend: {
+							// layout: 'vertical',
+							align: 'right',
+							verticalAlign: 'top'
+						},
+						plotOptions: {
+							series: {
+								label: {
+									connectorAllowed: false
+								},
+								pointStart: 2010 //该参数定义了数据点的起点
+							}
+						},
+						series: [
+							{
+								name: ChartData[0].name,
+								data: ChartData[0].dat
+							},
+							{
+								name: ChartData[1].name,
+								data: ChartData[1].dat
+							}
+						],
+						colors: ['#00e29d', '#6cbbff', '#ff3f3f'],
+						credits: {
+							//去掉默认的highcharts.com
+							enabled: false
+						},
+						tooltip: {
+							// crosshairs: true,
+							shared: true, //折线共享
+							headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>'
+						},
+						responsive: {
+							rules: [
+								{
+									condition: {
+										maxWidth: 500
+									},
+									chartOptions: {
+										legend: {
+											layout: 'horizontal',
+											align: 'center',
+											verticalAlign: 'bottom'
+										}
+									}
+								}
+							]
+						}
+					}
+					this.option2 = {
+						chart: {
+							zoomType: 'x'
+						},
+						title: {
+							text: '保温仓温度',
+							align: 'left'
+						},
+						subtitle: {
+							text: ''
+						},
+						xAxis: {
+							crosshair: true, //十字基准线
+							type: 'datetime',
+							dateTimeLabelFormats: {
+								//根据时间间距X轴自动显示哪种格式
+								millisecond: '%H:%M:%S.%L',
+								second: '%H:%M:%S',
+								minute: '%H:%M',
+								hour: '%H:%M',
+								day: '%m-%d',
+								week: '%m-%d',
+								month: '%Y-%m',
+								year: '%Y'
+							}
+						},
+						yAxis: {
+							title: { text: '' }
+						},
+						legend: {
+							// layout: 'vertical',
+							align: 'right',
+							verticalAlign: 'top'
+						},
+						plotOptions: {
+							series: {
+								label: {
+									connectorAllowed: false
+								},
+								pointStart: 2010
+							}
+						},
+						series: [
+							{
+								name: ChartData[2].name,
+								data: ChartData[2].dat
+							}
+						],
+						colors: ['#00e29d', '#6cbbff', '#ff3f3f'],
+						credits: {
+							//去掉默认的highcharts.com
+							enabled: false
+						},
+						tooltip: {
+							// crosshairs: true,
+							shared: true, //折线共享
+							headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>'
+						},
+						responsive: {
+							rules: [
+								{
+									condition: {
+										maxWidth: 500
+									},
+									chartOptions: {
+										legend: {
+											layout: 'horizontal',
+											align: 'center',
+											verticalAlign: 'bottom'
+										}
+									}
+								}
+							]
+						}
+					}
+				}else{
+					this.option1 = {}
+					this.option2 = {}
+					if(this.isSelect){
+						this.$refs.setSelected.timeBtnClick(2);
+						this.isSelect = false
+						this.getChartDataList()
+						this.getHisDataList()
+					}else if(this.isSelectNian){
+						this.$refs.setSelected.timeBtnClick(3);
+						this.isSelectNian = false
+						this.getChartDataList()
+						this.getHisDataList()
+					}else if(this.isSelectYear){
+						this.$refs.setSelected.timeBtnClick(4);
+						this.isSelectYear = false
+						this.getChartDataList()
+						this.getHisDataList()
+					}
+				}
+			})
+		},
+		//获取折线数据
 		getChartDataList() {
 			this.$axios({
 				method: 'POST',
@@ -313,6 +539,7 @@ export default {
 				}else{
 					this.option1 = {}
 					this.option2 = {}
+					
 				}
 			})
 		},
@@ -380,7 +607,12 @@ export default {
 			this.queryInfo.begin = new Date(data.begin*1000).toLocaleDateString().replace(/\//g,'-'); 
 			this.queryInfo.end = new Date(data.end*1000).toLocaleDateString().replace(/\//g,'-'); 
 			this.getHisDataList()
-			this.getChartDataList()
+			if(this.isOne){
+				this.initChartDataList()
+			}else{
+				this.getChartDataList()
+			}
+			this.isOne = false
 		},
 		changePage(val) {
 			this.queryInfo.page = val

+ 154 - 17
bigdata2/src/pages/forecasting/cbd/DataDetails.vue

@@ -10,7 +10,7 @@
 				<span>设备名称:{{this.$route.query.name || '无'}}</span>
 				<span>位置:{{this.$route.query.address || "无"}}</span>
 			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
+			<DateSearch @dateChange="dateChange" ref="setSelected"></DateSearch>
 		</div>
 		<div class="ctrl-check">
 			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
@@ -254,6 +254,10 @@ export default {
 	},
 	data() {
 		return {
+			isOne:true,
+			isSelect:true,
+			isSelectNian:true,
+			isSelectYear:true,
 			// 请求sim卡获取到需要回显的数据
 			simLoading:true, //sim卡加载loading
 			showHksimFlag:true, //是否显示hksim卡标识
@@ -370,6 +374,132 @@ export default {
 	},
 	methods: {
 		//获取折线图数据
+		initChartLine() {
+			this.$axios({
+				method: 'POST',
+				url: '/cbd_report_detail_chart',
+				data: this.qs.stringify({
+					req: 'filter',
+					begin: this.queryInfo.begin,
+					end: this.queryInfo.end,
+					id: this.$route.query.id
+				})
+			}).then((res) => {
+				if(res.data.length>0){
+					var at = [],ah = [];
+					for(var i = 0;i<res.data.length;i++){
+						at.push([this.returnTime(res.data[i].tim),res.data[i].at/10])
+						ah.push([this.returnTime(res.data[i].tim),res.data[i].ah/10])
+						if(i == res.data.length-1){
+							this.options = {
+								chart: {
+									zoomType: 'x',
+									height: 360,
+								},
+								title: {
+									text: '环境温湿度',
+									align: 'left'
+								},
+								subtitle: {
+									text: ''
+								},
+								xAxis: {
+									crosshair: true, //十字基准线
+									type: 'datetime',
+									dateTimeLabelFormats: {
+										//根据时间间距X轴自动显示哪种格式
+										millisecond: '%H:%M:%S.%L',
+										second: '%H:%M:%S',
+										minute: '%H:%M',
+										hour: '%H:%M',
+										day: '%m-%d',
+										week: '%m-%d',
+										month: '%Y-%m',
+										year: '%Y'
+									}
+								},
+								yAxis: {
+									title: {
+										text: ''
+									}
+								},
+								legend: {
+									// layout: 'vertical',
+									align: 'right',
+									verticalAlign: 'top'
+								},
+								plotOptions: {
+									series: {
+										label: {
+											connectorAllowed: false
+										},
+										pointStart: 2010
+									}
+								},
+								series: [
+									{
+										name: '环境湿度',
+										data: ah
+									},
+									{
+										name: '环境温度',
+										data: at
+									}
+								],
+								colors: ['#00e29d', '#6cbbff', '#ff3f3f'],
+								credits: {
+									//去掉默认的highcharts.com
+									enabled: false
+								},
+								tooltip: {
+									// crosshairs: true,
+									shared: true, //折线共享
+									headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>'
+								},
+								responsive: {
+									rules: [
+										{
+											condition: {
+												maxWidth: 500
+											},
+											chartOptions: {
+												legend: {
+													layout: 'horizontal',
+													align: 'center',
+													verticalAlign: 'bottom'
+												}
+											}
+										}
+									]
+								}
+							}
+						}
+					}
+				}else{
+					this.options = {};
+					if(this.isSelect){
+					console.log(res.data.length);
+						this.$refs.setSelected.timeBtnClick(2);
+						this.isSelect = false
+						this.getChartLine();
+						this.getHisDataList()
+					}else if(this.isSelectNian){
+					console.log(res.data.length);
+						this.$refs.setSelected.timeBtnClick(3);
+						this.isSelectNian = false
+						this.getChartLine()
+						this.getHisDataList()
+					}else if(this.isSelectYear){
+					console.log(res.data.length);
+						this.$refs.setSelected.timeBtnClick(4);
+						this.isSelectYear = false
+						this.getChartLine()
+						this.getHisDataList()
+					}
+				}
+			})
+		},
+		//获取折线图数据
 		getChartLine() {
 			this.$axios({
 				method: 'POST',
@@ -473,6 +603,7 @@ export default {
 					}
 				}else{
 					this.options = {};
+					
 				}
 			})
 		},
@@ -511,6 +642,12 @@ export default {
 			this.queryInfo.end = new Date(data.end*1000).toLocaleDateString().replace(/\//g,'-'); 
 			this.getChartLine()
 			this.getHisDataList()
+			if(this.isOne){
+				this.initChartLine()
+			}else{
+				this.getChartLine()
+			}
+			this.isOne = false
 		},
 		//获取表格数据
 		getHisDataList() {
@@ -528,22 +665,22 @@ export default {
 				this.tableData = []
 				this.total = res.data.nums
 				var dat = res.data.dat
-				for (var i = 0; i < dat.length; i++) {
-					var cbd_data = eval('('+dat[i].cbd_data+')')
-					var rps = cbd_data.rps == 0 ? '正常' : '雨控';
-					var tps = cbd_data.tps == 0 ? '正常' : '温控';
-					var lps = cbd_data.lps == 0 ? '正常' : '光控';
-					this.tableData.push({
-						at:(cbd_data.at/10).toFixed(2),
-						ah:(cbd_data.ah/10).toFixed(2),
-						hrt:cbd_data.hrt,
-						rps:rps,
-						tps:tps,
-						lps:lps,
-						vbat:cbd_data.vbat,
-						addtime:dat[i].upl_time
-					})
-				}
+					for (var i = 0; i < dat.length; i++) {
+						var cbd_data = eval('('+dat[i].cbd_data+')')
+						var rps = cbd_data.rps == 0 ? '正常' : '雨控';
+						var tps = cbd_data.tps == 0 ? '正常' : '温控';
+						var lps = cbd_data.lps == 0 ? '正常' : '光控';
+						this.tableData.push({
+							at:(cbd_data.at/10).toFixed(2),
+							ah:(cbd_data.ah/10).toFixed(2),
+							hrt:cbd_data.hrt,
+							rps:rps,
+							tps:tps,
+							lps:lps,
+							vbat:cbd_data.vbat,
+							addtime:dat[i].upl_time
+						})
+					}
 			})
 		},
 		//改变page

+ 229 - 2
bigdata2/src/pages/forecasting/xycb/xycbDataDetail.vue

@@ -9,7 +9,7 @@
 				<span>设备ID:{{this.queryInfo.e_id}}</span>
 				<span>设备名称:{{name || '无'}}</span>
 			</div>
-			<DateSearch @dateChange="dateChange"></DateSearch>
+			<DateSearch @dateChange="dateChange" ref="setSelected"></DateSearch>
 		</div>
 		<div class="ctrl-check">
 			<el-button type="primary" size="mini" @click="refresh">刷新</el-button>
@@ -86,6 +86,10 @@ export default {
 	},
 	data() {
 		return {
+			isOne:true,
+			isSelect:true,
+			isSelectNian:true,
+			isSelectYear:true,
 			device_model: 1, //性诱1型或II型
 			name:this.$route.query.name,
 			btnSelected: '',
@@ -162,6 +166,223 @@ export default {
 			return timestamp;
 		},
 		//获取折线数据
+		initChartDataList() {
+			this.$axios({
+				method: 'POST',
+				url: '/sex_at_ah',
+				data: this.qs.stringify({
+					begin:  this.queryInfo.begin,
+					end: this.queryInfo.end,
+					e_id: this.queryInfo.e_id,
+				})
+			}).then((res) => {
+				if (res.data.length > 0) {
+					var ChartData = [
+						{
+							name: '温度(°C)',
+							dat: []
+						},
+						{
+							name: '湿度(%)',
+							dat: []
+						},
+						{
+							name: '红外计数值',
+							dat: []
+						},
+						{
+							name: '高压计数值',
+							dat: []
+						},
+						{
+							name: 'cpu温度(°C)',
+							dat: []
+						}
+					]
+					var data = res.data
+					for (let item of data) {
+						ChartData[0].dat.unshift([
+							this.returnTime(item.tim),
+							Number(item.at)
+						])
+						ChartData[1].dat.unshift([
+							this.returnTime(item.tim),
+							Number(item.ah)
+						])
+						ChartData[2].dat.unshift([
+							this.returnTime(item.tim),
+							Number(item.infr_ct)
+						])
+					}
+					this.options = {
+						chart: {
+							zoomType: 'x'
+						},
+						title: {
+							text: '环境温湿度',
+							align: 'left'
+						},
+						subtitle: {
+							text: ''
+						},
+						xAxis: {
+							crosshair: true, //十字基准线
+							type: 'datetime',
+							dateTimeLabelFormats: {
+								//根据时间间距X轴自动显示哪种格式
+								millisecond: '%H:%M:%S.%L',
+								second: '%H:%M:%S',
+								minute: '%H:%M',
+								hour: '%H:%M',
+								day: '%m-%d',
+								week: '%m-%d',
+								month: '%Y-%m',
+								year: '%Y'
+							}
+						},
+						yAxis: {
+							title: {
+								text: ''
+							}
+						},
+						legend: {
+							// layout: 'vertical',
+							align: 'right',
+							verticalAlign: 'top'
+						},
+						plotOptions: {
+							series: {
+								label: {
+									connectorAllowed: false
+								},
+								pointStart: 2010
+							}
+						},
+						series: [
+							{
+								type: 'spline',
+								name: ChartData[0].name,
+								data: ChartData[0].dat
+							},
+							{
+								type: 'spline',
+								name: ChartData[1].name,
+								data: ChartData[1].dat
+							},
+						],
+						colors: ['#6cbbff', '#ff3f3f','#00e29d', ],
+						credits: {
+							//去掉默认的highcharts.com
+							enabled: false
+						},
+						tooltip: {
+							// crosshairs: true,
+							shared: true, //折线共享
+							headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>'
+						}
+					}
+					this.options2 = {
+						chart: {
+							zoomType: 'x'
+						},
+						title: {
+							text: '红外计数值',
+							align: 'left'
+						},
+						subtitle: {
+							text: ''
+						},
+						xAxis: {
+							crosshair: true, //十字基准线
+							type: 'datetime',
+							dateTimeLabelFormats: {
+								//根据时间间距X轴自动显示哪种格式
+								millisecond: '%H:%M:%S.%L',
+								second: '%H:%M:%S',
+								minute: '%H:%M',
+								hour: '%H:%M',
+								day: '%m-%d',
+								week: '%m-%d',
+								month: '%Y-%m',
+								year: '%Y'
+							}
+						},
+						yAxis: {
+							title: {
+								text: ''
+							}
+						},
+						legend: {
+							// layout: 'vertical',
+							align: 'right',
+							verticalAlign: 'top'
+						},
+						plotOptions: {
+							series: {
+								label: {
+									connectorAllowed: false
+								},
+								pointStart: 2010
+							}
+						},
+						series: [
+							{
+								type: 'spline',
+								name: ChartData[2].name,
+								data: ChartData[2].dat
+							}
+						],
+						colors: ['#00e29d', '#6cbbff', '#ff3f3f'],
+						credits: {
+							//去掉默认的highcharts.com
+							enabled: false
+						},
+						tooltip: {
+							// crosshairs: true,
+							shared: true, //折线共享
+							headerFormat: '<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>'
+						},
+						responsive: {
+							rules: [
+								{
+									condition: {
+										maxWidth: 500
+									},
+									chartOptions: {
+										legend: {
+											layout: 'horizontal',
+											align: 'center',
+											verticalAlign: 'bottom'
+										}
+									}
+								}
+							]
+						}
+					}
+					
+				}else{
+					this.options = {};
+					this.options2 = {};
+					if(this.isSelect){
+						this.$refs.setSelected.timeBtnClick(2);
+						this.isSelect = false
+						this.getChartDataList()
+						this.getHisDataList()
+					}else if(this.isSelectNian){
+						this.$refs.setSelected.timeBtnClick(3);
+						this.isSelectNian = false
+						this.getChartDataList()
+						this.getHisDataList()
+					}else if(this.isSelectYear){
+						this.$refs.setSelected.timeBtnClick(4);
+						this.isSelectYear = false
+						this.getChartDataList()
+						this.getHisDataList()
+					}
+				}
+			})
+		},
+		//获取折线数据
 		getChartDataList() {
 			this.$axios({
 				method: 'POST',
@@ -359,6 +580,7 @@ export default {
 				}else{
 					this.options = {};
 					this.options2 = {};
+					
 				}
 			})
 		},
@@ -431,7 +653,12 @@ export default {
 			this.queryInfo.begin = data.begin?new Date(data.begin*1000).toLocaleDateString().replace(/\//g,'-'):''; 
 			this.queryInfo.end = data.end?new Date(data.end*1000).toLocaleDateString().replace(/\//g,'-'):''; 
 			this.getHisDataList()
-			this.getChartDataList()
+			if(this.isOne){
+				this.initChartDataList()
+			}else{
+				this.getChartDataList()
+			}
+			this.isOne = false
 		},
 		setWidth(item) {
 			if (item[1] == 'addtime') {

+ 6 - 0
package-lock.json

@@ -0,0 +1,6 @@
+{
+  "name": "RT_ZB",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {}
+}