|
@@ -1,7 +1,13 @@
|
|
|
<template>
|
|
|
<div class="menu-content">
|
|
|
<div class="gradient-text title">实时标绘</div>
|
|
|
- <CollaborativeOperationBar v-model="collaboration" />
|
|
|
+ <CollaborativeOperationBar
|
|
|
+ v-model="collaboration"
|
|
|
+ :title="collaborativeTitle"
|
|
|
+ :data="currentState"
|
|
|
+ @closeCollaboration="handleCloseCollaboration"
|
|
|
+ @confirm="getList"
|
|
|
+ />
|
|
|
<div class="line">
|
|
|
<div class="tabs1">
|
|
|
<div v-for="(item, index) in menu" :key="index" :class="menuActive1 === index ? 'tab tab_active' : 'tab'" @click="clickTab(index)">
|
|
@@ -21,17 +27,17 @@
|
|
|
<div class="box1">
|
|
|
<div v-show="!showSetting" class="box-item">
|
|
|
<div class="btn" @click="handleUndo">
|
|
|
- <div class="revoke-icon"></div>
|
|
|
+ <div class="revoke-icon" />
|
|
|
撤回
|
|
|
</div>
|
|
|
<div class="line2"></div>
|
|
|
<div class="btn">
|
|
|
- <div class="delete-icon"></div>
|
|
|
+ <div class="delete-icon" />
|
|
|
删除
|
|
|
</div>
|
|
|
<div class="line2"></div>
|
|
|
<div class="btn" @click="handleShowDialog">
|
|
|
- <div class="save-icon"></div>
|
|
|
+ <div class="save-icon" />
|
|
|
保存
|
|
|
</div>
|
|
|
</div>
|
|
@@ -216,6 +222,7 @@ import EditClassDialog from './EditClassDialog.vue';
|
|
|
import TextEdit from './TextEdit.vue';
|
|
|
import EditDialog from './EditDialog.vue';
|
|
|
import LayerDetail from './LayerDetail.vue';
|
|
|
+import CollaborativeOperationBar from './CollaborativeOperationBar.vue';
|
|
|
import { nanoid } from 'nanoid';
|
|
|
import { deepClone } from '@/utils';
|
|
|
import { useHistory } from '@/hooks/useHistory';
|
|
@@ -223,6 +230,7 @@ import {
|
|
|
changeVisibleClassification,
|
|
|
closeCollaboration,
|
|
|
createCollaboration,
|
|
|
+ createPattern,
|
|
|
deleteClassificationCreate,
|
|
|
deletePatternById,
|
|
|
getPatternInfo,
|
|
@@ -237,7 +245,6 @@ import * as turf from '@turf/turf';
|
|
|
import Style from 'ol/style/Style';
|
|
|
import Icon from 'ol/style/Icon';
|
|
|
import useMapStore from '@/store/modules/map';
|
|
|
-import CollaborativeOperationBar from '@/views/globalMap/RightMenu/OnlinePlotting/CollaborativeOperationBar.vue';
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const mapStore = useMapStore();
|
|
@@ -905,6 +912,7 @@ const handleShowPatternData = () => {
|
|
|
const handleSaveCollaboration = () => {
|
|
|
|
|
|
};
|
|
|
+const collaborativeTitle = ref('');
|
|
|
let showForm = ref(false);
|
|
|
let form = ref({
|
|
|
pattern_id: '',
|
|
@@ -945,7 +953,7 @@ const handleShareConfirm = (data) => {
|
|
|
const getWebSocketData = (data) => {
|
|
|
if (data && data.length > 0) {
|
|
|
const data2 = [];
|
|
|
- const data3 = deepClone(data);
|
|
|
+ const data3 = [];
|
|
|
data.forEach((item) => {
|
|
|
if (!!item.content) {
|
|
|
const parseContent = JSON.parse(item.content);
|
|
@@ -955,6 +963,7 @@ const getWebSocketData = (data) => {
|
|
|
if (item.visible === '1') {
|
|
|
data2.push(parseContent);
|
|
|
}
|
|
|
+ data3.push(parseContent);
|
|
|
}
|
|
|
});
|
|
|
const res = mapUtils.drawData(data2);
|
|
@@ -965,9 +974,8 @@ const getWebSocketData = (data) => {
|
|
|
overlaysData.push(data3[index]);
|
|
|
});
|
|
|
commit(deepClone(overlaysData));
|
|
|
- currentState.value = data;
|
|
|
+ currentState.value = data3;
|
|
|
}
|
|
|
-
|
|
|
console.log('接收数据', data);
|
|
|
};
|
|
|
|
|
@@ -979,6 +987,7 @@ const handleSendForm = () => {
|
|
|
// patternId.value = 'MbHKSVA00Y2tQG1Y_u8kL';
|
|
|
createCollaboration(form.value).then(() => {
|
|
|
patternId.value = form.value.pattern_id;
|
|
|
+ collaborativeTitle.value = form.value.pattern_name;
|
|
|
webSock = createWebSocket(form.value.pattern_id, getWebSocketData);
|
|
|
showForm.value = false;
|
|
|
collaboration.value = true;
|