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