|
@@ -52,7 +52,9 @@ import {
|
|
|
caseTabulationList,
|
|
caseTabulationList,
|
|
|
caseOverviewList,
|
|
caseOverviewList,
|
|
|
caseOverviewExport,
|
|
caseOverviewExport,
|
|
|
|
|
+ packageData,
|
|
|
} from "@/request";
|
|
} from "@/request";
|
|
|
|
|
+import { strToParams, isEmpty, appendParamsToUrl } from "@/util";
|
|
|
import { router } from "@/router";
|
|
import { router } from "@/router";
|
|
|
import { ModelScene, QuoteScene, Scene, SceneType } from "./scene";
|
|
import { ModelScene, QuoteScene, Scene, SceneType } from "./scene";
|
|
|
import { user } from "@/store/user";
|
|
import { user } from "@/store/user";
|
|
@@ -74,6 +76,9 @@ export const treeList = ref([]);
|
|
|
export const show = ref(false);
|
|
export const show = ref(false);
|
|
|
export const Extract = ref(false);
|
|
export const Extract = ref(false);
|
|
|
export const sceneList = ref([]);
|
|
export const sceneList = ref([]);
|
|
|
|
|
+let httpdatas = localStorage.getItem("httpData")
|
|
|
|
|
+let httpdatass = httpdatas && JSON.parse(httpdatas) || {}
|
|
|
|
|
+export const httpData = ref(httpdatass);
|
|
|
export const caseInfoData = ref({
|
|
export const caseInfoData = ref({
|
|
|
caseTitle: '',
|
|
caseTitle: '',
|
|
|
});
|
|
});
|
|
@@ -91,10 +96,10 @@ export const getAiByImage = async (params) =>
|
|
|
(await axios.post<string>(getByImage, params)).data;
|
|
(await axios.post<string>(getByImage, params)).data;
|
|
|
|
|
|
|
|
export const getFloorList = async (caseId) =>
|
|
export const getFloorList = async (caseId) =>
|
|
|
- (await axios.get<string>(getFloor+caseId, {})).data;
|
|
|
|
|
|
|
+ (await axiosGet<string>(getFloor+caseId, {})).data;
|
|
|
|
|
|
|
|
export const getCaseSharePWD = async (params: { caseId: number }) =>
|
|
export const getCaseSharePWD = async (params: { caseId: number }) =>
|
|
|
- (await axios.get<string>(getCasePsw, { params })).data;
|
|
|
|
|
|
|
+ (await axiosGet<string>(getCasePsw, { params })).data;
|
|
|
|
|
|
|
|
export const addByMediaLiBrary = async (params) =>{
|
|
export const addByMediaLiBrary = async (params) =>{
|
|
|
const newUrl = params.uploadIds?.length ? addByMediaLibrarys : addByMediaLibrary
|
|
const newUrl = params.uploadIds?.length ? addByMediaLibrarys : addByMediaLibrary
|
|
@@ -109,49 +114,56 @@ export const AddsaveOrUpdate = async (params) =>
|
|
|
(await axios.post<string>(saveOrUpdate, params)).data;
|
|
(await axios.post<string>(saveOrUpdate, params)).data;
|
|
|
|
|
|
|
|
export const getcaseInDate = async (params) =>
|
|
export const getcaseInDate = async (params) =>
|
|
|
- (await axios.get<string>(criminalInfo, {params})).data;
|
|
|
|
|
- // (await axios.get<string>(info, { params:params })).data;
|
|
|
|
|
|
|
+ (await axiosGet<string>(criminalInfo, {params})).data;
|
|
|
|
|
+ // (await axiosGet<string>(info, { params:params })).data;
|
|
|
|
|
|
|
|
export const getcaseMap = async (params) =>
|
|
export const getcaseMap = async (params) =>
|
|
|
- (await axios.get<string>(getMapConfig, {params})).data;
|
|
|
|
|
- // (await axios.get<string>(info, { params:params })).data;
|
|
|
|
|
|
|
+ (await axiosGet<string>(getMapConfig, {params})).data;
|
|
|
|
|
+ // (await axiosGet<string>(info, { params:params })).data;
|
|
|
|
|
+
|
|
|
|
|
+ export const getPackageData = async (params) =>{
|
|
|
|
|
+ let myData = (await axiosGet<string>(packageData, { params }))
|
|
|
|
|
+ httpData.value = myData
|
|
|
|
|
+ console.log(myData,'httpData')
|
|
|
|
|
+ localStorage.setItem('httpData', JSON.stringify(myData))
|
|
|
|
|
+ };
|
|
|
|
|
+ // (await axiosGet<string>(info, { params:params })).data;
|
|
|
|
|
|
|
|
|
|
|
|
|
export const getSceneListData = async (params) =>
|
|
export const getSceneListData = async (params) =>
|
|
|
- (await axios.get<string>(getSceneList, { params })).data;
|
|
|
|
|
- // (await axios.get<string>(info, { params:params })).data;
|
|
|
|
|
-
|
|
|
|
|
-export const getCaseInfo = async (caseId) => {
|
|
|
|
|
- caseInfoData.value = (await axios.get<Case>(caseInfo, { params: { caseId } })).data
|
|
|
|
|
- if(!caseInfoData.value || !caseInfoData.value.viewAuth){
|
|
|
|
|
- return ElMessageBox.alert("您没有访问权限", "提示", {
|
|
|
|
|
- confirmButtonText: "我知道了",
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- showClose: false
|
|
|
|
|
- }).then(async () => {
|
|
|
|
|
- router.replace({ name: RouteName.login});
|
|
|
|
|
- // window.open(window.location.origin + "/admin/#/statistics/scene");
|
|
|
|
|
- });
|
|
|
|
|
- ;
|
|
|
|
|
- }
|
|
|
|
|
- if(!caseInfoData.value.editAuth && !show.value){
|
|
|
|
|
- show.value = true;
|
|
|
|
|
- return ElMessageBox.alert("您没有编辑权限", "提示", {
|
|
|
|
|
- confirmButtonText: "去查看",
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- showClose: false
|
|
|
|
|
- }).then(async () => {
|
|
|
|
|
- window.open(window.location.origin + "/mix3d/?show=true#/abstract/" + caseId)
|
|
|
|
|
- // router.replace({ name: RouteName.login});
|
|
|
|
|
- // window.open(window.location.origin + "/admin/#/statistics/scene");
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- return caseInfoData.value;
|
|
|
|
|
|
|
+ (await axiosGet<string>(getSceneList, { params })).data;
|
|
|
|
|
+ // (await axiosGet<string>(info, { params:params })).data;
|
|
|
|
|
+
|
|
|
|
|
+export const getCaseInfo = async (caseId: string) => {
|
|
|
|
|
+ caseInfoData.value = (await axiosGet<Case>(caseInfo, { params: { caseId } })).data
|
|
|
|
|
+
|
|
|
|
|
+ // if (!caseInfoData.value || !caseInfoData.value.viewAuth) {
|
|
|
|
|
+ // return ElMessageBox.alert("您没有访问权限", "提示", {
|
|
|
|
|
+ // confirmButtonText: "我知道了",
|
|
|
|
|
+ // type: "warning",
|
|
|
|
|
+ // showClose: false
|
|
|
|
|
+ // }).then(async () => {
|
|
|
|
|
+ // router.replace({ name: RouteName.login })
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // if (!caseInfoData.value.editAuth && !show.value) {
|
|
|
|
|
+ // show.value = true
|
|
|
|
|
+ // return ElMessageBox.alert("您没有编辑权限", "提示", {
|
|
|
|
|
+ // confirmButtonText: "去查看",
|
|
|
|
|
+ // type: "warning",
|
|
|
|
|
+ // showClose: false
|
|
|
|
|
+ // }).then(async () => {
|
|
|
|
|
+ // window.open(window.location.origin + "/mix3d/?show=true#/abstract/" + caseId)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ return caseInfoData.value
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
export const getCaseInquestInfo = async (caseId: number) =>
|
|
export const getCaseInquestInfo = async (caseId: number) =>
|
|
|
- (await axios.get(newCaseInfo, { params: { caseId } })).data;
|
|
|
|
|
|
|
+ (await axiosGet(newCaseInfo, { params: { caseId } })).data;
|
|
|
|
|
|
|
|
export const casesaveOrUpDate = async (params) =>
|
|
export const casesaveOrUpDate = async (params) =>
|
|
|
(await axios.post<string>(casesaveOrUpdate, params)).data;
|
|
(await axios.post<string>(casesaveOrUpdate, params)).data;
|
|
@@ -162,9 +174,9 @@ export const overviewAdd = async (params) =>
|
|
|
export const TabulationAdd = async (params) =>
|
|
export const TabulationAdd = async (params) =>
|
|
|
(await axios.post<string>(caseTabulationAdd, params)).data;
|
|
(await axios.post<string>(caseTabulationAdd, params)).data;
|
|
|
export const getcaseByCaseId = async (caseId) =>
|
|
export const getcaseByCaseId = async (caseId) =>
|
|
|
- (await axios.get(getByCaseId, { params: { caseId } })).data;
|
|
|
|
|
|
|
+ (await axiosGet(getByCaseId, { params: { caseId } })).data;
|
|
|
export const caseOverview = async (caseId) =>
|
|
export const caseOverview = async (caseId) =>
|
|
|
- (await axios.get('/fusion/caseOverview/getByCaseId', { params: { caseId } })).data;
|
|
|
|
|
|
|
+ (await axiosGet('/fusion/caseOverview/getByCaseId', { params: { caseId } })).data;
|
|
|
|
|
|
|
|
export const caseOverviewDel = async ({tabulationId, overviewId, type}) =>
|
|
export const caseOverviewDel = async ({tabulationId, overviewId, type}) =>
|
|
|
(await axios.post(type=='方位图'?'/fusion/caseTabulation/del':'/fusion/caseOverview/del', { tabulationId, overviewId } )).data;
|
|
(await axios.post(type=='方位图'?'/fusion/caseTabulation/del':'/fusion/caseOverview/del', { tabulationId, overviewId } )).data;
|
|
@@ -180,12 +192,12 @@ export const getCaseSceneList = async (caseId: number, refresh = false): Promise
|
|
|
if (!refresh && sceneList.value.length) {
|
|
if (!refresh && sceneList.value.length) {
|
|
|
return sceneList.value;
|
|
return sceneList.value;
|
|
|
}
|
|
}
|
|
|
- let mylist = (await axios.get(caseSceneList, { params: { caseId, } })).data;
|
|
|
|
|
|
|
+ let mylist = (await axiosGet(caseSceneList, { params: { caseId, } })).data;
|
|
|
sceneList.value = mylist.filter(item => item.type != 3);
|
|
sceneList.value = mylist.filter(item => item.type != 3);
|
|
|
return sceneList.value;
|
|
return sceneList.value;
|
|
|
};
|
|
};
|
|
|
export const getCaseList = async (params): Promise<Scene[]> => {
|
|
export const getCaseList = async (params): Promise<Scene[]> => {
|
|
|
- return (await axios.get(caseNewList, {params})).data;
|
|
|
|
|
|
|
+ return (await axiosGet(caseNewList, {params})).data;
|
|
|
};
|
|
};
|
|
|
export const getCaseFusionList = async (params): Promise<Scene[]> => {
|
|
export const getCaseFusionList = async (params): Promise<Scene[]> => {
|
|
|
return (await axios.post(caseFusionList, params)).data;
|
|
return (await axios.post(caseFusionList, params)).data;
|
|
@@ -201,7 +213,7 @@ export const getupdateFileType = async (params): Promise<Scene[]> => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const getDictFileLists = async (type: number): Promise<Scene[]> => {
|
|
export const getDictFileLists = async (type: number): Promise<Scene[]> => {
|
|
|
- return (await axios.get(getDictFileList, { params: { type: type } })).data;
|
|
|
|
|
|
|
+ return (await axiosGet(getDictFileList, { params: { type: type } })).data;
|
|
|
};
|
|
};
|
|
|
export const delDictFileLists = async (id: number): Promise<Scene[]> => {
|
|
export const delDictFileLists = async (id: number): Promise<Scene[]> => {
|
|
|
return (await axios.post(delDictFileList, { id })).data;
|
|
return (await axios.post(delDictFileList, { id })).data;
|
|
@@ -209,11 +221,12 @@ export const delDictFileLists = async (id: number): Promise<Scene[]> => {
|
|
|
|
|
|
|
|
|
|
|
|
|
export const getcaseLists = async (caseId: number): Promise<Scene[]> => {
|
|
export const getcaseLists = async (caseId: number): Promise<Scene[]> => {
|
|
|
- return (await axios.get(isdyrh, { params: { caseId } })).data;
|
|
|
|
|
|
|
+ return (await axiosGet(isdyrh, { params: { caseId } })).data;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const updateByTreeFileLists = async (caseId = router.currentRoute.value?.params?.caseId): Promise<Scene[]> => {
|
|
export const updateByTreeFileLists = async (caseId = router.currentRoute.value?.params?.caseId): Promise<Scene[]> => {
|
|
|
- let list = (await axios.get(getByTree, { params: { caseId:caseId } })).data
|
|
|
|
|
|
|
+ console.log('updateByTreeFileLists1');
|
|
|
|
|
+ let list = (await axiosGet(getByTree, { params: { caseId:caseId } })).data
|
|
|
// function getTreeList(lists: any[]) {
|
|
// function getTreeList(lists: any[]) {
|
|
|
// return lists.map(item => {
|
|
// return lists.map(item => {
|
|
|
// return {
|
|
// return {
|
|
@@ -223,6 +236,7 @@ export const updateByTreeFileLists = async (caseId = router.currentRoute.value?.
|
|
|
// }
|
|
// }
|
|
|
// })
|
|
// })
|
|
|
// }
|
|
// }
|
|
|
|
|
+ console.log(list, 'updateByTreeFileLists');
|
|
|
treeList.value = list;
|
|
treeList.value = list;
|
|
|
return list;
|
|
return list;
|
|
|
};
|
|
};
|
|
@@ -242,7 +256,7 @@ export const updateSelectByTreeFileLists = async (): Promise<Scene[]> => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- return getTreeList((await axios.get(getByTree, { params: { caseId: '' } })).data)
|
|
|
|
|
|
|
+ return getTreeList((await axiosGet(getByTree, { params: { caseId: '' } })).data)
|
|
|
};
|
|
};
|
|
|
export const caseImgList = (caseId: number, orderBy: string | null) =>
|
|
export const caseImgList = (caseId: number, orderBy: string | null) =>
|
|
|
axios.post(caseApiList, { orderBy: orderBy || "", caseId });
|
|
axios.post(caseApiList, { orderBy: orderBy || "", caseId });
|
|
@@ -266,14 +280,14 @@ export const getByTreeFileLists = async () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const getCaseInquestInfoOld = (caseId: number) =>
|
|
export const getCaseInquestInfoOld = (caseId: number) =>
|
|
|
- axios.get(caseInquestInfoOld, { params: { inquestFileId: caseId } });
|
|
|
|
|
|
|
+ axiosGet(caseInquestInfoOld, { params: { inquestFileId: caseId } });
|
|
|
|
|
|
|
|
export const saveCaseInquestInfo = (params) =>
|
|
export const saveCaseInquestInfo = (params) =>
|
|
|
axios.post(caseInquestOpt, params
|
|
axios.post(caseInquestOpt, params
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
export const exportCaseInquestInfo = (caseId: number) =>
|
|
export const exportCaseInquestInfo = (caseId: number) =>
|
|
|
- axios.get(caseInquestExport, {
|
|
|
|
|
|
|
+ axiosGet(caseInquestExport, {
|
|
|
params: { inquestFileId: caseId, ingoreRes: true },
|
|
params: { inquestFileId: caseId, ingoreRes: true },
|
|
|
responseType: "blob",
|
|
responseType: "blob",
|
|
|
});
|
|
});
|
|
@@ -341,20 +355,20 @@ export const saveCaseImgTagData = (params: any) =>
|
|
|
axios.post(saveCaseImgTag, { ...params });
|
|
axios.post(saveCaseImgTag, { ...params });
|
|
|
|
|
|
|
|
export const getCaseImgTagData = (caseId: number) =>
|
|
export const getCaseImgTagData = (caseId: number) =>
|
|
|
- axios.get(getCaseImgTag, { params: { caseId } });
|
|
|
|
|
|
|
+ axiosGet(getCaseImgTag, { params: { caseId } });
|
|
|
|
|
|
|
|
export const getSceneListHasAi = (caseId: number) =>
|
|
export const getSceneListHasAi = (caseId: number) =>
|
|
|
- axios.get(sceneListHasAi, { params: { caseId } });
|
|
|
|
|
|
|
+ axiosGet(sceneListHasAi, { params: { caseId } });
|
|
|
|
|
|
|
|
export const getTipsList = (key) =>
|
|
export const getTipsList = (key) =>
|
|
|
- axios.get(getTips, { params: {
|
|
|
|
|
|
|
+ axiosGet(getTips, { params: {
|
|
|
basic: 'y',
|
|
basic: 'y',
|
|
|
key,
|
|
key,
|
|
|
location: '113.05,22.61',
|
|
location: '113.05,22.61',
|
|
|
} });
|
|
} });
|
|
|
|
|
|
|
|
export const getTipsNames = (name) =>
|
|
export const getTipsNames = (name) =>
|
|
|
- axios.get(getTipsName, { params: { name } });
|
|
|
|
|
|
|
+ axiosGet(getTipsName, { params: { name } });
|
|
|
|
|
|
|
|
export const submitMergePhotos = (data) => axios.post(ffmpegMergeImage, { ...data })
|
|
export const submitMergePhotos = (data) => axios.post(ffmpegMergeImage, { ...data })
|
|
|
|
|
|
|
@@ -399,23 +413,36 @@ export const getUrlSrc = (item, caseId) => {
|
|
|
5: `/mega/index.html?m=${item.num}`,
|
|
5: `/mega/index.html?m=${item.num}`,
|
|
|
6: `/spg.html?m=${item.num}`,
|
|
6: `/spg.html?m=${item.num}`,
|
|
|
7: `/spg.html?m=${item.num}`,
|
|
7: `/spg.html?m=${item.num}`,
|
|
|
- 99: `/code/index.html?caseId=${caseId}&single#/show`,
|
|
|
|
|
|
|
+ // 99: `/code/index.html?caseId=${caseId}&single#/show`,
|
|
|
|
|
+ 99: `/fusion_offline/${caseId}/env/wwww/offline.html?caseId=${caseId}&single#/show`,
|
|
|
};
|
|
};
|
|
|
let SceneEditType = {
|
|
let SceneEditType = {
|
|
|
- 0: `/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
- 1: `/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
|
|
+ 0: `/swkk/${item.num}/env/wwwroot/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
+ 1: `/swkk/${item.num}/env/wwwroot/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
2: `/mega/index.html?m=${item.num}`,
|
|
2: `/mega/index.html?m=${item.num}`,
|
|
|
3: `/swss/index.html?m=${item.num}`,
|
|
3: `/swss/index.html?m=${item.num}`,
|
|
|
- 4: `/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
|
|
+ 4: `/swkk/${item.num}/env/wwwroot/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
// 5: `/spg.html?m=${item.num}`,
|
|
// 5: `/spg.html?m=${item.num}`,
|
|
|
// 5: `index.html?caseId=${caseId}&modelId=${item.num}#sign-model`,
|
|
// 5: `index.html?caseId=${caseId}&modelId=${item.num}#sign-model`,
|
|
|
5: `/mega/index.html?m=${item.num}`,
|
|
5: `/mega/index.html?m=${item.num}`,
|
|
|
- 6: `/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
- 7: `/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
- 99: `/code/index.html?caseId=${item.fusionId || caseId}&single#/show`,
|
|
|
|
|
- 100: `/code/index.html?caseId=${item.fusionId || caseId}&pure=1#/show`,
|
|
|
|
|
|
|
+ 6: `/swkk/${item.num}/env/wwwroot/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
+ 7: `/swkk/${item.num}/env/wwwroot/spg.html?m=${item.num}&token=${token}&pure=1`,
|
|
|
|
|
+ 99: `/fusion_offline/${caseId}/env/wwww/offline.html?caseId=${item.fusionId || caseId}&single#/show`,
|
|
|
|
|
+ 100: `/fusion_offline/${caseId}/env/wwww/offline.html?caseId=${item.fusionId || caseId}&pure=1#/show`,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
console.log(sceneType.value, 'sceneType.value')
|
|
console.log(sceneType.value, 'sceneType.value')
|
|
|
return sceneType.value == 'view' ? SceneEditType[item.type]: SceneEditType[item.type];
|
|
return sceneType.value == 'view' ? SceneEditType[item.type]: SceneEditType[item.type];
|
|
|
}
|
|
}
|
|
|
|
|
+// 设置全局请求hook
|
|
|
|
|
+function axiosGet(url, {params}) {
|
|
|
|
|
+ const route = router.currentRoute.value;
|
|
|
|
|
+ let caseId = router.currentRoute.value?.params?.caseId
|
|
|
|
|
+ let Urlkey = appendParamsToUrl(url, {...params, caseId})
|
|
|
|
|
+ console.log('httpData', httpData.value[Urlkey], Urlkey, params);
|
|
|
|
|
+ if(httpData.value[Urlkey]){
|
|
|
|
|
+ return Promise.resolve(httpData.value[Urlkey]);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ return axios.get(url, {...params});
|
|
|
|
|
+ }
|
|
|
|
|
+}
|