Merge branch 'main' of http://123.132.248.154:10000/gitY/DiKongGanZhiPingTai
commit
562ca2c38e
|
|
@ -12,6 +12,10 @@ enum Api {
|
|||
UpdatePicName = '/api/AirportMaintenance/UpdatePicName',
|
||||
// 修改地图图片parentkey
|
||||
UpdatePicParentKey = '/api/AirportMaintenance/UpdatePicParentKey',
|
||||
// 获取媒体库目录树-用于移动文件夹
|
||||
ListMediaFolder = '/api/Manage/ListMediaFolder',
|
||||
// 媒体库新建文件夹
|
||||
CreateMediaFolder = '/api/Manage/CreateMediaFolder',
|
||||
|
||||
// 获取地图标注列表
|
||||
GetAnnotationList = '/api/Manage/GetAnnotationList',
|
||||
|
|
@ -75,6 +79,20 @@ export function UpdatePicParentKey(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) {
|
||||
|
|
|
|||
|
|
@ -1,34 +1,42 @@
|
|||
<template>
|
||||
<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_1">1</div>
|
||||
<div
|
||||
ref="mouseCanvasRef"
|
||||
@mousedown="onMouseDown"
|
||||
ref="mouseCanvasRef_1"
|
||||
class="dragModal_1"
|
||||
@wheel="onWheel"
|
||||
@mousedown="onMouseDown($event, '1')"
|
||||
:style="{
|
||||
position: 'relative',
|
||||
transform: `scale(${scale}) rotate(${rotationAngle}deg)`,
|
||||
transition: 'transform 0.2s',
|
||||
width: `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 class="imageDiv_Comparison">
|
||||
<div class="imageDiv_Comparison" style="overflow: hidden">
|
||||
<div class="imageDiv_Comparison_title">视窗2</div>
|
||||
<div class="imageDiv_Comparison_2">2</div>
|
||||
<div
|
||||
ref="mouseCanvasRef"
|
||||
@mousedown="onMouseDown"
|
||||
ref="mouseCanvasRef_2"
|
||||
class="dragModal_2"
|
||||
@wheel="onWheel"
|
||||
@mousedown="onMouseDown($event, '2')"
|
||||
:style="{
|
||||
position: 'relative',
|
||||
transform: `scale(${scale}) rotate(${rotationAngle}deg)`,
|
||||
transition: 'transform 0.2s',
|
||||
width: `100%`,
|
||||
height: `100%`,
|
||||
background: `url(${nowImageGroup?.show2?.url}) no-repeat`,
|
||||
background: `url(${nowImageGroup?.show2?.url}) no-repeat center center`,
|
||||
backgroundSize: 'contain',
|
||||
backgroundPosition: 'center',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -94,11 +102,11 @@
|
|||
<RotateLeftOutlined @click="rotateCounterClockwise" />
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<!-- 刷新 -->
|
||||
<!-- 复位刷新 -->
|
||||
<div class="button">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>
|
||||
<span>刷新</span>
|
||||
<span>复位刷新</span>
|
||||
</template>
|
||||
<RedoOutlined @click="refresh" />
|
||||
</a-tooltip>
|
||||
|
|
@ -192,8 +200,6 @@
|
|||
// 初始化、变更后----------------------------------
|
||||
onMounted(() => {
|
||||
nowImageGroup.value = props.nowRecord.imageGroup[0];
|
||||
console.log(nowImageGroup.value);
|
||||
|
||||
getNowImageGroup();
|
||||
});
|
||||
watch(
|
||||
|
|
@ -250,10 +256,86 @@
|
|||
function rotateCounterClockwise() {
|
||||
rotationAngle.value -= 90; // 每次旋转-90度
|
||||
}
|
||||
// 刷新
|
||||
// 复位+刷新
|
||||
function refresh() {
|
||||
scale.value = 1;
|
||||
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>
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,24 @@
|
|||
<div class="modalChooseObject_title">选择检测对象</div>
|
||||
<div class="modalChooseObject_select">
|
||||
<div class="modalChooseObject_select_title">第 1 步:选择航线</div>
|
||||
<div class="modalChooseObject_select_">
|
||||
<div class="modalChooseObject_select_choose">
|
||||
<a-select
|
||||
v-model:value="value"
|
||||
style="width: 200px"
|
||||
: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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -165,7 +177,7 @@
|
|||
font-size: 16px;
|
||||
}
|
||||
|
||||
.modalChooseObject_select_ {
|
||||
.modalChooseObject_select_choose {
|
||||
padding-bottom: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,65 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="新建文件夹" @ok="handleSubmit">
|
||||
<BasicForm @register="registerForm" />
|
||||
<BasicModal
|
||||
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>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '@/components/Modal';
|
||||
import { BasicForm, useForm } from '@/components/Form';
|
||||
import { addFolderSchema } from '../modal.data';
|
||||
|
||||
import { orgPosGroup } from '@/api/demo/system';
|
||||
import { CreateMediaFolder } from '@/api/demo/mediaLibrary';
|
||||
import { FolderOpenOutlined } from '@ant-design/icons-vue';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
|
||||
labelWidth: 100,
|
||||
baseColProps: { span: 24 },
|
||||
schemas: addFolderSchema,
|
||||
showActionButtonGroup: false,
|
||||
});
|
||||
const emits = defineEmits(['handleSuccess']);
|
||||
|
||||
// 上级文件夹的id
|
||||
let folderId = ref();
|
||||
let parentKey = ref();
|
||||
const newname = ref();
|
||||
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
resetFields();
|
||||
setModalProps({ confirmLoading: false });
|
||||
folderId.value = data.record?.id;
|
||||
setFieldsValue({
|
||||
...data.record,
|
||||
});
|
||||
parentKey = data.parentKey;
|
||||
newname.value = null;
|
||||
});
|
||||
|
||||
// 提交
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
const values = await validate();
|
||||
let query = {
|
||||
folderId: folderId.value,
|
||||
newName: values.newName,
|
||||
};
|
||||
// 调用接口
|
||||
const data = await orgPosGroup(query);
|
||||
if (data) {
|
||||
setModalProps({ confirmLoading: true });
|
||||
closeModal();
|
||||
emit('success');
|
||||
return createMessage.success('成功');
|
||||
} else {
|
||||
return createMessage.error('失败');
|
||||
if (!newname.value) {
|
||||
return createMessage.warn('新文件名不能为空');
|
||||
}
|
||||
try {
|
||||
CreateMediaFolder({
|
||||
name: newname.value,
|
||||
parentKey: parentKey,
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
createMessage.success('创建新文件夹成功!');
|
||||
emits('handleSuccess');
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
} finally {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.col {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,168 +1,98 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="移动文件" @ok="handleSubmit">
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<span v-for="(f, index) in floders" :key="f.id" class="floderTitle">
|
||||
<span v-if="f.name != '全部文件'" style="margin-right: 10px"> / </span>
|
||||
<a-tooltip placement="top">
|
||||
<template #title>
|
||||
<span>{{ f.name }}</span>
|
||||
</template>
|
||||
<span class="flodersname" @click="getChildrenByProp(f, index)"> {{ f.name }}</span>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<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',
|
||||
}"
|
||||
<div style="height: 50vh; overflow-y: auto">
|
||||
<a-tree
|
||||
class="draggable-tree"
|
||||
show-icon
|
||||
draggable
|
||||
block-node
|
||||
default-expand-all
|
||||
:tree-data="treeData"
|
||||
v-model:selectedKeys="selectedKeys"
|
||||
:fieldNames="{ children: 'children', title: 'name', key: 'id' }"
|
||||
>
|
||||
{{ record.name }}
|
||||
</span>
|
||||
<template #icon="{}">
|
||||
<FolderOpenOutlined />
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- <a-tree v-model:selectedKeys="selectedKeys" show-line :tree-data="treeData"> </a-tree> -->
|
||||
</a-tree>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { BasicModal, useModalInner } from '@/components/Modal';
|
||||
import { FolderOutlined, FolderOpenOutlined } from '@ant-design/icons-vue';
|
||||
import { GetMediaFile, UpdatePicParentKey } from '@/api/demo/mediaLibrary';
|
||||
import type { TreeProps } from 'ant-design-vue';
|
||||
import { ListMediaFolder, UpdatePicParentKey } from '@/api/demo/mediaLibrary';
|
||||
import { FolderOpenOutlined } from '@ant-design/icons-vue';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
const emit = defineEmits(['handleSuccess']);
|
||||
const emits = defineEmits(['handleSuccess']);
|
||||
|
||||
// // 上级文件夹的id
|
||||
const moveDataList: any = ref([]);
|
||||
const selectedKeys: any = ref<string[]>();
|
||||
const treeData: any = ref([
|
||||
{
|
||||
title: '全部文件',
|
||||
key: '0',
|
||||
children: [],
|
||||
},
|
||||
]);
|
||||
function funGetMediaFile() {}
|
||||
|
||||
const treeData: any = ref([]);
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
setModalProps({ confirmLoading: false });
|
||||
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() {
|
||||
try {
|
||||
let selectKeys = getSelectRows();
|
||||
if (moveDataList.value.some((item) => item.id == selectedKeys.value)) {
|
||||
return createMessage.warn('文件不能移动到自己文件夹内');
|
||||
}
|
||||
let flag = true;
|
||||
moveDataList.value.forEach((movedata) => {
|
||||
UpdatePicParentKey({ id: movedata.id, ParentKey: selectKeys[0].id }).then((res) => {
|
||||
console.log(res);
|
||||
// return;
|
||||
if (!movedata.objectKey) {
|
||||
// 文件夹
|
||||
// 查找要移动的文件夹下的文件树
|
||||
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) {
|
||||
moveDataList.value.forEach((movedata, index) => {
|
||||
UpdatePicParentKey({ id: movedata.id, ParentKey: selectedKeys.value[0] }).then((res) => {
|
||||
if (index == moveDataList.value.length - 1) {
|
||||
createMessage.success('移动成功!');
|
||||
emits('handleSuccess');
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// if (!ids.includes(key)) {
|
||||
// let query = {
|
||||
// moveIds: ids,
|
||||
// key: key,
|
||||
// };
|
||||
// // 调用接口
|
||||
// const data = await orgPosGroup(query);
|
||||
// if (data) {
|
||||
// setModalProps({ confirmLoading: true });
|
||||
// closeModal();
|
||||
// emit('handleSuccess');
|
||||
// return createMessage.success('成功');
|
||||
// } else {
|
||||
// return createMessage.error('失败');
|
||||
// }
|
||||
// } else {
|
||||
// return createMessage.warn('目标目录不能包含选择目录');
|
||||
// }
|
||||
} else {
|
||||
return createMessage.warn('文件夹不能移动到自己文件夹的子文件夹内');
|
||||
}
|
||||
} finally {
|
||||
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>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@
|
|||
</a-tooltip>
|
||||
</div>
|
||||
<!-- 加载到地图上 -->
|
||||
<div class="button2">
|
||||
<!-- <div class="button2">
|
||||
<a-popconfirm
|
||||
placement="top"
|
||||
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
|
||||
|
|
@ -491,13 +491,11 @@
|
|||
</svg>
|
||||
</a-tooltip>
|
||||
</a-popconfirm>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="imageChooseList">
|
||||
<div
|
||||
v-for="li in props.allImageDataList.filter(
|
||||
(item) => item.display == 1 && item.showOnMap == 1,
|
||||
)"
|
||||
v-for="li in props.allImageDataList.filter((item) => item.display == 1)"
|
||||
:key="li.id"
|
||||
@click="setNowShowImageData(li)"
|
||||
>
|
||||
|
|
@ -663,7 +661,7 @@
|
|||
|
||||
// 上一张、下一张图片--------------------------------------------------------------
|
||||
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++) {
|
||||
if (list[index].id == props.nowShowImageData.id) {
|
||||
if (direction == 'left') {
|
||||
|
|
@ -783,29 +781,29 @@
|
|||
function handlerLocation() {
|
||||
emits('handlerLocation', props.nowShowImageData);
|
||||
}
|
||||
// 加载到地图上
|
||||
function funShowOnMap() {
|
||||
if (props.nowShowImageData.showOnMap == 1) {
|
||||
props.nowShowImageData.showOnMap = 0;
|
||||
} else {
|
||||
props.nowShowImageData.showOnMap = 1;
|
||||
}
|
||||
UpdatePicStatus({
|
||||
id: props.nowShowImageData.id,
|
||||
fileTags: JSON.stringify(fileTags.value),
|
||||
graffitiJson: JSON.stringify(graffitis.value),
|
||||
display: props.nowShowImageData.display,
|
||||
showOnMap: props.nowShowImageData.showOnMap,
|
||||
}).then((res) => {
|
||||
if (props.nowShowImageData.showOnMap == 1) {
|
||||
createMessage.success('在地图上加载成功');
|
||||
} else {
|
||||
createMessage.success('在地图上取消加载成功');
|
||||
}
|
||||
emits('funUpdateDisplayOrShowOnMapData', props.nowShowImageData);
|
||||
emits('handleSuccessPath', props.nowShowImageData);
|
||||
});
|
||||
}
|
||||
// // 加载到地图上
|
||||
// function funShowOnMap() {
|
||||
// if (props.nowShowImageData.showOnMap == 1) {
|
||||
// props.nowShowImageData.showOnMap = 0;
|
||||
// } else {
|
||||
// props.nowShowImageData.showOnMap = 1;
|
||||
// }
|
||||
// UpdatePicStatus({
|
||||
// id: props.nowShowImageData.id,
|
||||
// fileTags: JSON.stringify(fileTags.value),
|
||||
// graffitiJson: JSON.stringify(graffitis.value),
|
||||
// display: props.nowShowImageData.display,
|
||||
// showOnMap: props.nowShowImageData.showOnMap,
|
||||
// }).then((res) => {
|
||||
// if (props.nowShowImageData.showOnMap == 1) {
|
||||
// createMessage.success('在地图上加载成功');
|
||||
// } else {
|
||||
// createMessage.success('在地图上取消加载成功');
|
||||
// }
|
||||
// emits('funUpdateDisplayOrShowOnMapData', props.nowShowImageData);
|
||||
// emits('handleSuccessPath', props.nowShowImageData);
|
||||
// });
|
||||
// }
|
||||
|
||||
// 选择当前展示图片-----------------------------------------------
|
||||
function setNowShowImageData(value) {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
</template>
|
||||
<AimOutlined @click="handlerLocation(show)" />
|
||||
</a-tooltip>
|
||||
<a-popconfirm
|
||||
<!-- <a-popconfirm
|
||||
placement="right"
|
||||
title="您是否将该照片在地图上取消加载?取消后照片将不在地图上显示。"
|
||||
ok-text="确认"
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
<div v-if="show.showOnMap != 1" class="svg-container" v-html="showOnMap_0" />
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</a-popconfirm>
|
||||
</a-popconfirm> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -248,8 +248,8 @@
|
|||
// 按照媒体名称搜索
|
||||
const searchValue = ref('');
|
||||
function handleChangeImageSearch() {
|
||||
// let filterImageData = props.allImageDataList;
|
||||
let filterImageData = props.allImageDataList.filter((item) => item.showOnMap == 1);
|
||||
let filterImageData = props.allImageDataList;
|
||||
// let filterImageData = props.allImageDataList.filter((item) => item.showOnMap == 1);
|
||||
// 标签筛选
|
||||
if (tagSelect.value.length > 0) {
|
||||
tagSelect.value.forEach((tag) => {
|
||||
|
|
@ -302,13 +302,13 @@
|
|||
|
||||
// 加载到地图上
|
||||
function funShowOnMapOrDisplay(show, type) {
|
||||
if (type == 'showOnMap') {
|
||||
if (show.showOnMap == 1) {
|
||||
show.showOnMap = 0;
|
||||
} else {
|
||||
show.showOnMap = 1;
|
||||
}
|
||||
}
|
||||
// if (type == 'showOnMap') {
|
||||
// if (show.showOnMap == 1) {
|
||||
// show.showOnMap = 0;
|
||||
// } else {
|
||||
// show.showOnMap = 1;
|
||||
// }
|
||||
// }
|
||||
if (type == 'display') {
|
||||
if (show.display == 1) {
|
||||
show.display = 0;
|
||||
|
|
@ -323,13 +323,13 @@
|
|||
display: show.display,
|
||||
showOnMap: show.showOnMap,
|
||||
}).then((res) => {
|
||||
if (type == 'showOnMap') {
|
||||
if (show.showOnMap) {
|
||||
createMessage.success('在地图上加载成功');
|
||||
} else {
|
||||
createMessage.success('在地图上取消加载成功');
|
||||
}
|
||||
}
|
||||
// if (type == 'showOnMap') {
|
||||
// if (show.showOnMap) {
|
||||
// createMessage.success('在地图上加载成功');
|
||||
// } else {
|
||||
// createMessage.success('在地图上取消加载成功');
|
||||
// }
|
||||
// }
|
||||
emits('handleSuccessPath');
|
||||
emits('funUpdateDisplayOrShowOnMapData', show);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -304,38 +304,26 @@
|
|||
// 地图照片-飞行点
|
||||
flightointGraphicData.forEach((graphicLayer) => {
|
||||
if (graphicLayer.options.id == newValue.id + '_flight') {
|
||||
if (newValue.showOnMap == 1) {
|
||||
if (newValue.id == props.nowShowImageData.id) {
|
||||
graphicLayer.show = newValue.display == 1 ? true : false;
|
||||
}
|
||||
} else {
|
||||
graphicLayers.removeGraphic(graphicLayer);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 地图照片-地面点到展示图片的线
|
||||
bottomImagePolylineGraphicData.forEach((graphicLayer) => {
|
||||
if (graphicLayer.options.id == newValue.id + '_polyline') {
|
||||
if (newValue.showOnMap == 1) {
|
||||
graphicLayer.show = newValue.display == 1 ? true : false;
|
||||
} else {
|
||||
graphicLayers.removeGraphic(graphicLayer);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 地图照片-展示图片
|
||||
imageGraphicData.forEach((graphicLayer) => {
|
||||
if (graphicLayer.options.id == newValue.id + '_image') {
|
||||
if (newValue.showOnMap == 1) {
|
||||
graphicLayer.show = newValue.display == 1 ? true : false;
|
||||
graphicLayer.setStyle({
|
||||
label: {
|
||||
text: `${newValue.name}`,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
graphicLayers.removeGraphic(graphicLayer);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -370,7 +358,7 @@
|
|||
// 地图照片-遍历
|
||||
let rotation = 0;
|
||||
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();
|
||||
image.crossOrigin = 'Anonymous';
|
||||
if (item.minipic) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
:nowPreviewRecord="props.nowPreviewRecord"
|
||||
:previewRecordList="props.previewRecordList"
|
||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||
@handleSuccess="handleSuccess"
|
||||
@handleSuccessPreview="handleSuccessPreview"
|
||||
@setHideOrShowTextboxFlag="setHideOrShowTextboxFlag"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
:nowPreviewRecord="props.nowPreviewRecord"
|
||||
:previewRecordList="props.previewRecordList"
|
||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||
@handleSuccess="handleSuccess"
|
||||
@handleSuccessPreview="handleSuccessPreview"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
:nowPreviewRecord="props.nowPreviewRecord"
|
||||
:previewRecordList="props.previewRecordList"
|
||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||
@handleSuccess="handleSuccess"
|
||||
@handleSuccessPreview="handleSuccessPreview"
|
||||
:hideOrShowTextboxFlag="hideOrShowTextboxFlag"
|
||||
@openPathModal="openPathModal"
|
||||
/>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
:nowPreviewRecord="props.nowPreviewRecord"
|
||||
:previewRecordList="props.previewRecordList"
|
||||
@chooseNowPreviewRecord="chooseNowPreviewRecord"
|
||||
@handleSuccess="handleSuccess"
|
||||
@handleSuccessPreview="handleSuccessPreview"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
const emits = defineEmits([
|
||||
'closeModal',
|
||||
'chooseNowPreviewRecord',
|
||||
'handleSuccess',
|
||||
'handleSuccessPreview',
|
||||
'openPathModal',
|
||||
]);
|
||||
|
||||
|
|
@ -100,8 +100,8 @@
|
|||
emits('chooseNowPreviewRecord', value);
|
||||
}
|
||||
// 刷新表格
|
||||
function handleSuccess(record = null) {
|
||||
emits('handleSuccess', record);
|
||||
function handleSuccessPreview(record = null) {
|
||||
emits('handleSuccessPreview', record);
|
||||
}
|
||||
// 关闭弹窗
|
||||
function closeModal() {
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@
|
|||
</a-tooltip>
|
||||
</div>
|
||||
<!-- 加载到地图上 -->
|
||||
<div class="button2" @click="funShowOnMap">
|
||||
<!-- <div class="button2" @click="funShowOnMap">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>
|
||||
<span>
|
||||
|
|
@ -361,7 +361,7 @@
|
|||
></path>
|
||||
</svg>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 复制到剪贴板 -->
|
||||
<div class="button">
|
||||
<a-tooltip placement="top">
|
||||
|
|
@ -547,7 +547,7 @@
|
|||
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
||||
const emits = defineEmits([
|
||||
'chooseNowPreviewRecord',
|
||||
'handleSuccess',
|
||||
'handleSuccessPreview',
|
||||
'setHideOrShowTextboxFlag',
|
||||
]);
|
||||
|
||||
|
|
@ -584,8 +584,8 @@
|
|||
refresh();
|
||||
}
|
||||
// 刷新表格
|
||||
function handleSuccess(record = null) {
|
||||
emits('handleSuccess', record);
|
||||
function handleSuccessPreview(record = null) {
|
||||
emits('handleSuccessPreview', record);
|
||||
}
|
||||
// 缩放比例
|
||||
const scale = ref(1);
|
||||
|
|
@ -683,7 +683,7 @@
|
|||
Deletepic({
|
||||
ids: ids,
|
||||
}).then((res) => {
|
||||
handleSuccess(props.nowPreviewRecord);
|
||||
handleSuccessPreview(props.nowPreviewRecord);
|
||||
createMessage.success('删除成功');
|
||||
});
|
||||
},
|
||||
|
|
@ -700,28 +700,28 @@
|
|||
}
|
||||
};
|
||||
|
||||
// 加载到地图上
|
||||
function funShowOnMap() {
|
||||
if (props.nowPreviewRecord.showOnMap == 1) {
|
||||
props.nowPreviewRecord.showOnMap = 0;
|
||||
} else {
|
||||
props.nowPreviewRecord.showOnMap = 1;
|
||||
}
|
||||
UpdatePicStatus({
|
||||
id: props.nowPreviewRecord.id,
|
||||
fileTags: JSON.stringify(fileTags.value),
|
||||
graffitiJson: JSON.stringify(graffitis.value),
|
||||
display: props.nowPreviewRecord.display,
|
||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||
}).then((res) => {
|
||||
if (props.nowPreviewRecord.showOnMap == 1) {
|
||||
createMessage.success('在地图上加载成功');
|
||||
} else {
|
||||
createMessage.success('在地图上取消加载成功');
|
||||
}
|
||||
emits('handleSuccess');
|
||||
});
|
||||
}
|
||||
// // 加载到地图上
|
||||
// function funShowOnMap() {
|
||||
// if (props.nowPreviewRecord.showOnMap == 1) {
|
||||
// props.nowPreviewRecord.showOnMap = 0;
|
||||
// } else {
|
||||
// props.nowPreviewRecord.showOnMap = 1;
|
||||
// }
|
||||
// UpdatePicStatus({
|
||||
// id: props.nowPreviewRecord.id,
|
||||
// fileTags: JSON.stringify(fileTags.value),
|
||||
// graffitiJson: JSON.stringify(graffitis.value),
|
||||
// display: props.nowPreviewRecord.display,
|
||||
// showOnMap: props.nowPreviewRecord.showOnMap,
|
||||
// }).then((res) => {
|
||||
// if (props.nowPreviewRecord.showOnMap == 1) {
|
||||
// createMessage.success('在地图上加载成功');
|
||||
// } else {
|
||||
// createMessage.success('在地图上取消加载成功');
|
||||
// }
|
||||
// emits('handleSuccessPreview');
|
||||
// });
|
||||
// }
|
||||
|
||||
// 下载
|
||||
async function fetchAndDownloadImage(url) {
|
||||
|
|
@ -821,7 +821,7 @@
|
|||
display: props.nowPreviewRecord.display0,
|
||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||
}).then((res) => {
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
}
|
||||
// 删除标签
|
||||
|
|
@ -838,7 +838,7 @@
|
|||
display: props.nowPreviewRecord.display,
|
||||
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||
}).then((res) => {
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -188,19 +188,15 @@
|
|||
<span class="infotitle">照片位置</span>
|
||||
</a-col>
|
||||
<a-col :span="17">
|
||||
<span class="infobutton">
|
||||
<!-- <span class="infobutton">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>
|
||||
<div>查看地图图片历史路径</div>
|
||||
<div>只展示在地图上加载的图片</div>
|
||||
</template>
|
||||
<EnvironmentOutlined
|
||||
v-if="props.nowPreviewRecord.showOnMap == 1"
|
||||
style="font-size: 20px; color: #07aaed"
|
||||
@click="openPathModal"
|
||||
/>
|
||||
<EnvironmentOutlined style="font-size: 20px; color: #07aaed" @click="openPathModal" />
|
||||
</a-tooltip>
|
||||
</span>
|
||||
</span> -->
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div class="map">
|
||||
|
|
@ -231,7 +227,7 @@
|
|||
const { createMessage, createConfirm } = useMessage();
|
||||
|
||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList', 'hideOrShowTextboxFlag']);
|
||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccess', 'openPathModal']);
|
||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview', 'openPathModal']);
|
||||
|
||||
// 修改名称--------------------------------
|
||||
const editNameFlag = ref(true);
|
||||
|
|
@ -258,7 +254,7 @@
|
|||
props.nowPreviewRecord.name = newName;
|
||||
editNameFlag.value = true;
|
||||
createMessage.success(res);
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
}
|
||||
function editNameBlur() {
|
||||
|
|
@ -305,7 +301,7 @@
|
|||
addFileTagsFlag.value = true;
|
||||
newFileTagsName.value = '';
|
||||
createMessage.success('添加标签成功');
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
} else {
|
||||
return createMessage.error('此标签已存在!');
|
||||
|
|
@ -333,7 +329,7 @@
|
|||
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||
}).then((res) => {
|
||||
createMessage.success('删除标签成功');
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
},
|
||||
onCancel: () => {},
|
||||
|
|
@ -365,10 +361,10 @@
|
|||
emits('chooseNowPreviewRecord', value);
|
||||
}
|
||||
|
||||
// 打开路径弹窗
|
||||
function openPathModal() {
|
||||
emits('openPathModal', props.nowPreviewRecord);
|
||||
}
|
||||
// // 打开路径弹窗
|
||||
// function openPathModal() {
|
||||
// emits('openPathModal', props.nowPreviewRecord);
|
||||
// }
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.title {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
const { createConfirm, createMessage } = useMessage();
|
||||
|
||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccess']);
|
||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview']);
|
||||
|
||||
// 上一张、下一张视频
|
||||
function clickLeftOrRightButton(direction) {
|
||||
|
|
@ -129,7 +129,7 @@
|
|||
Deletepic({
|
||||
ids: ids,
|
||||
}).then((res) => {
|
||||
handleSuccess(props.nowPreviewRecord);
|
||||
handleSuccessPreview(props.nowPreviewRecord);
|
||||
createMessage.success(res);
|
||||
});
|
||||
},
|
||||
|
|
@ -137,8 +137,8 @@
|
|||
}
|
||||
|
||||
// 刷新表格
|
||||
function handleSuccess(record = null) {
|
||||
emits('handleSuccess', record);
|
||||
function handleSuccessPreview(record = null) {
|
||||
emits('handleSuccessPreview', record);
|
||||
}
|
||||
// 选择
|
||||
function chooseNowPreviewRecord(value) {
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@
|
|||
const { createMessage } = useMessage();
|
||||
|
||||
const props = defineProps(['nowPreviewRecord', 'previewRecordList']);
|
||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccess']);
|
||||
const emits = defineEmits(['chooseNowPreviewRecord', 'handleSuccessPreview']);
|
||||
|
||||
// 修改名称--------------------------------
|
||||
const editNameFlag = ref(true);
|
||||
|
|
@ -202,7 +202,7 @@
|
|||
props.nowPreviewRecord.name = newName;
|
||||
editNameFlag.value = true;
|
||||
createMessage.success(res);
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
}
|
||||
function editNameBlur() {
|
||||
|
|
@ -246,7 +246,7 @@
|
|||
addFileTagsFlag.value = true;
|
||||
newFileTagsName.value = '';
|
||||
createMessage.success('添加标签成功');
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
} else {
|
||||
return createMessage.error('此标签已存在!');
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
showOnMap: props.nowPreviewRecord.showOnMap,
|
||||
}).then((res) => {
|
||||
createMessage.success('删除标签成功');
|
||||
emits('handleSuccess');
|
||||
emits('handleSuccessPreview');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue