2025.7.21 任务管理-监管地图功能(待完成)
| | |
| | | CompGenericWrapper: typeof import('./components/CompGenericWrapper.vue')['default'] |
| | | CompQuickSet: typeof import('./components/search-option/CompQuickSet.vue')['default'] |
| | | Content: typeof import('./components/core/Content.vue')['default'] |
| | | copy: typeof import('./components/search-option/FYOptionUserType copy.vue')['default'] |
| | | ElAffix: typeof import('element-plus/es')['ElAffix'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] |
| | | ElCalendar: typeof import('element-plus/es')['ElCalendar'] |
| | | ElCard: typeof import('element-plus/es')['ElCard'] |
| | | ElCascader: typeof import('element-plus/es')['ElCascader'] |
| | |
| | | ElDialog: typeof import('element-plus/es')['ElDialog'] |
| | | ElDivider: typeof import('element-plus/es')['ElDivider'] |
| | | ElDrawer: typeof import('element-plus/es')['ElDrawer'] |
| | | ElDropdown: typeof import('element-plus/es')['ElDropdown'] |
| | | ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] |
| | | ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] |
| | | ElEmpty: typeof import('element-plus/es')['ElEmpty'] |
| | | ElForm: typeof import('element-plus/es')['ElForm'] |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | | ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | | ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] |
| | | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | | ElScroll: typeof import('element-plus/es')['ElScroll'] |
| | | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
| | | ElSegmented: typeof import('element-plus/es')['ElSegmented'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElSpace: typeof import('element-plus/es')['ElSpace'] |
| | | ElStep: typeof import('element-plus/es')['ElStep'] |
| | |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTransfer: typeof import('element-plus/es')['ElTransfer'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | |
| | | FYImageSelectDialog: typeof import('./components/FYImageSelectDialog.vue')['default'] |
| | | FYInfoSearch: typeof import('./components/search-option/FYInfoSearch.vue')['default'] |
| | | FYList: typeof import('./components/table/FYList.vue')['default'] |
| | | FYOption: typeof import('./components/search-option/FYOption.vue')['default'] |
| | | FYOptionLocation: typeof import('./components/search-option/FYOptionLocation.vue')['default'] |
| | | FYOptionOnlineStatus: typeof import('./components/search-option/FYOptionOnlineStatus.vue')['default'] |
| | | FYOptionScene: typeof import('./components/search-option/FYOptionScene.vue')['default'] |
| | | FYOptionSupervision: typeof import('./components/search-option/FYOptionSupervision.vue')['default'] |
| | | FYOptionSupervisionStatus: typeof import('./components/search-option/FYOptionSupervisionStatus.vue')['default'] |
| | | FYOptionText: typeof import('./components/search-option/base/FYOptionText.vue')['default'] |
| | | FYOptionTime: typeof import('./components/search-option/FYOptionTime.vue')['default'] |
| | | FYOptionUserType: typeof import('./components/search-option/FYOptionUserType.vue')['default'] |
| | |
| | | <template> |
| | | <BaseMap></BaseMap> |
| | | <el-row class="left-top-wrap"> |
| | | <FYOptionScene |
| | | label="" |
| | | :allOption="true" |
| | | :type="2" |
| | | v-model:value="scenetype" |
| | | ></FYOptionScene> |
| | | <slot name="left-top"></slot> |
| | | </el-row> |
| | | </template> |
| | | <script setup> |
| | | import { watch } from 'vue'; |
| | | import { ref, watch } from 'vue'; |
| | | import { map, onMapMounted } from '@/utils/map/index'; |
| | | import marks from '@/utils/map/marks'; |
| | | import { sceneIcon } from '@/assets/scene-icon'; |
| | |
| | | data: Array |
| | | }); |
| | | |
| | | var markViewList = []; |
| | | let allMarkViews = []; |
| | | let markViewList = []; |
| | | |
| | | const scenetype = ref(); |
| | | |
| | | watch( |
| | | () => props.data, |
| | | (nV, oV) => { |
| | | if (nV != oV) { |
| | | drawSceneMarks(); |
| | | clearSceneMarks(); |
| | | createSceneMarks(); |
| | | filterMarkViews(); |
| | | } |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | |
| | | function drawSceneMarks() { |
| | | watch(scenetype, (nV, oV) => { |
| | | if (nV != oV) { |
| | | clearSceneMarks(); |
| | | filterMarkViews(); |
| | | } |
| | | }); |
| | | |
| | | function createSceneMarks() { |
| | | onMapMounted(() => { |
| | | markViewList = []; |
| | | allMarkViews = []; |
| | | props.data.forEach((d) => { |
| | | // åå»ºåºæ¯å°å¾æ 注 |
| | | const mark = marks.createMarker({ |
| | | position: [d.longitude, d.latitude], |
| | | icon: sceneIcon(d.typeid), |
| | | label: d.name, |
| | | extData: d.guid |
| | | img: sceneIcon(d.typeid), |
| | | // label: d.name, |
| | | extData: d |
| | | }); |
| | | markViewList.push(mark); |
| | | // æ·»å ç¹å»äºä»¶ |
| | | mark.on('click', (ev) => { |
| | | const _mark = ev.target; |
| | | const _extData = _mark.getExtData(); |
| | | if (_extData._show) { |
| | | ev.target.setLabel({ |
| | | content: '' |
| | | // direction: 'bottom' |
| | | }); |
| | | _extData._show = false |
| | | ev.target.setExtData(_extData) |
| | | } else { |
| | | ev.target.setLabel({ |
| | | content: _extData.name |
| | | // direction: 'bottom' |
| | | }); |
| | | _extData._show = true |
| | | ev.target.setExtData(_extData) |
| | | } |
| | | }); |
| | | allMarkViews.push(mark); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * çéæéç±»åçåºæ¯ |
| | | */ |
| | | function filterMarkViews() { |
| | | onMapMounted(() => { |
| | | if (scenetype.value == undefined) { |
| | | markViewList = allMarkViews; |
| | | } else { |
| | | markViewList = allMarkViews.filter((v) => { |
| | | return ( |
| | | scenetype.value.value == null || |
| | | v.getExtData().typeid + '' == scenetype.value.value |
| | | ); |
| | | }); |
| | | } |
| | | map.add(markViewList); |
| | | setTimeout(() => { |
| | | map.setFitView(markViewList); |
| | | }, 1000); |
| | | }); |
| | | } |
| | | |
| | | function clearSceneMarks() { |
| | | onMapMounted(() => { |
| | | if (markViewList.length > 0) { |
| | | map.remove(markViewList); |
| | | } |
| | | }); |
| | | } |
| | | </script> |
| | | <style scoped></style> |
| | | <style scoped> |
| | | .left-top-wrap { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-form-item label="åºæ¯ç±»å" :prop="prop"> |
| | | <el-form-item :label="label" :prop="prop"> |
| | | <el-select |
| | | :model-value="value" |
| | | @change="handleChange" |
| | | placeholder="åºæ¯ç±»å" |
| | | :placeholder="label" |
| | | style="width: 150px" |
| | | > |
| | | <el-option v-for="s in sceneTypes" :key="s.value" :label="s.label" :value="s" /> |
| | | <el-option |
| | | v-for="s in sceneTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | label: { |
| | | type: String, |
| | | default: 'åºæ¯ç±»å' |
| | | }, |
| | | // 1:é£ç¾½ç¯å¢ç³»ç»ï¼2ï¼é£ç¾½ç管系ç»ï¼ |
| | | type: { |
| | | type: Number || String, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item :label="label" :prop="prop"> |
| | | <el-select |
| | | :model-value="value" |
| | | @change="handleChange" |
| | | :placeholder="label" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="s in options" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦å¨é¦é项夿·»å âå
¨é¨âé项 |
| | | allOption: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | label: { |
| | | type: String, |
| | | default: 'çç®¡ç¶æ' |
| | | }, |
| | | // è¿åç»æ |
| | | value: Object, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | prop: { |
| | | type: String, |
| | | default: '_usertype' |
| | | } |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | options: [ |
| | | { |
| | | label: 'å
¨é¨çç®¡ç¶æ', |
| | | value: null |
| | | }, |
| | | { |
| | | label: 'æªç管', |
| | | value: '0' |
| | | }, |
| | | { |
| | | label: 'å·²ç管', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '已夿 ¸', |
| | | value: '2' |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleChange(value) { |
| | | this.$emit('update:value', value); |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.initValue) { |
| | | this.handleChange(this.options[0]); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | function _enumScene_1() { |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | label: 'å
¨é¨åºæ¯', |
| | | value: null |
| | | }, |
| | | { |
| | |
| | | function _enumScene_2() { |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | label: 'å
¨é¨åºæ¯', |
| | | value: null |
| | | }, |
| | | { |
| | |
| | | return layer; |
| | | }, |
| | | |
| | | createMarker({ position, icon, label, extData }) { |
| | | createMarker({ position, img, label, extData }) { |
| | | //å建 AMap.Icon å®ä¾ï¼ |
| | | const icon = new AMap.Icon({ |
| | | size: new AMap.Size(30, 30), //徿 尺寸 |
| | | image: img, //Icon çå¾å |
| | | // imageOffset: new AMap.Pixel(-9, -3), //å¾åç¸å¯¹å±ç¤ºåºåçåç§»éï¼éäºéªç¢§å¾ç |
| | | imageSize: new AMap.Size(30, 30) //æ ¹æ®æè®¾ç½®ç大尿伏æå缩å¾ç |
| | | }); |
| | | const marker = new AMap.Marker({ |
| | | position: position, |
| | | offset: new AMap.Pixel(-10, -10), |
| | | // offset: new AMap.Pixel(-13, -30), |
| | | icon: icon, //æ·»å icon 徿 URL |
| | | title: label, |
| | | label: { |
| | |
| | | }, |
| | | extData |
| | | }); |
| | | map.add(marker); |
| | | // map.add(marker); |
| | | return marker; |
| | | } |
| | | }; |
| | |
| | | <CompMonitorPlan |
| | | ref="planRef" |
| | | :task="curTask.data" |
| | | :day-task-list="dayTaskList" |
| | | :day-task-list="curDayTaskList" |
| | | @date-change="onDateChange" |
| | | ></CompMonitorPlan> |
| | | </el-col> |
| | |
| | | return taskApi |
| | | .fetchDayTasks(this.curTask.data.tguid) |
| | | .then((res) => { |
| | | this.dayTaskList = res; |
| | | this.curDayTaskList = res; |
| | | }) |
| | | .finally(() => (this.dayTaskLoading = false)); |
| | | }, |
| | |
| | | watch( |
| | | () => props.dayTaskList, |
| | | (nV, oV) => { |
| | | if (nV != oV && dateValue.value) { |
| | | if (nV && dateValue.value) { |
| | | onDateChange(dateValue.value); |
| | | } |
| | | }, |
| | |
| | | <template> |
| | | <div style="width: 70vw; height: 600px; background-color: aliceblue"> |
| | | <SceneMap :data="scenes"></SceneMap> |
| | | <div style="width: 68vw; height: 600px; background-color: aliceblue"> |
| | | <SceneMap :data="scenes"> |
| | | <template #left-top> |
| | | <FYOptionSupervisionStatus |
| | | label="" |
| | | :allOption="true" |
| | | v-model:value="supervisionStatus" |
| | | ></FYOptionSupervisionStatus> |
| | | </template> |
| | | </SceneMap> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { computed } from 'vue'; |
| | | import { ref, computed } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | // åºæ¯è®¡å |
| | | plans: { |
| | |
| | | } |
| | | }); |
| | | |
| | | const supervisionStatus = ref(); |
| | | |
| | | const scenes = computed(() => { |
| | | return props.plans.map((p) => { |
| | | return props.plans |
| | | .filter((v) => { |
| | | if (supervisionStatus.value) { |
| | | switch (supervisionStatus.value.value) { |
| | | case '0': |
| | | return ( |
| | | v.extension1 == undefined || |
| | | v.extension1 == null || |
| | | v.extension1 == '0' |
| | | ); |
| | | case '1': |
| | | return v.extension1 == '1'; |
| | | case '2': |
| | | return v.extension1 == '2'; |
| | | default: |
| | | return true; |
| | | } |
| | | } else { |
| | | return true |
| | | } |
| | | // if (supervisionStatus.value) { |
| | | // supervisionStatus.value; |
| | | // } else { |
| | | // return true; |
| | | // } |
| | | }) |
| | | .map((p) => { |
| | | return p.scene; |
| | | }); |
| | | }); |