|
|
@@ -150,7 +150,7 @@
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip content="编辑" placement="top" v-if="rec.createType === 'online'">
|
|
|
- <span class="action-icon" @click="onEditInspection">
|
|
|
+ <span class="action-icon" @click="onEditInspection(rec)">
|
|
|
<i class="iconfont icon-Edit" />
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
@@ -193,7 +193,7 @@
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip content="编辑" placement="top" v-if="rec.createType === 'online'">
|
|
|
- <span class="action-icon" @click="onEditExtraction">
|
|
|
+ <span class="action-icon" @click="onEditExtraction(rec)">
|
|
|
<i class="iconfont icon-Edit" />
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
@@ -353,7 +353,7 @@ import SiteText from './sitetext.vue';
|
|
|
import ManifestText from './manifesttext.vue';
|
|
|
// 弹窗已移除,直接跳转到绘制页面
|
|
|
import { CaseFile, BoardType, setCaseFile, delCaseFile } from '@/store/caseFile';
|
|
|
-import { getCaseFileImageInfo } from '@/store/editCsae';
|
|
|
+import { getCaseFileImageInfo, getFusionAndSceneList } from '@/store/editCsae';
|
|
|
import { FileDrawType } from '@/constant/caseFile';
|
|
|
import { addCaseFile as addCaseFileDialog } from '@/view/case/quisk';
|
|
|
import { router, RouteName } from '@/router';
|
|
|
@@ -416,7 +416,7 @@ const loadListsFromTree = async () => {
|
|
|
url: item.listCover || item.filesUrl || item.cover || item.url,
|
|
|
name: item.filesTitle || item.title || '未命名',
|
|
|
});
|
|
|
- const isPlane = (i: any) => (!Boolean(i.overviewId) && Boolean(i.tabulationId)) || i.imgType === 0 || i.imgType === '0';
|
|
|
+ const isPlane = (i: any) => (Boolean(i.overviewId) && Boolean(i.tabulationId)) || i.imgType === 0 || i.imgType === '0';
|
|
|
const isOrientation = (i: any) => (Boolean(i.tabulationId) && !Boolean(i.overviewId)) || i.imgType === 1 || i.imgType === '1' || (!Boolean(i.overviewId) && !Boolean(i.tabulationId) && (i.imgType === undefined || i.imgType === null || i.imgType === ''));
|
|
|
planeFiles.value = drawList.filter((i: any) => isPlane(i));
|
|
|
orientationFiles.value = drawList.filter((i: any) => !isPlane(i) && isOrientation(i));
|
|
|
@@ -772,7 +772,6 @@ const selectInspection = async (file: any) => {
|
|
|
};
|
|
|
// 勘验笔录:拉取并生成预览文本
|
|
|
const loadInspection = async (filesId?: number) => {
|
|
|
- console.log('filesId', filesId);
|
|
|
if (!filesId) return;
|
|
|
try {
|
|
|
const res: any = await getCaseFileImageInfo(filesId);
|
|
|
@@ -832,6 +831,7 @@ const loadExtraction = async (filesId?: number) => {
|
|
|
if (!filesId) return;
|
|
|
try {
|
|
|
const res: any = await getCaseFileImageInfo(filesId);
|
|
|
+ console.log('extractDetail', res?.extractDetail)
|
|
|
// 当按 filesId 查询时,接口返回对象即提取清单详情
|
|
|
if (filesId) {
|
|
|
const detail = res?.extractDetail ?? {};
|
|
|
@@ -978,7 +978,6 @@ const loadAlbum = async () => {
|
|
|
|
|
|
// 统一下载:按当前 tab 类型以 blob 方式下载
|
|
|
const downloadSelected = async (item: any) => {
|
|
|
- console.log(item, 55555)
|
|
|
try {
|
|
|
if (activeTab.value === 'inspection') {
|
|
|
if (!caseId.value) return;
|
|
|
@@ -1117,33 +1116,47 @@ watch(activeTab, (val) => {
|
|
|
const openTabulation = (tabulationId?: string | number) => {
|
|
|
if (!caseId.value) return;
|
|
|
const extra = tabulationId ? `&tabulationId=${tabulationId}` : '';
|
|
|
- if (appId === 'fire') {
|
|
|
- window.open(`${url}/draw/fire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
- } else if (appId === 'criminal') {
|
|
|
- window.open(`${url}/draw/criminal/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
- } else if (appId === 'cjzfire') {
|
|
|
- window.open(`${url}/draw/cjzfire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
- } else if (appId === 'xmfire') {
|
|
|
- window.open(`${url}/draw/xmfire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
- } else {
|
|
|
- window.open(`${url}/draw/fire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
- }
|
|
|
+ window.open(`${url}/draw/${appId || 'fire'}/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
+ // if (appId === 'fire') {
|
|
|
+ // window.open(`${url}/draw/fire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
+ // } else if (appId === 'criminal') {
|
|
|
+ // window.open(`${url}/draw/criminal/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
+ // } else if (appId === 'cjzfire') {
|
|
|
+ // window.open(`${url}/draw/cjzfire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
+ // } else if (appId === 'xmfire') {
|
|
|
+ // window.open(`${url}/draw/xmfire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
+ // } else {
|
|
|
+ // window.open(`${url}/draw/fire/index.html#/tabulation?caseId=${caseId.value!}&token=${user.value.token}${extra}`, '_blank');
|
|
|
+ // }
|
|
|
};
|
|
|
|
|
|
// 新增平面图(overview)
|
|
|
-const openOverView = () => {
|
|
|
+const openOverView = async () => {
|
|
|
+ const fusionList = (await getFusionAndSceneList({ caseId: caseId.value, type: 'scene' })) as unknown as any[];
|
|
|
+ let itme = fusionList.find((ele) => [0, 1, 3, 4, 6].includes(ele.sceneType));
|
|
|
+ console.log(fusionList, itme, 'openOverView')
|
|
|
if (!caseId.value) return;
|
|
|
- if (appId === 'fire') {
|
|
|
- window.open(`${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
- } else if (appId === 'criminal') {
|
|
|
- window.open(`${url}/draw/criminal/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
- } else if (appId === 'cjzfire') {
|
|
|
- window.open(`${url}/draw/cjzfire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
- } else if (appId === 'xmfire') {
|
|
|
- window.open(`${url}/draw/xmfire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
- } else {
|
|
|
- window.open(`${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
+ let openUrl = `${url}/draw/${appId || 'fire'}/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`
|
|
|
+ // if (appId === 'fire') {
|
|
|
+ // openUrl = `${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`;
|
|
|
+ // // window.open(`${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
+ // } else if (appId === 'criminal') {
|
|
|
+ // openUrl = `${url}/draw/criminal/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`;
|
|
|
+ // // window.open(`${url}/draw/criminal/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
+ // } else if (appId === 'cjzfire') {
|
|
|
+ // openUrl = `${url}/draw/cjzfire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`;
|
|
|
+ // // window.open(`${url}/draw/cjzfire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
+ // } else if (appId === 'xmfire') {
|
|
|
+ // openUrl = `${url}/draw/xmfire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`;
|
|
|
+ // // window.open(`${url}/draw/xmfire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
+ // } else {
|
|
|
+ // openUrl = `${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`;
|
|
|
+ // // window.open(`${url}/draw/fire/index.html#/overview?caseId=${caseId.value!}&token=${user.value.token}`, '_blank');
|
|
|
+ // }
|
|
|
+ if(itme && itme.num){
|
|
|
+ openUrl += `&m=${itme.num}`
|
|
|
}
|
|
|
+ window.open(openUrl, '_blank');
|
|
|
};
|
|
|
|
|
|
// 地图选择确认后,跳转创建方位图(tabulation)
|
|
|
@@ -1176,11 +1189,12 @@ const onUpload = async (_type: 'plane' | 'orientation') => {
|
|
|
};
|
|
|
|
|
|
// 打开覆盖式编辑页(编辑当前项):勘验笔录/提取清单
|
|
|
-const openEditOverlay = (type: 'inquest' | 'extraction') => {
|
|
|
+const openEditOverlay = (type: 'inquest' | 'extraction', item) => {
|
|
|
const current = router.currentRoute.value;
|
|
|
// 勘验笔录仍走原有 records 编辑页;提取清单改为新的 editInspection 页
|
|
|
const editSub = type === 'extraction' ? 'editInspection' : 'records';
|
|
|
- const query: any = { ...current.query, editSub, type };
|
|
|
+ const query: any = { ...current.query, editSub, type, filesId: item.id || '' };
|
|
|
+ console.log(item, 'openEditOverlay')
|
|
|
if (type === 'extraction') {
|
|
|
// 使用 sessionStorage 传递预填数据,避免 URL 过长
|
|
|
try {
|
|
|
@@ -1238,8 +1252,8 @@ const onUploadInspection = async () => {
|
|
|
await loadListsFromTree();
|
|
|
};
|
|
|
const onFillExtraction = () => openAddOverlay('extraction');
|
|
|
-const onEditInspection = () => openEditOverlay('inquest');
|
|
|
-const onEditExtraction = () => openEditOverlay('extraction');
|
|
|
+const onEditInspection = (item) => openEditOverlay('inquest', item);
|
|
|
+const onEditExtraction = (item) => openEditOverlay('extraction', item);
|
|
|
const onUploadExtraction = async () => {
|
|
|
if (!caseId.value) return;
|
|
|
await addCaseFileDialog({ caseId: caseId.value!, fileType: 4 });
|