1
0
Selaa lähdekoodia

本地版修改feat: 调试

tangning 5 kuukautta sitten
vanhempi
commit
97626d04de

+ 1 - 1
index.html

@@ -1,5 +1,5 @@
 <!doctype html>
-<html lang="en">
+<html lang="en" class="dark">
 
 <head>
   <meta charset="UTF-8" />

+ 3 - 1
package.json

@@ -6,13 +6,14 @@
     "dev": "vite",
     "build": "vite build ./ fire && vite build ./ criminal && vite build ./ xmfire",
     "build:prod": "vue-tsc --noEmit && npm run build-quisk",
-    "build-quisk": "vite build ./ fire && vite build ./ criminal && vite build ./ xmfire",
+    "build-quisk": "vite build ./ criminal && vite build",
     "preview": "vite preview"
   },
   "dependencies": {
     "@amap/amap-jsapi-loader": "^1.0.1",
     "@element-plus/icons-vue": "^2.1.0",
     "@types/qs": "^6.9.7",
+    "@vitejs/plugin-legacy": "^6.0.2",
     "axios": "^1.4.0",
     "echarts": "^5.4.3",
     "element-plus": "^2.3.8",
@@ -26,6 +27,7 @@
     "qs": "^6.11.2",
     "sass": "^1.64.2",
     "swiper": "^11.1.15",
+    "terser": "^5.39.0",
     "three": "^0.171.0",
     "unplugin-element-plus": "^0.7.2",
     "unplugin-vue-define-options": "^1.3.12",

+ 111 - 4
program/lang/weblate/en.json

@@ -156,7 +156,9 @@
             "install": "Status Display",
             "fuse": "Integrate",
             "irealTitle": "Small object modeling",
-            "smart3DTitle": "Drone modeling"
+            "smart3DTitle": "Drone modeling",
+            "media": "Media library",
+            "case": "Case management"
         },
         "scene": {
             "name": "Title",
@@ -265,7 +267,49 @@
         "the3PartyOpenAlready": "The program is currently open!",
         "OpenFile": {
             "directory": "Open File Directory"
-        }
+        },
+        "sceneDetail": {
+            "e57_title": "E57",
+            "obj_title": "OBJ",
+            "title": "Scene data",
+            "floorplan_title": "Floor plan",
+            "offline_title": "Offline package",
+            "migrageS_title": "Migrate scene",
+            "upload_done_time": "Upload completion time",
+            "generate": "Generate",
+            "export": "Generate",
+            "calc_done_time": "Calculation completion time",
+            "upload_time": "Calculation duration",
+            "re_generate": "Regenerate",
+            "re_calc_done_time": "Recalculation completion time",
+            "shoot_way_type_2": "slam",
+            "s_info": "Scene information",
+            "shoot_way": "Shooting mode",
+            "shoot_time": "Shooting time",
+            "shoot_device": "Shooting device",
+            "shoot_way_type_1": "TSL shooting",
+            "shoot_count": "Number of points",
+            "shootStartTime": "Start time of the shooting",
+            "buildTime": "Calculation duration",
+            "buildEndTime": "Recalculation completion time",
+            "exporting": "Importing",
+            "packing": "Packaging",
+            "calcing": "Calculating"
+        },
+        "multiLang": "Multi-language",
+        "migrateScene": {
+            "fail_import": "Import failed. Please upload the correct scene package data."
+        },
+        "case": {
+            "create": "Create case file",
+            "title": "Name",
+            "sceneName": "Scene name",
+            "num": "Scene code",
+            "sceneType": "Scene type",
+            "query": "Query",
+            "caseTitle": "Case name"
+        },
+        "calcFailureTip": "Are you sure you want to recalculate? Some actions cannot be undone. Note: Recalculating the point cloud scene will clear some data, such as merged datasets, hotspots, etc. Please proceed with caution."
     },
     "coord": {
         "edit": {
@@ -457,7 +501,7 @@
         "calc": "Calculate",
         "hide": "Hide",
         "close": "Close",
-        "ok": "Got it",
+        "ok": "I understand",
         "reset": "Reset",
         "enter": "Confirm",
         "show": "Display",
@@ -518,7 +562,7 @@
     },
     "measure": {
         "exportPDF": "Export PDF",
-        "name": "Measure",
+        "name": "Measurement",
         "unit": {
             "meter": "Metric (m)",
             "inch": "Inch (ft)"
@@ -1040,5 +1084,68 @@
         "Extractor": "Operator",
         "downloadsuccess": "%filename% was downloaded successfully.",
         "moveFail": "Failed to move the file. Please ensure there is enough storage space."
+    },
+    "sceneDetail": {
+        "title": "Scene data"
+    },
+    "sceneHome": {
+        "library": "Media Library",
+        "caseView": "Preview Case",
+        "dyrh": "Multi-integration",
+        "sceneList": "Scene List",
+        "yc": "Remove",
+        "addScene": "Add Scene",
+        "delTops": "Are you sure you want to delete?",
+        "ycTips": "Are you sure you want to remove the current scene?"
+    },
+    "mediaLibrary": {
+        "title": "Media Library",
+        "add": "Add File",
+        "photography": "Single Modeling",
+        "Modeling": "Oblique Photography",
+        "addFolder": "Create New Folder",
+        "grouping": "Grouping Management",
+        "groupingList": "Grouping List",
+        "addgrouping": "Add New Grouping",
+        "setGrouping": "Modify Grouping",
+        "upload": "Upload",
+        "addFolderName": "Please enter the folder name",
+        "addFolderErr": "The folder name cannot be empty!",
+        "addFolderPlace": "Please enter the folder name",
+        "addFile": "Upload File",
+        "addFileErr": "The file name cannot be empty!",
+        "addFilePlace": "Please enter the file name",
+        "addFileTip": "Support JPG, PNG image formats, single",
+        "fileTypeStr": "File Type",
+        "fileFormat": "File Format",
+        "dictName": "Grouping",
+        "statusStr": "Status",
+        "createTime": "Upload Time",
+        "operate": "Operation",
+        "fileType":{
+            "0":"All",
+            "1":"Picture",
+            "2":"Video",
+            "3":"Audio",
+            "4":"Model",
+            "5":"Other"
+        },
+        "tips": {
+            "dictId": "Please select a group",
+            "del": "Deleted successfully",
+            "deltext": "Are you sure you want to delete? This operation cannot be undone.",
+            "add": "Added successfully",
+            "edit": "Modified successfully",
+            "operate": "Operation successful",
+            "uplooadErr": "Upload failed",
+            "placeholderName": "Please enter a name",
+            "uplooad": "Uploading",
+            "uplooadfiletype": "Supports jpg, png, jpeg, mp4, wav, mp3, shp, zip format file uploads.",
+            "uplooadSize": "Uploaded files cannot exceed 2G!",
+            "uplooadSuccess": "Uploaded successfully",
+            "objtips": "obj: You need to use a zip package to upload. Contains textures, models, and mtl files. The package must not contain folders, and the file name must not use Chinese. As shown in the figure: ",
+            "osgbtips": "Upload osgb: You need to use a zip package to upload. Contains Data folders and xml files. The package must not contain folders, and the file name must not use Chinese. As shown in the figure: ",
+            "noName": "Please enter a name"
+        }
     }
 }

+ 10 - 3
program/lang/weblate/kr.json

@@ -143,10 +143,12 @@
         "unit": {
             "meter": "미터"
         },
-        "stop": "측정 중지"
+        "stop": "측정 중지",
+        "name": "측정하다"
     },
     "record": {
-        "all": "모든 비디오"
+        "all": "모든 비디오",
+        "start": "녹화를 시작합니다"
     },
     "resStatus": {
         "503": "업로드 중 이상이 발생했습니다",
@@ -210,6 +212,11 @@
         "setting": {
             "setName": "이름 수정",
             "public": "공개"
-        }
+        },
+        "cancel": "취소하다",
+        "ok": "알겠습니다",
+        "enter": "확정하다",
+        "edit": "편집하다",
+        "crop": "자르다"
     }
 }

+ 81 - 3
program/lang/weblate/zh.json

@@ -208,7 +208,9 @@
             "install": "状态显示",
             "fuse": "场景融合",
             "irealTitle": "小物体建模",
