123
This commit is contained in:
@ -572,7 +572,7 @@ export function MapUtil(map) {
|
||||
if (!coords) return;
|
||||
if (isclear) _that.removeElement(flag)
|
||||
if (!_that._self[flag]) _that._self[flag] = [];
|
||||
let color1 = color ? color : 'rgba(29,237,245,0.6)'
|
||||
let color1 = color ? color : 'rgba(234, 245, 29, 0.6)'
|
||||
let linecolor1 = linecolor ? linecolor : 'rgba(29,237,245,0.6)'
|
||||
let style = {
|
||||
color: color1,
|
||||
@ -599,7 +599,6 @@ export function MapUtil(map) {
|
||||
// 多边形
|
||||
if (type == 'polygon') maker = map.createPolygon(coords, style);
|
||||
_that._self[flag].push(maker);
|
||||
|
||||
maker.addEventListener("click", (val) => {
|
||||
if (flag == 'xfq') {
|
||||
maker.highlight(val.id) //高亮展示
|
||||
|
||||
@ -51,16 +51,17 @@
|
||||
<el-col :span="8">预警类型</el-col>
|
||||
<el-col :span="4">风险等级</el-col>
|
||||
</el-row>
|
||||
<el-row v-for="(el, index) in tableData" :key="el.id">
|
||||
<el-col :span="2">
|
||||
<div>{{ index + 1 }}</div>
|
||||
</el-col>
|
||||
<el-col :span="10"> {{ el.yjRyxm }} </el-col>
|
||||
<el-col :span="8"> <dict-tag :options="D_BZ_YJLX" :value="el.yjLx" :tag="false" /> </el-col>
|
||||
<el-col :span="4" style="text-align: center;"> <dict-tag :options="D_BZ_YJJB" :value="el.yjJb"
|
||||
:tag="false" /> </el-col>
|
||||
</el-row>
|
||||
<el-button type="primary" style="width: 100%; margin-top: 10px">查看全部预警人员(63人)</el-button>
|
||||
<div class="row_mian"><el-row v-for="(el, index) in tableData" :key="el.id">
|
||||
<el-col :span="2">
|
||||
<div>{{ index + 1 }}</div>
|
||||
</el-col>
|
||||
<el-col :span="10"> {{ el.yjRyxm }} </el-col>
|
||||
<el-col :span="8"> <dict-tag :options="D_BZ_YJLX" :value="el.yjLx" :tag="false" /> </el-col>
|
||||
<el-col :span="4" style="text-align: center;"> <dict-tag :options="D_BZ_YJJB" :value="el.yjJb"
|
||||
:tag="false" /> </el-col>
|
||||
</el-row></div>
|
||||
<el-button type="primary" style="width: 100%; margin-top: 10px" @click="onLoad"
|
||||
v-if="tableData.length < total">查看全部预警人员</el-button>
|
||||
</el-card>
|
||||
|
||||
<!-- 右侧:地图+监控说明 -->
|
||||
@ -87,11 +88,13 @@
|
||||
|
||||
<script setup>
|
||||
import GdMap from "@/components/GdMap/index.vue";
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
import { qcckGet, qcckPost } from "@/api/qcckApi.js";
|
||||
import ChooseYjUser from "@/components/MyComponents/ChooseYjUser";
|
||||
import LineEchart from "./components/lineEcharts.vue";
|
||||
import PieEcharts from "./components/pieEcharts.vue";
|
||||
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
import Total from "element-plus/es/components/pagination/src/components/total.mjs";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_YJLX, D_BZ_YJJB } = proxy.$dict("D_BZ_YJLX", "D_BZ_YJJB");
|
||||
// 预警人员列表数据
|
||||
@ -99,6 +102,7 @@ const listQuery = ref({
|
||||
pageCurrent: 1,
|
||||
pageSize: 10
|
||||
});
|
||||
const total = ref(0);
|
||||
const topData = ref([]);
|
||||
const clData = ref({});
|
||||
const yjfxData = ref(null);
|
||||
@ -137,8 +141,16 @@ const getListData = () => {
|
||||
listQuery.value.pageCurrent == 1
|
||||
? res.records
|
||||
: tableData.value.concat(res.records);
|
||||
total.value = res.total;
|
||||
});
|
||||
};
|
||||
const onLoad = () => {
|
||||
if (tableData.value.length >= total.value) {
|
||||
return
|
||||
}
|
||||
listQuery.value.pageCurrent++;
|
||||
getListData()
|
||||
}
|
||||
const columnInfo = (val) => {
|
||||
// 过站类型(01 入林 02 出林) 01 入林 02 出林
|
||||
dialogSearch.value.kkId = val.row.kkId;
|
||||
@ -186,17 +198,32 @@ const saveUsers = (users) => {
|
||||
listQuery.value.yjRyxm = users[0].yjRyxm;
|
||||
listQuery.value.yjRysfzh = users[0].yjRysfzh;
|
||||
qcckPost({ yjRysfzh: listQuery.value.yjRysfzh }, '/mosty-jcz/tbJczYjxx/getPageList').then((res) => {
|
||||
let list = res.records.filter((item) => {
|
||||
return item.jd && item.wd
|
||||
})
|
||||
emitter.emit("echoPlane", {
|
||||
fontColor: "#12fdb8",
|
||||
coords: list,
|
||||
type: "line",
|
||||
flag: "yjry_gj",
|
||||
color: "rgba(2,20,51,0.5)",
|
||||
linecolor: "#1C97FF"
|
||||
});
|
||||
for (let i = 0; i < res.records.length; i++) {
|
||||
const item = res.records[i];
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: item.jd, wd: item.wd }],
|
||||
icon: require("@/assets/point/zsdw.png"),
|
||||
flag: "yjry_gj"
|
||||
});
|
||||
}
|
||||
// let list = res.records.map((item) => {
|
||||
// return [item.jd, item.wd]
|
||||
// })
|
||||
// let obj = { position: list, text: '', id: '2222' }
|
||||
// console.log(obj, 'obj');
|
||||
// emitter.emit("echoPlane", {
|
||||
// flag: `yjry_gj`,
|
||||
// type: "polygon",
|
||||
// coords: [obj], // 保持使用第一个数据点进行测试
|
||||
// fontSize: "20px",
|
||||
// fontColor: '#000',
|
||||
// });
|
||||
// emitter.emit("setMapCenter", { location: [res.records[0].jd, res.records[0].wd], zoomLevel: 10 });
|
||||
// emitter.emit("addPointArea", {
|
||||
// coords: [{ jd: res.records[0].jd, wd: res.records[0].wd }],
|
||||
// icon: require("@/assets/point/zsdw.png"),
|
||||
// flag: "jczMap_Gzy"
|
||||
// });
|
||||
});
|
||||
|
||||
};
|
||||
@ -356,4 +383,9 @@ const saveUsers = (users) => {
|
||||
::v-deep .el-col {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.row_mian {
|
||||
height: 24vh;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -209,8 +209,12 @@ const getMapData = () => {
|
||||
pyl: arrowhead[key].pyl,
|
||||
})
|
||||
}
|
||||
console.log(jtData,'jtData');
|
||||
|
||||
// 修复后的多边形绘制代码
|
||||
for (let i = 0; i < jtData.length; i++) {
|
||||
console.log(jtData[i],'jtData[i]');
|
||||
|
||||
console.log("正在绘制第", i, "个多边形");
|
||||
emitter.emit("echoPlane", {
|
||||
flag: `polygon${i}`,
|
||||
|
||||
Reference in New Issue
Block a user