|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-button :icon="h(ColumnHeightOutlined)" @click="moveFolderOrFile">移动</a-button>
|
|
|
|
|
<a-button :icon="h(DeleteOutlined)" @click="deleteFolderOrFile">删除 </a-button>
|
|
|
|
|
<a-button :icon="h(DownloadOutlined)" @click="compressFolderOrFile">压缩</a-button>
|
|
|
|
|
<!-- <a-button :icon="h(DownloadOutlined)" @click="compressFolderOrFile">压缩</a-button> -->
|
|
|
|
|
<a-radio-group v-model:value="tableType">
|
|
|
|
|
<a-radio-button value="table"><BarsOutlined /></a-radio-button>
|
|
|
|
|
<a-radio-button value="store"><AppstoreOutlined /></a-radio-button>
|
|
|
|
@ -115,7 +115,7 @@
|
|
|
|
|
<EditOutlined @click="renameRecord(record)" />
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
<a-tooltip placement="top">
|
|
|
|
|
<!-- <a-tooltip placement="top">
|
|
|
|
|
<template #title>
|
|
|
|
|
<span>
|
|
|
|
|
{{ record.showOnMap == 1 ? '在地图上取消加载' : '在地图上加载' }}
|
|
|
|
@ -137,19 +137,15 @@
|
|
|
|
|
v-html="svg_showOnMap_0"
|
|
|
|
|
/>
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
</a-tooltip> -->
|
|
|
|
|
<a-tooltip placement="top">
|
|
|
|
|
<template #title>
|
|
|
|
|
<div>查看地图图片历史路径</div>
|
|
|
|
|
<div>只展示在地图上加载的图片</div>
|
|
|
|
|
<!-- <div>只展示在地图上加载的图片</div> -->
|
|
|
|
|
</template>
|
|
|
|
|
<a-button
|
|
|
|
|
type="text"
|
|
|
|
|
v-if="
|
|
|
|
|
record.objectKey &&
|
|
|
|
|
record.objectKey.includes('.jpeg') &&
|
|
|
|
|
record.showOnMap == 1
|
|
|
|
|
"
|
|
|
|
|
v-if="record.objectKey && record.objectKey.includes('.jpeg')"
|
|
|
|
|
>
|
|
|
|
|
<BorderInnerOutlined @click="showPathDiv(record)" />
|
|
|
|
|
</a-button>
|
|
|
|
@ -263,32 +259,10 @@
|
|
|
|
|
:previewRecordList="previewRecordList"
|
|
|
|
|
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
|
|
|
|
@closeModal="closeModal"
|
|
|
|
|
@handleSuccess="handleSuccess"
|
|
|
|
|
@handleSuccessPreview="handleSuccessPreview"
|
|
|
|
|
@openPathModal="openPathModal"
|
|
|
|
|
/>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- 路径地图弹窗 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
v-model:open="pathOpen"
|
|
|
|
|
width="100%"
|
|
|
|
|
wrap-class-name="full-modal"
|
|
|
|
|
:centered="true"
|
|
|
|
|
:closable="false"
|
|
|
|
|
:footer="null"
|
|
|
|
|
:destroyOnClose="true"
|
|
|
|
|
:keyboard="false"
|
|
|
|
|
:mask="false"
|
|
|
|
|
:maskClosable="false"
|
|
|
|
|
>
|
|
|
|
|
<Path
|
|
|
|
|
:pathDivShow="pathDivShow"
|
|
|
|
|
:allImageDataList="allImageDataList"
|
|
|
|
|
:nowShowImageData="nowShowImageData"
|
|
|
|
|
:floderName="floderName"
|
|
|
|
|
@closePathModal="closePathModal"
|
|
|
|
|
@handleSuccessPath="handleSuccessPath"
|
|
|
|
|
/>
|
|
|
|
|
</a-modal>
|
|
|
|
|
<!-- 变化检测弹窗 -->
|
|
|
|
|
<a-modal
|
|
|
|
|
v-model:open="comparisonOpen"
|
|
|
|
@ -321,7 +295,6 @@
|
|
|
|
|
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
|
|
|
|
import { PageWrapper } from '@/components/Page';
|
|
|
|
|
import { useModal } from '@/components/Modal';
|
|
|
|
|
import { useMessage } from '@/hooks/web/useMessage';
|
|
|
|
|
import {
|
|
|
|
|
EditOutlined,
|
|
|
|
|
DeleteOutlined,
|
|
|
|
@ -337,7 +310,6 @@
|
|
|
|
|
PlaySquareTwoTone,
|
|
|
|
|
FileOutlined,
|
|
|
|
|
BorderInnerOutlined,
|
|
|
|
|
YoutubeOutlined,
|
|
|
|
|
} from '@ant-design/icons-vue';
|
|
|
|
|
import {
|
|
|
|
|
GetMediaFile,
|
|
|
|
@ -353,6 +325,7 @@
|
|
|
|
|
import { AddFolderModal, MoveFileModal, CompressFileModal, RenameModal } from './modal/modal';
|
|
|
|
|
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
|
|
|
|
import { getAppEnvConfig } from '@/utils/env';
|
|
|
|
|
import { useMessage } from '@/hooks/web/useMessage';
|
|
|
|
|
import { columns, searchFormSchema, svg_showOnMap_0, svg_showOnMap_1 } from './modal.data';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
|
import { cloneDeep } from 'lodash-es';
|
|
|
|
@ -551,16 +524,6 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getImageDimensions(url, callback) {
|
|
|
|
|
const img = new Image();
|
|
|
|
|
img.src = url;
|
|
|
|
|
img.onload = function () {
|
|
|
|
|
const width = img.width;
|
|
|
|
|
const height = img.height;
|
|
|
|
|
callback({ width: width, height: height });
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 弹窗----------------------------------------------------------------------
|
|
|
|
|
// 左侧目录选择
|
|
|
|
|
function handleSelect(orgId = '') {
|
|
|
|
@ -569,7 +532,7 @@
|
|
|
|
|
}
|
|
|
|
|
// 刷新表格
|
|
|
|
|
const childRef = ref<any>();
|
|
|
|
|
function handleSuccess(record = null) {
|
|
|
|
|
function handleSuccessPreview(record = null) {
|
|
|
|
|
clearSelectedRowKeys();
|
|
|
|
|
childRef.value.fetch();
|
|
|
|
|
reload();
|
|
|
|
@ -610,17 +573,25 @@
|
|
|
|
|
const [compressFileModal, { openModal: openCompressFileModal }] = useModal();
|
|
|
|
|
// 重命名
|
|
|
|
|
const [renameModal, { openModal: openRenameModal }] = useModal();
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
function handleSuccess(record = null) {
|
|
|
|
|
clearSelectedRowKeys();
|
|
|
|
|
childRef.value.fetch();
|
|
|
|
|
reload();
|
|
|
|
|
}
|
|
|
|
|
// 新建文件夹
|
|
|
|
|
function addFolder() {
|
|
|
|
|
// openAddFolderModal(true, {
|
|
|
|
|
// record,
|
|
|
|
|
// });
|
|
|
|
|
openAddFolderModal(true, {
|
|
|
|
|
parentKey: nowParentKey.value,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 移动文件
|
|
|
|
|
function moveFolderOrFile() {
|
|
|
|
|
let rows = getSelectRows();
|
|
|
|
|
if (rows.length > 0) {
|
|
|
|
|
if (rows.some((item) => item.parentKey == '0' && !item.objectKey)) {
|
|
|
|
|
return createMessage.warn('根目录的文件夹不能移动!');
|
|
|
|
|
}
|
|
|
|
|
const records = rows;
|
|
|
|
|
openMoveFileModal(true, {
|
|
|
|
|
records,
|
|
|
|
@ -629,19 +600,6 @@
|
|
|
|
|
return createMessage.warn('请选择一个或者多个文件/文件夹进行移动');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 压缩
|
|
|
|
|
function compressFolderOrFile() {
|
|
|
|
|
// let rows = getSelectRows();
|
|
|
|
|
// if (rows.length > 0) {
|
|
|
|
|
// const record = rows;
|
|
|
|
|
// openCompressFileModal(true, {
|
|
|
|
|
// tableData: getDataSource(),
|
|
|
|
|
// record,
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// return createMessage.warn('请选择一个或者多个文件/文件夹压缩');
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
// 重命名
|
|
|
|
|
function renameRecord(record) {
|
|
|
|
|
openRenameModal(true, {
|
|
|
|
@ -677,23 +635,6 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 加载到地图上
|
|
|
|
|
function funShowOnMap(record) {
|
|
|
|
|
UpdatePicStatus({
|
|
|
|
|
id: record.id,
|
|
|
|
|
fileTags: record.fileTags,
|
|
|
|
|
graffitiJson: record.graffitis,
|
|
|
|
|
display: record.showOnMap == 1 ? 0 : 1,
|
|
|
|
|
showOnMap: record.showOnMap == 1 ? 0 : 1,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
if (record.showOnMap == 1) {
|
|
|
|
|
createMessage.success('在地图上取消加载成功');
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.success('在地图上加载成功');
|
|
|
|
|
}
|
|
|
|
|
reload();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 查看弹窗----------------------------------------------------------------------------
|
|
|
|
|
const open = ref(false);
|
|
|
|
|
// 目前展示图片
|
|
|
|
@ -787,38 +728,11 @@
|
|
|
|
|
comparisonOpen.value = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 路径地图弹窗----------------------------------------------------------------------
|
|
|
|
|
const pathOpen = ref(false);
|
|
|
|
|
// 打开路径地图弹窗
|
|
|
|
|
// 路径地图----------------------------------------------------------------------
|
|
|
|
|
// 打开路径地图
|
|
|
|
|
const floderName = ref('');
|
|
|
|
|
const nowShowImageData = ref({});
|
|
|
|
|
const allImageDataList: any = ref([]);
|
|
|
|
|
function openPathModal(record) {
|
|
|
|
|
GetMediaFile({
|
|
|
|
|
parentKey: record.parentKey,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 1000,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
allImageDataList.value = res.items.filter(
|
|
|
|
|
(item) => item.objectKey && item.objectKey.includes('.jpeg'),
|
|
|
|
|
);
|
|
|
|
|
allImageDataList.value.forEach((arr) => {
|
|
|
|
|
if (arr.fileTags) {
|
|
|
|
|
arr.fileTags = JSON.parse(arr.fileTags);
|
|
|
|
|
} else {
|
|
|
|
|
arr.fileTags = [];
|
|
|
|
|
}
|
|
|
|
|
if (arr.graffitiJson) {
|
|
|
|
|
arr.graffitiJson = JSON.parse(arr.graffitiJson);
|
|
|
|
|
} else {
|
|
|
|
|
arr.graffitiJson = [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
nowShowImageData.value = allImageDataList.value.find((item) => item.id == record.id);
|
|
|
|
|
floderName.value = floders.value[floders.value.length - 1].name;
|
|
|
|
|
pathOpen.value = true;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 展示路径地图部分
|
|
|
|
|
const pathDivShow = ref(false);
|
|
|
|
|
function showPathDiv(record) {
|
|
|
|
@ -850,14 +764,12 @@
|
|
|
|
|
// 关闭路径地图弹窗
|
|
|
|
|
function closePathModal() {
|
|
|
|
|
nowShowImageData.value = {};
|
|
|
|
|
pathOpen.value = false;
|
|
|
|
|
pathDivShow.value = false;
|
|
|
|
|
}
|
|
|
|
|
// 刷新
|
|
|
|
|
function handleSuccessPath(value) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
pathDivShow.value ? showPathDiv(value) : openPathModal(value);
|
|
|
|
|
// openPathModal(value);
|
|
|
|
|
showPathDiv(value);
|
|
|
|
|
reload();
|
|
|
|
|
}, 500);
|
|
|
|
|
}
|
|
|
|
|