Riku
2025-09-20 32eedf2857255cf29985ffc0cc73e75eccda39bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
  <el-form :inline="true">
    <FYOptionTime :initValue="true" type="date" v-model:value="updateTime"></FYOptionTime>
    <el-form-item>
      <el-button type="primary" :loading="loading" @click="fetchNewConstruction"
        >查询新工地</el-button
      >
    </el-form-item>
  </el-form>
  <el-row>
    <el-col :span="12">
      <el-text>新工地</el-text>
      <div v-for="item in constructionList" :key="item.id">
        <div>{{ item.id }}</div>
        <div>{{ item.code }}</div>
        <div>{{ item.name }}</div>
        <div>{{ item.address }}</div>
        <div>{{ item.status }}</div>
        <span>{{ item.createTime }} |</span>
        <span>{{ item.updateTime }} |</span>
        <span>{{ item.remark }} |</span>
        <span>{{ item.lon }} |</span>
        <span>{{ item.lat }}</span>
      </div>
    </el-col>
    <el-col :span="12">
      <el-text>监管工地</el-text>
      <div v-for="item in sceneList" :key="item.id">
        <div>{{ item.id }}</div>
        <div>{{ item.code }}</div>
        <div>{{ item.name }}</div>
        <div>{{ item.address }}</div>
        <div>{{ item.street }}</div>
        <div>{{ item.status }}</div>
        <span>{{ item.lon }} |</span>
        <span>{{ item.lat }}</span>
        <span>{{ item.score }} |</span>
        <span>{{ item.grade }}</span>
        <span>{{ item.subTaskId }} |</span>
        <span>{{ item.createTime }} |</span>
      </div>
    </el-col>
  </el-row>
</template>
<script setup>
import { ref } from 'vue';
import dayjs from 'dayjs';
import constructionApi from '@/api/additional-jingan/constructionApi';
import { useFetchData } from '@/composables/fetchData';
 
const { loading, fetchData } = useFetchData();
 
const updateTime = ref();
const constructionList = ref([]);
const sceneList = ref([])
 
// 查询新建工地
function fetchNewConstruction() {
  const param = dayjs(updateTime.value).format('YYYY-MM-DD HH:mm:ss');
  fetchData(() => {
    return constructionApi.queryGdNew(param).then((res) => {
      constructionList.value = res.data;
    });
  });
}
</script>
<style scoped></style>