5 Commits

Author SHA1 Message Date
5180dfaf60 添加redis缓存刷新 2025-11-12 14:50:21 +08:00
guanj
6a1a7eb218 添加已发短信查询接口 2025-11-12 14:35:16 +08:00
guanj
80ed66a2b0 修改责任计算参数问题 2025-11-10 11:34:24 +08:00
stt
7d86bbb6c2 添加调取stationMap的方法 2025-11-07 16:19:15 +08:00
guanj
2631f43623 修改页面样式 2025-11-07 14:58:50 +08:00
13 changed files with 226 additions and 107 deletions

View File

@@ -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({

View File

@@ -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) => {
if (props.setWatch) {
await store.dispatch("setTimeType", { type: interval, value: newVal });
await emit("timeChangeInfo");
}
});
defineExpose({

View File

@@ -11,7 +11,7 @@
<span>监测点</span>
</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
@@ -344,6 +344,7 @@ onMounted(() => {
defineExpose({
setIcon,
init
});
</script>
<style lang="scss" scoped>

View File

@@ -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,

View File

@@ -967,7 +967,7 @@ const initialResponsibilityList = () => {
// 根据实际字段进行拼接,示例:
const content = `${item.lineName || ""}进行${
item.dataTimes || ""
}次谐波电压溯源,溯源对象:${item.userDataName || ""}`.trim();
}次谐波电压溯源,溯源对象:${item.userDataName || "系统测点"}`.trim();
return {
...item,
content: content,

View File

@@ -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
@@ -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,

View File

@@ -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>
@@ -155,13 +155,14 @@
v-model="ruleForm.substionIds"
placeholder="请选择"
multiple
:teleported="false"
>
<el-option
v-for="item in dataList"
:key="item.id"
:label="item.name"
:value="item.id"
:disabled="item.bindFlag==true"
:disabled="item.bindFlag == true && !setDisabled?.includes(item.id)"
/>
</el-select>
</el-form-item>
@@ -214,6 +215,7 @@ import { useStore } from "vuex";
const emit = defineEmits<{
(e: "project-change", project: { id: string; name: string }): void;
(e: "station-map-updated"): void;
}>();
const store = useStore();
@@ -236,6 +238,8 @@ const firstForm = ref({
const dataList = ref([]); //变电站
const setDisabled = ref([]);
const params = reactive({
pageNum: 1,
pageSize: 10,
@@ -278,6 +282,10 @@ const rules = reactive<FormRules<RuleForm>>({
],
});
const handleDialogClose = () => {
emit('station-map-updated');
};
const init = () => {
stationMap({
deptId: store.state.deptId,
@@ -343,6 +351,8 @@ const onReset = () => {
const onSubmitadd = () => {
innerVisible.value = true;
dialogTitle.value = "新增项目";
init();
setDisabled.value = [];
// Object.assign(ruleForm, {}); 不生效
Object.assign(ruleForm, {
//生效,但是一个个赋值,麻烦
@@ -362,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,
@@ -382,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);
@@ -421,6 +435,7 @@ const getEdit = async () => {
const resetForm = () => {
innerVisible.value = false;
emit('station-map-updated')
};
const onTableSizeChange = (size: number) => {
@@ -537,7 +552,6 @@ const activeItem = (item: any) => {
const open = () => {
dialogVisible.value = true;
init();
};
defineExpose({
open,

View File

@@ -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"

View File

@@ -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 变化
@@ -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 {

View File

@@ -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>

View File

@@ -63,7 +63,12 @@
</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
type="primary"
:icon="Check"
@click="save"
size="small"
:loading="loading"
>确定</el-button
>
</template>
@@ -81,6 +86,7 @@ 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);
@@ -157,7 +163,8 @@ const save = () => {
(form.value.searchBeginTime = timeValue.value[0]),
(form.value.searchEndTime = timeValue.value[1]);
exportForms(form.value).then((res: any) => {
exportForms(form.value)
.then((res: any) => {
let blob = new Blob([res], {
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
});
@@ -172,6 +179,10 @@ const save = () => {
document.body.removeChild(link);
machineVisible.value = false;
loading.value = false;
})
.catch((err) => {
loading.value = false;
});
};

View File

@@ -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
@@ -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>

View File

@@ -54,22 +54,26 @@
</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>
@@ -196,7 +200,9 @@ import socketClient from "@/utils/webSocketClient";
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(); // 终端在线统计组件引用
@@ -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);
};