1. 添加溯源清单功能
2. 修复切换至走航监测界面后,之前正在加载的历史数据依旧展示至地图的问题
3. 添加折线图下载图片功能;
4. 添加数据导出功能;
5. 添加设备管理功能;
6. 添加数据弹框和溯源清单开关功能;
7. 优化3D里面的颜色展示逻辑,底部颜色由原来的因子最小值颜色改为当前量级的上一个量级对应的颜色
| | |
| | | * èµ°èªè®¾å¤ç¸å
³æ¥å£API |
| | | */ |
| | | export default { |
| | | fethchDevice({ type, page, pageSize }) { |
| | | let params = `page=${page}&perPage=${pageSize}`; |
| | | params += type ? `&type=${type}` : ''; |
| | | return $http.get(`air/device/type?${params}`).then((res) => res.data); |
| | | fethchDevice({ type }) { |
| | | let params = type ? `?&type=${type}` : ''; |
| | | return $http.get(`air/device/type${params}`).then((res) => res.data); |
| | | }, |
| | | |
| | | putNewDevice(device) { |
| | | return $http.post(`air/device/create`, device).then((res) => res.data); |
| | | return $http.put(`air/device/create`, device).then((res) => res.data); |
| | | }, |
| | | |
| | | deleteDevice(deviceCode) { |
| | | let params = `deviceCode=${deviceCode}`; |
| | | return $http.post(`air/device/delete?${params}`).then((res) => res.data); |
| | | return $http.delete(`air/device/delete?${params}`).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | import axios from 'axios'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const debug = true; |
| | | const debug = false; |
| | | |
| | | let ip1 = 'http://47.100.191.150:9029/'; |
| | | // console.log(import.meta.env); |
| | |
| | | ); |
| | | }); |
| | | |
| | | export { $http }; |
| | | // const $http = { |
| | | // get(url) { |
| | | // const controller = new AbortController(); |
| | | // return { |
| | | // con: controller, |
| | | // resp: axiosInstance.get(url, { signal: controller.signal }) |
| | | // }; |
| | | // }, |
| | | // put(url, data) { |
| | | // const controller = new AbortController(); |
| | | // return { |
| | | // con: controller, |
| | | // resp: axiosInstance.put(url, data, { signal: controller.signal }) |
| | | // }; |
| | | // }, |
| | | // post(url, data) { |
| | | // const controller = new AbortController(); |
| | | // return { |
| | | // con: controller, |
| | | // resp: axiosInstance.post(url, data, { signal: controller.signal }) |
| | | // }; |
| | | // }, |
| | | // delete(url) { |
| | | // const controller = new AbortController(); |
| | | // return { |
| | | // con: controller, |
| | | // resp: axiosInstance.delete(url, { signal: controller.signal }) |
| | | // }; |
| | | // } |
| | | // }; |
| | | |
| | | function resToData(res) { |
| | | res.resp = res.resp.then((res) => res.data); |
| | | return res; |
| | | } |
| | | |
| | | export { $http, resToData }; |
| | |
| | | import { $http } from './index'; |
| | | |
| | | /** |
| | | * |
| | | * åºæ¯ä¿¡æ¯APIæ¥å£ |
| | | */ |
| | | export default { |
| | | /** |
| | | * æ¥æ¾è¡æ¿åºåèå´å
çæç±»åºæ¯ |
| | | * @param {Object} area |
| | | * @returns |
| | | */ |
| | | searchScene(area) { |
| | | return $http.post(`scene/find`, area).then((res) => res.data); |
| | | } |
| | | }, |
| | | |
| | | // searchByCoordinate({lng, lat, radius}) { |
| | | // return $http.post(`scene/find/radius`, mission).then((res) => res.data); |
| | | // }, |
| | | /** |
| | | * æ¥æ¾åå¾èå´å
çåºæ¯ |
| | | * @param {Number} lng ç»åº¦ï¼é«å¾·å°å¾ï¼ç«æåæ ç³»ï¼ |
| | | * @param {Number} lat 维度ï¼é«å¾·å°å¾ï¼ç«æåæ ç³»ï¼ |
| | | * @param {Number} radius åå¾ï¼åä½ç±³ |
| | | * @returns |
| | | */ |
| | | searchByCoordinate(lng, lat, radius) { |
| | | let param = `?lng=${lng}&lat=${lat}&radius=${radius}`; |
| | | return $http.post(`scene/find/radius${param}`).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | --border-color: #cac8c8ef; |
| | | --bg-color: #122b54a9; |
| | | --bg-color-2: #122b54e3; |
| | | --select_color: #7dff5d96; |
| | | /* --select_color: #23dad0a2; */ |
| | | /* --select_color: #7dff5d96; */ |
| | | --select_color: #23dad0a2; |
| | | /* --select_color: #23dad1; */ |
| | | |
| | | |
| | | /* --font-color: #221f1fc0; |
| | | --border-color: #e5f58eef; |
| | |
| | | |
| | | .ff-content-medium .ff-border-top { |
| | | padding: 8px 8px var(--bevel-length-2) 8px; |
| | | /* padding: 0px 0px var(--bevel-length-2) 0px; */ |
| | | -webkit-clip-path: |
| | | polygon(var(--border-width) var(--border-width), |
| | | calc(100% - var(--border-width)) var(--border-width), |
| | |
| | | BaseMap: typeof import('./components/map/BaseMap.vue')['default'] |
| | | CardButton: typeof import('./components/CardButton.vue')['default'] |
| | | CardDialog: typeof import('./components/CardDialog.vue')['default'] |
| | | copy: typeof import('./components/search/OptionType copy.vue')['default'] |
| | | ConfigManage: typeof import('./components/map/ConfigManage.vue')['default'] |
| | | CoreHeader: typeof import('./components/core/CoreHeader.vue')['default'] |
| | | CoreMenu: typeof import('./components/core/CoreMenu.vue')['default'] |
| | | DataSummary: typeof import('./components/monitor/DataSummary.vue')['default'] |
| | |
| | | MissionImport: typeof import('./components/mission/MissionImport.vue')['default'] |
| | | MissionManage: typeof import('./components/mission/MissionManage.vue')['default'] |
| | | OptionDevice: typeof import('./components/search/OptionDevice.vue')['default'] |
| | | 'OptionDevice copy': typeof import('./components/search/OptionDevice copy.vue')['default'] |
| | | OptionLocation: typeof import('./components/search/OptionLocation.vue')['default'] |
| | | OptionLocation2: typeof import('./components/search/OptionLocation2.vue')['default'] |
| | | OptionMission: typeof import('./components/search/OptionMission.vue')['default'] |
| | | OptionTime: typeof import('./components/search/OptionTime.vue')['default'] |
| | | OptionType: typeof import('./components/search/OptionType.vue')['default'] |
| | | 'OptionType copy': typeof import('./components/search/OptionType copy.vue')['default'] |
| | | ProgressLineChart: typeof import('./components/chart/ProgressLineChart.vue')['default'] |
| | | RealTimeLineChart: typeof import('./components/chart/RealTimeLineChart.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | SceneSearch: typeof import('./components/scene/SceneSearch.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'] |
| | |
| | | @closed="handleChange(false)" |
| | | :show-close="false" |
| | | :destroy-on-close="true" |
| | | align-center |
| | | :width="width" |
| | | :draggable="draggable" |
| | | :modal="modal" |
| | | :close-on-click-modal="modal" |
| | | :modal-class="modal ? 'p-events-auto' : ''" |
| | | > |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <BaseCard direction="top-left" borderless="t"> |
| | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | title: String, |
| | | // æ¾éæ§å¶ |
| | | modelValue: Boolean, |
| | | // æ é¢ |
| | | title: String, |
| | | // 宽度 |
| | | width: { |
| | | type: [String, Number], |
| | | default: '50%' |
| | | }, |
| | | // å¯ææ½ |
| | | draggable: Boolean, |
| | | // é®ç½©å± |
| | | modal: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | emits: ['update:modelValue', 'changed'], |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | this.$emit('changed', value); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style></style> |
| | |
| | | <template> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | @click="dialogVisible = !dialogVisible" |
| | | > |
| | | æ°å»ºè®¾å¤ |
| | | </el-button> |
| | | <CardDialog v-model="dialogVisible" title="æ°å»ºèµ°èªè®¾å¤"> |
| | | <el-form |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="设å¤ç¼å·" prop="deviceCode"> |
| | | <el-input |
| | | size="small" |
| | | clearable |
| | | v-model="formObj.deviceCode" |
| | | placeholder="设å¤ç¼å·" |
| | | /> |
| | | </el-form-item> |
| | | <OptionType :show="true" v-model="formObj.deviceType"></OptionType> |
| | | <el-form-item> |
| | | <el-button |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button @click="onCancel">åæ¶</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </CardDialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, reactive, computed } from 'vue'; |
| | | import deviceApi from '@/api/deviceApi'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { useDeviceStore } from '@/stores/device'; |
| | | |
| | | const deviceStore = useDeviceStore(); |
| | | const dialogVisible = ref(false); |
| | | const { loading, fetchData } = useFetchData(); |
| | | const rules = reactive({ |
| | | deviceCode: [ |
| | | { |
| | | required: true, |
| | | message: '设å¤ç¼å·ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }); |
| | | const param = computed(() => { |
| | | return { |
| | | deviceType: formObj.value.deviceType, |
| | | deviceCode: formObj.value.deviceCode |
| | | }; |
| | | }); |
| | | // åå»ºè®¾å¤ |
| | | function createDevice() { |
| | | fetchData(() => { |
| | | return deviceApi.putNewDevice(param.value).then(() => { |
| | | dialogVisible.value = false; |
| | | deviceStore.fetchDevice(); |
| | | }); |
| | | }); |
| | | } |
| | | const { formObj, formRef, edit, onSubmit, onCancel } = useFormConfirm({ |
| | | submit: { |
| | | do: createDevice |
| | | }, |
| | | cancel: { |
| | | do: () => { |
| | | dialogVisible.value = false; |
| | | } |
| | | } |
| | | }); |
| | | </script> |
| | | <style scoped></style> |
| | |
| | | <template> |
| | | <el-button |
| | | <!-- <el-button |
| | | type="primary" |
| | | icon="Memo" |
| | | class="el-button-custom p-events-auto" |
| | | @click="dialogVisible = !dialogVisible" |
| | | > |
| | | 设å¤ç®¡ç |
| | | </el-button> |
| | | <CardDialog v-model="dialogVisible" title="èµ°èªè®¾å¤ç®¡ç"> |
| | | <el-row class="mission-table"> |
| | | </el-button> --> |
| | | <CardDialog |
| | | :model-value="modelValue" |
| | | @changed="handleChange" |
| | | title="èµ°èªè®¾å¤ç®¡ç" |
| | | > |
| | | <el-row class="device-table"> |
| | | <el-col :span="20"> |
| | | <el-table |
| | | :data="deviceStore.deviceList" |
| | | :data="deviceData" |
| | | table-layout="fixed" |
| | | size="small" |
| | | :show-overflow-tooltip="true" |
| | |
| | | align="center" |
| | | width="50" |
| | | /> |
| | | <el-table-column prop="deviceType" label="设å¤ç±»å" align="center" /> |
| | | <el-table-column |
| | | prop="deviceType" |
| | | label="设å¤ç±»å" |
| | | align="center" |
| | | width="70" |
| | | :formatter="deviceFormatter" |
| | | /> |
| | | <el-table-column prop="deviceName" label="设å¤åç§°" align="center" /> |
| | | <el-table-column prop="deviceCode" label="设å¤ç¼å·" align="center" /> |
| | | <el-table-column |
| | | prop="createTime" |
| | |
| | | align="center" |
| | | :formatter="timeFormatter" |
| | | /> |
| | | <el-table-column label="管ç" width="140" align="center"> |
| | | <el-table-column label="管ç" width="70" align="center"> |
| | | <template #default="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | </el-col> |
| | | <el-col :span="4" class="flex-col"> |
| | | <div> |
| | | <!-- todo 设å¤å建 --> |
| | | <DeviceCreate></DeviceCreate> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <MessageBox |
| | | v-model="msgBoxVisible" |
| | | :on-confirm="onConfirm" |
| | | title="å é¤èµ°èªä»»å¡" |
| | | msg="确认æ¯å¦å é¤è¯¥èµ°èªä»»å¡" |
| | | title="å é¤èµ°èªè®¾å¤" |
| | | msg="确认æ¯å¦å é¤è¯¥èµ°èªè®¾å¤" |
| | | confirmText="å é¤" |
| | | ></MessageBox> |
| | | </template> |
| | | <script> |
| | | import moment from 'moment'; |
| | | import deviceApi from '@/api/deviceApi'; |
| | | import { mapStores } from 'pinia'; |
| | | import { useDeviceStore } from '@/stores/device'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { typeName } from '@/constant/device-type'; |
| | | |
| | | export default { |
| | | setup() { |
| | | const { loading, fetchData } = useFetchData(); |
| | | return { loading, fetchData }; |
| | | }, |
| | | props: {}, |
| | | props: { |
| | | modelValue: Boolean |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useDeviceStore) |
| | | ...mapStores(useDeviceStore), |
| | | deviceData() { |
| | | return this.deviceStore.getDevice(); |
| | | } |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | }, |
| | | deleteDevice(row) { |
| | | this.onConfirm = () => { |
| | | this.deviceStore.deleteDevice(row.deviceCode); |
| | | }; |
| | | this.msgBoxVisible = true; |
| | | }, |
| | | // eslint-disable-next-line no-unused-vars |
| | | deviceFormatter(row, col, cellValue, index) { |
| | | return typeName(cellValue); |
| | | }, |
| | | // eslint-disable-next-line no-unused-vars |
| | | timeFormatter(row, col, cellValue, index) { |
| | | return moment(cellValue).format('YYYY-MM-DD HH:mm:ss'); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .flex-col { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 4px; |
| | | align-items: flex-end; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dropdown class="p-events-auto" trigger="click" size="small"> |
| | | <el-button type="primary" class="el-button-custom"> |
| | | <el-icon class="el-icon--left"><Setting /></el-icon> |
| | | é
置管ç |
| | | <el-icon class="el-icon--right"><arrow-down /></el-icon> |
| | | </el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item> |
| | | <el-button |
| | | type="info" |
| | | icon="Memo" |
| | | plain |
| | | @click="missionVisible = !missionVisible" |
| | | > |
| | | ä»»å¡ç®¡ç |
| | | </el-button> |
| | | </el-dropdown-item> |
| | | <el-dropdown-item> |
| | | <el-button |
| | | type="info" |
| | | icon="Cellphone" |
| | | plain |
| | | @click="deviceVisible = !deviceVisible" |
| | | > |
| | | 设å¤ç®¡ç |
| | | </el-button> |
| | | </el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | <MissionManage v-model="missionVisible"></MissionManage> |
| | | <DeviceManage v-model="deviceVisible"></DeviceManage> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | missionVisible: false, |
| | | deviceVisible: false |
| | | }; |
| | | }, |
| | | methods: {} |
| | | }; |
| | | </script> |
| | |
| | | > |
| | | <el-button type="primary" class="el-button-custom"> |
| | | <el-icon class="el-icon--left"><TakeawayBox /></el-icon> |
| | | å°å¾å·¥å
·ç®± |
| | | å·¥å
·ç®± |
| | | <el-icon class="el-icon--right"><arrow-down /></el-icon> |
| | | </el-button> |
| | | <template #dropdown> |
| | |
| | | } |
| | | }, |
| | | { |
| | | icon: 'fa fa-compass', |
| | | icon: 'fa fa-crosshairs', |
| | | label: 'åæ æ¾å', |
| | | value: false, |
| | | click: function () { |
| | | this.value = !this.value; |
| | | toolbox.toggleCoorPicking(this.value); |
| | | } |
| | | } |
| | | }, |
| | | // { |
| | | // icon: 'fa fa-compass', |
| | | // label: 'æ°æ®æ è®°', |
| | |
| | | // // todo æ°æ®æ è®° |
| | | // } |
| | | // }, |
| | | // { |
| | | // icon: 'fa fa-compass', |
| | | // label: 'æ°æ®å¼¹æ¡', |
| | | // value: true, |
| | | // click: function () { |
| | | // this.value = !this.value; |
| | | // // todo æ°æ®å¼¹æ¡ |
| | | // } |
| | | // } |
| | | { |
| | | icon: 'fa fa-comment-alt', |
| | | label: 'æ°æ®å¼¹æ¡', |
| | | value: true, |
| | | click: function () { |
| | | this.value = !this.value; |
| | | toolbox.toggleDataDialogStatus(this.value); |
| | | } |
| | | }, |
| | | { |
| | | icon: 'fa fa-comment-alt', |
| | | label: 'æº¯æºæ¸
å', |
| | | value: true, |
| | | click: function () { |
| | | this.value = !this.value; |
| | | toolbox.toggleSceneSearch(this.value); |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | <template> |
| | | <el-button |
| | | <!-- <el-button |
| | | type="primary" |
| | | icon="Memo" |
| | | class="el-button-custom p-events-auto" |
| | | @click="dialogVisible = !dialogVisible" |
| | | > |
| | | ä»»å¡ç®¡ç |
| | | </el-button> |
| | | <CardDialog v-model="dialogVisible" title="èµ°èªä»»å¡ç®¡ç"> |
| | | </el-button> --> |
| | | <CardDialog |
| | | :model-value="modelValue" |
| | | @changed="handleChange" |
| | | title="èµ°èªä»»å¡ç®¡ç" |
| | | > |
| | | <el-row class="mission-table"> |
| | | <el-col :span="20"> |
| | | <el-table |
| | |
| | | @click="deleteMission(row)" |
| | | >å é¤</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | :loading="row.downloadLoading" |
| | | type="primary" |
| | | size="small" |
| | | class="el-button-custom" |
| | | @click="downloadReport(row)" |
| | | >æ¥å</el-button |
| | | > |
| | | > --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | const { loading, fetchData } = useFetchData(); |
| | | return { loading, fetchData }; |
| | | }, |
| | | props: {}, |
| | | props: { |
| | | modelValue: Boolean |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | |
| | | ...mapStores(useMissionStore) |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | }, |
| | | deleteMission(row) { |
| | | this.onConfirm = () => { |
| | | this.missionStore.deleteMission(row.missionCode); |
| | |
| | | .downloadReport(row.missionCode) |
| | | .finally(() => (row.downloadLoading = false)); |
| | | }, |
| | | // eslint-disable-next-line no-unused-vars |
| | | timeFormatter(row, col, cellValue, index) { |
| | | return moment(cellValue).format('YYYY-MM-DD HH:mm:ss'); |
| | | } |
| | |
| | | } |
| | | |
| | | .mission-table { |
| | | height: 60vh; |
| | | /* height: 60vh; */ |
| | | } |
| | | </style> |
| | |
| | | size="small" |
| | | :show-overflow-tooltip="true" |
| | | border |
| | | row-class-name="t-row" |
| | | row-class-name="t-row-summary" |
| | | cell-class-name="t-cell" |
| | | header-row-class-name="t-header-row" |
| | | header-cell-class-name="t-header-cell" |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style> |
| | | .t-row-summary { |
| | | cursor: auto; |
| | | background-color: transparent !important; |
| | | } |
| | | </style> |
| | | <style scoped> |
| | | .el-table { |
| | | --el-table-row-hover-bg-color: transparent; |
| | | --el-table-current-row-bg-color: transparent; |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <template #footer> |
| | | <el-row justify="space-between" class="p-b-2"> |
| | | <el-row justify="space-between" class="p-b-2 one-row"> |
| | | <el-button |
| | | :loading="downloadLoading" |
| | | type="primary" |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .one-row { |
| | | /* background-color: red; */ |
| | | flex-wrap: nowrap; |
| | | } |
| | | </style> |
| | | <style> |
| | | .el-table { |
| | | --el-table-bg-color: transparent; |
| | | --el-table-row-hover-bg-color: #23dad0a2; |
| | | --el-table-current-row-bg-color: #23dad0a2; |
| | | --el-table-row-hover-bg-color: var(--select_color); |
| | | --el-table-current-row-bg-color: var(--select_color); |
| | | /* --el-table-current-row-bg-color: #7dff5d96; */ |
| | | --el-table-text-color: var(--font-color); |
| | | } |
| | |
| | | |
| | | .t-header-cell { |
| | | background-color: var(--bg-color-2) !important; |
| | | text-align: center !important; |
| | | /* text-align: center !important; */ |
| | | color: white !important; |
| | | } |
| | | .el-pagination { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- <el-button |
| | | type="primary" |
| | | icon="Memo" |
| | | class="el-button-custom p-events-auto" |
| | | @click="dialogVisible = !dialogVisible" |
| | | > |
| | | æº¯æºæ¸
å |
| | | </el-button> --> |
| | | <CardDialog |
| | | v-model="dialogVisible" |
| | | title="æº¯æºæ¸
å" |
| | | draggable |
| | | :modal="false" |
| | | width="400px" |
| | | > |
| | | <template #default> |
| | | <el-row class="scene-table"> |
| | | <!-- <el-col :span="20"> --> |
| | | <el-table |
| | | :data="sceneStore.sceneList" |
| | | table-layout="fixed" |
| | | size="small" |
| | | :show-overflow-tooltip="true" |
| | | border |
| | | row-class-name="t-row" |
| | | cell-class-name="t-cell" |
| | | header-row-class-name="t-header-row" |
| | | header-cell-class-name="t-header-cell" |
| | | @row-click="handleRowClick" |
| | | > |
| | | <el-table-column type="index" label="#" width="25" /> |
| | | <el-table-column |
| | | prop="type" |
| | | label="ç±»å" |
| | | width="55" |
| | | :filters="sceneTypeFilter" |
| | | :filter-method="filterHandler" |
| | | /> |
| | | <el-table-column prop="name" label="åç§°" /> |
| | | <!-- <el-table-column prop="location" label="å°å" /> --> |
| | | <!-- <el-table-column prop="districtName" label="åºå¿" align="center" /> --> |
| | | <!-- <el-table-column label="管ç" width="70" align="center"> |
| | | <template #default="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | class="el-button-custom" |
| | | @click="deleteDevice(row)" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | <!-- </el-col> --> |
| | | </el-row> |
| | | </template> |
| | | <template #footer> |
| | | <el-row justify="start" align="middle" class="p-b-2 one-row"> |
| | | <el-text size="small" type="warning">æç´¢èå´</el-text> |
| | | <el-input |
| | | class="input-radius m-h-2" |
| | | size="small" |
| | | v-model="sceneStore.radius" |
| | | :min="1" |
| | | /> |
| | | <el-text size="small" type="warning"> |
| | | å
¬é以å
ï¼ç»æ{{ sceneStore.sceneList.length }}æ¡</el-text |
| | | > |
| | | </el-row> |
| | | </template> |
| | | </CardDialog> |
| | | </template> |
| | | <script> |
| | | import { sceneTypes, sceneIcon } from '@/constant/scene-types'; |
| | | import marks from '@/utils/map/marks'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { mapStores } from 'pinia'; |
| | | import { useSceneStore } from '@/stores/scene'; |
| | | import { useToolboxStore } from '@/stores/toolbox'; |
| | | import MapUtil from '@/utils/map/util'; |
| | | |
| | | let layer = undefined; |
| | | |
| | | export default { |
| | | setup() { |
| | | const { loading, fetchData } = useFetchData(); |
| | | return { loading, fetchData }; |
| | | }, |
| | | props: { |
| | | modelValue: Boolean |
| | | }, |
| | | emits: ['update:modelValue'], |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | onConfirm: undefined |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useSceneStore), |
| | | ...mapStores(useToolboxStore), |
| | | sceneTypeFilter() { |
| | | return sceneTypes() |
| | | .filter((v) => { |
| | | return !v.disabled; |
| | | }) |
| | | .map((v) => { |
| | | return { text: v.label, value: v.label }; |
| | | }); |
| | | } |
| | | }, |
| | | watch: { |
| | | dialogVisible(nv) { |
| | | if (layer) { |
| | | if (!nv) { |
| | | MapUtil.removeViews(layer); |
| | | } else { |
| | | MapUtil.addViews(layer); |
| | | } |
| | | } |
| | | }, |
| | | 'sceneStore.sceneList': { |
| | | handler(nV, oV) { |
| | | if (nV != oV) { |
| | | this.dialogVisible = true; |
| | | this.drawMarks(nV); |
| | | } |
| | | }, |
| | | deep: true |
| | | }, |
| | | 'toolboxStore.sceneSearchStatus': { |
| | | handler(nV) { |
| | | if (!nV) { |
| | | this.dialogVisible = false; |
| | | } |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | methods: { |
| | | drawMarks(sceneList) { |
| | | if (layer != undefined) { |
| | | MapUtil.removeViews(layer); |
| | | layer = undefined; |
| | | } |
| | | if (sceneList.length != 0) { |
| | | const icons = []; |
| | | sceneList.forEach((s) => { |
| | | icons.push(sceneIcon(s.typeId)); |
| | | }); |
| | | layer = marks.createLabelMarks(icons, sceneList, false); |
| | | } |
| | | }, |
| | | handleRowClick(row, col, event) { |
| | | MapUtil.setCenter([row.longitude, row.latitude], true); |
| | | }, |
| | | filterHandler(value, row, column) { |
| | | const property = column['property']; |
| | | return row[property] === value; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .scene-table { |
| | | /* background-color: antiquewhite; */ |
| | | } |
| | | |
| | | .input-radius { |
| | | width: 36px; |
| | | height: 16px; |
| | | } |
| | | |
| | | /* .ff-content-medium .ff-border-top { |
| | | padding: 0px 0px var(--bevel-length-2) 0px; |
| | | } */ |
| | | </style> |
| | |
| | | |
| | | <script> |
| | | import { deviceList } from '@/constant/device-type'; |
| | | import { mapStores } from 'pinia'; |
| | | import { useDeviceStore } from '@/stores/device'; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | return {}; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useDeviceStore), |
| | | deviceOptions() { |
| | | return deviceList(this.type); |
| | | return this.deviceStore.getDevice(this.type).map((v) => { |
| | | return { |
| | | label: v.deviceName, |
| | | value: v.deviceCode |
| | | }; |
| | | }); |
| | | } |
| | | }, |
| | | watch: { |
| | | // type(nV, oV) { |
| | | // if (nV != oV) { |
| | | // this.refreshOptions(); |
| | | // } |
| | | // } |
| | | deviceOptions(nV, oV) { |
| | | if (nV != oV) { |
| | | if (nV.length > 0) { |
| | | this.handleChange(nV[0].value); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | fetchDevice() { |
| | | this.deviceStore.fetchDevice().then((res) => { |
| | | if (res.success && res.data.length > 0) { |
| | | this.handleChange(this.deviceOptions[0].value); |
| | | } |
| | | }); |
| | | }, |
| | | // refreshOptions() { |
| | | // this.deviceOptions = |
| | | // }, |
| | | handleChange(value) { |
| | | this.$emit('update:modelValue', value); |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.deviceStore.deviceList.length == 0) { |
| | | this.fetchDevice(); |
| | | } else { |
| | | this.handleChange(this.deviceOptions[0].value); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped></style> |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.missionStore.missionList.length == 0) { |
| | | this.fetchMission(); |
| | | } else { |
| | | this.index = 0; |
| | | this.handleChange(0); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <el-form-item v-show="isShow" label="ç±»å"> |
| | | <el-form-item v-show="show" label="ç±»å"> |
| | | <el-select |
| | | :model-value="modelValue" |
| | | @update:model-value="handleChange" |
| | | placeholder="ç±»å" |
| | | size="small" |
| | | class="w-80" |
| | | :disabled="disabled" |
| | | > |
| | | <el-option |
| | | v-for="(s, i) in typeList" |
| | |
| | | import { typeList } from '@/constant/device-type'; |
| | | export default { |
| | | props: { |
| | | disabled: { |
| | | type: Boolean, |
| | | default: import.meta.env.VITE_DATA_MODE == 'jingan' |
| | | }, |
| | | show: { |
| | | type: Boolean, |
| | | default: import.meta.env.VITE_DATA_MODE != 'jingan' |
| | | }, |
| | | modelValue: String |
| | | }, |
| | | emits: ['update:modelValue'], |
| | |
| | | isShow: import.meta.env.VITE_DATA_MODE != 'jingan' |
| | | }; |
| | | }, |
| | | watch: { |
| | | show: { |
| | | handler(nV) { |
| | | this.isShow = nV; |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | // todo æ ¹æ®è®¾å¤ç±»å忢å°å¾è½½å
·ç徿 ã |
| | |
| | | { |
| | | label: 'æ 人è¹', |
| | | value: '0c' |
| | | }, |
| | | { |
| | | label: 'ç½æ ¼å', |
| | | value: '0d' |
| | | } |
| | | ]; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | export { TYPE0, TYPE1, TYPE2, TYPE3, TYPE4, typeList, deviceList }; |
| | | function typeName(type) { |
| | | return typeList().find((v) => (v.value = type)).label; |
| | | } |
| | | |
| | | export { TYPE0, TYPE1, TYPE2, TYPE3, TYPE4, typeList, typeName, deviceList }; |
| | |
| | | } |
| | | |
| | | function sceneIcon(type) { |
| | | switch (type) { |
| | | switch (type + '') { |
| | | case '1': |
| | | return scene_1; |
| | | case '4': |
| | |
| | | this.factorId; |
| | | this.heights = []; //3då°å¾å½åå±ç¤ºåæ ç¹å¯¹åºçé«åº¦æ°ç» |
| | | this.colors = []; // 3då°å¾å½åå±ç¤ºåæ ç¹å¯¹åºçé¢è²æ°ç» |
| | | this.bottomColors = []; //æå°å¼å¯¹åºçå¾ä¾è²æ°ç» |
| | | this.bottomColor; //æå°å¼å¯¹åºçå¾ä¾è² |
| | | this.min = -1; // å½åæ¾ç¤ºçæå°å¼ |
| | | this.max = -1; // å½åæ¾ç¤ºçæå¤§å¼ |
| | |
| | | this.factorName = options.factorName; |
| | | this.factorId = options.factorId; |
| | | this.colors = options.colors; |
| | | this.bottomColors = options.bottomColors; |
| | | this.bottomColor = options.bottomColor; |
| | | this.standardMin = options.standardMin; |
| | | this.standardMax = options.standardMax; |
| | |
| | | this.heights = []; |
| | | this.colors = []; |
| | | this.datas.forEach((d) => { |
| | | var h = getFactorHeight(d.factorId, d.factorData, [this.min, this.max]); |
| | | const h = getFactorHeight(d.factorId, d.factorData, [this.min, this.max]); |
| | | if (d.factorData == -1) { |
| | | h = -1; |
| | | } |
| | | this.heights.push(h); |
| | | var c = Legend.getColor( |
| | | const c = Legend.getColor( |
| | | this.factorName, |
| | | this.legendType, |
| | | d.factorData, |
| | |
| | | this.max |
| | | ); |
| | | this.colors.push(c); |
| | | const b = Legend.getPreviousColor(this.factorName, this.legendType, c); |
| | | this.bottomColors.push(b); |
| | | // this.heights.push(d.factorData) |
| | | }); |
| | | this.bottomColor = Legend.getColor( |
| | |
| | | originMax: this.originMax, |
| | | factorName: this.factorName, |
| | | colors: this.colors, |
| | | bottomColors: this.bottomColors, |
| | | bottomColor: this.bottomColor, |
| | | standardMin: this.standardMin, |
| | | standardMax: this.standardMax |
| | |
| | | }, |
| | | |
| | | /** |
| | | * è·åå½åé¢è²ä¸ä¸ä¸ªç级çé¢è² |
| | | * @param {*} name |
| | | * @param {*} type |
| | | * @param {*} color |
| | | */ |
| | | getPreviousColor(name, type, color) { |
| | | let colors; |
| | | if (type == this.S_TYPE) { |
| | | colors = this._legend_c[name]; |
| | | } else { |
| | | colors = this._custom; |
| | | } |
| | | let index = colors.indexOf(color); |
| | | index--; |
| | | if (index < 0) index = 0; |
| | | return colors[index]; |
| | | }, |
| | | |
| | | /** |
| | | * è·åçæµå åå½åæµåº¦å¯¹åºçé¢è² |
| | | * @param name çæµå ååç§° |
| | | * @param data çæµå åæµåº¦ |
| | | */ |
| | | getStandardColor: function (name, data) { |
| | | var range = this._legend_r[name]; |
| | | var colors = this._legend_c[name]; |
| | | let range = this._legend_r[name]; |
| | | let colors = this._legend_c[name]; |
| | | if (range == undefined) { |
| | | range = this._legend_r['PM25']; |
| | | colors = this._legend_c['PM25']; |
| | | } |
| | | // return colors[0] |
| | | |
| | | var selected = undefined; |
| | | let selected = undefined; |
| | | for (let i = 0; i < range.length; i++) { |
| | | const d = range[i]; |
| | | var d1 = d; |
| | | let d1 = d; |
| | | if (name == 'CO') { |
| | | d1 *= 1000; |
| | | } |
| | |
| | | import deviceApi from '@/api/deviceApi'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | |
| | | // èµ°èªä»»å¡ |
| | | // èµ°èªè®¾å¤ |
| | | export const useDeviceStore = defineStore('device', () => { |
| | | const deviceList = ref([]); |
| | | const { loading, fetchData } = useFetchData(); |
| | | |
| | | function getDevice(deviceType) { |
| | | if (deviceType) { |
| | | return deviceList.value.filter((v) => v.deviceType == deviceType); |
| | | } else { |
| | | return deviceList.value; |
| | | } |
| | | } |
| | | |
| | | function fetchDevice(type) { |
| | | return fetchData((page, pageSize) => { |
| | |
| | | }); |
| | | } |
| | | |
| | | return { deviceList, loading, fetchDevice, deleteDevice }; |
| | | return { deviceList, loading, getDevice, fetchDevice, deleteDevice }; |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref } from 'vue'; |
| | | import { defineStore } from 'pinia'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import sceneInfoApi from '@/api/sceneInfoApi'; |
| | | import { useToolboxStore } from '@/stores/toolbox'; |
| | | |
| | | const toolboxStore = useToolboxStore(); |
| | | |
| | | // èµ°èªè®¾å¤ |
| | | export const useSceneStore = defineStore('scene', () => { |
| | | // é»è®¤æç´¢èå´1å
¬é以å
|
| | | const radius = ref(1); |
| | | const sceneList = ref([]); |
| | | const { loading, fetchData } = useFetchData(); |
| | | |
| | | function searchScene(lng, lat) { |
| | | if (toolboxStore.sceneSearchStatus) { |
| | | return fetchData(() => { |
| | | return sceneInfoApi |
| | | .searchByCoordinate(lng, lat, radius.value * 1000) |
| | | .then((res) => { |
| | | sceneList.value = res.data.filter((v) => { |
| | | return v.typeId != 19 && v.typeId != 20; |
| | | }); |
| | | return res; |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | return { radius, sceneList, loading, searchScene }; |
| | | }); |
| | |
| | | const dataMarkerStatus = ref(true); |
| | | // å¼å
³æ°æ®å¼¹æ¡ |
| | | const dataDialogStatus = ref(true); |
| | | // å¼å
³æº¯æºæ¸
å |
| | | const sceneSearchStatus = ref(true); |
| | | |
| | | return { |
| | | featuresStatus, |
| | |
| | | controlbarStatus, |
| | | coorPickStatus, |
| | | dataMarkerStatus, |
| | | dataDialogStatus |
| | | dataDialogStatus, |
| | | sceneSearchStatus |
| | | }; |
| | | }); |
| | |
| | | |
| | | .el-button-custom { |
| | | --el-button-bg-color: var(--bg-color); |
| | | --el-button-hover-text-color: var(--select_color); |
| | | --el-button-hover-bg-color: var(--bg-color); |
| | | --el-button-border-color: var(--font-color); |
| | | // --el-button-hover-text-color: var(--select_color); |
| | | // --el-button-hover-bg-color: var(--bg-color); |
| | | --el-button-hover-bg-color: var(--select_color); |
| | | --el-button-active-border-color: transparent; |
| | | } |
| | | |
| | | .el-button-custom-light { |
| | | --el-button-bg-color: var(--font-color); |
| | | --el-button-text-color: var(--bg-color); |
| | | --el-button-hover-text-color: var(--bg-color); |
| | | --el-button-hover-bg-color: var(--font-color); |
| | | // --el-button-hover-text-color: var(--bg-color); |
| | | // --el-button-hover-bg-color: var(--font-color); |
| | | --el-button-hover-bg-color: var(--select_color); |
| | | --el-button-border-color: var(--bg-color); |
| | | --el-button-active-border-color: transparent; |
| | | } |
| | |
| | | animationDelayUpdate: function (idx) { |
| | | return idx * 5; |
| | | }, |
| | | // toolbox: { |
| | | toolbox: { |
| | | // bottom: 0, |
| | | // feature: { |
| | | feature: { |
| | | // dataZoom: {}, |
| | | // magicType: { |
| | | // type: ['line', 'bar'] |
| | | // }, |
| | | // restore: {} |
| | | // } |
| | | // restore: { |
| | | // title: 'å·æ°' |
| | | // }, |
| | | saveAsImage: { |
| | | show: true, |
| | | backgroundColor: '#122b54a9', |
| | | name: 'èµ°èªçæµå¾', |
| | | title: 'ä¿å为å¾ç', |
| | | iconStyle: { |
| | | borderColor: '#fff' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | tooltip: { |
| | | textStyle: { |
| | | fontSize: fontSize |
| | |
| | | /** |
| | | * è·åå岿°æ® |
| | | */ |
| | | function fetchHistoryData(params) { |
| | | // if (import.meta.env.VITE_DATA_MODE == 'jingan') { |
| | | // const _params = { |
| | | // compUser: 'user1', |
| | | // compPassword: 'User1@jingan', |
| | | // mn: params.deviceCode, |
| | | // dtFrom: params.startTime |
| | | // ? params.startTime |
| | | // : moment().subtract(6, 'm').format('YYYY-MM-DD HH:mm:ss'), |
| | | // dtTo: params.endTime |
| | | // ? params.endTime |
| | | // : moment().format('YYYY-MM-DD HH:mm:ss') |
| | | // }; |
| | | // return fetchThirdPartyData(_params); |
| | | // } else { |
| | | // return fetchOriginHistoryData(params); |
| | | // } |
| | | function fetchHistoryData(params, origin = true) { |
| | | if (origin) { |
| | | return fetchOriginHistoryData(params); |
| | | } else if (import.meta.env.VITE_DATA_MODE == 'jingan') { |
| | | const _params = { |
| | | compUser: 'user1', |
| | | compPassword: 'User1@jingan', |
| | | mn: params.deviceCode, |
| | | dtFrom: params.startTime |
| | | ? params.startTime |
| | | : moment().subtract(6, 'm').format('YYYY-MM-DD HH:mm:ss'), |
| | | dtTo: params.endTime |
| | | ? params.endTime |
| | | : moment().format('YYYY-MM-DD HH:mm:ss') |
| | | }; |
| | | return fetchThirdPartyData(_params); |
| | | } else { |
| | | return fetchOriginHistoryData(params); |
| | | } |
| | | } |
| | | |
| | | var fetchingTask; |
| | |
| | | const heights = factor.heights; |
| | | const colors = factor.colors; |
| | | const bColor = factor.bottomColor; |
| | | const bColors = factor.bottomColors; |
| | | |
| | | // eslint-disable-next-line no-undef |
| | | var cylinder = new AMap.Object3D.Mesh(); |
| | |
| | | } |
| | | } |
| | | |
| | | // var bColor = bColor |
| | | var tColor = colors[i]; |
| | | geometry.vertexColors.push.apply(geometry.vertexColors, bColor); //åºé¨é¡¶ç¹é¢è² |
| | | geometry.vertexColors.push.apply(geometry.vertexColors, tColor); //é¡¶é¨é¡¶ç¹é¢è² |
| | | geometry.vertexColors.push.apply(geometry.vertexColors, bColors[i]); //åºé¨é¡¶ç¹é¢è² |
| | | geometry.vertexColors.push.apply(geometry.vertexColors, colors[i]); //é¡¶é¨é¡¶ç¹é¢è² |
| | | } |
| | | |
| | | // 7.æ ¹æ®åå¹¶é项éç½®ææ°å¢å½åç¼åæ°æ® |
| | |
| | | import { windDir } from '@/constant/wind-dir'; |
| | | import { map } from './index_old'; |
| | | import { checkboxOptions } from '@/constant/checkbox-options'; |
| | | import { useToolboxStore } from '@/stores/toolbox'; |
| | | |
| | | const toolboxStore = useToolboxStore(); |
| | | |
| | | export const DialogUtil = { |
| | | show: true, |
| | | toggleDataDialog() { |
| | | this.show = !this.show; |
| | | if (this.show) { |
| | | return 'æ°æ®å¼¹æ¡ï¼å¼'; |
| | | } else { |
| | | return 'æ°æ®å¼¹æ¡ï¼å
³'; |
| | | } |
| | | }, |
| | | // å½åæå¼çå¼¹æ¡åä½ç½®åæ |
| | | marker: undefined, |
| | | lnglat: undefined, |
| | | /** |
| | | * åå»ºå¼¹åºæ¡ |
| | | * @param {*} factorDatas çæµæ°æ® |
| | |
| | | offset: new AMap.Pixel(16, -45), |
| | | autoMove: false |
| | | }); |
| | | return m.window; |
| | | return m; |
| | | }, |
| | | |
| | | /** |
| | |
| | | return info; |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯ä¸ä¸ªæ°çæ°æ®å¼¹æ¡ |
| | | * @param {String} deviceType 设å¤ç±»å |
| | | * @param {String} deviceCode 设å¤ç¼å· |
| | | * @param {Array} factorDatas çæµæ°æ® |
| | | * @param {Number} i æ°æ®ç´¢å¼ |
| | | * @param {Function} onClose å¼¹æ¡å
³éåè° |
| | | * @returns |
| | | */ |
| | | openNewWindow(deviceType, deviceCode, factorDatas, i, onClose) { |
| | | if (!this.show) return; |
| | | const window = this.createInfoWindow( |
| | | if (!toolboxStore.dataDialogStatus) return; |
| | | this.marker = this.createInfoWindow( |
| | | deviceType, |
| | | deviceCode, |
| | | factorDatas, |
| | | i, |
| | | onClose |
| | | ); |
| | | window.open(map, factorDatas.lnglats_GD[i]); |
| | | this.marker.window.open(map, factorDatas.lnglats_GD[i]); |
| | | this.lnglat = factorDatas.lnglats_GD[i]; |
| | | }, |
| | | |
| | | /** |
| | | * æå¼ç¼åä¸çå¼¹æ¡ |
| | | */ |
| | | openWindow() { |
| | | if (this.marker && this.lnglat) { |
| | | // this.marker.close(); |
| | | this.marker.window.open(map, this.lnglat); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * å
³é已弹åºçå¼¹æ¡ |
| | | */ |
| | | closeWindow() { |
| | | if (this.marker) { |
| | | // this.marker.close(); |
| | | this.marker.window.close(); |
| | | } |
| | | } |
| | | }; |
| | |
| | | } |
| | | }, |
| | | |
| | | createLabelMarks(img, dataList) { |
| | | /** |
| | | * å建æ è®°ç¹ |
| | | * @param {string | Array} img 徿 æå¾æ æ°ç» |
| | | * @param {Array} dataList çæµæ°æ® |
| | | * @param {boolean} collision æ æ³¨é¿è®© |
| | | * @returns |
| | | */ |
| | | createLabelMarks(img, dataList, collision = true) { |
| | | // eslint-disable-next-line no-undef |
| | | const layer = new AMap.LabelsLayer({ |
| | | zooms: [3, 20], |
| | | zIndex: 1000, |
| | | // å¼å¯æ 注é¿è®©ï¼é»è®¤ä¸ºå¼å¯ï¼v1.4.15 æ°å¢å±æ§ |
| | | collision: true, |
| | | collision: collision, |
| | | // å¼å¯æ 注淡å
¥å¨ç»ï¼é»è®¤ä¸ºå¼å¯ï¼v1.4.15 æ°å¢å±æ§ |
| | | animation: true |
| | | }); |
| | |
| | | zIndex: 10, |
| | | icon: { |
| | | type: 'image', |
| | | image: img, |
| | | image: typeof img === 'string' ? img : img[i], |
| | | // clipOrigin: [14, 92], |
| | | // clipSize: [50, 68], |
| | | size: [30, 30], |
| | |
| | | object3Dlayer.remove(_sector); |
| | | } |
| | | }, |
| | | sectorParams: sectorParams, |
| | | /** |
| | | * ç»å¶æå½¢ |
| | | * @param {FactorDatas} fDatas |
| | |
| | | /* eslint-disable no-undef */ |
| | | import { map, satellite } from './index_old'; |
| | | import { useToolboxStore } from '@/stores/toolbox'; |
| | | // import '@/lib/jquery-3.5.1.min'; |
| | | import { DialogUtil } from '@/utils/map/dialog'; |
| | | |
| | | const toolboxStore = useToolboxStore(); |
| | | |
| | |
| | | * @param {boolean} value |
| | | */ |
| | | toggleFeatures(value) { |
| | | value ? map.setFeatures(['bg', 'road', 'point', 'building']) : map.setFeatures(['bg', 'road']); |
| | | value |
| | | ? map.setFeatures(['bg', 'road', 'point', 'building']) |
| | | : map.setFeatures(['bg', 'road']); |
| | | toolboxStore.featuresStatus = value; |
| | | }, |
| | | |
| | |
| | | _locationText = undefined; |
| | | } |
| | | toolboxStore.coorPickStatus = value; |
| | | }, |
| | | |
| | | /** |
| | | * å¼å
³æ°æ®å¼¹æ¡ |
| | | */ |
| | | toggleDataDialogStatus(value) { |
| | | toolboxStore.dataDialogStatus = value; |
| | | if (value) { |
| | | DialogUtil.openWindow(); |
| | | } else { |
| | | DialogUtil.closeWindow(); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * å¼å
³æº¯æºæ¸
å |
| | | */ |
| | | toggleSceneSearch(value) { |
| | | toolboxStore.sceneSearchStatus = value; |
| | | } |
| | | }; |
| | |
| | | }; |
| | | |
| | | export default { |
| | | setCenter(lnglat) { |
| | | if (isDragging) { |
| | | setCenter(lnglat, ignore = false) { |
| | | if (!ignore && isDragging) { |
| | | return; |
| | | } |
| | | var now = new Date(); |
| | | if ( |
| | | this.lasttime == undefined || |
| | | now.getTime() - this.lasttime.getTime() >= 1000 |
| | | now.getTime() - this.lasttime.getTime() >= 200 |
| | | ) { |
| | | map.setCenter(lnglat); |
| | | this.lasttime = now; |
| | |
| | | <CoreHeader></CoreHeader> |
| | | <el-row class="dropdown-wrap"> |
| | | <MapToolbox></MapToolbox> |
| | | <MissionManage></MissionManage> |
| | | <!-- <MissionManage></MissionManage> --> |
| | | <ConfigManage></ConfigManage> |
| | | <!-- <MapLocation></MapLocation> --> |
| | | <SceneSearch></SceneSearch> |
| | | <MapScene></MapScene> |
| | | </el-row> |
| | | <CoreMenu></CoreMenu> |
| | |
| | | } |
| | | |
| | | .dropdown-wrap { |
| | | /* background-color: aliceblue; */ |
| | | position: absolute; |
| | | top: 10px; |
| | | left: 2px; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import underwayPng from '@/assets/mipmap/underway-2.png'; |
| | | import underwayPng2 from '@/assets/mipmap/underway-2.png'; |
| | | import underwayPng from '@/assets/mipmap/underway.png'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | underwayPng: underwayPng, |
| | | formObj: {}, |
| | | rules: { |
| | | userName: [ |
| | |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | underwayPng() { |
| | | if (import.meta.env.VITE_DATA_MODE == 'jingan') { |
| | | return underwayPng2; |
| | | } else { |
| | | return underwayPng; |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | login() { |
| | | this.$refs.formRef.validate((valid) => { |
| | |
| | | v-show="status == 0" |
| | | :search-time="searchTime" |
| | | :loading="loading" |
| | | @search="fetchHistroyData" |
| | | @search="onSearch" |
| | | ></SearchBar> |
| | | <TrajectoryState v-show="status != 0" :status="status"></TrajectoryState> |
| | | </el-row> |
| | |
| | | import DataSheet from './component/DataSheet.vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { fetchHistoryData } from '@/utils/factor/data'; |
| | | import { mapStores } from 'pinia'; |
| | | import { useSceneStore } from '@/stores/scene'; |
| | | |
| | | export default { |
| | | components: { TrendAnalysis, DataSheet }, |
| | | setup() { |
| | | // éå®åé¡µæ°æ®é为10000 |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | return { loading, fetchData }; |
| | | }, |
| | |
| | | // å½åéä¸é«äº®çæ°æ®ç¹ç´¢å¼ |
| | | locateIndex: undefined, |
| | | // 轨迹å¨ç»ç¶æ |
| | | status: 0 |
| | | status: 0, |
| | | // æ¯å¦é¡µé¢å·²è·³è½¬ |
| | | isUnmounted: false |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | this.draw(); |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapStores(useSceneStore) |
| | | }, |
| | | methods: { |
| | | // æ£æ¥æ°æ®ç»çº¬åº¦æ¯å¦åæ³ |
| | |
| | | // çå¬æçº¿å¾åè¡¨æ ¼çç¹å»äºä»¶ |
| | | handelIndexChange(index) { |
| | | if (this.checkDataIsValid(index)) { |
| | | // ç»å¶æº¯æºæå½¢ |
| | | this.drawSector(index); |
| | | // æ¥è¯¢èå´å
ççæµç«ç¹ |
| | | const [lng, lat] = this.factorDatas.lnglats_GD[index]; |
| | | this.sceneStore.searchScene(lng, lat); |
| | | } |
| | | }, |
| | | draw() { |
| | |
| | | }, |
| | | drawMassMarks(e) { |
| | | marks.drawMassMarks(this.factorDatas, e, (index) => { |
| | | // æ¥è¯¢èå´å
ççæµç«ç¹ |
| | | // SceneUtil.searchByCoordinate(lnglat[0], lnglat[1], distance); |
| | | if (this.checkDataIsValid(index)) { |
| | | this.drawSector(index); |
| | | } |
| | | this.handelIndexChange(index); |
| | | }); |
| | | // è°æ´å°å¾è§è§ |
| | | mapUtil.setBound(this.factorDatas.lnglats_GD); |
| | |
| | | ); |
| | | }, |
| | | onFetchData(deviceType, data) { |
| | | if (this.isUnmounted) return; |
| | | // todo æ ¹æ®è®¾å¤ç±»å忢å°å¾çæµå åå±ç¤ºåéæ¡ãæçº¿å¾å¤éæ¡ãæ°æ®è¡¨æ ¼å¤éæ¡çå åç±»å |
| | | this.deviceType = deviceType; |
| | | this.factorDatas.setData(data, this.drawMode, () => { |
| | |
| | | this.draw(); |
| | | }); |
| | | }, |
| | | fetchHistroyData(option) { |
| | | onSearch(option) { |
| | | const { deviceType, deviceCode, timeArray } = option; |
| | | this.deviceType = deviceType; |
| | | this.deviceCode = deviceCode; |
| | |
| | | }).then((res) => this.onFetchData(deviceType, res.data)); |
| | | }); |
| | | } |
| | | // fetchRealTimeData() { |
| | | // // fixme 2024.5.3 æ¤å¤åå§è·åçæ°æ®ï¼åæ°åºè¯¥ç±searchbarå³å®ï¼åç»ä¿®æ¹ |
| | | // this.fetchData((page) => { |
| | | // return fetchHistoryData({ |
| | | // deviceCode: '0a0000000001', |
| | | // // type: TYPE0, |
| | | // page, |
| | | // perPage: 100 |
| | | // }).then((res) => { |
| | | // if (res.data.length > 0) { |
| | | // const s = new Date(res.data[0].time.replace(' ', 'T')); |
| | | // const e = new Date( |
| | | // res.data[res.data.length - 1].time.replace(' ', 'T') |
| | | // ); |
| | | // this.searchTime = [s, e]; |
| | | // } |
| | | // this.onFetchData(TYPE0, res.data); |
| | | // }); |
| | | // }); |
| | | // } |
| | | }, |
| | | mounted() { |
| | | // this.fetchRealTimeData(); |
| | | this.isUnmounted = false; |
| | | }, |
| | | unmounted() { |
| | | mapUtil.clearMap(); |
| | | this.isUnmounted = true; |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | }, |
| | | fetchRealTimeData() { |
| | | this.fetchData((page) => { |
| | | return fetchHistoryData({ |
| | | return fetchHistoryData( |
| | | { |
| | | deviceCode: this.deviceCode, |
| | | // startTime: '2024-08-20 06:00:00', |
| | | // endTime: '2024-08-20 06:02:00', |
| | | page, |
| | | perPage: 100 |
| | | }).then((res) => { |
| | | }, |
| | | false |
| | | ).then((res) => { |
| | | this.onFetchData(res.data); |
| | | this.onMapData(res.data); |
| | | // if (res.data.length > 0) { |
| | |
| | | this.notFirstFetch = true; |
| | | } |
| | | startIndex = startIndex < 0 ? 0 : startIndex; |
| | | return new Promise((resolve, reject) => { |
| | | return new Promise(() => { |
| | | this.allFactorDatas.addData(dataList, this.drawMode, () => { |
| | | realTimeMapAnimation.moveAnimation( |
| | | this.allFactorDatas, |