新版电子围栏

main
zhufu 4 weeks ago
parent e6f271bfc7
commit 06fb4e0ac6

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

@ -0,0 +1,17 @@
import { defHttp } from '@/utils/http/axios';
enum Api {
AddWorkArea = '/api/Manage/AddWorkArea',
UpdateWorkArea = '/api/Manage/UpdateWorkArea',
DeleteWorkArea = '/api/Manage/DeleteWorkArea',
}
export const AddWorkArea = (params) => defHttp.post({
url: Api.AddWorkArea,
params,
});
export const UpdateWorkArea = (params) => defHttp.post({
url: Api.UpdateWorkArea,
params,
});
export const DeleteWorkArea = (params: string) => defHttp.post({
url: `${Api.DeleteWorkArea}?id=${params}`,
});

@ -9,6 +9,7 @@
:allWorkspaceDataList="allWorkspaceDataList" :allWorkspaceDataList="allWorkspaceDataList"
:nowShowAreaData="nowShowAreaData" :nowShowAreaData="nowShowAreaData"
:projectList="projectList" :projectList="projectList"
:geomDate="geomDate"
@changeLeftMenuShow="changeLeftMenuShow" @changeLeftMenuShow="changeLeftMenuShow"
@handlerLocation="handlerLocation" @handlerLocation="handlerLocation"
@changeAnnotationInfoShow="changeAnnotationInfoShow" @changeAnnotationInfoShow="changeAnnotationInfoShow"
@ -18,6 +19,11 @@
@setAllAreaData="setAllAreaData" @setAllAreaData="setAllAreaData"
@deleteAnnotation="deleteAnnotation" @deleteAnnotation="deleteAnnotation"
@deleteArea="deleteArea" @deleteArea="deleteArea"
@drawArea="drawArea"
@flyToGraphic="flyToGraphic"
@stopDrawArea="stopDrawArea"
@updateGraphic="updateGraphic"
@backGraphic="backGraphic"
/> />
</div> </div>
<!-- 地图 --> <!-- 地图 -->
@ -29,13 +35,14 @@
:allAreaDataList="allAreaDataList" :allAreaDataList="allAreaDataList"
:nowShowAreaData="nowShowAreaData" :nowShowAreaData="nowShowAreaData"
:nowShowImageData="nowShowImageData" :nowShowImageData="nowShowImageData"
:geomDate="geomDate"
@setNowShowAnnotationData="setNowShowAnnotationData" @setNowShowAnnotationData="setNowShowAnnotationData"
@setNowShowAreaData="setNowShowAreaData" @setNowShowAreaData="setNowShowAreaData"
@setAllAreaData="setAllAreaData" @setAllAreaData="setAllAreaData"
/> />
</div> </div>
<!-- 地图作业区域 --> <!-- 地图作业区域 -->
<div class="areaInfoDiv" v-if="areaInfoShow"> <!-- <div class="areaInfoDiv" v-if="areaInfoShow">
<PathAreaInfo <PathAreaInfo
:allAreaDataList="allAreaDataList" :allAreaDataList="allAreaDataList"
:nowShowAreaData="nowShowAreaData" :nowShowAreaData="nowShowAreaData"
@ -44,7 +51,7 @@
@handlerLocation="handlerLocation" @handlerLocation="handlerLocation"
@deleteArea="deleteArea" @deleteArea="deleteArea"
/> />
</div> </div> -->
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -59,6 +66,8 @@
} from '@/api/demo/mediaLibrary'; } from '@/api/demo/mediaLibrary';
import { WktToGeojson, GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform'; import { WktToGeojson, GeojsonToWkt } from '@/components/MapboxMaps/src/WktGeojsonTransform';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import * as mars3d from "mars3d"
import * as Cesium from 'mars3d-cesium';
const { createMessage, createConfirm } = useMessage(); const { createMessage, createConfirm } = useMessage();
const props = defineProps(['pathRecord']); const props = defineProps(['pathRecord']);
@ -81,6 +90,10 @@
// ref // ref
const pathMapRef = ref(); const pathMapRef = ref();
const geomDate = ref({
geom:'',
properties: '',
})
// ---------------------------------------------------- // ----------------------------------------------------
const pathLeftMenuRef = ref(); const pathLeftMenuRef = ref();
@ -175,16 +188,15 @@
async function getWorkAreaList(showThis = true) { async function getWorkAreaList(showThis = true) {
allAreaDataList.value = await GetWorkAreaList(); allAreaDataList.value = await GetWorkAreaList();
if (allAreaDataList.value.length > 0) { if (allAreaDataList.value.length > 0) {
allAreaDataList.value.forEach((area, index) => { allAreaDataList.value = allAreaDataList.value.map(item => {
let geomjson = WktToGeojson(area.geom); let geomjson = WktToGeojson(item.geom);
area = { return {
...area, ...item,
properties: JSON.parse(area.properties), // properties: JSON.parse(item.properties),
geomtype: getGeomType(area), geomtype: getGeomType(item),
coordinates: geomjson.coordinates, coordinates: geomjson.coordinates,
}; }
allAreaDataList.value[index] = area; })
});
} }
if (showThis) { if (showThis) {
setTimeout(() => { setTimeout(() => {
@ -247,6 +259,21 @@
if (geom.indexOf('POINT') > -1 && radiusFlag) { if (geom.indexOf('POINT') > -1 && radiusFlag) {
return 'Circle'; return 'Circle';
} }
}
const drawArea = (shape, areaType) => {
pathMapRef.value.drawArea(shape, areaType)
}
const stopDrawArea = () => {
pathMapRef.value.stopDrawArea()
}
const flyToGraphic = (item) => {
pathMapRef.value.flyToGraphic(item)
}
const updateGraphic = (item) => {
pathMapRef.value.updateGraphic(item)
}
const backGraphic = (item) => {
pathMapRef.value.backGraphic(item)
} }
onMounted(() => { onMounted(() => {
// //
@ -263,12 +290,13 @@
.leftMenuDiv { .leftMenuDiv {
position:absolute; position:absolute;
top:20px; top:39px;
left:20px; left:48px;
z-index:1; z-index:1;
display:flex; display:flex;
gap:15px; gap:15px;
width: 423px; width: 365px;
height: 800px;
} }
.mapDiv { .mapDiv {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save