|
|
@@ -1,22 +1,24 @@
|
|
|
<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-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" >
|
|
|
+ <div class="dialog-footer text-center">
|
|
|
<el-button @click="casePhotoItem.show = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleConfirm">
|
|
|
- 确定
|
|
|
- </el-button>
|
|
|
+ <el-button type="primary" @click="handleConfirm"> 确定 </el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
- <!-- <el-button class="w-full" @click="handledrawCasePhotos">照片卷</el-button> -->
|
|
|
+ <!-- <el-button class="w-full" @click="handledrawCasePhotos">照片卷</el-button> -->
|
|
|
<div class="demo-image__preview">
|
|
|
<el-image-viewer
|
|
|
hide-on-click-modal
|
|
|
@@ -40,11 +42,11 @@
|
|
|
ref="tabsRef"
|
|
|
@tab-click="handleClick"
|
|
|
>
|
|
|
- <!-- //new 0 现场图 1 照片卷 2 现场照片 3 勘验笔录 -->
|
|
|
+ <!-- //new 0 现场图 1 照片卷 2 现场照片 3 勘验笔录 -->
|
|
|
<el-tab-pane
|
|
|
v-for="(item, index) in list"
|
|
|
:key="item.filesTypeName"
|
|
|
- :label="showText?item.filesTypeName:''"
|
|
|
+ :label="showText ? item.filesTypeName : ''"
|
|
|
:childrenList="item.childrenList"
|
|
|
:class="`handleIsShow show${handleIsShow(item)}`"
|
|
|
:name="item.filesTypeName"
|
|
|
@@ -65,7 +67,9 @@
|
|
|
"
|
|
|
>
|
|
|
<span class="el-dropdown-link">
|
|
|
- <el-icon class="el-icon--right" title="新增"><Plus /></el-icon>
|
|
|
+ <el-icon class="el-icon--right" title="新增"
|
|
|
+ ><Plus
|
|
|
+ /></el-icon>
|
|
|
</span>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
@@ -87,7 +91,10 @@
|
|
|
:key="indexs"
|
|
|
>
|
|
|
<div class="ItemTitle">
|
|
|
- <div class="text" :title="items.filesTypeName || items.filesTitle">
|
|
|
+ <div
|
|
|
+ class="text"
|
|
|
+ :title="items.filesTypeName || items.filesTitle"
|
|
|
+ >
|
|
|
{{ items.filesTypeName || items.filesTitle }}
|
|
|
</div>
|
|
|
<div
|
|
|
@@ -98,7 +105,8 @@
|
|
|
childrenList.filesId == items.filesId
|
|
|
"
|
|
|
>
|
|
|
- <el-icon title="下载"
|
|
|
+ <el-icon
|
|
|
+ title="下载"
|
|
|
v-if="items.filesUrl"
|
|
|
@click="
|
|
|
downloadByUrl({
|
|
|
@@ -108,12 +116,15 @@
|
|
|
"
|
|
|
><Download
|
|
|
/></el-icon>
|
|
|
- <el-icon title="编辑"
|
|
|
- v-if="items.oldData != 1"
|
|
|
+ <el-icon
|
|
|
+ title="编辑"
|
|
|
+ v-if="items.oldData != 1"
|
|
|
@click="handleoverviewEdit(a.filesTypeName, items)"
|
|
|
><Edit
|
|
|
/></el-icon>
|
|
|
- <el-icon @click="OverviewDel(items, a.filesTypeName)" title="删除"
|
|
|
+ <el-icon
|
|
|
+ @click="OverviewDel(items, a.filesTypeName)"
|
|
|
+ title="删除"
|
|
|
><CircleClose
|
|
|
/></el-icon>
|
|
|
</div>
|
|
|
@@ -122,7 +133,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="leftCenter" v-if="active1 == '现场照片'">
|
|
|
- <div v-for="(a, b) in item.childrenList" :key="b" v-show="show?recursiveSearch(a.childrenList):true">
|
|
|
+ <div
|
|
|
+ v-for="(a, b) in item.childrenList"
|
|
|
+ :key="b"
|
|
|
+ v-show="show ? recursiveSearch(a.childrenList) : true"
|
|
|
+ >
|
|
|
<div class="listTitle">{{ a.filesTypeName }}</div>
|
|
|
<div
|
|
|
class="itemList"
|
|
|
@@ -177,7 +192,8 @@
|
|
|
class="operation"
|
|
|
v-if="childrenList.value == items.filesId"
|
|
|
>
|
|
|
- <el-icon title="下载"
|
|
|
+ <el-icon
|
|
|
+ title="下载"
|
|
|
@click="
|
|
|
downloadByUrl({
|
|
|
url: items.filesUrl,
|
|
|
@@ -186,7 +202,8 @@
|
|
|
"
|
|
|
><Download
|
|
|
/></el-icon>
|
|
|
- <el-icon title="编辑"
|
|
|
+ <el-icon
|
|
|
+ title="编辑"
|
|
|
v-if="!show && items.createType != 'upload'"
|
|
|
@click="handleRecords(items.filesId)"
|
|
|
><Edit
|
|
|
@@ -209,22 +226,13 @@
|
|
|
:icon="Edit"
|
|
|
@click="handledrawCasePhotos([])"
|
|
|
>制卷</el-button
|
|
|
-
|
|
|
>
|
|
|
- <el-button class="newbut" @click="exportToPDF(true)" :icon="Download">下载</el-button>
|
|
|
- <!-- @visible-change="handleOpen" -->
|
|
|
- <!-- <el-dropdown trigger="click" @command="exportToPDF">
|
|
|
- <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> -->
|
|
|
+ <el-button
|
|
|
+ class="newbut"
|
|
|
+ @click="exportToPDF(true)"
|
|
|
+ :icon="Download"
|
|
|
+ >下载</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div
|
|
|
class="itemList"
|
|
|
@@ -237,35 +245,17 @@
|
|
|
<div class="text">
|
|
|
{{ items.name }}
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="operation"
|
|
|
- v-if="childrenList.value == items.id"
|
|
|
- >
|
|
|
- <el-icon title="下载" @click="exportToPDF"><Download/></el-icon>
|
|
|
-
|
|
|
- <!-- <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,
|
|
|
- })
|
|
|
- "
|
|
|
+ <div class="operation" v-if="childrenList.value == items.id">
|
|
|
+ <el-icon title="下载" @click="exportToPDF(false, items)"
|
|
|
><Download
|
|
|
- /></el-icon> -->
|
|
|
- <el-icon title="编辑"
|
|
|
+ /></el-icon>
|
|
|
+ <i
|
|
|
+ title="重命名"
|
|
|
+ class="el-icon iconfont icon-rename"
|
|
|
+ @click="handlemtk(items)"
|
|
|
+ ></i>
|
|
|
+ <el-icon
|
|
|
+ title="编辑"
|
|
|
v-if="!show && items.createType != 'upload'"
|
|
|
@click="handledrawCasePhotos(items.id)"
|
|
|
><Edit
|
|
|
@@ -352,8 +342,12 @@
|
|
|
<div>指派/报告单位:{{ data.reportDept }}</div>
|
|
|
<div>时间:{{ data.inquestTime }}</div>
|
|
|
<div>勘验事由:{{ data.inquestResource }}</div>
|
|
|
- <div>现场勘验时间:
|
|
|
- <span v-if="data.times && data.times[0]">{{ dayjs(data.times[0]).format("YYYY-MM-DD HH:mm:ss") }} ~ {{ dayjs(data.times[1]).format("YYYY-MM-DD HH:mm:ss") }}</span>
|
|
|
+ <div>
|
|
|
+ 现场勘验时间:
|
|
|
+ <span v-if="data.times && data.times[0]"
|
|
|
+ >{{ dayjs(data.times[0]).format("YYYY-MM-DD HH:mm:ss") }} ~
|
|
|
+ {{ dayjs(data.times[1]).format("YYYY-MM-DD HH:mm:ss") }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
<div>现场地点:{{ data.address }}</div>
|
|
|
<div>现场保护情况:{{ data.protectionSituation }}</div>
|
|
|
@@ -383,7 +377,9 @@
|
|
|
<el-checkbox :value="1" label="报案人进入" />
|
|
|
<el-checkbox :value="2" label="其他" />
|
|
|
</el-checkbox-group>
|
|
|
- <span style="margin-left: 20px" v-if="data.changeReasonOtherValue">{{ data.changeReasonOtherValue }}</span>
|
|
|
+ <span style="margin-left: 20px" v-if="data.changeReasonOtherValue">{{
|
|
|
+ data.changeReasonOtherValue
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
天气:
|
|
|
@@ -455,9 +451,7 @@
|
|
|
>
|
|
|
姓名: {{ info.name || "_____" }} 性别:
|
|
|
{{ info.sex ? "女" : "男" }}出生日期:
|
|
|
- {{
|
|
|
- info.birthday && dayjs(info.birthday).format("YYYY-MM-DD")
|
|
|
- }}
|
|
|
+ {{ info.birthday && dayjs(info.birthday).format("YYYY-MM-DD") }}
|
|
|
住址: {{ info.address }}
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -494,8 +488,13 @@
|
|
|
</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" >
|
|
|
+ <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"
|
|
|
@@ -531,6 +530,7 @@ import {
|
|
|
casePhotoUpdate,
|
|
|
casePhotodel,
|
|
|
getAllPhotoList,
|
|
|
+ getCaseInfoData,
|
|
|
show,
|
|
|
} from "@/store/case";
|
|
|
import {
|
|
|
@@ -558,7 +558,7 @@ 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('现场图');
|
|
|
+const active1 = ref("现场图");
|
|
|
const active = ref(true);
|
|
|
const urlindex = ref(-1);
|
|
|
|
|
|
@@ -566,7 +566,7 @@ const canvas = ref(null);
|
|
|
const editor = ref(null);
|
|
|
|
|
|
const tabsRef = ref(null);
|
|
|
-const showText = ref(show.value?false:true);
|
|
|
+const showText = ref(show.value ? false : true);
|
|
|
const settype = ref(false);
|
|
|
const childrenList = ref({
|
|
|
list: [],
|
|
|
@@ -578,11 +578,11 @@ const childrenList = ref({
|
|
|
caseFilesList: [],
|
|
|
});
|
|
|
const casePhotoItem = ref({
|
|
|
- id: '',
|
|
|
- name: '',
|
|
|
- content: '',
|
|
|
+ id: "",
|
|
|
+ name: "",
|
|
|
+ content: "",
|
|
|
show: false,
|
|
|
-})
|
|
|
+});
|
|
|
const showPagesRef = ref(null);
|
|
|
const data = reactive({
|
|
|
title: "",
|
|
|
@@ -645,12 +645,15 @@ const fileLists = ref([]);
|
|
|
const imgfileLists = ref([]);
|
|
|
const list = ref([]);
|
|
|
const fileList = ref([]);
|
|
|
-const casePhotoList = ref([{
|
|
|
- id: 0,
|
|
|
- name: '现场照片',
|
|
|
- caseId: 336,
|
|
|
- content:'现场照片',
|
|
|
- }]);
|
|
|
+const casePhotoList = ref([
|
|
|
+ {
|
|
|
+ id: 0,
|
|
|
+ name: "现场照片",
|
|
|
+ caseId: 336,
|
|
|
+ content: "现场照片",
|
|
|
+ },
|
|
|
+]);
|
|
|
+const caseInfo = computed(() => getCaseInfoData());
|
|
|
const activeNames = ref(["1"]);
|
|
|
const { size, upload, removeFile, previewFile, file, accept } = useUpload({
|
|
|
maxSize: 10 * 1024 * 1024,
|
|
|
@@ -672,9 +675,15 @@ 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})) || [];
|
|
|
-}
|
|
|
+ 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);
|
|
|
@@ -686,8 +695,8 @@ const initInfo = async (inquestFileId) => {
|
|
|
// console.log("Key is " + k);
|
|
|
if (res.data[k]) {
|
|
|
data[k] = res.data[k];
|
|
|
- }else{
|
|
|
- data[k] = '';
|
|
|
+ } else {
|
|
|
+ data[k] = "";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -697,7 +706,8 @@ function handleSuccess(item) {
|
|
|
let uploadId = item?.data.id;
|
|
|
addByMediaLiBrary({
|
|
|
caseId: caseId.value,
|
|
|
- filesTypeId: active1.value == '勘验笔录' ? klblId.value : childrenList.value.value,
|
|
|
+ filesTypeId:
|
|
|
+ active1.value == "勘验笔录" ? klblId.value : childrenList.value.value,
|
|
|
uploadId,
|
|
|
}).then((res) => {
|
|
|
fileLists.value = [];
|
|
|
@@ -708,13 +718,13 @@ function handleSuccess(item) {
|
|
|
|
|
|
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 && !refresh){
|
|
|
- handlItem2(res[0])
|
|
|
+ //old 0 现场照片 1 现场图 2 勘验笔录
|
|
|
+ getCasePhotoRollList(caseId.value).then((res) => {
|
|
|
+ casePhotoList.value = res || [];
|
|
|
+ if (active1.value == "照片卷" && res && res.length && !refresh) {
|
|
|
+ handlItem2(res[0]);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
updateByTreeFileLists(caseId.value).then((res) => {
|
|
|
list.value =
|
|
|
res.find((ele) => ele.filesTypeName == "三录材料")?.childrenList || [];
|
|
|
@@ -722,8 +732,8 @@ function getList(refresh = false) {
|
|
|
(ele) => ele.filesTypeName == "勘验笔录"
|
|
|
).filesTypeId;
|
|
|
let zpj = list.value.find((ele) => ele.filesTypeName == "现场照片");
|
|
|
- filesTypeId.value = zpj.filesTypeId
|
|
|
- getImgList()
|
|
|
+ filesTypeId.value = zpj.filesTypeId;
|
|
|
+ getImgList();
|
|
|
if (show.value) {
|
|
|
//展示也过滤现场照片空数据
|
|
|
list.value[0].childrenList.map((ele) => {
|
|
|
@@ -748,7 +758,8 @@ function getList(refresh = false) {
|
|
|
|
|
|
let item = list.value.find((item) => item.filesTypeName == active1.value);
|
|
|
let arr2 = [];
|
|
|
- if (active1.value == '现场照片' || active1.value == '现场图') {//现场图和勘验笔录
|
|
|
+ if (active1.value == "现场照片" || active1.value == "现场图") {
|
|
|
+ //现场图和勘验笔录
|
|
|
item.childrenList.map((ele) => {
|
|
|
if (ele.caseFilesList && ele.caseFilesList.length) {
|
|
|
ele.caseFilesList.map((element) => {
|
|
|
@@ -759,17 +770,20 @@ function getList(refresh = false) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if (active1.value == '现场照片' && childrenList.value.parentId) {//现场照片
|
|
|
+ if (active1.value == "现场照片" && childrenList.value.parentId) {
|
|
|
+ //现场照片
|
|
|
item = item.childrenList.find(
|
|
|
(ele) => ele.filesTypeId == childrenList.value.parentId
|
|
|
);
|
|
|
}
|
|
|
- if (active1.value == '现场图' && !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 == '现场照片' || active1.value == '现场图' ? arr2 : item.childrenList;
|
|
|
+ active1.value == "现场照片" || active1.value == "现场图"
|
|
|
+ ? arr2
|
|
|
+ : item.childrenList;
|
|
|
console.log("srcList", srcList.value, item, childrenList, active1.value);
|
|
|
let activeIndex =
|
|
|
srcList.value.findIndex(
|
|
|
@@ -796,7 +810,7 @@ function getList(refresh = false) {
|
|
|
activeItem.filesUrl ||
|
|
|
(activeItem.caseFilesList && activeItem.caseFilesList[0]?.filesUrl);
|
|
|
childrenList.value.caseFilesList =
|
|
|
- active1.value == '勘验笔录' || active1.value == '现场照片'
|
|
|
+ active1.value == "勘验笔录" || active1.value == "现场照片"
|
|
|
? activeItem.caseFilesList
|
|
|
: activeItem.childrenList;
|
|
|
});
|
|
|
@@ -826,31 +840,31 @@ const handleClick = (a) => {
|
|
|
if (!indexshow4 && tabsdom3) tabsdom3.style.display = "none";
|
|
|
if (indexshow1) {
|
|
|
} else if (indexshow2) {
|
|
|
- active1.value = '现场照片';
|
|
|
- handleClick({paneName: active1.value})
|
|
|
+ active1.value = "现场照片";
|
|
|
+ handleClick({ paneName: active1.value });
|
|
|
} else if (indexshow4) {
|
|
|
- active1.value = '照片卷';
|
|
|
- handleClick({paneName: active1.value})
|
|
|
+ active1.value = "照片卷";
|
|
|
+ handleClick({ paneName: active1.value });
|
|
|
} else {
|
|
|
- active1.value = '勘验笔录';
|
|
|
- handleClick({paneName: active1.value})
|
|
|
+ active1.value = "勘验笔录";
|
|
|
+ handleClick({ paneName: active1.value });
|
|
|
}
|
|
|
- showText.value = true
|
|
|
+ showText.value = true;
|
|
|
}, 500);
|
|
|
}
|
|
|
- if (paneName == '现场照片') {
|
|
|
+ if (paneName == "现场照片") {
|
|
|
//现场照片
|
|
|
let ArrList = [];
|
|
|
- childrenLists.map(ele => {
|
|
|
- ArrList.push(...ele.childrenList)
|
|
|
- })
|
|
|
+ childrenLists.map((ele) => {
|
|
|
+ ArrList.push(...ele.childrenList);
|
|
|
+ });
|
|
|
let newindex = ArrList.findIndex(
|
|
|
(items) => items.caseFilesList && items.caseFilesList.length
|
|
|
);
|
|
|
- newindex = newindex == -1?0:newindex
|
|
|
- let activeItem =ArrList[newindex] || {};
|
|
|
+ newindex = newindex == -1 ? 0 : newindex;
|
|
|
+ let activeItem = ArrList[newindex] || {};
|
|
|
console.log("handleClick", activeItem, childrenLists);
|
|
|
- if(!activeItem) return
|
|
|
+ if (!activeItem) return;
|
|
|
childrenList.value.value = activeItem.filesTypeId;
|
|
|
childrenList.value.parentId = activeItem.parentId;
|
|
|
childrenList.value.filesId = activeItem.filesId;
|
|
|
@@ -862,7 +876,7 @@ const handleClick = (a) => {
|
|
|
ele.caseFilesList && newSrc.push(...ele.caseFilesList);
|
|
|
});
|
|
|
newImgsrcList = newSrc.map((ele) => ele.filesUrl);
|
|
|
- } else if (paneName == '勘验笔录') {
|
|
|
+ } else if (paneName == "勘验笔录") {
|
|
|
//笔录
|
|
|
let activeItem =
|
|
|
(list.value[index].caseFilesList && list.value[index].caseFilesList[0]) ||
|
|
|
@@ -879,11 +893,11 @@ const handleClick = (a) => {
|
|
|
[];
|
|
|
console.log("handleClick", newSrc, childrenLists.caseFilesList);
|
|
|
newImgsrcList = newSrc.filter((ele) => isImage(ele));
|
|
|
- } else if (paneName == '照片卷') {
|
|
|
- childrenList.value.src =''
|
|
|
+ } else if (paneName == "照片卷") {
|
|
|
+ childrenList.value.src = "";
|
|
|
//照片卷
|
|
|
- let activeItem = casePhotoList.value[0] || {}
|
|
|
- console.log("handleClick", childrenLists,activeItem);
|
|
|
+ let activeItem = casePhotoList.value[0] || {};
|
|
|
+ console.log("handleClick", childrenLists, activeItem);
|
|
|
childrenList.value.src = activeItem.content;
|
|
|
childrenList.value.item = activeItem;
|
|
|
childrenList.value.filesId = activeItem.id;
|
|
|
@@ -899,9 +913,11 @@ const handleClick = (a) => {
|
|
|
);
|
|
|
return index2 != -1;
|
|
|
});
|
|
|
- console.log("handleClick", childrenLists, ArrList,index1,index2);
|
|
|
+ console.log("handleClick", childrenLists, ArrList, index1, index2);
|
|
|
let activeItem =
|
|
|
- list.value[index].childrenList[index1 == -1?0:index1]?.childrenList[index2 == -1?0:index2] || {};
|
|
|
+ list.value[index].childrenList[index1 == -1 ? 0 : index1]?.childrenList[
|
|
|
+ index2 == -1 ? 0 : index2
|
|
|
+ ] || {};
|
|
|
childrenList.value.value = activeItem.filesTypeId;
|
|
|
childrenList.value.parentId = activeItem.parentId;
|
|
|
childrenList.value.caseFilesList = activeItem.caseFilesList || [];
|
|
|
@@ -932,7 +948,7 @@ const handlItem2 = (item) => {
|
|
|
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;
|
|
|
@@ -1085,7 +1101,7 @@ const handleEdit = async (lists) => {
|
|
|
lists,
|
|
|
lists.map((ele) => ele.filesId)
|
|
|
);
|
|
|
- let item = list.value.find(ele => ele.filesTypeName == active1.value);
|
|
|
+ let item = list.value.find((ele) => ele.filesTypeName == active1.value);
|
|
|
await setTypeFile({
|
|
|
caseId: caseId.value,
|
|
|
// filesId: lists.map(ele => ele.filesId),
|
|
|
@@ -1103,8 +1119,7 @@ async function handledrawCasePhotos(val) {
|
|
|
query: {
|
|
|
id: id,
|
|
|
filesTypeId: filesTypeId.value,
|
|
|
- }
|
|
|
-
|
|
|
+ },
|
|
|
});
|
|
|
console.log("handleAdd");
|
|
|
}
|
|
|
@@ -1148,60 +1163,65 @@ const handlemtk = (item) => {
|
|
|
// });
|
|
|
};
|
|
|
const handleConfirm = async () => {
|
|
|
- let value = casePhotoItem.value.name;
|
|
|
- if(!value || value.trim() == ""){
|
|
|
- return ElMessage.error("请输入修改名称");;
|
|
|
- }
|
|
|
- await casePhotoUpdate({
|
|
|
- ...casePhotoItem.value,
|
|
|
- name: value,
|
|
|
- });
|
|
|
- ElMessage({
|
|
|
- type: "success",
|
|
|
- message: `修改成功`,
|
|
|
- });
|
|
|
- casePhotoItem.value.show = false;
|
|
|
- await getList(true)
|
|
|
-}
|
|
|
-const exportToPDF = async (isAll) => {
|
|
|
- if(isAll === true){
|
|
|
- await handleOpen(true)
|
|
|
+ let value = casePhotoItem.value.name;
|
|
|
+ if (!value || value.trim() == "") {
|
|
|
+ return ElMessage.error("请输入修改名称");
|
|
|
}
|
|
|
- await exportCasePhotos({showPagesRef: showPagesRef.value})
|
|
|
+ await casePhotoUpdate({
|
|
|
+ ...casePhotoItem.value,
|
|
|
+ name: value,
|
|
|
+ });
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ message: `修改成功`,
|
|
|
+ });
|
|
|
+ casePhotoItem.value.show = false;
|
|
|
+ await getList(true);
|
|
|
+};
|
|
|
+const exportToPDF = async (isAll, item) => {
|
|
|
+ if (isAll === true) {
|
|
|
+ await handleOpen(true);
|
|
|
+ }
|
|
|
+ await exportCasePhotos({
|
|
|
+ showPagesRef: showPagesRef.value,
|
|
|
+ title: (isAll ? caseInfo.value.caseTitle : item.name) + "照片卷",
|
|
|
+ });
|
|
|
console.log("exportToPDF完毕");
|
|
|
- if(isAll){
|
|
|
- await handleOpen(false)
|
|
|
+ if (isAll) {
|
|
|
+ await handleOpen(false);
|
|
|
}
|
|
|
- // showPagesRef.value.exportToPDF(paperType, childrenList.value?.item?.name);
|
|
|
-}
|
|
|
+};
|
|
|
const handleOpen = (val) => {
|
|
|
- if(!val){
|
|
|
- handleClick({paneName: '照片卷'})
|
|
|
- }else{
|
|
|
+ if (!val) {
|
|
|
+ handleClick({ paneName: "照片卷" });
|
|
|
+ } else {
|
|
|
console.log("handleOpen");
|
|
|
let Alllist = {
|
|
|
pages: [],
|
|
|
indexingLineList: [],
|
|
|
- }
|
|
|
- casePhotoList.value.map(ele => {
|
|
|
+ };
|
|
|
+ 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}
|
|
|
- })
|
|
|
+ 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)
|
|
|
+ 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 {
|
|
|
@@ -1230,8 +1250,8 @@ const handleOpen = (val) => {
|
|
|
}
|
|
|
}
|
|
|
.itemList {
|
|
|
- &:hover{
|
|
|
- background: rgba(69,144,255,0.1);;
|
|
|
+ &:hover {
|
|
|
+ background: rgba(69, 144, 255, 0.1);
|
|
|
}
|
|
|
.ItemTitle {
|
|
|
padding: 25px 48px;
|
|
|
@@ -1239,7 +1259,7 @@ const handleOpen = (val) => {
|
|
|
font-size: 14px;
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
line-height: 22px;
|
|
|
- .text{
|
|
|
+ .text {
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
display: -webkit-box;
|
|
|
@@ -1375,12 +1395,12 @@ const handleOpen = (val) => {
|
|
|
font-weight: 400;
|
|
|
font-size: 16px;
|
|
|
color: rgba(0, 0, 0, 0.45);
|
|
|
- &:hover {
|
|
|
- // font-weight: bold;
|
|
|
- font-size: 16px;
|
|
|
- color: #26559b;
|
|
|
- line-height: 22px;
|
|
|
- }
|
|
|
+ &:hover {
|
|
|
+ // font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #26559b;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
}
|
|
|
.is-active {
|
|
|
// font-weight: bold;
|
|
|
@@ -1413,7 +1433,8 @@ const handleOpen = (val) => {
|
|
|
.el-checkbox__label {
|
|
|
color: rgba(0, 0, 0, 0.85) !important;
|
|
|
}
|
|
|
- .el-tabs__nav-next, .el-tabs__nav-prev{
|
|
|
+ .el-tabs__nav-next,
|
|
|
+ .el-tabs__nav-prev {
|
|
|
top: -9px;
|
|
|
}
|
|
|
}
|