This commit is contained in:
zhoumengru
2025-09-15 17:04:18 +08:00
64 changed files with 2372 additions and 1414 deletions

View File

@@ -277,7 +277,6 @@
/>
<a-tree-select
:allow-clear="true"
:disabled="props.disabled"
v-if="item.type === 'tree-check-org'"
v-model:value="propsInfo.ruleForm.value[item.key]"
@@ -515,7 +514,11 @@ function cascaderChange(value, cascaderItem) {
function filter(inputValue, path) {
return path.some((option) => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
}
function getBase64(img, callback) {
const reader = new FileReader()
reader.addEventListener('load', () => callback(reader.result))
reader.readAsDataURL(img)
}
function avatarUploadChange(info) {
if (info.file.status === 'uploading') {
data.loading = true
@@ -532,11 +535,7 @@ function avatarUploadChange(info) {
function onFieldsChange() {}
function handleSubmit() {}
function getBase64(img, callback) {
const reader = new FileReader()
reader.addEventListener('load', () => callback(reader.result))
reader.readAsDataURL(img)
}
// 主动暴露方法
defineExpose({

View File

@@ -56,17 +56,17 @@
scroll: { y: 500 }
}"
>
<template #is_add="{ record, index }">
<template #is_add="{ record }">
<a-checkbox v-model:checked="record.is_add"></a-checkbox>
</template>
<template #is_del="{ record, index }">
<template #is_del="{ record }">
<a-checkbox v-model:checked="record.is_del"></a-checkbox>
</template>
<template #is_edit="{ record, index }">
<template #is_edit="{ record }">
<a-checkbox v-model:checked="record.is_edit"></a-checkbox>
</template>
<template #is_view="{ record, index }">
<template #is_view="{ record }">
<a-checkbox v-model:checked="record.is_view"></a-checkbox>
</template>
</TreeTable>

View File

@@ -29,28 +29,28 @@ export default {
return {
curList: [
{
name: '光伏设备告警',
name: '光伏设备告警',
key: 'solar_num_err',
lineColor: '#22E4FF',
value: 1111,
d: ''
},
{
name: '储能设备告警',
name: '储能设备告警',
key: 'storage_num_err',
lineColor: '#0E68E4',
value: 0,
d: ''
},
{
name: '充电设备告警',
name: '充电设备告警',
key: 'charge_num_err',
lineColor: '#00BAAD',
value: 0,
d: ''
},
// {
// name: '负荷设备告警',
// name: '负荷设备告警',
// key: 'key4',
// lineColor: '#FF8D1A',
// value: 0,

View File

@@ -30,7 +30,7 @@ export default {
return {
curList: [
{
name: '充电电量',
name: '充电电量',
key: 'charge_elect',
lineColor: '#00BBA3',
colorStart: ' rgba(10, 250, 106, 0.15)',
@@ -39,7 +39,7 @@ export default {
d: 'kW·h'
},
{
name: '充电次数',
name: '充电次数',
key: 'charge_num',
lineColor: '#3F80F2',
colorStart: ' rgba(99, 151, 235, 0.3)',
@@ -50,7 +50,7 @@ export default {
],
curListEcharts: [
{
name: '充电电量',
name: '充电电量',
key: 'charge_elect',
lineColor: '#00BBA3',
colorStart: ' rgba(10, 250, 106, 0.15)',
@@ -59,7 +59,7 @@ export default {
d: 'kW·h'
},
{
name: '充电收益',
name: '充电收益',
key: 'income_charge',
lineColor: '#3F80F2',
colorStart: ' rgba(99, 151, 235, 0.3)',

View File

@@ -33,14 +33,14 @@ export default {
uid:'1',
curList: [
{
name: '充电电量',
name: '充电电量',
key: 'storage_elect_in',
lineColor: '#22E4FF',
value: 0,
d: 'kW·h'
},
{
name: '放电电量',
name: '放电电量',
key: 'storage_elect_out',
lineColor: '#0E68E4',
value: 0,

View File

@@ -177,6 +177,7 @@ export default {
:deep(.ant-modal-root .ant-modal-mask) {
background-color: #000 !important;
}
:deep(.modal.ant-modal) {
width: 68% !important;
height: 80% !important;
@@ -195,7 +196,7 @@ export default {
width: 96%;
margin: auto;
box-shadow: none;
background: transparent;
background: transparent!important;
.ant-modal-close {
position: absolute;
right: 0;

View File

@@ -12,7 +12,7 @@
:props-info="modalInfo[item.infoKey]"
:props-total="
['prefab', 'dataTotal'].includes(item.infoKey)
? item.key == 'prefab'
? item.infoKey == 'prefab'
? modalInfo.prefabTotal
: modalInfo.dataTotal
: modalInfo.allTotal

View File

@@ -19,14 +19,14 @@ export default {
return {
curList: [
{
name: '充电电量',
name: '充电电量',
key: 'storage_elect_in',
lineColor: '#9BD801',
value: 0,
d: 'kW·h'
},
{
name: '放电电量',
name: '放电电量',
key: 'storage_elect_out',
lineColor: '#3DFEFA',
value: 0,

View File

@@ -31,14 +31,14 @@ export default {
return {
curList: [
{
name: '发电量',
name: '发电量',
key: 'solar_elect_gen',
lineColor: '#22E4FF',
value: 0,
d: 'kW·h'
},
{
name: '入网电量',
name: '入网电量',
key: 'solar_elect_grid',
lineColor: '#0E68E4',
value: 0,

View File

@@ -97,12 +97,12 @@ $page-border: #cad2dd;
opacity: 0.8;
}
&:active {
background: #0f6f6a;
background: $btn-confirm;
}
&:disabled {
border: none;
// color: #fff;
color: #fff;
background: $btn-confirm;
}
}
@@ -115,6 +115,11 @@ $page-border: #cad2dd;
&:active {
background: $btn-del;
}
&:disabled {
border: none;
color: #fff;
background: $btn-del;
}
}
.btn-edit {
background: $btn-edit;
@@ -125,6 +130,11 @@ $page-border: #cad2dd;
&:active {
background: $btn-edit;
}
&:disabled {
border: none;
color: #fff;
background: $btn-edit;
}
}
//modal样式
// 删除弹框

View File

@@ -5,23 +5,33 @@ const btnList = [
{ label: '修改', type: 'edit', disFlag: 'is_edit' },
{ label: '删除', type: 'del', disFlag: 'is_del', icon: 'icon-del' }
]
function findNodeByRoute(tree, targetRoute) {
for (const node of tree) {
if (node.route === targetRoute) {
return node // 找到目标节点
}
if (node.children && node.children.length > 0) {
const found = findNodeByRoute(node.children, targetRoute) // 递归检查子节点
if (found) return found
}
}
return null // 未找到
}
function getBtns(arr) {
// console.log(this.$route, JSON.parse(localStorage.getItem('permission')), 'this.$route')
// const curPermission =
// JSON.parse(localStorage.getItem('permission')).find(
// (item) => item.route == '/' + this.$route.name
// ) || {}
const curPermission = findNodeByRoute(JSON.parse(localStorage.getItem('permission')), '/user')
// console.log(findNodeByRoute(JSON.parse(localStorage.getItem('permission')), '/user'), '55')
// console.log(this.$route, curPermission, localStorage.getItem('permission'), 'curPermission')
const btns = []
// console.log(curPermission, 'curPermission')
btnList.forEach((item) => {
if (arr.includes(item.label)) {
// item.disabled = !Boolean(+curPermission[item.disFlag])
// item.disabled = true
item.disabled = !Boolean(+curPermission[item.disFlag])
btns.push(item)
}
})
return btns
}
export { btnList, getBtns }

View File

@@ -18,7 +18,7 @@
:title-option="{ title: '', info: '' }"
@onSearch="onSearch"
>
<template #stationSelect="item">
<template #stationSelect="">
<a-select
style="width: 200px"
:dropdown-match-select-width="false"

View File

@@ -119,9 +119,9 @@ export default {
this.getStatDayList(3)
]).then((r) => {
if (
this.deviceInfo.energy.length &&
this.deviceInfo.charge.length &&
this.deviceInfo.pv.length
this.deviceInfo.energy &&
this.deviceInfo.charge &&
this.deviceInfo.pv
) {
const newArr = this.mergedArray(
this.deviceInfo.energy,