联调 承载能力评估
This commit is contained in:
34
src/api/advance-boot/bearingCapacity.ts
Normal file
34
src/api/advance-boot/bearingCapacity.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
//承载能力评估用户新增
|
||||
export function addUse(data) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/carrycapacityuser/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//承载能力评估用户编辑
|
||||
export function updateUse(data) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/carrycapacityuser/update',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//承载能力评估用户批量删除
|
||||
export function removeUse(data) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/carrycapacityuser/remove',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//承载能力评估-台账树
|
||||
export function carryCapacityTree() {
|
||||
return createAxios({
|
||||
url: '/advance-boot/carrycapacity/carryCapacityTree',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
@@ -30,10 +30,3 @@ export function analyseWave(params:string) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// // 123
|
||||
// export function queyDetailUser(params:string) {
|
||||
// return createAxios({
|
||||
// url: '/cs-harmonic-boot/event/analyseWave?eventId=' + params,
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
|
||||
54
src/components/tree/pqs/loadBearingTree.vue
Normal file
54
src/components/tree/pqs/loadBearingTree.vue
Normal file
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div class="point-tree">
|
||||
<div style="flex: 1; overflow: hidden">
|
||||
<Tree ref="treeRef" :data="tree" style="width: 100%; height: 100%" :canExpand="false" v-bind="$attrs" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||
import Tree from '../index.vue'
|
||||
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { carryCapacityTree } from '@/api/advance-boot/bearingCapacity'
|
||||
import { useConfig } from '@/stores/config'
|
||||
|
||||
defineOptions({
|
||||
name: 'pms/pointTree'
|
||||
})
|
||||
const emit = defineEmits(['init'])
|
||||
const attrs = useAttrs()
|
||||
|
||||
const dictData = useDictData()
|
||||
const config = useConfig()
|
||||
const tree = ref()
|
||||
const treeRef = ref()
|
||||
|
||||
const loadData = () => {
|
||||
let nodeKey = ''
|
||||
carryCapacityTree().then(res => {
|
||||
console.log(res)
|
||||
nodeKey = res.data[0].children[0].children[0].children[0].children[0].children[0].id
|
||||
emit('init', res.data[0].children[0].children[0].children[0].children[0].children[0])
|
||||
tree.value = res.data
|
||||
if (nodeKey) {
|
||||
nextTick(() => {
|
||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
loadData()
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.point-tree {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
border: 1px solid var(--el-border-color);
|
||||
}
|
||||
</style>
|
||||
@@ -55,9 +55,6 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
||||
// 请求拦截
|
||||
Axios.interceptors.request.use(
|
||||
config => {
|
||||
|
||||
|
||||
|
||||
// 取消重复请求
|
||||
removePending(config)
|
||||
options.CancelDuplicateRequest && addPending(config)
|
||||
@@ -77,10 +74,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
||||
config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw=='
|
||||
}
|
||||
}
|
||||
if(config.url?.substring(0, 4)=='/hzj'){
|
||||
config.url=config.url?.slice(4)
|
||||
config.baseURL='/hzj'
|
||||
}
|
||||
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import PointTree from '@/components/tree/pms/pointTree.vue'
|
||||
import PointTree from '@/components/tree/pqs/loadBearingTree.vue'
|
||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { text } from './text'
|
||||
import { text } from '../text'
|
||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
@@ -78,9 +78,9 @@ import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import policy from './policy.vue'
|
||||
import photovoltaic from './photovoltaic.vue'
|
||||
import charge from './charge.vue'
|
||||
import policy from './components/policy.vue'
|
||||
import photovoltaic from './components/photovoltaic.vue'
|
||||
import charge from './components/charge.vue'
|
||||
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
@@ -123,7 +123,7 @@ const rules = {
|
||||
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/advance-boot/process/querySagEventsPage',
|
||||
url: '/advance-boot/carrycapacity/queryCarryCapacityData',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
@@ -198,6 +198,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.userId = dictData.state.area[0].id
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
|
||||
@@ -4,31 +4,32 @@
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="用户类型">
|
||||
<el-input
|
||||
<el-select
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
collapse-tagsplaceholder="请选择用户类型"
|
||||
>
|
||||
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<el-dialog v-model="dialogVisible" :title="title" width="600" :before-close="handleClose">
|
||||
<el-form ref="ruleFormRef" :model="form" label-width="auto" :disabled="disabled" :rules="rules">
|
||||
<el-form-item label="用户名称:" prop="name">
|
||||
<el-input v-model="form.name" clearable placeholder="请输入用户名称" />
|
||||
<el-form-item label="用户名称:" prop="userName">
|
||||
<el-input v-model="form.userName" clearable placeholder="请输入用户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户类型:" prop="userType">
|
||||
<el-select v-model="form.userType" clearable collapse-tagsplaceholder="请选择用户类型">
|
||||
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电压等级:" prop="level">
|
||||
<el-select v-model="form.level" clearable collapse-tags placeholder="请选择电压等级">
|
||||
<el-form-item label="电压等级:" prop="voltage">
|
||||
<el-select v-model="form.voltage" clearable collapse-tags placeholder="请选择电压等级">
|
||||
<el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -71,6 +72,7 @@ import Area from '@/components/form/area/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||
defineOptions({
|
||||
name: 'estimate/userManagement'
|
||||
})
|
||||
@@ -82,40 +84,34 @@ const disabled = ref(false)
|
||||
const TableHeaderRef = ref()
|
||||
const title = ref('')
|
||||
interface RuleForm {
|
||||
name: string
|
||||
level: string
|
||||
deptIndex: string
|
||||
area: string
|
||||
city: string
|
||||
province: string
|
||||
region: string
|
||||
userName: string
|
||||
userType: string
|
||||
type: string
|
||||
mav1: string
|
||||
mav2: string
|
||||
user: string
|
||||
time: string
|
||||
detailed: string
|
||||
voltage: string
|
||||
}
|
||||
const form = ref<RuleForm>({
|
||||
name: '',
|
||||
level: '',
|
||||
deptIndex: dictData.state.area[0].id,
|
||||
userType: '光伏电站',
|
||||
type: '光伏电站',
|
||||
mav1: '100',
|
||||
mav2: '100',
|
||||
user: 'Admin',
|
||||
time: '2024-01-03',
|
||||
detailed: '详细地址'
|
||||
area: '',
|
||||
city: '',
|
||||
province: '',
|
||||
region: '',
|
||||
userName: '',
|
||||
userType: '',
|
||||
voltage: ''
|
||||
})
|
||||
const rules = {
|
||||
name: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
||||
userName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
||||
userType: [{ required: true, message: '请选择用户类型', trigger: 'change' }],
|
||||
level: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
||||
voltage: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
||||
mav1: [{ required: true, message: '请输入用户协议容量', trigger: 'blur' }],
|
||||
mav2: [{ required: true, message: '请输入拟接入容量', trigger: 'blur' }],
|
||||
detailed: [{ required: true, message: '请输入详细地址', trigger: 'blur' }]
|
||||
}
|
||||
const ruleFormRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/hzj/carrycapacityuser/queyDetailUser',
|
||||
url: '/advance-boot/carrycapacityuser/queyDetailUser',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox' },
|
||||
@@ -186,7 +182,9 @@ const tableStore = new TableStore({
|
||||
title: '确定删除?'
|
||||
},
|
||||
click: row => {
|
||||
|
||||
removeUse({ userIds: row.id }).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -196,6 +194,7 @@ const tableStore = new TableStore({
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
id: '123',
|
||||
name: '光伏电站用户1',
|
||||
type: '光伏电站',
|
||||
Area: '中国',
|
||||
@@ -209,29 +208,8 @@ const tableStore = new TableStore({
|
||||
]
|
||||
}
|
||||
})
|
||||
// "area": "",
|
||||
// "city": "",
|
||||
// "endTime": "",
|
||||
// "pageNum": {},
|
||||
// "pageSize": {},
|
||||
// "protocolCapacity": 0,
|
||||
// "province": "",
|
||||
// "region": "",
|
||||
// "startTime": "",
|
||||
// "userId": "",
|
||||
// "userName": "",
|
||||
// "userType": "",
|
||||
// "voltage": ""
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.area = ''
|
||||
tableStore.table.params.city = ''
|
||||
tableStore.table.params.protocolCapacity = 0
|
||||
tableStore.table.params.province = ''
|
||||
tableStore.table.params.region = ''
|
||||
tableStore.table.params.userId = ''
|
||||
tableStore.table.params.userName = ''
|
||||
tableStore.table.params.userType = ''
|
||||
tableStore.table.params.voltage = ''
|
||||
|
||||
// tableStore.table.params.searchValue = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
@@ -250,7 +228,13 @@ const onSubmit = () => {
|
||||
ruleFormRef.value.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
if (title.value == '新增承载能力预评估用户') {
|
||||
addUse(form.value).then(res => {
|
||||
tableStore.index()
|
||||
})
|
||||
} else if (title.value == '编辑承载能力预评估用户') {
|
||||
updateUse(form.value).then(res => {
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1430,7 +1430,7 @@ defineOptions({
|
||||
name: 'device-boot/deviceter'
|
||||
})
|
||||
import { LocationInformation } from '@element-plus/icons-vue'
|
||||
import Terminal from '@/components/tree/pms/Terminal.vue'
|
||||
import Terminal from '@/components/tree/pqs/Terminal.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { areaTree } from '@/api/system-boot/dicData'
|
||||
import { queryTerminal, nodeAllList, delTerminal, updateTerminal, addTerminal } from '@/api/device-boot/Business.ts'
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
import { defineOptions, watch, onMounted, ref, nextTick } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import PointTree from '@/components/tree/pms/pointTree.vue'
|
||||
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import Wentaizonghepinggu from './wentaizonghepinggu/index.vue'
|
||||
|
||||
@@ -13,7 +13,14 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- "area": "",
|
||||
"city": "",
|
||||
"protocolCapacity": 0,
|
||||
"province": "",
|
||||
"region": "",
|
||||
"userName": "",
|
||||
"userType": "",
|
||||
"voltage": "" -->
|
||||
<script setup lang="ts">
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
<template>
|
||||
<splitpanes style='height: 100%;' class='default-theme' id='navigation-splitpanes'>
|
||||
<pane :size='size'>
|
||||
<PointTree :default-expand-all='false'
|
||||
:default-expanded-keys='monitoringPoint.state.lineId?[monitoringPoint.state.lineId]:[]'
|
||||
:current-node-key='monitoringPoint.state.lineId'
|
||||
@node-click='handleNodeClick'
|
||||
@init='handleNodeClick'
|
||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||
<pane :size="size">
|
||||
<PointTree
|
||||
:default-expand-all="false"
|
||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||
:current-node-key="monitoringPoint.state.lineId"
|
||||
@node-click="handleNodeClick"
|
||||
@init="handleNodeClick"
|
||||
></PointTree>
|
||||
</pane>
|
||||
<pane>
|
||||
<Map v-bind='$attrs'></Map>
|
||||
<Map v-bind="$attrs"></Map>
|
||||
</pane>
|
||||
</splitpanes>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import PointTree from '@/components/tree/pms/pointTree.vue'
|
||||
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
||||
import Map from './map.vue'
|
||||
import Tree from '@/components/tree/index.vue'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
@@ -27,7 +28,7 @@ const size = ref(0)
|
||||
onMounted(() => {
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
if (dom) {
|
||||
size.value = Math.round(280 / dom.offsetHeight * 100)
|
||||
size.value = Math.round((280 / dom.offsetHeight) * 100)
|
||||
}
|
||||
})
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
@@ -36,7 +37,7 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.splitpanes.default-theme .splitpanes__pane {
|
||||
background: #eaeef1;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ import { onMounted, ref, provide } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import PointTree from '@/components/tree/pms/pointTree.vue'
|
||||
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { getLineExport, getList, selectReleation } from '@/api/event-boot/report'
|
||||
@@ -151,7 +151,6 @@ const dotList: any = ref({
|
||||
level: 6
|
||||
})
|
||||
|
||||
|
||||
const formd: any = ref({
|
||||
xq: false,
|
||||
lb: false,
|
||||
@@ -170,7 +169,6 @@ const formd: any = ref({
|
||||
type: 0
|
||||
})
|
||||
|
||||
|
||||
const templatePolicy: any = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '',
|
||||
|
||||
@@ -11,7 +11,8 @@ export default defineConfig({
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://192.168.1.81:10215', //数据中心
|
||||
// target: 'http://192.168.1.81:10215', //数据中心
|
||||
target: 'http://192.168.1.31:10215', //数据中心
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, '') //路径重写,把'/api'替换为''
|
||||
},
|
||||
@@ -19,11 +20,7 @@ export default defineConfig({
|
||||
target: 'http://192.168.1.81:8088', //数据中心
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/hzj': {
|
||||
target: 'http://550fa81d.nat123.fun', //黄正剑
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/hzj/, '')
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user