Compare commits
3 Commits
0ffc0cd01e
...
2025-10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b396686b61 | ||
|
|
1a0a42c5a5 | ||
|
|
980d5a22b3 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,6 +11,8 @@ node_modules
|
|||||||
dist
|
dist
|
||||||
|
|
||||||
offline
|
offline
|
||||||
|
# tiles
|
||||||
|
# tiles1
|
||||||
dist-ssr
|
dist-ssr
|
||||||
*.local
|
*.local
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|||||||
@@ -303,3 +303,12 @@ export function exportLineData() {
|
|||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 无锡地图查询
|
||||||
|
export function stationMap(data: object) {
|
||||||
|
return service({
|
||||||
|
url: "/scale/stationMap",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
BIN
src/assets/bdz.png
Normal file
BIN
src/assets/bdz.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -5,7 +5,7 @@ import store from "@/store/index";
|
|||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: "/api",
|
baseURL: "/api",
|
||||||
timeout: 60 * 1000,
|
timeout: 60 * 1000 * 3,
|
||||||
headers: { "Content-Type": "application/json;charset=utf-8" },
|
headers: { "Content-Type": "application/json;charset=utf-8" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class HttpRequest {
|
|||||||
getInsideConfig() {
|
getInsideConfig() {
|
||||||
const config = {
|
const config = {
|
||||||
baseURL: this.baseUrl, // 所有的请求地址前缀部分(没有后端请求不用写)
|
baseURL: this.baseUrl, // 所有的请求地址前缀部分(没有后端请求不用写)
|
||||||
timeout: 80000, // 请求超时时间(毫秒)
|
timeout: 60 * 1000 * 3, // 请求超时时间(毫秒)
|
||||||
};
|
};
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
<div v-loading="loading" element-loading-background="#343849c7">
|
<div v-loading="loading" element-loading-background="#343849c7">
|
||||||
<div class="iconBox">
|
<div class="iconBox">
|
||||||
<div class="div">
|
<div class="div">
|
||||||
<img src="@/assets/jcd.png" alt="" />
|
<img src="@/assets/bdz.png" alt="" />
|
||||||
<span>变电站</span>
|
<span>变电站</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="div">
|
<!-- <div class="div">
|
||||||
<img src="@/assets/img/txzcwzj.png" alt="" />
|
<img src="@/assets/img/txzcwzj.png" alt="" />
|
||||||
<span>监测点</span>
|
<span>监测点</span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="bmSelect">
|
<div class="bmSelect">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -45,26 +45,26 @@
|
|||||||
:double-click-zoom="false"
|
:double-click-zoom="false"
|
||||||
>
|
>
|
||||||
<!-- 线-->
|
<!-- 线-->
|
||||||
<div v-if="zoom > 13">
|
<!-- <div v-if="zoom > 13">
|
||||||
<bm-polyline
|
<bm-polyline
|
||||||
:path="path"
|
:path="path"
|
||||||
v-for="(path, index) in polyline"
|
v-for="(path, index) in polyline"
|
||||||
:key="index"
|
:key="index"
|
||||||
></bm-polyline>
|
></bm-polyline>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 变电站-->
|
<!-- 变电站-->
|
||||||
<template v-if="zoom > 13">
|
<template>
|
||||||
<bm-marker
|
<bm-marker
|
||||||
:position="path"
|
:position="path"
|
||||||
v-for="path in siteList"
|
v-for="path in siteList"
|
||||||
:key="path.subId"
|
:key="path.subId"
|
||||||
:icon="path.icon"
|
:icon="path.icon"
|
||||||
@click="markerClick(path)"
|
@click="pointClick(path)"
|
||||||
></bm-marker>
|
></bm-marker>
|
||||||
</template>
|
</template>
|
||||||
<!-- 点 -->
|
<!-- 点 -->
|
||||||
<div maxZoom="12">
|
<!-- <div maxZoom="12">
|
||||||
<bm-marker
|
<bm-marker
|
||||||
:position="path"
|
:position="path"
|
||||||
v-for="path in areaLineInfo"
|
v-for="path in areaLineInfo"
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
:icon="path.icon"
|
:icon="path.icon"
|
||||||
@click="pointClick(path)"
|
@click="pointClick(path)"
|
||||||
></bm-marker>
|
></bm-marker>
|
||||||
</div>
|
</div> -->
|
||||||
<bm-marker
|
<bm-marker
|
||||||
:position="infoWindowPoint"
|
:position="infoWindowPoint"
|
||||||
:icon="{ url: '1', size: { width: 0, height: 0 } }"
|
:icon="{ url: '1', size: { width: 0, height: 0 } }"
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, nextTick, onMounted } from "vue";
|
import { ref, reactive, nextTick, onMounted } from "vue";
|
||||||
import { substationCount } from "@/api/statistics/index";
|
import { stationMap } from "@/api/statistics/index";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
// import { BmlMarkerClusterer } from "vue-baidu-map-3x";
|
// import { BmlMarkerClusterer } from "vue-baidu-map-3x";
|
||||||
const emit = defineEmits(["pointClick"]);
|
const emit = defineEmits(["pointClick"]);
|
||||||
@@ -129,7 +129,7 @@ const handler = async ({ BMap, map }: any) => {
|
|||||||
const markerClick = (e: any) => {
|
const markerClick = (e: any) => {
|
||||||
zoom.value = 15;
|
zoom.value = 15;
|
||||||
infoWindowPoint.value = e;
|
infoWindowPoint.value = e;
|
||||||
infoWindowPoint.value.show = true;
|
// infoWindowPoint.value.show = true;
|
||||||
center.value.lng = 120.124367;
|
center.value.lng = 120.124367;
|
||||||
center.value.lat = 31.555421;
|
center.value.lat = 31.555421;
|
||||||
|
|
||||||
@@ -150,87 +150,87 @@ const init = () => {
|
|||||||
polyline.value = [];
|
polyline.value = [];
|
||||||
dataList.value = [];
|
dataList.value = [];
|
||||||
areaLineInfo.value = [];
|
areaLineInfo.value = [];
|
||||||
// substationCount({
|
stationMap({
|
||||||
// deptId: store.state.deptId,
|
deptId: store.state.deptId,
|
||||||
// type: store.state.timeType,
|
type: store.state.timeType,
|
||||||
// startTime: store.state.timeValue[0],
|
startTime: store.state.timeValue[0],
|
||||||
// endTime: store.state.timeValue[1],
|
endTime: store.state.timeValue[1],
|
||||||
// }).then((res: any) => {
|
}).then((res: any) => {
|
||||||
// dataList.value = res.data;
|
dataList.value = res.data;
|
||||||
dataList.value = [
|
// dataList.value = [
|
||||||
{
|
// {
|
||||||
stationId: 156,
|
// stationId: 156,
|
||||||
stationName: "110kV北京电视台变",
|
// stationName: "110kV北京电视台变",
|
||||||
gdName: "检修分公司",
|
// gdName: "检修分公司",
|
||||||
longitude: 120.33,
|
// longitude: 120.33,
|
||||||
latitude: 31.52,
|
// latitude: 31.52,
|
||||||
lineCount: 1,
|
// lineCount: 1,
|
||||||
eventCount: 1,
|
// eventCount: 1,
|
||||||
lineEventDetails: [
|
// lineEventDetails: [
|
||||||
{
|
// // {
|
||||||
gdName: "检修分公司",
|
// // gdName: "检修分公司",
|
||||||
pictureId: "5debb8bd0ce26527675eedffd74a3198",
|
// // pictureId: "5debb8bd0ce26527675eedffd74a3198",
|
||||||
pictureName: "无锡线上",
|
// // pictureName: "无锡线上",
|
||||||
},
|
// // },
|
||||||
{
|
// {
|
||||||
gdName: "检修分公司",
|
// gdName: "检修分公司",
|
||||||
pictureId: "35b1301833e3fdfc872b1a27a17c7245",
|
// pictureId: "35b1301833e3fdfc872b1a27a17c7245",
|
||||||
pictureName: "无锡修改1011--工程部",
|
// pictureName: "无锡修改1011--工程部",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
];
|
// ];
|
||||||
let data = dataList.value;
|
let data = dataList.value;
|
||||||
let r = 0.0035;
|
let r = 0.0035;
|
||||||
let list = data.filter((item: any) => item.latitude != 0);
|
let list = data.filter((item: any) => item.lat != 0);
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
// 变电站图标
|
// 变电站图标
|
||||||
item.icon = {
|
item.icon = {
|
||||||
url: new URL("@/assets/jcd.png", import.meta.url).href,
|
url: new URL("@/assets/bdz.png", import.meta.url).href,
|
||||||
size: {
|
size: {
|
||||||
width: 40,
|
width: 40,
|
||||||
height: 40,
|
height: 40,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (
|
// if (
|
||||||
item.lineEventDetails?.length > 10 &&
|
// item.lineEventDetails?.length > 10 &&
|
||||||
item.lineEventDetails?.length < 100
|
// item.lineEventDetails?.length < 100
|
||||||
) {
|
// ) {
|
||||||
r = 0.0055;
|
// r = 0.0055;
|
||||||
} else if (item.lineEventDetails.length >= 100) {
|
// } else if (item.lineEventDetails.length >= 100) {
|
||||||
r = 0.01055;
|
// r = 0.01055;
|
||||||
}
|
// }
|
||||||
item.lng = item.longitude;
|
// item.lng = item.longitude;
|
||||||
item.lat = item.latitude;
|
// item.lat = item.latitude;
|
||||||
item.lineEventDetails.forEach((val: any, i: number) => {
|
// item.lineEventDetails.forEach((val: any, i: number) => {
|
||||||
val.lng =
|
// val.lng =
|
||||||
item.longitude +
|
// item.longitude +
|
||||||
r * Math.cos((2 * Math.PI * i) / item.lineEventDetails.length);
|
// r * Math.cos((2 * Math.PI * i) / item.lineEventDetails.length);
|
||||||
val.lat =
|
// val.lat =
|
||||||
item.latitude +
|
// item.latitude +
|
||||||
r * Math.sin((2 * Math.PI * i) / item.lineEventDetails.length);
|
// r * Math.sin((2 * Math.PI * i) / item.lineEventDetails.length);
|
||||||
// 监测点图标
|
// // 监测点图标
|
||||||
val.icon = {
|
// val.icon = {
|
||||||
url: new URL("@/assets/img/txzcwzj.png", import.meta.url).href,
|
// url: new URL("@/assets/img/txzcwzj.png", import.meta.url).href,
|
||||||
size: {
|
// size: {
|
||||||
width: 40,
|
// width: 40,
|
||||||
height: 40,
|
// height: 40,
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
|
|
||||||
polyline.value.push([
|
// polyline.value.push([
|
||||||
{
|
// {
|
||||||
lng: item.lng,
|
// lng: item.lng,
|
||||||
lat: item.lat,
|
// lat: item.lat,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
lng: val.lng,
|
// lng: val.lng,
|
||||||
lat: val.lat,
|
// lat: val.lat,
|
||||||
},
|
// },
|
||||||
]);
|
// ]);
|
||||||
});
|
// });
|
||||||
|
|
||||||
areaLineInfo.value.push(...item.lineEventDetails);
|
// areaLineInfo.value.push(...item.lineEventDetails);
|
||||||
});
|
});
|
||||||
|
|
||||||
siteList.value = list;
|
siteList.value = list;
|
||||||
@@ -239,7 +239,7 @@ const init = () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}, 0);
|
}, 0);
|
||||||
// });
|
});
|
||||||
};
|
};
|
||||||
const moveenFlag = ref(true);
|
const moveenFlag = ref(true);
|
||||||
|
|
||||||
@@ -267,12 +267,12 @@ const checkMapData = () => {
|
|||||||
if (!hasOfflineTiles) {
|
if (!hasOfflineTiles) {
|
||||||
console.warn("当前区域无离线地图数据,将返回默认位置");
|
console.warn("当前区域无离线地图数据,将返回默认位置");
|
||||||
|
|
||||||
// 使用正确的BMap.Point创建方式
|
// 使用正确的BMap.Point创建方式
|
||||||
const point = new BMapInstance.value.Point(116.404367, 39.915421);
|
const point = new BMapInstance.value.Point(120.124367,31.555421);
|
||||||
|
|
||||||
// 平滑移动并设置合适缩放级别
|
// 平滑移动并设置合适缩放级别
|
||||||
mapInstance.value.panTo(point);
|
mapInstance.value.panTo(point);
|
||||||
mapInstance.value.setZoom(12);
|
mapInstance.value.setZoom(11);
|
||||||
// zoom.value = 12;
|
// zoom.value = 12;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -364,7 +364,7 @@ defineExpose({
|
|||||||
left: 10px;
|
left: 10px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 110px;
|
width: 110px;
|
||||||
height: 70px;
|
height: 40px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #ffffff10 !important;
|
background: #ffffff10 !important;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
|
|||||||
@@ -65,22 +65,9 @@
|
|||||||
<Edit @click="editd(item)" />
|
<Edit @click="editd(item)" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<!-- <el-tooltip
|
|
||||||
class="item"
|
|
||||||
effect="dark"
|
|
||||||
content="修改项目"
|
|
||||||
placement="top"
|
|
||||||
>
|
|
||||||
<Edit
|
|
||||||
style="margin-left: 5px; width: 16px"
|
|
||||||
class="xiaoshou color"
|
|
||||||
@click="editd(item)"
|
|
||||||
/> </el-tooltip
|
|
||||||
> -->
|
|
||||||
</span>
|
</span>
|
||||||
<div style="display: flex; justify-content: end">
|
<div style="display: flex; justify-content: end">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="item.active == 0"
|
v-if="item.active == 0"
|
||||||
class="color"
|
class="color"
|
||||||
:icon="Compass"
|
:icon="Compass"
|
||||||
@@ -95,7 +82,7 @@
|
|||||||
style="padding: 3px 0; color: #82bd51"
|
style="padding: 3px 0; color: #82bd51"
|
||||||
type="text"
|
type="text"
|
||||||
>已激活</el-button
|
>已激活</el-button
|
||||||
>
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
class="color"
|
class="color"
|
||||||
:icon="Share"
|
:icon="Share"
|
||||||
@@ -163,17 +150,21 @@
|
|||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="工程项目" prop="projectIds">
|
<el-form-item label="变电站名称">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="ruleForm.projectIds"
|
v-model="ruleForm.substionIds"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:popper-append-to-body="false"
|
multiple
|
||||||
popper-class="custom-select-dropdown"
|
|
||||||
>
|
>
|
||||||
<el-option label="Zone one111" value="shanghai" />
|
<el-option
|
||||||
<el-option label="Zone two" value="beijing" />
|
v-for="item in dataList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
:disabled="item.bindFlag==true"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
<el-form-item label="项目排序" prop="orderBy">
|
<el-form-item label="项目排序" prop="orderBy">
|
||||||
<el-input v-model="ruleForm.orderBy" placeholder="请输入" />
|
<el-input v-model="ruleForm.orderBy" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -218,11 +209,14 @@ import {
|
|||||||
active,
|
active,
|
||||||
getActive,
|
getActive,
|
||||||
} from "@/api/manage_wx/index";
|
} from "@/api/manage_wx/index";
|
||||||
|
import { stationMap } from "@/api/statistics/index";
|
||||||
|
import { useStore } from "vuex";
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: "project-change", project: { id: string; name: string }): void;
|
(e: "project-change", project: { id: string; name: string }): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const store = useStore();
|
||||||
const projectData = ref([]);
|
const projectData = ref([]);
|
||||||
|
|
||||||
// 系统配置弹框
|
// 系统配置弹框
|
||||||
@@ -240,6 +234,8 @@ const firstForm = ref({
|
|||||||
id: "",
|
id: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const dataList = ref([]); //变电站
|
||||||
|
|
||||||
const params = reactive({
|
const params = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -251,6 +247,7 @@ interface RuleForm {
|
|||||||
projectIds: [];
|
projectIds: [];
|
||||||
orderBy: string;
|
orderBy: string;
|
||||||
remark: string;
|
remark: string;
|
||||||
|
substionIds:[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const formSize = ref("default");
|
const formSize = ref("default");
|
||||||
@@ -260,17 +257,18 @@ const ruleForm = reactive<RuleForm>({
|
|||||||
projectIds: [],
|
projectIds: [],
|
||||||
orderBy: "100",
|
orderBy: "100",
|
||||||
remark: "",
|
remark: "",
|
||||||
|
substionIds:[],
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules = reactive<FormRules<RuleForm>>({
|
const rules = reactive<FormRules<RuleForm>>({
|
||||||
name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
|
name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
|
||||||
projectIds: [
|
// projectIds: [
|
||||||
{
|
// {
|
||||||
required: true,
|
// required: true,
|
||||||
message: "请选择",
|
// message: "请选择",
|
||||||
trigger: "change",
|
// trigger: "change",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
orderBy: [
|
orderBy: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -280,6 +278,17 @@ const rules = reactive<FormRules<RuleForm>>({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const init = () => {
|
||||||
|
stationMap({
|
||||||
|
deptId: store.state.deptId,
|
||||||
|
type: store.state.timeType,
|
||||||
|
startTime: store.state.timeValue[0],
|
||||||
|
endTime: store.state.timeValue[1],
|
||||||
|
}).then((res: any) => {
|
||||||
|
dataList.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetachData();
|
fetachData();
|
||||||
});
|
});
|
||||||
@@ -342,6 +351,7 @@ const onSubmitadd = () => {
|
|||||||
orderBy: "100",
|
orderBy: "100",
|
||||||
projectIds: ["1dd1b076e104f15459ac401fc1b902c4"],
|
projectIds: ["1dd1b076e104f15459ac401fc1b902c4"],
|
||||||
remark: "",
|
remark: "",
|
||||||
|
substionIds:[],
|
||||||
});
|
});
|
||||||
//Object.keys(ruleForm).forEach((key) => delete ruleForm[key]); //生效,但是有默认值的,一进去会直接报校验
|
//Object.keys(ruleForm).forEach((key) => delete ruleForm[key]); //生效,但是有默认值的,一进去会直接报校验
|
||||||
};
|
};
|
||||||
@@ -359,6 +369,7 @@ const editd = (row: any) => {
|
|||||||
orderBy: row.orderBy,
|
orderBy: row.orderBy,
|
||||||
projectIds: row.projectIds,
|
projectIds: row.projectIds,
|
||||||
remark: row.remark,
|
remark: row.remark,
|
||||||
|
substionIds:row.substionIds,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -526,6 +537,7 @@ const activeItem = (item: any) => {
|
|||||||
|
|
||||||
const open = () => {
|
const open = () => {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
|
init();
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ watch(
|
|||||||
);
|
);
|
||||||
// 点击监测点传入 接线图id
|
// 点击监测点传入 接线图id
|
||||||
const pointClick = (row: any) => {
|
const pointClick = (row: any) => {
|
||||||
setUrl(row.pictureId, row.pictureName);
|
setUrl(row.configId, row.configName);
|
||||||
keyof.value += 1;
|
keyof.value += 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -73,8 +73,8 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
const setUrl = (url: string, nam: string) => {
|
const setUrl = (url: string, nam: string) => {
|
||||||
iframeSrc.value =
|
iframeSrc.value =
|
||||||
// window.location.origin +
|
window.location.origin +
|
||||||
"http://192.168.1.179:4001" +
|
// "http://192.168.1.179:4001" +
|
||||||
`/zutai/?id=${url}&&name=${encodeURIComponent(
|
`/zutai/?id=${url}&&name=${encodeURIComponent(
|
||||||
nam
|
nam
|
||||||
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
|
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
v-for="(value, index) in infoWindowPoint.objName.split(
|
v-for="(value, index) in infoWindowPoint.objName.split(
|
||||||
';'
|
';'
|
||||||
)"
|
)"
|
||||||
style="white-space: nowrap"
|
style="white-space: nowrap; font-size: 13px"
|
||||||
>
|
>
|
||||||
{{ value }}
|
{{ value }}
|
||||||
</div>
|
</div>
|
||||||
@@ -198,8 +198,8 @@ const markerClick = (e: any) => {
|
|||||||
zoom.value = 15;
|
zoom.value = 15;
|
||||||
infoWindowPoint.value = e;
|
infoWindowPoint.value = e;
|
||||||
infoWindowPoint.value.show = true;
|
infoWindowPoint.value.show = true;
|
||||||
center.value.lng = 116.404367;
|
center.value.lng = e.lng;
|
||||||
center.value.lat = 39.915421;
|
center.value.lat = e.lat+ 0.01000001;;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
center.value.lng = e.lng;
|
center.value.lng = e.lng;
|
||||||
@@ -285,41 +285,41 @@ const init = () => {
|
|||||||
const moveenFlag = ref(true);
|
const moveenFlag = ref(true);
|
||||||
|
|
||||||
const checkMapData = () => {
|
const checkMapData = () => {
|
||||||
if (!mapInstance.value || !BMapInstance.value || !moveenFlag.value) return;
|
// if (!mapInstance.value || !BMapInstance.value || !moveenFlag.value) return;
|
||||||
|
|
||||||
// 获取地图容器
|
// // 获取地图容器
|
||||||
const container = mapInstance.value.getContainer();
|
// const container = mapInstance.value.getContainer();
|
||||||
|
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
try {
|
// try {
|
||||||
// 1. 获取所有图片瓦片
|
// // 1. 获取所有图片瓦片
|
||||||
const tiles = Array.from(container.querySelectorAll("img"));
|
// const tiles = Array.from(container.querySelectorAll("img"));
|
||||||
|
|
||||||
// 2. 检查是否有离线地图瓦片
|
// // 2. 检查是否有离线地图瓦片
|
||||||
const hasOfflineTiles = tiles.some((tile: any) => {
|
// const hasOfflineTiles = tiles.some((tile: any) => {
|
||||||
// 确保tile是有效的DOM元素
|
// // 确保tile是有效的DOM元素
|
||||||
if (!tile || !tile.src) return false;
|
// if (!tile || !tile.src) return false;
|
||||||
|
|
||||||
// 检查是否是离线瓦片
|
// // 检查是否是离线瓦片
|
||||||
return tile.src.includes("/plugin/offline/tiles/");
|
// return tile.src.includes("/plugin/offline/tiles/");
|
||||||
});
|
// });
|
||||||
|
|
||||||
// 3. 如果没有离线瓦片,回到默认位置
|
// // 3. 如果没有离线瓦片,回到默认位置
|
||||||
if (!hasOfflineTiles) {
|
// if (!hasOfflineTiles) {
|
||||||
console.warn("当前区域无离线地图数据,将返回默认位置");
|
// console.warn("当前区域无离线地图数据,将返回默认位置");
|
||||||
|
|
||||||
// 使用正确的BMap.Point创建方式
|
// // 使用正确的BMap.Point创建方式
|
||||||
const point = new BMapInstance.value.Point(116.404367, 39.915421);
|
// const point = new BMapInstance.value.Point(116.404367, 39.915421);
|
||||||
|
|
||||||
// 平滑移动并设置合适缩放级别
|
// // 平滑移动并设置合适缩放级别
|
||||||
mapInstance.value.panTo(point);
|
// mapInstance.value.panTo(point);
|
||||||
mapInstance.value.setZoom(12);
|
// mapInstance.value.setZoom(12);
|
||||||
// zoom.value = 12;
|
// // zoom.value = 12;
|
||||||
}
|
// }
|
||||||
} catch (error) {
|
// } catch (error) {/
|
||||||
console.error("地图检测出错:", error);
|
// console.error("地图检测出错:", error);
|
||||||
}
|
// }
|
||||||
}, 1000); // 适当缩短延迟时间
|
// }, 1000); // 适当缩短延迟时间
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理地图滚轮缩放,修正scale导致的坐标偏移
|
// 处理地图滚轮缩放,修正scale导致的坐标偏移
|
||||||
|
|||||||
@@ -1,25 +1,56 @@
|
|||||||
<!--报表导出-->
|
<!--报表导出-->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :close-on-click-modal="false" draggable v-model="machineVisible" :title="title" width="500">
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
draggable
|
||||||
|
v-model="machineVisible"
|
||||||
|
:title="title"
|
||||||
|
width="500"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<div class="smsConfig">
|
<div class="smsConfig">
|
||||||
<el-form :model="form" inline label-width="auto" class=" ml30 mt10">
|
<el-form :model="form" inline label-width="auto" class="ml30 mt10">
|
||||||
<el-form-item label="时间">
|
<el-form-item label="时间">
|
||||||
<el-date-picker v-model="timeValue" size="small" type="daterange" :disabled-date="isFutureDate"
|
<el-date-picker
|
||||||
style="width: 250px; margin-right: 10px" unlink-panels :clearable="false" range-separator="至"
|
v-model="timeValue"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD HH:mm:ss" />
|
size="small"
|
||||||
|
type="datetimerange"
|
||||||
|
:disabled-date="isFutureDate"
|
||||||
|
style="width: 250px; margin-right: 10px"
|
||||||
|
unlink-panels
|
||||||
|
:clearable="false"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="部门集合">
|
<el-form-item label="部门集合">
|
||||||
<el-select v-model="form.deptList" placeholder="请选择部门集合" style="width: 250px" size="small" multiple
|
<el-select
|
||||||
collapse-tags collapse-tags-tooltip>
|
v-model="form.deptList"
|
||||||
|
placeholder="请选择部门集合"
|
||||||
|
style="width: 250px"
|
||||||
|
size="small"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
collapse-tags-tooltip
|
||||||
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-checkbox v-model="checkAll" :indeterminate="indeterminate" @change="handleCheckAll">
|
<el-checkbox
|
||||||
|
v-model="checkAll"
|
||||||
|
:indeterminate="indeterminate"
|
||||||
|
@change="handleCheckAll"
|
||||||
|
>
|
||||||
全部
|
全部
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
<el-option v-for="item in deptLists" :key="item.deptsIndex" :label="item.deptsname"
|
<el-option
|
||||||
:value="item.deptsIndex" />
|
v-for="item in deptLists"
|
||||||
|
:key="item.deptsIndex"
|
||||||
|
:label="item.deptsname"
|
||||||
|
:value="item.deptsIndex"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -32,7 +63,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button :icon="Close" @click="setUp" size="small">取消</el-button>
|
<el-button :icon="Close" @click="setUp" size="small">取消</el-button>
|
||||||
<el-button type="primary" :icon="Check" @click="save" size="small">确定</el-button>
|
<el-button type="primary" :icon="Check" @click="save" size="small"
|
||||||
|
>确定</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -41,7 +74,7 @@ import { ref, watch, inject, onMounted } from "vue";
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { Check, Close } from "@element-plus/icons-vue";
|
import { Check, Close } from "@element-plus/icons-vue";
|
||||||
import { getDept, exportForms } from "@/api/statistics/index";
|
import { getDept, exportForms } from "@/api/statistics/index";
|
||||||
import type { CheckboxValueType } from 'element-plus'
|
import type { CheckboxValueType } from "element-plus";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const machineVisible = ref(false);
|
const machineVisible = ref(false);
|
||||||
@@ -50,8 +83,8 @@ const timeValue = ref([]);
|
|||||||
const deptLists = ref();
|
const deptLists = ref();
|
||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
const emit = defineEmits(["flushed"]);
|
const emit = defineEmits(["flushed"]);
|
||||||
const checkAll = ref(false)
|
const checkAll = ref(false);
|
||||||
const indeterminate = ref(false)
|
const indeterminate = ref(false);
|
||||||
const form = ref({
|
const form = ref({
|
||||||
searchBeginTime: "",
|
searchBeginTime: "",
|
||||||
searchEndTime: "",
|
searchEndTime: "",
|
||||||
@@ -88,28 +121,28 @@ const init = () => {
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
watch(
|
watch(
|
||||||
() => form.value.deptList, // 使用函数返回值的形式
|
() => form.value.deptList, // 使用函数返回值的形式
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val.length == 0) {
|
if (val.length == 0) {
|
||||||
checkAll.value = false
|
checkAll.value = false;
|
||||||
indeterminate.value = false
|
indeterminate.value = false;
|
||||||
} else if (val.length == deptLists.value.length) {
|
} else if (val.length == deptLists.value.length) {
|
||||||
checkAll.value = true
|
checkAll.value = true;
|
||||||
indeterminate.value = false
|
indeterminate.value = false;
|
||||||
} else {
|
} else {
|
||||||
indeterminate.value = true
|
indeterminate.value = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ deep: true } // 添加深度监听选项
|
{ deep: true } // 添加深度监听选项
|
||||||
)
|
);
|
||||||
const handleCheckAll = (val: CheckboxValueType) => {
|
const handleCheckAll = (val: CheckboxValueType) => {
|
||||||
indeterminate.value = false
|
indeterminate.value = false;
|
||||||
if (val) {
|
if (val) {
|
||||||
form.value.deptList = deptLists.value.map((_) => _.deptsIndex)
|
form.value.deptList = deptLists.value.map((_) => _.deptsIndex);
|
||||||
} else {
|
} else {
|
||||||
form.value.deptList = []
|
form.value.deptList = [];
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
const save = () => {
|
const save = () => {
|
||||||
if (!timeValue.value[0]) {
|
if (!timeValue.value[0]) {
|
||||||
ElMessage.warning("请选择时间!");
|
ElMessage.warning("请选择时间!");
|
||||||
@@ -122,9 +155,8 @@ const save = () => {
|
|||||||
|
|
||||||
(form.value.deptId = store.state.deptId),
|
(form.value.deptId = store.state.deptId),
|
||||||
(form.value.searchBeginTime = timeValue.value[0]),
|
(form.value.searchBeginTime = timeValue.value[0]),
|
||||||
(form.value.searchEndTime = timeValue.value[1]
|
(form.value.searchEndTime = timeValue.value[1]);
|
||||||
? timeValue.value[1].split(" ")[0] + " 23:59:59"
|
|
||||||
: "");
|
|
||||||
exportForms(form.value).then((res: any) => {
|
exportForms(form.value).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
|
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
|
||||||
|
|||||||
Reference in New Issue
Block a user