| | |
| | | class="iconfont iconfaxianzuobiao" |
| | | @click="deviceDetail(item.mac, null, item, 0)" |
| | | /> |
| | | <!-- @click="deviceDetail('p5dnd7a0245390',null,item,0)"--> |
| | | </el-menu-item> |
| | | </el-menu> |
| | | </el-aside> |
| | | <el-dialog /> |
| | | <el-container style="position: relative"> |
| | | <div class="faterCar"> |
| | | <div class="carTop"> |
| | | <span style="float: left; margin: 1px 10px 0 0"> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | icon="el-icon-setting" |
| | | @click="dialogFormVisible = true" |
| | | >6参设定</el-button> |
| | | </span> |
| | | <span |
| | | v-for="(item, index) in snesorParams" |
| | | :key="index" |
| | |
| | | :class="{ click: changeColor == index }" |
| | | @click="changeCode(index)" |
| | | >{{ item }} |
| | | </span> |
| | | <span style="margin-left: 10px"> |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | icon="el-icon-setting" |
| | | @click="dialogFormVisible = true" |
| | | >6参设定</el-button> |
| | | </span> |
| | | <span |
| | | v-for="(item, index) in viewOptions" |
| | |
| | | @click="changeCode1(index)" |
| | | >{{ item }} |
| | | </span> |
| | | |
| | | <span |
| | | v-if="webSocketView" |
| | | style="float: right; margin: 2px 10px 0 0" |
| | | style="margin: 2px 10px 0 0" |
| | | > |
| | | <el-button |
| | | size="medium" |
| | | size="mini" |
| | | type="primary" |
| | | @click="wsStart()" |
| | | >开启实时</el-button> |
| | | </span> |
| | | <!-- <el-date-picker |
| | | v-if="historyView" |
| | | v-model="dateValue" |
| | | value-format="yyyy-MM-dd" |
| | | style="float:right;margin-right: 10px;line-height: 40px;" |
| | | align="right" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | :picker-options="pickerOptions" |
| | | @change="dateChange" |
| | | />--> |
| | | <!-- 选择时间段 --> |
| | | <!-- <el-time-picker--> |
| | | <!-- :disabled="isDisTime"--> |
| | | <!-- style="float:right;width: 210px"--> |
| | | <!-- is-range--> |
| | | <!-- v-model="timeValue"--> |
| | | <!-- @blur="blurChange"--> |
| | | <!-- range-separator="至"--> |
| | | <!-- start-placeholder="开始时间"--> |
| | | <!-- end-placeholder="结束时间"--> |
| | | <!-- placeholder="选择时间范围">--> |
| | | <!-- </el-time-picker>--> |
| | | <!-- 历史日期选择下拉框 --> |
| | | <!-- <el-select v-if="historyView" v-model="dateValue" placeholder="选择日期" style="float:right;line-height:40px;margin-right:10px;width:140px" @change="dateChange">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in isDataList"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- @click.native="dataChangeClick"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | size="small" |
| | | style="margin-left: 1.5rem" |
| | | @click="insertL" |
| | | > |
| | | 添加 |
| | | </el-button> |
| | | <el-input |
| | | v-model="inputnum" |
| | | size="mini" |
| | | placeholder="请输入内容" |
| | | class="inputNum" |
| | | clearable |
| | |
| | | 上传走航轨迹图片(可选可不选) |
| | | </div> |
| | | </el-upload> |
| | | <!-- <div style="display: flex"> |
| | | <span class="statspan">开始点的时间:</span |
| | | ><el-input v-model="startL" style="width: 12rem"></el-input> |
| | | </div> |
| | | <div style="display: flex"> |
| | | <span class="statspan">结束点的时间:</span |
| | | ><el-input v-model="endL" style="width: 12rem"></el-input> |
| | | </div> |
| | | <div style="display: flex"> |
| | | <span class="statspan">路段名称:</span |
| | | ><el-input |
| | | v-model="Lname" |
| | | style="width: 12rem; margin-left: 1.7rem" |
| | | ></el-input> |
| | | </div> |
| | | <div style="display: flex; margin-left: 4rem"> |
| | | <el-button type="primary" @click="insLuDuan">保存</el-button> |
| | | <el-button @click="insqu">取消</el-button> |
| | | <el-button @click="qnull">清空</el-button> |
| | | </div> --> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | |
| | | </div> |
| | | <el-date-picker |
| | | v-model="dateValue" |
| | | style="float: right; margin-right: 10px" |
| | | size="mini" |
| | | style=" margin-right: 10px" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | |
| | | <!-- 历史/实时切换下拉框 --> |
| | | <el-select |
| | | v-model="dataTypeValue" |
| | | size="mini" |
| | | placeholder="数据类型" |
| | | style=" |
| | | float: right; |
| | | |
| | | line-height: 40px; |
| | | margin-right: 10px; |
| | | width: 103px; |
| | |
| | | </el-select> |
| | | </div> |
| | | <div |
| | | v-if="!rankListShow & noneDustldData" |
| | | class="rightIcon" |
| | | @click="showRankList" |
| | | > |
| | | <i class="el-icon-s-fold" /> |
| | | </div> |
| | | <div v-if="rankListShow"> |
| | | <!-- --> |
| | | <div |
| | | style="position: relative" |
| | | class="rankCar" |
| | | > |
| | | <div |
| | | class="success-checkmark" |
| | | @click="showRankList" |
| | | /> |
| | | <div> |
| | | <p>排名列表</p> |
| | | <ul> |
| | | <li |
| | | v-for="(item, index) in rankList" |
| | | :key="index" |
| | | > |
| | | <div class="rankCarItem"> |
| | | <div> {{ index+1 }}. {{ item.road }}</div> |
| | | <div style="margin-left: 10px"> |
| | | {{ item.value }} |
| | | </div> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-if="noneData" |
| | | class="noneData" |
| | | > |
| | |
| | | <!-- 百度地图 --> |
| | | </el-container> |
| | | </el-container> |
| | | <!-- <div id="selectSenor"> |
| | | <span><input type="radio" value="a34004" name="sensor" checked>PM2.5</span> |
| | | <span><input type="radio" value="a34002" name="sensor">PM10</span> |
| | | <span><input type="radio" value="a99054" name="sensor">TVOC</span> |
| | | </div> |
| | | <div id="type"> |
| | | <input type="radio" value="2D" name="v" checked>2D |
| | | <input type="radio" value="3D" name="v">3D |
| | | </div> --> |
| | | <!-- <img src="/img/pollutionlevel.png" class="sensorLevel"> |
| | | <div id="cpm">查无走航车轨迹</div> --> |
| | | <!-- 6参设定弹窗 --> |
| | | <el-dialog |
| | | title="6参设定" |
| | | :visible.sync="dialogFormVisible" |
| | |
| | | }, |
| | | sensorDate: null, |
| | | noneData: false, |
| | | noneDustldData: false, |
| | | defaultData: [], |
| | | rankList: [], |
| | | carMac: null, |
| | | dialogFormVisible: false, |
| | | sensorTableData: [ |
| | |
| | | dataTypeValue: 'history', |
| | | historyView: true, |
| | | webSocketView: false, |
| | | rankListShow: false, |
| | | isDataList: [], |
| | | shapeLayer: null, |
| | | carData: null, |
| | |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | // timeValue: { |
| | | // handler(newVal, oldVal) { |
| | | // this.sensorTime = this.newTime() |
| | | // console.log(this.sensorTime, 'this.sensorTime') |
| | | // // if (this.dataValue && this.timeValue) { |
| | | // // if (this.view) { |
| | | // // this.view.removeAllLayers() |
| | | // // this.map.clearOverlays() |
| | | // // // console.log('清除图层') |
| | | // // } |
| | | // // this.dataType = 'history' |
| | | // // this.sensorDate = this.dateValue |
| | | // // // this.map = null |
| | | // // this.getStart() |
| | | // // } |
| | | // }, |
| | | // deep: true, |
| | | // immediate: true |
| | | // } |
| | | }, |
| | | mounted () { |
| | | // this.$watch('carMac', () => { |
| | |
| | | this.newTime(this.timeValue) |
| | | this.newDate() |
| | | this.getCarData() |
| | | // this.$watch('carMac', () => { |
| | | // this.getMacDate() |
| | | // }) |
| | | }, |
| | | methods: { |
| | | handleRemove (file, fileList) { |
| | |
| | | // console.log(file.name, 'file') |
| | | }, |
| | | insLuDuan () { |
| | | // if (this.startL == '') { |
| | | // this.$message({ |
| | | // message: '请点击开始时间', |
| | | // type: 'warning', |
| | | // }) |
| | | // return false |
| | | // } else if (this.endL == '') { |
| | | // this.$message({ |
| | | // message: '请点击结束时间', |
| | | // type: 'warning', |
| | | // }) |
| | | // return false |
| | | // } else |
| | | if (this.Lname == '') { |
| | | if (this.Lname === '') { |
| | | this.$message({ |
| | | message: '请输入路段名', |
| | | type: 'warning' |
| | |
| | | var times = this.newTime2(this.dateValue) |
| | | const formData = new FormData() |
| | | let pv = JSON.stringify(this.tableData) |
| | | // let big = { |
| | | // table: pv, |
| | | // road: this.Lname, |
| | | // time3: times[0], |
| | | // time4: times[1], |
| | | // mac: this.carMac, |
| | | // files: this.file, |
| | | // } |
| | | // console.log(big) |
| | | |
| | | // console.log(pv); |
| | | // formData.append(`time1`, this.startL) |
| | | // formData.append(`time2`, this.endL) |
| | | |
| | | formData.append(`table`, pv) |
| | | formData.append(`road`, this.Lname) |
| | | formData.append(`time3`, times[0]) |
| | |
| | | }, |
| | | // 跳转设备详情页 |
| | | deviceDetail (mac, item, items, indexs) { |
| | | // console.log('这是传输过去的值') |
| | | // console.log(mac) |
| | | // console.log(item) |
| | | // console.log(items) |
| | | // console.log(indexs) |
| | | // this.monitorPointInfo = item |
| | | this.$router.push({ |
| | | name: 'deviceDetail', |
| | | // path: '/carDetail', |
| | |
| | | this.getStart() |
| | | } |
| | | }, |
| | | // 日期选择点击事件 |
| | | // dataChangeClick(e) { |
| | | // if (!this.isDisTime) { |
| | | // // 更改时间格式 |
| | | // if (this.dateValue.length <= 1) { |
| | | // this.newTime(this.timeValue) |
| | | // } |
| | | // if (this.view) { |
| | | // this.view.removeAllLayers() |
| | | // this.map.clearOverlays() |
| | | // // console.log('清除图层') |
| | | // } |
| | | // this.dataType = 'history' |
| | | // // this.map = null |
| | | // this.getStart() |
| | | // } |
| | | // this.isDisTime = false |
| | | // }, |
| | | // 时间选框失去焦点 |
| | | blurChange () { |
| | | // 更改时间格式 |
| | |
| | | } |
| | | } |
| | | }, |
| | | showRankList () { |
| | | this.rankListShow = !this.rankListShow |
| | | }, |
| | | // 走航车轨迹数据 |
| | | getStart () { |
| | | this.noneData = false |
| | |
| | | if (res.data.length) { |
| | | this.carData = res |
| | | this.initStart(this.carData) |
| | | if (this.sensorKey === 'dustld') { |
| | | this.getRanking() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getRanking () { |
| | | this.$request({ |
| | | // url: '/cruiser/cruiserTrajectory', |
| | | url: '/cruiser/sort', |
| | | method: 'get', |
| | | params: { |
| | | mac: this.carMac, |
| | | startTime: this.sensorDate[0], |
| | | endTime: this.sensorDate[1] |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | this.noneDustldData = true |
| | | this.rankList = res.data |
| | | console.log('排名', res) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | width: 100px; |
| | | height: 200px; |
| | | } |
| | | .carTop { |
| | | .faterCar{ |
| | | position: absolute; |
| | | width: 100%; |
| | | z-index: 999; |
| | | top: 0; |
| | | } |
| | | .carTop { |
| | | width: 100%; |
| | | padding: 5px 10px; |
| | | z-index: 999; |
| | | background: rgba(204, 204, 204, 0.5); |
| | | box-shadow: 1px 1px 5px #666; |
| | | } |
| | |
| | | /deep/.inputNum { |
| | | width: 5% !important; |
| | | } |
| | | .rightIcon{ |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 300px; |
| | | z-index: 999; |
| | | cursor: pointer; |
| | | font-size: 30px; |
| | | color: #409eff; |
| | | } |
| | | .rankCar{ |
| | | float: right; |
| | | p{ |
| | | text-align: center; |
| | | } |
| | | background: rgba(204, 204, 204, 0.5); |
| | | box-shadow: 1px 1px 5px #666; |
| | | padding: 5px; |
| | | margin-top: 10px; |
| | | ul{ |
| | | font-size: 16px; |
| | | list-style: none; |
| | | max-height: 800px; |
| | | padding-bottom: 120px; |
| | | overflow: auto; |
| | | padding-left: 0; |
| | | li{ |
| | | margin: 10px; |
| | | } |
| | | } |
| | | } |
| | | .success-checkmark:after { |
| | | content: '×'; |
| | | position: absolute; |
| | | left:0; top: -1px; |
| | | width: 20px; |
| | | height: 20px; |
| | | text-align: center; |
| | | border: 1px solid #aaa; |
| | | background: #f8f8f8; |
| | | border-radius: 50%; |
| | | box-shadow: inset 0 1px 3px rgba(0,0,0,.3); |
| | | cursor: pointer; |
| | | } |
| | | .rankCarItem{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin: 10px 0; |
| | | } |
| | | </style> |