-            "smart3DTitle": "无人机建模"
+            "smart3DTitle": "无人机建模",
+            "case": "案件管理",
+            "media": "媒体库"
         },
         "scene": {
             "name": "名称",
@@ -341,12 +343,28 @@
             "shoot_time": "拍摄时间",
             "shootStartTime": "开始拍摄时间",
             "buildTime": "计算时长",
-            "buildEndTime": "重算完成时间"
+            "buildEndTime": "重算完成时间",
+            "packing": "打包中",
+            "calcing": "计算中",
+            "exporting": "导入中",
+            "packingFailure": "打包失败",
+            "unPacking": "未打包",
+            "unGenerate": "未生成"
         },
         "multiLang": "多语言",
         "migrateScene": {
             "fail_import": "导入失败,请上传正确的场景打包数据"
-        }
+        },
+        "case": {
+            "create": "创建案件",
+            "title": "名称",
+            "caseTitle": "案件名称",
+            "sceneType": "场景类型",
+            "query": "查询",
+            "sceneName": "场景标题",
+            "num": "场景码"
+        },
+        "calcFailureTip": "确定重算?部分此操作无法撤销。 注意:重算点云场景会清空部分数据如合并的数据集、热点等,请谨慎操作。"
     },
     "crop": {
         "title": "裁剪点云",
@@ -1072,5 +1090,65 @@
     },
     "sceneDetail": {
         "title": "场景数据"
+    },
+    "sceneHome": {
+        "library": "媒体库",
+        "caseView": "预览案件",
+        "dyrh": "多元融合",
+        "sceneList": "场景列表",
+        "yc": "移除",
+        "addScene": "添加场景",
+        "delTops": "确定删除?",
+        "ycTips": "确定要移除当前场景吗?"
+    },
+    "mediaLibrary": {
+        "title": "媒体库",
+        "add": "添加文件",
+        "photography": "单体建模",
+        "Modeling": "倾斜摄影",
+        "addFolder": "新建文件夹",
+        "grouping": "分组管理",
+        "groupingList": "分组列表",
+        "addgrouping": "新增分组",
+        "setGrouping": "修改分组",
+        "upload": "上传",
+        "addFolderName": "请输入文件夹名称",
+        "addFolderErr": "文件夹名不能为空!",
+        "addFolderPlace": "请输入文件夹名称",
+        "addFile": "上传文件",
+        "addFileErr": "文件名不能为空!",
+        "addFilePlace": "请输入文件名",
+        "addFileTip": "支持JPG、PNG图片格式,单张",
+        "fileTypeStr": "文件类型",
+        "fileFormat": "文件格式",
+        "dictName": "分组",
+        "statusStr": "状态",
+        "createTime": "上传时间",
+        "operate": "操作",
+        "fileType": {
+            "0": "全部",
+            "1": "图片",
+            "2": "视频",
+            "3": "音频",
+            "4": "模型",
+            "5": "其他"
+        },
+        "tips": {
+            "dictId": "请选择分组",
+            "del": "删除成功",
+            "deltext": "确定删除?此操作无法撤销。",
+            "add": "新增成功",
+            "edit": "修改成功",
+            "operate": "操作成功",
+            "uplooadErr": "上传失败",
+            "placeholderName": "请输入名称",
+            "uplooad": "上传中",
+            "uplooadfiletype": "支持jpg、png、jpeg、mp4、wav、mp3 、shp、zip格式文件上传。",
+            "uplooadSize": "上传文件不能超过 2G!",
+            "uplooadSuccess": "上传成功",
+            "objtips": "obj:需使用zip包上传。包含贴图、模型、mtl文件,包内不得包含文件夹,文件名不得使用中文。如图:",
+            "osgbtips": "上传 osgb:需使用zip包上传。包含 Data 文件夹、xml文件,包内不得包含文件夹,文件名不得使用中文。如图:",
+            "noName": "请输入名称"
+        }
     }
 }

+ 79 - 0
src/assets/style/custom-element.scss

@@ -0,0 +1,79 @@
+html.dark {
+  /* 自定义深色背景颜色 */
+  /* --el-bg-color: #fff; */
+  /* --el-color-primary: #fff */
+  --el-color-primary: #00C8AF;
+  --colorColor: #fff;
+  --el-bg-color: #1B1B1C;
+  --el-menu-active-color:#fff;
+  --el-border-color-light: #000;
+  --el-dialog-padding-primary: 0px;
+  --el-button-border-color: #00C8AF;
+  --el-font-size-large: 16px;
+  --bgColor: #1B1B1C;
+  .title1{
+    color: #fff;
+  }
+  .layer .content .view .main{
+    background-color: var(--bgColor);
+  }
+}
+
+.el-pagination.is-background .btn-next.is-active,
+.el-pagination.is-background .btn-prev.is-active,
+.el-pagination.is-background .el-pager li.is-active {
+  // --el-color-primary: #000
+  --el-color-white:white
+}
+.el-dialog{
+  padding: 0;
+}
+.el-dialog__header, .el-dialog__footer, .el-dialog__body, .el-message-box__header, .el-message-box__btns, .el-message-box__content{
+  padding: 20px;
+}
+.el-message-box__header{
+  padding-left: 0;
+}
+.el-dialog__body, .el-message-box__content{
+  border-top: 1px solid #474748;
+  border-bottom: 1px solid #474748;
+}
+.el-button{
+  height: 34px;
+  color: var(--el-color-primary);
+  border-color: var(--el-color-primary);
+}
+.el-button--primary{
+  color: #fff !important;
+}
+.el-dialog__footer, .el-message-box__btns {
+  text-align: center;
+  justify-content: center;
+  .el-button{
+    width: 100px;
+  }
+}
+.el-form-item__content{
+  .el-button{
+    width: 100px;
+  }
+}
+.el-message-box{
+  padding: 0;
+}
+.el-message-box__message{
+  padding: 20px 0;
+}
+.el-message-box__container{
+  justify-content: center;
+}
+.el-input__inner{
+  height: 32px;
+  line-height: 32px;
+}
+
+.el-form-item__content {
+  .el-button{
+    width: 60px !important;
+  }
+}

+ 3 - 7
src/assets/style/public.scss

