bill пре 1 година
родитељ
комит
9cd2c86361
3 измењених фајлова са 12 додато и 1 уклоњено
  1. 4 0
      src/app/fire/view/dispatch/index.vue
  2. 1 1
      src/view/case/caseFile.vue
  3. 7 0
      vite.config.ts

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

@@ -13,6 +13,7 @@
         </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>
@@ -132,4 +133,7 @@ const editHandler = async (row: Fire) => {
 const addHandler = async () => {
   (await addFire({})) && pagging.refresh();
 };
+const openMap = () => {
+  location.href = "./map.html";
+};
 </script>

+ 1 - 1
src/view/case/caseFile.vue

@@ -126,7 +126,7 @@ const refresh = async () => {
 watchEffect(() => caseId.value && currentTypeId.value && refresh());
 
 const query = (file: CaseFile) => {
-  const ext = file.filesUrl.substring(file.filesUrl.lastIndexOf("."));
+  const ext = file.filesUrl.substring(file.filesUrl.lastIndexOf(".")).toLocaleLowerCase();
   if (ext === ".raw") {
     window.open(`/xfile-viewer/index.html?file=${file.filesUrl}&time=` + Date.now());
   } else {

+ 7 - 0
vite.config.ts

@@ -16,6 +16,13 @@ export default defineConfig({
   },
   base: "./",
   build: {
+    rollupOptions: {
+      input: {
+        index: resolve(__dirname, "index.html"),
+        map: resolve(__dirname, "map.html"),
+        // 在这里继续添加更多页面
+      },
+    },
     outDir: `dist/${app}`,
   },
   resolve: {