Compare commits
10 Commits
a8ec91482a
...
e7f7c8b537
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7f7c8b537 | ||
|
|
6fcf99284d | ||
|
|
868463aef9 | ||
|
|
47adb54dee | ||
|
|
c520761c0e | ||
|
|
8b23cea38d | ||
|
|
db6594cdf4 | ||
|
|
82e41eefdb | ||
|
|
b48d247fcf | ||
|
|
345e954756 |
@@ -48,3 +48,19 @@ export function displayHistoryData(data: any) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//生成谐波责任指标
|
||||
export function getResponsibilityData(data: any) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/responsibility/getResponsibilityData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//生成动态谐波责任数据
|
||||
export function getDynamicData(data: any) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/responsibility/getDynamicData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -50,12 +50,13 @@ export const downloadFile = (filePath: any) => {
|
||||
/**
|
||||
* 获取文件的短期url展示
|
||||
*/
|
||||
export const getFileUrl = (filePath: string) => {
|
||||
export const getFileUrl = (params:any) => {
|
||||
let form = new FormData()
|
||||
form.append('filePath', filePath)
|
||||
// form.append('filePath', filePath)
|
||||
return createAxios({
|
||||
url: SYSTEM_PREFIX + '/file/getFileUrl',
|
||||
method: 'POST'
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -148,13 +148,14 @@ const initChart = () => {
|
||||
// 处理柱状图
|
||||
chart.setOption(options, true)
|
||||
// chart.group = 'group'
|
||||
emit('group',chart)
|
||||
emit('group', chart, chartRef.value)
|
||||
// 添加点击事件
|
||||
chart.on('click', function (params) {
|
||||
if (params.seriesName == '暂态触发点') {
|
||||
emit('triggerPoint', params.data)
|
||||
}
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
chart.resize()
|
||||
}, 0)
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
{{ fieldValue }}
|
||||
</div>
|
||||
<!-- Icon -->
|
||||
<Icon class="ba-icon-dark" v-if="field.render == 'icon' && fieldValue" :name="fieldValue ? fieldValue : field.default ?? ''" />
|
||||
<Icon class="ba-icon-dark" v-if="field.render == 'icon' && fieldValue"
|
||||
:name="fieldValue ? fieldValue : field.default ?? ''" />
|
||||
|
||||
<!-- switch -->
|
||||
<el-switch v-if="field.render == 'switch'" @change="onChangeField(field, $event)"
|
||||
@@ -14,12 +15,13 @@
|
||||
<!-- image -->
|
||||
<div v-if="field.render == 'image' && fieldValue" class="ba-render-image">
|
||||
<el-image :hide-on-click-modal="true" :preview-teleported="true" :preview-src-list="[fieldValue]"
|
||||
:src="fieldValue.length > 100 ? fieldValue : fullUrl(fieldValue)"></el-image>
|
||||
:src="fieldValue.length > 100 ? fieldValue : getUrl(fieldValue)"></el-image>
|
||||
</div>
|
||||
|
||||
<!-- tag -->
|
||||
<div v-if="field.render == 'tag' && fieldValue !== ''">
|
||||
<el-tag :type="getTagType(fieldValue, field.custom) || 'primary'" :effect="field.effect ||'light'" size="small">
|
||||
<el-tag :type="getTagType(fieldValue, field.custom) || 'primary'" :effect="field.effect || 'light'"
|
||||
size="small">
|
||||
{{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}
|
||||
</el-tag>
|
||||
</div>
|
||||
@@ -101,6 +103,7 @@ import { ref, inject } from 'vue'
|
||||
import { ElMessageBox, type TagProps } from 'element-plus'
|
||||
import type TableStoreClass from '@/utils/tableStore'
|
||||
import { fullUrl, timeFormat } from '@/utils/common'
|
||||
import { getFileUrl } from '@/api/system-boot/file'
|
||||
import type { VxeColumnProps } from 'vxe-table'
|
||||
|
||||
const TableStore = inject('tableStore') as TableStoreClass
|
||||
@@ -134,6 +137,11 @@ const onChangeField = (row: any, value: any) => {
|
||||
|
||||
// TableStore.onTableAction('field-change', { value: value, ...props })
|
||||
}
|
||||
const getUrl = (url: string) => {
|
||||
getFileUrl({ filePath: url }).then(res => {
|
||||
return res.data
|
||||
})
|
||||
}
|
||||
|
||||
const onButtonClick = (btn: OptButton) => {
|
||||
btn.click && btn.click(props.row, props.field)
|
||||
|
||||
@@ -83,7 +83,6 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import router from '@/router'
|
||||
import globalPopUp from './globalPopUp.vue'
|
||||
import { routePush } from '@/utils/router'
|
||||
import { fullUrl } from '@/utils/common'
|
||||
import html2canvas from 'html2canvas'
|
||||
import PopupPwd from './popup/password.vue'
|
||||
import AdminInfo from './popup/adminInfo.vue'
|
||||
|
||||
30
src/main.ts
30
src/main.ts
@@ -35,21 +35,21 @@ const setupAll = async () => {
|
||||
const app = createApp(App)
|
||||
|
||||
//开启离线地图
|
||||
// app.use(BaiduMapOffline, {
|
||||
// offline: true,
|
||||
// offlineConfig: {
|
||||
// imgext: '.png',
|
||||
// customstyle: '',
|
||||
// tiles_dir: '',
|
||||
// tiles_hybrid: '',
|
||||
// tiles_self: '',
|
||||
// tiles_v_dir: '',
|
||||
// tiles_satellite_dir: '',
|
||||
// tiles_road_dir: '',
|
||||
// tiles_v_road_dir: '',
|
||||
// home: './plugin/offline/'
|
||||
// }
|
||||
// })
|
||||
app.use(BaiduMapOffline, {
|
||||
offline: true,
|
||||
offlineConfig: {
|
||||
imgext: '.png',
|
||||
customstyle: '',
|
||||
tiles_dir: '',
|
||||
tiles_hybrid: '',
|
||||
tiles_self: '',
|
||||
tiles_v_dir: '',
|
||||
tiles_satellite_dir: '',
|
||||
tiles_road_dir: '',
|
||||
tiles_v_road_dir: '',
|
||||
home: './plugin/offline/'
|
||||
}
|
||||
})
|
||||
app.use(BaiduMap, {
|
||||
// ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
|
||||
ak: 'RpQi6WNFZ9tseKzhdwOQsXwFsoVntnsN',
|
||||
|
||||
@@ -347,12 +347,12 @@ const onSubmit = async () => {
|
||||
}))
|
||||
|
||||
// 设置有功功率图表
|
||||
setEChart(1, res1.data.data, '有功功率', 'kW')
|
||||
setEChart(1, res1.data.data, '有功功率', 'W')
|
||||
|
||||
// 获取无功功率数据并设置图表
|
||||
const res2 = await queryCarryCapacityQData(form)
|
||||
q_βminMap.value = res2.data.q_βminMap
|
||||
setEChart(2, res2.data.data, '无功功率', 'kVar')
|
||||
setEChart(2, res2.data.data, '无功功率', 'Var')
|
||||
|
||||
// 获取谐波电流数据并设置图表
|
||||
const res3 = await queryCarryCapacityIData(form)
|
||||
|
||||
@@ -69,7 +69,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
|
||||
{
|
||||
title: '日志错误码',
|
||||
title: '日志类型',
|
||||
field: 'codeName',
|
||||
minWidth: '180',
|
||||
formatter: (row: any) => {
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
:style="{ height: GridHeight + 'px' }"
|
||||
:row-height="rowHeight"
|
||||
:col-num="12"
|
||||
prevent-collision
|
||||
:vertical-compact="false"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable
|
||||
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</TableHeader>
|
||||
|
||||
<Table ref="tableRef" isGroup/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="tsx">
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const tableRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/libModel/pageLibModelQuery',
|
||||
method: 'POST',
|
||||
showPage: true, // 确保启用分页
|
||||
column: [
|
||||
{
|
||||
title: '典型设备',
|
||||
children: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'name', title: '名称',minWidth: 200 },
|
||||
{ field: 'voltage', title: '电压等级',minWidth: 100 },
|
||||
{ field: 'capacity', title: '容量',minWidth: 100 }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '各次谐波阻抗 (Ω)',
|
||||
width: 1800,
|
||||
children: Array.from({ length: 24 }, (_, i) => ({
|
||||
field: `i${i + 2}`,
|
||||
title: `${i + 2}次`,
|
||||
minWidth: 100
|
||||
}))
|
||||
}
|
||||
],
|
||||
// 在请求发送前处理参数
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.pageSize = 100
|
||||
},
|
||||
resetCallback: () => {
|
||||
tableStore.table.params.searchValue = ''
|
||||
},
|
||||
})
|
||||
|
||||
tableStore.table.params.type = 0
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
// 暴露查询方法给父组件调用
|
||||
const queryData = () => {
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
queryData
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
74
src/views/pqs/database/model/components/harmonicSources.vue
Normal file
74
src/views/pqs/database/model/components/harmonicSources.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable
|
||||
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" isGroup/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="tsx">
|
||||
import { ref, onMounted, provide, reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const tableRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/libModel/pageLibModelQuery',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
title: '谐波源',
|
||||
children: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'name', title: '名称',minWidth: 200 },
|
||||
{ field: 'voltage', title: '电压等级',minWidth: 200 },
|
||||
{ field: 'capacity', title: '容量',minWidth: 200 }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '各次谐波电流含量(%)',
|
||||
width: 1800,
|
||||
children: Array.from({ length: 24 }, (_, i) => ({
|
||||
field: `i${i + 2}`,
|
||||
title: `${i + 2}次`,
|
||||
minWidth: 100
|
||||
}))
|
||||
}
|
||||
],
|
||||
// 在请求发送前处理参数
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.pageSize = 100
|
||||
},
|
||||
resetCallback: () => {
|
||||
tableStore.table.params.searchValue = ''
|
||||
},
|
||||
})
|
||||
|
||||
tableStore.table.params.type = 1
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 暴露查询方法给父组件调用
|
||||
const queryData = () => {
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
queryData
|
||||
})
|
||||
|
||||
</script>
|
||||
47
src/views/pqs/database/model/index.vue
Normal file
47
src/views/pqs/database/model/index.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-change="handleTabChange">
|
||||
<el-tab-pane label="谐波阻抗模型库" name="1">
|
||||
<HarmonicImpedanceTable ref="harmonicImpedanceRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="谐波源模型库" name="2">
|
||||
<HarmonicSourcesTable ref="harmonicSourcesRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref, provide } from 'vue'
|
||||
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import HarmonicSourcesTable from './components/harmonicSources.vue'
|
||||
import HarmonicImpedanceTable from './components/harmonicImpedance.vue'
|
||||
defineOptions({
|
||||
name: 'database/model'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
|
||||
// 获取子组件引用
|
||||
const harmonicImpedanceRef = ref<InstanceType<typeof HarmonicImpedanceTable>>()
|
||||
const harmonicSourcesRef = ref<InstanceType<typeof HarmonicSourcesTable>>()
|
||||
|
||||
const layout = mainHeight(63) as any
|
||||
|
||||
// 添加 tab 切换处理函数
|
||||
const handleTabChange = (tabName: string) => {
|
||||
if (tabName === '1') {
|
||||
// 调用谐波阻抗数据库查询接口
|
||||
harmonicImpedanceRef.value?.queryData()
|
||||
} else if (tabName === '2') {
|
||||
// 调用谐波源数据库查询接口
|
||||
harmonicSourcesRef.value?.queryData()
|
||||
}
|
||||
}
|
||||
|
||||
// 组件挂载时初始化数据
|
||||
onMounted(() => {
|
||||
// 默认加载第一个 tab 的数据
|
||||
handleTabChange(activeName.value)
|
||||
})
|
||||
</script>
|
||||
@@ -47,7 +47,7 @@ import Table from '@/components/table/index.vue'
|
||||
import BackComponent from '@/components/icon/back/index.vue'
|
||||
import completenessDetails from './completenessDetails.vue'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { uploadUserData ,deleteUserDataByIds} from '@/api/advance-boot/division'
|
||||
import { uploadUserData, deleteUserDataByIds } from '@/api/advance-boot/division'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'division/aListOfLoadData'
|
||||
@@ -78,6 +78,9 @@ const tableStore = new TableStore({
|
||||
title: '完整性详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
disabled: row => {
|
||||
return row.integrity == 1
|
||||
},
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
completenessDetailsRef.value.open(row.id)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<el-dialog v-model="dialogVisible" draggable title="完整性不足详情" width="1000">
|
||||
<TableHeader :showReset="false" ref="TableHeaderRef">
|
||||
<template #select>
|
||||
@@ -13,11 +12,9 @@
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
@@ -33,14 +30,19 @@ const tableStore = new TableStore({
|
||||
{ title: '数据名', field: 'name' },
|
||||
{ title: '用户名', field: 'userName' },
|
||||
{ title: '测量点局号', field: 'lineNo' },
|
||||
{ title: '日期', field: 'upDataTime' },
|
||||
{ title: '完整性', field: 'integrity' },
|
||||
{ title: '日期', field: 'updateTime' },
|
||||
{
|
||||
title: '完整性(%)',
|
||||
field: 'integrity',
|
||||
formatter: (row: any) => {
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
}
|
||||
],
|
||||
loadCallback: () => {
|
||||
setTimeout(() => {
|
||||
tableStore.table.height = mainHeight(0,2).height as any
|
||||
tableStore.table.height = mainHeight(0, 2).height as any
|
||||
// console.log("🚀 ~ setTimeout ~ tableStore.table.height:", tableStore.table.height)
|
||||
|
||||
}, 0)
|
||||
// setTimeout(() => { tableStore.table.height = 'calc((100vh) / 2)'}, 1000)
|
||||
}
|
||||
@@ -49,17 +51,12 @@ const tableStore = new TableStore({
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchValue = ''
|
||||
const open = (id: string) => {
|
||||
|
||||
tableStore.table.params.userDataId = id
|
||||
dialogVisible.value = true
|
||||
|
||||
tableStore.index()
|
||||
|
||||
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<div class="title">
|
||||
贡献度计算
|
||||
<div style="font-size: 14px; font-weight: 500">
|
||||
{{ dotList.alias || '' }}
|
||||
<!-- {{ dotList.alias || '' }} -->
|
||||
<span class="monitoring-point">当前位置:{{ dotList.alias || '' }}</span>
|
||||
<back-component />
|
||||
</div>
|
||||
</div>
|
||||
@@ -45,7 +46,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="负荷数据:">
|
||||
<el-select v-model="form.loadData" clearable filterable placeholder="请选择负荷数据">
|
||||
<el-select v-model="form.loadDataId" clearable filterable placeholder="请选择负荷数据">
|
||||
<el-option
|
||||
v-for="item in loadDataOptions"
|
||||
:key="item.id"
|
||||
@@ -61,7 +62,7 @@
|
||||
<el-button type="primary" icon="el-icon-Select" @click="submit">确定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" type="card" class="demo-tabs" v-if="showTabs">
|
||||
<el-tabs v-model="activeName" type="border-card" class="mr10" v-if="showTabs">
|
||||
<el-tab-pane v-for="(item, index) in tabList" :key="item" :label="item.label" :name="index">
|
||||
<div class="pd10">
|
||||
<div>
|
||||
@@ -75,31 +76,93 @@
|
||||
format="YYYY-MM-DD"
|
||||
date-format="YYYY-MM-DD"
|
||||
time-format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:disabled-date="handleDisabledDate"
|
||||
/>
|
||||
<el-button type="primary" icon="el-icon-CaretRight" @click="execute(item, index)">
|
||||
执行
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="item.showExecute">
|
||||
<el-form :inline="true" v-model="item.form" class="mt10">
|
||||
<el-form-item label="限值:">
|
||||
<el-input v-model="item.form.limit" placeholder="请输入限值" />
|
||||
<div v-if="item.showEcahr == 1" class="harmonicButton">
|
||||
<el-form :inline="true" v-model="item.form">
|
||||
<el-form-item label="限值:" v-if="item.showDynamic">
|
||||
<el-input v-model="item.form.limit" placeholder="请选择限值" disabled>
|
||||
<template #append>
|
||||
<el-button
|
||||
:icon="Edit"
|
||||
:class="[code == 0 ? 'frontBox' : '']"
|
||||
@click="setCode(0)"
|
||||
/>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间点一:">
|
||||
<el-input v-model="item.form.time1" placeholder="请输入时间点一" />
|
||||
<el-form-item label="时间点一:" v-if="item.showDynamic">
|
||||
<el-input v-model="item.form.time1" placeholder="请选择时间点一" disabled>
|
||||
<template #append>
|
||||
<el-button
|
||||
:icon="Edit"
|
||||
:class="[code == 1 ? 'frontBox' : '']"
|
||||
@click="setCode(1)"
|
||||
/>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间点二:">
|
||||
<el-input v-model="item.form.time2" placeholder="请输入时间点二" />
|
||||
<el-form-item label="时间点二:" v-if="item.showDynamic">
|
||||
<el-input v-model="item.form.time2" placeholder="请选择时间点二" disabled>
|
||||
<template #append>
|
||||
<el-button
|
||||
:icon="Edit"
|
||||
:class="[code == 2 ? 'frontBox' : '']"
|
||||
@click="setCode(2)"
|
||||
/>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-Document">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-Document"
|
||||
@click="generateFn"
|
||||
v-if="!item.showDynamic"
|
||||
>
|
||||
生成动态谐波责任数据
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-Document">生成谐波责任指标</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-Document"
|
||||
v-else
|
||||
@click="generateMetrics"
|
||||
>
|
||||
生成谐波责任指标
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="box" v-loading="loading">
|
||||
<MyEChart :options="item.options" v-if="item.showEcahr == 1" @group="group" />
|
||||
<el-empty description="时间范围内无谐波数据" v-if="item.showEcahr == 2" />
|
||||
</div>
|
||||
<!-- 生成动态谐波责任数据 -->
|
||||
<div class="box boxTab" v-loading="loading1">
|
||||
<MyEChart :options="item.dynamicOptions" style="flex: 1" v-if="item.showDynamic" />
|
||||
<div style="width: 500px">
|
||||
<vxe-table
|
||||
v-if="item.showDynamic"
|
||||
ref="tableRef"
|
||||
:data="item.dynamicData"
|
||||
height="auto"
|
||||
v-bind="defaultAttribute"
|
||||
>
|
||||
<vxe-column field="customerName" title="用户名(用户号)"></vxe-column>
|
||||
<vxe-column field="responsibilityData" title="责任数据(%)" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ Math.floor(row.responsibilityData * 10000) / 10000 }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -112,14 +175,17 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
||||
import BackComponent from '@/components/icon/back/index.vue'
|
||||
import { harmonicOptions } from '@/utils/dictionary'
|
||||
import { userDataList } from '@/api/advance-boot/division'
|
||||
import { userDataList, getHistoryHarmData, getDynamicData, getResponsibilityData } from '@/api/advance-boot/division'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
import { getHistoryHarmData } from '@/api/advance-boot/division'
|
||||
import { Edit } from '@element-plus/icons-vue'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { timeFormat } from '@/utils/common'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
defineOptions({
|
||||
name: 'division/compute'
|
||||
})
|
||||
@@ -132,23 +198,29 @@ const size = ref(0)
|
||||
const showTabs = ref(false)
|
||||
const loadDataOptions: any = ref([])
|
||||
const form: any = reactive({
|
||||
type: '0',
|
||||
type: '1',
|
||||
index: [],
|
||||
loadData: ''
|
||||
loadDataId: ''
|
||||
})
|
||||
const code = ref(3)
|
||||
const xAxisData = ref([])
|
||||
const loading = ref(false)
|
||||
const loading1 = ref(false)
|
||||
const tabList: any = ref([])
|
||||
const activeName = ref(0)
|
||||
const xValue = ref('')
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
if (data.level == 6) {
|
||||
dotList.value = data
|
||||
}
|
||||
}
|
||||
// 设置时间
|
||||
const timeFrame = ref(['', ''])
|
||||
// 处理日期禁用逻辑
|
||||
const handleDisabledDate = date => {
|
||||
// 定义时间边界
|
||||
const startLimit = new Date(tabList.value[0].time[0]).getTime()
|
||||
const endLimit = new Date(tabList.value[0].time[1]).setHours(23, 59, 59, 999)
|
||||
const startLimit = new Date(timeFrame.value[0]).getTime() - 86400000 //向前推1天
|
||||
const endLimit = new Date(timeFrame.value[1]).setHours(23, 59, 59, 999)
|
||||
|
||||
// 如果日期不存在(选择今天时可能出现),不禁用
|
||||
if (!date) return false
|
||||
@@ -156,16 +228,26 @@ const handleDisabledDate = date => {
|
||||
// 禁用 2025-08-01 之前和 2025-08-31 之后的日期
|
||||
return date.getTime() < startLimit || date.getTime() > endLimit
|
||||
}
|
||||
// 这是按钮变色
|
||||
const setCode = (num: number) => {
|
||||
if (code.value == num) {
|
||||
return (code.value = 3)
|
||||
}
|
||||
code.value = num
|
||||
}
|
||||
// 确定
|
||||
const submit = () => {
|
||||
if (form.loadData == '') {
|
||||
if (form.loadDataId == '') {
|
||||
return ElMessage.warning('请选择负荷数据')
|
||||
}
|
||||
if (form.index.length == 0) {
|
||||
return ElMessage.warning('请选择谐波次数')
|
||||
}
|
||||
|
||||
if (form.index.length == 0) {
|
||||
showTabs.value = false
|
||||
} else {
|
||||
let timeList = loadDataOptions.value.filter((item: any) => item.id == form.loadData)[0]
|
||||
let timeList = loadDataOptions.value.filter((item: any) => item.id == form.loadDataId)[0]
|
||||
showTabs.value = true
|
||||
let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b)
|
||||
tabList.value = []
|
||||
@@ -179,24 +261,311 @@ const submit = () => {
|
||||
limit: '',
|
||||
time1: '',
|
||||
time2: ''
|
||||
}
|
||||
},
|
||||
showEcahr: 3, //1显示echart 2显示无数据 3什么都没有
|
||||
options: {},
|
||||
dynamicOptions: {}, //动态echarts
|
||||
dynamicList: {}, //动态echarts
|
||||
showDynamic: false //动态执行展示
|
||||
})
|
||||
timeFrame.value = [timeList.startTime, timeList.endTime]
|
||||
})
|
||||
// tabList.value =
|
||||
code.value = 3
|
||||
activeName.value = 0
|
||||
}
|
||||
}
|
||||
// 执行
|
||||
const execute = (item: any, index: number) => {
|
||||
getHistoryHarmData({
|
||||
const execute = async (item: any, index: number) => {
|
||||
tabList.value[activeName.value].showDynamic = false
|
||||
loading.value = true
|
||||
await getHistoryHarmData({
|
||||
searchBeginTime: item.time[0],
|
||||
searchEndTime: item.time[1],
|
||||
type: form.type,
|
||||
time: item.key,
|
||||
// userDataId:form.loadData,
|
||||
lineId: dotList.value.id
|
||||
}).then((res: any) => {})
|
||||
tabList.value[index].showExecute = true
|
||||
})
|
||||
.then((res: any) => {
|
||||
let [min, max] = yMethod(res.data.historyData.map((item: any) => item.value + 0.1))
|
||||
xAxisData.value = res.data.historyData.map((item: any) => item.time)
|
||||
tabList.value[index].options = {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
name: '时间',
|
||||
axisLabel: {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
formatter(params: any) {
|
||||
xValue.value = params[0].value[0]
|
||||
let str = params[0].value[0] + '<br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
str = str + params[i].marker + params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 30
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
name: form.type == 1 ? '%' : 'A',
|
||||
min: min,
|
||||
max: max
|
||||
},
|
||||
toolbox: {
|
||||
show: false
|
||||
},
|
||||
|
||||
series: [
|
||||
{
|
||||
name: item.key + (form.type == 1 ? '次谐波电压' : '次谐波电流'),
|
||||
data: res.data.historyData.map((item: any) => [
|
||||
item.time,
|
||||
Math.floor(item.value * 10000) / 10000
|
||||
]),
|
||||
type: 'line',
|
||||
symbol: 'none',
|
||||
markLine: {
|
||||
symbol: 'none', // 去除箭头
|
||||
label: {
|
||||
show: false // 隐藏标签
|
||||
},
|
||||
data: [
|
||||
{
|
||||
yAxis: ''
|
||||
},
|
||||
{
|
||||
xAxis: ''
|
||||
},
|
||||
{
|
||||
xAxis: ''
|
||||
}
|
||||
],
|
||||
// 样式配置
|
||||
lineStyle: {
|
||||
color: 'red',
|
||||
type: 'dashed' // 虚线
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
tabList.value[index].showEcahr = 1
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
tabList.value[index].showEcahr = 2
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
const resDataId = ref('')
|
||||
// 生成动态谐波责任数据
|
||||
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],
|
||||
time: tabList.value[activeName.value].key,
|
||||
type: form.type,
|
||||
userDataId: form.loadDataId
|
||||
})
|
||||
.then((res: any) => {
|
||||
resDataId.value = res.data.responsibilityDataIndex
|
||||
tabList.value[activeName.value].dynamicData = res.data.responsibilities
|
||||
let [min, max] = yMethod(res.data.datas.map((item: any) => item.valueDatas).flat())
|
||||
let series: any[] = []
|
||||
let time: any[] = res.data.timeDatas.map((item: any) => timeFormat(item))
|
||||
res.data.datas.forEach((item: any) => {
|
||||
series.push({
|
||||
name: item.customerName,
|
||||
data: item.valueDatas.map((k: any, i: number) => [time[i], Math.floor(k * 10000) / 10000]),
|
||||
type: 'line',
|
||||
symbol: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
tabList.value[activeName.value].dynamicOptions = {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
name: '时间',
|
||||
axisLabel: {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
formatter(params: any) {
|
||||
let str = params[0].value[0] + '<br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
str = str + params[i].marker + params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 30
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
name: form.type == 1 ? '%' : 'A',
|
||||
min: min,
|
||||
max: max
|
||||
},
|
||||
toolbox: {
|
||||
show: false
|
||||
},
|
||||
|
||||
options: {
|
||||
series: series
|
||||
}
|
||||
}
|
||||
|
||||
tabList.value[activeName.value].showDynamic = true
|
||||
})
|
||||
.catch(() => {
|
||||
loading1.value = false
|
||||
})
|
||||
loading1.value = false
|
||||
}
|
||||
// 生成指标
|
||||
const generateMetrics = async () => {
|
||||
if (tabList.value[activeName.value].form.limit == '') return ElMessage.warning('请选择限值!')
|
||||
if (tabList.value[activeName.value].form.time1 == '') return ElMessage.warning('请选择时间一!')
|
||||
if (tabList.value[activeName.value].form.time2 == '') return ElMessage.warning('请选择时间二!')
|
||||
loading1.value = true
|
||||
await getResponsibilityData({
|
||||
limitEndTime: tabList.value[activeName.value].form.time2,
|
||||
limitStartTime: tabList.value[activeName.value].form.time1,
|
||||
limitValue: tabList.value[activeName.value].form.limit,
|
||||
resDataId: resDataId.value,
|
||||
time: tabList.value[activeName.value].key,
|
||||
type: form.type
|
||||
})
|
||||
.then((res: any) => {
|
||||
tabList.value[activeName.value].dynamicData = res.data.responsibilities
|
||||
let [min, max] = yMethod(res.data.datas.map((item: any) => item.valueDatas).flat())
|
||||
let series: any[] = []
|
||||
let time: any[] = res.data.timeDatas.map((item: any) => timeFormat(item))
|
||||
res.data.datas.forEach((item: any) => {
|
||||
series.push({
|
||||
name: item.customerName,
|
||||
data: item.valueDatas.map((k: any, i: number) => [time[i], Math.floor(k * 10000) / 10000]),
|
||||
type: 'line',
|
||||
symbol: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
tabList.value[activeName.value].dynamicOptions = {
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
name: '时间',
|
||||
axisLabel: {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
formatter(params: any) {
|
||||
let str = params[0].value[0] + '<br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
str = str + params[i].marker + params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 30
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
name: form.type == 1 ? '%' : 'A',
|
||||
min: min,
|
||||
max: max
|
||||
},
|
||||
toolbox: {
|
||||
show: false
|
||||
},
|
||||
|
||||
options: {
|
||||
series: series
|
||||
}
|
||||
}
|
||||
|
||||
tabList.value[activeName.value].showDynamic = true
|
||||
})
|
||||
.catch(() => {
|
||||
loading1.value = false
|
||||
})
|
||||
loading1.value = false
|
||||
}
|
||||
// 监听echart点击
|
||||
const group = (chart: any, myChartDom: any) => {
|
||||
myChartDom.addEventListener('click', function (event: any) {
|
||||
// 获取点击位置相对于图表容器的坐标
|
||||
const rect = myChartDom.getBoundingClientRect()
|
||||
const x = event.clientX - rect.left
|
||||
const y = event.clientY - rect.top
|
||||
const pointInPixel = [x, y]
|
||||
// 转换为逻辑坐标(相对于图表坐标系)
|
||||
const pointInGrid = chart.convertFromPixel({ gridIndex: 0 }, pointInPixel)
|
||||
// 计算X轴和Y轴的对应数据
|
||||
|
||||
// 处理X轴数据(分类轴)
|
||||
|
||||
// 处理Y轴数据(数值轴)
|
||||
let yValue = pointInGrid[1].toFixed(4)
|
||||
// xValue = timeFormat(pointInGrid[0].toFixed(0) - 0)
|
||||
if (code.value == 0) {
|
||||
tabList.value[activeName.value].form.limit = yValue
|
||||
tabList.value[activeName.value].options.series[0].markLine.data[0].yAxis = yValue
|
||||
chart.setOption(tabList.value[activeName.value].options)
|
||||
} else if (code.value == 1) {
|
||||
tabList.value[activeName.value].form.time1 = xValue.value
|
||||
tabList.value[activeName.value].options.series[0].markLine.data[1].xAxis = xValue.value
|
||||
chart.setOption(tabList.value[activeName.value].options)
|
||||
} else if (code.value == 2) {
|
||||
tabList.value[activeName.value].form.time2 = xValue.value
|
||||
tabList.value[activeName.value].options.series[0].markLine.data[2].xAxis = xValue.value
|
||||
chart.setOption(tabList.value[activeName.value].options)
|
||||
}
|
||||
// 控制台输出详细信息
|
||||
// console.log('点击事件详情:', {
|
||||
// X轴数据: xValue,
|
||||
// Y轴数据: yValue
|
||||
// })
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -229,4 +598,32 @@ onMounted(() => {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
.monitoring-point {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.box {
|
||||
// height: 280px;
|
||||
height: calc((100vh - 370px) / 2);
|
||||
}
|
||||
.boxTab {
|
||||
display: flex;
|
||||
}
|
||||
.harmonicButton {
|
||||
height: 42px;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
}
|
||||
:deep(.el-tabs__content) {
|
||||
height: calc(100vh - 265px);
|
||||
}
|
||||
:deep(.el-input-group__append, .el-input-group__prepend) {
|
||||
background-color: #ffffff00;
|
||||
}
|
||||
:deep(.frontBox) {
|
||||
background-color: var(--el-color-primary) !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,41 +1,154 @@
|
||||
<!-- 详情 -->
|
||||
<template>
|
||||
<div class="default-main" :style="height">
|
||||
<div class="default-main pd10">
|
||||
<div class="title">
|
||||
详情
|
||||
<div style="font-size: 14px;font-weight: 500;">
|
||||
{{ query.name || '' }}
|
||||
<!-- <div style="font-size: 14px; font-weight: 500">
|
||||
|
||||
</div> -->
|
||||
<span class="monitoring-point">{{ query.name || '' }}</span>
|
||||
<back-component />
|
||||
</div>
|
||||
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-change="generateFn">
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
:label="item.name + '次谐波'"
|
||||
:style="height"
|
||||
:name="index"
|
||||
v-loading="loading"
|
||||
>
|
||||
<div style="height: calc(100vh - 250px); overflow-y: auto">
|
||||
<div
|
||||
class="box boxTab mb10"
|
||||
:style="{
|
||||
height: `calc((100vh - 280px) / ${
|
||||
item.list.length == 0 ? 1 : item.list.length > 3 ? 3 : item.list.length
|
||||
})`
|
||||
}"
|
||||
v-for="(value, i) in item.dynamicOptions"
|
||||
:key="i"
|
||||
>
|
||||
<MyEChart :options="item.dynamicOptions[i]" style="flex: 1" />
|
||||
<div style="width: 500px">
|
||||
<vxe-table ref="tableRef" :data="item.list[i]" height="auto" v-bind="defaultAttribute">
|
||||
<vxe-column field="customerName" title="用户名(用户号)"></vxe-column>
|
||||
<vxe-column field="responsibilityData" title="责任数据(%)" width="120">
|
||||
<template v-slot="{ row }">
|
||||
{{ Math.floor(row.responsibilityData * 10000) / 10000 }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, onUnmounted } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { displayHistoryData } from '@/api/advance-boot/division';
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import BackComponent from '@/components/icon/back/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { id } from 'element-plus/es/locale';
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { timeFormat } from '@/utils/common'
|
||||
import { yMethod } from '@/utils/echartMethod'
|
||||
import { displayHistoryData } from '@/api/advance-boot/division'
|
||||
const { query } = useRoute() // 查询参数
|
||||
const dotList: any = ref({})
|
||||
const height = mainHeight(20)
|
||||
|
||||
const height = mainHeight(155)
|
||||
const activeName = ref(0)
|
||||
const tabList: any = ref([])
|
||||
|
||||
const loading: any = ref(false)
|
||||
const init = () => {
|
||||
displayHistoryData({
|
||||
id: query.id,
|
||||
time:query.time
|
||||
let data = (Array.isArray(query.time) ? query.time[0] : query.time)?.split(',') ?? []
|
||||
tabList.value = []
|
||||
data.forEach((item: any) => {
|
||||
tabList.value.push({
|
||||
name: item,
|
||||
dynamicOptions: [],
|
||||
list: []
|
||||
})
|
||||
})
|
||||
activeName.value = 0
|
||||
generateFn(0)
|
||||
}
|
||||
|
||||
// 生成动态谐波责任数据
|
||||
const generateFn = async (e: any) => {
|
||||
if (tabList.value[e].dynamicOptions.length != 0) return
|
||||
|
||||
loading.value = true
|
||||
await displayHistoryData({
|
||||
id: query.id,
|
||||
time: tabList.value[e].name
|
||||
})
|
||||
.then((res: any) => {
|
||||
res.data.forEach((item: any) => {
|
||||
tabList.value[e].list.push(item.responsibilities)
|
||||
|
||||
let [min, max] = yMethod(item.datas.map((k: any) => k.valueDatas).flat())
|
||||
let series: any[] = []
|
||||
let time: any[] = item.timeDatas.map((k: any) => timeFormat(k))
|
||||
item.datas.forEach((k: any) => {
|
||||
series.push({
|
||||
name: k.customerName,
|
||||
data: k.valueDatas.map((k: any, i: number) => [time[i], Math.floor(k * 10000) / 10000]),
|
||||
type: 'line',
|
||||
symbol: 'none'
|
||||
})
|
||||
})
|
||||
tabList.value[e].dynamicOptions.push({
|
||||
title: {
|
||||
text: `时间:${item.limitSTime} 至${item.limitETime} 限值:${item.limitValue}`
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time',
|
||||
name: '时间',
|
||||
axisLabel: {
|
||||
formatter: {
|
||||
day: '{MM}-{dd}',
|
||||
month: '{MM}',
|
||||
year: '{yyyy}'
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
formatter(params: any) {
|
||||
let str = params[0].value[0] + '<br/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
str =
|
||||
str + params[i].marker + params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
top: 30
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
yAxis: {
|
||||
min: min,
|
||||
max: max
|
||||
},
|
||||
toolbox: {
|
||||
show: false
|
||||
},
|
||||
|
||||
options: {
|
||||
series: series
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -45,9 +158,18 @@ onMounted(() => {
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
font-weight: 550;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
.monitoring-point {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.boxTab {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -63,8 +63,6 @@ const tableStore = new TableStore({
|
||||
|
||||
click: row => {
|
||||
console.log("🚀 ~ row:", row)
|
||||
|
||||
// push('/admin/division/detail')
|
||||
push({
|
||||
path: "/admin/division/detail",
|
||||
query: {
|
||||
|
||||
@@ -0,0 +1,493 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker ref="TableHeaderRef" @selectChange="handleTableHeaderSelectChange">
|
||||
<template #select>
|
||||
|
||||
<el-form-item label="区域">
|
||||
<el-cascader
|
||||
v-bind="$attrs"
|
||||
:options="areOptions"
|
||||
:props="cascaderProps"
|
||||
v-model="selectedArea"
|
||||
@change="handleFilterChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.statisticalType"
|
||||
value-key="id"
|
||||
placeholder="请选择统计类型"
|
||||
@change="handleStatisticalTypeChange"
|
||||
>
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电网标志">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.powerFlag"
|
||||
placeholder="请选择电网标志"
|
||||
@change="handleFilterChange"
|
||||
>
|
||||
<el-option label="全部" value="0"></el-option>
|
||||
<el-option label="电网侧" value="1"></el-option>
|
||||
<el-option label="非电网侧" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选">
|
||||
<el-input
|
||||
v-model="searchKeyword"
|
||||
placeholder="请输入变电站/终端/监测点"
|
||||
clearable
|
||||
@input="handleFilterChange"
|
||||
:show-word-limit=true
|
||||
:maxlength="32"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
|
||||
<div v-loading="tableStore.table.loading" class="main-container">
|
||||
<vxe-table
|
||||
class="full-height-table"
|
||||
ref="positioningtableRef"
|
||||
auto-resize
|
||||
:data="tableStore.table.data"
|
||||
v-bind="defaultAttribute"
|
||||
:height="tableHeight"
|
||||
resizable
|
||||
show-overflow
|
||||
>
|
||||
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
|
||||
<vxe-column field="gdName" title="供电公司" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="subStationName" :show-overflow="true" title="变电站" align="center" min-width="150" ></vxe-column>
|
||||
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="devType" title="终端型号" align="center" min-width="150" ></vxe-column>
|
||||
<vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="lineName" title="监测点名称" align="center" min-width="150"></vxe-column>
|
||||
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="objName" title="监测对象名称" align="center" min-width="150"></vxe-column>
|
||||
<vxe-column field="interval" title="统计间隔" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="harmonicValue" :title="harmonicValueTitle" align="center" min-width="120"></vxe-column>
|
||||
<vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column>
|
||||
<vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<!-- 修改分页控件 -->
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
:current-page="tableStore.table.params.pageNum"
|
||||
:page-size="tableStore.table.params.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
background
|
||||
layout="sizes, total, prev, pager, next, jumper"
|
||||
:total="tableStore.table.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, onBeforeUnmount, computed, reactive, watch } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport'
|
||||
})
|
||||
|
||||
const dictData = useDictData()
|
||||
const options = dictData.getBasicData('Pollution_Calc')
|
||||
const tableHeight = ref(500) // 默认高度
|
||||
const positioningtableRef = ref()
|
||||
// 添加区域选择的响应式变量
|
||||
const selectedArea = ref()
|
||||
const areOptions:any = dictData.state.area
|
||||
const allData = ref<PollutionItem[]>([])
|
||||
const TableHeaderRef = ref()
|
||||
// 添加响应式标题变量
|
||||
const harmonicValueTitle = ref('谐波电压污染值')
|
||||
const searchKeyword = ref('')
|
||||
|
||||
const cascaderProps = {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
checkStrictly: true,
|
||||
emitPath: false
|
||||
}
|
||||
|
||||
// 存储所有数据
|
||||
interface PollutionItem {
|
||||
gdName?: string
|
||||
subStationName?: string
|
||||
devName?: string
|
||||
lineName?: string
|
||||
powerFlag?: string
|
||||
}
|
||||
|
||||
// 格式化一类监测点字段
|
||||
const formatMonitorId = (row: any) => {
|
||||
return row.row.monitorId || '/'
|
||||
}
|
||||
|
||||
// 处理 TableHeader 展开/收起事件
|
||||
const handleTableHeaderSelectChange = (isExpanded: boolean) => {
|
||||
if(isExpanded){
|
||||
tableHeight.value = tableHeight.value - 55
|
||||
}else{
|
||||
tableHeight.value = tableHeight.value + 55
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const calculateTableHeight = () => {
|
||||
const windowHeight = window.innerHeight
|
||||
const headerHeight = 120
|
||||
const paginationHeight = 80 // 增加分页控件高度预留
|
||||
const padding = 30 // 增加padding避免被遮挡
|
||||
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
|
||||
tableHeight.value = Math.max(calculatedHeight, 300)
|
||||
}
|
||||
|
||||
// 防抖处理窗口大小变化
|
||||
const debouncedCalculateTableHeight = debounce(() => {
|
||||
calculateTableHeight()
|
||||
}, 300)
|
||||
|
||||
// 计算过滤后的数据
|
||||
const filteredData = computed(() => {
|
||||
let result = [...allData.value]
|
||||
|
||||
// 区域过滤
|
||||
if (selectedArea.value) {
|
||||
// 查找匹配的区域名称
|
||||
let areaName = ''
|
||||
let areaLevel = -1
|
||||
const findAreaName = (areas: any[]) => {
|
||||
for (const area of areas) {
|
||||
|
||||
if (area.id === selectedArea.value) {
|
||||
areaName = area.name
|
||||
areaLevel = area.level !== undefined ? area.level : -1
|
||||
break
|
||||
}
|
||||
if (area.children && area.children.length > 0) {
|
||||
findAreaName(area.children)
|
||||
}
|
||||
}
|
||||
}
|
||||
findAreaName(areOptions)
|
||||
|
||||
// 根据区域名称过滤数据,但只有当层级大于1时才过滤
|
||||
if (areaName && areaLevel > 1) {
|
||||
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
|
||||
}
|
||||
}
|
||||
|
||||
// 电网标志过滤
|
||||
if (tableStore.table.params.powerFlag === '1') {
|
||||
// 电网侧
|
||||
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
|
||||
} else if (tableStore.table.params.powerFlag === '2') {
|
||||
// 非电网侧
|
||||
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
|
||||
}
|
||||
// '0' 表示全部,不过滤
|
||||
|
||||
// 统一搜索过滤
|
||||
if (searchKeyword.value) {
|
||||
const keyword = searchKeyword.value.toLowerCase()
|
||||
result = result.filter(item =>
|
||||
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
|
||||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
|
||||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
|
||||
)
|
||||
}
|
||||
|
||||
return result
|
||||
})
|
||||
|
||||
// 计算当前页数据
|
||||
const currentPageData = computed(() => {
|
||||
const pageSize = tableStore.table.params.pageSize
|
||||
const pageNum = tableStore.table.params.pageNum
|
||||
const start = (pageNum - 1) * pageSize
|
||||
const end = start + pageSize
|
||||
return filteredData.value.slice(start, end)
|
||||
})
|
||||
|
||||
// 更新总条数
|
||||
const updateTotal = computed(() => {
|
||||
return filteredData.value.length
|
||||
})
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
|
||||
method: 'POST',
|
||||
column: [],
|
||||
beforeSearchFun: () => {
|
||||
//delete tableStore.table.params.statisticalType
|
||||
delete tableStore.table.params.deptIndex
|
||||
delete tableStore.table.params.interval
|
||||
delete tableStore.table.params.searchEndTime
|
||||
delete tableStore.table.params.searchBeginTime
|
||||
delete tableStore.table.params.timeFlag
|
||||
},
|
||||
loadCallback: () => {
|
||||
// 将所有数据存储到 allData 中
|
||||
allData.value = tableStore.table.data || []
|
||||
// 更新总条数
|
||||
tableStore.table.total = updateTotal.value
|
||||
// 更新当前页数据
|
||||
tableStore.table.data = currentPageData.value
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 监听区域选项变化,设置默认值
|
||||
watch(
|
||||
() => areOptions,
|
||||
(newOptions) => {
|
||||
if (newOptions && newOptions.length > 0) {
|
||||
// 设置默认选中第一项
|
||||
selectedArea.value = newOptions[0].id
|
||||
tableStore.table.params.id = newOptions[0].id
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
// 初始化统计类型
|
||||
watch(
|
||||
() => options,
|
||||
(newOptions) => {
|
||||
if (newOptions && newOptions.length > 0) {
|
||||
// 检查是否已经设置了统计类型
|
||||
if (!tableStore.table.params.statisticalType) {
|
||||
tableStore.table.params.statisticalType = newOptions[0]
|
||||
tableStore.table.params.ids = [newOptions[0].id]
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
|
||||
tableStore.table.params.powerFlag = "0"
|
||||
tableStore.table.params.isUpToGrid = 0
|
||||
tableStore.table.params.type = 1
|
||||
|
||||
// 监听统计类型变化,同步更新ids
|
||||
const handleStatisticalTypeChange = (newVal: { id: any }) => {
|
||||
console.log("统计类型变化", newVal)
|
||||
if (newVal) {
|
||||
tableStore.table.params.ids = [newVal.id]
|
||||
// 根据统计类型动态更新标题
|
||||
if (newVal.name) {
|
||||
harmonicValueTitle.value = newVal.name + '污染值'
|
||||
}
|
||||
}
|
||||
// 重新调用接口
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
// 处理过滤条件变化
|
||||
const handleFilterChange = () => {
|
||||
// 重置分页到第一页
|
||||
tableStore.table.params.pageNum = 1
|
||||
// 更新数据和总条数
|
||||
tableStore.table.data = currentPageData.value
|
||||
tableStore.table.total = updateTotal.value
|
||||
}
|
||||
|
||||
// 分页事件处理
|
||||
const handleSizeChange = (val: number) => {
|
||||
tableStore.table.params.pageSize = val
|
||||
tableStore.table.params.pageNum = 1
|
||||
tableStore.table.data = currentPageData.value
|
||||
tableStore.table.total = updateTotal.value
|
||||
}
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
tableStore.table.params.pageNum = val
|
||||
tableStore.table.data = currentPageData.value
|
||||
tableStore.table.total = updateTotal.value
|
||||
}
|
||||
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
// 获取当前过滤后的所有数据
|
||||
const allFilteredData = filteredData.value;
|
||||
|
||||
// 使用 vxe-table 的导出功能
|
||||
positioningtableRef.value.exportData({
|
||||
filename: '污染值报告',
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx',
|
||||
useStyle: true,
|
||||
data: allFilteredData,
|
||||
columnFilterMethod: function (column, $columnIndex) {
|
||||
return !(column.$columnIndex === 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
|
||||
|
||||
calculateTableHeight()
|
||||
window.addEventListener('resize', debouncedCalculateTableHeight)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('resize', debouncedCalculateTableHeight)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.default-main {
|
||||
height: calc(100vh - 20px); /* 减去一些边距避免被任务栏遮挡 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.full-height-table {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:deep .vxe-table {
|
||||
height: 100% !important;
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
:deep .vxe-table--body-wrapper {
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
flex: 0 0 auto; /* 不伸缩,保持固定高度 */
|
||||
display: flex;
|
||||
justify-content: center; /* 居中对齐 */
|
||||
align-items: center;
|
||||
min-height: 60px;
|
||||
padding: 10px 20px;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #ebeef5;
|
||||
z-index: 100; /* 提高层级确保可见 */
|
||||
position: relative; /* 确保定位上下文 */
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
:deep .el-pagination {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.el-pagination__sizes {
|
||||
.el-select {
|
||||
min-width: 100px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-pagination__total {
|
||||
margin-right: auto; /* 关键:将总共条数推到左侧 */
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 将除了 sizes 和 total 之外的所有元素都推到最右边 */
|
||||
.btn-prev,
|
||||
.btn-pager,
|
||||
.btn-next,
|
||||
.el-pagination__jump {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.btn-prev {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.btn-next {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.el-pagination__jump {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.el-pagination__editor {
|
||||
width: 50px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 响应式处理 */
|
||||
@media screen and (max-width: 768px) {
|
||||
.pagination-container {
|
||||
padding: 8px 10px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
:deep .el-pagination {
|
||||
.el-pagination__sizes {
|
||||
.el-select {
|
||||
min-width: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-pagination__total {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.el-pagination__jump {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
:deep .el-pagination {
|
||||
.el-pagination__sizes {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-pagination__total {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn-pager {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-pagination__jump {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -7,12 +7,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="对比">
|
||||
<el-select v-model="searchType" clearable placeholder="可选择同比、环比">
|
||||
<el-option
|
||||
v-for="item in searchTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-option v-for="item in searchTypeOptions" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -38,6 +34,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
import { getProbabilityDistribution } from '@/api/event-boot/monitor'
|
||||
import { getRunInfoData, getComFlagInfoData } from '@/api/device-boot/communicate'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
const tableStore = new TableStore({
|
||||
@@ -166,9 +163,21 @@ const handlerOptions1 = (data: any) => {
|
||||
}
|
||||
}
|
||||
const handlerOptions2 = (data: any) => {
|
||||
let title = ''
|
||||
if (data.integrityData.some((item: any) => item > 100)) {
|
||||
title = '数据存在异常,已进行转换处理'
|
||||
data.integrityData = data.integrityData.map(item => {
|
||||
return item > 100 ? 100 : item;
|
||||
});
|
||||
}
|
||||
|
||||
options2.value = {
|
||||
title: {
|
||||
text: '在线率和完整性'
|
||||
text: '在线率和完整性',
|
||||
subtext: title,
|
||||
subtextStyle: {
|
||||
color: 'red' // 设置副标题颜色为红色
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
|
||||
<el-input-number
|
||||
v-else-if="item.field == 'powerFactor'"
|
||||
style="width: 100%"
|
||||
v-model="form[item.field]"
|
||||
:min="0.1"
|
||||
:max="0.9"
|
||||
@@ -123,15 +124,22 @@
|
||||
:precision="1"
|
||||
placeholder="请输入功率因数"
|
||||
/>
|
||||
<el-input-number
|
||||
|
||||
v-else-if="item.field == 'flickerCoeff' || item.field == 's'"
|
||||
style="width: 100%"
|
||||
v-model="form[item.field]"
|
||||
show-word-limit
|
||||
:min="0"
|
||||
:max="99"
|
||||
placeholder="请输入值"
|
||||
/>
|
||||
<el-input-number
|
||||
v-else-if="
|
||||
item.field == 'transNum' ||
|
||||
item.field == 'capacitorNum' ||
|
||||
item.field == 'capacitorCapacity' ||
|
||||
item.field == 'capacitorReactance' ||
|
||||
item.field == 'flickerCoeff' ||
|
||||
item.field == 's'||
|
||||
item.field == 'transhighCapacity'||
|
||||
item.field == 'transImpedance'||
|
||||
item.field == 'nonlinearloadPower' ||
|
||||
@@ -142,6 +150,7 @@
|
||||
v-model="form[item.field]"
|
||||
show-word-limit
|
||||
:min="1"
|
||||
:max="9999"
|
||||
placeholder="请输入值"
|
||||
></el-input-number>
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<SecondSheet>
|
||||
<div style='height: 100%; overflow: hidden'>
|
||||
<div style='height: 100%; overflow: hidden' >
|
||||
<div class='switch-tab'>
|
||||
<el-radio-group v-model='radio' size='small'>
|
||||
<el-radio-group v-model='radio' >
|
||||
<el-radio-button value='三维图'>三维图</el-radio-button>
|
||||
<el-radio-button value='表格'>表格</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<Table ref='tableRef' height='auto' isGroup />
|
||||
<Table ref='tableRef' isGroup />
|
||||
<SecondSheet v-if="radio === '三维图'">
|
||||
<MyEchart :options='options' v-if='options'></MyEchart>
|
||||
</SecondSheet>
|
||||
@@ -260,8 +260,8 @@ defineExpose({ search })
|
||||
<style lang='scss'>
|
||||
.switch-tab {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
top: 4px;
|
||||
right: 345px;
|
||||
top: -37px;
|
||||
z-index: 11;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -169,7 +169,7 @@ const initOptions = () => {
|
||||
options.value = {
|
||||
legend: {
|
||||
data: ['越限事件', '未越限事件', '不确定事件'],
|
||||
left: '10px'
|
||||
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function (a: any) {
|
||||
|
||||
@@ -80,7 +80,7 @@ import AreaCascard from '@/components/form/areaCascard/index.vue'
|
||||
import { uploadFile, deleteFile } from '@/api/system-boot/file'
|
||||
import { addSgUser, updateSgUser } from '@/api/advance-boot/sgGroven/sgUser'
|
||||
import IncomingTable from './IncomingTable.vue'
|
||||
import { fullUrl } from '@/utils/common'
|
||||
import { getFileUrl } from '@/api/system-boot/file'
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('')
|
||||
@@ -137,7 +137,9 @@ const open = (text: string, data?: anyObj) => {
|
||||
form.addr = data.addr.split('/')
|
||||
form.keyUser = String(data.keyUser)
|
||||
if (form.userLogo) {
|
||||
userLogo.url = fullUrl(form.userLogo)
|
||||
getFileUrl({filePath:form.userLogo}).then(res=>{
|
||||
userLogo.url=res.data
|
||||
})
|
||||
// 图片的name我不知道
|
||||
}
|
||||
//待子组件渲染完毕
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div class="custom-table-header">
|
||||
<div class="title">接口权限列表</div>
|
||||
<el-input v-model="tableStore.table.params.searchValue" style="width: 240px" placeholder="请输入菜单名称"
|
||||
<el-input v-model="tableStore.table.params.searchValue" style="width: 240px" placeholder="请输入关键字"
|
||||
class="ml10" clearable @input="search" />
|
||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10" :disabled="!props.id">新增</el-button>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<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="请输入角色编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="角色描述">
|
||||
<el-input v-model="form.remark" :rows="2" type="textarea" placeholder="请输入描述" />
|
||||
|
||||
@@ -25,14 +25,15 @@ export default defineConfig({
|
||||
'/api': {
|
||||
// target: 'http://10.95.53.49:10215', //海南服务器ip
|
||||
// target: 'http://10.118.135.128:10215', ///hsw
|
||||
target: 'http://192.168.1.29:10215', ///hsw
|
||||
target: 'http://192.168.1.67:10215', ///hsw
|
||||
// target: 'http://192.168.1.68:10215', ///hsw
|
||||
// target: 'http://10.119.65.152:10215', //数据中心
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
|
||||
},
|
||||
'/api-docx': {
|
||||
// 文件服务器地址
|
||||
target: 'http://192.168.1.22:9009',
|
||||
target: 'http://192.168.1.68:9009',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api-docx/, '')
|
||||
},
|
||||
@@ -52,3 +53,4 @@ export default defineConfig({
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user