| | |
| | | border: 1px solid white; |
| | | border-radius: 2px; |
| | | -moz-border-radius: 25px; |
| | | width: 120px; |
| | | /* Old Firefox */ |
| | | } |
| | | |
| | |
| | | text-align: center; |
| | | overflow-y: scroll; |
| | | } |
| | | |
| | | table.easy-table th { |
| | | background-color: var(--bg-color-2); |
| | | border: 1px solid #ffffffce; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | table.easy-table td { |
| | | cursor: pointer; |
| | | min-width: 50px; |
| | |
| | | /* overflow: scroll; */ |
| | | /* overflow-y: scroll; */ |
| | | } |
| | | |
| | | table.border-table th { |
| | | cursor: pointer; |
| | | background-color: var(--bg-color-2); |
| | |
| | | /* box-shadow: 0px 1.1px 2.5px #888888; */ |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | table.border-table td { |
| | | cursor: pointer; |
| | | min-width: 60px; |
| | |
| | | /* line-height: 20px; */ |
| | | } |
| | | |
| | | div.refresh-btn{ |
| | | div.refresh-btn { |
| | | padding: 0px 6px; |
| | | text-align: right; |
| | | } |
| | |
| | | line-height: 12px |
| | | } |
| | | |
| | | div.info-middle .text-table td.last-col{ |
| | | div.info-middle .text-table td.last-col { |
| | | text-align: left; |
| | | } |
| | | |
| | | div.info-middle .text-table tr.divide{ |
| | | div.info-middle .text-table tr.divide { |
| | | /* line-height: 16px; */ |
| | | border-bottom: 1px dashed #ffffff93; |
| | | } |
| | |
| | | FactorCheckbox: typeof import('./components/monitor/FactorCheckbox.vue')['default'] |
| | | FactorLegend: typeof import('./components/monitor/FactorLegend.vue')['default'] |
| | | FactorRadio: typeof import('./components/monitor/FactorRadio.vue')['default'] |
| | | GaugeChart: typeof import('./components/monitor/GaugeChart.vue')['default'] |
| | | HistoricalTrajectory: typeof import('./components/animation/HistoricalTrajectory.vue')['default'] |
| | | LineChart: typeof import('./components/monitor/LineChart.vue')['default'] |
| | | MapToolbox: typeof import('./components/map/MapToolbox.vue')['default'] |
| | |
| | | SearchBar: typeof import('./components/search/SearchBar.vue')['default'] |
| | | SliderBar: typeof import('./components/SliderBar.vue')['default'] |
| | | TrajectoryState: typeof import('./components/animation/TrajectoryState.vue')['default'] |
| | | VehicleData: typeof import('./components/monitor/VehicleData.vue')['default'] |
| | | WeatherData: typeof import('./components/monitor/WeatherData.vue')['default'] |
| | | } |
| | | export interface ComponentCustomProperties { |
| | | vLoading: typeof import('element-plus/es')['ElLoadingDirective'] |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapState(useMissionStore, ['missionList']) |
| | | ...mapState(useMissionStore, ['missionLi1st']) |
| | | }, |
| | | methods: { |
| | | createMission() {}, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div ref="gaugeChart" class="gauge-chart"></div> |
| | | </template> |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | import { gaugeOption } from '@/utils/chart/chart-option'; |
| | | |
| | | export default { |
| | | props: { |
| | | name: String, |
| | | value: Number |
| | | }, |
| | | data() { |
| | | return { |
| | | option: null |
| | | }; |
| | | }, |
| | | watch: { |
| | | value(nV) { |
| | | this.refreshChart(nV); |
| | | } |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.option = gaugeOption(this.name, this.value); |
| | | this.gaugeChart.setOption(this.option); |
| | | }, |
| | | refreshChart(e) { |
| | | this.option.data[0].value = e; |
| | | this.gaugeChart.setOption(this.option); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.gaugeChart = echarts.init(this.$refs.gaugeChart); |
| | | this.initChart(); |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .gauge-chart { |
| | | height: 280px; |
| | | width: 260px; |
| | | /* background-color: aliceblue; */ |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row class="wrap"> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="车éï¼" class="tag-2"> |
| | | {{ speed }} |
| | | </el-form-item> |
| | | </el-form> |
| | | <GaugeChart name="车é" :speed="speed"></GaugeChart> |
| | | </el-row> |
| | | </template> |
| | | <script> |
| | | import { FactorDatas } from '@/model/FactorDatas'; |
| | | |
| | | export default { |
| | | props: { |
| | | loading: Boolean, |
| | | factorDatas: FactorDatas |
| | | }, |
| | | data() { |
| | | return { |
| | | speed: '--km/h' |
| | | }; |
| | | }, |
| | | watch: { |
| | | factorDatas: { |
| | | handler(nV) { |
| | | this.speed = this.lastOne(nV, '14') + 'km/h'; |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | methods: { |
| | | lastOne(factorDatas, key) { |
| | | const f = factorDatas.factor[key]; |
| | | if (f) { |
| | | const lastIndex = f.datas.length - 1; |
| | | return factorDatas.factor[key].datas[lastIndex].factorData; |
| | | } else { |
| | | return '--'; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row class="wrap"> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="温度ï¼" class="tag-2"> |
| | | {{ temprature }} |
| | | </el-form-item> |
| | | <el-form-item label="湿度ï¼" class="tag-2"> |
| | | {{ humidity }} |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- <div class="tag-2">{{ temprature }}</div> |
| | | <div class="tag-2">{{ humidity }}</div> --> |
| | | </el-row> |
| | | <el-row class="wrap"> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="é£åï¼" class="tag-2"> |
| | | {{ windDirection }} |
| | | </el-form-item> |
| | | <el-form-item label="é£éï¼" class="tag-2"> |
| | | {{ windSpeed }} |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- <div class="tag-2">{{ windDirection }}</div> |
| | | <div class="tag-2">{{ windSpeed }}</div> --> |
| | | </el-row> |
| | | </template> |
| | | <script> |
| | | import { FactorDatas } from '@/model/FactorDatas'; |
| | | |
| | | export default { |
| | | props: { |
| | | loading: Boolean, |
| | | factorDatas: FactorDatas |
| | | }, |
| | | data() { |
| | | return { |
| | | temprature: '--â', |
| | | humidity: '--%', |
| | | windDirection: '--', |
| | | windSpeed: '--m/s' |
| | | }; |
| | | }, |
| | | watch: { |
| | | factorDatas: { |
| | | handler(nV) { |
| | | this.temprature = this.lastOne(nV, '8') + 'â'; |
| | | this.humidity = this.lastOne(nV, '9') + '%'; |
| | | this.windDirection = this.lastOne(nV, '17'); |
| | | this.windSpeed = this.lastOne(nV, '16') + 'm/s'; |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | // computed: { |
| | | // temprature() { |
| | | // return `${this.lastOne('TEMPERATURE')}â`; |
| | | // }, |
| | | // humidity() { |
| | | // return `${this.lastOne('HUMIDITY')}%`; |
| | | // }, |
| | | // windDirection() { |
| | | // return `${this.lastOne('WIND_DIRECTION')}`; |
| | | // }, |
| | | // windSpeed() { |
| | | // return `${this.lastOne('WIND_SPEED')}m/s`; |
| | | // } |
| | | // }, |
| | | methods: { |
| | | lastOne(factorDatas, key) { |
| | | const f = factorDatas.factor[key]; |
| | | if (f) { |
| | | const lastIndex = f.datas.length - 1; |
| | | return factorDatas.factor[key].datas[lastIndex].factorData; |
| | | } else { |
| | | return '--'; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | |
| | | .el-form-item__label { |
| | | color: white; |
| | | color: white !important; |
| | | } |
| | | |
| | | // .el-radio { |
| | |
| | | |
| | | .el-button-custom:focus-visible { |
| | | outline: 0px solid var(--el-button-outline-color); |
| | | } |
| | | } |
| | |
| | | return fontSize; |
| | | } |
| | | |
| | | // æçº¿å¾ |
| | | function factorLineOption(_xAxis, _series, legends) { |
| | | var fontSize = fGetChartFontSize(); |
| | | return { |
| | |
| | | }; |
| | | } |
| | | |
| | | export { factorLineOption }; |
| | | // 仪表ç |
| | | function gaugeOption(name, value) { |
| | | var fontSize = fGetChartFontSize(); |
| | | var option = { |
| | | title: { |
| | | text: name, |
| | | textStyle: { |
| | | color: 'white', |
| | | fontSize: fontSize |
| | | }, |
| | | left: 'center' |
| | | }, |
| | | textStyle: { |
| | | color: '#ffffff', |
| | | fontSize: 10 |
| | | }, |
| | | tooltip: { |
| | | formatter: '{a} <br/>{b} : {c}%' |
| | | }, |
| | | toolbox: { |
| | | // feature: { |
| | | // restore: {}, |
| | | // saveAsImage: {} |
| | | // } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: name, |
| | | type: 'gauge', |
| | | detail: { |
| | | color: 'white', |
| | | formatter: '{value}', |
| | | textStyle: { |
| | | fontSize: fontSize |
| | | } |
| | | }, |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: 'white' |
| | | } |
| | | }, |
| | | axisTick: { |
| | | lineStyle: { |
| | | color: 'white' |
| | | } |
| | | }, |
| | | axisLabel: { |
| | | color: 'white', |
| | | fontSize: 10 |
| | | }, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: [ |
| | | [0.2, '#2afd2a'], |
| | | [0.8, '#f1e74d'], |
| | | [1, '#c23531'] |
| | | ] |
| | | } |
| | | }, |
| | | itemStyle: { |
| | | color: 'white' |
| | | }, |
| | | data: [ |
| | | { |
| | | value: value, |
| | | name: '' |
| | | } |
| | | ], |
| | | min: 0, |
| | | max: 200 |
| | | } |
| | | ] |
| | | }; |
| | | return option; |
| | | } |
| | | |
| | | export { factorLineOption, gaugeOption }; |
| | |
| | | <template> |
| | | <div>RealtimeMode</div> |
| | | <div class="p-events-none m-t-2"> |
| | | <el-row justify="center" align="middle" class="top-wrap"> </el-row> |
| | | <el-row class="m-t-2"> |
| | | <FactorRadio |
| | | :device-type="deviceType" |
| | | @change="(e) => (factorType = e)" |
| | | ></FactorRadio> |
| | | </el-row> |
| | | <el-row class="m-t-2"> |
| | | <FactorLegend |
| | | class="m-t-2" |
| | | :factor="factorDatas.factor[factorType]" |
| | | ></FactorLegend> |
| | | </el-row> |
| | | <el-row class="m-t-2" justify="start"> |
| | | <DashBoard :factor-datas="factorDatas"></DashBoard> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { TYPE0 } from '@/constant/device-type'; |
| | | import { FactorDatas } from '@/model/FactorDatas'; |
| | | import monitorDataApi from '@/api/monitorDataApi'; |
| | | import DashBoard from './component/DashBoard.vue'; |
| | | |
| | | export default { |
| | | name: 'HistoryPage' |
| | | components: { DashBoard }, |
| | | setup() { |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | return { loading, fetchData }; |
| | | }, |
| | | data() { |
| | | return { |
| | | // çæµè®¾å¤ç±»å |
| | | deviceType: TYPE0, |
| | | // çæµå åçç±»åç¼å· |
| | | factorType: '1', |
| | | // çæµæ°æ® |
| | | factorDatas: new FactorDatas() |
| | | }; |
| | | }, |
| | | methods: { |
| | | onFetchData(type, data) { |
| | | // todo æ ¹æ®è®¾å¤ç±»å忢å°å¾çæµå åå±ç¤ºåéæ¡ãæçº¿å¾å¤éæ¡ãæ°æ®è¡¨æ ¼å¤éæ¡çå åç±»å |
| | | this.deviceType = type; |
| | | this.factorDatas.setData(data, this.drawMode, () => { |
| | | this.factorDatas.refreshHeight(this.factorType); |
| | | // this.draw(); |
| | | }); |
| | | }, |
| | | fetchRealTimeData() { |
| | | // fixme 2024.5.3 æ¤å¤åå§è·åçæ°æ®ï¼åæ°åºè¯¥ç±searchbarå³å®ï¼åç»ä¿®æ¹ |
| | | this.fetchData((page) => { |
| | | return monitorDataApi |
| | | .fetchHistroyData({ |
| | | deviceCode: '0a0000000001', |
| | | page, |
| | | perPage: 100 |
| | | }) |
| | | .then((res) => { |
| | | this.onFetchData(TYPE0, res.data); |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchRealTimeData(); |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row class="wrap"> |
| | | <el-col v-show="show" span="10"> |
| | | <BaseCard> |
| | | <template #content> |
| | | <WeatherData :factor-datas="factorDatas"></WeatherData> |
| | | <VehicleData :factor-datas="factorDatas"></VehicleData> |
| | | </template> |
| | | </BaseCard> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <CardButton name="宿¶çæµ" @click="() => (show = !show)"></CardButton> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | <script> |
| | | import { FactorDatas } from '@/model/FactorDatas'; |
| | | |
| | | export default { |
| | | props: { |
| | | deviceType: { |
| | | type: String |
| | | }, |
| | | factorDatas: FactorDatas |
| | | }, |
| | | data() { |
| | | return { |
| | | show: true |
| | | }; |
| | | } |
| | | }; |
| | | </script> |