@@ -32,7 +32,7 @@ body {
 
 #app {
   position  : relative;
-  min-width : 1280px;
+  min-width : 880px;
   min-height: 760px;
   height    : 100%;
   overflow  : hidden;
@@ -95,7 +95,7 @@ body {
   flex            : 1;
   overflow-y      : auto;
   margin-top      : 8px;
-  background-color: #fff;
+  background-color: var(--bgColor);
   border-radius   : 4px;
   padding         : 0 24px;
   display         : flex;
@@ -122,7 +122,7 @@ body {
     flex          : 1;
     display       : flex;
     flex-direction: column;
-    border        : 1px solid #d9d9d9;
+    border        : 1px solid #474748;
 
     .el-table__header-wrapper {
       background-color: #fafafa;
@@ -522,10 +522,6 @@ body {
   padding: 20px 0 10px;
 }
 
-.el-table th.el-table__cell {
-  background-color: #fafafa;
-}
-
 .disable {
   opacity       : 0.3 !important;
   pointer-events: none !important;

+ 1 - 1
src/components/dialog/style.scss

@@ -15,7 +15,7 @@
 .dialog {
   $padding: 16px;
   width: 680px;
-  background-color: #fff;
+  background-color: var(--bgColor);
   border-radius: 4px;
 
   .head {

+ 2 - 1
src/components/head/index.vue

@@ -62,7 +62,7 @@ const show = ref(true);
 
 <style lang="scss" scoped>
 .head-layer {
-  background-color: #fff;
+  background-color: var(--bgColor);
   border-radius: 4px;
 }
 
@@ -111,5 +111,6 @@ const show = ref(true);
 
 .head-layer .el-form-item {
   margin-bottom: 0;
+  align-items: center;
 }
 </style>

+ 14 - 3
src/i18n/index.ts

@@ -36,10 +36,21 @@ const local = {
   }),
   set: localSetFactory((lang) => lang)
 }
-
-const params = strToParams(location.search)
+const getAllParams = () => {
+  let href = window.location.href;
+  let query = href.substring(href.indexOf("?") + 1);
+  let vars = query.split("&");
+  let obj = {};
+  for (let i = 0; i < vars.length; i++) {
+    let pair = vars[i].split("=");
+    // 将参数名和参数值分别作为对象的属性名和属性值
+    obj[pair[0]] = pair[1];
+  }
+  return obj;
+};
+const params = getAllParams()
 export const lang = (params.lang || window.lang || local.get(localKey))
-console.log(lang)
+console.log('strToParams',params, lang, local.get(localKey))
 
 if (lang !== local.get(localKey)) {
   local.set(localKey, lang)

+ 111 - 4
src/i18n/weblate/en.json

@@ -156,7 +156,9 @@
             "install": "Status Display",
             "fuse": "Integrate",
             "irealTitle": "Small object modeling",
-            "smart3DTitle": "Drone modeling"
+            "smart3DTitle": "Drone modeling",
+            "media": "Media library",
+            "case": "Case management"
         },
         "scene": {
             "name": "Title",
@@ -265,7 +267,49 @@
         "the3PartyOpenAlready": "The program is currently open!",
         "OpenFile": {
             "directory": "Open File Directory"
-        }
+        },
+        "sceneDetail": {
+            "e57_title": "E57",
+            "obj_title": "OBJ",
+            "title": "Scene data",
+            "floorplan_title": "Floor plan",
+            "offline_title": "Offline package",
+            "migrageS_title": "Migrate scene",
+            "upload_done_time": "Upload completion time",
+            "generate": "Generate",
+            "export": "Generate",
+            "calc_done_time": "Calculation completion time",
+            "upload_time": "Calculation duration",
+            "re_generate": "Regenerate",
+            "re_calc_done_time": "Recalculation completion time",
+            "shoot_way_type_2": "slam",
+            "s_info": "Scene information",
+            "shoot_way": "Shooting mode",
+            "shoot_time": "Shooting time",
+            "shoot_device": "Shooting device",
+            "shoot_way_type_1": "TSL shooting",
+            "shoot_count": "Number of points",
+            "shootStartTime": "Start time of the shooting",
+            "buildTime": "Calculation duration",
+            "buildEndTime": "Recalculation completion time",
+            "exporting": "Importing",
+            "packing": "Packaging",
+            "calcing": "Calculating"
+        },
+        "multiLang": "Multi-language",
+        "migrateScene": {
+            "fail_import": "Import failed. Please upload the correct scene package data."
+        },
+        "case": {
+            "create": "Create case file",
+            "title": "Name",
+            "sceneName": "Scene name",
+            "num": "Scene code",
+            "sceneType": "Scene type",
+            "query": "Query",
+            "caseTitle": "Case name"
+        },
+        "calcFailureTip": "Are you sure you want to recalculate? Some actions cannot be undone. Note: Recalculating the point cloud scene will clear some data, such as merged datasets, hotspots, etc. Please proceed with caution."
     },
     "coord": {
         "edit": {
@@ -457,7 +501,7 @@
         "calc": "Calculate",
         "hide": "Hide",
         "close": "Close",
-        "ok": "Got it",
+        "ok": "I understand",
         "reset": "Reset",
         "enter": "Confirm",
         "show": "Display",
@@ -518,7 +562,7 @@
     },
     "measure": {
         "exportPDF": "Export PDF",
-        "name": "Measure",
+        "name": "Measurement",
         "unit": {
             "meter": "Metric (m)",
             "inch": "Inch (ft)"
@@ -1040,5 +1084,68 @@
         "Extractor": "Operator",
         "downloadsuccess": "%filename% was downloaded successfully.",
         "moveFail": "Failed to move the file. Please ensure there is enough storage space."
+    },
+    "sceneDetail": {
+        "title": "Scene data"
+    },
+    "sceneHome": {
+        "library": "Media Library",
+        "caseView": "Preview Case",
+        "dyrh": "Multi-integration",
+        "sceneList": "Scene List",
+        "yc": "Remove",
+        "addScene": "Add Scene",
+        "delTops": "Are you sure you want to delete?",
+        "ycTips": "Are you sure you want to remove the current scene?"
+    },
+    "mediaLibrary": {
+        "title": "Media Library",
+        "add": "Add File",
+        "photography": "Single Modeling",
+        "Modeling": "Oblique Photography",
+        "addFolder": "Create New Folder",
+        "grouping": "Grouping Management",
+        "groupingList": "Grouping List",
+        "addgrouping": "Add New Grouping",
+        "setGrouping": "Modify Grouping",
+        "upload": "Upload",
+        "addFolderName": "Please enter the folder name",
+        "addFolderErr": "The folder name cannot be empty!",
+        "addFolderPlace": "Please enter the folder name",
+        "addFile": "Upload File",
+        "addFileErr": "The file name cannot be empty!",
+        "addFilePlace": "Please enter the file name",
+        "addFileTip": "Support JPG, PNG image formats, single",
+        "fileTypeStr": "File Type",
+        "fileFormat": "File Format",
+        "dictName": "Grouping",
+        "statusStr": "Status",
+        "createTime": "Upload Time",
+        "operate": "Operation",
+        "fileType":{
+            "0":"All",
+            "1":"Picture",
+            "2":"Video",
+            "3":"Audio",
+            "4":"Model",
+            "5":"Other"
+        },
+        "tips": {
+            "dictId": "Please select a group",
+            "del": "Deleted successfully",
+            "deltext": "Are you sure you want to delete? This operation cannot be undone.",
+            "add": "Added successfully",
+            "edit": "Modified successfully",
+            "operate": "Operation successful",
+            "uplooadErr": "Upload failed",
+            "placeholderName": "Please enter a name",
+            "uplooad": "Uploading",
+            "uplooadfiletype": "Supports jpg, png, jpeg, mp4, wav, mp3, shp, zip format file uploads.",
+            "uplooadSize": "Uploaded files cannot exceed 2G!",
+            "uplooadSuccess": "Uploaded successfully",
+            "objtips": "obj: You need to use a zip package to upload. Contains textures, models, and mtl files. The package must not contain folders, and the file name must not use Chinese. As shown in the figure: ",
+            "osgbtips": "Upload osgb: You need to use a zip package to upload. Contains Data folders and xml files. The package must not contain folders, and the file name must not use Chinese. As shown in the figure: ",
+            "noName": "Please enter a name"
+        }
     }
 }

+ 10 - 3
src/i18n/weblate/kr.json

@@ -143,10 +143,12 @@
         "unit": {
             "meter": "미터"
         },
-        "stop": "측정 중지"
+        "stop": "측정 중지",
+        "name": "측정하다"
     },
     "record": {
-        "all": "모든 비디오"
+        "all": "모든 비디오",
+        "start": "녹화를 시작합니다"
     },
     "resStatus": {
         "503": "업로드 중 이상이 발생했습니다",
@@ -210,6 +212,11 @@
         "setting": {
             "setName": "이름 수정",
             "public": "공개"
-        }
+        },
+        "cancel": "취소하다",
+        "ok": "알겠습니다",
+        "enter": "확정하다",
+        "edit": "편집하다",
+        "crop": "자르다"
     }
 }

+ 72 - 4
src/i18n/weblate/zh.json

@@ -208,12 +208,13 @@
             "install": "状态显示",
             "fuse": "场景融合",
             "irealTitle": "小物体建模",
-            "smart3DTitle": "无人机建模"
+            "smart3DTitle": "无人机建模",
+            "case": "案件管理",
+            "media": "媒体库"
         },
         "scene": {
             "name": "名称",
             "photoTime": "拍摄时间",
-            "title": "场景标题",
             "calc": "计算场景",
             "delete": "删除场景",
             "unKeySearch": "未搜索到场景",
@@ -342,12 +343,28 @@
             "shoot_time": "拍摄时间",
             "shootStartTime": "开始拍摄时间",
             "buildTime": "计算时长",
-            "buildEndTime": "重算完成时间"
+            "buildEndTime": "重算完成时间",
+            "packing": "打包中",
+            "calcing": "计算中",
+            "exporting": "导入中",
+            "packingFailure": "打包失败",
+            "unPacking": "未打包",
+            "unGenerate": "未生成"
         },
         "multiLang": "多语言",
         "migrateScene": {
             "fail_import": "导入失败,请上传正确的场景打包数据"
-        }
+        },
+        "case": {
+            "create": "创建案件",
+            "title": "名称",
+            "caseTitle": "案件名称",
+            "sceneType": "场景类型",
+            "query": "查询",
+            "sceneName": "场景标题",
+            "num": "场景码"
+        },
+        "calcFailureTip": "确定重算?部分此操作无法撤销。 注意:重算点云场景会清空部分数据如合并的数据集、热点等,请谨慎操作。"
     },
     "crop": {
         "title": "裁剪点云",
@@ -1081,6 +1098,57 @@
         "sceneList": "场景列表",
         "yc": "移除",
         "addScene": "添加场景",
+        "delTops": "确定删除?",
         "ycTips": "确定要移除当前场景吗?"
+    },
+    "mediaLibrary": {
+        "title": "媒体库",
+        "add": "添加文件",
+        "photography": "单体建模",
+        "Modeling": "倾斜摄影",
+        "addFolder": "新建文件夹",
+        "grouping": "分组管理",
+        "groupingList": "分组列表",
+        "addgrouping": "新增分组",
+        "setGrouping": "修改分组",
+        "upload": "上传",
+        "addFolderName": "请输入文件夹名称",
+        "addFolderErr": "文件夹名不能为空!",
+        "addFolderPlace": "请输入文件夹名称",
+        "addFile": "上传文件",
+        "addFileErr": "文件名不能为空!",
+        "addFilePlace": "请输入文件名",
+        "addFileTip": "支持JPG、PNG图片格式,单张",
+        "fileTypeStr": "文件类型",
+        "fileFormat": "文件格式",
+        "dictName": "分组",
+        "statusStr": "状态",
+        "createTime": "上传时间",
+        "operate": "操作",
+        "fileType": {
+            "0": "全部",
+            "1": "图片",
+            "2": "视频",
+            "3": "音频",
+            "4": "模型",
+            "5": "其他"
+        },
+        "tips": {
+            "dictId": "请选择分组",
+            "del": "删除成功",
+            "deltext": "确定删除?此操作无法撤销。",
+            "add": "新增成功",
+            "edit": "修改成功",
+            "operate": "操作成功",
+            "uplooadErr": "上传失败",
+            "placeholderName": "请输入名称",
+            "uplooad": "上传中",
+            "uplooadfiletype": "支持jpg、png、jpeg、mp4、wav、mp3 、shp、zip格式文件上传。",
+            "uplooadSize": "上传文件不能超过 2G!",
+            "uplooadSuccess": "上传成功",
+            "objtips": "obj:需使用zip包上传。包含贴图、模型、mtl文件,包内不得包含文件夹,文件名不得使用中文。如图:",
+            "osgbtips": "上传 osgb:需使用zip包上传。包含 Data 文件夹、xml文件,包内不得包含文件夹,文件名不得使用中文。如图:",
+            "noName": "请输入名称"
+        }
     }
 }

