Kaynağa Gözat

Merge branch 'xj' of http://192.168.0.115:3000/bill/public-fuse into xj

tangning 1 yıl önce
ebeveyn
işleme
5cb63362c2

+ 2 - 2
src/app/fire/view/dispatch/index.vue

@@ -13,7 +13,7 @@
         </el-button>
       </template>
       <template v-else>
-        <el-button type="primary" @click="openMap"> 查看地图案件分 </el-button>
+        <el-button type="primary" @click="openMap"> 查看地图案件分 </el-button>
         <el-button type="primary" @click="addHandler" v-pdpath="'add'">
           新增火调项目
         </el-button>
@@ -134,6 +134,6 @@ const addHandler = async () => {
   (await addFire({})) && pagging.refresh();
 };
 const openMap = () => {
-  location.href = "./map.html";
+  window.open("./map.html");
 };
 </script>

+ 39 - 3
src/app/map/App.vue

@@ -6,6 +6,10 @@
 <script setup lang="ts">
 import AMapLoader from "@amap/amap-jsapi-loader";
 import { onMounted, ref } from "vue";
+import axios from 'axios';
+
+
+
 
 const mockData = [
   {
@@ -32,7 +36,32 @@ const mockData = [
 ]
 const mapEl = ref<HTMLDivElement>();
 
+const getDataQuest = async () => {
+  const res = await axios(
+    {
+      url: "https://xj-mix3d.4dkankan.com/fusion-xj/web/fireProject/queryProject",
+      headers: {
+        share: 1,
+        'Content-Type': 'application/json'
+      },
+      method: 'post',
+      data: {
+        pageNum: 1,
+        pageSize: 10000
+      }
+    }
+  )
+  if (res.data && res.data.code === 0) {
+    return Promise.resolve(res.data.data.list)
+  } else {
+    return Promise.resolve([])
+  }
+
+
+}
+
 const loadMap = async () => {
+
   const AMap = await AMapLoader.load({
     plugins: ["AMap.PlaceSearch"],
     key: "e661b00bdf2c44cccf71ef6070ef41b8",
@@ -57,12 +86,19 @@ const loadMap = async () => {
   });
   console.log('map', map)
 
-  const initMakers = () => {
-    mockData.forEach(item => {
+  const initMakers = async () => {
+    const data = await getDataQuest();
+    // console.log('data', data)
+    Array.from(data).forEach((item: any) => {
       // console.log(item)
+      const latlng = item.latlng
+      const coord = latlng.split(',')
+
+      console.log('coord',coord)
+      
       const marker = new AMap.Marker({
         icon: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
-        position: item.pos,
+        position: coord,
         title: item.title,
         label: item.title,
         extData: { url: item.url, id: item.id }

+ 1 - 1
src/constant/scene.ts

@@ -26,7 +26,7 @@ export const SceneTypePaths: { [key in SceneType]: string[] } = {
   [SceneType.SWKK]: [
     "/swkk/spg.html",
     "/swkk/epg.html",
-    `/swkk/livestream/fd/${appConstant.name}.html`,
+    `/livestream/fd/${appConstant.name}.html`,
   ],
   [SceneType.SWKJ]: ["/swkk/spg.html", "/swkk/epg.html"],
   [SceneType.SWSS]: ["/swss/index.html", "/swss/index.html"],

+ 8 - 2
src/view/case/records/index.vue

@@ -141,6 +141,10 @@
             <span style="margin-left:50px">身份证件号码:</span>
             <el-input class="input" v-model="item.id" placeholder="" style="width: 280px;" />
           </div>
+          <div class="line">
+            <span>单位或住址:</span>
+            <el-input class="input" v-model="item.address" placeholder="" style="width: 100%;" />
+          </div>
         </div>
 
       </template>
@@ -203,13 +207,15 @@ const data = reactive({
     year: "",
     month: "",
     day: "",
-    id: ""
+    id: "",
+    address: ""
   }, {
     name: "",
     year: "",
     month: "",
     day: "",
-    id: ""
+    id: "",
+    address: ""
   }]
 })
 

+ 3 - 3
src/view/system/imageCropper.vue

@@ -22,10 +22,10 @@
       />
     </div>
     <div class="control">
-      <div class="slider-demo-block">
+      <!-- <div class="slider-demo-block">
         <span class="demonstration">色相调整</span>
         <el-slider v-model="hue" :max="360" :min="0" show-input />
-      </div>
+      </div> -->
       <el-button type="primary" @click="cropperRef.rotateRight()"> 旋转 </el-button>
     </div>
   </div>
@@ -45,7 +45,7 @@ type CropperProps = {
 };
 const props = defineProps<CropperProps>();
 
-const hue = ref(90);
+const hue = ref(0);
 // 样式控制
 const sWidth = 500;
 const sHeight = (props.fixed[1] / props.fixed[0]) * sWidth;