src/views/Equidata/index.vue | ●●●●● patch | view | raw | blame | history | |
src/views/Equipment/index.vue | ●●●●● patch | view | raw | blame | history | |
src/views/Listdata/index.vue | ●●●●● patch | view | raw | blame | history | |
src/views/contrast/index.vue | ●●●●● patch | view | raw | blame | history | |
src/views/reportForm/sensor.vue | ●●●●● patch | view | raw | blame | history | |
src/views/reportForm/sensorday.vue | ●●●●● patch | view | raw | blame | history |
src/views/Equidata/index.vue
@@ -26,23 +26,33 @@ :picker-options="pickerOptions" end-placeholder="结束日期" style="margin-left: 1rem" > </el-date-picker> /> <el-button type="primary" @click="toExcel()" style="margin-left: 20px" >导出</el-button <el-button type="primary" style="margin-left: 20px" @click="toExcel()" > <el-button @click="exportMon">查询</el-button> 导出 </el-button> <el-button @click="exportMon"> 查询 </el-button> </div> <el-table :data="dateList" id="exportTab" style="margin-top: 20px" border max-height="800"> <el-table id="exportTab" :data="dateList" style="margin-top: 20px" border max-height="800" > <el-table-column v-for="item in columnList" :key="item" :prop="item" :label="item" width="180px" :key="item" > </el-table-column> /> </el-table> </div> </template> @@ -127,6 +137,7 @@ label: this.defaultData[i].name, }) this.options[i].children = [] if (this.defaultData[i].devices) { for (let j = 0; j < this.defaultData[i].devices.length; j++) { this.options[i].children.push({ value: [ @@ -137,6 +148,7 @@ }) } } } }) .catch((error) => { console.log(error) src/views/Equipment/index.vue
@@ -2,7 +2,10 @@ <div style="padding: 20px"> <el-card> <div style="display: flex"> <div class="timee" style="margin-top: 0.5rem"> <div class="timee" style="margin-top: 0.5rem" > {{ time }} </div> <div style="margin-left: 1.5rem"> @@ -13,10 +16,10 @@ :props="props" collapse-tags clearable @change="changeYz" placeholder="选择设备" style="width: 25rem" ></el-cascader> @change="changeYz" /> </div> <div style="margin-left: 1.5rem"> <span>选择因子:</span> @@ -27,10 +30,15 @@ collapse-tags clearable @change="res" ></el-cascader> /> </div> <div style="margin-left: 1.5rem"> <el-button type="primary" @click="Equisel">查询</el-button> <el-button type="primary" @click="Equisel" > 查询 </el-button> </div> </div> </el-card> @@ -42,12 +50,11 @@ > <el-table-column v-for="item in columnList" :key="item" :prop="item" :label="item" width="180px" :key="item" > </el-table-column> /> </el-table> </div> </template> @@ -97,10 +104,24 @@ } }, }, // 生命周期 - 创建完成(可以访问当前 this 实例) created () { this.time = this.dateTypeFormat('YYYY-mm-dd HH:MM:SS', new Date()) this.getData() }, // 生命周期 - 挂载完成(可以访问 DOM 元素) mounted () {}, beforeCreate () {}, // 生命周期 - 创建之前 beforeMount () {}, // 生命周期 - 挂载之前 beforeUpdate () {}, // 生命周期 - 更新之前 updated () {}, // 生命周期 - 更新之后 beforeDestroy () {}, // 生命周期 - 销毁之前 destroyed () {}, // 生命周期 - 销毁完成 activated () {}, //方法集合 methods: { res(res){ console.log(res.toString()); console.log(res.toString()) }, getData() { this.$request({ @@ -118,6 +139,7 @@ label: this.defaultData[i].name, }) this.options[i].children = [] if (this.defaultData[i].devices) { for (let j = 0; j < this.defaultData[i].devices.length; j++) { this.options[i].children.push({ value: [ @@ -128,13 +150,14 @@ }) } } } }) .catch((error) => { console.log(error) }) }, changeYz(){ this.getSensor(); this.getSensor() }, getSensor() { this.$request({ @@ -145,7 +168,7 @@ }, }) .then((result) => { console.log(result); console.log(result) var sensor = result.data for (var i in sensor) { this.newSensor.push({ value: i, label: sensor[i] }) @@ -165,7 +188,7 @@ sensorCode:this.value1 } }).then((res)=>{ console.log(res); console.log(res) this.tableData = res.data console.log(this.tableData, 'this.tableData') for (let key in this.tableData[0]) { @@ -176,21 +199,7 @@ } }) } }, //生命周期 - 创建完成(可以访问当前 this 实例) created() { this.time = this.dateTypeFormat('YYYY-mm-dd HH:MM:SS', new Date()) this.getData(); }, //生命周期 - 挂载完成(可以访问 DOM 元素) mounted() {}, beforeCreate() {}, //生命周期 - 创建之前 beforeMount() {}, //生命周期 - 挂载之前 beforeUpdate() {}, //生命周期 - 更新之前 updated() {}, //生命周期 - 更新之后 beforeDestroy() {}, //生命周期 - 销毁之前 destroyed() {}, //生命周期 - 销毁完成 activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发 }, // 如果页面有keep-alive缓存功能,这个函数会触发 } </script> <style scoped> src/views/Listdata/index.vue
@@ -31,7 +31,7 @@ :props="props" collapse-tags clearable ></el-cascader> /> </div> <div> <el-select @@ -44,15 +44,14 @@ :key="item.value" :label="item.label" :value="item.value" > </el-option> /> </el-select> </div> <component :is="dataType" style="padding-left: 0; margin-left: 20px; width: 160px" @sendPickerChild="showPickerChild" class="select11" @sendPickerChild="showPickerChild" /> <!-- <el-button type="primary" @click="toExcel()" style="margin-left: 20px" @@ -69,32 +68,38 @@ <el-dropdown split-button type="primary" style="margin-left: 20px" @click="toExcel()" @command="handleCommand" style="margin-left: 20px" > 导出 <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="expNew">导出(新)</el-dropdown-item> <el-dropdown-item command="expNew"> 导出(新) </el-dropdown-item> </el-dropdown-menu> </el-dropdown> <el-button @click="exportMon" style="margin-left: 10px">查询</el-button> <el-button style="margin-left: 10px" @click="exportMon" > 查询 </el-button> </div> <el-table :data="dateList" id="exportTab" :data="dateList" style="margin-top: 20px" border max-height="800" > <el-table-column v-for="item in columnList" :key="item" :prop="item" :label="item" width="180px" :key="item" > </el-table-column> /> <!-- <el-table-column v-for="item in columnList" :prop="item.props" @@ -285,6 +290,7 @@ label: this.defaultData[i].name, }) this.options[i].children = [] if (this.defaultData[i].devices) { for (let j = 0; j < this.defaultData[i].devices.length; j++) { this.options[i].children.push({ value: [ @@ -295,6 +301,7 @@ }) } } } }) .catch((error) => { console.log(error) src/views/contrast/index.vue
@@ -1,9 +1,22 @@ <template> <div style="width: 100%; height: 100%; margin:0 auto"> <div class="topSelect"> <el-cascader v-model="newMac" :options="options" clearable placeholder="选择设备" style="width: 354px" /> <el-cascader v-model="value" :options="newSensor" :props="props" collapse-tags clearable placeholder="选择因子" style="margin-left: 20px" /> <el-cascader v-model="newMac" :options="options" clearable placeholder="选择设备" style="width: 354px" /> <el-cascader v-model="value" :options="newSensor" :props="props" collapse-tags clearable placeholder="选择因子" style="margin-left: 20px" /> <!-- <el-select v-model="value" placeholder="选择因子"> <el-option v-for="item in newSensor" @@ -18,20 +31,40 @@ <!-- <el-radio-button label="年报" /> <el-radio-button label="自定义" /> --> <!-- </el-radio-group> --> <el-select v-model="radio1" placeholder="请选择" style="margin-left: 20px"> <el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"> </el-option> <el-select v-model="radio1" placeholder="请选择" style="margin-left: 20px" > <el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value" /> </el-select> <component :is="dataType" class="select11" style="padding-left: 0; margin-left: 20px; width: 160px" @sendPickerChild="showPickerChild" /> <component :is="dataType" class="select11" style="padding-left: 0; margin-left: 20px; width: 160px" @sendPickerChild="showPickerChild" /> <!--查询按钮--> <el-button @click="selectData" class="btn1">查询</el-button> <el-button class="btn1" @click="selectData" > 查询 </el-button> </div> <!-- <div class="topTitle"> <div style="position:absolute">(单位:ug/m³)</div> <div style="text-align: center;width: 100%;">{{ newData }}·{{ newMac?newMac[0]:'' }}·{{ newMac?newMac[newMac.length - 1][0]:'' }}·{{ value |sensorFilter }}·趋势图</div> </div> --> <LineChart :chart-data="lineChartData" style="height: 40rem;" /> <LineChart :chart-data="lineChartData" style="height: 40rem;" /> </div> </template> @@ -200,6 +233,7 @@ label: this.defaultData[i].name, }) this.options[i].children = [] if (this.defaultData[i].devices) { for (let j = 0; j < this.defaultData[i].devices.length; j++) { this.options[i].children.push({ value: [ @@ -208,6 +242,7 @@ ], label: this.defaultData[i].devices[j].name, }) } } } }) @@ -275,12 +310,16 @@ } for (var i = 0; i < data.length; i++) { newLineChartData.series.push({ data: [], name: '', type: 'line', triggerLineEvent: true, emphasis: { focus: 'series' }, lineStyle: { width: 4 } data: [], name: '', type: 'line', triggerLineEvent: true, emphasis: { focus: 'series' }, lineStyle: { width: 4 } }) // newLineChartData.yAxis.push({}) newLineChartData.series[i].name = data[i].name newLineChartData.title.push(data[i].name); newLineChartData.title.push(data[i].name) for (var j = 0; j < data[i].timeValueList.length; j++) { newLineChartData.series[i].data.push(data[i].timeValueList[j].value) } src/views/reportForm/sensor.vue
@@ -12,7 +12,10 @@ style="width: 21rem" /> <div> <el-radio-group v-model="select1" style="margin-left: 20px"> <el-radio-group v-model="select1" style="margin-left: 20px" > <el-radio-button label="小时报" /> <el-radio-button label="日报" /> <el-radio-button label="周报" /> @@ -23,8 +26,8 @@ <component :is="dataType" style="padding-left: 0; margin-left: 30px" @sendPickerChild="showPickerChild" class="select11" @sendPickerChild="showPickerChild" /> <el-date-picker v-if="dateDisplay" @@ -38,11 +41,17 @@ /> <el-button type="primary" @click="getReportForm()" style="margin-left: 10px" >查询</el-button @click="getReportForm()" > <el-button type="primary" @click="exportExcel()">报表导出</el-button> 查询 </el-button> <el-button type="primary" @click="exportExcel()" > 报表导出 </el-button> </div> </div> <div class="topTitle"> @@ -56,7 +65,11 @@ :stripe="true" @sort-change="changeTableSort" > <el-table-column prop="rank" label="排名" align="center" /> <el-table-column prop="rank" label="排名" align="center" /> <el-table-column prop="deviceName" label="设备" @@ -69,8 +82,18 @@ width="180" align="center" /> <el-table-column prop="time" label="时间" width="180" align="center" /> <el-table-column prop="aqi" label="AQI" sortable align="center" /> <el-table-column prop="time" label="时间" width="180" align="center" /> <el-table-column prop="aqi" label="AQI" sortable align="center" /> <el-table-column prop="comIndex" label="综合指数" @@ -78,13 +101,48 @@ sortable align="center" /> <el-table-column prop="a34004" label="PM2.5" sortable align="center" /> <el-table-column prop="a34002" label="PM10" sortable align="center" /> <el-table-column prop="a21026" label="SO2" sortable align="center" /> <el-table-column prop="a21004" label="NO2" sortable align="center" /> <el-table-column prop="a21005" label="CO" sortable align="center" /> <el-table-column prop="a05024" label="O3_8H" sortable align="center" /> <el-table-column prop="a99054" label="TVOC" sortable align="center" /> <el-table-column prop="a34004" label="PM2.5" sortable align="center" /> <el-table-column prop="a34002" label="PM10" sortable align="center" /> <el-table-column prop="a21026" label="SO2" sortable align="center" /> <el-table-column prop="a21004" label="NO2" sortable align="center" /> <el-table-column prop="a21005" label="CO" sortable align="center" /> <el-table-column prop="a05024" label="O3_8H" sortable align="center" /> <el-table-column prop="a99054" label="TVOC" sortable align="center" /> </el-table> </div> </div> @@ -258,6 +316,7 @@ label: this.defaultData[i].name, }) this.options[i].children = [] if (this.defaultData[i].devices) { for (let j = 0; j < this.defaultData[i].devices.length; j++) { this.options[i].children.push({ value: [ @@ -268,6 +327,7 @@ }) } } } }) .catch((error) => { console.log(error) src/views/reportForm/sensorday.vue
@@ -12,7 +12,10 @@ style="width: 21rem" /> <div> <el-radio-group v-model="select1" style="margin-left: 20px"> <el-radio-group v-model="select1" style="margin-left: 20px" > <el-radio-button label="日报" /> <el-radio-button label="周报" /> <el-radio-button label="月报" /> @@ -22,8 +25,8 @@ <component :is="dataType" style="padding-left: 0; margin-left: 30px" @sendPickerChild="showPickerChild" class="select11" @sendPickerChild="showPickerChild" /> <el-date-picker v-if="dateDisplay" @@ -37,28 +40,46 @@ /> <el-button type="primary" @click="getReportForm()" style="margin-left: 10px" >查询</el-button @click="getReportForm()" > <el-button type="primary" @click="exportExcel()">报表导出</el-button> 查询 </el-button> <el-button type="primary" @click="exportExcel()" > 报表导出 </el-button> </div> </div> <div class="topTitle"> <el-table :data="tableData" id="exportTabs" :data="tableData" max-height="730" @sort-change="changeTableSort" style="width: 100%" @sort-change="changeTableSort" > <el-table-column prop="name" label="站点名称" align="center"> </el-table-column> <el-table-column label="综合指数" align="center"> <el-table-column prop="composite" label="指数" align="center"> <template slot-scope="scope">{{ <el-table-column prop="name" label="站点名称" align="center" /> <el-table-column label="综合指数" align="center" > <el-table-column prop="composite" label="指数" align="center" > <template slot-scope="scope"> {{ scope.row.composite !== 0 ? scope.row.composite : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" @@ -66,93 +87,207 @@ prop="compositeNum" sortable > <template slot-scope="scope">{{ <template slot-scope="scope"> {{ scope.row.compositeNum !== 0 ? scope.row.compositeNum : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="PM2.5" align="center"> <el-table-column prop="pm25" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="PM2.5" align="center" > <el-table-column prop="pm25" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.pm25 !== 0 ? scope.row.pm25 : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="pm25Num" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="pm25Num" sortable > <template slot-scope="scope"> {{ scope.row.pm25Num !== 0 ? scope.row.pm25Num : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="PM10" align="center"> <el-table-column prop="pm10" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="PM10" align="center" > <el-table-column prop="pm10" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.pm10 !== 0 ? scope.row.pm10 : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="pm10Num" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="pm10Num" sortable > <template slot-scope="scope"> {{ scope.row.pm10Num !== 0 ? scope.row.pm10Num : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="SO2" align="center"> <el-table-column prop="so2" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="SO2" align="center" > <el-table-column prop="so2" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.so2 !== 0 ? scope.row.so2 : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="so2Num" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="so2Num" sortable > <template slot-scope="scope"> {{ scope.row.so2Num !== 0 ? scope.row.so2Num : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="NO2" align="center"> <el-table-column prop="no2" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="NO2" align="center" > <el-table-column prop="no2" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.no2 !== 0 ? scope.row.no2 : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="no2Num" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="no2Num" sortable > <template slot-scope="scope"> {{ scope.row.no2Num !== 0 ? scope.row.no2Num : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="CO" align="center"> <el-table-column prop="co" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="CO" align="center" > <el-table-column prop="co" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.co !== 0 ? scope.row.co : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="conum" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="conum" sortable > <template slot-scope="scope"> {{ scope.row.conum !== 0 ? scope.row.conum : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="O3" align="center"> <el-table-column prop="o3" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="O3" align="center" > <el-table-column prop="o3" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.o3 !== 0 ? scope.row.o3 : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="o3Num" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="o3Num" sortable > <template slot-scope="scope"> {{ scope.row.o3Num !== 0 ? scope.row.o3Num : '--' }}</template> }} </template> </el-table-column> </el-table-column> <el-table-column label="TVOC" align="center"> <el-table-column prop="tovc" label="浓度" align="center"> <template slot-scope="scope">{{ <el-table-column label="TVOC" align="center" > <el-table-column prop="tovc" label="浓度" align="center" > <template slot-scope="scope"> {{ scope.row.tovc !== 0 ? scope.row.tovc : '--' }}</template> }} </template> </el-table-column> <el-table-column label="排名" align="center" prop="tovcnum" sortable> <template slot-scope="scope">{{ <el-table-column label="排名" align="center" prop="tovcnum" sortable > <template slot-scope="scope"> {{ scope.row.tovcnum !== 0 ? scope.row.tovcnum : '--' }}</template> }} </template> </el-table-column> </el-table-column> </el-table> @@ -325,6 +460,7 @@ label: this.defaultData[i].name, }) this.options[i].children = [] if (this.defaultData[i].devices) { for (let j = 0; j < this.defaultData[i].devices.length; j++) { this.options[i].children.push({ value: [ @@ -335,6 +471,7 @@ }) } } } }) .catch((error) => { console.log(error)