代码提交

This commit is contained in:
ym1026
2025-09-12 11:43:32 +08:00
parent f0720439d2
commit 1a66c87a5a
23 changed files with 63 additions and 198 deletions

View File

@@ -163,8 +163,6 @@ onMounted(async () => {
data.realTableData = [...props.tableData]
await nextTick()
// console.log(props.tableH, 'props.tableH');
console.log(comtable.value.offsetHeight,'comtable.value.offsetHeight');
scroll.value = { y: comtable.value.offsetHeight - 56 }

View File

@@ -455,7 +455,6 @@ function confirm() {
resolve(true)
})
.catch((error) => {
console.log('error', error)
resolve(false)
})
}

View File

@@ -176,7 +176,6 @@ export default {
watch: {
workModeIdSelect: {
handler(n) {
console.log(n,'nnnnnnnnnnnnnnnnworkModeIdSelectn')
switch (n) {
case '1':
@@ -371,23 +370,8 @@ export default {
add: '/insertRole',
edit: '/updateRole'
}
const { selectedRowKeys, selectedArr } = this.$refs.treeTable[0]
console.log(selectedRowKeys, selectedArr, 'selectedRowKeys')
// const arr = selectedArr.map((item) => ({
// ...item,
// // 转换操作权限为布尔值
// ...this.getPerOperBoolean(item),
// // 递归处理children
// children: item.children
// ? item.children.map((child) => ({
// ...child,
// ...this.getPerOperBoolean(child),
// }))
// : []
// }))
// console.log(arr,"arr")
const { selectedRowKeys } = this.$refs.treeTable[0]
const data = this.filterTreeData(selectedRowKeys, this.$refs.treeTable[0].tableData)
const arr = data.map((item) => ({

View File

@@ -105,7 +105,7 @@ export default {
this.energyChartData.ydata[index] = {
name: item.name,
smooth: true,
type: 'bar',
type: 'line',
barWidth: 5,
itemStyle: {
borderRadius: [5, 5, 0, 0],

View File

@@ -57,8 +57,8 @@ export default {
data() {
return {
center: [116.404, 39.915], // 默认中心点(北京
zoom: 12,
center: [113.5, 33.875], // 默认中心点(河南
zoom: 10,
map: null,
currentMarker: {},
showCtrModal: false,

View File

@@ -96,18 +96,14 @@ export default {
handler(newVal, oldVal) {
if (newVal !== oldVal) {
this.list.forEach((item) => {
console.log(this.propsTotal,this.propsTotal[item.key],"this.propsTotal[item.key]")
if (item.key == 'coolingStatus') {
console.log(this.coolingList.find(
(e) => e.value == this.propsTotal[item.key]
))
item.value = this.coolingList.find(
(e) => e.value == this.propsTotal[item.key]
).label
).label ||'关机'
} else if (item.key == 'aircStatus') {
item.value = this.aircList.map(
(e) => e.value == this.propsTotal[item.key]
).label
)[0].label||'关机'
} else {
item.value = this.propsTotal[item.key]
}

View File

@@ -120,7 +120,7 @@ export default {
.item {
height: 50%;
width: 30%;
width: 45%;
// height: 47px;
box-sizing: border-box;
display: flex;

View File

@@ -108,7 +108,7 @@ export default {
key: 'power_rated',
value: 100,
d: 'Kw',
label: 'PCS额定功率',
label: '额定功率',
class: 'item-6'
}
]

View File

@@ -32,7 +32,7 @@ export default {
key: 'runDays',
value: 26,
d: '天',
label: '场站运行天数',
label: '运行天数',
class: 'item-1',
iconPath: require('@/assets/home/wendu.png')
},
@@ -56,7 +56,7 @@ export default {
key: 'incomeTotal',
value: 26,
d: '元',
label: '场站累计收益',
label: '累计收益',
class: 'item-4',
iconPath: require('@/assets/home/dianliu.png')
},

View File

@@ -110,7 +110,6 @@ export default {
}
},
mounted() {
console.log(this.total,'total')
},
methods: {}
}

View File

@@ -152,7 +152,6 @@ export default {
this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows[selectedRows.length - 1]
this.selectedArr=selectedRows
console.log(selectedRowKeys, this.selectedArr ,"selectedRowKeys")
this.$emit('getSelectedIds', selectedRowKeys)
},
onSelect(record, selected) {

View File

@@ -333,7 +333,6 @@ export default {
}
},
async openModal(item, val) {
console.log(item, '=============')
this.modalComponent = val
this.modalOpen = true
if (val == 1) {

View File

@@ -5,8 +5,6 @@ export function getRunDays(date) {
const timeDiff = today - launchDate // 毫秒差
const daysRun = Math.ceil(timeDiff / (1000 * 60 * 60 * 24)) // 转换为天数
console.log(`从 2023-01-01 到今天已经运行了 ${daysRun}`)
return daysRun
}
export function processData(data, keys) {

View File

@@ -76,7 +76,6 @@ export default {
const res = await getReq('/login',this.form )
this.loading = false
console.log(res);
if (res.errcode === 0) {
this.$message.success('登录成功')
@@ -91,7 +90,6 @@ export default {
// this.$message.error(res.message || '登录失败')
// }
} catch (error) {
console.log(error);
this.loading = false
this.$message.error('请求失败,请稍后重试')

View File

@@ -76,7 +76,6 @@ export default {
$route: {
immediate: true,
handler(to) {
console.log(this.dynamicMenuList, 'this.dynamicMenuList')
// // 更新当前激活的菜单项
// // this.currentKey = to.matched[0]?.path || ''
this.menuList = this.dynamicMenuList
@@ -146,7 +145,6 @@ export default {
}
},
generateMenu(routes) {
console.log(routes, 'routes')
return routes.map((route) => ({
...route,
title: route.name,

View File

@@ -535,7 +535,6 @@ export default {
this.startRealtimeRefresh()
},
beforeUnmount() {
console.log('beforeUnmount')
clearInterval(this.interval) // 组件销毁时清除定时器
},
methods: {
@@ -661,30 +660,7 @@ export default {
this.getStatCharts()
},
// async getEchartsList() {
// const key = activeKey || this.activeKey;
// if (!key) return;
// const currentInfo = this.echartsInfo[this.activeKey]
// const query = {
// ...this.paramsDate,
// category: this.activeKey
// }
// try {
// const res = await getReq('/queryStatDayList', query)
// if (res.errcode === 0) {
// this.echartsInfo[this.activeKey].chartData = res.data
// console.log(
// this.echartsInfo[this.activeKey].chartData,
// ' this.echartsInfo[this.activeKey].chartData'
// )
// } else {
// throw res
// }
// } catch (error) {
// this.echartsInfo[this.activeKey].chartData = {}
// }
// },
async getStatCharts() {
const currentInfo = this.echartsInfo[this.activeKey]
const query = {
@@ -695,12 +671,7 @@ export default {
try {
const res = await getReq('/queryStatCharts', query)
if (res.errcode === 0) {
this.echartsInfo[this.activeKey].chartDatav = {
V: [100.0, 100.0, 100.0], // 电压曲线
I: [10.0, 10.0, 10.0], // 电流曲线
P: [1000.0, 1000.0, 1000.0] // 功率曲线
}
this.echartsInfo[this.activeKey].chartDatav = res.data
// x轴0点到24点
} else {
throw res
@@ -714,75 +685,7 @@ export default {
}
}
// async getTableList() {
// const currentInfo = this.tableList[this.activeKey]
// const query = {
// ...this.paramsDate,
// category: this.activeKey,
// page_size: currentInfo.pageOption.pageSize,
// pageNumber: currentInfo.pageOption.page
// }
// try {
// const res = await getReq('/queryStatDayList', query)
// if (res.errcode === 0) {
// this.tableList[this.activeKey].pageOption.tableData = res.data
// this.tableList[this.activeKey].pageOption.pageOption = {
// page: res.data.page,
// pageSize: res.data.page_size,
// count: res.data.count
// }
// } else {
// throw res
// }
// } catch (error) {
// this.tableList[this.activeKey].pageOption.tableData = [
// {
// key1: '1515151515',
// key2: '设备1111',
// key3: '类型',
// key4: '电量',
// key5: '时长',
// key6: '时长',
// key7: 'dianl',
// key8: '时长',
// key9: '时长11'
// },
// {
// key1: '1515151515',
// key2: '设备1111',
// key3: '类型',
// key4: '电量',
// key5: '时长',
// key6: '时长',
// key7: 'dianl',
// key8: '时长',
// key9: '时长11'
// },
// {
// key1: '1515151515',
// key2: '设备1111',
// key3: '类型',
// key4: '电量',
// key5: '时长',
// key6: '时长',
// key7: 'dianl',
// key8: '时长',
// key9: '时长11'
// },
// {
// key1: '1515151515',
// key2: '设备1111',
// key3: '类型',
// key4: '电量',
// key5: '时长',
// key6: '时长',
// key7: 'dianl',
// key8: '时长',
// key9: '时长11'
// }
// ]
// }
// }
}
}
</script>

View File

@@ -117,7 +117,22 @@ export default {
this.getStatDayList(1),
this.getStatDayList(2),
this.getStatDayList(3)
])
]).then((r)=>{
if (
this.deviceInfo.energy.length &&
this.deviceInfo.charge.length &&
this.deviceInfo.pv.length
) {
const newArr = this.mergedArray(
this.deviceInfo.energy,
this.deviceInfo.charge,
this.deviceInfo.pv
)
this.deviceInfo.alarm = newArr
}
console.log(r,'11111')
})
// this.showFlag=true
},
@@ -189,6 +204,7 @@ export default {
// 示例获取7天前的日期
// 查询场站日统计信息
async getStatDayList(category) {
console.log(category,"category")
try {
// station_id: 场站ID
// category: 类别: 1储能设备,2:充电设备,3:光伏设备
@@ -205,18 +221,7 @@ export default {
if (res.errcode === 0) {
this.list.forEach((item) => {
this.deviceInfo[arr[category]] = res.data
if (
this.deviceInfo.energy.length &&
this.deviceInfo.charge.length &&
this.deviceInfo.pv.length
) {
const newArr = this.mergedArray(
this.deviceInfo.energy,
this.deviceInfo.charge,
this.deviceInfo.pv
)
this.deviceInfo.alarm = newArr
}
})
} else {
throw res

View File

@@ -17,11 +17,13 @@
>
<template #is_open="record">
<!-- 0:禁用; 1:启用 -->
<span>{{ ['禁用', '启用'][record.is_open] }}</span>
<a-tag :color="record.is_open == 0 ? 'red' : 'green'">{{
record.is_open == 0 ? '禁用' : '启用'
}}</a-tag>
</template>
<template #permission="record">
<!-- 0:禁用; 1:启用 -->
<span>{{record.permission.map(item=>item.name).toString() }}</span>
<span>{{ record.permission.map((item) => item.name).toString() }}</span>
</template>
<template #action="record">
@@ -50,9 +52,7 @@ import { createVNode } from 'vue'
export default {
name: '',
components: {
},
components: {},
props: {},
data() {
return {
@@ -103,13 +103,12 @@ export default {
this.$refs.comTable.loading = false
// this.tableData = res.data
this.tableData =JSON.parse( localStorage.getItem('permission')).map((item)=>{
this.tableData = JSON.parse(localStorage.getItem('permission')).map((item) => {
return {
...item,
key:item.permission_id,
key: item.permission_id
}
})
console.log( this.tableData," this.tableData")
this.pageOption = {
page: res.page,
pageSize: res.page_size,
@@ -124,24 +123,11 @@ export default {
}
},
operateForm(type, record = {}) {
console.log(record,record.id,'rrrrrrrrrr')
this.formStatus = type
switch (type) {
// case 'add':
// this.formModal = true
// this.formState = {}
// this.getRuleFormInfo()
// break
// case 'edit':
// case 'read':
// this.formModal = true
// this.formState = record
// this.getRuleFormInfo(record)
// break
case 'del':
// this.handleDelete([record.permission_id],this.getList)
break
@@ -155,7 +141,7 @@ export default {
}
},
// 删除操作
async handleDelete(id,callback) {
async handleDelete(id, callback) {
const that = this
Modal.confirm({
title: '你确认删除数据吗?',
@@ -163,10 +149,10 @@ export default {
async onOk() {
try {
const res = await getReq('/deletepermission',{permission_id:id})
const res = await getReq('/deletepermission', { permission_id: id })
if (res.errcode === 0) {
this.$message.success(res.errmsg)
this.pageOption.page=1
this.pageOption.page = 1
callback()
} else {
throw res
@@ -197,7 +183,6 @@ export default {
row = record
// this.type='edit'
}
},
handlePagesizeChange(pageOption) {
this.pageOption.pageSize = pageOption.pageSize

View File

@@ -16,8 +16,10 @@
:page-option="pageOption"
>
<template #is_open="record">
<!-- 0:禁用; 1:启用 -->
<span>{{ ['禁用', '启用'][record.is_open] }}</span>
<!-- 0:禁用; 1:启用 -->
<a-tag :color="record.is_open == 0 ? 'red' : 'green'">{{
record.is_open == 0 ? '禁用' : '启用'
}}</a-tag>
</template>
<template #permission="record">
<!-- 0:禁用; 1:启用 -->
@@ -245,7 +247,6 @@ export default {
}
},
operateForm(type, record = {}) {
console.log(record, 'rrrrrrrrrr')
this.formStatus = type
switch (type) {
case 'add':
@@ -295,7 +296,6 @@ export default {
}
},
onCancel() {
// console.log("Cancel");
},
class: 'test'
})

View File

@@ -16,7 +16,10 @@
:page-option="pageOption"
>
<template #is_open="record">
<span>{{ ['禁用', '启用'][record.is_open] }}</span>
<!-- 0:禁用; 1:启用 -->
<a-tag :color="record.is_open == 0 ? 'red' : 'green'">{{
record.is_open == 0 ? '禁用' : '启用'
}}</a-tag>
</template>
@@ -149,7 +152,6 @@ export default {
}
},
operateForm(type, record = {}) {
console.log(record,record.id,'rrrrrrrrrr')
this.formStatus = type
switch (type) {
case 'add':
@@ -201,7 +203,6 @@ export default {
}
},
onCancel() {
// console.log("Cancel");
},
class: 'test'
})

View File

@@ -16,14 +16,17 @@
:page-option="pageOption"
>
<template #status="record">
<span>{{ ['未启用', '启用'][record.status] }}</span>
<a-tag :color="record.status == 0 ? 'red' : 'green'">{{
record.status == 0 ? '未投运' : '投运'
}}</a-tag>
<span>{{}}</span>
</template>
<template #work_mode="record">
<span>{{ workModeList.find((item) => record.value == item.value)?.label || '' }}</span>
</template>
</template>
<template #policy_id="record">
<span>{{ policyList.find((item) => record.value == item.value)?.label || '' }}</span>
</template>
</template>
<template #action="record">
<OperateCom :record="record" :operate-list="operateList" @operateForm="operateForm" />
</template>
@@ -63,7 +66,7 @@ export default {
data() {
return {
tableOption: {
select:false
select: false
},
formModal: false,
formState: {},
@@ -161,11 +164,9 @@ export default {
} catch (error) {
//统一处理报错提示
this.$refs.comTable.loading = false
}
},
operateForm(type, record = {}) {
console.log(record, record.id, 'rrrrrrrrrr')
this.formStatus = type
switch (type) {
case 'add':
@@ -217,7 +218,6 @@ export default {
}
},
onCancel() {
// console.log("Cancel");
},
class: 'test'
})

View File

@@ -120,7 +120,6 @@ export default {
}
},
operateForm(type, record = {}) {
console.log(record,record.id,'rrrrrrrrrr')
this.formStatus = type
switch (type) {
case 'add':
@@ -172,7 +171,6 @@ export default {
}
},
onCancel() {
// console.log("Cancel");
},
class: 'test'
})