吉安感知网项目-前端
shuishen
2026-02-03 89380e6260a75d1d3b94de687ebcc2f50d50659d
applications/mobile-web-view/src/appPages/work/workDetail/mapWork/index.vue
@@ -7,88 +7,22 @@
         :workNavigationShow="true"
         :mapCurrentDetail="mapCurrentDetail"
      >
<!--         <template #eventNav>-->
<!--            <EventNavigation :mapCurrentDetail="mapCurrentDetail"></EventNavigation>-->
<!--         </template>-->
      </WorkMap>
   </div>
</template>
<script setup>
import { getDeviceRegion } from '@/api/home/aggregation'
import WorkMap from '@/appComponents/workMap/index.vue'
import EventNavigation from '@/appPages/work/workDetail/mapWork/eventNavigation.vue'
import { useRoute } from 'vue-router'
import { showToast } from 'vant'
import { getList } from '/src/api/work/index.js'
import { useStore } from 'vuex'
const store = useStore()
const userInfo = computed(() => store?.state?.user?.userInfo)
const route = useRoute()
const mapCurrentDetail = ref({
   "id": 8474,
   "wayline_job_id": "51835088-cd94-42f8-b2ec-a9069ced4e7b",
   "event_name": "测试",
   "device_sn": "7CTDM5E00B3H61",
   "status": 3,
   "photo_url": "https://wrj.shuixiongit.com/minio/cloud-bucket/upload/20260113/f090f03fdc52499473ab9cbfcdc0876d.jpeg",
   "file_path": "upload/20260113/f090f03fdc52499473ab9cbfcdc0876d.jpeg",
   "longitude": "115.85649472222222",
   "latitude": "28.624301527777778",
   "create_time": "2026-01-13 16:51:57",
   "media_type": "PHOTO_TYPE",
   "event_num": "BHJC20260113002",
   "ai_types": "道路裂缝",
   "ai_type_key_list": [
      "DLLFSB"
   ],
   "work_order_type_dict_key": "ZHZLL",
   "work_order_type": "交通运输与交管​",
   "create_user": "曾超杰",
   "update_user": "管理员",
   "dept_name": "中图智飞(江西省)",
   "create_user_id": "2009140684346388482",
   "user_id": "1991745495648227330",
   "handle_user_id": "1123598821738675201",
   "address": "江西省南昌市西湖区朝农街道抚生南路1806号南昌台湾健康产业城",
   "update_photo_url": "https://wrj.shuixiongit.com/minio/cloud-bucket/upload/20260113/f090f03fdc52499473ab9cbfcdc0876d.jpeg",
   "content": "测试",
   "work_type": "3",
   "job_name": "定向拍照2",
   "is_review": 0,
   "job_create_time": "2026-01-13 16:51:57"
})
const eventNum = ref('')
// 机巢数据
let machineData = ref([]);
// 机巢数据
const handleNodeClick = async data => {
  const droneList = await getDeviceRegion({ areaCode: userInfo.value.detail.areaCode });
  machineData.value = droneList?.data?.data;
};
const getDataList = async val => {
   const params = {
      current: 1,
      size: 9999,
      source: 1,
      event_name: val,
   }
   const res = await getList(params)
   const response = res.data.data.records
  const matchedMachine = machineData.value.find(m => m.device_sn === response[0].device_sn);
  const deviceNickname = matchedMachine?.nickname || ''
   mapCurrentDetail.value = {
      ...response[0],
      processingDetail: response[0].processing_details,
      update_photo_url: response[0].update_photo_url,
      aiType: response[0].ai_type_key_list?.join(',') || '',
    device_names:deviceNickname ? deviceNickname :''
   }
}
const mapCurrentDetail = ref({})
onMounted(async () => {
  // handleNodeClick()
   eventNum.value = route.query.currentItem
   // await getDataList(eventNum.value)
mapCurrentDetail.value = JSON.parse(decodeURIComponent(route.query.currentItem))
})
</script>