Explorar o código

Merge branch 'v1.9.0-jm' of http://192.168.0.115:3000/bill/fuse-code into v1.9.0-jm

xzw hai 7 meses
pai
achega
2aee9b10bf

BIN=BIN
public/images/point.png


BIN=BIN
public/images/video.png


+ 3 - 0
src/api/material.ts

@@ -17,6 +17,7 @@ type ServiceMaterialGroup = {
 type ServiceMaterial = {
   createTime: string;
   dictId: number;
+  status: number,
   dictName: string;
   fileFormat: string;
   fileName: string;
@@ -42,6 +43,7 @@ export type Material = {
   url: string;
   size: number;
   groupId: number;
+  status: number;
   group: string;
   uploadId?: number;
   modelId?: number;
@@ -68,6 +70,7 @@ export const fetchMaterialPage = async (params: MaterialPageProps) => {
       url: item.fileUrl,
       size: Number(item.fileSize),
       groupId: item.dictId,
+      status: item.status,
       group: item.dictName,
       uploadId: item.uploadId
     }))

+ 17 - 1
src/components/materials/index.vue

@@ -63,6 +63,15 @@
             <template v-if="column.key === 'size'">
               {{ getSizeStr(record.size) }}
             </template>
+            <template v-if="column.key === 'status'">
+              {{
+                record.status === 1
+                  ? "上传成功"
+                  : record.status === -1
+                  ? "上传失败"
+                  : "上传中"
+              }}
+            </template>
             <template v-if="column.key === 'group'">
               <span class="group-str">{{ record.group }}</span>
             </template>
@@ -156,7 +165,8 @@ const rowSelection: any = ref({
     return {
       disabled:
         (props.format && !props.format.includes(record.format)) ||
-        (props.maxSize && record.size > props.maxSize),
+        (props.maxSize && record.size > props.maxSize) ||
+        record.status !== 1,
     };
   },
 });
@@ -180,6 +190,12 @@ const cloumns = computed(() => [
   },
   {
     width: "100px",
+    title: "状态",
+    dataIndex: "status",
+    key: "status",
+  },
+  {
+    width: "100px",
     title: "分组",
     dataIndex: "group",
     key: "group",

+ 1 - 1
src/components/static-preview/index.vue

@@ -15,7 +15,7 @@
           <Sign :media="raw" :focus="active === raw" />
         </template>
       </ui-slide>
-      <Sign :media="items[0]" v-else />
+      <Sign :media="items[0]" focus v-else />
     </div>
   </teleport>
 </template>

+ 5 - 8
src/components/static-preview/resource.vue

@@ -31,14 +31,11 @@ import { getResource } from "@/env";
 import { computed } from "vue";
 import { getUrlType, MetaType } from "@/utils/meta";
 
-const props = withDefaults(
-  defineProps<{
-    data: string | Blob | File;
-    type?: MetaType;
-    focus?: boolean;
-  }>(),
-  { focus: true }
-);
+const props = defineProps<{
+  data: string | Blob | File;
+  type?: MetaType;
+  focus?: boolean;
+}>();
 
 const url = computed(() =>
   typeof props.data === "string"

+ 8 - 1
src/layout/edit/scene-select.vue

@@ -132,12 +132,19 @@ const types = computed(() => [
   ...new Set(origin.value.map((item) => item.type)).values(),
 ]);
 const type = ref(types.value[0]);
+const cache = {} as any
 
 const selects = ref<Key[]>(selectIds.value);
 const rowSelection: any = ref({
   selectedRowKeys: selects,
   onChange: (ids: number[]) => {
-    selects.value = Array.from(new Set(ids.concat(selectIds.value)));
+    ids = ids.filter(id => !selectIds.value.includes(id))
+    cache[type.value] = ids
+    const curIds = [...selectIds.value]
+    for (const key in cache) {
+      curIds.push(...cache[key])
+    }
+    selects.value = curIds
   },
   getCheckboxProps: (record: Scene) => ({
     disabled: selectIds.value.includes(record.modelId),

+ 10 - 12
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({
@@ -187,8 +185,8 @@ export async function exposeFactory(
       },
     },
   };
-  platforms[SceneType.DSFXJ] = platforms[SceneType.SWYDSS] = platforms[SceneType.SWSS];
-  platforms[SceneType.SWYDMX] =
+  platforms[SceneType.SWYDSS] = platforms[SceneType.SWSS];
+  platforms[SceneType.DSFXJ] = platforms[SceneType.SWYDMX] =
     platforms[SceneType.SWSSMX] =
     platforms[SceneType.SWKJ] =
       platforms[SceneType.SWKK];

+ 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;

+ 1 - 0
src/views/folder/modal-floder-view.vue

@@ -20,6 +20,7 @@
           <div class="img-item-content">
             <div>
               <Sign
+                focus
                 :media="{ url: floders[i].filesUrl }"
                 @click="clickHandler(floders[i])"
               />

+ 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>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 218 - 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,

+ 1 - 1
src/views/tagging/images.vue

@@ -15,7 +15,7 @@
           @click="inFull && $emit('pull', ndx)"
         >
           <!-- v-if="ndx === index" -->
-          <ResourceView :data="getFileUrl(raw)" class="p-item" />
+          <ResourceView :data="getFileUrl(raw)" class="p-item" :focus="ndx === index" />
           <!-- <img :src="getResource(getFileUrl(raw))" /> -->
         </div>
       </template>