bill 7 tháng trước cách đây
mục cha
commit
120f4bcc7b

BIN
public/images/point.png


BIN
public/images/video.png


+ 8 - 10
src/model/platform.ts

@@ -26,16 +26,14 @@ export async function modelSDKFactory(
   dom: HTMLDivElement | HTMLIFrameElement
 ): Promise<ModelExpose> {
   let center: number[] | undefined = undefined;
-
-  if (caseProject.value) {
-    const lonlatStr = caseProject.value?.latAndLong || "22.364093,113.600356";
-    const lonlat = lonlatStr.split(",").map(Number);
-    const gcenter = aMapToWgs84({
-      x: lonlat[1],
-      y: lonlat[0],
-    });
-    center = [gcenter.x, gcenter.y];
-  }
+  const lonlatStr = caseProject.value?.latAndLong || "22.364093,113.600356";
+    // const lonlatStr = caseProject.value?.latAndLong || "22.364093,113.600356";
+  const lonlat = lonlatStr.split(",").map(Number);
+  const gcenter = aMapToWgs84({
+    x: lonlat[1],
+    y: lonlat[0],
+  });
+  center = [gcenter.x, gcenter.y];
   if (type === fuseModel) {
     if (!fuseInitialed) {
       await initialSDK({

+ 5 - 0
src/router/config.ts

@@ -89,6 +89,11 @@ export const routes = [
         component: () => import('@/views/summary/index.vue')
       },
       {
+        path: paths[RoutesName.security],
+        name: RoutesName.security,
+        component: () => import('@/views/security/index.vue')
+      },
+      {
         path: paths[RoutesName.fireInfo],
         name: RoutesName.fireInfo,
         component: () => import('@/views/folder/index.vue')

+ 9 - 0
src/router/constant.ts

@@ -34,6 +34,10 @@ export enum RoutesName {
   // 单模型展示
   signModel = "signModel",
   error = "error",
+
+
+  // 安防
+  security = 'security'
 }
 
 export const paths = {
@@ -63,6 +67,7 @@ export const paths = {
   [RoutesName.folderShow]: "folder",
 
   [RoutesName.signModel]: "/sign-model",
+  [RoutesName.security]: "security",
 };
 
 export const metas = {
@@ -126,5 +131,9 @@ export const metas = {
   [RoutesName.error]: {
     title: "错误页面",
   },
+  [RoutesName.security]: {
+    icon: "path",
+    title: "安防",
+  },
 };
 export const ViewHome = RoutesName.merge;

+ 3 - 0
src/views/security/duty.vue

@@ -0,0 +1,3 @@
+<template>
+  duty
+</template>

+ 88 - 0
src/views/security/index.vue

@@ -0,0 +1,88 @@
+<template>
+  <div class="full-security" v-if="data">
+    <div class="btns">
+      <span v-for="v in views" @click="active = v" class="fun-ctrl">
+        {{ v.name }}
+      </span>
+    </div>
+
+    <div class="view" v-if="active">
+      <ui-icon type="close" ctrl class="close" @click="active = void 0" />
+      <h2>{{ active.name }}</h2>
+      <component :is="active.view" />
+    </div>
+  </div>
+</template>
+
+<script setup lang="ts">
+import { reactive, ref } from "vue";
+import { data } from "./store";
+import Duty from "./duty.vue";
+import Job from "./job.vue";
+import Site from "./site.vue";
+
+const views = reactive([
+  { name: "职责要求", view: Job },
+  { name: "场所情况", view: Site },
+  { name: "勤务要求", view: Duty },
+]);
+const active = ref<typeof views[0]>();
+</script>
+
+<style lang="scss" scoped>
+.full-security {
+  position: absolute;
+  z-index: 9;
+  inset: 0;
+  pointer-events: none;
+
+  > * {
+    pointer-events: all;
+  }
+}
+
+.btns {
+  position: absolute;
+  bottom: 40px;
+  left: 50%;
+  display: flex;
+  transform: translate(-50%, 0);
+
+  span {
+    cursor: pointer;
+    margin: 0 35px;
+    background: rgba(0, 0, 0, 0.9);
+    width: 110px;
+    height: 85px;
+    text-align: center;
+    line-height: 85px;
+    color: #fff;
+    font-size: 14px;
+    border-radius: 6px;
+  }
+}
+
+.view {
+  position: absolute;
+  right: 24px;
+  top: 24px;
+  border-radius: 10px;
+  background: rgba(0, 0, 0, 0.9);
+  bottom: 24px;
+  width: 536px;
+  overflow-y: auto;
+  padding: 30px;
+
+  .close {
+    position: absolute;
+    top: 15px;
+    right: 15px;
+    font-size: 20px;
+  }
+
+  > h2 {
+    font-size: 18px;
+    font-weight: bold;
+  }
+}
+</style>

+ 29 - 0
src/views/security/job.vue

@@ -0,0 +1,29 @@
+<template>
+  <div class="item" v-for="item in data.job">
+    <h3 class="title">{{ item.title }}</h3>
+    <div class="content">
+      <p v-for="c in item.content">{{ c }}</p>
+    </div>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { params } from "@/env";
+import { data } from "./store";
+</script>
+
+<style lang="scss" scoped>
+.item {
+  margin-top: 20px;
+
+  h3 {
+    font-size: 14px;
+    margin-bottom: 10px;
+  }
+  p {
+    font-size: 14px;
+    line-height: 1.89em;
+    color: #9e9e9e;
+  }
+}
+</style>

+ 15 - 0
src/views/security/link.vue

@@ -0,0 +1,15 @@
+<template>
+  <img :src="getLinkAttr(name)" v-if="getLinkAttr(name)" @click="flyLink(name)" />
+</template>
+
+<script setup lang="ts">
+import { flyLink, getLinkAttr } from "./store";
+
+defineProps<{ name: string }>();
+</script>
+
+<style scoped>
+img {
+  cursor: pointer;
+}
+</style>

+ 94 - 0
src/views/security/site.vue

@@ -0,0 +1,94 @@
+<template>
+  <div class="item">
+    <h3 class="title">{{ data.site.desc.title }}</h3>
+    <div class="content">
+      <p v-for="item in data.site.desc.content">
+        {{ item }}
+      </p>
+      <div class="c-item">
+        <p v-for="item in data.site.desc.links">
+          {{ item.title }}
+          <Link :name="item.name" />
+        </p>
+      </div>
+    </div>
+  </div>
+  <div class="item">
+    <h3 class="title">{{ data.site.areas.title }}</h3>
+    <div class="content">
+      <div class="c-item">
+        <p v-for="item in data.site.areas.links">
+          {{ item }}
+          <Link :name="item" />
+        </p>
+      </div>
+    </div>
+  </div>
+  <div class="item">
+    <h3 class="title jb">
+      {{ data.site.fast.title }}
+      <Link :name="data.site.fast.link" />
+    </h3>
+    <div class="content">
+      <p class="js" v-for="item in data.site.fast.content">
+        <span>{{ item.label }}</span>
+        <span>{{ item.value }}</span>
+      </p>
+    </div>
+  </div>
+
+  <div class="item">
+    <h3 class="title">{{ data.site.range.title }}</h3>
+    <div class="content">
+      <div class="c-item">
+        <p v-for="item in data.site.range.links">
+          {{ item }}
+          <Link :name="item" />
+        </p>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script lang="ts" setup>
+import { data } from "./store";
+import Link from "./link.vue";
+</script>
+
+<style lang="scss" scoped>
+.c-item {
+  margin-top: 10px;
+
+  p {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    img {
+      height: 15px;
+      cursor: pointer;
+    }
+  }
+}
+
+.jb {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.item {
+  margin-top: 20px;
+
+  h3 {
+    font-size: 14px;
+    margin-bottom: 10px;
+  }
+
+  p {
+    font-size: 14px;
+    line-height: 1.89em;
+    color: #9e9e9e;
+  }
+}
+</style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 148 - 0
src/views/security/store.ts


+ 1 - 1
src/views/sign-model/index.vue

@@ -37,7 +37,7 @@ const loadSignModel = async () => {
     const scenes = [...SSscenes, ...YDscenes, ...DDscenes];
     scene = scenes.find((scene) => scene.num === params.m);
   } else if ("fileUrl" in params && "type" in params) {
-    const url = unescape(params.fileUrl!);
+    const url = JSON.stringify([unescape(params.fileUrl!)]);
 
     scene = {
       modelId: 0,