|
@@ -65,7 +65,14 @@
|
|
|
{{ node.label }}
|
|
|
</span>
|
|
|
<span :class="{ disable: data.disable }" class="name">
|
|
|
- {{ data.raw.name }}
|
|
|
+ <span
|
|
|
+ class="color"
|
|
|
+ :style="{
|
|
|
+ backgroundColor:
|
|
|
+ pointColorMap[data.raw.type || PointTypeEnum.other],
|
|
|
+ }"
|
|
|
+ ></span>
|
|
|
+ {{ data.raw.name }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</el-tooltip>
|
|
@@ -110,14 +117,22 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <template v-if="!queryMode">
|
|
|
+ <template v-if="!queryMode && treeNode.length">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
:icon="Download"
|
|
|
style="width: 100%"
|
|
|
- @click="exportFile(getSelectPoints(), 2, relics?.name)"
|
|
|
+ @click="exportFile(getSelectPoints(), 2, relics?.name, 'V2')"
|
|
|
>
|
|
|
- 导出本体边界坐标
|
|
|
+ 导出本体边界坐标(V1.4模板)
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :icon="Download"
|
|
|
+ style="width: 100%; margin-top: 20px; margin-left: 0"
|
|
|
+ @click="exportFile(getSelectPoints(), 2, relics?.name, 'V1')"
|
|
|
+ >
|
|
|
+ 导出本体边界坐标(V1.2模板)
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
@@ -127,20 +142,16 @@
|
|
|
@click="exportImage(getSelectPoints(), relics?.name)"
|
|
|
>
|
|
|
下载全景图
|
|
|
- {{ inputPoint?.name }}
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</div>
|
|
|
|
|
|
<SingleInput
|
|
|
- :key="inputPoint?.id"
|
|
|
+ v-if="inputPoint"
|
|
|
:visible="!!inputPoint"
|
|
|
@update:visible="inputPoint = null"
|
|
|
- :value="inputPoint?.name || ''"
|
|
|
+ :value="inputPoint"
|
|
|
:update-value="updatePointName"
|
|
|
- is-allow-empty
|
|
|
- title="测点说明"
|
|
|
- placeholder="请填写测点说明"
|
|
|
/>
|
|
|
</template>
|
|
|
|
|
@@ -167,7 +178,7 @@ import {
|
|
|
scenePoints,
|
|
|
} from "@/store/scene";
|
|
|
import { relics } from "@/store/relics";
|
|
|
-import SingleInput from "@/components/single-input.vue";
|
|
|
+import SingleInput from "@/components/point-input.vue";
|
|
|
import { selectScenes } from "../quisk";
|
|
|
import { addRelicsScenesFetch, delRelicsScenesFetch } from "@/request";
|
|
|
import { exportFile, exportImage } from "./pc4Helper";
|
|
@@ -181,25 +192,41 @@ import {
|
|
|
PolygonsPointAttrib,
|
|
|
getWholeLineLinesByPointId,
|
|
|
getWholeLinePoint,
|
|
|
+ pointColorMap,
|
|
|
+ PointTypeEnum,
|
|
|
} from "drawing-board";
|
|
|
import { flyScene, gotoPointPage, mapManage } from "./install";
|
|
|
import { board } from "./install";
|
|
|
+// import { attachImageCoord, readExif } from "@/util/image-exif";
|
|
|
+// import { saveAs } from "@/util/file-serve";
|
|
|
+
|
|
|
+// const changfile = async (ev) => {
|
|
|
+// readExif(ev.target.files[0]);
|
|
|
+// const blob = await attachImageCoord(ev.target.files[0], [
|
|
|
+// 127.101412416667,
|
|
|
+// 37.338276944444,
|
|
|
+// 5,
|
|
|
+// ]);
|
|
|
+// saveAs(blob);
|
|
|
+// };
|
|
|
|
|
|
const inputPoint = ref<ScenePoint | null>(null);
|
|
|
-const updatePointName = async (title: string) => {
|
|
|
+const updatePointName = async (scenePoint: ScenePoint) => {
|
|
|
const point = getWholeLinePoint(
|
|
|
boardData.value,
|
|
|
inputPoint.value.id.toString()
|
|
|
) as PolygonsPointAttrib;
|
|
|
+
|
|
|
await Promise.all([
|
|
|
boardDataChange(() => {
|
|
|
if (point) {
|
|
|
- point.title = inputPoint.value.index
|
|
|
- ? inputPoint.value.index + "-" + title
|
|
|
- : title;
|
|
|
+ point.title = scenePoint.index
|
|
|
+ ? scenePoint.index + "-" + scenePoint.name
|
|
|
+ : scenePoint.name;
|
|
|
+ point.type = scenePoint.type;
|
|
|
}
|
|
|
}),
|
|
|
- updateScenePointName(inputPoint.value!, title),
|
|
|
+ updateScenePointName(scenePoint),
|
|
|
]);
|
|
|
};
|
|
|
|
|
@@ -323,6 +350,9 @@ onBeforeUnmount(() => {
|
|
|
board.polygon.bus.off("clickPoint", pointClickHandler);
|
|
|
board.polygon.container.stage.off("click.checkPointSelect");
|
|
|
board.polygon.status.lightPointId = null;
|
|
|
+
|
|
|
+ // treeRef.value.setCheckedNodes([]);
|
|
|
+ board.polygon.status.selectPoiIds = [];
|
|
|
});
|
|
|
</script>
|
|
|
|
|
@@ -382,6 +412,14 @@ onBeforeUnmount(() => {
|
|
|
text-overflow: ellipsis; //文本溢出显示省略号
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap; //文本不会换行
|
|
|
+
|
|
|
+ .color {
|
|
|
+ display: inline-block;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ margin-right: 8px;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|