From 4a25bd9ba57cf9b9985d93e85fab1e065a0911bc Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Thu, 28 Sep 2023 14:22:21 +0800 Subject: [PATCH] fix:立行立改 --- src/views/UVA/index.vue | 333 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 276 insertions(+), 57 deletions(-) diff --git a/src/views/UVA/index.vue b/src/views/UVA/index.vue index 045d9bc..382c68c 100644 --- a/src/views/UVA/index.vue +++ b/src/views/UVA/index.vue @@ -14,7 +14,7 @@ v-model="datenum" @change="chooseDate" @blur="chooseDate1" - @focus="chooseDate" + @focus="chooseDate2" value-format="yyyy-MM-dd" style="width: 280px" > @@ -47,6 +47,7 @@ accordion style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)" v-show="shou1 === true" + v-loading="loading" > <el-collapse-item style="text-indent: 2em; position: relative; padding-botton: 10px" @@ -71,6 +72,7 @@ @change="handleChange" ref="collapse" v-show="shou1 === false" + v-loading="loading" > <el-collapse-item v-for="(item1, index) in asideData.uavTimeFly" @@ -131,6 +133,8 @@ v-model="radioSeven" size="medium" @change="changeCode" + v-if="selecttrue === 1" + style="margin-top: 10px; margin-left: 10px" > <el-radio-button label="PM2.5"></el-radio-button> <el-radio-button label="PM10"></el-radio-button> @@ -140,24 +144,85 @@ <el-radio-button label="03"></el-radio-button> <el-radio-button label="TVOC"></el-radio-button> </el-radio-group> - <!-- <el-input - placeholder="���������������" - v-model="uvasize" - class="inputNum" - clearable - > - </el-input> --> + <div class="Duo" v-if="selecttrue === 2"> + <div class="spantuu"> + <span>���������������������������(���): </span> + <el-input + class="inputtu" + v-model="tallone" + ref="uvas" + ></el-input> + -- + <el-input + class="inputtu" + v-model="talltwo" + ref="uvas" + ></el-input> + </div> + <!-- <el-select v-model="Duovalue" placeholder="������������" class="slee"> + <el-option + v-for="item in optionsduo" + :key="item.code" + :label="item.name" + :value="item.name" + > + </el-option> + </el-select> --> + <div class="spantu"> + <span>������������(���): </span + ><el-input + class="inputtu" + v-model="uvasize" + clearable + placeholder="���������������" + ref="uvas" + ></el-input> + </div> + <el-select v-model="Duovalue" placeholder="������������" class="slee"> + <el-option + v-for="item in optionsduo" + :key="item.code" + :label="item.name" + :value="item.name" + > + </el-option> + </el-select> + <!-- <div class="spantuu"> + <span>���������������������������(���): </span> + <el-input + class="inputtu" + v-model="tallone" + ref="uvas" + ></el-input> + -- + <el-input + class="inputtu" + v-model="talltwo" + ref="uvas" + ></el-input> + </div> --> + </div> <div v-if="selecttrue === 1" style="margin-left: 10px"> - <el-button type="primary" @click="gengD" class="gengD" + <el-button type="primary" @click="gengD" style="margin-top: 10px" >������������</el-button > </div> - <div v-if="selecttrue === 2" style="margin-left: 10px"> + <div + v-if="selecttrue === 2" + style="margin-left: 10px; margin-top: 10px" + > + <el-button + size="medium" + type="primary" + icon="el-icon-setting" + @click="dialogFormVisible = true" + >6���������</el-button + > <el-button class="gengD" @click="shou">������</el-button> <el-button type="primary" @click="selectDuo">������</el-button> </div> </div> - <div class="Duo" v-if="selecttrue === 2"> + <!-- <div class="Duo" v-if="selecttrue === 2"> <el-select v-model="Duovalue" placeholder="������������" class="slee"> <el-option v-for="item in optionsduo" @@ -183,12 +248,80 @@ -- <el-input class="inputtu" v-model="talltwo" ref="uvas"></el-input> </div> - </div> + </div> --> </div> <!-- <div v-if="noneData" class="noneData">������������������������������</div> --> - <div id="map_container" v-loading="loading" /> + <div id="map_container" v-loading="loading1" /> </el-main> </el-container> + <el-dialog title="6���������" :visible.sync="dialogFormVisible" width="1000px"> + <el-descriptions title="������6���" :column="3" border> + <el-descriptions-item + label="PM2.5 | ug/m��" + label-class-name="my-label" + content-class-name="my-content" + >22</el-descriptions-item + > + <el-descriptions-item label="PM10 | ug/m��">34</el-descriptions-item> + <el-descriptions-item label="SO2 | ug/m��">4</el-descriptions-item> + <el-descriptions-item label="NO2 | ug/m��">16</el-descriptions-item> + <el-descriptions-item label="CO | mg/m��">0.5</el-descriptions-item> + <el-descriptions-item label="O3 | ug/m��">149</el-descriptions-item> + </el-descriptions> + <!-- <el-descriptions title="���������������" border> + </el-descriptions> --> + <div + style=" + font-size: 16px; + font-weight: 700; + margin: 10px 0 20px 0; + font-size: 16px; + font-weight: 700; + color: #303133; + " + > + ��������������� + </div> + <el-table :data="sensorTableData" border> + <el-table-column prop="sensorName" label="������" /> + <el-table-column prop="unit" label="������" /> + <el-table-column label="������"> + <template slot-scope="scope"> + <el-input v-model="scope.row.tab1" placeholder="���������������" /> + <!-- <span v-show="!scope.row.show">{{ scope.row.tab1 }}</span> --> + </template> + </el-table-column> + <el-table-column label="������"> + <template slot-scope="scope"> + <el-input v-model="scope.row.tab2" placeholder="���������������" /> + </template> + </el-table-column> + <el-table-column label="������"> + <template slot-scope="scope"> + <el-input v-model="scope.row.tab3" placeholder="���������������" /> + </template> + </el-table-column> + <el-table-column label="������"> + <template slot-scope="scope"> + <el-input v-model="scope.row.tab4" placeholder="���������������" /> + </template> + </el-table-column> + <el-table-column label="������"> + <template slot-scope="scope"> + <el-input v-model="scope.row.tab5" placeholder="���������������" /> + </template> + </el-table-column> + <el-table-column label="������"> + <template slot-scope="scope"> + <el-input v-model="scope.row.tab6" placeholder="���������������" /> + </template> + </el-table-column> + </el-table> + <div slot="footer" class="dialog-footer"> + <el-button @click="dialogFormVisible = false">��� ���</el-button> + <el-button type="primary" @click="customLevel">��� ���</el-button> + </div> + </el-dialog> </div> </template> @@ -388,6 +521,7 @@ }, data() { return { + dialogFormVisible: false, chosee: 1, shou1: true, zhanK1: 1, @@ -406,7 +540,7 @@ }, tallone: 0, - talltwo: 500, + talltwo: 120, // ��������������� asideData: { dates: [], // ������date������ @@ -441,6 +575,7 @@ bdLon: null, bdLat: null, loading: false, + loading1: false, snesorParams: [ 'PM2.5', 'PM10', @@ -487,7 +622,6 @@ noneData: true, defaultData: [], carMac: null, - dialogFormVisible: false, optionsduo: [ { code: 'a34004', name: 'PM2.5' }, { code: 'a34002', name: 'PM10' }, @@ -641,7 +775,7 @@ endTime: '', dataDate: '', sensorTime: [], - uvasize: 50, + uvasize: 20, timeValue: [ new Date(2020, 1, 1, 0, 0, 0), new Date(2022, 12, 31, 23, 59, 59), @@ -649,6 +783,88 @@ timeNums: [], batchs: '', macs: '', + sensorTableData: [ + { + sensorName: 'PM2.5', + unit: 'ug/m��', + tab1: '35', + tab2: '75', + tab3: '115', + tab4: '150', + tab5: '250', + tab6: '350', + }, + { + sensorName: 'PM10', + unit: 'ug/m��', + tab1: '50', + tab2: '150', + tab3: '250', + tab4: '350', + tab5: '420', + tab6: '500', + }, + { + sensorName: 'SO2', + unit: 'ug/m��', + tab1: '150', + tab2: '500', + tab3: '650', + tab4: '800', + tab5: '', + tab6: '', + }, + { + sensorName: 'NO2', + unit: 'ug/m��', + tab1: '100', + tab2: '200', + tab3: '700', + tab4: '1200', + tab5: '2340', + tab6: '3090', + }, + { + sensorName: 'CO', + unit: 'mg/m��', + tab1: '5', + tab2: '10', + tab3: '35', + tab4: '60', + tab5: '90', + tab6: '120', + }, + { + sensorName: 'O3', + unit: 'ug/m��', + tab1: '160', + tab2: '200', + tab3: '300', + tab4: '400', + tab5: '800', + tab6: '1000', + }, + { + sensorName: 'TVOC', + unit: 'mg/m��', + tab1: '0.1', + tab2: '0.3', + tab3: '0.5', + tab4: '0.7', + tab5: '0.9', + tab6: '1', + }, + { + sensorName: '���������', + unit: 'ug/m��', + tab1: '300', + tab2: '500', + tab3: '1000', + tab4: '10000', + tab5: '20000', + tab6: '50000', + }, + ], } }, @@ -689,10 +905,18 @@ // this.getFlyData() }, methods: { + customLevel() { + this.selectDuo() + this.dialogFormVisible = false + }, selectDuo() { + // console.log(2115); if (this.chosee === 1) { this.$message.warning('������������������������������������') return + } else { + // console.log('132123'); + this.loading1 = true } if (this.view) { this.view.removeAllLayers() @@ -700,13 +924,15 @@ } this.$request({ // url: '/uav/queryDataByBatch', - url: '/uav/test', + url: '/uav/getUav', + // url: '/uav/test', method: 'post', data: { batch: this.batchs, uvasize: this.uvasize, - height: 0, mac: this.macs, + height1: this.tallone, + height2: this.talltwo, // batch: '2023-06-16 16:21:21', }, }).then((res) => { @@ -714,7 +940,6 @@ this.carData = [] if (res.data === 'null') { this.noneData = true - this.loading = false return } for (var i = 0; i < res.data.length; i++) { @@ -735,6 +960,11 @@ this.getTimeAreaData(this.datenum) $('.coll').css('margin-top', '350px') }, + chooseDate2() { + // this.$refs.datePick.focus() // ��������������������������������� + // this.getTimeAreaData(this.datenum) + $('.coll').css('margin-top', '350px') + }, chooseDate1() { $('.coll').css('margin-top', '10px') // this.$refs.datePick.focus() // ��������������������������������� @@ -745,13 +975,11 @@ // return // } this.selecttrue = 2 - $('.dds').css({ height: '170px' }) - $('.numss').css({ width: '750px' }) + $('.numss').css({ width: '1050px' }) }, shou() { this.selecttrue = 1 - $('.dds').css({ height: '100px' }) - $('.numss').css({ width: '690px' }) + $('.numss').css({ width: '700px' }) }, parseTime(time, cFormat) { if (arguments.length === 0 || !time) { @@ -812,12 +1040,6 @@ }) return arr }, - // ��������������������������������� - changeCarData(e) { - this.carMac = e - this.getStart() - }, - // ��������������������������� // ��������������������������������������� Rad(d) { return (d * Math.PI) / 180.0 // ��������������������������������������������������� @@ -882,11 +1104,12 @@ } this.dataType = 'history' // this.map = null - this.getStart() } }, // ��������������������������������� getTimeAreaData(item) { + // this.asideData.uavTimeFly = [] + this.loading = true this.$request({ url: 'uav/queryTimeSlot', method: 'get', @@ -898,13 +1121,13 @@ // console.log(res, 'res.data.vos') if (res.code === -47) { this.noneData = true - this.loading = false // this.asideData.uavTimeFly=res.message this.shou1 = true } else { this.shou1 = false this.asideData.uavTimeFly = res.data.vos } + this.loading = false // if (res.code === 0) { // this.asideData.uavTimeFly = res.data.vos // } @@ -931,6 +1154,7 @@ // this.carData.push(this.xie.date[i]) // } // this.initStart(this.carData) + this.loading1 = true this.asideData.activeKey = index this.chosee = 2 this.batchs = item.batch @@ -942,12 +1166,14 @@ } this.$request({ // url: '/uav/queryDataByBatch', - url: '/uav/test', + // url: '/uav/test', + url: '/uav/getUav', method: 'post', data: { batch: item.batch, uvasize: this.uvasize, - height: 0, + height1: this.tallone, + height2: this.talltwo, mac: mac, // batch: '2023-06-16 16:21:21', }, @@ -956,7 +1182,6 @@ this.carData = [] if (res.data === 'null') { this.noneData = true - this.loading = false return } for (var i = 0; i < res.data.length; i++) { @@ -1003,7 +1228,6 @@ this.abc += 1 const that = this if (!res) { - console.log(1) that.map = new BMapGL.Map('map_container') that.map.enableScrollWheelZoom(true) // ������������������������������������������������������s that.map.setMapType(BMAP_EARTH_MAP) // ��������������������������������� @@ -1050,7 +1274,7 @@ ], }) showNoPoints() - + this.loading1 = false return } if (this.dataType === 'history') { @@ -1062,7 +1286,6 @@ // console.log('������snesor������������') // console.log(this.responseJSON) var trackPoints = [] - this.loading = false if (this.responseJSON.length > 0) { this.noneData = false $.each(this.responseJSON, (item, value) => { @@ -1078,10 +1301,12 @@ if (lng < 70 || lng > 150 || lat > 60 || lat < 20) { return true } - lng = GPS.gcj_encrypt(lat, lng).lon - lat = GPS.gcj_encrypt(lat, lng).lat - lng = GPS.bd_encrypt(lat, lng).lon - lat = GPS.bd_encrypt(lat, lng).lat + // lng = GPS.gcj_encrypt(lat, lng).lon + // lat = GPS.gcj_encrypt(lat, lng).lat + // lng = GPS.bd_encrypt(lat, lng).lon + // lat = GPS.bd_encrypt(lat, lng).lat + // lng = GPS.bd_decrypt(lat, lng).lon + // lat = GPS.bd_decrypt(lat, lng).lat var point = new BMapGL.Point(lng, lat) point.a34004 = parseInt(value.a34004) point.a34002 = parseInt(value.a34002) @@ -1141,6 +1366,7 @@ map: that.map, }) that.firstPlayFlag = false + that.loading1 = false } else { this.view.removeAllLayers() this.map.clearOverlays() @@ -1148,6 +1374,8 @@ that.view = new mapvgl.View({ map: that.map, }) + that.loading1 = false + // that.map.centerAndZoom(that.centerPoint, 18) } } @@ -1279,6 +1507,7 @@ } } points.push(point1) + // console.log(points, 'image.png') // if (flag) { // points.push(point1) // console.log(points, 'points') @@ -1774,15 +2003,6 @@ } this.initStart(this.carData) }, - changeCode1(index) { - this.changeColor1 = index - if (index === 0) { - this.viewKey = '2D' - } else { - this.viewKey = '3D' - } - this.getStart() - }, }, } </script> @@ -1977,23 +2197,21 @@ background-color: #f40; } .numss { - width: 690px; + width: 700px; background-color: white; - padding: 10px; margin-top: 17px; display: flex; + height: 60px; } /deep/.el-select { width: 8% !important; } .Duo { - height: 60px; display: flex; overflow: hidden; background-color: white; width: 750px; padding-left: 10px; - margin-top: 17px; } .spantu { width: 190px; @@ -2002,9 +2220,10 @@ // background-color: white; // height: 40px; display: flex; - margin-left: 25px; + margin-left: 10px; line-height: 60px; font-weight: 5px; + color: #696b6f; .inputtu { width: 40%; margin-left: 5px; @@ -2013,11 +2232,12 @@ .slee { line-height: 60px; width: 100px; + margin-left: 25px; } .spantuu { - margin-left: 25px; width: 400px; line-height: 60px; + color: #696b6f; .inputtu { width: 20%; } @@ -2032,7 +2252,6 @@ .BMap_cpyCtrl { display: none; } - .anchorBL { display: none; } -- Gitblit v1.8.0