Merge branch 'main' of http://123.132.248.154:10000/gitY/DiKongGanZhiPingTai
commit
562ca2c38e
|
|
@ -12,6 +12,10 @@ enum Api {
|
||||||
UpdatePicName = '/api/AirportMaintenance/UpdatePicName',
|
UpdatePicName = '/api/AirportMaintenance/UpdatePicName',
|
||||||
// 修改地图图片parentkey
|
// 修改地图图片parentkey
|
||||||
UpdatePicParentKey = '/api/AirportMaintenance/UpdatePicParentKey',
|
UpdatePicParentKey = '/api/AirportMaintenance/UpdatePicParentKey',
|
||||||
|
// 获取媒体库目录树-用于移动文件夹
|
||||||
|
ListMediaFolder = '/api/Manage/ListMediaFolder',
|
||||||
|
// 媒体库新建文件夹
|
||||||
|
CreateMediaFolder = '/api/Manage/CreateMediaFolder',
|
||||||
|
|
||||||
// 获取地图标注列表
|
// 获取地图标注列表
|
||||||
GetAnnotationList = '/api/Manage/GetAnnotationList',
|
GetAnnotationList = '/api/Manage/GetAnnotationList',
|
||||||
|
|
@ -75,6 +79,20 @@ export function UpdatePicParentKey(params) {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 获取媒体库目录树-用于移动文件夹
|
||||||
|
export function ListMediaFolder(params) {
|
||||||
|
return defHttp.get({
|
||||||
|
url: Api.ListMediaFolder,
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 媒体库新建文件夹
|
||||||
|
export function CreateMediaFolder(params) {
|
||||||
|
return defHttp.post({
|
||||||
|
url: Api.CreateMediaFolder + '?name=' + params.name + '&parentKey=' + params.parentKey,
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获取地图标注列表
|
// 获取地图标注列表
|
||||||
export function GetAnnotationList(params) {
|
export function GetAnnotationList(params) {
|
||||||
|
|
|
||||||
|
|
@ -1,34 +1,42 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="imageDiv_">
|
<div class="imageDiv_">
|
||||||
<div class="imageDiv_Comparison">
|
<div class="imageDiv_Comparison" style="overflow: hidden">
|
||||||
<div class="imageDiv_Comparison_title">视窗1</div>
|
<div class="imageDiv_Comparison_title">视窗1</div>
|
||||||
<div class="imageDiv_Comparison_1">1</div>
|
<div class="imageDiv_Comparison_1">1</div>
|
||||||
<div
|
<div
|
||||||
ref="mouseCanvasRef"
|
ref="mouseCanvasRef_1"
|
||||||
@mousedown="onMouseDown"
|
class="dragModal_1"
|
||||||
|
@wheel="onWheel"
|
||||||
|
@mousedown="onMouseDown($event, '1')"
|
||||||
:style="{
|
:style="{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
transform: `scale(${scale}) rotate(${rotationAngle}deg)`,
|
transform: `scale(${scale}) rotate(${rotationAngle}deg)`,
|
||||||
transition: 'transform 0.2s',
|
transition: 'transform 0.2s',
|
||||||
width: `100%`,
|
width: `100%`,
|
||||||
height: `100%`,
|
height: `100%`,
|
||||||
background: `url(${nowImageGroup?.show1?.url}) no-repeat`,
|
background: `url(${nowImageGroup?.show1?.url}) no-repeat center center`,
|
||||||
|
backgroundSize: 'contain',
|
||||||
|
backgroundPosition: 'center',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="imageDiv_Comparison">
|
<div class="imageDiv_Comparison" style="overflow: hidden">
|
||||||
<div class="imageDiv_Comparison_title">视窗2</div>
|
<div class="imageDiv_Comparison_title">视窗2</div>
|
||||||
<div class="imageDiv_Comparison_2">2</div>
|
<div class="imageDiv_Comparison_2">2</div>
|
||||||
<div
|
<div
|
||||||
ref="mouseCanvasRef"
|
ref="mouseCanvasRef_2"
|
||||||
@mousedown="onMouseDown"
|
class="dragModal_2"
|
||||||
|
@wheel="onWheel"
|
||||||
|
@mousedown="onMouseDown($event, '2')"
|
||||||
:style="{
|
:style="{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
transform: `scale(${scale}) rotate(${rotationAngle}deg)`,
|
transform: `scale(${scale}) rotate(${rotationAngle}deg)`,
|
||||||
transition: 'transform 0.2s',
|
transition: 'transform 0.2s',
|
||||||
width: `100%`,
|
width: `100%`,
|
||||||
height: `100%`,
|
height: `100%`,
|
||||||
background: `url(${nowImageGroup?.show2?.url}) no-repeat`,
|
background: `url(${nowImageGroup?.show2?.url}) no-repeat center center`,
|
||||||
|
backgroundSize: 'contain',
|
||||||
|
backgroundPosition: 'center',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -94,11 +102,11 @@
|
||||||
<RotateLeftOutlined @click="rotateCounterClockwise" />
|
<RotateLeftOutlined @click="rotateCounterClockwise" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<!-- 刷新 -->
|
<!-- 复位刷新 -->
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>刷新</span>
|
<span>复位刷新</span>
|
||||||
</template>
|
</template>
|
||||||
<RedoOutlined @click="refresh" />
|
<RedoOutlined @click="refresh" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
|
@ -192,8 +200,6 @@
|
||||||
// 初始化、变更后----------------------------------
|
// 初始化、变更后----------------------------------
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nowImageGroup.value = props.nowRecord.imageGroup[0];
|
nowImageGroup.value = props.nowRecord.imageGroup[0];
|
||||||
console.log(nowImageGroup.value);
|
|
||||||
|
|
||||||
getNowImageGroup();
|
getNowImageGroup();
|
||||||
});
|
});
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -250,10 +256,86 @@
|
||||||
function rotateCounterClockwise() {
|
function rotateCounterClockwise() {
|
||||||
rotationAngle.value -= 90; // 每次旋转-90度
|
rotationAngle.value -= 90; // 每次旋转-90度
|
||||||
}
|
}
|
||||||
// 刷新
|
// 复位+刷新
|
||||||
function refresh() {
|
function refresh() {
|
||||||
scale.value = 1;
|
scale.value = 1;
|
||||||
rotationAngle.value = 0;
|
rotationAngle.value = 0;
|
||||||
|
// 复位
|
||||||
|
const dragDocument1: any = document.querySelector('.dragModal_1');
|
||||||
|
if (dragDocument1) {
|
||||||
|
dragDocument1.style.left = 0 + 'px';
|
||||||
|
dragDocument1.style.top = 0 + 'px';
|
||||||
|
}
|
||||||
|
const dragDocument2: any = document.querySelector('.dragModal_2');
|
||||||
|
if (dragDocument2) {
|
||||||
|
dragDocument2.style.left = 0 + 'px';
|
||||||
|
dragDocument2.style.top = 0 + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const mouseCanvasRef_1 = ref();
|
||||||
|
const mouseCanvasRef_2 = ref();
|
||||||
|
// 鼠标滚轮
|
||||||
|
function onWheel(event) {
|
||||||
|
const delta = event.deltaY || event.detail || event.wheelDelta;
|
||||||
|
// 根据滚轮方向调整缩放比例
|
||||||
|
if (delta < 0) {
|
||||||
|
// 向上滚动,放大
|
||||||
|
scale.value += 0.1;
|
||||||
|
} else if (scale.value > 0.5) {
|
||||||
|
// 向下滚动,缩小
|
||||||
|
scale.value -= 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 鼠标拖动
|
||||||
|
const isDragging = ref(false);
|
||||||
|
let initialMouseX;
|
||||||
|
let initialMouseY;
|
||||||
|
let initialDocumentX_1;
|
||||||
|
let initialDocumentY_1;
|
||||||
|
let initialDocumentX_2;
|
||||||
|
let initialDocumentY_2;
|
||||||
|
// 鼠标按下
|
||||||
|
function onMouseDown(event, num) {
|
||||||
|
const dragDocument1: any = document.querySelector('.dragModal_1');
|
||||||
|
const dragDocument2: any = document.querySelector('.dragModal_2');
|
||||||
|
isDragging.value = true;
|
||||||
|
initialMouseX = event.clientX;
|
||||||
|
initialMouseY = event.clientY;
|
||||||
|
initialDocumentX_1 = dragDocument1.offsetLeft;
|
||||||
|
initialDocumentY_1 = dragDocument1.offsetTop;
|
||||||
|
initialDocumentX_2 = dragDocument2.offsetLeft;
|
||||||
|
initialDocumentY_2 = dragDocument2.offsetTop;
|
||||||
|
dragDocument1.style.cursor = 'grabbing';
|
||||||
|
dragDocument2.style.cursor = 'grabbing';
|
||||||
|
window.addEventListener('mousemove', onMouseMove);
|
||||||
|
window.addEventListener('mouseup', onMouseUp);
|
||||||
|
}
|
||||||
|
// 鼠标移动-拖动
|
||||||
|
function onMouseMove(event) {
|
||||||
|
const dragDocument1: any = document.querySelector('.dragModal_1');
|
||||||
|
const dragDocument2: any = document.querySelector('.dragModal_2');
|
||||||
|
if (isDragging.value) {
|
||||||
|
const deltaX = event.clientX - initialMouseX;
|
||||||
|
const deltaY = event.clientY - initialMouseY;
|
||||||
|
dragDocument1.style.left = initialDocumentX_1 + deltaX + 'px';
|
||||||
|
dragDocument1.style.top = initialDocumentY_1 + deltaY + 'px';
|
||||||
|
dragDocument2.style.left = initialDocumentX_2 + deltaX + 'px';
|
||||||
|
dragDocument2.style.top = initialDocumentY_2 + deltaY + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 鼠标松开-拖动
|
||||||
|
function onMouseUp(event) {
|
||||||
|
const dragDocument1: any = document.querySelector('.dragModal_1');
|
||||||
|
const dragDocument2: any = document.querySelector('.dragModal_2');
|
||||||
|
isDragging.value = false;
|
||||||
|
if (dragDocument1) {
|
||||||
|
dragDocument1.style.cursor = 'default';
|
||||||
|
}
|
||||||
|
if (dragDocument2) {
|
||||||
|
dragDocument2.style.cursor = 'default';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,24 @@
|
||||||
<div class="modalChooseObject_title">选择检测对象</div>
|
<div class="modalChooseObject_title">选择检测对象</div>
|
||||||
<div class="modalChooseObject_select">
|
<div class="modalChooseObject_select">
|
||||||
<div class="modalChooseObject_select_title">第 1 步:选择航线</div>
|
<div class="modalChooseObject_select_title">第 1 步:选择航线</div>
|
||||||
<div class="modalChooseObject_select_">
|
<div class="modalChooseObject_select_choose">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="value"
|
v-model:value="value"
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
:options="hangxianOptions"
|
:options="hangxianOptions"
|
||||||
placeholder="选择航线"
|
placeholder="选择项目"
|
||||||
|
></a-select>
|
||||||
|
<a-select
|
||||||
|
v-model:value="value"
|
||||||
|
style="width: 200px"
|
||||||
|
:options="hangxianOptions"
|
||||||
|
placeholder="选择任务"
|
||||||
|
></a-select>
|
||||||
|
<a-select
|
||||||
|
v-model:value="value"
|
||||||
|
style="width: 200px"
|
||||||
|
:options="hangxianOptions"
|
||||||
|
placeholder="选择计划"
|
||||||
></a-select>
|
></a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -165,7 +177,7 @@
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalChooseObject_select_ {
|
.modalChooseObject_select_choose {
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button :icon="h(ColumnHeightOutlined)" @click="moveFolderOrFile">移动</a-button>
|
<a-button :icon="h(ColumnHeightOutlined)" @click="moveFolderOrFile">移动</a-button>
|
||||||
<a-button :icon="h(DeleteOutlined)" @click="deleteFolderOrFile">删除 </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-group v-model:value="tableType">
|
||||||
<a-radio-button value="table"><BarsOutlined /></a-radio-button>
|
<a-radio-button value="table"><BarsOutlined /></a-radio-button>
|
||||||
<a-radio-button value="store"><AppstoreOutlined /></a-radio-button>
|
<a-radio-button value="store"><AppstoreOutlined /></a-radio-button>
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
<EditOutlined @click="renameRecord(record)" />
|
<EditOutlined @click="renameRecord(record)" />
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip placement="top">
|
<!-- <a-tooltip placement="top">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>
|
<span>
|
||||||
{{ record.showOnMap == 1 ? '在地图上取消加载' : '在地图上加载' }}
|
{{ record.showOnMap == 1 ? '在地图上取消加载' : '在地图上加载' }}
|
||||||
|
|
@ -137,19 +137,15 @@
|
||||||
v-html="svg_showOnMap_0"
|
v-html="svg_showOnMap_0"
|
||||||
/>
|
/>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip> -->
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div>查看地图图片历史路径</div>
|
<div>查看地图图片历史路径</div>
|
||||||
<div>只展示在地图上加载的图片</div>
|
<!-- <div>只展示在地图上加载的图片</div> -->
|
||||||
</template>
|
</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="text"
|
type="text"
|
||||||
v-if="
|
v-if="record.objectKey && record.objectKey.includes('.jpeg')"
|
||||||
record.objectKey &&
|
|
||||||
record.objectKey.includes('.jpeg') &&
|
|
||||||
record.showOnMap == 1
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<BorderInnerOutlined @click="showPathDiv(record)" />
|
<BorderInnerOutlined @click="showPathDiv(record)" />
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
@ -263,32 +259,10 @@
|
||||||
:previewRecordList="previewRecordList"
|
:previewRecordList="previewRecordList"
|
||||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||||
@closeModal="closeModal"
|
@closeModal="closeModal"
|
||||||
@handleSuccess="handleSuccess"
|
@handleSuccessPreview="handleSuccessPreview"
|
||||||
@openPathModal="openPathModal"
|
@openPathModal="openPathModal"
|
||||||
/>
|
/>
|
||||||
</a-modal>
|
</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
|
<a-modal
|
||||||
v-model:open="comparisonOpen"
|
v-model:open="comparisonOpen"
|
||||||
|
|
@ -321,7 +295,6 @@
|
||||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||||
import { PageWrapper } from '@/components/Page';
|
import { PageWrapper } from '@/components/Page';
|
||||||
import { useModal } from '@/components/Modal';
|
import { useModal } from '@/components/Modal';
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
|
||||||
import {
|
import {
|
||||||
EditOutlined,
|
EditOutlined,
|
||||||
DeleteOutlined,
|
DeleteOutlined,
|
||||||
|
|
@ -337,7 +310,6 @@
|
||||||
PlaySquareTwoTone,
|
PlaySquareTwoTone,
|
||||||
FileOutlined,
|
FileOutlined,
|
||||||
BorderInnerOutlined,
|
BorderInnerOutlined,
|
||||||
YoutubeOutlined,
|
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {
|
import {
|
||||||
GetMediaFile,
|
GetMediaFile,
|
||||||
|
|
@ -353,6 +325,7 @@
|
||||||
import { AddFolderModal, MoveFileModal, CompressFileModal, RenameModal } from './modal/modal';
|
import { AddFolderModal, MoveFileModal, CompressFileModal, RenameModal } from './modal/modal';
|
||||||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||||
import { getAppEnvConfig } from '@/utils/env';
|
import { getAppEnvConfig } from '@/utils/env';
|
||||||
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
import { columns, searchFormSchema, svg_showOnMap_0, svg_showOnMap_1 } from './modal.data';
|
import { columns, searchFormSchema, svg_showOnMap_0, svg_showOnMap_1 } from './modal.data';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { cloneDeep } from 'lodash-es';
|
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 = '') {
|
function handleSelect(orgId = '') {
|
||||||
|
|
@ -569,7 +532,7 @@
|
||||||
}
|
}
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
const childRef = ref<any>();
|
const childRef = ref<any>();
|
||||||
function handleSuccess(record = null) {
|
function handleSuccessPreview(record = null) {
|
||||||
clearSelectedRowKeys();
|
clearSelectedRowKeys();
|
||||||
childRef.value.fetch();
|
childRef.value.fetch();
|
||||||
reload();
|
reload();
|
||||||
|
|
@ -610,17 +573,25 @@
|
||||||
const [compressFileModal, { openModal: openCompressFileModal }] = useModal();
|
const [compressFileModal, { openModal: openCompressFileModal }] = useModal();
|
||||||
// 重命名
|
// 重命名
|
||||||
const [renameModal, { openModal: openRenameModal }] = useModal();
|
const [renameModal, { openModal: openRenameModal }] = useModal();
|
||||||
|
// 刷新
|
||||||
|
function handleSuccess(record = null) {
|
||||||
|
clearSelectedRowKeys();
|
||||||
|
childRef.value.fetch();
|
||||||
|
reload();
|
||||||
|
}
|
||||||
// 新建文件夹
|
// 新建文件夹
|
||||||
function addFolder() {
|
function addFolder() {
|
||||||
// openAddFolderModal(true, {
|
openAddFolderModal(true, {
|
||||||
// record,
|
parentKey: nowParentKey.value,
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
// 移动文件
|
// 移动文件
|
||||||
function moveFolderOrFile() {
|
function moveFolderOrFile() {
|
||||||
let rows = getSelectRows();
|
let rows = getSelectRows();
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
|
if (rows.some((item) => item.parentKey == '0' && !item.objectKey)) {
|
||||||
|
return createMessage.warn('根目录的文件夹不能移动!');
|
||||||
|
}
|
||||||
const records = rows;
|
const records = rows;
|
||||||
openMoveFileModal(true, {
|
openMoveFileModal(true, {
|
||||||
records,
|
records,
|
||||||
|
|
@ -629,19 +600,6 @@
|
||||||
return createMessage.warn('请选择一个或者多个文件/文件夹进行移动');
|
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) {
|
function renameRecord(record) {
|
||||||
openRenameModal(true, {
|
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);
|
const open = ref(false);
|
||||||
// 目前展示图片
|
// 目前展示图片
|
||||||
|
|
@ -787,38 +728,11 @@
|
||||||
comparisonOpen.value = false;
|
comparisonOpen.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 路径地图弹窗----------------------------------------------------------------------
|
// 路径地图----------------------------------------------------------------------
|
||||||
const pathOpen = ref(false);
|
// 打开路径地图
|
||||||
// 打开路径地图弹窗
|
|
||||||
const floderName = ref('');
|
const floderName = ref('');
|
||||||
const nowShowImageData = ref({});
|
const nowShowImageData = ref({});
|
||||||
const allImageDataList: any = 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);
|
const pathDivShow = ref(false);
|
||||||
function showPathDiv(record) {
|
function showPathDiv(record) {
|
||||||
|
|
@ -850,14 +764,12 @@
|
||||||
// 关闭路径地图弹窗
|
// 关闭路径地图弹窗
|
||||||
function closePathModal() {
|
function closePathModal() {
|
||||||
nowShowImageData.value = {};
|
nowShowImageData.value = {};
|
||||||
pathOpen.value = false;
|
|
||||||
pathDivShow.value = false;
|
pathDivShow.value = false;
|
||||||
}
|
}
|
||||||
// 刷新
|
// 刷新
|
||||||
function handleSuccessPath(value) {
|
function handleSuccessPath(value) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
pathDivShow.value ? showPathDiv(value) : openPathModal(value);
|
showPathDiv(value);
|
||||||
// openPathModal(value);
|
|
||||||
reload();
|
reload();
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,58 +1,65 @@
|
||||||
<template>
|
<template>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" title="新建文件夹" @ok="handleSubmit">
|
<BasicModal
|
||||||
<BasicForm @register="registerForm" />
|
v-bind="$attrs"
|
||||||
|
@register="registerModal"
|
||||||
|
title="在当前文件夹下创建新文件夹"
|
||||||
|
@ok="handleSubmit"
|
||||||
|
>
|
||||||
|
<div style="height: 3vh">
|
||||||
|
<a-row style="width: 100%">
|
||||||
|
<a-col :span="5" class="col"> 新文件夹名: </a-col>
|
||||||
|
<a-col :span="19" class="col">
|
||||||
|
<a-input v-model:value="newname" placeholder="请输入新文件夹名称"></a-input>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { BasicModal, useModalInner } from '@/components/Modal';
|
import { BasicModal, useModalInner } from '@/components/Modal';
|
||||||
import { BasicForm, useForm } from '@/components/Form';
|
import { CreateMediaFolder } from '@/api/demo/mediaLibrary';
|
||||||
import { addFolderSchema } from '../modal.data';
|
import { FolderOpenOutlined } from '@ant-design/icons-vue';
|
||||||
|
|
||||||
import { orgPosGroup } from '@/api/demo/system';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
|
||||||
const emit = defineEmits(['success']);
|
const emits = defineEmits(['handleSuccess']);
|
||||||
|
|
||||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
|
||||||
labelWidth: 100,
|
|
||||||
baseColProps: { span: 24 },
|
|
||||||
schemas: addFolderSchema,
|
|
||||||
showActionButtonGroup: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
// 上级文件夹的id
|
// 上级文件夹的id
|
||||||
let folderId = ref();
|
let parentKey = ref();
|
||||||
|
const newname = ref();
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
resetFields();
|
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
folderId.value = data.record?.id;
|
parentKey = data.parentKey;
|
||||||
setFieldsValue({
|
newname.value = null;
|
||||||
...data.record,
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
|
if (!newname.value) {
|
||||||
|
return createMessage.warn('新文件名不能为空');
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const values = await validate();
|
CreateMediaFolder({
|
||||||
let query = {
|
name: newname.value,
|
||||||
folderId: folderId.value,
|
parentKey: parentKey,
|
||||||
newName: values.newName,
|
}).then((res) => {
|
||||||
};
|
if (res) {
|
||||||
// 调用接口
|
createMessage.success('创建新文件夹成功!');
|
||||||
const data = await orgPosGroup(query);
|
emits('handleSuccess');
|
||||||
if (data) {
|
closeModal();
|
||||||
setModalProps({ confirmLoading: true });
|
}
|
||||||
closeModal();
|
});
|
||||||
emit('success');
|
|
||||||
return createMessage.success('成功');
|
|
||||||
} else {
|
|
||||||
return createMessage.error('失败');
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.col {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,168 +1,98 @@
|
||||||
<template>
|
<template>
|
||||||
<BasicModal v-bind="$attrs" @register="registerModal" title="移动文件" @ok="handleSubmit">
|
<BasicModal v-bind="$attrs" @register="registerModal" title="移动文件" @ok="handleSubmit">
|
||||||
<BasicTable @register="registerTable">
|
<div style="height: 50vh; overflow-y: auto">
|
||||||
<template #toolbar>
|
<a-tree
|
||||||
<span v-for="(f, index) in floders" :key="f.id" class="floderTitle">
|
class="draggable-tree"
|
||||||
<span v-if="f.name != '全部文件'" style="margin-right: 10px"> / </span>
|
show-icon
|
||||||
<a-tooltip placement="top">
|
draggable
|
||||||
<template #title>
|
block-node
|
||||||
<span>{{ f.name }}</span>
|
default-expand-all
|
||||||
</template>
|
:tree-data="treeData"
|
||||||
<span class="flodersname" @click="getChildrenByProp(f, index)"> {{ f.name }}</span>
|
v-model:selectedKeys="selectedKeys"
|
||||||
</a-tooltip>
|
:fieldNames="{ children: 'children', title: 'name', key: 'id' }"
|
||||||
</span>
|
>
|
||||||
</template>
|
<template #icon="{}">
|
||||||
<template #bodyCell="{ column, record }">
|
<FolderOpenOutlined />
|
||||||
<template v-if="column.key === 'name'">
|
|
||||||
<FolderOpenOutlined v-if="!record.objectKey" style="font-size: 20px" />
|
|
||||||
<span
|
|
||||||
v-if="!record.objectKey || (record.objectKey && record.objectKey.includes('jpeg'))"
|
|
||||||
@click="lookRecord(record)"
|
|
||||||
@mouseover="record.isHovered = true"
|
|
||||||
@mouseout="record.isHovered = false"
|
|
||||||
:style="{
|
|
||||||
textDecoration: record.isHovered ? 'underline' : 'none',
|
|
||||||
marginLeft: '5px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
{{ record.name }}
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</a-tree>
|
||||||
</BasicTable>
|
</div>
|
||||||
<!-- <a-tree v-model:selectedKeys="selectedKeys" show-line :tree-data="treeData"> </a-tree> -->
|
|
||||||
</BasicModal>
|
</BasicModal>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
|
||||||
import { BasicModal, useModalInner } from '@/components/Modal';
|
import { BasicModal, useModalInner } from '@/components/Modal';
|
||||||
import { FolderOutlined, FolderOpenOutlined } from '@ant-design/icons-vue';
|
import { ListMediaFolder, UpdatePicParentKey } from '@/api/demo/mediaLibrary';
|
||||||
import { GetMediaFile, UpdatePicParentKey } from '@/api/demo/mediaLibrary';
|
import { FolderOpenOutlined } from '@ant-design/icons-vue';
|
||||||
import type { TreeProps } from 'ant-design-vue';
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
|
||||||
const emit = defineEmits(['handleSuccess']);
|
const emits = defineEmits(['handleSuccess']);
|
||||||
|
|
||||||
// // 上级文件夹的id
|
// // 上级文件夹的id
|
||||||
const moveDataList: any = ref([]);
|
const moveDataList: any = ref([]);
|
||||||
const selectedKeys: any = ref<string[]>();
|
const selectedKeys: any = ref<string[]>();
|
||||||
const treeData: any = ref([
|
const treeData: any = ref([]);
|
||||||
{
|
|
||||||
title: '全部文件',
|
|
||||||
key: '0',
|
|
||||||
children: [],
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
function funGetMediaFile() {}
|
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
moveDataList.value = data.records;
|
moveDataList.value = data.records;
|
||||||
|
ListMediaFolder({}).then((res) => {
|
||||||
|
treeData.value = res;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const floders = ref([
|
|
||||||
{
|
|
||||||
id: '0',
|
|
||||||
name: '全部文件',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const nowParentKey = ref('0');
|
|
||||||
const [
|
|
||||||
registerTable,
|
|
||||||
{ reload, getDataSource, getSelectRows, setSelectedRows, clearSelectedRowKeys },
|
|
||||||
] = useTable({
|
|
||||||
api: GetMediaFile,
|
|
||||||
rowKey: 'id',
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: '文件名称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
align: 'left',
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
rowSelection: {
|
|
||||||
type: 'radio',
|
|
||||||
},
|
|
||||||
isTreeTable: false,
|
|
||||||
striped: false,
|
|
||||||
bordered: false,
|
|
||||||
inset: false,
|
|
||||||
useSearchForm: false,
|
|
||||||
showIndexColumn: false,
|
|
||||||
showTableSetting: false,
|
|
||||||
beforeFetch: (data) => {
|
|
||||||
// 接口请求前 参数处理
|
|
||||||
let temp = {
|
|
||||||
...data,
|
|
||||||
parentKey: nowParentKey.value,
|
|
||||||
};
|
|
||||||
return temp;
|
|
||||||
},
|
|
||||||
afterFetch: (res) => {
|
|
||||||
let result: any = [];
|
|
||||||
res.forEach((arr, index) => {
|
|
||||||
if (!arr.objectKey) {
|
|
||||||
result.push(arr);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// 目录跳跃
|
|
||||||
function getChildrenByProp(f, index) {
|
|
||||||
nowParentKey.value = f.id;
|
|
||||||
floders.value = floders.value.splice(0, index + 1);
|
|
||||||
clearSelectedRowKeys();
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
// 查看-打开这个文件夹
|
|
||||||
async function lookRecord(record) {
|
|
||||||
if (!record.objectKey) {
|
|
||||||
nowParentKey.value = record.id;
|
|
||||||
floders.value.push({
|
|
||||||
id: nowParentKey.value,
|
|
||||||
name: record.name,
|
|
||||||
});
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
try {
|
try {
|
||||||
let selectKeys = getSelectRows();
|
if (moveDataList.value.some((item) => item.id == selectedKeys.value)) {
|
||||||
|
return createMessage.warn('文件不能移动到自己文件夹内');
|
||||||
|
}
|
||||||
|
let flag = true;
|
||||||
moveDataList.value.forEach((movedata) => {
|
moveDataList.value.forEach((movedata) => {
|
||||||
UpdatePicParentKey({ id: movedata.id, ParentKey: selectKeys[0].id }).then((res) => {
|
if (!movedata.objectKey) {
|
||||||
console.log(res);
|
// 文件夹
|
||||||
// return;
|
// 查找要移动的文件夹下的文件树
|
||||||
});
|
let tempTreeData = findNodeById(treeData.value, movedata.id);
|
||||||
|
let list: any = [];
|
||||||
|
list.push(tempTreeData);
|
||||||
|
// 要移动到位置是否是自身文件夹下的文件夹
|
||||||
|
let tempTreeData2 = findNodeById(list, selectedKeys.value[0], 'parentKey');
|
||||||
|
if (tempTreeData2 && tempTreeData2.id != movedata.id) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if (flag) {
|
||||||
// if (!ids.includes(key)) {
|
moveDataList.value.forEach((movedata, index) => {
|
||||||
// let query = {
|
UpdatePicParentKey({ id: movedata.id, ParentKey: selectedKeys.value[0] }).then((res) => {
|
||||||
// moveIds: ids,
|
if (index == moveDataList.value.length - 1) {
|
||||||
// key: key,
|
createMessage.success('移动成功!');
|
||||||
// };
|
emits('handleSuccess');
|
||||||
// // 调用接口
|
closeModal();
|
||||||
// const data = await orgPosGroup(query);
|
}
|
||||||
// if (data) {
|
});
|
||||||
// setModalProps({ confirmLoading: true });
|
});
|
||||||
// closeModal();
|
} else {
|
||||||
// emit('handleSuccess');
|
return createMessage.warn('文件夹不能移动到自己文件夹的子文件夹内');
|
||||||
// return createMessage.success('成功');
|
}
|
||||||
// } else {
|
|
||||||
// return createMessage.error('失败');
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// return createMessage.warn('目标目录不能包含选择目录');
|
|
||||||
// }
|
|
||||||
} finally {
|
} finally {
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function findNodeById(tree, targetId, idKey = 'id') {
|
||||||
|
// 遍历树的每一项
|
||||||
|
for (const node of tree) {
|
||||||
|
if (node[idKey] === targetId) {
|
||||||
|
return node; // 找到了,返回整个节点(包含 children)
|
||||||
|
}
|
||||||
|
// 如果有 children,递归查找
|
||||||
|
if (node.children && Array.isArray(node.children)) {
|
||||||
|
const found = findNodeById(node.children, targetId, idKey);
|
||||||
|
if (found) return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<!-- 加载到地图上 -->
|
<!-- 加载到地图上 -->
|
||||||
<div class="button2">
|
<!-- <div class="button2">
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
placement="top"
|
placement="top"
|
||||||
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
|
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
|
||||||
|
|
@ -491,13 +491,11 @@
|
||||||
</svg>
|
</svg>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="imageChooseList">
|
<div class="imageChooseList">
|
||||||
<div
|
<div
|
||||||
v-for="li in props.allImageDataList.filter(
|
v-for="li in props.allImageDataList.filter((item) => item.display == 1)"
|
||||||
(item) => item.display == 1 && item.showOnMap == 1,
|
|
||||||
)"
|
|
||||||
:key="li.id"
|
:key="li.id"
|
||||||
@click="setNowShowImageData(li)"
|
@click="setNowShowImageData(li)"
|
||||||
>
|
>
|
||||||
|
|
@ -663,7 +661,7 @@
|
||||||
|
|
||||||
// 上一张、下一张图片--------------------------------------------------------------
|
// 上一张、下一张图片--------------------------------------------------------------
|
||||||
function clickLeftOrRightButton(direction) {
|
function clickLeftOrRightButton(direction) {
|
||||||
const list = props.allImageDataList.filter((item) => item.display == 1 && item.showOnMap == 1);
|
const list = props.allImageDataList.filter((item) => item.display == 1);
|
||||||
for (let index = 0; index < list.length; index++) {
|
for (let index = 0; index < list.length; index++) {
|
||||||
if (list[index].id == props.nowShowImageData.id) {
|
if (list[index].id == props.nowShowImageData.id) {
|
||||||
if (direction == 'left') {
|
if (direction == 'left') {
|
||||||
|
|
@ -783,29 +781,29 @@
|
||||||
function handlerLocation() {
|
function handlerLocation() {
|
||||||
emits('handlerLocation', props.nowShowImageData);
|
emits('handlerLocation', props.nowShowImageData);
|
||||||
}
|
}
|
||||||
// 加载到地图上
|
// // 加载到地图上
|
||||||
function funShowOnMap() {
|
// function funShowOnMap() {
|
||||||
if (props.nowShowImageData.showOnMap == 1) {
|
// if (props.nowShowImageData.showOnMap == 1) {
|
||||||
props.nowShowImageData.showOnMap = 0;
|
// props.nowShowImageData.showOnMap = 0;
|
||||||
} else {
|
// } else {
|
||||||
props.nowShowImageData.showOnMap = 1;
|
// props.nowShowImageData.showOnMap = 1;
|
||||||
}
|
// }
|
||||||
UpdatePicStatus({
|
// UpdatePicStatus({
|
||||||
id: props.nowShowImageData.id,
|
// id: props.nowShowImageData.id,
|
||||||
fileTags: JSON.stringify(fileTags.value),
|
// fileTags: JSON.stringify(fileTags.value),
|
||||||
graffitiJson: JSON.stringify(graffitis.value),
|
// graffitiJson: JSON.stringify(graffitis.value),
|
||||||
display: props.nowShowImageData.display,
|
// display: props.nowShowImageData.display,
|
||||||
showOnMap: props.nowShowImageData.showOnMap,
|
// showOnMap: props.nowShowImageData.showOnMap,
|
||||||
}).then((res) => {
|
// }).then((res) => {
|
||||||
if (props.nowShowImageData.showOnMap == 1) {
|
// if (props.nowShowImageData.showOnMap == 1) {
|
||||||
createMessage.success('在地图上加载成功');
|
// createMessage.success('在地图上加载成功');
|
||||||
} else {
|
// } else {
|
||||||
createMessage.success('在地图上取消加载成功');
|
// createMessage.success('在地图上取消加载成功');
|
||||||
}
|
// }
|
||||||
emits('funUpdateDisplayOrShowOnMapData', props.nowShowImageData);
|
// emits('funUpdateDisplayOrShowOnMapData', props.nowShowImageData);
|
||||||
emits('handleSuccessPath', props.nowShowImageData);
|
// emits('handleSuccessPath', props.nowShowImageData);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 选择当前展示图片-----------------------------------------------
|
// 选择当前展示图片-----------------------------------------------
|
||||||
function setNowShowImageData(value) {
|
function setNowShowImageData(value) {
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
</template>
|
</template>
|
||||||
<AimOutlined @click="handlerLocation(show)" />
|
<AimOutlined @click="handlerLocation(show)" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-popconfirm
|
<!-- <a-popconfirm
|
||||||
placement="right"
|
placement="right"
|
||||||
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
|
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
|
||||||
ok-text="确认"
|
ok-text="确认"
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
<div v-if="show.showOnMap != 1" class="svg-container" v-html="showOnMap_0" />
|
<div v-if="show.showOnMap != 1" class="svg-container" v-html="showOnMap_0" />
|
||||||
</div>
|
</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</a-popconfirm>
|
</a-popconfirm> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -248,8 +248,8 @@
|
||||||
// 按照媒体名称搜索
|
// 按照媒体名称搜索
|
||||||
const searchValue = ref('');
|
const searchValue = ref('');
|
||||||
function handleChangeImageSearch() {
|
function handleChangeImageSearch() {
|
||||||
// let filterImageData = props.allImageDataList;
|
let filterImageData = props.allImageDataList;
|
||||||
let filterImageData = props.allImageDataList.filter((item) => item.showOnMap == 1);
|
// let filterImageData = props.allImageDataList.filter((item) => item.showOnMap == 1);
|
||||||
// 标签筛选
|
// 标签筛选
|
||||||
if (tagSelect.value.length > 0) {
|
if (tagSelect.value.length > 0) {
|
||||||
tagSelect.value.forEach((tag) => {
|
tagSelect.value.forEach((tag) => {
|
||||||
|
|
@ -302,13 +302,13 @@
|
||||||
|
|
||||||
// 加载到地图上
|
// 加载到地图上
|
||||||
function funShowOnMapOrDisplay(show, type) {
|
function funShowOnMapOrDisplay(show, type) {
|
||||||
if (type == 'showOnMap') {
|
// if (type == 'showOnMap') {
|
||||||
if (show.showOnMap == 1) {
|
// if (show.showOnMap == 1) {
|
||||||
show.showOnMap = 0;
|
// show.showOnMap = 0;
|
||||||
} else {
|
// } else {
|
||||||
show.showOnMap = 1;
|
// show.showOnMap = 1;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (type == 'display') {
|
if (type == 'display') {
|
||||||
if (show.display == 1) {
|
if (show.display == 1) {
|
||||||
show.display = 0;
|
show.display = 0;
|
||||||
|
|
@ -323,13 +323,13 @@
|
||||||
display: show.display,
|
display: show.display,
|
||||||
showOnMap: show.showOnMap,
|
showOnMap: show.showOnMap,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (type == 'showOnMap') {
|
// if (type == 'showOnMap') {
|
||||||
if (show.showOnMap) {
|
// if (show.showOnMap) {
|
||||||
createMessage.success('在地图上加载成功');
|
// createMessage.success('在地图上加载成功');
|
||||||
} else {
|
// } else {
|
||||||
createMessage.success('在地图上取消加载成功');
|
// createMessage.success('在地图上取消加载成功');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
emits('handleSuccessPath');
|
emits('handleSuccessPath');
|
||||||
emits('funUpdateDisplayOrShowOnMapData', show);
|
emits('funUpdateDisplayOrShowOnMapData', show);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -304,38 +304,26 @@
|
||||||
// 地图照片-飞行点
|
// 地图照片-飞行点
|
||||||
flightointGraphicData.forEach((graphicLayer) => {
|
flightointGraphicData.forEach((graphicLayer) => {
|
||||||
if (graphicLayer.options.id == newValue.id + '_flight') {
|
if (graphicLayer.options.id == newValue.id + '_flight') {
|
||||||
if (newValue.showOnMap == 1) {
|
if (newValue.id == props.nowShowImageData.id) {
|
||||||
if (newValue.id == props.nowShowImageData.id) {
|
graphicLayer.show = newValue.display == 1 ? true : false;
|
||||||
graphicLayer.show = newValue.display == 1 ? true : false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
graphicLayers.removeGraphic(graphicLayer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 地图照片-地面点到展示图片的线
|
// 地图照片-地面点到展示图片的线
|
||||||
bottomImagePolylineGraphicData.forEach((graphicLayer) => {
|
bottomImagePolylineGraphicData.forEach((graphicLayer) => {
|
||||||
if (graphicLayer.options.id == newValue.id + '_polyline') {
|
if (graphicLayer.options.id == newValue.id + '_polyline') {
|
||||||
if (newValue.showOnMap == 1) {
|
graphicLayer.show = newValue.display == 1 ? true : false;
|
||||||
graphicLayer.show = newValue.display == 1 ? true : false;
|
|
||||||
} else {
|
|
||||||
graphicLayers.removeGraphic(graphicLayer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 地图照片-展示图片
|
// 地图照片-展示图片
|
||||||
imageGraphicData.forEach((graphicLayer) => {
|
imageGraphicData.forEach((graphicLayer) => {
|
||||||
if (graphicLayer.options.id == newValue.id + '_image') {
|
if (graphicLayer.options.id == newValue.id + '_image') {
|
||||||
if (newValue.showOnMap == 1) {
|
graphicLayer.show = newValue.display == 1 ? true : false;
|
||||||
graphicLayer.show = newValue.display == 1 ? true : false;
|
graphicLayer.setStyle({
|
||||||
graphicLayer.setStyle({
|
label: {
|
||||||
label: {
|
text: `${newValue.name}`,
|
||||||
text: `${newValue.name}`,
|
},
|
||||||
},
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
graphicLayers.removeGraphic(graphicLayer);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -370,7 +358,7 @@
|
||||||
// 地图照片-遍历
|
// 地图照片-遍历
|
||||||
let rotation = 0;
|
let rotation = 0;
|
||||||
props.allImageDataList.forEach((item, index) => {
|
props.allImageDataList.forEach((item, index) => {
|
||||||
if (item.lng && item.lat && item.absoluteAltitude && item.showOnMap == 1) {
|
if (item.lng && item.lat && item.absoluteAltitude) {
|
||||||
const image = new Image();
|
const image = new Image();
|
||||||
image.crossOrigin = 'Anonymous';
|
image.crossOrigin = 'Anonymous';
|
||||||
if (item.minipic) {
|
if (item.minipic) {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
:nowPreviewRecord="props.nowPreviewRecord"
|
:nowPreviewRecord="props.nowPreviewRecord"
|
||||||
:previewRecordList="props.previewRecordList"
|
:previewRecordList="props.previewRecordList"
|
||||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||||
@handleSuccess="handleSuccess"
|
@handleSuccessPreview="handleSuccessPreview"
|
||||||
@setHideOrShowTextboxFlag="setHideOrShowTextboxFlag"
|
@setHideOrShowTextboxFlag="setHideOrShowTextboxFlag"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
:nowPreviewRecord="props.nowPreviewRecord"
|
:nowPreviewRecord="props.nowPreviewRecord"
|
||||||
:previewRecordList="props.previewRecordList"
|
:previewRecordList="props.previewRecordList"
|
||||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||||
@handleSuccess="handleSuccess"
|
@handleSuccessPreview="handleSuccessPreview"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
:nowPreviewRecord="props.nowPreviewRecord"
|
:nowPreviewRecord="props.nowPreviewRecord"
|
||||||
:previewRecordList="props.previewRecordList"
|
:previewRecordList="props.previewRecordList"
|
||||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||||
@handleSuccess="handleSuccess"
|
@handleSuccessPreview="handleSuccessPreview"
|
||||||
:hideOrShowTextboxFlag="hideOrShowTextboxFlag"
|
:hideOrShowTextboxFlag="hideOrShowTextboxFlag"
|
||||||
@openPathModal="openPathModal"
|
@openPathModal="openPathModal"
|
||||||
/>
|
/>
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
:nowPreviewRecord="props.nowPreviewRecord"
|
:nowPreviewRecord="props.nowPreviewRecord"
|
||||||
:previewRecordList="props.previewRecordList"
|
:previewRecordList="props.previewRecordList"
|
||||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||||
@handleSuccess="handleSuccess"
|
@handleSuccessPreview="handleSuccessPreview"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
const emits = defineEmits([
|
const emits = defineEmits([
|
||||||
'closeModal',
|
'closeModal',
|
||||||
'chooseNowPreviewRecord',
|
'chooseNowPreviewRecord',
|
||||||
'handleSuccess',
|
'handleSuccessPreview',
|
||||||
'openPathModal',
|
'openPathModal',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -100,8 +100,8 @@
|
||||||
emits('chooseNowPreviewRecord', value);
|
emits('chooseNowPreviewRecord', value);
|
||||||
}
|
}
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
function handleSuccess(record = null) {
|
function handleSuccessPreview(record = null) {
|
||||||
emits('handleSuccess', record);
|
emits('handleSuccessPreview', record);
|
||||||
}
|
}
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<!-- 加载到地图上 -->
|
<!-- 加载到地图上 -->
|
||||||
<div class="button2" @click="funShowOnMap">
|
<!-- <div class="button2" @click="funShowOnMap">
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>
|
<span>
|
||||||
|
|
@ -361,7 +361,7 @@
|
||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div> -->
|
||||||
<!-- 复制到剪贴板 -->
|
<!-- 复制到剪贴板 -->
|
||||||
<div class="button">
|
<div class="button">
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
|
|
@ -547,7 +547,7 @@
|
||||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
||||||
const emits = defineEmits([
|
const emits = defineEmits([
|
||||||
'chooseNowPreviewRecord',
|
'chooseNowPreviewRecord',
|
||||||
'handleSuccess',
|
'handleSuccessPreview',
|
||||||
'setHideOrShowTextboxFlag',
|
'setHideOrShowTextboxFlag',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -584,8 +584,8 @@
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
function handleSuccess(record = null) {
|
function handleSuccessPreview(record = null) {
|
||||||
emits('handleSuccess', record);
|
emits('handleSuccessPreview', record);
|
||||||
}
|
}
|
||||||
// 缩放比例
|
// 缩放比例
|
||||||
const scale = ref(1);
|
const scale = ref(1);
|
||||||
|
|
@ -683,7 +683,7 @@
|
||||||
Deletepic({
|
Deletepic({
|
||||||
ids: ids,
|
ids: ids,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
handleSuccess(props.nowPreviewRecord);
|
handleSuccessPreview(props.nowPreviewRecord);
|
||||||
createMessage.success('删除成功');
|
createMessage.success('删除成功');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -700,28 +700,28 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 加载到地图上
|
// // 加载到地图上
|
||||||
function funShowOnMap() {
|
// function funShowOnMap() {
|
||||||
if (props.nowPreviewRecord.showOnMap == 1) {
|
// if (props.nowPreviewRecord.showOnMap == 1) {
|
||||||
props.nowPreviewRecord.showOnMap = 0;
|
// props.nowPreviewRecord.showOnMap = 0;
|
||||||
} else {
|
// } else {
|
||||||
props.nowPreviewRecord.showOnMap = 1;
|
// props.nowPreviewRecord.showOnMap = 1;
|
||||||
}
|
// }
|
||||||
UpdatePicStatus({
|
// UpdatePicStatus({
|
||||||
id: props.nowPreviewRecord.id,
|
// id: props.nowPreviewRecord.id,
|
||||||
fileTags: JSON.stringify(fileTags.value),
|
// fileTags: JSON.stringify(fileTags.value),
|
||||||
graffitiJson: JSON.stringify(graffitis.value),
|
// graffitiJson: JSON.stringify(graffitis.value),
|
||||||
display: props.nowPreviewRecord.display,
|
// display: props.nowPreviewRecord.display,
|
||||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
// showOnMap: props.nowPreviewRecord.showOnMap,
|
||||||
}).then((res) => {
|
// }).then((res) => {
|
||||||
if (props.nowPreviewRecord.showOnMap == 1) {
|
// if (props.nowPreviewRecord.showOnMap == 1) {
|
||||||
createMessage.success('在地图上加载成功');
|
// createMessage.success('在地图上加载成功');
|
||||||
} else {
|
// } else {
|
||||||
createMessage.success('在地图上取消加载成功');
|
// createMessage.success('在地图上取消加载成功');
|
||||||
}
|
// }
|
||||||
emits('handleSuccess');
|
// emits('handleSuccessPreview');
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 下载
|
// 下载
|
||||||
async function fetchAndDownloadImage(url) {
|
async function fetchAndDownloadImage(url) {
|
||||||
|
|
@ -821,7 +821,7 @@
|
||||||
display: props.nowPreviewRecord.display0,
|
display: props.nowPreviewRecord.display0,
|
||||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 删除标签
|
// 删除标签
|
||||||
|
|
@ -838,7 +838,7 @@
|
||||||
display: props.nowPreviewRecord.display,
|
display: props.nowPreviewRecord.display,
|
||||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,19 +188,15 @@
|
||||||
<span class="infotitle">照片位置</span>
|
<span class="infotitle">照片位置</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="17">
|
<a-col :span="17">
|
||||||
<span class="infobutton">
|
<!-- <span class="infobutton">
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div>查看地图图片历史路径</div>
|
<div>查看地图图片历史路径</div>
|
||||||
<div>只展示在地图上加载的图片</div>
|
<div>只展示在地图上加载的图片</div>
|
||||||
</template>
|
</template>
|
||||||
<EnvironmentOutlined
|
<EnvironmentOutlined style="font-size: 20px; color: #07aaed" @click="openPathModal" />
|
||||||
v-if="props.nowPreviewRecord.showOnMap == 1"
|
|
||||||
style="font-size: 20px; color: #07aaed"
|
|
||||||
@click="openPathModal"
|
|
||||||
/>
|
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</span>
|
</span> -->
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<div class="map">
|
<div class="map">
|
||||||
|
|
@ -231,7 +227,7 @@
|
||||||
const { createMessage, createConfirm } = useMessage();
|
const { createMessage, createConfirm } = useMessage();
|
||||||
|
|
||||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList', 'hideOrShowTextboxFlag']);
|
const props = defineProps(['nowPreviewRecord', 'previewRecordList', 'hideOrShowTextboxFlag']);
|
||||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccess', 'openPathModal']);
|
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview', 'openPathModal']);
|
||||||
|
|
||||||
// 修改名称--------------------------------
|
// 修改名称--------------------------------
|
||||||
const editNameFlag = ref(true);
|
const editNameFlag = ref(true);
|
||||||
|
|
@ -258,7 +254,7 @@
|
||||||
props.nowPreviewRecord.name = newName;
|
props.nowPreviewRecord.name = newName;
|
||||||
editNameFlag.value = true;
|
editNameFlag.value = true;
|
||||||
createMessage.success(res);
|
createMessage.success(res);
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function editNameBlur() {
|
function editNameBlur() {
|
||||||
|
|
@ -305,7 +301,7 @@
|
||||||
addFileTagsFlag.value = true;
|
addFileTagsFlag.value = true;
|
||||||
newFileTagsName.value = '';
|
newFileTagsName.value = '';
|
||||||
createMessage.success('添加标签成功');
|
createMessage.success('添加标签成功');
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return createMessage.error('此标签已存在!');
|
return createMessage.error('此标签已存在!');
|
||||||
|
|
@ -333,7 +329,7 @@
|
||||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
createMessage.success('删除标签成功');
|
createMessage.success('删除标签成功');
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onCancel: () => {},
|
onCancel: () => {},
|
||||||
|
|
@ -365,10 +361,10 @@
|
||||||
emits('chooseNowPreviewRecord', value);
|
emits('chooseNowPreviewRecord', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开路径弹窗
|
// // 打开路径弹窗
|
||||||
function openPathModal() {
|
// function openPathModal() {
|
||||||
emits('openPathModal', props.nowPreviewRecord);
|
// emits('openPathModal', props.nowPreviewRecord);
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.title {
|
.title {
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
const { createConfirm, createMessage } = useMessage();
|
const { createConfirm, createMessage } = useMessage();
|
||||||
|
|
||||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
||||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccess']);
|
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview']);
|
||||||
|
|
||||||
// 上一张、下一张视频
|
// 上一张、下一张视频
|
||||||
function clickLeftOrRightButton(direction) {
|
function clickLeftOrRightButton(direction) {
|
||||||
|
|
@ -129,7 +129,7 @@
|
||||||
Deletepic({
|
Deletepic({
|
||||||
ids: ids,
|
ids: ids,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
handleSuccess(props.nowPreviewRecord);
|
handleSuccessPreview(props.nowPreviewRecord);
|
||||||
createMessage.success(res);
|
createMessage.success(res);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -137,8 +137,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新表格
|
// 刷新表格
|
||||||
function handleSuccess(record = null) {
|
function handleSuccessPreview(record = null) {
|
||||||
emits('handleSuccess', record);
|
emits('handleSuccessPreview', record);
|
||||||
}
|
}
|
||||||
// 选择
|
// 选择
|
||||||
function chooseNowPreviewRecord(value) {
|
function chooseNowPreviewRecord(value) {
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
|
||||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
||||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccess']);
|
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview']);
|
||||||
|
|
||||||
// 修改名称--------------------------------
|
// 修改名称--------------------------------
|
||||||
const editNameFlag = ref(true);
|
const editNameFlag = ref(true);
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
props.nowPreviewRecord.name = newName;
|
props.nowPreviewRecord.name = newName;
|
||||||
editNameFlag.value = true;
|
editNameFlag.value = true;
|
||||||
createMessage.success(res);
|
createMessage.success(res);
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function editNameBlur() {
|
function editNameBlur() {
|
||||||
|
|
@ -246,7 +246,7 @@
|
||||||
addFileTagsFlag.value = true;
|
addFileTagsFlag.value = true;
|
||||||
newFileTagsName.value = '';
|
newFileTagsName.value = '';
|
||||||
createMessage.success('添加标签成功');
|
createMessage.success('添加标签成功');
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return createMessage.error('此标签已存在!');
|
return createMessage.error('此标签已存在!');
|
||||||
|
|
@ -264,7 +264,7 @@
|
||||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
createMessage.success('删除标签成功');
|
createMessage.success('删除标签成功');
|
||||||
emits('handleSuccess');
|
emits('handleSuccessPreview');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue