角色用户管理,区域概览
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="区域" v-if="area">
|
||||
<Area ref="areaRef" v-model="tableStore.table.params.deptIndex" />
|
||||
<Area ref="areaRef" v-model="tableStore.table.params.deptIndex" @change-value="onAreaChange" />
|
||||
</el-form-item>
|
||||
<slot name="select"></slot>
|
||||
</el-form>
|
||||
@@ -81,7 +81,7 @@ import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { Search, RefreshLeft } from '@element-plus/icons-vue'
|
||||
import { defineProps } from 'vue'
|
||||
const emit = defineEmits(['selectChange'])
|
||||
const emit = defineEmits(['selectChange','areaChange'])
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const tableHeader = ref()
|
||||
const datePickerRef = ref()
|
||||
@@ -132,11 +132,17 @@ const headerFormSecondStyleClose = {
|
||||
padding: '0'
|
||||
}
|
||||
|
||||
const onAreaChange = (data) => {
|
||||
|
||||
emit('areaChange', {label: data.label})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => tableStore?.table.params.deptIndex,
|
||||
newVal => {
|
||||
setTimeout(() => {
|
||||
areaRef.value && areaRef.value.change()
|
||||
|
||||
}, 0)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -25,6 +25,7 @@ export const useMonitoringPoint = defineStore(
|
||||
val: any
|
||||
) => {
|
||||
state[key] = val
|
||||
|
||||
}
|
||||
const setShowCheckBox = (val: boolean) => {
|
||||
if (val && state.lineIds.length === 0) {
|
||||
@@ -35,6 +36,7 @@ export const useMonitoringPoint = defineStore(
|
||||
}
|
||||
state.showCheckBox = val
|
||||
}
|
||||
|
||||
return { state, setValue, setShowCheckBox }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
:show-arrow="false"
|
||||
:offset="-0"
|
||||
:content="item1.name"
|
||||
popper-class="atooltip"
|
||||
placement="bottom-start"
|
||||
|
||||
>
|
||||
<div class="tooltipText">
|
||||
{{ item1.name }}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
placeholder="电站名称,终端名称,型号"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
placeholder="电站名称,终端编号,监测点名称、电压等级、终端厂家、干扰源类型"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电压等级:">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<span style="font-size: 14px; font-weight: bold">
|
||||
统计区域: 中国   统计时间: {{ Time[0] + '至' + Time[1] }}   统计次数: {{ frequency + '次' }}
|
||||
统计区域: {{ areaName }}   统计时间: {{ Time[0] + '至' + Time[1] }}   统计次数: {{ frequency + '次' }}
|
||||
</span>
|
||||
<el-tabs tab-position="left" class="demo-tabs" style="margin-top: 10px">
|
||||
<el-tab-pane label="区域">
|
||||
@@ -51,6 +51,7 @@ const areaData: any = ref([])
|
||||
const levelData: any = ref([])
|
||||
const shareData: any = ref([])
|
||||
const Time: any = ref([])
|
||||
const areaName = ref('中国')
|
||||
|
||||
const tableHeaderAera = ref<any[]>([
|
||||
{ prop: 'areaName', label: '区域名称', width: '120px' },
|
||||
@@ -58,6 +59,7 @@ const tableHeaderAera = ref<any[]>([
|
||||
{ prop: 'frequency', label: '电压暂降次数', sortable: true },
|
||||
{ prop: 'sarfi9', label: 'SARFI-90', sortable: true }
|
||||
])
|
||||
|
||||
const tableHeaderLevel = ref<any[]>([
|
||||
{ prop: 'voltageLevel', label: '电压等级(kV)', width: '150px' },
|
||||
{ prop: 'monitoringPoints', label: '监测点数' },
|
||||
@@ -66,9 +68,11 @@ const tableHeaderLevel = ref<any[]>([
|
||||
|
||||
const frequency = ref<number>(875)
|
||||
|
||||
const info = (list: any, searchBeginTime: any, searchEndTime: any) => {
|
||||
const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaName: string) => {
|
||||
Time.value = [searchBeginTime, searchEndTime]
|
||||
frequency.value = list.areaStatistics.frequencySum
|
||||
areaName.value = selectedAreaName // 更新区域名称
|
||||
|
||||
areaData.value = [
|
||||
{
|
||||
areaName: '总计',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker area></TableHeader>
|
||||
<TableHeader date-picker area @area-change="onAreaChange"></TableHeader>
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick" v-loading="tableStore.table.loading">
|
||||
<el-tab-pane label="图形" name="1">
|
||||
<Echart ref="echarts" />
|
||||
@@ -26,6 +26,7 @@ const echarts = ref()
|
||||
const Picker = ref()
|
||||
const table = ref()
|
||||
const dictData = useDictData()
|
||||
const currentAreaName = ref('中国')
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/event-boot/areaStatistics/getAreaCalculation',
|
||||
@@ -35,7 +36,8 @@ const tableStore = new TableStore({
|
||||
table.value.info(
|
||||
tableStore.table.data,
|
||||
tableStore.table.params.searchBeginTime,
|
||||
tableStore.table.params.searchEndTime
|
||||
tableStore.table.params.searchEndTime,
|
||||
currentAreaName.value // 传递当前区域名称
|
||||
)
|
||||
echarts.value.Processing(tableStore.table.data.areaStatistics)
|
||||
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
||||
@@ -54,6 +56,12 @@ onMounted(() => {
|
||||
const handleClick = () => {
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
|
||||
const onAreaChange = (data) => {
|
||||
currentAreaName.value = data.label
|
||||
}
|
||||
|
||||
const layout = mainHeight(123) as any
|
||||
</script>
|
||||
|
||||
|
||||
@@ -39,11 +39,14 @@ const navigationRef = ref()
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(82)
|
||||
const activeName = ref('1')
|
||||
|
||||
watch(
|
||||
() => router.currentRoute.value.query.lineId,
|
||||
(newLineId, oldLineId) => {
|
||||
|
||||
if (!newLineId) return
|
||||
// 在这里处理 lineId 的变化
|
||||
|
||||
monitoringPoint.setValue('lineId', router.currentRoute.value.query.lineId)
|
||||
monitoringPoint.setValue('lineName', router.currentRoute.value.query.lineName)
|
||||
setTimeout(() => {
|
||||
@@ -58,6 +61,7 @@ watch(
|
||||
watch(
|
||||
() => monitoringPoint.state.lineId,
|
||||
() => {
|
||||
|
||||
// 刷新页面
|
||||
isReload.value = true
|
||||
nextTick(() => {
|
||||
|
||||
@@ -47,6 +47,7 @@ const mapList: any = ref([])
|
||||
const flag = ref(true)
|
||||
const showTree = ref(false)
|
||||
onMounted(() => {
|
||||
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
if (dom) {
|
||||
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||
@@ -65,12 +66,14 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
|
||||
if (data.level === 6) {
|
||||
if (window.localStorage.getItem('BMAP_SECKEY') == null) {
|
||||
flag.value = false
|
||||
}
|
||||
|
||||
|
||||
monitoringPoint.setValue('lineId', data.id)
|
||||
|
||||
}
|
||||
setTimeout(() => {
|
||||
flag.value = true
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="角色名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入菜单名称" maxlength="32" show-word-limit @input="handleInput"/>
|
||||
<el-input v-model="form.name" placeholder="请输入角色名称" maxlength="32" show-word-limit @input="handleInput"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色编码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入角色编码" />
|
||||
<el-input v-model="form.code" placeholder="请输入角色编码" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色描述">
|
||||
<el-input v-model="form.remark" :rows="2" type="textarea" placeholder="请输入描述" />
|
||||
<el-input v-model="form.remark" :rows="2" type="textarea" placeholder="请输入描述" maxlength="100" show-word-limit/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
||||
<el-form :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
||||
<el-form-item label="用户名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入昵称" maxlength="16" show-word-limit @input="handleInput('name', $event)"/>
|
||||
<el-input v-model="form.name" placeholder="请输入昵称" maxlength="16" show-word-limit @input="handleInput('name', $event)" :disabled="title !== '新增用户'"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录名" prop="loginName">
|
||||
<el-input v-model="form.loginName" placeholder="请输入登录名" maxlength="16" show-word-limit @input="handleInput('loginName', $event)"/>
|
||||
@@ -211,7 +211,7 @@ const queryRole = () => {
|
||||
}
|
||||
queryRole()
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('新增菜单')
|
||||
const title = ref('新增用户')
|
||||
const open = (text: string, data?: anyObj) => {
|
||||
title.value = text
|
||||
dialogVisible.value = true
|
||||
|
||||
Reference in New Issue
Block a user