udpate
commit
5663bbbbd4
|
@ -29,5 +29,14 @@ export function running_api(data: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 车网的能量调节指令接口
|
||||||
|
export function ajustInfo_api(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/api_car/wwpm/ev-data/v1/ctrl/command",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,16 +8,27 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="source_tree">
|
<div class="source_tree">
|
||||||
<div class="tree">
|
<div class="tree">
|
||||||
<el-tree ref="targetTreeRef" :data="treeData" node-key="id" :props="targetProps" :default-expanded-keys="['tongxiang']" lazy :load="loadNode" @node-click="handleTargetInfo"></el-tree>
|
<el-tree
|
||||||
|
ref="targetTreeRef"
|
||||||
|
:data="treeData"
|
||||||
|
node-key="id"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
empty-text="数据读取中..."
|
||||||
|
:props="targetProps"
|
||||||
|
:default-expanded-keys="['tongxiang']"
|
||||||
|
lazy
|
||||||
|
:load="loadNode"
|
||||||
|
@node-click="handleTargetInfo"
|
||||||
|
></el-tree>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { ElTree } from 'element-plus'
|
import { ElTree } from "element-plus";
|
||||||
import treeDatas from '@/assets/json/tree-right2.json'
|
import treeDatas from "@/assets/json/tree-right2.json";
|
||||||
import { treeT, treeSecond, carTree_api } from '@/api/ajust/tree'
|
import { treeT, treeSecond, carTree_api } from "@/api/ajust/tree";
|
||||||
|
|
||||||
// defineProps<{
|
// defineProps<{
|
||||||
// elec_list: EList[]
|
// elec_list: EList[]
|
||||||
|
@ -29,55 +40,55 @@ import { treeT, treeSecond, carTree_api } from '@/api/ajust/tree'
|
||||||
|
|
||||||
// idflag样式
|
// idflag样式
|
||||||
// let idFlag = ref<number>(1)
|
// let idFlag = ref<number>(1)
|
||||||
const label_falg = ref<number>(1)
|
const label_falg = ref<number>(1);
|
||||||
//通过判断(源网荷储的小标题)的labelFlag值调不同的树数据
|
//通过判断(源网荷储的小标题)的labelFlag值调不同的树数据
|
||||||
const labelFlag = (id: number) => {
|
const labelFlag = (id: number) => {
|
||||||
label_falg.value = id
|
label_falg.value = id;
|
||||||
if (id == 1) {
|
if (id == 1) {
|
||||||
} else if (id == 2) {
|
} else if (id == 2) {
|
||||||
} else if (id == 3) {
|
} else if (id == 3) {
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// el-tree相关配置
|
// el-tree相关配置
|
||||||
// 默认展开节点id
|
// 默认展开节点id
|
||||||
// let defaultExpanded = ref<string[]>(['tongxiang'])
|
// let defaultExpanded = ref<string[]>(['tongxiang'])
|
||||||
// 默认展开指定数据
|
// 默认展开指定数据
|
||||||
// label childern等数据的配置
|
// label childern等数据的配置
|
||||||
const targetProps = {
|
const targetProps = {
|
||||||
children: 'children',
|
children: "children",
|
||||||
label: 'name',
|
label: "name",
|
||||||
isLeaf: 'leaf'
|
isLeaf: "leaf",
|
||||||
}
|
};
|
||||||
// tree数据处理
|
// tree数据处理
|
||||||
interface Tree {
|
interface Tree {
|
||||||
baseVoltageMrid?: string
|
baseVoltageMrid?: string;
|
||||||
name?: string
|
name?: string;
|
||||||
leaf?: boolean
|
leaf?: boolean;
|
||||||
children?: Tree[]
|
children?: Tree[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// json数据
|
// json数据
|
||||||
interface TreeData {
|
interface TreeData {
|
||||||
name: string
|
name: string;
|
||||||
key?: string
|
key?: string;
|
||||||
leaf?: boolean
|
leaf?: boolean;
|
||||||
children?: TreeData[]
|
children?: TreeData[];
|
||||||
[otherProps: string]: any
|
[otherProps: string]: any;
|
||||||
}
|
}
|
||||||
let treeDate = ref<Tree[]>([
|
let treeDate = ref<Tree[]>([
|
||||||
{
|
{
|
||||||
baseVoltageMrid: '',
|
baseVoltageMrid: "",
|
||||||
name: '',
|
name: "",
|
||||||
children: []
|
children: [],
|
||||||
}
|
},
|
||||||
])
|
]);
|
||||||
|
|
||||||
// 判断是否有该节点
|
// 判断是否有该节点
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// initTreeAPI();
|
// initTreeAPI();
|
||||||
})
|
});
|
||||||
let treeData = ref<any>([])
|
let treeData = ref<any>([]);
|
||||||
// let initTreeDate: any = [];
|
// let initTreeDate: any = [];
|
||||||
// // 初始化设备树的层级
|
// // 初始化设备树的层级
|
||||||
// const initTreeAPI = async () => {
|
// const initTreeAPI = async () => {
|
||||||
|
@ -91,15 +102,15 @@ let treeData = ref<any>([])
|
||||||
const loadNode = async (node: any, resolve: any) => {
|
const loadNode = async (node: any, resolve: any) => {
|
||||||
//默认加载的节点
|
//默认加载的节点
|
||||||
if (node.level === 0) {
|
if (node.level === 0) {
|
||||||
let treeData = []
|
let treeData = [];
|
||||||
let result = await carTree_api({
|
let result = await carTree_api({
|
||||||
orgID: '8af8470a47aad8e20147aad92e400335'
|
orgID: "8af8470a47aad8e20147aad92e400335",
|
||||||
})
|
});
|
||||||
treeData = result.data
|
treeData = result.data;
|
||||||
resolve(treeData)
|
resolve(treeData);
|
||||||
} else if (node.level > 0 && node.level < 4) {
|
} else if (node.level > 0 && node.level < 4) {
|
||||||
//默认展开的层级,需要默认几层就判断一下.
|
//默认展开的层级,需要默认几层就判断一下.
|
||||||
resolve(node.data.children)
|
resolve(node.data.children);
|
||||||
} else if (node.level === 4) {
|
} else if (node.level === 4) {
|
||||||
// 利用设备中的信息调用接口
|
// 利用设备中的信息调用接口
|
||||||
// ---------
|
// ---------
|
||||||
|
@ -107,58 +118,58 @@ const loadNode = async (node: any, resolve: any) => {
|
||||||
// ---------
|
// ---------
|
||||||
//懒加载
|
//懒加载
|
||||||
let res = await treeSecond({
|
let res = await treeSecond({
|
||||||
orgID: '8af8470a47aad8e20147aad92e400335',
|
orgID: "8af8470a47aad8e20147aad92e400335",
|
||||||
transformId: node.key
|
transformId: node.key,
|
||||||
})
|
});
|
||||||
if (res.data.energySupplyStation.length || res.data.dwellerPile.length) {
|
if (res.data.energySupplyStation.length || res.data.dwellerPile.length) {
|
||||||
let datanames = []
|
let datanames = [];
|
||||||
|
|
||||||
if (res.data.energySupplyStation.length) {
|
if (res.data.energySupplyStation.length) {
|
||||||
datanames.push({
|
datanames.push({
|
||||||
name: `充电站(${res.data.energySupplyStation.length})`,
|
name: `充电站(${res.data.energySupplyStation.length})`,
|
||||||
id: 'chongdianzhan'
|
id: "chongdianzhan",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.data.dwellerPile.length) {
|
if (res.data.dwellerPile.length) {
|
||||||
datanames.push({
|
datanames.push({
|
||||||
name: `居民充电桩(${res.data.dwellerPile.length})`,
|
name: `居民充电桩(${res.data.dwellerPile.length})`,
|
||||||
id: 'chongdianzhuang'
|
id: "chongdianzhuang",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
resolve(datanames)
|
resolve(datanames);
|
||||||
} else {
|
} else {
|
||||||
resolve([{ name: '暂无数据', leaf: true }])
|
resolve([{ name: "暂无数据", leaf: true }]);
|
||||||
console.log(res) //需要将上一级的加号去掉
|
console.log(res); //需要将上一级的加号去掉
|
||||||
}
|
}
|
||||||
} else if (node.level === 5) {
|
} else if (node.level === 5) {
|
||||||
//懒加载
|
//懒加载
|
||||||
let res = await treeSecond({
|
let res = await treeSecond({
|
||||||
orgID: '8af8470a47aad8e20147aad92e400335',
|
orgID: "8af8470a47aad8e20147aad92e400335",
|
||||||
transformId: node.parent.key
|
transformId: node.parent.key,
|
||||||
// transformId: "ed7d892d4f8af8514b6dc01fde016ded55e58",
|
// transformId: "ed7d892d4f8af8514b6dc01fde016ded55e58",
|
||||||
})
|
});
|
||||||
|
|
||||||
if (node.key === 'chongdianzhan') {
|
if (node.key === "chongdianzhan") {
|
||||||
if (res.data.energySupplyStation.length) {
|
if (res.data.energySupplyStation.length) {
|
||||||
resolve(
|
resolve(
|
||||||
res.data.energySupplyStation.map(item => ({
|
res.data.energySupplyStation.map((item) => ({
|
||||||
id: item.mrid,
|
id: item.mrid,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: item.type
|
type: item.type,
|
||||||
}))
|
}))
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (node.key === 'chongdianzhuang') {
|
if (node.key === "chongdianzhuang") {
|
||||||
if (res.data.dwellerPile.length) {
|
if (res.data.dwellerPile.length) {
|
||||||
resolve(
|
resolve(
|
||||||
res.data.dwellerPile.map(item => ({
|
res.data.dwellerPile.map((item) => ({
|
||||||
id: item.mrid,
|
id: item.mrid,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
type: item.type
|
type: item.type,
|
||||||
}))
|
}))
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,26 +181,26 @@ const loadNode = async (node: any, resolve: any) => {
|
||||||
// },
|
// },
|
||||||
// ]);
|
// ]);
|
||||||
} else {
|
} else {
|
||||||
resolve([{ name: '暂无数据', leaf: true }])
|
resolve([{ name: "暂无数据", leaf: true }]);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const emits = defineEmits(['update-node-key']) ////接收父组件的事件,子组件中触发父组件使用
|
const emits = defineEmits(["update-node-key"]); ////接收父组件的事件,子组件中触发父组件使用
|
||||||
|
|
||||||
// 点击树节点
|
// 点击树节点
|
||||||
// 处理选中target数据,最终得到由高层到底层的数组
|
// 处理选中target数据,最终得到由高层到底层的数组
|
||||||
const handleTargetInfo = (data: TreeData, node: any) => {
|
const handleTargetInfo = (data: TreeData, node: any) => {
|
||||||
console.log(node, 'node')
|
console.log(node, "node");
|
||||||
|
|
||||||
emits('update-node-key', node)
|
emits("update-node-key", node);
|
||||||
}
|
};
|
||||||
const handleTarget = (node: any) => {
|
const handleTarget = (node: any) => {
|
||||||
// 递归得到target结果数组
|
// 递归得到target结果数组
|
||||||
if (!node.parent) return
|
if (!node.parent) return;
|
||||||
|
|
||||||
// targetInfo.resultArr.unshift(node.data);
|
// targetInfo.resultArr.unshift(node.data);
|
||||||
// handleTarget(node.parent);
|
// handleTarget(node.parent);
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@function changeWidth($width) {
|
@function changeWidth($width) {
|
||||||
|
@ -313,9 +324,9 @@ const handleTarget = (node: any) => {
|
||||||
// el-input中图标设置大小
|
// el-input中图标设置大小
|
||||||
/* //有子节点 且未展开 */
|
/* //有子节点 且未展开 */
|
||||||
:deep(.el-tree .el-tree-node.is-focusable .el-tree-node__expand-icon:before) {
|
:deep(.el-tree .el-tree-node.is-focusable .el-tree-node__expand-icon:before) {
|
||||||
background: url('@/assets/images/tree/icon_off.png') no-repeat 0 3px;
|
background: url("@/assets/images/tree/icon_off.png") no-repeat 0 3px;
|
||||||
// background: url("@/assets/images/tree/icon_off.png") no-repeat 0 changeHeight(15);
|
// background: url("@/assets/images/tree/icon_off.png") no-repeat 0 changeHeight(15);
|
||||||
content: '';
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
// width: 80px;
|
// width: 80px;
|
||||||
// height: 80px;
|
// height: 80px;
|
||||||
|
@ -337,8 +348,8 @@ const handleTarget = (node: any) => {
|
||||||
|
|
||||||
/* //有子节点 且已展开 */
|
/* //有子节点 且已展开 */
|
||||||
:deep(.el-tree .is-expanded .el-tree-node__expand-icon.expanded:before) {
|
:deep(.el-tree .is-expanded .el-tree-node__expand-icon.expanded:before) {
|
||||||
background: url('@/assets/images/tree/icon_on.png') no-repeat 0 3px;
|
background: url("@/assets/images/tree/icon_on.png") no-repeat 0 3px;
|
||||||
content: '';
|
content: "";
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
// padding-right: 18px;
|
// padding-right: 18px;
|
||||||
|
@ -387,10 +398,18 @@ const handleTarget = (node: any) => {
|
||||||
:deep(.el-tree-node__content:hover) {
|
:deep(.el-tree-node__content:hover) {
|
||||||
// background-color: transparent;
|
// background-color: transparent;
|
||||||
|
|
||||||
background: linear-gradient(90deg, rgba(82, 127, 243, 0.2) 0%, rgba(48, 74, 141, 0) 100%);
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
rgba(82, 127, 243, 0.2) 0%,
|
||||||
|
rgba(48, 74, 141, 0) 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
|
:deep(
|
||||||
|
.el-tree--highlight-current
|
||||||
|
.el-tree-node.is-current
|
||||||
|
> .el-tree-node__content
|
||||||
|
) {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="source_list">
|
<div class="source_list">
|
||||||
<div class="table_box">
|
<div class="table_box">
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -151,10 +150,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="info3">
|
<div class="info3">
|
||||||
<!-- <rateLine_will :rateDate="rateDate_will"></rateLine_will> -->
|
|
||||||
<!-- -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="capAjust_box content_bg" v-else>
|
<div class="capAjust_box content_bg" v-else>
|
||||||
|
@ -169,21 +165,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="info11">
|
|
||||||
<div>
|
|
||||||
<div class="yuan"></div>
|
|
||||||
可调节裕度 (<span class="colorf">-30</span>~<span
|
|
||||||
class="colorf"
|
|
||||||
>50</span
|
|
||||||
>) kW
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
(<span class="colorf">2024-06-08 12:00</span>~<span
|
|
||||||
class="colorf"
|
|
||||||
>2024-06-08 12:00</span
|
|
||||||
>)
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="source_list">
|
<div class="source_list">
|
||||||
<div class="table_box">
|
<div class="table_box">
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -204,6 +185,13 @@
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="装机容量/额定功率" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<span style="margin-left: 10px">{{
|
||||||
|
scope.row.rated_s
|
||||||
|
}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -216,21 +204,10 @@
|
||||||
v-if="rateDate_curFlag"
|
v-if="rateDate_curFlag"
|
||||||
:key="refreshkey"
|
:key="refreshkey"
|
||||||
></rateLine>
|
></rateLine>
|
||||||
<!-- <rateLine
|
|
||||||
:rateDate="rateDate_cur"
|
|
||||||
|
|
||||||
v-if="keyechart"
|
|
||||||
|
|
||||||
></rateLine> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="infotitle_box">
|
<div class="infotitle_box">
|
||||||
<div class="infotitle_short">
|
<div class="infotitle_short">
|
||||||
<div class="bg"></div>
|
<div class="bg"></div>
|
||||||
<!-- <img
|
|
||||||
src="@/assets/images/common/title_yuanicon.png"
|
|
||||||
alt=""
|
|
||||||
class="yuan"
|
|
||||||
/> -->
|
|
||||||
<span>负载率预测</span>
|
<span>负载率预测</span>
|
||||||
<div class="btns">
|
<div class="btns">
|
||||||
<div class="btnbg fs35" @click="handleClickPC">策略配置</div>
|
<div class="btnbg fs35" @click="handleClickPC">策略配置</div>
|
||||||
|
@ -252,16 +229,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="infotitle_box">
|
|
||||||
<div class="infotitle_short">
|
|
||||||
<div class="yuan"></div>
|
|
||||||
<div class="line"></div>
|
|
||||||
</div>
|
|
||||||
<span>负载率预测</span>
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<div class="info3">
|
<div class="info3">
|
||||||
|
|
||||||
<rateLine_will
|
<rateLine_will
|
||||||
v-if="rateDate_willFlag"
|
v-if="rateDate_willFlag"
|
||||||
:rateDate="rateDate_will"
|
:rateDate="rateDate_will"
|
||||||
|
@ -961,7 +929,7 @@ const handleSaveDate = () => {
|
||||||
});
|
});
|
||||||
console.log(adjustTableData, "adjustTableData");
|
console.log(adjustTableData, "adjustTableData");
|
||||||
refreshkey.value += 1;
|
refreshkey.value += 1;
|
||||||
rateDate_will=[]
|
rateDate_will = [];
|
||||||
//保存后要进行负载率预测
|
//保存后要进行负载率预测
|
||||||
forceRateApi({
|
forceRateApi({
|
||||||
orgID: "8af8470a47aad8e20147aad92e400335",
|
orgID: "8af8470a47aad8e20147aad92e400335",
|
||||||
|
@ -970,7 +938,7 @@ const handleSaveDate = () => {
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, "1------------res");
|
console.log(res, "1------------res");
|
||||||
rateDate_will = res.data.result;
|
rateDate_will = res.data.result;
|
||||||
if(res.data.result.length>0){
|
if (res.data.result.length > 0) {
|
||||||
rateDate_willFlag.value = true;
|
rateDate_willFlag.value = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -71,7 +71,7 @@ const drawOneLine = (rateArr: RateDateInfo[]) => {
|
||||||
item.seriesName
|
item.seriesName
|
||||||
}:</div><div>${
|
}:</div><div>${
|
||||||
item.value === undefined ? "0" : item.value
|
item.value === undefined ? "0" : item.value
|
||||||
}kW</div></div>`;
|
}%</div></div>`;
|
||||||
});
|
});
|
||||||
return newStr;
|
return newStr;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -112,7 +112,12 @@
|
||||||
<div class="load_runstatus_box">
|
<div class="load_runstatus_box">
|
||||||
<div class="infotitle">
|
<div class="infotitle">
|
||||||
<span>充电桩运行状态</span>
|
<span>充电桩运行状态</span>
|
||||||
<div class="posbtn" @click="ajustCarPage">能量调节</div>
|
<div
|
||||||
|
:class="[btndownFlag === true ? '' : 'no_click', 'posbtn']"
|
||||||
|
@click="ajustCarPage"
|
||||||
|
>
|
||||||
|
能量调节
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list_box">
|
<div class="list_box">
|
||||||
<div class="box_d">
|
<div class="box_d">
|
||||||
|
@ -326,11 +331,13 @@
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="ajustCar" v-if="false"> -->
|
||||||
|
|
||||||
<div class="ajustCar" v-if="ajustCarPageFlag">
|
<div class="ajustCar" v-if="ajustCarPageFlag">
|
||||||
<div class="tip">
|
<div class="tip">
|
||||||
<img src="@/assets/images/mainPage/icon_title2.png" alt="" />
|
<img src="@/assets/images/mainPage/icon_title2.png" alt="" />
|
||||||
<span class="jianbian">能量调节</span>
|
<span class="jianbian fs45">能量调节</span>
|
||||||
<div class="closebtn" @click="adjustInfoFlag = false"></div>
|
<div class="closebtn" @click="ajustCarPageFlag = false"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<el-form
|
<el-form
|
||||||
|
@ -343,8 +350,9 @@
|
||||||
<!-- 添加表单项 -->
|
<!-- 添加表单项 -->
|
||||||
<el-form-item label="调节类型" prop="type">
|
<el-form-item label="调节类型" prop="type">
|
||||||
<el-select
|
<el-select
|
||||||
|
popper-class="customSelectAdjust"
|
||||||
v-model="formData.type"
|
v-model="formData.type"
|
||||||
placeholder="Select"
|
placeholder="类型"
|
||||||
size="large"
|
size="large"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
>
|
>
|
||||||
|
@ -359,7 +367,7 @@
|
||||||
<!-- <el-input v-model="form.password" type="password"></el-input> -->
|
<!-- <el-input v-model="form.password" type="password"></el-input> -->
|
||||||
<el-radio-group v-model="formData.whether" class="ml-4">
|
<el-radio-group v-model="formData.whether" class="ml-4">
|
||||||
<el-radio value="1" size="large">是</el-radio>
|
<el-radio value="1" size="large">是</el-radio>
|
||||||
<el-radio value="2" size="large">否</el-radio>
|
<el-radio value="0" size="large">否</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="调节值" prop="number">
|
<el-form-item label="调节值" prop="number">
|
||||||
|
@ -382,11 +390,20 @@
|
||||||
<span class="text-gray-500">-</span>
|
<span class="text-gray-500">-</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-time-picker
|
<!-- <el-time-picker
|
||||||
v-model="formData.start_time"
|
v-model="formData.start_time"
|
||||||
placeholder="Pick a time"
|
placeholder="Pick a time"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
|
-->
|
||||||
|
<el-time-select
|
||||||
|
v-model="formData.start_time"
|
||||||
|
style="width: 240px"
|
||||||
|
start="08:30"
|
||||||
|
step="00:15"
|
||||||
|
end="18:30"
|
||||||
|
placeholder="开始时间"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
@ -404,22 +421,23 @@
|
||||||
<span class="text-gray-500">-</span>
|
<span class="text-gray-500">-</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-time-picker
|
<el-time-select
|
||||||
v-model="formData.end_time"
|
v-model="formData.end_time"
|
||||||
placeholder="Pick a time"
|
style="width: 240px"
|
||||||
style="width: 100%"
|
start="08:30"
|
||||||
|
step="00:15"
|
||||||
|
end="18:30"
|
||||||
|
placeholder="结束时间"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 添加提交按钮 -->
|
<!-- 添加提交按钮 -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button type="primary"></el-button>
|
||||||
type="primary"
|
<el-button type="primary" @click="submitForm()"
|
||||||
@click="submitForm('formRef')"
|
|
||||||
></el-button>
|
|
||||||
<el-button type="primary" @click="submitForm('formRef')"
|
|
||||||
>下发指令</el-button
|
>下发指令</el-button
|
||||||
>
|
>
|
||||||
|
<!-- @click="submitForm('formRef')" -->
|
||||||
<!-- <el-button @click="resetForm('formRef')">清空</el-button> -->
|
<!-- <el-button @click="resetForm('formRef')">清空</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -450,10 +468,12 @@ import load_c_echart from "./load_c_echart.vue";
|
||||||
import load_info_echart from "./load_info_echart.vue";
|
import load_info_echart from "./load_info_echart.vue";
|
||||||
import cdz_echart from "./cdz_echart.vue";
|
import cdz_echart from "./cdz_echart.vue";
|
||||||
import carTree from "@/views/commonPage/carTree.vue";
|
import carTree from "@/views/commonPage/carTree.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
powerCurve_api,
|
powerCurve_api,
|
||||||
transformerOverloadCount_api,
|
transformerOverloadCount_api,
|
||||||
running_api,
|
running_api,
|
||||||
|
ajustInfo_api,
|
||||||
} from "@/api/carPage/index";
|
} from "@/api/carPage/index";
|
||||||
import {
|
import {
|
||||||
handleEchartsData,
|
handleEchartsData,
|
||||||
|
@ -463,6 +483,7 @@ import { usrzApi } from "@/api/Osp/svgApi";
|
||||||
import { start } from "repl";
|
import { start } from "repl";
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
send3D();
|
||||||
// 获取右侧数据
|
// 获取右侧数据
|
||||||
getPowerCurve_api();
|
getPowerCurve_api();
|
||||||
// 获取台区 重过载
|
// 获取台区 重过载
|
||||||
|
@ -470,6 +491,29 @@ onMounted(() => {
|
||||||
// 获取充电桩列表
|
// 获取充电桩列表
|
||||||
getRunning_api();
|
getRunning_api();
|
||||||
});
|
});
|
||||||
|
const send3D = () => {
|
||||||
|
// 显示城南位置
|
||||||
|
const list = {
|
||||||
|
location: "(X=-715146.324,Y=-1188697.616,Z=4422791.944)",
|
||||||
|
rotation: "Pitch=-83.545,Yaw=-91.394,Roll=0",
|
||||||
|
};
|
||||||
|
api_send("CameraMove", list, () => {
|
||||||
|
console.log("CameraMove");
|
||||||
|
});
|
||||||
|
// 显示城南边界线
|
||||||
|
const datadispaly = {
|
||||||
|
CityID: "12010",
|
||||||
|
status: "1", //0隐藏1显示
|
||||||
|
};
|
||||||
|
api_send("ShowCityEdge", datadispaly, () => {
|
||||||
|
console.log("ShowCityEdge显示城南边界线");
|
||||||
|
});
|
||||||
|
// 显示全部的充电站
|
||||||
|
const datadel = { status: "1" };
|
||||||
|
api_send("SelectChargingstation", datadel, () => {
|
||||||
|
console.log("SelectChargingstation,显示全部的变电站");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 设备树传的数据
|
// 设备树传的数据
|
||||||
let currentData = reactive<any>({});
|
let currentData = reactive<any>({});
|
||||||
|
@ -492,6 +536,12 @@ const getTreeKey = (treeKey: any) => {
|
||||||
// 获取充电桩列表
|
// 获取充电桩列表
|
||||||
getRunning_api();
|
getRunning_api();
|
||||||
}
|
}
|
||||||
|
// 控制调节按钮的可用不可用
|
||||||
|
if (currentData.type === "station") {
|
||||||
|
btndownFlag.value = true;
|
||||||
|
} else {
|
||||||
|
btndownFlag.value = false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 车网互动专题切换栏
|
// 车网互动专题切换栏
|
||||||
|
@ -570,25 +620,24 @@ const hideRight = ref<boolean>(true); //默认页面显示 右边
|
||||||
|
|
||||||
// 组件卸载调用
|
// 组件卸载调用
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
handleThree_out(); //清楚边界线和字体
|
||||||
hideLeft.value = false;
|
hideLeft.value = false;
|
||||||
hideRight.value = false;
|
hideRight.value = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 跳转三维
|
// 跳转三维
|
||||||
const handleThree = (val) => {
|
const handleThree_out = () => {
|
||||||
const list = {
|
// 隐藏城南边界线
|
||||||
location: "(X=18705617.163,Y=1826842.166,Z=4299675.505)",
|
const datadispaly = {
|
||||||
rotation: "Pitch=-89.9,Yaw=-90.542,Roll=0",
|
CityID: "12010",
|
||||||
|
status: "0", //0隐藏1显示
|
||||||
};
|
};
|
||||||
api_send("CameraMove", list, () => {
|
api_send("ShowCityEdge", datadispaly, () => {
|
||||||
console.log("CameraMove");
|
console.log("ShowCityEdge隐藏城南边界线");
|
||||||
});
|
});
|
||||||
let _list = {
|
// 隐藏全部的充电站
|
||||||
CityID: val,
|
const datadel = { status: "0" };
|
||||||
status: "1",
|
api_send("SelectChargingstation", datadel, () => {
|
||||||
};
|
console.log("SelectChargingstation,隐藏全部的充电站");
|
||||||
api_send("ShowCityEdge", _list, () => {
|
|
||||||
console.log("ShowCityEdge");
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -619,6 +668,7 @@ let getPowerCurve_api = () => {
|
||||||
// 空的 请求全部
|
// 空的 请求全部
|
||||||
} else if (currentData.type === "station") {
|
} else if (currentData.type === "station") {
|
||||||
// 站
|
// 站
|
||||||
|
|
||||||
setData.stationId = currentData.id;
|
setData.stationId = currentData.id;
|
||||||
} else if (currentData.type === "dewellerpipe" && currentLevel.value === 6) {
|
} else if (currentData.type === "dewellerpipe" && currentLevel.value === 6) {
|
||||||
// 桩用户充电桩
|
// 桩用户充电桩
|
||||||
|
@ -636,7 +686,7 @@ let getPowerCurve_api = () => {
|
||||||
item.measValue = item.p;
|
item.measValue = item.p;
|
||||||
});
|
});
|
||||||
|
|
||||||
let result = handleEchartsData(res.data, 60);
|
let result = handleEchartsData(res.data, 15);
|
||||||
carRightData.echartsData = result;
|
carRightData.echartsData = result;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -646,7 +696,7 @@ let getPowerCurve_api = () => {
|
||||||
item.datetime = item.dateTime;
|
item.datetime = item.dateTime;
|
||||||
});
|
});
|
||||||
|
|
||||||
let result = handleEchartsData(res.data, 60);
|
let result = handleEchartsData(res.data, 15);
|
||||||
|
|
||||||
carRightData.echartsData = result;
|
carRightData.echartsData = result;
|
||||||
});
|
});
|
||||||
|
@ -697,13 +747,49 @@ let formData = ref({
|
||||||
end_date: "",
|
end_date: "",
|
||||||
end_time: "",
|
end_time: "",
|
||||||
});
|
});
|
||||||
|
// let newcarAjustDate = reactive<any>([]);
|
||||||
|
// newcarAjustDate.push(formData);
|
||||||
|
const handledata_time = (data_s: any, time_s: any) => {
|
||||||
|
const date = new Date(data_s);
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||||
|
const day = String(date.getDate()).padStart(2, "0");
|
||||||
|
const formattedDate = `${year}-${month}-${day}`;
|
||||||
|
return `${formattedDate} ${time_s}`;
|
||||||
|
};
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
console.log(formData, "1--------------formData");
|
console.log(formData, "1--------------formData");
|
||||||
|
// let dataNew
|
||||||
|
let datat_start = handledata_time(
|
||||||
|
formData.value.start_date,
|
||||||
|
formData.value.start_time
|
||||||
|
);
|
||||||
|
let datat_end = handledata_time(
|
||||||
|
formData.value.end_date,
|
||||||
|
formData.value.end_time
|
||||||
|
);
|
||||||
|
// console.log(datat_start,datat_end,"3---------");
|
||||||
|
let datainput = {
|
||||||
|
chargingStationID: currentData.id,
|
||||||
|
type: parseInt(formData.value.type),
|
||||||
|
isForce: parseInt(formData.value.whether),
|
||||||
|
targetValue: parseInt(formData.value.number),
|
||||||
|
startTime: datat_start,
|
||||||
|
endTime: datat_end,
|
||||||
|
};
|
||||||
|
|
||||||
|
ajustInfo_api(datainput).then((res: any) => {
|
||||||
|
console.log(res, "1-------car");
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//进入调节
|
//进入调节
|
||||||
let ajustCarPageFlag = ref(true);
|
let ajustCarPageFlag = ref(false);
|
||||||
|
let btndownFlag = ref(false);
|
||||||
const ajustCarPage = () => {
|
const ajustCarPage = () => {
|
||||||
ajustCarPageFlag.value = true;
|
if (currentData.type === "station") {
|
||||||
|
ajustCarPageFlag.value = true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 根据不同的屏幕宽度换算字体大小
|
// 根据不同的屏幕宽度换算字体大小
|
||||||
|
@ -847,6 +933,10 @@ const styleVar = computed(() => {
|
||||||
background: url("@/assets/images/btnType/send_btn.png") no-repeat;
|
background: url("@/assets/images/btnType/send_btn.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
.no_click {
|
||||||
|
color: #ccc;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.infotitle_short {
|
.infotitle_short {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -1886,7 +1976,7 @@ const styleVar = computed(() => {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: changeHeight(45);
|
height: changeHeight(55);
|
||||||
margin-right: changeHeight(14);
|
margin-right: changeHeight(14);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1918,9 +2008,7 @@ const styleVar = computed(() => {
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid pink;
|
|
||||||
:deep(.el-form) {
|
:deep(.el-form) {
|
||||||
border: 1px solid red;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// label标签
|
// label标签
|
||||||
.el-form-item__label {
|
.el-form-item__label {
|
||||||
|
@ -1939,22 +2027,54 @@ const styleVar = computed(() => {
|
||||||
width: changeHeight(300) !important;
|
width: changeHeight(300) !important;
|
||||||
height: changeHeight(80) !important;
|
height: changeHeight(80) !important;
|
||||||
}
|
}
|
||||||
|
.el-select__wrapper {
|
||||||
|
width: changeHeight(350) !important;
|
||||||
|
height: changeHeight(80) !important;
|
||||||
|
padding-top: 1%;
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
// .el-select,
|
||||||
.el-input__inner {
|
.el-input__inner {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
height: changeHeight(50) !important;
|
||||||
|
line-height: changeHeight(50) !important;
|
||||||
.el-select__placeholder{
|
|
||||||
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
.el-radio__label{
|
|
||||||
color: #fff !important;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-select__placeholder {
|
||||||
|
color: #fff !important;
|
||||||
|
height: changeHeight(50) !important;
|
||||||
|
line-height: changeHeight(50) !important;
|
||||||
|
font-size: changeHeight(35) !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-radio__label {
|
||||||
|
color: #fff !important;
|
||||||
|
font-size: changeHeight(35) !important;
|
||||||
|
}
|
||||||
|
.el-select__popper {
|
||||||
|
width: changeHeight(500) !important;
|
||||||
|
height: changeHeight(200) !important;
|
||||||
|
line-height: changeHeight(200) !important;
|
||||||
|
|
||||||
|
font-size: changeHeight(35) !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.el-select-dropdown__list {
|
||||||
|
width: changeHeight(500) !important;
|
||||||
|
height: changeHeight(200) !important;
|
||||||
|
}
|
||||||
|
// .el-select__selected-item .el-select__placeholder,.el-select__selected-item .el-select__placeholder.is-transparent{
|
||||||
|
// height: changeHeight(80) !important;
|
||||||
|
|
||||||
|
// }
|
||||||
// 按钮
|
// 按钮
|
||||||
.el-button {
|
.el-button {
|
||||||
width: changeHeight(250);
|
width: changeHeight(250);
|
||||||
height: changeHeight(80);
|
height: changeHeight(80);
|
||||||
|
font-size: changeHeight(35) !important;
|
||||||
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
.el-button:nth-child(1) {
|
.el-button:nth-child(1) {
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
|
@ -1962,12 +2082,16 @@ const styleVar = computed(() => {
|
||||||
}
|
}
|
||||||
.el-button:nth-child(2) {
|
.el-button:nth-child(2) {
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
margin-left: changeHeight(180);
|
margin-left: 34%;
|
||||||
|
width: changeHeight(250);
|
||||||
|
height: changeHeight(80);
|
||||||
|
background: url("@/assets/images/btnType/send_btn.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
// 没一行
|
// 没一行
|
||||||
.el-form-item{
|
.el-form-item {
|
||||||
height: changeHeight(80) !important;
|
height: changeHeight(80) !important;
|
||||||
margin-bottom:changeHeight(50) !important;
|
margin-bottom: changeHeight(30) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default defineConfig({
|
||||||
// only https
|
// only https
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
"/api/api-svg": {
|
"/api-svg": {
|
||||||
// target: "http://192.168.18.106:8080",
|
// target: "http://192.168.18.106:8080",
|
||||||
target: "http://127.0.0.1:19081",
|
target: "http://127.0.0.1:19081",
|
||||||
// 天津地址
|
// 天津地址
|
||||||
|
@ -112,6 +112,17 @@ export default defineConfig({
|
||||||
// only https
|
// only https
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
|
"/api_car": {
|
||||||
|
// target: "http://192.168.18.106:8080",
|
||||||
|
target: "http://127.0.0.1:16091",
|
||||||
|
// 天津地址
|
||||||
|
// target:"http://192.168.5.102:18801",
|
||||||
|
changeOrigin: true,
|
||||||
|
ws: true,
|
||||||
|
rewrite: (path: string) => path.replace(new RegExp(`^/api-svg`), ""),
|
||||||
|
// only https
|
||||||
|
secure: false,
|
||||||
|
},
|
||||||
// "/ba-api": {
|
// "/ba-api": {
|
||||||
// // target: "http://localhost:8080",
|
// // target: "http://localhost:8080",
|
||||||
// // 桐乡地址
|
// // 桐乡地址
|
||||||
|
|
Loading…
Reference in New Issue