Compare commits
8 Commits
0ffc0cd01e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 5180dfaf60 | |||
|
|
6a1a7eb218 | ||
|
|
80ed66a2b0 | ||
|
|
7d86bbb6c2 | ||
|
|
2631f43623 | ||
|
|
b396686b61 | ||
|
|
1a0a42c5a5 | ||
|
|
980d5a22b3 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,6 +11,8 @@ node_modules
|
||||
dist
|
||||
|
||||
offline
|
||||
# tiles
|
||||
# tiles1
|
||||
dist-ssr
|
||||
*.local
|
||||
# Editor directories and files
|
||||
|
||||
@@ -90,6 +90,15 @@ export function msgHandle(data: object) {
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
//刷新redis缓存
|
||||
export function refreshRedis() {
|
||||
return service({
|
||||
url: "/accept/refreshIdCache",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 地图统计数量
|
||||
export function mapCount(data: object) {
|
||||
return service({
|
||||
@@ -303,3 +312,12 @@ export function exportLineData() {
|
||||
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 |
@@ -58,11 +58,13 @@ const emit = defineEmits(["timeChangeInfo"]);
|
||||
interface Props {
|
||||
nextFlag?: boolean;
|
||||
theCurrentTime?: boolean;
|
||||
setWatch?: boolean;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
nextFlag: false,
|
||||
theCurrentTime: true,
|
||||
setWatch: true,
|
||||
});
|
||||
|
||||
const interval = ref(3);
|
||||
@@ -573,8 +575,10 @@ function formatDate(date: Date): string {
|
||||
}
|
||||
|
||||
watch(timeValue, async (newVal) => {
|
||||
await store.dispatch("setTimeType", { type: interval, value: newVal });
|
||||
await emit("timeChangeInfo");
|
||||
if (props.setWatch) {
|
||||
await store.dispatch("setTimeType", { type: interval, value: newVal });
|
||||
await emit("timeChangeInfo");
|
||||
}
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
|
||||
@@ -5,7 +5,7 @@ import store from "@/store/index";
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: "/api",
|
||||
timeout: 60 * 1000,
|
||||
timeout: 60 * 1000 * 3,
|
||||
headers: { "Content-Type": "application/json;charset=utf-8" },
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class HttpRequest {
|
||||
getInsideConfig() {
|
||||
const config = {
|
||||
baseURL: this.baseUrl, // 所有的请求地址前缀部分(没有后端请求不用写)
|
||||
timeout: 80000, // 请求超时时间(毫秒)
|
||||
timeout: 60 * 1000 * 3, // 请求超时时间(毫秒)
|
||||
};
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<div v-loading="loading" element-loading-background="#343849c7">
|
||||
<div class="iconBox">
|
||||
<div class="div">
|
||||
<img src="@/assets/jcd.png" alt="" />
|
||||
<img src="@/assets/bdz.png" alt="" />
|
||||
<span>变电站</span>
|
||||
</div>
|
||||
|
||||
<div class="div">
|
||||
<!-- <div class="div">
|
||||
<img src="@/assets/img/txzcwzj.png" alt="" />
|
||||
<span>监测点</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="bmSelect">
|
||||
<!-- <div class="bmSelect">
|
||||
<el-select
|
||||
v-model="value"
|
||||
@change="setIcon"
|
||||
@@ -28,7 +28,7 @@
|
||||
:value="item.stationName"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div>
|
||||
<baidu-map
|
||||
@@ -45,26 +45,26 @@
|
||||
:double-click-zoom="false"
|
||||
>
|
||||
<!-- 线-->
|
||||
<div v-if="zoom > 13">
|
||||
<!-- <div v-if="zoom > 13">
|
||||
<bm-polyline
|
||||
:path="path"
|
||||
v-for="(path, index) in polyline"
|
||||
:key="index"
|
||||
></bm-polyline>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 变电站-->
|
||||
<template v-if="zoom > 13">
|
||||
<template>
|
||||
<bm-marker
|
||||
:position="path"
|
||||
v-for="path in siteList"
|
||||
:key="path.subId"
|
||||
:icon="path.icon"
|
||||
@click="markerClick(path)"
|
||||
@click="pointClick(path)"
|
||||
></bm-marker>
|
||||
</template>
|
||||
<!-- 点 -->
|
||||
<div maxZoom="12">
|
||||
<!-- <div maxZoom="12">
|
||||
<bm-marker
|
||||
:position="path"
|
||||
v-for="path in areaLineInfo"
|
||||
@@ -72,7 +72,7 @@
|
||||
:icon="path.icon"
|
||||
@click="pointClick(path)"
|
||||
></bm-marker>
|
||||
</div>
|
||||
</div> -->
|
||||
<bm-marker
|
||||
:position="infoWindowPoint"
|
||||
:icon="{ url: '1', size: { width: 0, height: 0 } }"
|
||||
@@ -89,7 +89,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick, onMounted } from "vue";
|
||||
import { substationCount } from "@/api/statistics/index";
|
||||
import { stationMap } from "@/api/statistics/index";
|
||||
import { useStore } from "vuex";
|
||||
// import { BmlMarkerClusterer } from "vue-baidu-map-3x";
|
||||
const emit = defineEmits(["pointClick"]);
|
||||
@@ -129,7 +129,7 @@ const handler = async ({ BMap, map }: any) => {
|
||||
const markerClick = (e: any) => {
|
||||
zoom.value = 15;
|
||||
infoWindowPoint.value = e;
|
||||
infoWindowPoint.value.show = true;
|
||||
// infoWindowPoint.value.show = true;
|
||||
center.value.lng = 120.124367;
|
||||
center.value.lat = 31.555421;
|
||||
|
||||
@@ -150,87 +150,87 @@ const init = () => {
|
||||
polyline.value = [];
|
||||
dataList.value = [];
|
||||
areaLineInfo.value = [];
|
||||
// substationCount({
|
||||
// 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;
|
||||
dataList.value = [
|
||||
{
|
||||
stationId: 156,
|
||||
stationName: "110kV北京电视台变",
|
||||
gdName: "检修分公司",
|
||||
longitude: 120.33,
|
||||
latitude: 31.52,
|
||||
lineCount: 1,
|
||||
eventCount: 1,
|
||||
lineEventDetails: [
|
||||
{
|
||||
gdName: "检修分公司",
|
||||
pictureId: "5debb8bd0ce26527675eedffd74a3198",
|
||||
pictureName: "无锡线上",
|
||||
},
|
||||
{
|
||||
gdName: "检修分公司",
|
||||
pictureId: "35b1301833e3fdfc872b1a27a17c7245",
|
||||
pictureName: "无锡修改1011--工程部",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
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;
|
||||
// dataList.value = [
|
||||
// {
|
||||
// stationId: 156,
|
||||
// stationName: "110kV北京电视台变",
|
||||
// gdName: "检修分公司",
|
||||
// longitude: 120.33,
|
||||
// latitude: 31.52,
|
||||
// lineCount: 1,
|
||||
// eventCount: 1,
|
||||
// lineEventDetails: [
|
||||
// // {
|
||||
// // gdName: "检修分公司",
|
||||
// // pictureId: "5debb8bd0ce26527675eedffd74a3198",
|
||||
// // pictureName: "无锡线上",
|
||||
// // },
|
||||
// {
|
||||
// gdName: "检修分公司",
|
||||
// pictureId: "35b1301833e3fdfc872b1a27a17c7245",
|
||||
// pictureName: "无锡修改1011--工程部",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ];
|
||||
let data = dataList.value;
|
||||
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) => {
|
||||
// 变电站图标
|
||||
item.icon = {
|
||||
url: new URL("@/assets/jcd.png", import.meta.url).href,
|
||||
url: new URL("@/assets/bdz.png", import.meta.url).href,
|
||||
size: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
},
|
||||
};
|
||||
if (
|
||||
item.lineEventDetails?.length > 10 &&
|
||||
item.lineEventDetails?.length < 100
|
||||
) {
|
||||
r = 0.0055;
|
||||
} else if (item.lineEventDetails.length >= 100) {
|
||||
r = 0.01055;
|
||||
}
|
||||
item.lng = item.longitude;
|
||||
item.lat = item.latitude;
|
||||
item.lineEventDetails.forEach((val: any, i: number) => {
|
||||
val.lng =
|
||||
item.longitude +
|
||||
r * Math.cos((2 * Math.PI * i) / item.lineEventDetails.length);
|
||||
val.lat =
|
||||
item.latitude +
|
||||
r * Math.sin((2 * Math.PI * i) / item.lineEventDetails.length);
|
||||
// 监测点图标
|
||||
val.icon = {
|
||||
url: new URL("@/assets/img/txzcwzj.png", import.meta.url).href,
|
||||
size: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
},
|
||||
};
|
||||
// if (
|
||||
// item.lineEventDetails?.length > 10 &&
|
||||
// item.lineEventDetails?.length < 100
|
||||
// ) {
|
||||
// r = 0.0055;
|
||||
// } else if (item.lineEventDetails.length >= 100) {
|
||||
// r = 0.01055;
|
||||
// }
|
||||
// item.lng = item.longitude;
|
||||
// item.lat = item.latitude;
|
||||
// item.lineEventDetails.forEach((val: any, i: number) => {
|
||||
// val.lng =
|
||||
// item.longitude +
|
||||
// r * Math.cos((2 * Math.PI * i) / item.lineEventDetails.length);
|
||||
// val.lat =
|
||||
// item.latitude +
|
||||
// r * Math.sin((2 * Math.PI * i) / item.lineEventDetails.length);
|
||||
// // 监测点图标
|
||||
// val.icon = {
|
||||
// url: new URL("@/assets/img/txzcwzj.png", import.meta.url).href,
|
||||
// size: {
|
||||
// width: 40,
|
||||
// height: 40,
|
||||
// },
|
||||
// };
|
||||
|
||||
polyline.value.push([
|
||||
{
|
||||
lng: item.lng,
|
||||
lat: item.lat,
|
||||
},
|
||||
{
|
||||
lng: val.lng,
|
||||
lat: val.lat,
|
||||
},
|
||||
]);
|
||||
});
|
||||
// polyline.value.push([
|
||||
// {
|
||||
// lng: item.lng,
|
||||
// lat: item.lat,
|
||||
// },
|
||||
// {
|
||||
// lng: val.lng,
|
||||
// lat: val.lat,
|
||||
// },
|
||||
// ]);
|
||||
// });
|
||||
|
||||
areaLineInfo.value.push(...item.lineEventDetails);
|
||||
// areaLineInfo.value.push(...item.lineEventDetails);
|
||||
});
|
||||
|
||||
siteList.value = list;
|
||||
@@ -239,7 +239,7 @@ const init = () => {
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 0);
|
||||
// });
|
||||
});
|
||||
};
|
||||
const moveenFlag = ref(true);
|
||||
|
||||
@@ -267,12 +267,12 @@ const checkMapData = () => {
|
||||
if (!hasOfflineTiles) {
|
||||
console.warn("当前区域无离线地图数据,将返回默认位置");
|
||||
|
||||
// 使用正确的BMap.Point创建方式
|
||||
const point = new BMapInstance.value.Point(116.404367, 39.915421);
|
||||
// 使用正确的BMap.Point创建方式
|
||||
const point = new BMapInstance.value.Point(120.124367,31.555421);
|
||||
|
||||
// 平滑移动并设置合适缩放级别
|
||||
mapInstance.value.panTo(point);
|
||||
mapInstance.value.setZoom(12);
|
||||
mapInstance.value.setZoom(11);
|
||||
// zoom.value = 12;
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -344,6 +344,7 @@ onMounted(() => {
|
||||
|
||||
defineExpose({
|
||||
setIcon,
|
||||
init
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@@ -364,7 +365,7 @@ defineExpose({
|
||||
left: 10px;
|
||||
z-index: 1;
|
||||
width: 110px;
|
||||
height: 70px;
|
||||
height: 40px;
|
||||
padding: 10px;
|
||||
background: #ffffff10 !important;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
@@ -494,8 +494,8 @@ const generateFn = async () => {
|
||||
loading1.value = true;
|
||||
await getDynamicData({
|
||||
lineId: dotList.value.id,
|
||||
searchBeginTime: tabList.value[activeName.value].time[0],
|
||||
searchEndTime: tabList.value[activeName.value].time[1],
|
||||
searchBeginTime: time.value[0],
|
||||
searchEndTime: time.value[1],
|
||||
time: tabList.value[activeName.value].key,
|
||||
type: form.type,
|
||||
userDataId: form.loadDataId,
|
||||
|
||||
@@ -967,7 +967,7 @@ const initialResponsibilityList = () => {
|
||||
// 根据实际字段进行拼接,示例:
|
||||
const content = `${item.lineName || ""}进行${
|
||||
item.dataTimes || ""
|
||||
}次谐波电压溯源,溯源对象:${item.userDataName || ""}`.trim();
|
||||
}次谐波电压溯源,溯源对象:${item.userDataName || "系统测点"}`.trim();
|
||||
return {
|
||||
...item,
|
||||
content: content,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
v-model="form.userList"
|
||||
:data="dataTree"
|
||||
multiple
|
||||
|
||||
filterable
|
||||
show-checkbox
|
||||
ref="treeRef"
|
||||
@@ -46,6 +47,7 @@
|
||||
v-model="form.index"
|
||||
filterable
|
||||
multiple
|
||||
|
||||
:multiple-limit="5"
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
@@ -395,7 +397,7 @@ const submit = () => {
|
||||
showTabs.value = true;
|
||||
let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b);
|
||||
tabList.value = [];
|
||||
|
||||
|
||||
list.forEach((item: any) => {
|
||||
tabList.value.push({
|
||||
label: item + "次谐波",
|
||||
@@ -553,11 +555,13 @@ const generateFn = async () => {
|
||||
return ElMessage.warning("请选择用采用户");
|
||||
}
|
||||
loading1.value = true;
|
||||
console.log("🚀 ~ generateFn ~ dotList.value:", dotList.value.id, tabList.value);
|
||||
|
||||
await getDynamicData({
|
||||
userDataId: "123",
|
||||
lineId: dotList.value.id,
|
||||
searchBeginTime: tabList.value[activeName.value].time[0],
|
||||
searchEndTime: tabList.value[activeName.value].time[1],
|
||||
searchBeginTime: time.value[0],
|
||||
searchEndTime: time.value[1],
|
||||
time: tabList.value[activeName.value].key,
|
||||
type: form.type,
|
||||
userList: form.userList,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 项目管理弹框 -->
|
||||
<el-dialog v-model="dialogVisible" title="项目管理" width="1600px">
|
||||
<el-dialog v-model="dialogVisible" title="项目管理" width="1600px" @close="handleDialogClose">
|
||||
<!-- <el-card class="transparent-card"> -->
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
@@ -65,22 +65,9 @@
|
||||
<Edit @click="editd(item)" />
|
||||
</el-icon>
|
||||
</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>
|
||||
<div style="display: flex; justify-content: end">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
v-if="item.active == 0"
|
||||
class="color"
|
||||
:icon="Compass"
|
||||
@@ -95,7 +82,7 @@
|
||||
style="padding: 3px 0; color: #82bd51"
|
||||
type="text"
|
||||
>已激活</el-button
|
||||
>
|
||||
> -->
|
||||
<el-button
|
||||
class="color"
|
||||
:icon="Share"
|
||||
@@ -145,7 +132,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 新增弹框 -->
|
||||
<el-dialog v-model="innerVisible" :title="dialogTitle" width="500px">
|
||||
<el-dialog v-model="innerVisible" :title="dialogTitle" width="500px" >
|
||||
<el-form
|
||||
ref="ruleFormRef"
|
||||
:model="ruleForm"
|
||||
@@ -163,17 +150,22 @@
|
||||
placeholder="请输入项目名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="工程项目" prop="projectIds">
|
||||
<el-form-item label="变电站名称">
|
||||
<el-select
|
||||
v-model="ruleForm.projectIds"
|
||||
v-model="ruleForm.substionIds"
|
||||
placeholder="请选择"
|
||||
:popper-append-to-body="false"
|
||||
popper-class="custom-select-dropdown"
|
||||
multiple
|
||||
:teleported="false"
|
||||
>
|
||||
<el-option label="Zone one111" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
<el-option
|
||||
v-for="item in dataList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:disabled="item.bindFlag == true && !setDisabled?.includes(item.id)"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="项目排序" prop="orderBy">
|
||||
<el-input v-model="ruleForm.orderBy" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
@@ -218,11 +210,15 @@ import {
|
||||
active,
|
||||
getActive,
|
||||
} from "@/api/manage_wx/index";
|
||||
import { stationMap } from "@/api/statistics/index";
|
||||
import { useStore } from "vuex";
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "project-change", project: { id: string; name: string }): void;
|
||||
(e: "station-map-updated"): void;
|
||||
}>();
|
||||
|
||||
const store = useStore();
|
||||
const projectData = ref([]);
|
||||
|
||||
// 系统配置弹框
|
||||
@@ -240,6 +236,10 @@ const firstForm = ref({
|
||||
id: "",
|
||||
});
|
||||
|
||||
const dataList = ref([]); //变电站
|
||||
|
||||
const setDisabled = ref([]);
|
||||
|
||||
const params = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -251,6 +251,7 @@ interface RuleForm {
|
||||
projectIds: [];
|
||||
orderBy: string;
|
||||
remark: string;
|
||||
substionIds: [];
|
||||
}
|
||||
|
||||
const formSize = ref("default");
|
||||
@@ -260,17 +261,18 @@ const ruleForm = reactive<RuleForm>({
|
||||
projectIds: [],
|
||||
orderBy: "100",
|
||||
remark: "",
|
||||
substionIds: [],
|
||||
});
|
||||
|
||||
const rules = reactive<FormRules<RuleForm>>({
|
||||
name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
|
||||
projectIds: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
// projectIds: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请选择",
|
||||
// trigger: "change",
|
||||
// },
|
||||
// ],
|
||||
orderBy: [
|
||||
{
|
||||
required: true,
|
||||
@@ -280,6 +282,21 @@ const rules = reactive<FormRules<RuleForm>>({
|
||||
],
|
||||
});
|
||||
|
||||
const handleDialogClose = () => {
|
||||
emit('station-map-updated');
|
||||
};
|
||||
|
||||
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(() => {
|
||||
fetachData();
|
||||
});
|
||||
@@ -334,6 +351,8 @@ const onReset = () => {
|
||||
const onSubmitadd = () => {
|
||||
innerVisible.value = true;
|
||||
dialogTitle.value = "新增项目";
|
||||
init();
|
||||
setDisabled.value = [];
|
||||
// Object.assign(ruleForm, {}); 不生效
|
||||
Object.assign(ruleForm, {
|
||||
//生效,但是一个个赋值,麻烦
|
||||
@@ -342,6 +361,7 @@ const onSubmitadd = () => {
|
||||
orderBy: "100",
|
||||
projectIds: ["1dd1b076e104f15459ac401fc1b902c4"],
|
||||
remark: "",
|
||||
substionIds: [],
|
||||
});
|
||||
//Object.keys(ruleForm).forEach((key) => delete ruleForm[key]); //生效,但是有默认值的,一进去会直接报校验
|
||||
};
|
||||
@@ -352,6 +372,8 @@ const querdata = (e: any) => {};
|
||||
const editd = (row: any) => {
|
||||
innerVisible.value = true;
|
||||
dialogTitle.value = "修改项目";
|
||||
init();
|
||||
setDisabled.value = JSON.parse(JSON.stringify(row.substionIds));
|
||||
// Object.assign(ruleForm, row);
|
||||
Object.assign(ruleForm, {
|
||||
id: row.id,
|
||||
@@ -359,6 +381,7 @@ const editd = (row: any) => {
|
||||
orderBy: row.orderBy,
|
||||
projectIds: row.projectIds,
|
||||
remark: row.remark,
|
||||
substionIds: row.substionIds,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -371,6 +394,8 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
} else {
|
||||
getEdit();
|
||||
}
|
||||
init();
|
||||
emit('station-map-updated');
|
||||
console.log("submit!");
|
||||
} else {
|
||||
console.log("error submit!", fields);
|
||||
@@ -410,6 +435,7 @@ const getEdit = async () => {
|
||||
|
||||
const resetForm = () => {
|
||||
innerVisible.value = false;
|
||||
emit('station-map-updated')
|
||||
};
|
||||
|
||||
const onTableSizeChange = (size: number) => {
|
||||
|
||||
@@ -422,7 +422,13 @@
|
||||
align="center"
|
||||
label="责任对象"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{
|
||||
scope.row.userDataName==null? '系统测点':scope.row.userDataName
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="updateTime"
|
||||
align="center"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
width="100%"
|
||||
height="100%"
|
||||
@pointClick="pointClick"
|
||||
ref="bdMapRef"
|
||||
></bdMap>
|
||||
|
||||
<!-- 添加加载事件监听 -->
|
||||
@@ -19,7 +20,12 @@
|
||||
:key="keyof"
|
||||
@load="onIframeLoad"
|
||||
></iframe>
|
||||
<el-button class="backButton" @click="backButton" size="small" :icon="Back"
|
||||
<el-button
|
||||
v-if="!store.state.showMap"
|
||||
class="backButton"
|
||||
@click="backButton"
|
||||
size="small"
|
||||
:icon="Back"
|
||||
>返回</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -35,6 +41,8 @@ const props = defineProps<{
|
||||
project: { id: string; name: string } | null;
|
||||
}>();
|
||||
|
||||
const bdMapRef = ref(null)
|
||||
|
||||
const iframeSrc = ref("");
|
||||
const keyof = ref(0);
|
||||
// 监听 props 变化
|
||||
@@ -57,7 +65,7 @@ watch(
|
||||
);
|
||||
// 点击监测点传入 接线图id
|
||||
const pointClick = (row: any) => {
|
||||
setUrl(row.pictureId, row.pictureName);
|
||||
setUrl(row.configId, row.configName);
|
||||
keyof.value += 1;
|
||||
};
|
||||
|
||||
@@ -73,8 +81,8 @@ onMounted(() => {
|
||||
});
|
||||
const setUrl = (url: string, nam: string) => {
|
||||
iframeSrc.value =
|
||||
// window.location.origin +
|
||||
"http://192.168.1.179:4001" +
|
||||
window.location.origin +
|
||||
// "http://192.168.1.179:4001" +
|
||||
`/zutai/?id=${url}&&name=${encodeURIComponent(
|
||||
nam
|
||||
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
|
||||
@@ -140,6 +148,18 @@ const backButton = () => {
|
||||
|
||||
// window.removeEventListener("message", handleMessage);
|
||||
};
|
||||
|
||||
// 监听 station-map-updated 事件并转发给 bdMap 组件
|
||||
const handleStationMapUpdated = () => {
|
||||
if (bdMapRef.value && typeof bdMapRef.value.init === 'function') {
|
||||
bdMapRef.value.init()
|
||||
}
|
||||
}
|
||||
|
||||
// 暴露方法给父组件调用
|
||||
defineExpose({
|
||||
handleStationMapUpdated
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.plan {
|
||||
|
||||
@@ -87,13 +87,14 @@
|
||||
<Management
|
||||
ref="createRef"
|
||||
@project-change="onProjectChange"
|
||||
@station-map-updated="handleStationMapUpdated"
|
||||
></Management>
|
||||
</div>
|
||||
<div class="body-box">
|
||||
<!-- 第三行数据 -->
|
||||
<div class="content-box">
|
||||
<dv-border-box-10 :color="color[0]" style="position: relative">
|
||||
<Plan :project="currentProject" />
|
||||
<Plan :project="currentProject" ref="planRef"/>
|
||||
<!-- 将 flag 值传递给 SecurityDetail 组件 -->
|
||||
<!-- showDetail从SecurityDetail 组件传过来 -->
|
||||
<SecurityDetail
|
||||
@@ -235,6 +236,8 @@ const onProjectChange = (project: { id: string; name: string }) => {
|
||||
currentProject.value = project;
|
||||
};
|
||||
|
||||
const planRef = ref() // 添加对 Plan 组件的引用
|
||||
|
||||
const smsQueriesRef = ref(); // 短信查询组件引用
|
||||
const smsConfigRef = ref(); // 短信查询组件引用
|
||||
const sendRef = ref(); // 短信查询组件引用
|
||||
@@ -380,6 +383,14 @@ const createRef = ref();
|
||||
const openDialog = () => {
|
||||
createRef.value.open();
|
||||
};
|
||||
|
||||
// 处理 Management 组件发出的 station-map-updated 事件
|
||||
const handleStationMapUpdated = () => {
|
||||
// 通过 Plan 组件转发给 bdMap
|
||||
if (planRef.value && typeof planRef.value.handleStationMapUpdated === 'function') {
|
||||
planRef.value.handleStationMapUpdated()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
v-for="(value, index) in infoWindowPoint.objName.split(
|
||||
';'
|
||||
)"
|
||||
style="white-space: nowrap"
|
||||
style="white-space: nowrap; font-size: 13px"
|
||||
>
|
||||
{{ value }}
|
||||
</div>
|
||||
@@ -198,8 +198,8 @@ const markerClick = (e: any) => {
|
||||
zoom.value = 15;
|
||||
infoWindowPoint.value = e;
|
||||
infoWindowPoint.value.show = true;
|
||||
center.value.lng = 116.404367;
|
||||
center.value.lat = 39.915421;
|
||||
center.value.lng = e.lng;
|
||||
center.value.lat = e.lat+ 0.01000001;;
|
||||
|
||||
setTimeout(() => {
|
||||
center.value.lng = e.lng;
|
||||
@@ -285,41 +285,41 @@ const init = () => {
|
||||
const moveenFlag = ref(true);
|
||||
|
||||
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(() => {
|
||||
try {
|
||||
// 1. 获取所有图片瓦片
|
||||
const tiles = Array.from(container.querySelectorAll("img"));
|
||||
// setTimeout(() => {
|
||||
// try {
|
||||
// // 1. 获取所有图片瓦片
|
||||
// const tiles = Array.from(container.querySelectorAll("img"));
|
||||
|
||||
// 2. 检查是否有离线地图瓦片
|
||||
const hasOfflineTiles = tiles.some((tile: any) => {
|
||||
// 确保tile是有效的DOM元素
|
||||
if (!tile || !tile.src) return false;
|
||||
// // 2. 检查是否有离线地图瓦片
|
||||
// const hasOfflineTiles = tiles.some((tile: any) => {
|
||||
// // 确保tile是有效的DOM元素
|
||||
// if (!tile || !tile.src) return false;
|
||||
|
||||
// 检查是否是离线瓦片
|
||||
return tile.src.includes("/plugin/offline/tiles/");
|
||||
});
|
||||
// // 检查是否是离线瓦片
|
||||
// return tile.src.includes("/plugin/offline/tiles/");
|
||||
// });
|
||||
|
||||
// 3. 如果没有离线瓦片,回到默认位置
|
||||
if (!hasOfflineTiles) {
|
||||
console.warn("当前区域无离线地图数据,将返回默认位置");
|
||||
// // 3. 如果没有离线瓦片,回到默认位置
|
||||
// if (!hasOfflineTiles) {
|
||||
// console.warn("当前区域无离线地图数据,将返回默认位置");
|
||||
|
||||
// 使用正确的BMap.Point创建方式
|
||||
const point = new BMapInstance.value.Point(116.404367, 39.915421);
|
||||
// // 使用正确的BMap.Point创建方式
|
||||
// const point = new BMapInstance.value.Point(116.404367, 39.915421);
|
||||
|
||||
// 平滑移动并设置合适缩放级别
|
||||
mapInstance.value.panTo(point);
|
||||
mapInstance.value.setZoom(12);
|
||||
// zoom.value = 12;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("地图检测出错:", error);
|
||||
}
|
||||
}, 1000); // 适当缩短延迟时间
|
||||
// // 平滑移动并设置合适缩放级别
|
||||
// mapInstance.value.panTo(point);
|
||||
// mapInstance.value.setZoom(12);
|
||||
// // zoom.value = 12;
|
||||
// }
|
||||
// } catch (error) {/
|
||||
// console.error("地图检测出错:", error);
|
||||
// }
|
||||
// }, 1000); // 适当缩短延迟时间
|
||||
};
|
||||
|
||||
// 处理地图滚轮缩放,修正scale导致的坐标偏移
|
||||
|
||||
@@ -1,25 +1,56 @@
|
||||
<!--报表导出-->
|
||||
<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 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-date-picker v-model="timeValue" size="small" type="daterange" :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-date-picker
|
||||
v-model="timeValue"
|
||||
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 label="部门集合">
|
||||
<el-select v-model="form.deptList" placeholder="请选择部门集合" style="width: 250px" size="small" multiple
|
||||
collapse-tags collapse-tags-tooltip>
|
||||
<el-select
|
||||
v-model="form.deptList"
|
||||
placeholder="请选择部门集合"
|
||||
style="width: 250px"
|
||||
size="small"
|
||||
multiple
|
||||
collapse-tags
|
||||
collapse-tags-tooltip
|
||||
>
|
||||
<template #header>
|
||||
<el-checkbox v-model="checkAll" :indeterminate="indeterminate" @change="handleCheckAll">
|
||||
<el-checkbox
|
||||
v-model="checkAll"
|
||||
:indeterminate="indeterminate"
|
||||
@change="handleCheckAll"
|
||||
>
|
||||
全部
|
||||
</el-checkbox>
|
||||
</template>
|
||||
<el-option v-for="item in deptLists" :key="item.deptsIndex" :label="item.deptsname"
|
||||
:value="item.deptsIndex" />
|
||||
<el-option
|
||||
v-for="item in deptLists"
|
||||
:key="item.deptsIndex"
|
||||
:label="item.deptsname"
|
||||
:value="item.deptsIndex"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -32,7 +63,14 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<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"
|
||||
:loading="loading"
|
||||
>确定</el-button
|
||||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -41,17 +79,18 @@ import { ref, watch, inject, onMounted } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { Check, Close } from "@element-plus/icons-vue";
|
||||
import { getDept, exportForms } from "@/api/statistics/index";
|
||||
import type { CheckboxValueType } from 'element-plus'
|
||||
import type { CheckboxValueType } from "element-plus";
|
||||
import { useStore } from "vuex";
|
||||
const store = useStore();
|
||||
const machineVisible = ref(false);
|
||||
const title = ref("报表导出");
|
||||
const timeValue = ref([]);
|
||||
const deptLists = ref();
|
||||
const loading = ref(false);
|
||||
//form表单校验规则
|
||||
const emit = defineEmits(["flushed"]);
|
||||
const checkAll = ref(false)
|
||||
const indeterminate = ref(false)
|
||||
const checkAll = ref(false);
|
||||
const indeterminate = ref(false);
|
||||
const form = ref({
|
||||
searchBeginTime: "",
|
||||
searchEndTime: "",
|
||||
@@ -88,28 +127,28 @@ const init = () => {
|
||||
// }
|
||||
// })
|
||||
watch(
|
||||
() => form.value.deptList, // 使用函数返回值的形式
|
||||
() => form.value.deptList, // 使用函数返回值的形式
|
||||
(val) => {
|
||||
if (val.length == 0) {
|
||||
checkAll.value = false
|
||||
indeterminate.value = false
|
||||
checkAll.value = false;
|
||||
indeterminate.value = false;
|
||||
} else if (val.length == deptLists.value.length) {
|
||||
checkAll.value = true
|
||||
indeterminate.value = false
|
||||
checkAll.value = true;
|
||||
indeterminate.value = false;
|
||||
} else {
|
||||
indeterminate.value = true
|
||||
indeterminate.value = true;
|
||||
}
|
||||
},
|
||||
{ deep: true } // 添加深度监听选项
|
||||
)
|
||||
{ deep: true } // 添加深度监听选项
|
||||
);
|
||||
const handleCheckAll = (val: CheckboxValueType) => {
|
||||
indeterminate.value = false
|
||||
indeterminate.value = false;
|
||||
if (val) {
|
||||
form.value.deptList = deptLists.value.map((_) => _.deptsIndex)
|
||||
form.value.deptList = deptLists.value.map((_) => _.deptsIndex);
|
||||
} else {
|
||||
form.value.deptList = []
|
||||
form.value.deptList = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
const save = () => {
|
||||
if (!timeValue.value[0]) {
|
||||
ElMessage.warning("请选择时间!");
|
||||
@@ -122,25 +161,29 @@ const save = () => {
|
||||
|
||||
(form.value.deptId = store.state.deptId),
|
||||
(form.value.searchBeginTime = timeValue.value[0]),
|
||||
(form.value.searchEndTime = timeValue.value[1]
|
||||
? timeValue.value[1].split(" ")[0] + " 23:59:59"
|
||||
: "");
|
||||
exportForms(form.value).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
|
||||
(form.value.searchEndTime = timeValue.value[1]);
|
||||
|
||||
exportForms(form.value)
|
||||
.then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
|
||||
});
|
||||
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement("a"); // 创建a标签
|
||||
link.href = url;
|
||||
link.download = "导出报表.docx"; // 设置下载的文件名
|
||||
document.body.appendChild(link);
|
||||
link.click(); //执行下载
|
||||
document.body.removeChild(link);
|
||||
|
||||
machineVisible.value = false;
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
});
|
||||
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement("a"); // 创建a标签
|
||||
link.href = url;
|
||||
link.download = "导出报表.docx"; // 设置下载的文件名
|
||||
document.body.appendChild(link);
|
||||
link.click(); //执行下载
|
||||
document.body.removeChild(link);
|
||||
|
||||
machineVisible.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const isFutureDate = (time: any) => {
|
||||
|
||||
@@ -1,10 +1,30 @@
|
||||
<template>
|
||||
<!--短信查询-->
|
||||
<el-dialog :close-on-click-modal="false" draggable v-model="machineVisible" :title="title" width="1200px" :before-close="handleClose">
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
v-model="machineVisible"
|
||||
:title="title"
|
||||
width="1200px"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div class="formBox">
|
||||
<div class="formLeft">
|
||||
<datePicker ref="datePickerRef" />
|
||||
<span>发送结果: </span>
|
||||
<datePicker
|
||||
:setWatch="false"
|
||||
ref="datePickerRef"
|
||||
style="width: 470px"
|
||||
/>
|
||||
<span>关键字搜索: </span>
|
||||
<el-input
|
||||
size="small"
|
||||
v-model="searchValue"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 130px"
|
||||
></el-input>
|
||||
|
||||
<span class="ml20">发送结果: </span>
|
||||
<el-select
|
||||
size="small"
|
||||
v-model="state"
|
||||
@@ -32,7 +52,8 @@
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<el-table
|
||||
:scrollbar-always-on="true" :data="tableData"
|
||||
:scrollbar-always-on="true"
|
||||
:data="tableData"
|
||||
height="500px"
|
||||
size="small"
|
||||
stripe
|
||||
@@ -104,7 +125,7 @@ import { ElMessage } from "element-plus";
|
||||
import datePicker from "@/components/datePicker/index.vue";
|
||||
import { Search, Download } from "@element-plus/icons-vue";
|
||||
import table2excel from "js-table2excel";
|
||||
const emit= defineEmits(["close"]);
|
||||
const emit = defineEmits(["close"]);
|
||||
const machineVisible = ref(false);
|
||||
const title = ref("已发送短信查询");
|
||||
const datePickerRef = ref();
|
||||
@@ -124,14 +145,15 @@ const inquire = () => {
|
||||
searchBeginTime: datePickerRef.value.timeValue[0],
|
||||
searchEndTime: datePickerRef.value.timeValue[1],
|
||||
sendResult: state.value,
|
||||
searchValue: searchValue.value,
|
||||
}).then((res) => {
|
||||
total.value = res.data.total;
|
||||
tableData.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
const searchValue = ref("");
|
||||
const open = (text: string, data?: any) => {
|
||||
|
||||
machineVisible.value = true;
|
||||
nextTick(() => {
|
||||
inquire();
|
||||
@@ -183,6 +205,7 @@ const exportTable = () => {
|
||||
searchBeginTime: datePickerRef.value.timeValue[0],
|
||||
searchEndTime: datePickerRef.value.timeValue[1],
|
||||
sendResult: state.value,
|
||||
searchValue: searchValue.value,
|
||||
}).then((res) => {
|
||||
setTimeout(() => {
|
||||
table2excel(
|
||||
@@ -197,7 +220,7 @@ const exportTable = () => {
|
||||
};
|
||||
const handleClose = () => {
|
||||
emit("close", false);
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({ open });
|
||||
</script>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div id="index" ref="appRef">
|
||||
<div
|
||||
class="bg"
|
||||
:class="
|
||||
class="bg"
|
||||
:class="
|
||||
store.state.screenNotic == 1
|
||||
? pushFlag
|
||||
? bottomTextRef?.urgentList.length > 0
|
||||
@@ -23,53 +23,57 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<dv-decoration-10 class="dv-dec-10" :color="color[1]" />
|
||||
<dv-decoration-10 class="dv-dec-10" :color="color[1]"/>
|
||||
<div class="d-flex jc-center">
|
||||
<dv-decoration-8 class="dv-dec-8" :color="color[2]" />
|
||||
<dv-decoration-8 class="dv-dec-8" :color="color[2]"/>
|
||||
<div class="title">
|
||||
<span class="title-text">{{ title }}</span>
|
||||
</div>
|
||||
<dv-decoration-8
|
||||
class="dv-dec-8"
|
||||
:reverse="true"
|
||||
:color="color[2]"
|
||||
class="dv-dec-8"
|
||||
:reverse="true"
|
||||
:color="color[2]"
|
||||
/>
|
||||
</div>
|
||||
<dv-decoration-10 class="dv-dec-10-s" :color="color[1]" />
|
||||
<dv-decoration-10 class="dv-dec-10-s" :color="color[1]"/>
|
||||
</div>
|
||||
|
||||
<div class="d-flex secondLine">
|
||||
<div class="react-right mr-1">
|
||||
<span class="text fw-b" style="display: flex">
|
||||
<datePicker
|
||||
ref="datePickerRef"
|
||||
@timeChangeInfo="timeChangeInfo"
|
||||
ref="datePickerRef"
|
||||
@timeChangeInfo="timeChangeInfo"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<el-dropdown placement="bottom">
|
||||
<el-icon :size="22" :color="color[1][0]" class="mt-0.5 mt5">
|
||||
<Menu />
|
||||
<Menu/>
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<!-- <el-dropdown-item @click="handleClick('1')"
|
||||
>已发送短信查询</el-dropdown-item
|
||||
>
|
||||
|
||||
<el-dropdown-item @click="handleClick('2')"
|
||||
<!-- <el-dropdown-item @click="handleClick('2')"
|
||||
>模拟短信发送</el-dropdown-item
|
||||
> -->
|
||||
<el-dropdown-item @click="handleClick('3')"
|
||||
>系统配置</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="handleClick('4')"
|
||||
>报表导出</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="handleClick('5')"
|
||||
>台账导出</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click="handleClick('3')">
|
||||
系统配置
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleClick('4')">
|
||||
报表导出
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleClick('5')">
|
||||
台账导出
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleClick('1')">
|
||||
短信管理
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="handleClick('6')">
|
||||
缓存刷新
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
@@ -79,33 +83,33 @@
|
||||
<!-- 第三行数据 -->
|
||||
<div class="content-box">
|
||||
<dv-border-box-13 :color="color[0]">
|
||||
<eventStatistics ref="eventStatisticsRef" />
|
||||
<eventStatistics ref="eventStatisticsRef"/>
|
||||
</dv-border-box-13>
|
||||
|
||||
<dv-border-box-10 :color="color[0]">
|
||||
<Map ref="mapRef" />
|
||||
<Map ref="mapRef"/>
|
||||
<!-- <center-left /> -->
|
||||
</dv-border-box-10>
|
||||
|
||||
<dv-border-box-13 :color="color[0]">
|
||||
<alarm ref="alarmRef" />
|
||||
<alarm ref="alarmRef"/>
|
||||
<!-- 紧急告警 -->
|
||||
|
||||
<div
|
||||
class="icon"
|
||||
v-if="!(bottomTextRef?.urgentList.length == 0)"
|
||||
:color="color[0][1]"
|
||||
:class="
|
||||
class="icon"
|
||||
v-if="!(bottomTextRef?.urgentList.length == 0)"
|
||||
:color="color[0][1]"
|
||||
:class="
|
||||
bottomTextRef?.urgentList.length > 0
|
||||
? 'animate-flash-red'
|
||||
: ''
|
||||
"
|
||||
@click="drawerClick"
|
||||
@click="drawerClick"
|
||||
>
|
||||
<!-- <WarnTriangleFilled /> -->
|
||||
<span
|
||||
class="iconfont icon-gaojing"
|
||||
:style="{
|
||||
class="iconfont icon-gaojing"
|
||||
:style="{
|
||||
color:
|
||||
bottomTextRef?.urgentList.length > 0
|
||||
? '#ff0000'
|
||||
@@ -113,12 +117,12 @@
|
||||
}"
|
||||
></span>
|
||||
<span
|
||||
class="count"
|
||||
v-if="bottomTextRef?.urgentList.length > 0"
|
||||
>{{
|
||||
class="count"
|
||||
v-if="bottomTextRef?.urgentList.length > 0"
|
||||
>{{
|
||||
bottomTextRef?.urgentList.length > 99
|
||||
? "99+"
|
||||
: bottomTextRef?.urgentList.length
|
||||
? "99+"
|
||||
: bottomTextRef?.urgentList.length
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
@@ -128,18 +132,18 @@
|
||||
<!-- 第四行数据 -->
|
||||
<div class="bototm-box">
|
||||
<dv-border-box-13 :color="color[0]">
|
||||
<endpointStatistics ref="endpointStatisticsRef" />
|
||||
<endpointStatistics ref="endpointStatisticsRef"/>
|
||||
|
||||
<!-- <bottom-left /> -->
|
||||
</dv-border-box-13>
|
||||
<dv-border-box-13 :color="color[0]">
|
||||
<informationTable
|
||||
ref="informationTableRef"
|
||||
@handleCurrentChange="handleCurrentChange"
|
||||
ref="informationTableRef"
|
||||
@handleCurrentChange="handleCurrentChange"
|
||||
/>
|
||||
</dv-border-box-13>
|
||||
<dv-border-box-13 :color="color[0]">
|
||||
<sendTrends ref="sendTrendsRef" />
|
||||
<sendTrends ref="sendTrendsRef"/>
|
||||
</dv-border-box-13>
|
||||
</div>
|
||||
<!-- 底部 -->
|
||||
@@ -147,22 +151,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<bottomText
|
||||
ref="bottomTextRef"
|
||||
@handleCurrentChange="handleCurrentChange"
|
||||
ref="bottomTextRef"
|
||||
@handleCurrentChange="handleCurrentChange"
|
||||
/>
|
||||
|
||||
<!-- 已发短信查询 -->
|
||||
<smsQueries
|
||||
ref="smsQueriesRef"
|
||||
v-if="smsQueriesFlag"
|
||||
@close="smsQueriesFlag = false"
|
||||
ref="smsQueriesRef"
|
||||
v-if="smsQueriesFlag"
|
||||
@close="smsQueriesFlag = false"
|
||||
/>
|
||||
|
||||
<!-- 系统配置 -->
|
||||
<Config ref="ConfigRef" @flushed="inquire" />
|
||||
<Config ref="ConfigRef" @flushed="inquire"/>
|
||||
|
||||
<!-- 报表导出 -->
|
||||
<ReportForms ref="reportForms" />
|
||||
<ReportForms ref="reportForms"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -178,11 +182,11 @@ import {
|
||||
watch,
|
||||
} from "vue";
|
||||
|
||||
import { formatTime, getDateRange, stopSpeak } from "@/utils/index"; //引入封装好的
|
||||
import {formatTime, getDateRange, stopSpeak} from "@/utils/index"; //引入封装好的
|
||||
import useDraw from "@/utils/useDraw"; // 引入封装好的屏幕适配方法
|
||||
import { WEEK, title, subtitle, moduleInfo, color } from "@/constant/index"; //引入封装的标题日期
|
||||
import {WEEK, title, subtitle, moduleInfo, color} from "@/constant/index"; //引入封装的标题日期
|
||||
import datePicker from "@/components/datePicker/index.vue";
|
||||
import { Menu, BellFilled, WarnTriangleFilled } from "@element-plus/icons-vue";
|
||||
import {Menu, BellFilled, WarnTriangleFilled} from "@element-plus/icons-vue";
|
||||
//页面组件
|
||||
import eventStatistics from "./components/eventStatistics.vue"; //统计事件
|
||||
import endpointStatistics from "./components/endpointStatistics.vue"; //终端在线统计
|
||||
@@ -193,10 +197,12 @@ import Map from "./components/bdMap.vue"; //地图
|
||||
import smsQueries from "./components/smsQueries.vue"; // //短信查询
|
||||
import bottomText from "./components/bottomText.vue"; //边框组件
|
||||
import socketClient from "@/utils/webSocketClient";
|
||||
import { useStore } from "vuex";
|
||||
import {useStore} from "vuex";
|
||||
import Config from "./components/config.vue";
|
||||
import ReportForms from "./components/reportForms.vue";
|
||||
import { exportLineData } from "@/api/statistics/index";
|
||||
import {exportLineData,refreshRedis} from "@/api/statistics/index";
|
||||
import {ElMessage} from "element-plus";
|
||||
|
||||
const store = useStore();
|
||||
const smsQueriesRef = ref(); // 短信查询组件引用
|
||||
const endpointStatisticsRef = ref(); // 终端在线统计组件引用
|
||||
@@ -225,7 +231,7 @@ const timeInfo: any = reactive({
|
||||
const timeType = ref(3);
|
||||
const reportForms = ref();
|
||||
// 适配处理
|
||||
const { appRef, calcRate, windowDraw, unWindowDraw } = useDraw();
|
||||
const {appRef, calcRate, windowDraw, unWindowDraw} = useDraw();
|
||||
// 连接webSocket客户端
|
||||
const init = () => {
|
||||
if (!dataSocket.socketServe) {
|
||||
@@ -292,6 +298,10 @@ const handleClick = (type: string) => {
|
||||
smsQueriesFlag.value = true;
|
||||
|
||||
setTimeout(() => {
|
||||
if (type === "1") {
|
||||
smsQueriesRef.value.open("已发送短信查询");
|
||||
}
|
||||
|
||||
if (type === "3") {
|
||||
ConfigRef.value.open("系统配置");
|
||||
}
|
||||
@@ -312,6 +322,12 @@ const handleClick = (type: string) => {
|
||||
document.body.removeChild(link);
|
||||
});
|
||||
}
|
||||
if (type === "6") {
|
||||
refreshRedis().then((res: any) => {
|
||||
ElMessage.success("刷新缓存成功");
|
||||
});
|
||||
}
|
||||
|
||||
}, 100);
|
||||
};
|
||||
|
||||
@@ -342,13 +358,13 @@ const inquire = async () => {
|
||||
};
|
||||
|
||||
watch(
|
||||
store.state,
|
||||
(val) => {
|
||||
timeChangeInfo();
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
}
|
||||
store.state,
|
||||
(val) => {
|
||||
timeChangeInfo();
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user