Bladeren bron

修改火调平台多元融合

wangfumin 3 maanden geleden
bovenliggende
commit
0d593cffc6

+ 3 - 3
src/api/floder.ts

@@ -19,13 +19,13 @@ export const fetchFloders = async () => {
   const floders = await axios.get<Floders>(FLODER_LIST, { params: { caseId: params.caseId } })
   const otherFloders = [{
     filesId: 88,
-    filesTypeId: 100,
+    filesTypeId: 3,
     filesTitle: '勘验笔录',
     ex: `${namespace}/caseInquest/info`,
     bex: `${namespace}/caseInquest/downDocx`
   }, {
     filesId: 89,
-    filesTypeId: 100,
+    filesTypeId: 4,
     filesTitle: '提取清单',
     ex: `${namespace}/caseExtractDetail/info`,
     bex: `${namespace}/caseExtractDetail/downDocx`
@@ -35,7 +35,7 @@ export const fetchFloders = async () => {
     res.data.data.forEach((item:any, ndx: any) => {
       floders.push({
         filesId: 100 + ndx,
-        filesTypeId: -1,
+        filesTypeId: 2,
         filesTitle: '照片制卷图',
         caseId: params.caseId.toString(),
         filesUrl: item.imgUrl

+ 7 - 7
src/api/folder-type.ts

@@ -15,12 +15,12 @@ export type FloderTypes = FloderType[];
 export const fetchFloderTypes = async () => {
 
   const types = await axios.get<FloderTypes>(FOLDER_TYPE_LIST);
-  types.push({
-    filesTypeId: -1,
-    filesTypeName: "照片制卷",
-    flatShow: false,
-    modalShow: false,
-    parentId: 39,
-  });
+  // types.push({
+  //   filesTypeId: -1,
+  //   filesTypeName: "照片制卷",
+  //   flatShow: false,
+  //   modalShow: false,
+  //   parentId: 39,
+  // });
   return types;
 };

+ 8 - 8
src/api/instance.ts

@@ -28,14 +28,14 @@ export const {
 
 const gotoLogin = () => {
   if (import.meta.env.DEV) {
-    GAxios.post("/service/manage/login", {
-      password: "MRinIEn3ExMjM0NTY=Q5Lm39urQWzN7k4oCG",
-      userName: "super-admin",
-      username: "super-admin",
-    }).then((res) => {
-      setToken(res.data.data.token)
-      setTimeout(() => location.reload())
-    });
+    // GAxios.post("/service/manage/login", {
+    //   password: "MRinIEn3ExMjM0NTY=Q5Lm39urQWzN7k4oCG",
+    //   userName: "super-admin",
+    //   username: "super-admin",
+    // }).then((res) => {
+    //   setToken(res.data.data.token)
+    //   setTimeout(() => location.reload())
+    // });
   } else {
     const loginHref = `/admin/#/statistics/scene`
     location.href = loginHref + '?redirect=' + escape(location.href)

+ 5 - 5
src/api/map-tile.ts

@@ -16,9 +16,9 @@ export type MapTile = {
 };
 
 export const fetchMapTiles = async () => {
-  const items = await axios.get<ServiceMapTile[]>(MAP_TILE_LIST);
-  return items.map((item) => ({
-    ...item,
-    mapUrls: JSON.parse(item.mapUrl),
-  }));
+  // const items = await axios.get<ServiceMapTile[]>(MAP_TILE_LIST);
+  // return items.map((item) => ({
+  //   ...item,
+  //   mapUrls: JSON.parse(item.mapUrl),
+  // }));
 };

+ 4 - 4
src/api/setting.ts

@@ -56,10 +56,10 @@ export const fetchSetting = async () => {
     params: { caseId: params.caseId },
   });
   const tData = toLocal(data[0] || {})
-  if (!tData.back && !tData.mapId) {
-    const tiles = await fetchMapTiles()
-    tData.mapId = tiles[0].id
-  }
+  // if (!tData.back && !tData.mapId) {
+  //   const tiles = await fetchMapTiles()
+  //   tData.mapId = tiles[0].id
+  // }
   return tData
 };
 

+ 4 - 3
src/api/sys.ts

@@ -61,10 +61,11 @@ export interface Case {
 
 export const getCaseInfo = async () => {
   const [caseInfo, fireInfo] = await Promise.all([
-    axios.get<Case>(CASE_INFO, { params: { caseId: params.caseId } }),
-    axios.get<FireProject>(CASE_FIRE_INFO, { params: { caseId: params.caseId } })
+    axios.get<any>(CASE_INFO, { params: { caseId: params.caseId } }),
+    // axios.get<FireProject>(CASE_FIRE_INFO, { params: { caseId: params.caseId } })
   ])
-  caseInfo.tmProject = fireInfo
+  // 新火调已经包含了不需要另外赋值
+  // caseInfo.tmProject = fireInfo
   return caseInfo
 }
 

+ 1 - 1
src/layout/show/slide-menu.vue

@@ -16,7 +16,7 @@
 
 <script lang="ts" setup>
 import { metas, RoutesName, router, getRouteConfig } from "@/router";
-import { views, records } from "@/store";
+import { views, records, floders } from "@/store";
 import { computed } from "vue";
 
 import type { RouteRaw } from "@/router";

+ 5 - 5
src/router/config.ts

@@ -115,11 +115,11 @@ export const routes = [
         name: RoutesName.recordShow,
         component: () => import('@/views/record/show.vue')
       },
-      // {
-      //   path: paths[RoutesName.folderShow],
-      //   name: RoutesName.folderShow,
-      //   component: () => import('@/views/folder/index.vue')
-      // },
+      {
+        path: paths[RoutesName.folderShow],
+        name: RoutesName.folderShow,
+        component: () => import('@/views/folder/index.vue')
+      },
       
     ]
   },

+ 1 - 1
src/sdk/association/setting.ts

@@ -37,7 +37,7 @@ export const associationSetting = (sdk: SDK, mountEl: HTMLDivElement) => {
       );
       return;
     } else if (!tile) {
-      tile = sysTiles.value[0]
+      tile = sysTiles.value ? sysTiles.value[0] : ''
     }
 
 

+ 4 - 1
src/store/floder-type.ts

@@ -1,5 +1,5 @@
 import { computed, ref } from "vue";
-import { fetchFloderTypes } from "@/api";
+import { fetchFloderTypes, fetchFloders } from "@/api";
 
 import type { FloderTypes, FloderType, Floder } from "@/api";
 import { getFloderByType } from "./floder";
@@ -10,7 +10,9 @@ export const getFloderType = (id: FloderType["filesTypeId"]) =>
   floderTypes.value.find((type) => type.filesTypeId === id);
 
 export const initialFloderTypes = async () => {
+  const floders = await fetchFloders();
   floderTypes.value = await fetchFloderTypes();
+  console.log(floders,floderTypes.value,898989)
 };
 
 export type FloderRoot = {
@@ -65,6 +67,7 @@ export const getLevelRoot = (floder: Floder, roots = floderRoots.value): FloderR
 }
 
 export const getFlatFloders = (root: FloderRoot, floders: FloderRoot['floders'] = []) => {
+  console.log(root, 99999)
   floders.push(...root.floders)
   if (root.children?.length) {
     root.children.forEach(child => getFlatFloders(child, floders))

+ 19 - 1
src/views/fire/index.vue

@@ -9,7 +9,7 @@
     <Info
       title="案件信息"
       :data="caseProject.tmProject"
-      :label-map="tmLabelMap1"
+      :label-map="tmLabelMap3"
       v-if="caseProject?.tmProject"
     />
     <Info
@@ -51,6 +51,24 @@ const tmLabelMap1 = {
   statusDesc: ["经纬度", (v: any) => (v ? v.split(",").reverse().join(",") : "")],
 } as LabelMap;
 
+// 火调的案件信息单独的
+ const tmLabelMap3 = {
+  projectSn: '项目编号',
+  projectAddress: '起火地址',
+  projectSite: '起火场所',
+  organizerDeptName: '承办单位',
+  projectName: '起火对象',
+  organizerUsers: '承办人员',
+  accidentDate: '事故日期',
+  fireReason: '火灾原因',
+  statusDesc: '项目状态',
+  isTeached: ["教学项目", (v: any) => (v === undefined ? "" : v ? "是" : "否")],
+  creatorName: '创建人',
+  editorName: '编辑人',
+  createTime: '创建时间',
+  updateTime: '最新编辑',
+ } as LabelMap
+
 const tmLabelMap2 = {
   creatorName: "指挥中心电话时间",
   editorName: "报警时间",

+ 1 - 1
src/views/fire/info.vue

@@ -2,7 +2,7 @@
   <div class="info" v-if="data">
     <h2>{{ title }}</h2>
     <div>
-      <p v-for="(label, key) in labelMap">
+      <p v-for="(label, key) in labelMap" :key="key">
         <span>{{ typeof label === "string" ? label : label[0] }}:</span>
         {{ typeof label === "string" ? data[key] : label[1](data[key]) }}
       </p>

+ 23 - 6
src/views/folder/fire/index.vue

@@ -8,16 +8,16 @@
   >
     <Info
       title="案件信息"
-      :data="caseProject"
-      :label-map="tmLabelMap1"
-      v-if="caseProject"
+      :data="caseProject.tmProject"
+      :label-map="tmLabelMap3"
+      v-if="caseProject?.tmProject"
     />
-    <Info
+    <!-- <Info
       title="勘验信息"
       :data="caseProject.tmProject"
       :label-map="tmLabelMap2"
       v-if="caseProject?.tmProject"
-    />
+    /> -->
   </Modal>
 </template>
 
@@ -35,7 +35,6 @@ defineProps<{ open: boolean }>();
 defineEmits<{ (e: "update:open", v: boolean): void }>();
 
 type LabelMap = Record<string, string | [string, (v: any) => any]>;
-
 const tmLabelMap1 = {
   caseTitle: "案件名称",
   caseNum: "立案编号",
@@ -54,6 +53,24 @@ const tmLabelMap1 = {
   latAndLong: ["经纬度", (v: any) => (v ? v.split(",").reverse().join(",") : "")],
 } as LabelMap;
 
+// 火调的案件信息单独的
+const tmLabelMap3 = {
+  projectSn: '项目编号',
+  projectAddress: '起火地址',
+  projectSite: '起火场所',
+  organizerDeptName: '承办单位',
+  projectName: '起火对象',
+  organizerUsers: '承办人员',
+  accidentDate: '事故日期',
+  fireReason: '火灾原因',
+  statusDesc: '项目状态',
+  isTeached: ["教学项目", (v: any) => (v === undefined ? "" : v ? "是" : "否")],
+  creatorName: '创建人',
+  editorName: '编辑人',
+  createTime: '创建时间',
+  updateTime: '最新编辑',
+ } as LabelMap
+
 const tmLabelMap2 = {
   commandTime: "指挥中心电话时间",
   alarmTime: "报警时间",

+ 1 - 1
src/views/folder/fire/info.vue

@@ -2,7 +2,7 @@
   <div class="info" v-if="data">
     <h2>{{ title }}</h2>
     <div>
-      <p v-for="(label, key) in labelMap">
+      <p v-for="(label, key) in labelMap" :key="key">
         <span>{{ typeof label === "string" ? label : label[0] }}:</span>
         {{ typeof label === "string" ? data[key] : label[1](data[key]) }}
       </p>

+ 1 - 1
src/views/folder/index.vue

@@ -32,7 +32,7 @@ import Fire from "./fire/index.vue";
 import type { Floder, FloderRoot } from "@/store";
 import { useViewStack } from "@/hook";
 import { showRightPanoStack } from "@/env";
-
+console.log(floderRoots, 88888)
 const showInfo = ref(false);
 const currentNdx = ref(-1);
 const currentItems = ref<MediaItem[]>([]);

+ 9 - 8
vite.config.ts

@@ -5,7 +5,8 @@ import mkcert from 'vite-plugin-mkcert'
 
 import { resolve } from 'path'
 
-const ip = `http://192.168.0.25`
+// const ip = `http://192.168.0.25`
+const ip = `https://test-mix3d.4dkankan.com`
 const proxy = {
   '/offlineData': {
     target: 'http://192.168.0.43:9000/',
@@ -33,19 +34,19 @@ const proxy = {
     rewrite: path => path.replace(/^\/swkk/, '')
   },
   '/oss': {
-    target: `${ip}/`,
+    target: `https://4dkk.4dage.com/`,
     changeOrigin: true,
-    rewrite: path => path.replace(/^\/oss/, '/oss')
+    rewrite: path => path.replace(/^\/oss/, '')
   },
-  '/laser': {
-    target: `${ip}/`,
+  '/laser-data': {
+    target: `https://laser-oss.4dkankan.com/`,
     changeOrigin: true,
-    rewrite: path => path.replace(/^\/laser/, '/laser')
+    rewrite: path => path.replace(/^\/laser-data/, '')
   },
-  '/laser-data': {
+  '/laser': {
     target: `${ip}/`,
     changeOrigin: true,
-    rewrite: path => path.replace(/^\/laser-data/, '/laser-data')
+    rewrite: path => path.replace(/^\/laser/, '/laser')
   },
   '/fdkk': {
     target: `${ip}/`,