فهرست منبع

Merge branch 'dev' of http://192.168.0.115:3000/bill/fuse-code into dev

xzw 1 سال پیش
والد
کامیت
f6e10889e6

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     "preview": "vite preview"
   },
   "dependencies": {
-    "@simaq/core": "1.1.7",
+    "@simaq/core": "1.1.8",
     "ant-design-vue": "^3.3.0-beta.3",
     "axios": "^0.27.2",
     "less": "^4.1.3",

+ 4 - 4
pnpm-lock.yaml

@@ -1,7 +1,7 @@
 lockfileVersion: 5.4
 
 specifiers:
-  '@simaq/core': 1.1.7
+  '@simaq/core': 1.1.8
   '@types/node': ^18.6.5
   '@vitejs/plugin-vue': ^3.0.0
   ant-design-vue: ^3.3.0-beta.3
@@ -19,7 +19,7 @@ specifiers:
   vuedraggable: ^4.1.0
 
 dependencies:
-  '@simaq/core': 1.1.7
+  '@simaq/core': 1.1.8
   ant-design-vue: 3.3.0-beta.3_vue@3.2.37
   axios: 0.27.2
   less: 4.1.3
@@ -219,8 +219,8 @@ packages:
       '@octokit/openapi-types': 14.0.0
     dev: false
 
-  /@simaq/core/1.1.7:
-    resolution: {integrity: sha512-6a9nHGsa80G7rR5XXuLRtugWS4TVTFkSfoQKJYN3THu80eKGtIJNn497oQduobLBau8vUreY3tyitSO+yFiBaQ==}
+  /@simaq/core/1.1.8:
+    resolution: {integrity: sha512-qssn0QE/qGiRpRfAOCcMracI2Y3huDOEUzoVdHUuHhHC8nK0DCk+dzyf3V8GeK7iNSHWXrRS4uuEd7mCvcNf4A==}
     dependencies:
       eventemitter3: 4.0.7
       rxjs: 7.5.7

+ 2 - 2
src/api/instance.ts

@@ -3,7 +3,7 @@ import { Message } from 'bill/index'
 import { showLoad, hideLoad } from '@/utils'
 import * as URL from './constant'
 import { ResCode, ResCodeDesc } from './constant'
-import { appType, baseURL, params } from '@/env'
+import { appBackRoot, appType, baseURL, params } from '@/env'
 
 const instance = axiosFactory()
 
@@ -25,7 +25,7 @@ export const {
 } = instance
 
 const gotoLogin = () => {
-  const loginHref = import.meta.env.DEV ? 'http://localhost:5174' : (params.app === appType.fire ? '/fire' : '/criminal')
+  const loginHref = import.meta.env.DEV ? 'http://localhost:5174' : appBackRoot[params.app]
   location.href = loginHref + '?redirect=' + escape(location.href) + '#/login'
 }
 

+ 1 - 1
src/components/tagging/sign.vue

@@ -102,7 +102,7 @@ const showContent = computed(() => {
     && (isHover.value || custom.showTaggingPositions.has(props.scenePos))
 })
 
-const taggingStyle = getTaggingStyle(props.tagging.styleId)
+const taggingStyle = computed(() => getTaggingStyle(props.tagging.styleId)) 
 
 const pullIndex = ref(-1)
 const isHover = ref(false)

+ 14 - 0
src/env/index.ts

@@ -46,8 +46,22 @@ params.share = Boolean(Number(params.share))
 params.single = Boolean(Number(params.single))
 export enum appType {
   fire = "1",
+  jmfire = "3",
   criminal = "2"
 }
+export const appStyleImport = {
+  [appType.fire]: () => import('../assets/style/fire.less'),
+  [appType.jmfire]: () => import('../assets/style/fire.less'),
+  [appType.criminal]: () => import('../assets/style/criminal.less'),
+}
+export const appBackRoot = {
+  [appType.fire]: "/fire",
+  [appType.jmfire]: "/jmfire",
+  [appType.criminal]: "/criminal"
+}
+export const routeIncludeFire = (type: appType) => 
+  [appType.fire, appType.jmfire].includes(type)
+
 export type Params = { 
   caseId: number,
   baseURL?: string,

+ 3 - 4
src/layout/show/index.vue

@@ -64,11 +64,10 @@ initialSys()
 defTitle.value = ''
 initialScenes()
 
-watchEffect(() => {
-  if (appEl.value && scenes.value.length && !fuseModels.value.length) {
-    setTimeout(() => {
+watchEffect((onCleanup) => {
+  if (loaded.value && appEl.value && scenes.value.length && !fuseModels.value.length) {
       loadModel(scenes.value[0] as any)
-    }, 100)
+      custom.showLeftPano = true
   }
 })
 </script>

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

@@ -17,7 +17,7 @@ import { views, records, floders } from '@/store';
 import { computed } from 'vue';
 
 import type { RouteRaw } from '@/router'
-import { appType, params } from '@/env';
+import { appType, params, routeIncludeFire } from '@/env';
 
 export type MenuItem = {
   name: RoutesName,
@@ -36,7 +36,7 @@ const items = computed(() => {
       ...metas[RoutesName.summaryShow]
     }
   ]
-  if (params.app === appType.fire) {
+  if (routeIncludeFire(params.app)) {
     items.unshift({
       name: RoutesName.fireInfo,
       config: getRouteConfig(RoutesName.fireInfo),

+ 2 - 6
src/main.ts

@@ -3,7 +3,7 @@ import './style.scss'
 import App from './app.vue'
 import Components from 'bill/index'
 import router from './router'
-import { appType, params } from '@/env'
+import { appStyleImport, appType, params } from '@/env'
 import { addHook, addUnsetTokenURLS, delHook, delUnsetTokenURLS } from '@/api'
 import { currentLayout, RoutesName } from './router';
 import * as URL from '@/api/constant'
@@ -14,11 +14,7 @@ app.use(Components)
 app.use(router)
 app.mount('#app')
 
-if (params.app === appType.fire) {
-  import('./assets/style/fire.less')
-} else {
-  import('./assets/style/criminal.less')
-}
+appStyleImport[params.app]()
 
 watchEffect((onCleanup) => {
   if ([RoutesName.show, RoutesName.signModel].includes(currentLayout.value!)) {

+ 4 - 2
src/model/app.vue

@@ -40,7 +40,9 @@ export const Model = defineComponent({
           const hook = (iframeRef.value?.contentWindow as any)?.beforeDestroy
           console.error("当前iframe的beforeDestroy", hook)
           if (hook) {
-            hook()
+            try {
+              hook()
+            } catch {}
             console.log("赋值1")
             setTimeout(() => url.value = newURL, 300)
           } else {
@@ -61,7 +63,7 @@ export const Model = defineComponent({
         [SceneType.SWKJ]: `/swkk/spg.html?m=${scene.value.num}`,
         [SceneType.SWSS]: `/swss/index.html?m=${scene.value.num}`,
         [SceneType.SWSSMX]: `/swkk/spg.html?m=${scene.value.num}`,
-        [SceneType.SWMX]: `index.html?caseId=${params.caseId}&modelId=${scene.value.num}&share=1#sign-model`
+        [SceneType.SWMX]: `index.html?caseId=${params.caseId}&app=${params.app}&modelId=${scene.value.num}&share=1#sign-model`
       }
       setUrl(urls[type])
     })

+ 4 - 2
src/store/sys.ts

@@ -22,12 +22,14 @@ export const isNow = computed(() => !!(mode.value & Flags.NOW))
 export const appEl = ref<HTMLDivElement | null>(null)
 export const prefix = ref('')
 
-export const defTitle = ref('多元融合')
+export const defTitle = ref('案件信息')
 export const title = computed(() => {
+  console.error(currentMeta.value)
   const last = currentMeta.value && 'sysTitle' in currentMeta.value
     ? currentMeta.value.sysTitle
-    : defTitle.value
+    : (currentMeta.value as any)?.title || defTitle.value
 
+  console.error(prefix.value)
   if (prefix.value && last) {
     return prefix.value + ' | ' + last
   } else {

+ 5 - 3
src/views/guide/sign.vue

@@ -59,11 +59,13 @@ const actions = {
       // autoDownload: false,
       // systemAudio: true,
       // debug: true,
-      resolution: '4k',
+      resolution: '1080p',
       autoDownload: false,
-      platform: 'web',
+      platform: 'canvas',
+      
       config: {
-        frameRate: 60
+        frameRate: 60,
+        canvasId: ".scene-canvas > canvas",
       },
       disbaledAudio: false,
       systemAudio: false,

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

@@ -88,7 +88,7 @@ const index = ref(0)
   }
   video,
   img {
-    object-fit: cover;
+    object-fit: contain;
   }
   iframe{
     border: none;