diff --git a/src/api/admin/user.js b/src/api/admin/user.js index 1ec67194..f521786f 100644 --- a/src/api/admin/user.js +++ b/src/api/admin/user.js @@ -1,5 +1,6 @@ import createAxios from '@/utils/request' + // 密码规则修改 export function ruleUpdate(data) { return createAxios({ @@ -24,3 +25,80 @@ export function unlockRoot(data) { data }) } + +//根据客户端名查询信息 +export function getClientInfoByPath() { + + return createAxios({ + url: '/user-boot/authClient/getAuthClientByName/njcn', + method: 'GET', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + } + + }) +} + +//客户端会话配置更新 +export function updateClientSessionConfig(data) { + return createAxios({ + url: '/user-boot/authClient/sessionConfigUpdate', + method: 'post', + data + }) +} + +//获取用户配置 +export function getUserConfig() { + return createAxios({ + url: '/user-boot/password/getUserStrategyList', + method: 'post' + }) +} + +//查询系统列表 +export function getSystemList() { + return createAxios({ + url: '/system-boot/config/getSysConfigData', + method: 'get' + }) +} + +//激活系统配置 +export function activeSystemConfig(data) { + return createAxios({ + url: '/system-boot/config/updateSysConfig', + method: 'post', + data + }) +} + +//删除系统配置 +export function deleteSystemConfig( data) { + return createAxios({ + url: '/system-boot/config/removeSysConfigById', + method: 'get', + params: data + }) +} + + + + +//新增系统配置 +export function addSystemConfig(data) { + return createAxios({ + url: '/system-boot/config/addSysConfig', + method: 'post', + data + }) +} + +//修改系统配置 +export function updateSystemConfig(data) { + return createAxios({ + url: '/system-boot/config/updateSysConfig', + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/api/device-boot/sensitiveLoadMange.ts b/src/api/device-boot/sensitiveLoadMange.ts new file mode 100644 index 00000000..fe0d04b1 --- /dev/null +++ b/src/api/device-boot/sensitiveLoadMange.ts @@ -0,0 +1,28 @@ +import request from '@/utils/request' + +// 新增敏感用户 +export function saveUser(data: any) { + return request({ + url: '/device-boot/pqSensitiveUser/save', + method: 'post', + data: data + }) +} + +// 修改敏感用户 +export function updateUser(data: any) { + return request({ + url: '/device-boot/pqSensitiveUser/update', + method: 'post', + data: data + }) +} + +// 删除敏感用户 +export function deleteUser(data: any) { + return request({ + url: '/device-boot/pqSensitiveUser/delete', + method: 'post', + data: data + }) +} diff --git a/src/api/system-boot/area.ts b/src/api/system-boot/area.ts new file mode 100644 index 00000000..1e01eb6a --- /dev/null +++ b/src/api/system-boot/area.ts @@ -0,0 +1,37 @@ +import request from '@/utils/request' +//区域树形表格接口 +export function areaTree(data: any) { + return request({ + url: '/system-boot/area/areaTree', + method: 'post', + params: data, + }) +} +export function areaAdd(data: any) { + return request({ + url: '/system-boot/area/add', + method: 'post', + data: data, + }) +} +export function areaDelete(data: any) { + return request({ + url: '/system-boot/area/delete', + method: 'post', + data: data, + }) +} +export function update(data: any) { + return request({ + url: '/system-boot/area/update', + method: 'post', + data: data, + }) +} +export function selectPid(data: any) { + return request({ + url: '/system-boot/area/selectPid', + method: 'post', + data: data, + }) +} \ No newline at end of file diff --git a/src/utils/mqtt.ts b/src/utils/mqtt.ts index 582c77c8..9ae8d5c6 100644 --- a/src/utils/mqtt.ts +++ b/src/utils/mqtt.ts @@ -57,6 +57,7 @@ class MQTT { // ? 'ws://192.168.1.68:8083/mqtt' // : localStorage.getItem('MqttUrl') const mqttUrl = localStorage.getItem('MqttUrl') + console.log('MQTT URL:', mqttUrl) if (mqttUrl == 'null' || mqttUrl == null) return this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions) this.setupEventListeners() diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index da8c63b8..47590f1b 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -137,6 +137,7 @@ export default class TableStore { this.table.params.pageNum = 1 this.index() + console.log('search') } ], [ diff --git a/src/views/pqs/business/terminal/sensitiveLoadMange/detail.vue b/src/views/pqs/business/terminal/sensitiveLoadMange/detail.vue new file mode 100644 index 00000000..d2e8f7ea --- /dev/null +++ b/src/views/pqs/business/terminal/sensitiveLoadMange/detail.vue @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确认 + + + + + diff --git a/src/views/pqs/business/terminal/sensitiveLoadMange/index.vue b/src/views/pqs/business/terminal/sensitiveLoadMange/index.vue new file mode 100644 index 00000000..01bf1c91 --- /dev/null +++ b/src/views/pqs/business/terminal/sensitiveLoadMange/index.vue @@ -0,0 +1,117 @@ + + + + + + + + + + 新增 + + + + + + + diff --git a/src/views/pqs/harmonicMonitoring/area/TransientEventList/index.vue b/src/views/pqs/harmonicMonitoring/area/TransientEventList/index.vue index 5be670d0..f39d8e58 100644 --- a/src/views/pqs/harmonicMonitoring/area/TransientEventList/index.vue +++ b/src/views/pqs/harmonicMonitoring/area/TransientEventList/index.vue @@ -129,14 +129,22 @@ const tableStore = new TableStore({ { field: 'subName', title: '变电站', minWidth: '150' }, { field: 'ip', title: '网络参数' ,width:'120px' }, { field: 'scale', title: '电压等级', minWidth: '110' }, - // { - // field: 'advanceType', - // title: '触发类型', - // minWidth: '90', - // formatter: (row: any) => { - // return row.cellValue || '其他' - // } - // }, + { + field: 'advanceType', + title: '暂降类型', + minWidth: '90', + formatter: (row: any) => { + return row.cellValue || '其他' + } + }, + { + field: 'eventType', + title: '触发类型', + minWidth: '120', + formatter: (row: any) => { + return eventList.filter(item => item.id === row.cellValue)[0]?.name + } + }, { field: 'advanceReason', title: '暂降原因', @@ -145,14 +153,7 @@ const tableStore = new TableStore({ return row.cellValue || '其他' } }, - { - field: 'eventType', - title: '触发类型', - minWidth: '120', - formatter: (row: any) => { - return eventList.filter(item => item.id === row.cellValue)[0]?.name - } - }, + // { // field: 'severity', title: '严重度', minWidth: "80", formatter: (row: any) => { // return row.cellValue.toFixed(2) diff --git a/src/views/pqs/harmonicMonitoring/area/getIntegrityData/index.vue b/src/views/pqs/harmonicMonitoring/area/getIntegrityData/index.vue index 58df1076..e80b3d9c 100644 --- a/src/views/pqs/harmonicMonitoring/area/getIntegrityData/index.vue +++ b/src/views/pqs/harmonicMonitoring/area/getIntegrityData/index.vue @@ -55,7 +55,7 @@ - + diff --git a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/xiebopingpu/index.vue b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/xiebopingpu/index.vue index b668f43f..dee23011 100644 --- a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/xiebopingpu/index.vue +++ b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/xiebopingpu/index.vue @@ -103,7 +103,11 @@ const init = () => { ) } options.value = { + title: { + text: formData.harmState == 0 ? '谐波电压频谱' : '谐波电流频谱' + }, xAxis: { + name: '次数', type: 'category', data: Array.from({ length: 49 }, (_, i) => `${i + 2}次`) diff --git a/src/views/pqs/harmonicMonitoring/reportForms/passing/index.vue b/src/views/pqs/harmonicMonitoring/reportForms/passing/index.vue index a55b61ce..8711a5e4 100644 --- a/src/views/pqs/harmonicMonitoring/reportForms/passing/index.vue +++ b/src/views/pqs/harmonicMonitoring/reportForms/passing/index.vue @@ -35,8 +35,8 @@ defineOptions({ name: 'harmonic-boot/reate/word' }) const dictData = useDictData() -//区域联级选择 -const industry = dictData.getBasicData('Interference_Source') +//行业类型选择 +const industry = dictData.getBasicData('Business_Type') //用户信息弹出框 const tableRef = ref() diff --git a/src/views/pqs/panorama/components/boundary.ts b/src/views/pqs/panorama/components/boundary.ts index c3ff2f38..ed4a0a5d 100644 --- a/src/views/pqs/panorama/components/boundary.ts +++ b/src/views/pqs/panorama/components/boundary.ts @@ -8621,6 +8621,91 @@ const 葫芦岛 = [ ] ] +const 海口 = [ + [ + { lng: 110.106525, lat:20.026851}, + { lng: 110.161895, lat:19.977693}, + { lng: 110.143932, lat:19.889106}, + { lng: 110.186246, lat:19.864193}, + { lng: 110.228283, lat:19.753767}, + { lng: 110.208468, lat:19.716679}, + { lng: 110.222357, lat:19.67974}, + { lng: 110.262449, lat:19.687318}, + { lng: 110.314208, lat:19.697421}, + { lng: 110.340041, lat:19.720625}, + { lng: 110.393373, lat:19.698053}, + { lng: 110.372633, lat:19.654004}, + { lng: 110.401151, lat:19.606626}, + { lng: 110.455687, lat:19.574559}, + { lng: 110.486705, lat:19.593357}, + { lng: 110.519297, lat:19.563341}, + { lng: 110.540223, lat:19.535532}, + { lng: 110.611518, lat:19.526841}, + { lng: 110.641333, lat:19.549122}, + { lng: 110.636148, lat:19.593989}, + { lng: 110.672814, lat:19.647214}, + { lng: 110.623463, lat:19.664109}, + { lng: 110.623, lat:19.735461}, + { lng: 110.670314, lat:19.812776}, + { lng: 110.704665, lat:19.805992}, + { lng: 110.699573, lat:19.861512}, + { lng: 110.676147, lat:19.860092}, + { lng: 110.675314, lat:19.907868}, + { lng: 110.634666, lat:19.965401}, + { lng: 110.598, lat:19.98305}, + { lng: 110.526612, lat:20.075206}, + { lng: 110.495039, lat:20.077253}, + { lng: 110.387355, lat:20.11347}, + { lng: 110.318467, lat:20.109061}, + { lng: 110.293282, lat:20.059614}, + { lng: 110.24319, lat:20.077568}, + { lng: 110.144395, lat:20.074418}, + { lng: 110.106525, lat:20.026851} + ] +] + const 三亚=[ + [ + { lng: 108.932374, lat:18.335288}, + { lng: 108.956448, lat:18.307433}, + { lng: 109.006632, lat:18.323032}, + { lng: 109.108298, lat:18.323828}, + { lng: 109.138668, lat:18.267791}, + { lng: 109.174686, lat:18.260149}, + { lng: 109.28811, lat:18.264925}, + { lng: 109.355887, lat:18.214922}, + { lng: 109.441349, lat:18.199153}, + { lng: 109.4632, lat:18.177171}, + { lng: 109.527366, lat:18.169046}, + { lng: 109.561718, lat:18.143554}, + { lng: 109.63792, lat:18.171595}, + { lng: 109.72616, lat:18.177808}, + { lng: 109.749863, lat:18.19326}, + { lng: 109.783381, lat:18.337516}, + { lng: 109.805418, lat:18.347543}, + { lng: 109.785048, lat:18.426622}, + { lng: 109.809955, lat:18.459388}, + { lng: 109.781159, lat:18.51107}, + { lng: 109.725234, lat:18.493102}, + { lng: 109.710882, lat:18.426462}, + { lng: 109.665883, lat:18.391462}, + { lng: 109.539866, lat:18.396713}, + { lng: 109.515607, lat:18.429008}, + { lng: 109.536996, lat:18.490717}, + { lng: 109.535237, lat:18.53142}, + { lng: 109.506163, lat:18.551291}, + { lng: 109.423386, lat:18.574657}, + { lng: 109.405146, lat:18.623443}, + { lng: 109.332832, lat:18.575451}, + { lng: 109.313295, lat:18.517429}, + { lng: 109.246537, lat:18.558921}, + { lng: 109.203574, lat:18.553517}, + { lng: 109.185056, lat:18.507095}, + { lng: 109.195148, lat:18.469407}, + { lng: 109.072557, lat:18.452231}, + { lng: 109.015243, lat:18.422645}, + { lng: 108.932374, lat:18.335288} + ] + ] export default { zjkJSON, lfJSON, @@ -8640,5 +8725,7 @@ export default { 铁岭, 朝阳, 葫芦岛, - 沈阳 + 沈阳, + 海口, + 三亚 } diff --git a/src/views/pqs/panorama/components/map.vue b/src/views/pqs/panorama/components/map.vue index 18ea6d89..d5edf5b6 100644 --- a/src/views/pqs/panorama/components/map.vue +++ b/src/views/pqs/panorama/components/map.vue @@ -53,6 +53,10 @@ 关闭 + + + + ([]) const polyline = ref([]) const lineId = ref('') const center = ref({ - lng: 122.42588, - lat: 40.810977 + lng: 122.42588, + lat: 40.810977 + // lng: 109.5, // 海南经度 + // lat: 18.5 // 海南纬度 }) const infoWindowPoint = ref({ lng: 0, diff --git a/src/views/pqs/runManage/assessment/components/assess/information.vue b/src/views/pqs/runManage/assessment/components/assess/information.vue index 09c2e532..0fca24ed 100644 --- a/src/views/pqs/runManage/assessment/components/assess/information.vue +++ b/src/views/pqs/runManage/assessment/components/assess/information.vue @@ -28,6 +28,7 @@ + { } onBeforeMount(async () => { + await dictionary() info(0) // 变压器参数维护 info(1) // 电容器参数维护 diff --git a/src/views/pqs/voltageSags/Region/severity/index.vue b/src/views/pqs/voltageSags/Region/severity/index.vue index 66d723c8..06723c51 100644 --- a/src/views/pqs/voltageSags/Region/severity/index.vue +++ b/src/views/pqs/voltageSags/Region/severity/index.vue @@ -85,6 +85,7 @@ const eliminate = (name: string) => { // 地图数处理 const map = (res: any) => { + echartMapList.value = { name: '', title: { diff --git a/src/views/system/ReportConfiguration/components/Administration.vue b/src/views/system/ReportConfiguration/components/Administration.vue index f2810598..fa8d899a 100644 --- a/src/views/system/ReportConfiguration/components/Administration.vue +++ b/src/views/system/ReportConfiguration/components/Administration.vue @@ -7,7 +7,7 @@ handleNodeClick(node, data)" :expand-on-click-node="false" :highlight-current="true" :data="TreeData" @@ -92,13 +92,12 @@ import Table from '@/components/table/index.vue' import TableHeader from '@/components/table/header/index.vue' import { ElMessage } from 'element-plus' import { - getDictTree, getReportDictList, addDict, - updateDict, deleteDict } from '@/api/system-boot/ReportTemplate' + // 弹出框是否可见 const dialogVisible = ref(false) const dialogTitle = ref('新增配置项') @@ -107,12 +106,50 @@ const props = defineProps({ type: { type: Number, default: undefined + }, + treeData: { + type: Array, + default: () => [] } }) +const TreeData = computed(() => props.treeData) +const secondLevelNode = ref([]); +const treeExpandData = ref([]) + +const setDefaultExpandedKeys = (treeData: any[]) => { + const firstLevelIds = treeData.map(item => item.id) + treeExpandData.value = firstLevelIds +} + + +// 默认选中第一个节点 +const selectFirstNode = () => { + if (props.treeData.length > 0 && tree.value) { + const firstNodeId = props.treeData[0].id + tree.value.setCurrentKey(firstNodeId) + formData.id = firstNodeId + } +} + +// 监听 treeData 变化,自动设置默认展开 +watch( + () => props.treeData, + (newVal) => { + if (newVal.length > 0) { + setDefaultExpandedKeys(newVal) + nextTick(() => { + selectFirstNode() + }) + } + }, + { immediate: true } +) + +const tree = ref(null) const formData = reactive({ searchValue: '', - id: '0', + id: 0, type: props.type }) @@ -124,6 +161,11 @@ const form = reactive({ type: props.type }) +const defaultProps = { + children: 'children', + label: 'reportDescribe' +} + const rules = { name: [{ required: true, message: '名称不能为空', trigger: 'blur' }], reportDescribe: [{ required: true, message: '描述不能为空', trigger: 'blur' }], @@ -131,7 +173,7 @@ const rules = { } const tableStore = new TableStore({ - url: '/system-boot/reportDict/getReportDictList', + url: getReportDictList(formData), method: 'POST', column: [ { title: '配置项名称', field: 'name' }, @@ -185,6 +227,45 @@ const tableStore = new TableStore({ }) provide('tableStore', tableStore) + + +// 存储当前选中节点的路径(包括自身) +const selectedNodePath = ref([]); + +// 处理节点点击事件 +const handleNodeClick = (node: any) => { + // 获取当前节点的完整路径 + const nodePath = tree.value?.getNodePath(node); + + // 更新当前选中节点的路径 + selectedNodePath.value = nodePath || []; + + // 设置当前节点 ID 到 formData + formData.id = node.id; + + // 动态生成父节点选项(排除当前节点本身) + secondLevelNode.value = (nodePath || []).slice(0, -1).map((item: any) => ({ + id: item.id, + reportDescribe: item.reportDescribe + })); + + // 调用 tableStore.index() + tableStore.index(); +}; + +// 监听 selectedNodePath 变化 +watch(selectedNodePath, (newPath) => { + if (Array.isArray(newPath)) { + secondLevelNode.value = newPath.slice(0, -1).map((item: any) => ({ + id: item.id, + reportDescribe: item.reportDescribe + })); + } else { + console.warn('selectedNodePath is not an array:', newPath); + secondLevelNode.value = []; // 清空选项 + } +}); + const addTemplate = () => { dialogTitle.value = '新增配置项' dialogVisible.value = true @@ -218,7 +299,7 @@ const closeDialog = () => { } onMounted(() => { - tableStore.index() + //tableStore.index() }) diff --git a/src/views/system/ReportConfiguration/components/disposition.vue b/src/views/system/ReportConfiguration/components/disposition.vue index 64d1d8c6..5b62eb28 100644 --- a/src/views/system/ReportConfiguration/components/disposition.vue +++ b/src/views/system/ReportConfiguration/components/disposition.vue @@ -3,7 +3,7 @@ - + @@ -16,12 +16,12 @@ - { - console.log('点击了报告字典管理按钮') - showDictionary.value = true - console.log('showDictionary 当前值:', showDictionary.value) + +const treeDataForChild = ref([]) // 用于存储传递给子组件的树数据 +const openReportDictionary = async () => { + try { + const res = await getDictTree({ type: Number(tableStore.table.params.type) }) + treeDataForChild.value = res.data // 将数据存储到响应式变量中 + showDictionary.value = true // 打开子组件 + } catch (error) { + ElMessage.error('获取字典数据失败') + } } const closeReportDictionary = () => { @@ -150,7 +159,6 @@ const tableStore: any = new TableStore({ width: '220', render: 'buttons', buttons: [ - { name: 'edit', title: '编辑', @@ -166,8 +174,16 @@ const tableStore: any = new TableStore({ id: row.id, name: row.name, code: row.code, - type: row.type + type: row.type, + ids: row.rdIds } + // 获取树数据 + formData.type = row.type + getDictTree(formData).then(res => { + data.value = res.data + treeCheckedData.value= row.rdIds + setDefaultExpandedKeys(res.data) + }) } }, @@ -201,9 +217,21 @@ tableStore.table.params = {} tableStore.table.params.type = '0' provide('tableStore', tableStore) +// 模板类型变更 +const handleTypeChange = (value: string) => { + tableStore.table.params.type = value + tableStore.index() +} + +const formData= reactive({ + pageNum: 1, + pageSize: 20, + type: 0, +}) + const add = () => { - isEdit.value = true + isEdit.value = false title.value = '新增模板' dialogVisible.value = true // 初始化表单数据 @@ -211,9 +239,26 @@ const add = () => { id: '', name: '', code: '', - type: tableStore.table.params.type + type: tableStore.table.params.type, + ids: [] } - + formData.type = tableStore.table.params.type + treeCheckedData.value = [] + getDictTree(formData).then(res => { + data.value = res.data + setDefaultExpandedKeys(res.data) + }) +} + +const setDefaultExpandedKeys = (treeData: any[]) => { + const firstLevelIds = treeData.map(item => item.id) + treeExpandData.value = firstLevelIds +} + +const handleCheckChange = (data: any, checked: boolean, indeterminate: boolean) => { + // 获取当前选中的节点 key 值 + const checkedKeys = tree.value?.getCheckedKeys() || [] + form.value.ids = checkedKeys // 将选中的节点 ID 更新到表单数据中 } const addDetermine = () => { diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue new file mode 100644 index 00000000..abdeb042 --- /dev/null +++ b/src/views/system/area/index.vue @@ -0,0 +1,259 @@ + + + + + + + + + + 新增部门 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + + + + \ No newline at end of file diff --git a/src/views/system/auth/userList/popupEdit.vue b/src/views/system/auth/userList/popupEdit.vue index a4d7fac9..889f9573 100644 --- a/src/views/system/auth/userList/popupEdit.vue +++ b/src/views/system/auth/userList/popupEdit.vue @@ -71,7 +71,7 @@ 否 - + 是 @@ -123,8 +123,8 @@ const form = reactive({ limitIpEnd: '', limitTime: [1, 2], role: [], - smsNotice: 0, - emailNotice: 0, + smsNotice: 1, + emailNotice: 1, type: 0 }) const rules: Partial>> = { @@ -228,9 +228,9 @@ const open = (text: string, data?: anyObj) => { form.casualUser = 1 form.limitTime = [0, 24] form.role = [] - form.smsNotice = 0 - form.emailNotice = 0 - useId.value = 1 + form.smsNotice = 1 + form.emailNotice = 1 + useId.value = 0 form.id = '' form.limitIpStart = '0.0.0.0' form.limitIpEnd = '255.255.255.255' diff --git a/src/views/system/strategyManage/index.vue b/src/views/system/strategyManage/index.vue index 0284541b..61a74754 100644 --- a/src/views/system/strategyManage/index.vue +++ b/src/views/system/strategyManage/index.vue @@ -1,76 +1,196 @@ - - - 保存 - - - - - 系统策略 - + + + + + + + + + + + + + + + + 保存 + + + + + + + 新增类型 + + + + + + + 激活 + 编辑 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取消 + 确定 + + + + + + + + + + + + + + + + + - 账号锁定策略 - + - - - - - - - - - - - 账号密码复杂度校验 - - - - + + > + + + - - + + + + 取消 + 确定 + + + - @@ -138,9 +528,15 @@ onMounted(() => { background-color: #fff; margin: 10px; } +/* 增大折叠面板标题字体 */ +:deep(.el-collapse-item__header) { + font-size: 20px; /* 设置字体大小 */ + font-weight: bold; /* 加粗字体 */ + //color: var(--el-color-primary); /* 可选:设置颜色 */ +} -:deep(.el-form-item__label ){ - color: var(--el-color-primary); +:deep(.el-form-item__label) { + font-weight: 600; } - + \ No newline at end of file