bill 1 jaar geleden
bovenliggende
commit
196feccd5f

+ 15 - 0
mirror.html

@@ -0,0 +1,15 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+  <meta charset="UTF-8" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <link rel="icon" type="image/ico" href="/favicon.ico" id="app-icon" />
+</head>
+
+<body>
+  <div id="app"></div>
+  <script type="module" src="/src/app/mirror/main.ts"></script>
+</body>
+
+</html>

+ 1 - 4
src/app/fire/view/dispatch/index.vue

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

+ 5 - 0
src/app/mirror/App.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>分镜配置</div>
+</template>
+
+<script setup lang="ts"></script>

+ 14 - 0
src/app/mirror/main.ts

@@ -0,0 +1,14 @@
+import { createApp } from "vue";
+import "element-plus/dist/index.css";
+import * as ElementPlusIconsVue from "@element-plus/icons-vue";
+import App from "./App.vue";
+import ElementPlus from "element-plus";
+
+const app = createApp(App);
+
+for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
+  app.component(key, component);
+}
+
+app.use(ElementPlus);
+app.mount("#app");

+ 1 - 0
src/store/scene.ts

@@ -67,6 +67,7 @@ export interface ModelScene extends BaseScene {
   modelTitle: string;
   modelId: number;
   createStatus: ModelSceneStatus;
+  fileNewName: string;
   modelSize: string;
   modelDateType: string;
   progress?: number;

+ 5 - 0
src/view/organization/index.vue

@@ -30,6 +30,7 @@
                   class="butList oper-span"
                   v-if="!topDeptIds.includes(Number(data.id))"
                 >
+                  <a @click.stop="openMap(data)"> 大屏链接 </a>
                   <a
                     @click.stop="showOrganizationDetail({ dept: data })"
                     v-pdpath="['view']"
@@ -72,6 +73,10 @@ import { RouteName, router } from "@/router";
 import { SuccessFilled } from "@element-plus/icons-vue";
 import { topDeptIds } from "@/constant/appDeptId";
 
+const openMap = (data: Organization) => {
+  window.open(`./map.html?deptId=${data.id}`);
+};
+
 const organTrees = ref<Organization[]>([]);
 
 const addHandler = async () => {

+ 13 - 3
src/view/vrmodel/modelContent.vue

@@ -46,10 +46,17 @@
     <el-table-column label="操作" v-slot:default="{ row }" width="350px">
       <span
         class="oper-span"
+        @click="downOrigin(row)"
+        v-if="row.createStatus === ModelSceneStatus.SUCCESS && row.fileNewName"
+      >
+        下载原始资源
+      </span>
+      <span
+        class="oper-span"
         @click="downHash(row)"
         v-if="row.createStatus === ModelSceneStatus.SUCCESS"
       >
-        下载Hash
+        Hash
       </span>
       <span
         class="oper-span"
@@ -110,7 +117,6 @@ import {
   ModelMaxSize,
   ModelSceneStatusDesc,
   ModelSupportFormats,
-  SceneTypePaths,
 } from "@/constant/scene";
 import { confirm } from "@/helper/message";
 import { useUpload } from "@/hook/upload";
@@ -119,7 +125,7 @@ import { watchPolling } from "@/hook/watchPolling";
 import { OpenType, openSceneUrl } from "../case/help";
 import { operateIsPermissionByPath } from "@/directive/permission";
 import { editModelScene } from "./quisk";
-import { downModelHash } from "@/request";
+import saveAs from "@/util/file-serve";
 
 const props = defineProps<{ pagging: ScenePagging }>();
 
@@ -191,6 +197,10 @@ const refreshStatus = (models: ModelScene[]) => {
   return Promise.all(refreshStatusAll);
 };
 
+const downOrigin = async (model: ModelScene) => {
+  await saveAs(model.fileNewName, model.modelTitle + ".zip");
+};
+
 watchPolling(() => {
   const payload = (props.pagging.state.table.rows as ModelScene[]).filter(
     (item) => item.createStatus === ModelSceneStatus.RUN

+ 1 - 1
src/view/vrmodel/sceneContent.vue

@@ -35,7 +35,7 @@
         @click="downHash(row)"
         v-if="row.status === QuoteSceneStatus.SUCCESS"
       >
-        下载Hash
+        Hash
       </span>
       <span
         class="oper-span"