|
|
@@ -1,5 +1,22 @@
|
|
|
<template>
|
|
|
<div class="scene abstract sceneImg">
|
|
|
+
|
|
|
+ <el-dialog v-model="casePhotoItem.show" title="重命名" width="500">
|
|
|
+ <el-form :model="casePhotoItem">
|
|
|
+ <el-form-item :label-width="0">
|
|
|
+ <el-input v-model="casePhotoItem.name" maxlength="15" show-word-limit autocomplete="off" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer text-center" >
|
|
|
+ <el-button @click="casePhotoItem.show = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleConfirm">
|
|
|
+ 确定
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- <el-button class="w-full" @click="handledrawCasePhotos">照片卷</el-button> -->
|
|
|
<div class="demo-image__preview">
|
|
|
<el-image-viewer
|
|
|
hide-on-click-modal
|
|
|
@@ -23,15 +40,16 @@
|
|
|
ref="tabsRef"
|
|
|
@tab-click="handleClick"
|
|
|
>
|
|
|
+ <!-- //new 0 现场图 1 照片卷 2 现场照片 3 勘验笔录 -->
|
|
|
<el-tab-pane
|
|
|
v-for="(item, index) in list"
|
|
|
- :key="index"
|
|
|
+ :key="item.filesTypeName"
|
|
|
:label="showText?item.filesTypeName:''"
|
|
|
:childrenList="item.childrenList"
|
|
|
:class="`handleIsShow show${handleIsShow(item)}`"
|
|
|
- :name="index"
|
|
|
+ :name="item.filesTypeName"
|
|
|
>
|
|
|
- <div class="leftCenter" v-if="active1 == 1">
|
|
|
+ <div class="leftCenter" v-if="active1 == '现场图'">
|
|
|
<div v-for="(a, b) in item.childrenList" :key="b">
|
|
|
<div
|
|
|
class="listTitle"
|
|
|
@@ -91,6 +109,7 @@
|
|
|
><Download
|
|
|
/></el-icon>
|
|
|
<el-icon title="编辑"
|
|
|
+ v-if="items.oldData != 1"
|
|
|
@click="handleoverviewEdit(a.filesTypeName, items)"
|
|
|
><Edit
|
|
|
/></el-icon>
|
|
|
@@ -102,7 +121,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="leftCenter" v-if="active1 == 0">
|
|
|
+ <div class="leftCenter" v-if="active1 == '现场照片'">
|
|
|
<div v-for="(a, b) in item.childrenList" :key="b" v-show="show?recursiveSearch(a.childrenList):true">
|
|
|
<div class="listTitle">{{ a.filesTypeName }}</div>
|
|
|
<div
|
|
|
@@ -116,7 +135,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="leftCenter" v-if="active1 == 2">
|
|
|
+ <div class="leftCenter" v-if="active1 == '勘验笔录'">
|
|
|
<div
|
|
|
class="addButton flex"
|
|
|
v-show="!show"
|
|
|
@@ -179,11 +198,88 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="leftCenter" v-if="active1 == '照片卷'">
|
|
|
+ <div
|
|
|
+ class="addButton flex"
|
|
|
+ v-show="!show"
|
|
|
+ style="margin-bottom: 10px"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ class="newbut"
|
|
|
+ :icon="Edit"
|
|
|
+ @click="handledrawCasePhotos([])"
|
|
|
+ >填写</el-button
|
|
|
+
|
|
|
+ >
|
|
|
+ <el-dropdown trigger="click" @command="exportToPDF" @visible-change="handleOpen">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ <el-button class="newbut" :icon="Download">下载</el-button>
|
|
|
+ </span>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item command="four">4联卡纸</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="a4">A4纸</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="a3">A3纸</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="itemList"
|
|
|
+ v-for="(items, indexs) in casePhotoList"
|
|
|
+ @click="handlItem2(items)"
|
|
|
+ :class="{ active: childrenList.value == items.id }"
|
|
|
+ :key="indexs"
|
|
|
+ >
|
|
|
+ <div class="ItemTitle">
|
|
|
+ <div class="text">
|
|
|
+ {{ items.name }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="operation"
|
|
|
+ v-if="childrenList.value == items.id"
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-dropdown trigger="click" @command="exportToPDF">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ <el-icon title="下载"><Download/></el-icon>
|
|
|
+ </span>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item command="four">4联卡纸</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="a4">A4纸</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="a3">A3纸</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ <i title="重命名" class="el-icon iconfont icon-rename" @click="handlemtk(items)"></i>
|
|
|
+ <!-- <el-icon title="重命名"
|
|
|
+ @click="
|
|
|
+ downloadByUrl({
|
|
|
+ url: items.filesUrl,
|
|
|
+ fileName: items.filesTitle,
|
|
|
+ })
|
|
|
+ "
|
|
|
+ ><Download
|
|
|
+ /></el-icon> -->
|
|
|
+ <el-icon title="编辑"
|
|
|
+ v-if="!show && items.createType != 'upload'"
|
|
|
+ @click="handledrawCasePhotos(items.id)"
|
|
|
+ ><Edit
|
|
|
+ /></el-icon>
|
|
|
+ <el-icon v-if="!show" @click="del2(items)" title="删除"
|
|
|
+ ><CircleClose
|
|
|
+ /></el-icon>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="abstractCentenr" v-if="active1 == 0">
|
|
|
+ <!-- 现场照片 -->
|
|
|
+ <div class="abstractCentenr" v-if="active1 == '现场照片'">
|
|
|
<div class="centerTop" v-show="!show">
|
|
|
<div class="import" @click="handleYr">
|
|
|
<el-icon size="26" color="#26559B">
|
|
|
@@ -229,7 +325,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="abstractCentenr" v-if="active1 == 1">
|
|
|
+ <!-- 现场图 -->
|
|
|
+ <div class="abstractCentenr" v-if="active1 == '现场图'">
|
|
|
<div class="imgSrcimport noView" v-if="!childrenList.src">暂无数据</div>
|
|
|
<div class="imgSrccentenr" v-else>
|
|
|
<img
|
|
|
@@ -240,7 +337,8 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="abstractCentenr" v-if="active1 == 2">
|
|
|
+ <!-- 勘验笔录 -->
|
|
|
+ <div class="abstractCentenr" v-if="active1 == '勘验笔录'">
|
|
|
<div
|
|
|
class="kybl"
|
|
|
v-if="childrenList.item && childrenList.item.createType == 'online'"
|
|
|
@@ -392,6 +490,29 @@
|
|
|
<div v-else class="noViewTitle">暂无数据</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="abstractCentenr" style="padding: 0" v-if="active1 == '照片卷'">
|
|
|
+ <showpages ref="showPagesRef" :photos="photos" v-if="childrenList.src" :content="childrenList.src"/>
|
|
|
+ <div v-else class="noView" >
|
|
|
+ <div
|
|
|
+ class="noViewTitle"
|
|
|
+ v-if="childrenList.item && childrenList.item.filesUrl"
|
|
|
+ >
|
|
|
+ <div class="zbzc">暂不支持预览</div>
|
|
|
+ <div
|
|
|
+ class="cursor-pointer down"
|
|
|
+ @click="
|
|
|
+ downloadByUrl({
|
|
|
+ fileName: childrenList.item && childrenList.item.filesTitle,
|
|
|
+ url: childrenList.item && childrenList.item.filesUrl,
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 下载
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else class="noViewTitle">暂无数据</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -399,9 +520,11 @@
|
|
|
import viewImg from "@/components/viewImg/list.vue";
|
|
|
import { computed, ref, reactive } from "vue";
|
|
|
import { addCaseScenes } from "./quisk";
|
|
|
+import showpages from "./showpages.vue";
|
|
|
import {
|
|
|
updateByTreeFileLists,
|
|
|
getByTreeFileLists,
|
|
|
+ getCasePhotoRollList,
|
|
|
caseExportImg,
|
|
|
overviewAdd,
|
|
|
TabulationAdd,
|
|
|
@@ -413,6 +536,9 @@ import {
|
|
|
addByMediaLiBrary,
|
|
|
getSceneListHasAi,
|
|
|
getCaseInquestInfoOld,
|
|
|
+ casePhotoUpdate,
|
|
|
+ casePhotodel,
|
|
|
+ getAllPhotoList,
|
|
|
show,
|
|
|
} from "@/store/case";
|
|
|
import {
|
|
|
@@ -440,10 +566,13 @@ import { addCaseFile, setTypeFile, addSceneImg1, addSceneImg2 } from "./quisk";
|
|
|
const caseId = computed(() => router.currentRoute.value?.params?.caseId);
|
|
|
const filesTypeId = ref(0);
|
|
|
const ImgsrcList = ref([]);
|
|
|
-const active1 = ref(0);
|
|
|
+const active1 = ref('现场图');
|
|
|
const active = ref(true);
|
|
|
const urlindex = ref(-1);
|
|
|
|
|
|
+const canvas = ref(null);
|
|
|
+const editor = ref(null);
|
|
|
+
|
|
|
const tabsRef = ref(null);
|
|
|
const showText = ref(show.value?false:true);
|
|
|
const settype = ref(false);
|
|
|
@@ -456,6 +585,13 @@ const childrenList = ref({
|
|
|
item: {},
|
|
|
caseFilesList: [],
|
|
|
});
|
|
|
+const casePhotoItem = ref({
|
|
|
+ id: '',
|
|
|
+ name: '',
|
|
|
+ content: '',
|
|
|
+ show: false,
|
|
|
+})
|
|
|
+const showPagesRef = ref(null);
|
|
|
const data = reactive({
|
|
|
title: "",
|
|
|
inquestNum: "", //现场勘验号
|
|
|
@@ -508,6 +644,8 @@ const data = reactive({
|
|
|
witnessInfo: [],
|
|
|
remark: "",
|
|
|
});
|
|
|
+const xczpfilesTypeId = ref(1);
|
|
|
+const photos = ref([]);
|
|
|
const showModal = ref(false);
|
|
|
const srcList = ref([]);
|
|
|
const klblId = ref(0);
|
|
|
@@ -515,6 +653,12 @@ const fileLists = ref([]);
|
|
|
const imgfileLists = ref([]);
|
|
|
const list = ref([]);
|
|
|
const fileList = ref([]);
|
|
|
+const casePhotoList = ref([{
|
|
|
+ id: 0,
|
|
|
+ name: '现场照片',
|
|
|
+ caseId: 336,
|
|
|
+ content:'现场照片',
|
|
|
+ }]);
|
|
|
const activeNames = ref(["1"]);
|
|
|
const { size, upload, removeFile, previewFile, file, accept } = useUpload({
|
|
|
maxSize: 10 * 1024 * 1024,
|
|
|
@@ -535,6 +679,10 @@ const {
|
|
|
const handleChange = (val: string[]) => {
|
|
|
console.log(val);
|
|
|
};
|
|
|
+const getImgList = async () => {
|
|
|
+ let imgList = await getAllPhotoList(filesTypeId.value)
|
|
|
+ photos.value = imgList.map(ele => ({...ele, url: ele.filesUrl,id: ele.filesId, name: ele.filesTitle})) || [];
|
|
|
+}
|
|
|
getList();
|
|
|
function handleActive(params) {
|
|
|
console.log("handleActive", params);
|
|
|
@@ -557,7 +705,7 @@ function handleSuccess(item) {
|
|
|
let uploadId = item?.data.id;
|
|
|
addByMediaLiBrary({
|
|
|
caseId: caseId.value,
|
|
|
- filesTypeId: active1.value == 2 ? klblId.value : childrenList.value.value,
|
|
|
+ filesTypeId: active1.value == '勘验笔录' ? klblId.value : childrenList.value.value,
|
|
|
uploadId,
|
|
|
}).then((res) => {
|
|
|
fileLists.value = [];
|
|
|
@@ -565,13 +713,25 @@ function handleSuccess(item) {
|
|
|
getList(true);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
function getList(refresh = false) {
|
|
|
+ //new 0 现场图 1 照片卷 2 现场照片 3 勘验笔录
|
|
|
+ //old 0 现场照片 1 现场图 2 勘验笔录
|
|
|
+ getCasePhotoRollList(caseId.value).then(res => {
|
|
|
+ casePhotoList.value = res || []
|
|
|
+ if(active1.value == '照片卷' && res && res.length){
|
|
|
+ handlItem2(res[0])
|
|
|
+ }
|
|
|
+ })
|
|
|
updateByTreeFileLists(caseId.value).then((res) => {
|
|
|
list.value =
|
|
|
res.find((ele) => ele.filesTypeName == "三录材料")?.childrenList || [];
|
|
|
klblId.value = list.value.find(
|
|
|
(ele) => ele.filesTypeName == "勘验笔录"
|
|
|
).filesTypeId;
|
|
|
+ let zpj = list.value.find((ele) => ele.filesTypeName == "现场照片");
|
|
|
+ filesTypeId.value = zpj.filesTypeId
|
|
|
+ getImgList()
|
|
|
if (show.value) {
|
|
|
//展示也过滤现场照片空数据
|
|
|
list.value[0].childrenList.map((ele) => {
|
|
|
@@ -588,19 +748,15 @@ function getList(refresh = false) {
|
|
|
}
|
|
|
if (!refresh) {
|
|
|
handleClick({
|
|
|
- index: active1.value,
|
|
|
+ paneName: active1.value,
|
|
|
childrenListvalue: childrenList.value,
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- let item = active1.value
|
|
|
- ? list.value[active1.value]
|
|
|
- : list.value.find(
|
|
|
- (item) => item.childrenList && item.childrenList.length
|
|
|
- );
|
|
|
+ let item = list.value.find((item) => item.filesTypeName == active1.value);
|
|
|
let arr2 = [];
|
|
|
- if (active1.value == 2 || active1.value == 1) {
|
|
|
+ if (active1.value == '现场照片' || active1.value == '现场图') {//现场图和勘验笔录
|
|
|
item.childrenList.map((ele) => {
|
|
|
if (ele.caseFilesList && ele.caseFilesList.length) {
|
|
|
ele.caseFilesList.map((element) => {
|
|
|
@@ -611,17 +767,18 @@ function getList(refresh = false) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- console.log("activeItem", list.value, "arr2", arr2);
|
|
|
- if (active1.value == 0 && childrenList.value.parentId) {
|
|
|
+ if (active1.value == '现场照片' && childrenList.value.parentId) {//现场照片
|
|
|
item = item.childrenList.find(
|
|
|
(ele) => ele.filesTypeId == childrenList.value.parentId
|
|
|
);
|
|
|
}
|
|
|
- if (active1.value == 0 && !childrenList.value.parentId) {
|
|
|
+ if (active1.value == '现场图' && !childrenList.value.parentId) {
|
|
|
item = item.childrenList[0];
|
|
|
}
|
|
|
+ console.log("activeItem", list.value, "arr2", arr2, item);
|
|
|
srcList.value =
|
|
|
- active1.value == 2 || active1.value == 1 ? arr2 : item.childrenList;
|
|
|
+ active1.value == '现场照片' || active1.value == '现场图' ? arr2 : item.childrenList;
|
|
|
+ console.log("srcList", srcList.value, item, childrenList, active1.value);
|
|
|
let activeIndex =
|
|
|
srcList.value.findIndex(
|
|
|
(item) => item.filesTypeId == childrenList.value.value
|
|
|
@@ -647,7 +804,7 @@ function getList(refresh = false) {
|
|
|
activeItem.filesUrl ||
|
|
|
(activeItem.caseFilesList && activeItem.caseFilesList[0]?.filesUrl);
|
|
|
childrenList.value.caseFilesList =
|
|
|
- active1.value == 2 || active1.value == 0
|
|
|
+ active1.value == '勘验笔录' || active1.value == '现场照片'
|
|
|
? activeItem.caseFilesList
|
|
|
: activeItem.childrenList;
|
|
|
});
|
|
|
@@ -656,43 +813,47 @@ async function handleAdd() {
|
|
|
await addCaseFile({ caseId: caseId.value, filesTypeName: ["三录材料"] });
|
|
|
getList(true);
|
|
|
}
|
|
|
-const handleClick = ({ index, childrenListvalue }) => {
|
|
|
+const handleClick = (a) => {
|
|
|
+ let { paneName, childrenListvalue } = a;
|
|
|
let newImgsrcList = [];
|
|
|
+ let index = list.value.findIndex((item) => item.filesTypeName == paneName);
|
|
|
+ console.log("handleClick", a ,paneName, list.value, index);
|
|
|
let childrenLists = list.value[index].childrenList;
|
|
|
- console.log("handleClick", index, childrenListvalue);
|
|
|
+ console.log("handleClickchildrenLists", list.value, index, childrenLists);
|
|
|
if (childrenListvalue && show.value) {
|
|
|
setTimeout(() => {
|
|
|
let indexshow1 = recursiveSearch(list.value[0].childrenList);
|
|
|
- let indexshow2 = recursiveSearch(list.value[1].childrenList);
|
|
|
- let indexshow3 = recursiveSearch([list.value[2]]);
|
|
|
- let tabsdom0 = document.getElementById("tab-0");
|
|
|
- let tabsdom1 = document.getElementById("tab-1");
|
|
|
- let tabsdom2 = document.getElementById("tab-2");
|
|
|
+ let indexshow2 = recursiveSearch(list.value[2].childrenList);
|
|
|
+ let indexshow3 = recursiveSearch([list.value[3]]);
|
|
|
+ let tabsdom0 = document.getElementById("tab-现场图");
|
|
|
+ let tabsdom1 = document.getElementById("tab-现场照片");
|
|
|
+ let tabsdom2 = document.getElementById("tab-勘验笔录");
|
|
|
if (!indexshow1 && tabsdom0) tabsdom0.style.display = "none";
|
|
|
if (!indexshow2 && tabsdom1) tabsdom1.style.display = "none";
|
|
|
if (!indexshow3 && tabsdom2) tabsdom2.style.display = "none";
|
|
|
if (indexshow1) {
|
|
|
} else if (indexshow2) {
|
|
|
- active1.value = 1;
|
|
|
- handleClick({index: active1.value})
|
|
|
+ active1.value = '现场照片';
|
|
|
+ handleClick({paneName: active1.value})
|
|
|
} else {
|
|
|
- active1.value = 2;
|
|
|
- handleClick({index: active1.value})
|
|
|
+ active1.value = '勘验笔录 ';
|
|
|
+ handleClick({paneName: active1.value})
|
|
|
}
|
|
|
showText.value = true
|
|
|
}, 500);
|
|
|
}
|
|
|
- if (index == 1) {
|
|
|
+ if (paneName == '现场照片') {
|
|
|
//现场照片
|
|
|
- let newindex = childrenLists.findIndex(
|
|
|
+ let ArrList = [];
|
|
|
+ childrenLists.map(ele => {
|
|
|
+ ArrList.push(...ele.childrenList)
|
|
|
+ })
|
|
|
+ let newindex = ArrList.findIndex(
|
|
|
(items) => items.caseFilesList && items.caseFilesList.length
|
|
|
);
|
|
|
newindex = newindex == -1?0:newindex
|
|
|
- let activeItem =
|
|
|
- (childrenLists[newindex]?.caseFilesList &&
|
|
|
- childrenLists[newindex]?.caseFilesList[0]) ||
|
|
|
- {};
|
|
|
- console.log("handleClick", activeItem, !activeItem);
|
|
|
+ let activeItem =ArrList[newindex] || {};
|
|
|
+ console.log("handleClick", activeItem, childrenLists);
|
|
|
if(!activeItem) return
|
|
|
childrenList.value.value = activeItem.filesTypeId;
|
|
|
childrenList.value.parentId = activeItem.parentId;
|
|
|
@@ -705,7 +866,7 @@ const handleClick = ({ index, childrenListvalue }) => {
|
|
|
ele.caseFilesList && newSrc.push(...ele.caseFilesList);
|
|
|
});
|
|
|
newImgsrcList = newSrc.map((ele) => ele.filesUrl);
|
|
|
- } else if (index == 2) {
|
|
|
+ } else if (paneName == '勘验笔录') {
|
|
|
//笔录
|
|
|
let activeItem =
|
|
|
(list.value[index].caseFilesList && list.value[index].caseFilesList[0]) ||
|
|
|
@@ -722,6 +883,15 @@ const handleClick = ({ index, childrenListvalue }) => {
|
|
|
[];
|
|
|
console.log("handleClick", newSrc, childrenLists.caseFilesList);
|
|
|
newImgsrcList = newSrc.filter((ele) => isImage(ele));
|
|
|
+ } else if (paneName == '照片卷') {
|
|
|
+ childrenList.value.src =''
|
|
|
+ //照片卷
|
|
|
+ let activeItem = casePhotoList.value[0]
|
|
|
+ console.log("handleClick", childrenLists,activeItem);
|
|
|
+ childrenList.value.src = activeItem.content;
|
|
|
+ childrenList.value.item = activeItem;
|
|
|
+ childrenList.value.filesId = activeItem.id;
|
|
|
+ childrenList.value.value = activeItem.id;
|
|
|
} else {
|
|
|
//现场图
|
|
|
let ArrList = [];
|
|
|
@@ -760,6 +930,13 @@ function handlItem1(item) {
|
|
|
// childrenList.value.caseFilesList = item.caseFilesList || [];
|
|
|
console.log("handleClick", item, childrenList.value);
|
|
|
}
|
|
|
+const handlItem2 = (item) => {
|
|
|
+ console.log("handlItem2", item, childrenList.value);
|
|
|
+ childrenList.value.value = item.id;
|
|
|
+ childrenList.value.filesId = item.id;
|
|
|
+ childrenList.value.item = item;
|
|
|
+ childrenList.value.src = item.content;
|
|
|
+}
|
|
|
const handleClick2 = (item) => {
|
|
|
console.log("handleClick2", item);
|
|
|
childrenList.value.value = item.filesTypeId;
|
|
|
@@ -826,7 +1003,23 @@ const del = async (file) => {
|
|
|
getList(true);
|
|
|
});
|
|
|
};
|
|
|
-
|
|
|
+const del2 = async (file) => {
|
|
|
+ console.log(file, "file");
|
|
|
+ ElMessageBox.confirm("确定删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ await casePhotodel({ caseId: caseId.value, id: file.id });
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功",
|
|
|
+ });
|
|
|
+ childrenList.value.src = "";
|
|
|
+ childrenList.value.value = "";
|
|
|
+ getList(true);
|
|
|
+ });
|
|
|
+};
|
|
|
const OverviewDel = async (file, filesTypeName) => {
|
|
|
console.log(file, "file");
|
|
|
ElMessageBox.confirm("确定删除?", "提示", {
|
|
|
@@ -895,15 +1088,29 @@ const handleEdit = async (lists) => {
|
|
|
lists,
|
|
|
lists.map((ele) => ele.filesId)
|
|
|
);
|
|
|
+ let item = list.value.find(ele => ele.filesTypeName == active1.value);
|
|
|
await setTypeFile({
|
|
|
caseId: caseId.value,
|
|
|
// filesId: lists.map(ele => ele.filesId),
|
|
|
filesTypeId: childrenList.value.value,
|
|
|
- fileOptions: list.value[active1.value].childrenList,
|
|
|
+ fileOptions: item.childrenList,
|
|
|
filesIds: lists.map((ele) => ele.filesId),
|
|
|
});
|
|
|
getList(true);
|
|
|
};
|
|
|
+async function handledrawCasePhotos(val) {
|
|
|
+ const id = Array.isArray(val) ? val.toString() : val;
|
|
|
+ router.push({
|
|
|
+ name: RouteName.drawCasePhotos,
|
|
|
+ params: { caseId: caseId.value! },
|
|
|
+ query: {
|
|
|
+ id: id,
|
|
|
+ filesTypeId: filesTypeId.value,
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ console.log("handleAdd");
|
|
|
+}
|
|
|
const handleView = (src) => {
|
|
|
if (src && !ImgsrcList.value.includes(src)) {
|
|
|
ImgsrcList.value.push(src);
|
|
|
@@ -914,6 +1121,83 @@ const handleIsShow = (item) => {
|
|
|
if (!show.value) return true;
|
|
|
return !recursiveSearch(item && item.childrenList);
|
|
|
};
|
|
|
+
|
|
|
+const handlemtk = (item) => {
|
|
|
+ casePhotoItem.value = {
|
|
|
+ show: true,
|
|
|
+ ...item,
|
|
|
+ };
|
|
|
+ // ElMessageBox.prompt("", "重命名", {
|
|
|
+ // confirmButtonText: "确定",
|
|
|
+ // customClass: "promptClass",
|
|
|
+ // cancelButtonText: "取消",
|
|
|
+ // showClose: true,
|
|
|
+ // inputValue: item.name,
|
|
|
+ // inputValidator: (value) => {
|
|
|
+ // if (!value) {
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // return true;
|
|
|
+ // },
|
|
|
+ // inputErrorMessage: "请输入名称",
|
|
|
+ // })
|
|
|
+ // .then(async ({ value }) => {
|
|
|
+ // ElMessage({
|
|
|
+ // type: "success",
|
|
|
+ // message: `修改成功`,
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // .catch(() => {
|
|
|
+ // });
|
|
|
+};
|
|
|
+const handleConfirm = async () => {
|
|
|
+ let value = casePhotoItem.value.name;
|
|
|
+ if(!value){
|
|
|
+ return ElMessage.error("请输入修改名称");;
|
|
|
+ }
|
|
|
+ await casePhotoUpdate({
|
|
|
+ ...casePhotoItem.value,
|
|
|
+ name: value,
|
|
|
+ });
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: `修改成功`,
|
|
|
+ });
|
|
|
+ casePhotoItem.value.show = false;
|
|
|
+ await getList()
|
|
|
+}
|
|
|
+const exportToPDF = (paperType) => {
|
|
|
+ showPagesRef.value.exportToPDF(paperType, childrenList.value?.item?.name);
|
|
|
+}
|
|
|
+const handleOpen = (val) => {
|
|
|
+ if(!val){
|
|
|
+ handleClick({paneName: '照片卷'})
|
|
|
+ }else{
|
|
|
+ console.log("handleOpen");
|
|
|
+ let Alllist = {
|
|
|
+ pages: [],
|
|
|
+ indexingLineList: [],
|
|
|
+ }
|
|
|
+ casePhotoList.value.map(ele => {
|
|
|
+ let content = ele.content && JSON.parse(ele.content);
|
|
|
+ let { pages , indexingLineList } = content
|
|
|
+ let xAdd = (600 + 4)*Alllist.pages.length
|
|
|
+ if(xAdd){
|
|
|
+ indexingLineList = indexingLineList.map(element => {
|
|
|
+ let points = element.points.map(item => ({...item,x:item.x+xAdd}))
|
|
|
+ return {...element,points}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ Alllist.pages.push(...pages)
|
|
|
+ Alllist.indexingLineList.push(...indexingLineList)
|
|
|
+ console.log("handleOpen", content);
|
|
|
+ })
|
|
|
+ childrenList.value.src = Alllist;
|
|
|
+ childrenList.value.value = -1;
|
|
|
+
|
|
|
+ console.log("handleOpen", Alllist);
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.scene {
|
|
|
@@ -925,7 +1209,7 @@ const handleIsShow = (item) => {
|
|
|
overflow-x: scroll;
|
|
|
.list {
|
|
|
.addButton {
|
|
|
- padding: 0 34px;
|
|
|
+ padding: 20px 34px 0 34px;
|
|
|
margin-left: 0px;
|
|
|
}
|
|
|
.listTitle {
|
|
|
@@ -1130,3 +1414,5 @@ const handleIsShow = (item) => {
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+
|
|
|
+
|