+ 8 - 5
src/main.ts

@@ -12,6 +12,9 @@ import 'virtual:windi.css'
 import "@/store/system";
 import { setupI18n } from "@/i18n/index";
 import '@/assets/font/iconfont.css'
+import 'element-plus/theme-chalk/dark/css-vars.css'
+import "@/assets/style/custom-element.scss";
+
 const app = createApp(App);
 
 for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
@@ -24,8 +27,8 @@ setupI18n(app)
 setApp(app);
 app.mount("#app");
 
-const $ico = document.createElement("link");
-$ico.setAttribute("rel", "icon");
-$ico.setAttribute("type", "image/svg+xml");
-$ico.setAttribute("href", appConstant.ico);
-document.head.appendChild($ico);
+// const $ico = document.createElement("link");
+// $ico.setAttribute("rel", "icon");
+// $ico.setAttribute("type", "image/svg+xml");
+// $ico.setAttribute("href", appConstant.ico);
+// document.head.appendChild($ico);

+ 7 - 1
src/request/config.ts

@@ -1,3 +1,4 @@
+import { getUrlData } from "@/store/user";
 import {
   exampleList,
   ffmpegMergeImage,
@@ -65,6 +66,11 @@ export const PostUrls = [
 export const unAuthCode = [3004, 4008];
 export const successCode = [0, "000000", 200];
 // baseURL
-export const baseURL = import.meta.env.DEV ? "/api" : "";
+export const baseURL =  import.meta.env.DEV ? "/api" : getHost();
 
 export const notOpenUrls: string[] = [uploadModel, getDownloadProcess];
+
+function getHost () {
+  let urlData = getUrlData()
+  return urlData.appServer || "http://192.168.0.62:8808"
+}

+ 25 - 25
src/request/index.ts

@@ -94,31 +94,31 @@ axios.interceptors.request.use(async (config) => {
 
 const responseInterceptor = (res: AxiosResponse<any, any>) => {
   closeLoading();
-  if (res.data.code === 4010){
-    ElMessageBox.alert("您没有访问权限", "提示", {
-      confirmButtonText: "我知道了",
-      type: "warning",
-      showClose: false
-    }).then(async () => {
-      window.open(window.location.origin + "/admin/#/statistics/scene");
-    });
-  };
-  console.log("responseInterceptor", res);
-  if (!successCode.includes(res.data.code) && res.config.responseType != "blob") {
-    let errMsg = res.data.msg || res.data.message;
-    openErrorMsg(errMsg);
-
-    if (
-      ~unAuthCode.indexOf(res.data.code) ||
-      errMsg === "token已经失效,请重新登录"
-    ) {
-      let redirect = encodeURIComponent(`${window.location.href}`);
-      window.location.href = window.location.origin + "/admin/#/login?redirect=" + redirect;
-      // router.replace({ name: RouteName.login });
-      getAuth().clear();
-    }
-    throw res.data.msg;
-  }
+  // if (res.data.code === 4010){
+  //   ElMessageBox.alert("您没有访问权限", "提示", {
+  //     confirmButtonText: "我知道了",
+  //     type: "warning",
+  //     showClose: false
+  //   }).then(async () => {
+  //     window.open(window.location.origin + "/admin/#/statistics/scene");
+  //   });
+  // };
+  // console.log("responseInterceptor", res);
+  // if (!successCode.includes(res.data.code) && res.config.responseType != "blob") {
+  //   let errMsg = res.data.msg || res.data.message;
+  //   openErrorMsg(errMsg);
+
+  //   if (
+  //     ~unAuthCode.indexOf(res.data.code) ||
+  //     errMsg === "token已经失效,请重新登录"
+  //   ) {
+  //     let redirect = encodeURIComponent(`${window.location.href}`);
+  //     window.location.href = window.location.origin + "/admin/#/login?redirect=" + redirect;
+  //     // router.replace({ name: RouteName.login });
+  //     getAuth().clear();
+  //   }
+  //   throw res.data.msg;
+  // }
 
   return res.data;
 };

+ 1 - 1
src/router/config.ts

@@ -34,7 +34,7 @@ export const system: Routes = [
   },
   {
     name: 'mediaLibrary',
-    path: "/mediaLibrary/:caseId",
+    path: "/mediaLibrary",
     component: () => import("@/view/mediaLibrary/index.vue"),
     meta: { title: "媒体库" },
   },

+ 1 - 1
src/router/index.ts

@@ -11,7 +11,7 @@ export const router = createRouter({
 
 router.beforeEach((to, from, next) => {
   if (!to.name || to.name === RouteName.viewLayout) {
-    router.replace({ name: RouteName.scene, params: { caseId: 360 } });
+    router.replace({ name: RouteName.scene, params: { caseId: 609 } });
     return;
   }
   next();

+ 37 - 14
src/store/case.ts

@@ -49,6 +49,7 @@ import { router } from "@/router";
 import { ModelScene, QuoteScene, Scene, SceneType } from "./scene";
 import { CaseFile } from "./caseFile";
 import { ref } from "vue";
+import { getUrlData } from "@/store/user";
 
 export type Case = {
   caseId: number;
@@ -133,7 +134,7 @@ export const updateCaseInfo = async (caseFile: CaseFile) =>
 
 export const getCaseSceneList = async (caseId: number): Promise<Scene[]> => {
   let mylist = (await axios.get(caseSceneList, { params: { caseId } })).data;
-  sceneList.value = mylist.filter(item => item.type != 3);
+  sceneList.value = mylist && mylist.filter(item => item.type != 3);
   return sceneList.value;
 };
 
@@ -300,7 +301,7 @@ export const submitMergePhotos = (data) => axios.post(ffmpegMergeImage, { ...dat
 
 export const getCaseInfoData = () => caseInfoData.value
 export const getCaseSceneListData = (caseId) => {
-  if(sceneList.value.length == 0 && !isloadList) return getCaseSceneList(caseId).then(res => {
+  if(sceneList.value && sceneList.value.length == 0 && !isloadList) return getCaseSceneList(caseId).then(res => {
     isloadList = true
     sceneList.value = res
     return sceneList.value
@@ -313,7 +314,7 @@ export const getSceneListTree = (list = sceneList.value) => {
     0: [],//点云
     1: [],//mesh
   };
-  list.map((item) => {
+  list && list.map((item) => {
     if(item.type == 2 || item.type == 5 ) {
       myData[0].push(item.num)
     }else{
@@ -324,18 +325,40 @@ export const getSceneListTree = (list = sceneList.value) => {
 }
 
 export const getUrlSrc = (item, caseId) => {
+  let param = {
+    root:'',
+    ossRoot:'',
+    serviceUrl:'',
+    laserRoot:'',
+    swssUrl:'',
+    swkkUrl:'',
+    swssmxUrl: '',
+    fuse: '',
+  }
+  let params = getUrlData();
+  let langKey = params.lang || "zh";
+  const ip = params.ip ? params.ip + ":" : "";
+  param.root = `${ip}${params.laserServicePort}`;
+  param.ossRoot = `${ip}${params.laserServicePort}${params.static}`;
+  param.serviceUrl = `${ip}${params.servicePort}/fusion`;
+  param.laserRoot = param.root;
+
+  param.swssUrl = `${params.swssUrl}?lang=${langKey}&serve_link=${param.laserRoot}&basePath=${param.laserRoot}&m=${item.num}`;
+  param.swssmxUrl = `${params.swssUrl}?lang=${langKey}&serve_link=${param.laserRoot}&basePath=${param.laserRoot}&m=${item.num}`;
+  param.swkkUrl = `${params.swkkUrl}?lang=${langKey}&app_server=${ip}${params.swkkPort}&m=${item.num}`;
+  param.fuse = `${params.fuse}?caseId=${caseId}&single&ip=${ip}&swkkPort=${params.swkkPort}&swssUrl=${params.swssUrl}&swkkUrl=${params.swkkUrl}&laserServicePort=${params.laserServicePort}&servicePort=${params.servicePort}&lang=${langKey}&app_server=${ip}${params.swkkPort}&testMap&static=&m=${item.num}`;
   let SceneType = {
-    0: `/spg.html?m=${item.num}`,
-    1: `/spg.html?m=${item.num}`,
-    2: `/mega/index.html?m=${item.num}`,
-    3: `/swss/index.html?m=${item.num}`,
-    4: `/spg.html?m=${item.num}`,
-    // 5: `/spg.html?m=${item.num}`,
-    // 5: `index.html?caseId=${caseId}&modelId=${item.num}#sign-model`,
-    5: `/mega/index.html?m=${item.num}`,
-    6: `/spg.html?m=${item.num}`,
-    7: `/spg.html?m=${item.num}`,
-    99: `/code/index.html?caseId=${caseId}&single#/show`,
+    0: params.swkkUrl,//`/spg.html?m=${item.num}`,
+    1: params.swkkUrl,//`/spg.html?m=${item.num}`,
+    2: param.swssmxUrl,//`/mega/index.html?m=${item.num}`,
+    3: params.swkkUrl,//`/swss/index.html?m=${item.num}`,
+    4: params.swkkUrl,//`/spg.html?m=${item.num}`,
+    5: param.swssmxUrl,//`/mega/index.html?m=${item.num}`,
+    6: params.swkkUrl,//`/spg.html?m=${item.num}`,
+    7: params.swkkUrl,//`/spg.html?m=${item.num}`,
+    99: param.fuse + '#/show/summary',//多元融合查看页面`/code/index.html?caseId=${caseId}&single#/show`,
+    100: param.fuse + '#/fuseEdit/merge',//多元融合编辑页面`/code/index.html?caseId=${caseId}&single#/show`,
+    101: param.fuse + '#/sign-model',//多元融合模型查看页面`/code/index.html?caseId=${caseId}&single#/show`,
   };
   return SceneType[item.type];
 }

+ 63 - 13
src/store/user.ts

@@ -10,7 +10,6 @@ import {
   getUserList,
   getUserListSelect,
   sendUserMsg,
-  setAuthHook,
   updatePsw,
   userAdd,
   userEdit,
@@ -38,6 +37,22 @@ export type UserInfo = {
   password: string;
   userName: string;
 };
+export type urlData = {
+  ga?: string;
+  lang: string;
+  appServer?: string;
+  photography: string;
+  modeling: string;
+  ip?: string;
+  laserServicePort?: string;
+  servicePort?: string;
+  swssUrl?: string;
+  fuse?: string;
+  swkkUrl?: string;
+  swkkPort?: string;
+  static?: string;
+  testMap?: string;
+};
 
 type Params = Pick<UserInfo, "nickName" | "status" | "userName"> & {
   deptId: string;
@@ -54,12 +69,47 @@ export const user = ref({
   info: getLocal("info", {} as UserInfo),
 });
 
+export const urlData = ref<urlData>({
+  ga: "0",
+  lang: "zh",
+  photography: '0',
+  modeling: '0',
+  appServer: localStorage.getItem('appServer')||'http://192.168.0.62:8808',
+  ip: 'http://localhost',
+  laserServicePort: '9095',
+  servicePort: '9250',
+  swssUrl: '',
+  fuse: 'file%3A%2F%2F%2FD%3A%2F4DMega%2Fbin%2Fresources%2Fstatic%2Flib%2Ffuse%2Findex.html',
+  swkkUrl: './index.html',
+  swkkPort: '9150',
+  // static: '',
+  testMap: '',
+});
+
 export const logout = async () => {
   await axios.post(userLogout);
   user.value.token = "";
   user.value.info = {} as any;
 };
 
+export const getUrlData = () => {
+  return urlData.value
+};
+
+export const setUrlData = async (objData = {}) => {
+  if(objData.appServer && objData.appServer != urlData.value.appServer){
+    localStorage.setItem('appServer', objData.appServer);
+    !import.meta.env.DEV && window.location.reload();
+  }
+  for (const key in objData) {
+      if (objData.hasOwnProperty(key)) {
+        urlData.value[key] = objData[key]
+      }
+  }
+  console.log(objData, urlData.value, 'getAllParams');
+  return urlData
+};
+
 type UpdataPassowrdParams = {
   userName: string;
   code: string;
@@ -140,15 +190,15 @@ changSaveLocal(`token`, () => user.value.token);
 changSaveLocal("info", () => user.value.info);
 
 // 设置全局请求hook
-setAuthHook(() => {
-  return {
-    token: user.value.token,
-    userId: user.value.info.id,
-    clear: () => {
-      user.value = {
-        token: "",
-        info: {} as UserInfo,
-      };
-    },
-  };
-});
+// setAuthHook(() => {
+//   return {
+//     token: user.value.token,
+//     userId: user.value.info.id,
+//     clear: () => {
+//       user.value = {
+//         token: "",
+//         info: {} as UserInfo,
+//       };
+//     },
+//   };
+// });

+ 15 - 0
src/util/index.ts

@@ -371,3 +371,18 @@ export const getDomMatrix = (dom: HTMLElement) => {
     1,
   ];
 };
+export const windowOpen = (param) => {
+  if(param.url) {
+    // iframe发送消息到 父页面
+    let data = JSON.stringify({type:"link", data:param.url});
+      window.parent.postMessage(data, '*');
+  } else if(param.type) {//按钮事件
+    // iframe发送消息到 父页面
+    let data = JSON.stringify({type: param.type, data: ''});
+    console.log('windowOpen', data)
+    window.parent.postMessage(data, '*');
+  }else {
+    let data = JSON.stringify({type:"link", data:param.url || param});
+    window.parent.postMessage(data, '*');
+  }
+};

+ 2 - 0
src/view/case/photos/index.vue

@@ -196,6 +196,8 @@ const changeList = async (list) => {
 const renderCanvas = () => {
   const canvas = document.getElementById("canvas");
 
+  if (!canvas) return;
+
   scene = new Scene(canvas);
   scene.init();
   window.scene = scene;

+ 16 - 7
src/view/layout/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="layer">
-    <ly-top class="top" v-if="router.currentRoute.value.name != 'mediaLibrary'" />
+    <ly-top class="top" v-if="router?.currentRoute?.value?.name != 'mediaLibrary'" />
     <div class="content">
       <router-view v-slot="{ Component }" v-if="isSystem">
         <component :is="Component" />
@@ -20,7 +20,7 @@
             >
               <iframe
                 v-if="caseId"
-              :key="qpisceneList.length"
+              :key="qpisceneList &&qpisceneList.length"
                 :src="sceneURL"
                 frameborder="0"
                 :style="{ width: '100%', height: '100%' }"
@@ -44,10 +44,12 @@ import lySlide from "./slide/index.vue";
 import { routeIsSystem, router } from "@/router";
 import { computed, ref, onMounted, watch } from "vue";
 import { menuRouteNames } from "@/app";
+import { setUrlData } from "@/store/user";
+import { useRouter, useRoute } from "vue-router";
 import { updateByTreeFileLists, getCaseSceneListData, getUrlSrc, getcaseLists, getCaseSceneList  } from "@/store/case";
 import { json } from "stream/consumers";
-console.log(menuRouteNames, 'menuRouteNames', router.currentRoute.value.name);
 const isSystem = computed(() => routeIsSystem());
+const router = useRouter();
 const caseId = computed(() => {
   const caseId = router.currentRoute.value.params.caseId;
   if (caseId) {
@@ -67,13 +69,20 @@ const getAllParams = () => {
   return obj;
 };
 let querys = getAllParams() || {};
-console.log(querys, 'getAllParams');
-if(querys.lang){
-
+setUrlData(querys)
+if(querys.ga == '1'){
+  router.replace('/home/'+caseId.value as number)
+}
+if(querys.path){
+  router.replace(querys.path)
+}
+if(querys.appServer){
+  router.replace(querys.path)
 }
 // const qpisceneList = ref(getCaseSceneListData() as any[]);
+console.log('caseIdgetUrlSrc', getUrlSrc({ type: 99 }, querys.caseId || caseId.value));
 const sceneList = ref([]);
-const sceneURL = ref(`/code/index.html?caseId=${caseId.value}#/show`)
+const sceneURL = ref( getUrlSrc({ type: 99 }, querys.caseId || caseId.value) || `/code/index.html?caseId=${caseId.value}#/show`)
 const sceneListName = ref('')
 const modeList = ref([])
 const init = async () => {

+ 5 - 3
src/view/layout/top/index.vue

@@ -33,13 +33,14 @@
 import { openErrorMsg } from "@/request";
 import { user, logout as logoutRaw } from "@/store/user";
 import defAvatar from "@/assets/image/top_my.png";
-import { getCaseInfo, getCaseInfoData } from "@/store/case";
+import { getCaseInfo, getCaseInfoData, getUrlSrc } from "@/store/case";
 import { refreshRole, roleId } from "@/store/role";
 import { RouteName, router } from "@/router";
 import { confirm } from "@/helper/message";
 import { updatePwd } from "@/view/system/quisk";
 import { computed, ref, watch } from "vue";
 import { addCaseScenes } from "@/view/originalPhoto/quisk";
+import { windowOpen } from "@/util";
 
 refreshRole();
 const caseId = computed(() => {
@@ -68,10 +69,11 @@ const loginoutRaw = async () => {
   router.replace({ name: RouteName.login });
 };
 const handlemtk = () => {
-  window.open("/admin/index.html#/mediaLibrary/index");
+  windowOpen("file:///D:/4DMega/bin/resources/static/lib/criminal/index.html#/mediaLibrary");
 };
 const handleSee = () => {
-  window.open(`/code/index.html?caseId=${caseId.value}#/show`);
+  let url = getUrlSrc({type: 99}, caseId.value)
+  windowOpen(url);
 };
 const logout = async () => {
   if (await confirm("确定要退出登录吗?")) {

+ 89 - 74
src/view/mediaLibrary/TableComponent.vue

@@ -7,7 +7,9 @@
           v-model="searchForm.name"
           @blur="submitClick"
           @keydown.enter="submitClick"
-          placeholder="请输入搜索内容"
+          :placeholder="$t('mediaLibrary.addFilePlace')"
+
+          size="default"
           :prefix-icon="Search"
         ></el-input>
       </el-form-item>
@@ -16,17 +18,15 @@
           style="width: 120px"
           v-model="searchForm.fileType"
           @change="submitClick"
-          size="large"
-          placeholder="全部"
+          :placeholder="$t('mediaLibrary.fileType.0')"
         >
           <el-option
             v-for="(item, index) in [
-              '全部',
-              '图片',
-              '视频',
-              '音频',
-              '模型',
-              '其他',
+              $t('mediaLibrary.fileType.0'),
+              $t('mediaLibrary.fileType.2'),
+              $t('mediaLibrary.fileType.3'),
+              $t('mediaLibrary.fileType.4'),
+              $t('mediaLibrary.fileType.5'),
             ]"
             :key="index"
             :label="item"
@@ -39,8 +39,7 @@
           v-model="searchForm.dictId"
           style="width: 120px"
           @change="submitClick"
-          size="large"
-          placeholder="全部"
+          :placeholder="$t('mediaLibrary.fileType.0')"
         >
           <el-option
             v-for="(item, index) in [...allList,...dictIdList]"
@@ -51,8 +50,10 @@
         </el-select>
       </el-form-item>
       <el-form-item style="float: right; margin-right: 0">
-        <el-button type="primary" @click="handleAddfz">分组管理</el-button>
-        <el-button type="primary" @click="handleAdd">上传</el-button>
+        <el-button  @click="windowOpen({type: 'photography'})">{{$t('mediaLibrary.photography')}}</el-button>
+        <el-button  @click="windowOpen({type: 'modeling'})">{{$t('mediaLibrary.Modeling')}}</el-button>
+        <el-button type="primary" @click="handleAddfz">{{$t('mediaLibrary.grouping')}}</el-button>
+        <el-button type="primary" @click="handleAdd">{{$t('mediaLibrary.upload')}}</el-button>
       </el-form-item>
     </el-form>
     <!-- 表格 -->
@@ -64,10 +65,10 @@
       style="width: 100%"
       :row-class-name="tableRowClassName"
     >
-      <el-table-column prop="name" label="名称">
+      <el-table-column prop="name" :label="$t('program.case.title')" min-width="300px">
         <template #default="scope">
           <a
-            style="color: #0960bd; cursor: pointer"
+            style="color: var(--primaryColor)"
             v-if="scope.row.fileUrl"
             target="_blank"
             :title="scope.row.name"
@@ -83,19 +84,23 @@
         :prop="column.prop"
         show-overflow-tooltip
         align="center"
+        :min-width="column.width"
         :label="column.label"
       ></el-table-column>
-      <el-table-column align="center" label="操作" width="150">
+      <el-table-column align="center" :label="$t('mediaLibrary.operate')" width="150">
         <template #default="{ row }">
-          <el-button link type="primary" size="small" @click="handleEdit(row)">
+          <!-- <el-button type="primary" text style="color: var(--primaryColor)" size="small" @click="handleEdit(row)">
             编辑
-          </el-button>
+          </el-button> -->
+          <span class="oper-span" style="color: var(--primaryColor)" @click="handleEdit(row)">
+            {{$t('sys.edit')}}
+          </span>
           <span
             class="oper-span"
             @click="del(row)"
             style="color: var(--primaryColor)"
           >
-            删除
+          {{$t('sys.delete')}}
           </span>
         </template>
       </el-table-column>
@@ -113,10 +118,10 @@
     >
     </el-pagination>
     <!-- 弹窗 -->
-    <el-dialog v-model="dialogData.show" :title="dialogData.title" width="500">
-      <el-form :model="form" label-width="110">
+    <el-dialog v-model="dialogData.show" :title="dialogData.title" width="400">
+      <el-form label-position="top" :model="form" label-width="110">
         <el-form-item
-          v-if="dialogData.title == '上传'"
+          v-if="dialogData.title == $t('sys.upload')"
           label="文件"
           :label-width="formLabelWidth"
         >
@@ -134,15 +139,15 @@
             :before-remove="removeFile"
           >
             <el-button type="primary">
-              上传
+              {{$t('sys.upload')}}
             </el-button>
           </el-upload>
         </el-form-item>
         <el-form-item
-          :label="dialogData.title == '上传' ? '分组' : '修改分组'"
+          :label="dialogData.title == $t('sys.upload') ? $t('mediaLibrary.dictName') : $t('mediaLibrary.setGrouping')"
           :label-width="formLabelWidth"
         >
-          <el-select style="width: 180px" v-model="addForm.dictId" placeholder="请选择分组">
+          <el-select style="width: 100%" v-model="addForm.dictId" :placeholder="$t('mediaLibrary.tips.dictId')">
             <el-option
               v-for="(item, index) in dictIdList"
               :key="index"
@@ -151,22 +156,20 @@
             />
           </el-select>
         </el-form-item>
-        <div style="padding: 0 0 0 40px" v-if="dialogData.title == '上传'">
+        <div v-if="dialogData.title == $t('sys.upload')">
           <div style="margin-bottom: 10px">
-            支持jpg、png、jpeg、mp4、wav、mp3 、shp格式文件上传。文件大小 ≤ 2G
+            {{$t('mediaLibrary.tips.uplooadfiletype')}}{{$t('mediaLibrary.tips.uplooadSize')}}
           </div>
           <!-- <span>注意:模型需使用zip包上传。包含贴图、模型、mtl文件,包内不得包含文件夹。</span> -->
           <div style="margin-bottom: 10px">
             <div>
-              上传
-              obj:需使用zip包上传。包含贴图、模型、mtl文件,包内不得包含文件夹,文件名不得使用中文。如图:
+              {{$t('mediaLibrary.tips.objtips')}}
             </div>
             <img style="width: 150px" :src="obj" alt="" />
           </div>
           <div style="margin-bottom: 10px">
             <div>
-              上传 osgb:需使用zip包上传。包含 Data 文件夹、xml
-              文件,包内不得包含文件夹,文件名不得使用中文。如图:
+              {{$t('mediaLibrary.tips.osgbtips')}}
             </div>
             <img style="width: 150px" :src="osgb" alt="" />
           </div>
@@ -174,35 +177,35 @@
       </el-form>
       <template #footer>
         <div class="dialog-footer">
-          <el-button @click="dialogData.show = false">取消</el-button>
+          <el-button @click="dialogData.show = false">{{$t('sys.cancel')}}</el-button>
           <el-button type="primary" @click="handleuploadAdd">
-            确定
+            {{$t('sys.enter')}}
           </el-button>
         </div>
       </template>
     </el-dialog>
     <!-- 修改分组 -->
-    <el-dialog v-model="dialogData.fzshow" title="分组管理" width="500">
-    <el-form :model="form" label-width="50">
-      <el-form-item label="分组" :label-width="formLabelWidth">
-        <el-input v-model="dialogData.fzName" maxLength="100" style="width: 300px;" />
-        <el-button style="margin-left: 20px" @click="handlefzAdd" type="primary">新增</el-button>
+    <el-dialog v-model="dialogData.fzshow" :title="$t('mediaLibrary.grouping')" width="400">
+    <el-form  label-position="top" :model="form" label-width="50">
+      <el-form-item :label="$t('mediaLibrary.addgrouping')" :label-width="formLabelWidth">
+        <el-input v-model="dialogData.fzName" maxLength="100" style="width: 278px;" />
+        <el-button style="margin-left: 20px;width: 60px" @click="handlefzAdd">{{$t('common.add')}}</el-button>
       </el-form-item>
       <div class="itemTitle">
-        <p>分组列表</p>
+        <p>{{$t('mediaLibrary.groupingList')}}</p>
         <div class="itemTitleList">
           <div class="itemTitle-list" v-for="(item, index) in dictIdList" :key="index">
             <span class="name">{{ item.dictName }}</span>
-            <span class="del" @click="hanleFzDle(item)">删除</span>
+            <span class="del" @click="hanleFzDle(item)">{{$t('sys.delete')}}</span>
           </div>
         </div>
       </div>
     </el-form>
     <template #footer>
       <div class="dialog-footer">
-          <el-button @click="dialogData.fzshow = false">取消</el-button>
+          <el-button @click="dialogData.fzshow = false">{{$t('sys.cancel')}}</el-button>
           <el-button type="primary" @click="dialogData.fzshow = false">
-            确定
+            {{$t('sys.enter')}}
           </el-button>
       </div>
     </template>
@@ -218,6 +221,9 @@ import dayjs from "dayjs";
 import obj from "@/assets/images/obj.jpg";
 import osgb from "@/assets/images/osgb.jpg";
 import { ElMessage, ElMessageBox } from "element-plus";
+import { ui18n } from '@/i18n'
+import { windowOpen } from "@/util";
+import { getUrlData } from "@/store/user";
 
 // 定义 props
 const props = defineProps({
@@ -247,7 +253,7 @@ const addForm = ref({
 });
 const dialogData = ref({
   show: false,
-  title: "上传",
+  title: ui18n.t('sys.upload'),
   data: {},
   fzshow: false,
   fzName: '',
@@ -256,30 +262,32 @@ const dialogData = ref({
 const file = ref(null);
 const accept = ".jpg,.png,.jpeg,.mp4,.wav,.mp3,.shp";
 const hanleFzDle = (item) => {
-  ElMessageBox.confirm("确定删除?", "提示", {
-    confirmButtonText: "确定",
-    cancelButtonText: "取消",
-    type: "warning",
+  ElMessageBox.confirm(ui18n.t('mediaLibrary.tips.deltext'), ui18n.t('sys.dialogTitle'), {
+    confirmButtonText: ui18n.t('sys.enter'),
+    cancelButtonText: ui18n.t('sys.cancel'),
   }).then(async () => {
     await getfzdel(item);
     dictIdList.value = dictIdList.value.filter(item1 => item1.id !== item.id)
     ElMessage({
       type: "success",
-      message: "删除成功",
+      message: ui18n.t('mediaLibrary.tips.del'),
     });
   });
   
 
   console.log("upload", file);
 };
+const { photography, modeling } = getUrlData()
 const previewFile = (file) => {
   console.log("previewFile", file);
 };
 const handleEdit = (data) => {
   addForm.value.dictId = data.dictId;
+  console.log("data", data, addForm.value);
+
   dialogData.value = {
     show: true,
-    title: "修改分组",
+    title: ui18n.t('mediaLibrary.setGrouping'),
     data,
   };
 };
@@ -293,7 +301,7 @@ const handleAdd = () => {
   fileList.value = [];
   dialogData.value = {
     show: true,
-    title: "上传",
+    title: ui18n.t('sys.upload')
   };
 };
 const handlefzAdd = async () => {
@@ -301,12 +309,12 @@ const handlefzAdd = async () => {
     dictName: dialogData.value.fzName,
   };
   if (!params.dictName) {
-    return ElMessage.error('请输入名称');
+    return ElMessage.error(ui18n.t('mediaLibrary.tips.placeholderName'));
   }
   await getaddOrUpdate(params);
   ElMessage({
     type: "success",
-    message: "新增成功",
+    message: ui18n.t('mediaLibrary.tips.placeholderName'),
   });
   getFzlist();
   dialogData.value.fzName = '';
@@ -317,7 +325,7 @@ const handleAddfz = () => {
 
 const handleuploadAdd = async () => {
   console.log('formData', dialogData.value.title);
-  if (dialogData.value.title != '上传'){
+  if (dialogData.value.title != ui18n.t('sys.upload')){
     await setFileaddOrUpdate({
       id: dialogData.value.data?.id,
       dictId: addForm.value.dictId,
@@ -327,11 +335,11 @@ const handleuploadAdd = async () => {
     dialogData.value.title = ''
     ElMessage({
       type: "success",
-      message: "操作成功",
+      message: ui18n.t('mediaLibrary.tips.operate'),
     });
   } else {
     const formData = new FormData();
-    formData.append("file", URL.createObjectURL(fileList.value && fileList.value[0]));
+    formData.append("file", fileList.value && fileList.value[0]);
     formData.append("dictId", addForm.value.dictId);
     uploadFile(formData).then((res) => {
     console.log(res);
@@ -340,7 +348,7 @@ const handleuploadAdd = async () => {
       dialogData.value.show = false;
       ElMessage({
         type: "success",
-        message: "上传成功",
+        message: ui18n.t('mediaLibrary.tips.uplooadSuccess'),
       });
     }
   });
@@ -350,20 +358,19 @@ const handleuploadAdd = async () => {
 // 定义方法
 const del = (row) => {
   console.log(file, "file");
-  ElMessageBox.confirm("确定删除?", "提示", {
-    confirmButtonText: "确定",
-    cancelButtonText: "取消",
-    type: "warning",
+  ElMessageBox.confirm(ui18n.t('mediaLibrary.tips.deltext'), ui18n.t('sys.dialogTitle'), {
+    confirmButtonText: ui18n.t('sys.enter'),
+    cancelButtonText: ui18n.t('sys.cancel'),
   }).then(async () => {
     await getdictFiledel({id: row.id});
     initData();
     ElMessage({
       type: "success",
-      message: "删除成功",
+      message: ui18n.t('mediaLibrary.tips.del'),
     });
   });
 };
-const allList = ref([{ dictName: "全部", id: "0" }])
+const allList = ref([{ dictName: ui18n.t('mediaLibrary.fileType.0'), id: "0" }])
 const dictIdList = ref([]);
 const tableData = ref([]);
 const fileList = ref([]);
@@ -371,7 +378,7 @@ const currentPage = ref(1);
 const pageSize = ref(10);
 const total = ref(0);
 onMounted(() => {
-  document.body.classList.toggle("dark-mode");
+  // document.body.classList.toggle("dark-mode");
 });
 const getFzlist = () => {
   getByKeyList({}).then((res) => {
@@ -408,7 +415,7 @@ const initData = async () => {
     return {
       ...res,
       statusStr:
-        res.status == -1 ? "上传失败" : res.status == 0 ? "上传中" : "上传成功",
+        res.status == -1 ? ui18n.t('mediaLibrary.tips.uplooadErr') : res.status == 0 ? ui18n.t('mediaLibrary.tips.uplooad') : ui18n.t('mediaLibrary.tips.uplooadSuccess'),
       createTime: dayjs(res.createTime).format("YYYY-MM-DD HH:mm:ss"),
     };
   });
@@ -417,9 +424,9 @@ const initData = async () => {
 const floadileUrl = (record) => {
   if (record.fileType == 3) {
     let url = `/code/index.html?title=${record.fileName}&type=${record.fileFormat}&fileUrl=${record.fileUrl}#/sign-model`;
-    return window.open(url);
+    return windowOpen(url);
   } else {
-    return window.open(record.fileUrl);
+    return windowOpen(record.fileUrl);
   }
 };
 const beforeUpload = (file) => {
@@ -429,14 +436,14 @@ const beforeUpload = (file) => {
           filetype,
         ); // 调用上面代码
         if (!isExcel) {
-          createMessage.error('支持jpg、png、jpeg、mp4、wav、mp3 、shp、zip格式文件上传');
+          createMessage.error(ui18n.t('mediaLibrary.tips.uplooadfiletype'));
           fileList.value = [];
           return false;
         }
         const isLt10M = file.size / 1024 / 1024 < 2000;
         if (!isLt10M) {
           fileList.value = [];
-          createMessage.error('上传文件不能超过 2G!');
+          createMessage.error(ui18n.t('mediaLibrary.tips.uplooadSize'));
           return false;
         }
         fileList.value = [file];
@@ -496,6 +503,7 @@ initData();
   margin-top: 1rem;
 }
 .mymediaLibrary {
+  background-color: #292929;
   text-align: left;
   // .el-form-item{
   //   margin-bottom: 30px;
@@ -509,9 +517,9 @@ initData();
   // .el-table{
   //   background-color: #535353;
   // }
-  // .el-form--inline .el-form-item{
-  //   margin-right: 10px;
-  // }
+  .el-form--inline .el-form-item{
+    margin-right: 20px;
+  }
   // .el-form-item, .el-select__wrapper{
   //   background-color: #535353;
   // }
@@ -557,9 +565,13 @@ initData();
   //     --el-table-tr-bg-color: var(--el-color-success-light-9);
   //   }
   .itemTitle{
-    width: 400px;
-    margin: 0 8px;
+    width: 100%;
+    margin: 0 0 10px 0;
     .itemTitleList{
+      margin-top: 10px;
+      background: rgba(255,255,255,0.1);
+      border-radius: 4px 4px 4px 4px;
+      border: 1px solid rgba(255,255,255,0.2);
       max-height: 240px;
       overflow-y: scroll;
       ::-webkit-scrollbar {
@@ -567,7 +579,8 @@ initData();
       }
     }
     .itemTitle-list{
-      line-height: 30px;
+      padding-left: 10px;
+      line-height: 34px;
       display: flex;
       justify-content: space-between;
       position: relative;
@@ -580,6 +593,8 @@ initData();
       }
       .del{
         color: red;
+        width: 40px;
+
         cursor: pointer;
       }
     }

+ 7 - 6
src/view/mediaLibrary/index.vue

@@ -12,6 +12,7 @@
 import TableComponent from './TableComponent.vue';
 import { getmediaList } from "@/store/case";
 import { ref } from 'vue';
+import { ui18n } from '@/i18n'
 
 // 模拟接口数据
 const mockData = [
@@ -24,11 +25,11 @@ const mockData = [
 // 定义表格列
 const columns = [
   // { prop: 'name', label: '名称', width: 150, },
-  { prop: 'fileTypeStr', label: '文件类型', width: 100, },
-  { prop: 'fileFormat', label: '文件格式', width: 80, },
-  { prop: 'dictName', label: '分组', width: 100, },
-  { prop: 'statusStr', label: '状态', width: 100, },
-  { prop: 'createTime', label: '上传时间', width: 180, },
+  { prop: 'fileTypeStr', label: ui18n.t('mediaLibrary.fileTypeStr'),  },
+  { prop: 'fileFormat', label: ui18n.t('mediaLibrary.fileFormat'), },
+  { prop: 'dictName', label: ui18n.t('mediaLibrary.dictName'), },
+  { prop: 'statusStr', label: ui18n.t('mediaLibrary.statusStr'), },
+  { prop: 'createTime', label: ui18n.t('mediaLibrary.createTime'), width: 200, },
 ];
 
 // 定义搜索列
@@ -57,6 +58,6 @@ const getData = async (params) => {
   /* color: #2c3e50; */
   width: 100%;
   padding: 20px;
-  /* background-color: rgba(58, 58, 58, 1); */
+  background-color: #292929;
 }
 </style>

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

@@ -233,6 +233,7 @@ onMounted(refresh);
 }
 .dispatch-detial .el-form-item__content {
   color: #323233;
+
 }
 .dispatch-detial .el-form-item__label {
   color: #646566;

+ 1 - 1
src/view/system/login.vue

@@ -145,7 +145,7 @@ const submitClick = async () => {
       url.searchParams.append("token", user.value.token);
       window.location.replace(url);
     } else {
-      router.replace({ name: RouteName.scene, params: { caseId: 360 } });
+      router.replace({ name: RouteName.scene, params: { caseId: 609 } });
     }
   } catch (e) {
     console.error(e);

+ 11 - 8
src/view/vrmodel/index.vue

@@ -27,7 +27,7 @@
               class="mr-4"
               @click="handlegotoelT(item)"
               :style="{ color: item.inFusion ? '#ccc' : '' }"
-              >{{$t('sceneHome.library')}}</span
+              >{{$t('sceneHome.yc')}}</span
             >
             <span @click="handlegotoEdit(item)">{{$t('program.sceneDown.edit')}}</span>
           </div>
@@ -62,7 +62,9 @@ import { useScenePaggingParams } from "./pagging";
 import { computed, ref, onMounted } from "vue";
 import { tableModelScene } from "./quisk";
 import { ui18n } from '@/i18n'
+import { windowOpen } from "@/util";
 const active = ref(true);
+const locale = ui18n.locale
 const list = ref([]);
 const isEdit = ref(false);
 const showModal = ref(false);
@@ -77,15 +79,16 @@ async function geiList() {
   console.log("res", list.value);
 }
 function handlegotoEdit(record) {
-  let url =
-    record.type == 2 || record.type == 5
-      ? `/mega/index.html?m=${record.num}`
-      : `/epg.html?m=${record.num}`;
-  window.open(url.replace("spg", "epg"));
+  let url = getUrlSrc(record, caseId.value)
+    // record.type == 2 || record.type == 5
+    //   ? `/mega/index.html?m=${record.num}`
+    //   : `/epg.html?m=${record.num}`;
+      windowOpen(url.replace("spg", "epg"));
 }
 function handleAdddyrh(record) {
-  let url = `/code/index.html?caseId=${caseId.value}#/fuseEdit/merge`;
-  window.open(url);
+  
+  let url = getUrlSrc({ type: 100 }, caseId.value)
+  windowOpen(url);
 }
 async function handlegotoelT(record) {
   isEdit.value = true;

+ 7 - 2
vite.config.ts

@@ -3,6 +3,7 @@ import vue from "@vitejs/plugin-vue";
 import { resolve } from "path";
 import ElementPlus from "unplugin-element-plus/vite";
 import WindiCSS from 'vite-plugin-windicss'
+import legacy from '@vitejs/plugin-legacy';
 
 let app = "criminal";
 if (process.argv.length > 3) {
@@ -40,18 +41,22 @@ export default defineConfig({
     ElementPlus({
       useSource: true,
     }),
+    // legacy({
+      // targets: ['chrome 52'], // 需要兼容的目标列表,可以设置多个
+      // additionalLegacyPolyfills: ['regenerator-runtime/runtime'], // 面向IE11时需要此插件
+    // }),
   ],
   server: {
     port: 5173,
     host: "0.0.0.0",
     proxy: {
       "/api": {
-        target: dev ? "http://192.168.0.43:8808" : "mix3d.4dkankan.com",
+        target: dev ? "http://192.168.0.62:8808" : "mix3d.4dkankan.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(new RegExp(`^/api`), ""),
       },
       "/fusion": {
-        target: dev ? "http://192.168.0.43:8808" : "mix3d.4dkankan.com",
+        target: dev ? "http://192.168.0.62:8808" : "mix3d.4dkankan.com",
         changeOrigin: true,
         rewrite: (path) => path.replace(new RegExp(`^/api`), "/fusion"),
       },

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1114 - 4
yarn.lock