|
@@ -49,7 +49,6 @@ 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;
|
|
@@ -337,43 +336,59 @@ export const getSceneListTree = (list = sceneList.value) => {
|
|
|
return [{ numList: myData[0], type: 0 }, { numList: myData[1], type: 1 }]
|
|
|
}
|
|
|
|
|
|
-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;
|
|
|
- console.log('param', param, ip);
|
|
|
- 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=${params.ip}:${params.swkkPort}&m=${item.num}&app_resource=${param.root}/${item.mapping}`;
|
|
|
- param.fuse = `${params.fuse}?caseId=${caseId}&ip=${params.ip}&swkkPort=${params.swkkPort}&swssUrl=${params.swssUrl }&swkkUrl=${params.swkkUrl && params.swkkUrl.replace('epg','spg')}&laserServicePort=${params.laserServicePort}&servicePort=${params.servicePort}&lang=${langKey}&app_server=${ip}${params.swkkPort}&testMap=1&static=${params.static||''}&`;
|
|
|
+// 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;
|
|
|
+// console.log('param', param, ip);
|
|
|
+// 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=${params.ip}:${params.swkkPort}&m=${item.num}&app_resource=${param.root}/${item.mapping}`;
|
|
|
+// param.fuse = `${params.fuse}?caseId=${caseId}&ip=${params.ip}&swkkPort=${params.swkkPort}&swssUrl=${params.swssUrl }&swkkUrl=${params.swkkUrl && params.swkkUrl.replace('epg','spg')}&laserServicePort=${params.laserServicePort}&servicePort=${params.servicePort}&lang=${langKey}&app_server=${ip}${params.swkkPort}&testMap=1&static=${params.static||''}&`;
|
|
|
+// let SceneType = {
|
|
|
+// 0: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
+// 1: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
+// 2: param.swssmxUrl,//`/mega/index.html?m=${item.num}`,
|
|
|
+// 3: param.swkkUrl,//`/swss/index.html?m=${item.num}`,
|
|
|
+// 4: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
+// 5: param.swssmxUrl,//`/mega/index.html?m=${item.num}`,
|
|
|
+// 6: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
+// 7: param.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 + `title=${item.fileName}&single&type=${item.fileFormat}&fileUrl=${item.fileUrl}` + '#/sign-model',//多元融合模型查看页面`/code/index.html?caseId=${caseId}&single#/show`,
|
|
|
+// 102: param.root,//资源访问链接,
|
|
|
+// };
|
|
|
+// return SceneType[item.type];
|
|
|
+// }
|
|
|
+export const getUrlSrc = (item, caseId, locale) => {
|
|
|
let SceneType = {
|
|
|
- 0: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
- 1: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
- 2: param.swssmxUrl,//`/mega/index.html?m=${item.num}`,
|
|
|
- 3: param.swkkUrl,//`/swss/index.html?m=${item.num}`,
|
|
|
- 4: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
- 5: param.swssmxUrl,//`/mega/index.html?m=${item.num}`,
|
|
|
- 6: param.swkkUrl,//`/spg.html?m=${item.num}`,
|
|
|
- 7: param.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 + `title=${item.fileName}&single&type=${item.fileFormat}&fileUrl=${item.fileUrl}` + '#/sign-model',//多元融合模型查看页面`/code/index.html?caseId=${caseId}&single#/show`,
|
|
|
- 102: param.root,//资源访问链接,
|
|
|
+ 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}&lang=${locale}&single#/show`,
|
|
|
};
|
|
|
return SceneType[item.type];
|
|
|
}
|