-
{{ currentHoverNumber }}%
-
-
-
-
{{ item.value?item.value:0 }}
-
-
+
diff --git a/web/src/components/Home/Pv.vue b/web/src/components/Home/Pv.vue
index ffafc4a..7503c8b 100644
--- a/web/src/components/Home/Pv.vue
+++ b/web/src/components/Home/Pv.vue
@@ -138,7 +138,7 @@ export default {
}
},
legend: {
- top: 20,
+ top: 10,
textStyle: {
color: '#fff'
}
@@ -147,7 +147,8 @@ export default {
left: '3%',
right: '4%',
bottom: '5%',
- containLabel: true
+ top: '32%',
+ // containLabel: true
},
xAxis: {
type: 'category',
@@ -165,7 +166,7 @@ export default {
lineStyle: { type: 'dashed', color: '#435463' }
},
axisLabel: {
- interval: 4,
+ // interval: 4,
color: '#fff',
fontSize:12
@@ -193,37 +194,4 @@ export default {
}
}
-.text_Cur {
- border-bottom: 1px solid transparent;
- border-top: 1px solid transparent;
- border-image: linear-gradient(to right, transparent, #1d8a7b, transparent) 1;
- padding: 0px 15px;
- font-size: 14px;
- margin: 3px 0px;
- height: 45px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- & > div:last-child {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: end;
- }
- .mark {
- font-size: 16px;
- margin-right: 2px;
- }
-
- background: linear-gradient(
- 90deg,
- rgba(0, 186, 173, 0.15) 0%,
- rgba(61, 254, 250, 0.15) 49.2%,
- rgba(61, 254, 250, 0) 100%
- );
- .d {
- margin-left: 1px;
- font-size: 12px;
- }
-}
diff --git a/web/src/components/Home/onLine.vue b/web/src/components/Home/onLine.vue
index 26e16c7..eeb1466 100644
--- a/web/src/components/Home/onLine.vue
+++ b/web/src/components/Home/onLine.vue
@@ -28,7 +28,7 @@ export default {
props: {
infoKey: {
type: String,
- default:''
+ default: ''
},
total: {
type: Object,
@@ -98,19 +98,18 @@ export default {
watch: {
total: {
- handler(newVal,oldVal) {
- if (newVal&&newVal!==oldVal) {
+ handler(newVal, oldVal) {
+ if (newVal && newVal !== oldVal) {
this.curList.forEach((item) => {
- item.value = newVal[item.key] || 0;
- });
+ item.value = newVal[item.key] || 0
+ })
}
},
immediate: true,
deep: true
}
},
- mounted() {
- },
+ mounted() {},
methods: {}
}
@@ -147,14 +146,13 @@ export default {
.content-left,
.content-right {
- width: calc((100% - 110px) / 2);
- // width: 40%;
+ width: 40%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
height: 100%;
- .item{
+ .item {
align-items: flex-start;
justify-content: center;
}
@@ -171,7 +169,7 @@ export default {
}
.online-icon {
- width: 110px;
+ width: 20%;
height: 130px;
background-image: url('@/assets/home/onLineIcon.png');
background-size: contain;
diff --git a/web/src/components/SearchBox.vue b/web/src/components/SearchBox.vue
index 80b0b74..4befc3f 100644
--- a/web/src/components/SearchBox.vue
+++ b/web/src/components/SearchBox.vue
@@ -333,7 +333,7 @@ input:-internal-autofill-selected {
justify-content: space-between;
align-items: center;
.button {
- margin-left: 10px;
+ // margin-left: 10px;
}
}
}
diff --git a/web/src/components/TreeTable.vue b/web/src/components/TreeTable.vue
index b1ae5bc..dbc4a82 100644
--- a/web/src/components/TreeTable.vue
+++ b/web/src/components/TreeTable.vue
@@ -10,7 +10,8 @@
:row-class-name="(record, index) => rowClassName(record, index)"
row-key="key"
size="middle"
- :row-selection="rowSelection"
+ :row-selection="newTableOpt.select
+ ?rowSelection:null"
:indent-size="30"
:check-strictly="false"
@resizeColumn="handleResizeColumn"
@@ -100,6 +101,7 @@ export default {
},
computed: {
rowSelection() {
+
const { selectedRowKeys } = this
return {
checkStrictly: this.tableOption.checkStrictly,
diff --git a/web/src/components/statisticalAnalysis/energyEchart.vue b/web/src/components/statisticalAnalysis/energyEchart.vue
index b7c199e..495d6cf 100644
--- a/web/src/components/statisticalAnalysis/energyEchart.vue
+++ b/web/src/components/statisticalAnalysis/energyEchart.vue
@@ -173,6 +173,7 @@ export default {
},
// 初始化柱状图
initBarCharts() {
+
this.chartOptions.forEach((option, index) => {
if (option.type === 'bar') {
const dom = this.$refs[`chartContainer${index}`]?.[0];
diff --git a/web/src/style/antd.scss b/web/src/style/antd.scss
index 189abcd..32f9f09 100644
--- a/web/src/style/antd.scss
+++ b/web/src/style/antd.scss
@@ -168,3 +168,38 @@ $page-border: #cad2dd;
color: #fff !important;
}
}
+
+// 添加统一布局的样式
+.text_Cur {
+ border-bottom: 1px solid transparent;
+ border-top: 1px solid transparent;
+ border-image: linear-gradient(to right, transparent, #1d8a7b, transparent) 1;
+ padding: 0px 15px;
+ font-size: 12px;
+ margin: 3px 0px;
+ height: 40px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ & > div:last-child {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: end;
+ }
+ .mark {
+ font-size: 16px;
+ margin-right: 2px;
+ }
+
+ background: linear-gradient(
+ 90deg,
+ rgba(0, 186, 173, 0.15) 0%,
+ rgba(61, 254, 250, 0.15) 49.2%,
+ rgba(61, 254, 250, 0) 100%
+ );
+ .d {
+ margin-left: 1px;
+ font-size: 12px;
+ }
+}
diff --git a/web/src/views/statisticalAnalysis.vue b/web/src/views/statisticalAnalysis.vue
index cb904ed..6147dbe 100644
--- a/web/src/views/statisticalAnalysis.vue
+++ b/web/src/views/statisticalAnalysis.vue
@@ -20,7 +20,7 @@
>
{
this.$nextTick(() => {
this.getStatCharts()
diff --git a/web/src/views/sub/Home.vue b/web/src/views/sub/Home.vue
index b8dd799..dfb28ea 100644
--- a/web/src/views/sub/Home.vue
+++ b/web/src/views/sub/Home.vue
@@ -48,46 +48,45 @@ import Alarm from '@/components/Home/Alarm.vue'
import Map from '@/components/Home/Map.vue'
import { getReq, postReq } from '@/request/api'
import { getRunDays, getDateDaysAgo } from '@/utils/dealWithData'
-import { markRaw } from 'vue';
+import { markRaw } from 'vue'
export default {
name: 'Home',
components: { Map },
data() {
return {
showFlag: false,
-
stationId: null,
deviceInfo: {},
list: [
{
title: '运行状况',
class: 'online-status',
- componentId:markRaw(onLine),
+ componentId: markRaw(onLine),
infoKey: 'onLineTotal'
},
{
title: '运行分析',
class: 'stats-cards',
- componentId:markRaw( Operational),
- infoKey: ''
+ componentId: markRaw(Operational),
+ infoKey: 'operationTotal'
},
{
title: '储能设备',
class: 'energy-status',
- componentId:markRaw( Energy),
+ componentId: markRaw(Energy),
infoKey: 'energy'
},
{
title: '充电设备',
class: 'charge-analysis',
- componentId:markRaw( Charge),
+ componentId: markRaw(Charge),
infoKey: 'charge'
},
{
title: '光伏设备',
class: 'work-order',
- componentId:markRaw( Pv),
+ componentId: markRaw(Pv),
infoKey: 'pv'
},
{
@@ -114,14 +113,15 @@ export default {
await Promise.all([
this.getOnLineList(),
this.getStatTotalList(),
+ this.getOperTotalList(),
this.getStatDayList(1),
this.getStatDayList(2),
this.getStatDayList(3)
- ]).then((r)=>{
+ ]).then((r) => {
if (
this.deviceInfo.energy.length &&
- this.deviceInfo.charge.length &&
- this.deviceInfo.pv.length
+ this.deviceInfo.charge.length &&
+ this.deviceInfo.pv.length
) {
const newArr = this.mergedArray(
this.deviceInfo.energy,
@@ -130,15 +130,11 @@ export default {
)
this.deviceInfo.alarm = newArr
}
- console.log(r,'11111')
-
})
- // this.showFlag=true
},
methods: {
getCurrentStation(e) {
- console.log(e, 'getCurrentStation')
this.stationId = e
},
// 查询系统统计信息
@@ -149,7 +145,6 @@ export default {
if (res.errcode === 0) {
this.deviceInfo.onLine = JSON.parse(JSON.stringify(res.data))
this.deviceInfo.onLine.runDays = getRunDays(res.data.launch_date)
- console.log(JSON.parse(JSON.stringify(res.data)), this.deviceInfo.onLine, '111111111111')
} else {
throw res
}
@@ -166,7 +161,7 @@ export default {
// station_id:场站ID,为0或不传查询所有场站总计
// category:类别,1:储能设备,2:充电设备,3:光伏设备,为0或不传查询所有类别总计
const query = {
- date: new Date(),
+ date: getDateDaysAgo(0),
stationId: this.stationId,
category: 0
}
@@ -176,35 +171,31 @@ export default {
const { income_charge: incomeCharge, income_elect: incomeElect } =
this.deviceInfo.allTotal
this.deviceInfo.allTotal.incomeTotal = +incomeCharge + +incomeElect
- console.log(
- this.deviceInfo.allTotal.incomeTotal,
- incomeCharge,
- incomeElect,
- ' this.deviceInfo.allTotal.incomeTotal'
- )
} else {
throw res
}
} catch (error) {
- this.deviceInfo.allTotal = {
- storageElectIn: 2,
- storageElectOut: 5,
- chargeElect: 4,
- chargeNum: 5,
- incomeCharge: 7,
- incomeElect: 7,
- solarElectGen: 7,
- solarElectGrid: 7
+ this.deviceInfo.allTotal = {}
+ this.deviceInfo.allTotal.incomeTotal = 0
+ }
+ },
+ // 运行分析 联调
+ async getOperTotalList() {
+ try {
+ const res = await getReq('/queryStatStation', {})
+ if (res.errcode === 0) {
+ this.deviceInfo.operationTotal = res.data
+ } else {
+ throw res
}
- this.deviceInfo.allTotal.incomeTotal =
- this.deviceInfo.allTotal.incomeCharge + this.deviceInfo.allTotal.incomeElect
+ } catch (error) {
+ this.deviceInfo.operationTotal = [ ]
}
},
// 示例:获取7天前的日期
// 查询场站日统计信息
async getStatDayList(category) {
- console.log(category,"category")
try {
// station_id: 场站ID
// category: 类别: 1:储能设备,2:充电设备,3:光伏设备
@@ -221,7 +212,6 @@ export default {
if (res.errcode === 0) {
this.list.forEach((item) => {
this.deviceInfo[arr[category]] = res.data
-
})
} else {
throw res
diff --git a/web/src/views/system/permission.vue b/web/src/views/system/permission.vue
index 8728804..f4a5773 100644
--- a/web/src/views/system/permission.vue
+++ b/web/src/views/system/permission.vue
@@ -1,10 +1,6 @@
-
+
-
+
.permission {
height: 100%;
-
+ padding: 20px 20px 0 20px;
.content-table {
- height: calc(100% - 70px);
- padding: 10px;
+ height: calc(100% - 92px);
}
}
diff --git a/web/src/views/system/role.vue b/web/src/views/system/role.vue
index 47c0728..e49b796 100644
--- a/web/src/views/system/role.vue
+++ b/web/src/views/system/role.vue
@@ -1,10 +1,6 @@
-
+
-
+
{{
record.is_open == 0 ? '禁用' : '启用'
}}
@@ -31,7 +27,13 @@
-
+
child.is_view === '1') ? true:false
- node.is_add = node.children.some((child) => child.is_add === '1') ? true:false
- node.is_edit = node.children.some((child) => child.is_edit === '1') ? true:false
- node.is_del = node.children.some((child) => child.is_del === '1') ? true:false
+ node.is_view = node.children.some((child) => child.is_view === '1') ? true : false
+ node.is_add = node.children.some((child) => child.is_add === '1') ? true : false
+ node.is_edit = node.children.some((child) => child.is_edit === '1') ? true : false
+ node.is_del = node.children.some((child) => child.is_del === '1') ? true : false
}
},
async getPermissionList() {
@@ -243,7 +245,7 @@ export default {
is_add: data ? Boolean(+data.is_add) : false,
is_del: data ? Boolean(+data.is_del) : false,
is_edit: data ? Boolean(+data.is_edit) : false,
- is_view: data ? Boolean(+data.is_view ): false
+ is_view: data ? Boolean(+data.is_view) : false
}
},
operateForm(type, record = {}) {
@@ -295,13 +297,11 @@ export default {
callback()
}
},
- onCancel() {
- },
+ onCancel() {},
class: 'test'
})
},
async getRuleFormInfo(record) {
-
function getInfo(data, url) {
return new Promise((reslove, reject) => {
getReq(data, url).then((res) => {
@@ -320,16 +320,16 @@ export default {
perList,
record && record.permission.length ? record.permission : []
)
- const newData=JSON.parse(JSON.stringify( this.processedData))
-
+ const newData = JSON.parse(JSON.stringify(this.processedData))
+
roleOptions.forEach((e, index) => {
e.list.forEach((i) => {
if (i.key == 'permission') {
i.tableData = newData
- if(record&&record.role_id){
- i.selectTableData=this.extractAllIds( record.permission)
- }else {
- i.selectTableData=[]
+ if (record && record.role_id) {
+ i.selectTableData = this.extractAllIds(record.permission)
+ } else {
+ i.selectTableData = []
}
} else {
e.ruleForm[i.key] = row ? row[i.key] : ''
@@ -340,25 +340,25 @@ export default {
},
// 定义提取所有ID的函数
extractAllIds(treeData) {
- const idSet = new Set();
-
+ const idSet = new Set()
+
// 递归遍历函数
const traverse = (node) => {
// 添加当前节点ID
if (node.permission_id) {
- idSet.add(node.permission_id);
+ idSet.add(node.permission_id)
}
-
+
// 递归处理子节点
if (node.children && node.children.length > 0) {
- node.children.forEach((child) => traverse(child));
+ node.children.forEach((child) => traverse(child))
}
- };
-
+ }
+
// 处理所有根节点
- treeData.forEach((node) => traverse(node));
-
- return Array.from(idSet);
+ treeData.forEach((node) => traverse(node))
+
+ return Array.from(idSet)
},
handlePagesizeChange(pageOption) {
this.pageOption.pageSize = pageOption.pageSize
@@ -373,9 +373,9 @@ export default {
.role {
height: 100%;
+ padding: 0 20px;
.content-table {
- height: calc(100% - 70px);
- padding: 10px;
+ height: calc(100% - 92px);
}
}
diff --git a/web/src/views/system/service.vue b/web/src/views/system/service.vue
index 41cb404..9eabb52 100644
--- a/web/src/views/system/service.vue
+++ b/web/src/views/system/service.vue
@@ -1,10 +1,6 @@
-
+
-
+
{{
record.is_open == 0 ? '禁用' : '启用'
}}
-
-
+
{
e.list.forEach((i) => {
-
e.ruleForm[i.key] = row ? row[i.key] : ''
e.ruleForm.id = row.id
})
diff --git a/web/src/views/system/station.vue b/web/src/views/system/station.vue
index 9bd4ba0..2d91cd3 100644
--- a/web/src/views/system/station.vue
+++ b/web/src/views/system/station.vue
@@ -1,10 +1,6 @@
-
+
{{}}
- {{ workModeList.find((item) => record.value == item.value)?.label || '' }}
+ {{ workModeList.find((item) => record.work_mode == item.value)?.label || '' }}
- {{ policyList.find((item) => record.value == item.value)?.label || '' }}
+ {{ policyList.find((item) => record.policy_id == item.value)?.label || '' }}
-
+
{
e.list.forEach((i) => {
- e.ruleForm[i.key] = row ? row[i.key] : ''
- e.ruleForm.id = row.id
+ if (i.key == 'work_mode') {
+ console.log(row[i.key], 'rrrrrrrrr')
+ switch (row[i.key]) {
+ case '1':
+ case '5':
+ e.ruleForm[i.key] =row[i.key]
+ // this.$refs.EditCom.workModeIdSelect = row[i.key]
+ e.ruleForm['policy_id'] = row ? row['policy_id'] : ''
+ stationOptions[0].list[stationOptions[0].list.length - 1].type = 'select'
+ break
+ default:
+ e.ruleForm[i.key] =row[i.key]
+
+ console.log('1245')
+ stationOptions[0].list[stationOptions[0].list.length - 1].type = 'unshow'
+
+ break
+ }
+ } else {
+ e.ruleForm[i.key] = row ? row[i.key] : ''
+ }
})
})
},
@@ -258,9 +273,9 @@ export default {
.station {
height: 100%;
+ padding: 0 20px;
.content-table {
- height: calc(100% - 70px);
- padding: 10px;
+ height: calc(100% - 92px);
}
}
diff --git a/web/src/views/system/user.vue b/web/src/views/system/user.vue
index c92a283..4669ab1 100644
--- a/web/src/views/system/user.vue
+++ b/web/src/views/system/user.vue
@@ -1,11 +1,6 @@
-
+
-
+
{
e.list.forEach((i) => {
-
e.ruleForm[i.key] = row ? row[i.key] : ''
e.ruleForm.id = row.id
})
@@ -211,10 +210,9 @@ export default {