|
@@ -12,6 +12,13 @@
|
|
|
当前地图截图导出
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="btn-box">
|
|
|
+ <div v-show="!collaboration" class="btn1" @click="handleShare('1')">
|
|
|
+ 协同标绘
|
|
|
+ </div>
|
|
|
+ <div v-show="collaboration" class="btn1" @click="handleCloseCollaboration">关闭协同</div>
|
|
|
+ <div v-show="collaboration" class="btn1">保存</div>
|
|
|
+ </div>
|
|
|
<div v-if="menuActive1 === 0" class="content">
|
|
|
<div class="box1">
|
|
|
<div class="box-item">
|
|
@@ -69,14 +76,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else-if="menuActive1 === 1" class="tab-content3">
|
|
|
-<!-- <div class="box1">-->
|
|
|
-<!-- <div class="box-item">-->
|
|
|
-<!-- <div class="btn">-->
|
|
|
-<!-- <div class="merge-icon"></div>-->
|
|
|
-<!-- 合并-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
+ <!-- <div class="box1">-->
|
|
|
+ <!-- <div class="box-item">-->
|
|
|
+ <!-- <div class="btn">-->
|
|
|
+ <!-- <div class="merge-icon"></div>-->
|
|
|
+ <!-- 合并-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </div>-->
|
|
|
<div class="params-box">
|
|
|
<el-input v-model="queryParams.pattern_name" class="custom-input" placeholder="请输入" @input="handleQuery">
|
|
|
<template #prefix>
|
|
@@ -103,11 +110,11 @@
|
|
|
<div class="edit-icon"></div>
|
|
|
编辑
|
|
|
</div>
|
|
|
-<!-- <div class="line2"></div>-->
|
|
|
-<!-- <div class="btn">-->
|
|
|
-<!-- <div class="share-icon"></div>-->
|
|
|
-<!-- 分享-->
|
|
|
-<!-- </div>-->
|
|
|
+ <div class="line2"></div>
|
|
|
+ <div class="btn" @click="handleShare('2', item.id)">
|
|
|
+ <div class="share-icon"></div>
|
|
|
+ 分享
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="footer">
|
|
@@ -130,6 +137,7 @@
|
|
|
<div v-show="tipTitle !== ''" class="tipTitle">{{ tipTitle }}</div>
|
|
|
<!--保存修改弹窗-->
|
|
|
<EditDialog v-if="showEdit" v-model="showEdit" :edit-data="editData" @submit="handleSubmit" />
|
|
|
+ <ShareDialog v-if="shareState.showShare" v-model="shareState.showShare" @close="handleCloseShare" @confirm="handleShareConfirm" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="OnlinePlotting">
|
|
@@ -141,6 +149,7 @@ import TextEdit from '@/views/globalMap/RightMenu/OnlinePlotting/TextEdit.vue';
|
|
|
import EditDialog from '@/views/globalMap/RightMenu/OnlinePlotting/EditDialog.vue';
|
|
|
import { Search } from '@element-plus/icons-vue';
|
|
|
import html2canvas from 'html2canvas';
|
|
|
+import ShareDialog from '@/views/globalMap/RightMenu/OnlinePlotting/ShareDialog.vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const getDrawTool = inject('getDrawTool');
|
|
@@ -235,8 +244,20 @@ const menu = ref([
|
|
|
value: 'fireGround',
|
|
|
children: [
|
|
|
{ name: '火场', value: 'marker', image: getImageUrl('fireground'), icon: getImageUrl('fireground'), size: [166, 88] },
|
|
|
- { name: '受控火场', value: 'marker', image: getImageUrl('controlledfireground'), icon: getImageUrl('controlledfireground'), size: [166, 88] },
|
|
|
- { name: '已灭火场', value: 'marker', image: getImageUrl('extinguishedfireground'), icon: getImageUrl('extinguishedfireground'), size: [166, 88] }
|
|
|
+ {
|
|
|
+ name: '受控火场',
|
|
|
+ value: 'marker',
|
|
|
+ image: getImageUrl('controlledfireground'),
|
|
|
+ icon: getImageUrl('controlledfireground'),
|
|
|
+ size: [166, 88]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '已灭火场',
|
|
|
+ value: 'marker',
|
|
|
+ image: getImageUrl('extinguishedfireground'),
|
|
|
+ icon: getImageUrl('extinguishedfireground'),
|
|
|
+ size: [166, 88]
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -265,7 +286,7 @@ const menu = ref([
|
|
|
{ name: '军队', value: 'marker', image: getImageUrl('army'), icon: getImageUrl('army'), size: [166, 88] },
|
|
|
{ name: '武警', value: 'marker', image: getImageUrl('armedpolice'), icon: getImageUrl('armedpolice'), size: [166, 88] },
|
|
|
{ name: '森林警察', value: 'marker', image: getImageUrl('forestpoliceman'), icon: getImageUrl('forestpoliceman'), size: [166, 88] },
|
|
|
- { name: '扑火队伍', value: 'marker', image: getImageUrl('firefightingteam'), icon: getImageUrl('firefightingteam'), size: [166, 88] },
|
|
|
+ { name: '扑火队伍', value: 'marker', image: getImageUrl('firefightingteam'), icon: getImageUrl('firefightingteam'), size: [166, 88] }
|
|
|
// { name: '扑火队伍路线', value: 'marker', image: getImageUrl('Firefightingteamroute'), icon: getImageUrl('Firefightingteamroute'), size: [166, 88] }
|
|
|
]
|
|
|
},
|
|
@@ -277,8 +298,20 @@ const menu = ref([
|
|
|
{ name: '直升机', value: 'marker', image: getImageUrl('helicopter'), icon: getImageUrl('helicopter'), size: [166, 88] },
|
|
|
{ name: '无人机', value: 'marker', image: getImageUrl('UAV'), icon: getImageUrl('UAV'), size: [166, 88] },
|
|
|
{ name: '指挥车', value: 'marker', image: getImageUrl('commandvehicle'), icon: getImageUrl('commandvehicle'), size: [166, 88] },
|
|
|
- { name: '飞机航线设置', value: 'marker', image: getImageUrl('aircraftroutesetting'), icon: getImageUrl('aircraftroutesetting'), size: [166, 88] },
|
|
|
- { name: '直升机航线设置', value: 'marker', image: getImageUrl('helicopterroutesetting'), icon: getImageUrl('helicopterroutesetting'), size: [166, 88] }
|
|
|
+ {
|
|
|
+ name: '飞机航线设置',
|
|
|
+ value: 'marker',
|
|
|
+ image: getImageUrl('aircraftroutesetting'),
|
|
|
+ icon: getImageUrl('aircraftroutesetting'),
|
|
|
+ size: [166, 88]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '直升机航线设置',
|
|
|
+ value: 'marker',
|
|
|
+ image: getImageUrl('helicopterroutesetting'),
|
|
|
+ icon: getImageUrl('helicopterroutesetting'),
|
|
|
+ size: [166, 88]
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -286,13 +319,18 @@ const menu = ref([
|
|
|
value: 'basicSetting',
|
|
|
children: [
|
|
|
{ name: '航站', value: 'marker', image: getImageUrl('terminal'), icon: getImageUrl('terminal'), size: [166, 88] },
|
|
|
- { name: '起降点', value: 'marker', image: getImageUrl('takeoffandlandingpoint'), icon: getImageUrl('takeoffandlandingpoint'), size: [166, 88] },
|
|
|
+ {
|
|
|
+ name: '起降点',
|
|
|
+ value: 'marker',
|
|
|
+ image: getImageUrl('takeoffandlandingpoint'),
|
|
|
+ icon: getImageUrl('takeoffandlandingpoint'),
|
|
|
+ size: [166, 88]
|
|
|
+ },
|
|
|
{ name: '取水点', value: 'marker', image: getImageUrl('waterpoint'), icon: getImageUrl('waterpoint'), size: [166, 88] },
|
|
|
{ name: '瞭望塔', value: 'marker', image: getImageUrl('watchtower'), icon: getImageUrl('watchtower'), size: [166, 88] },
|
|
|
- { name: '物资库', value: 'marker', image: getImageUrl('materialwarehouse'), icon: getImageUrl('materialwarehouse'), size: [166, 88] },
|
|
|
-
|
|
|
+ { name: '物资库', value: 'marker', image: getImageUrl('materialwarehouse'), icon: getImageUrl('materialwarehouse'), size: [166, 88] }
|
|
|
]
|
|
|
- },
|
|
|
+ }
|
|
|
// {
|
|
|
// name: '其他',
|
|
|
// value: 'other',
|
|
@@ -321,6 +359,15 @@ const lineWidthOptions = reactive([
|
|
|
]);
|
|
|
let showTextEdit = ref();
|
|
|
let lnglat = ref([]);
|
|
|
+// 协同
|
|
|
+let collaboration = ref(false);
|
|
|
+// 分享
|
|
|
+let shareState = reactive({
|
|
|
+ type: '',
|
|
|
+ showShare: false,
|
|
|
+ id: ''
|
|
|
+});
|
|
|
+let shareId = ref('');
|
|
|
const overlays = [];
|
|
|
const overlaysData = [];
|
|
|
watch(
|
|
@@ -645,6 +692,31 @@ const handleEdit = (id) => {
|
|
|
});
|
|
|
showEdit.value = true;
|
|
|
};
|
|
|
+const handleShare = (type, id?: string) => {
|
|
|
+ if (type === '1') {
|
|
|
+ // 创建协同
|
|
|
+ collaboration.value = true;
|
|
|
+ }
|
|
|
+ shareState.type = type;
|
|
|
+ shareState.id = id;
|
|
|
+ shareState.showShare = true;
|
|
|
+};
|
|
|
+const handleCloseShare = () => {
|
|
|
+ shareState.type = '';
|
|
|
+ shareState.id = '';
|
|
|
+};
|
|
|
+const handleCloseCollaboration = () => {
|
|
|
+ collaboration.value = false;
|
|
|
+}
|
|
|
+const handleShareConfirm = (data) => {
|
|
|
+ if (shareState.type === '1') {
|
|
|
+ // 协同标绘
|
|
|
+ } else {
|
|
|
+ // 分享
|
|
|
+ }
|
|
|
+ shareState.type = '';
|
|
|
+ shareState.id = '';
|
|
|
+};
|
|
|
const handleShowDialog = () => {
|
|
|
editData.value = {
|
|
|
id: '',
|
|
@@ -672,7 +744,7 @@ const handleScreenshot = () => {
|
|
|
logging: false // 不启动日志调试
|
|
|
};
|
|
|
// canvasBox是要截图的元素,options是一些相关配置
|
|
|
- html2canvas(canvasBox,options).then((canvas) => {
|
|
|
+ html2canvas(canvasBox, options).then((canvas) => {
|
|
|
// toDataURL 图片格式转成 base64
|
|
|
dataURL.value = canvas.toDataURL('image/png');
|
|
|
// 新建一个a标签
|
|
@@ -1066,4 +1138,9 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.btn-box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin: 10px 0;
|
|
|
+}
|
|
|
</style>
|