@@ -40,8 +52,8 @@ import KHeader from '../components/Header';
import LeftTwo from './LeftTwo';
import MiddleTwo from './MiddleTwo';
import RightTwo from './RightTwo';
-import screenfull from 'screenfull'
-import { debounce } from '@/utils/debounce'
+import screenfull from 'screenfull';
+import { debounce } from '@/utils/debounce';
export default {
name: 'wholePlantBoard',
@@ -49,7 +61,7 @@ export default {
KHeader,
LeftTwo,
MiddleTwo,
- RightTwo
+ RightTwo,
},
// provide() {
// return {
@@ -59,80 +71,77 @@ export default {
data() {
return {
isFullScreen: false,
- scaleNum: 0.8
+ scaleNum: 0.8,
};
},
created() {
- this.init()
+ this.init();
},
destroy() {
- this.destroy()
+ this.destroy();
},
mounted() {
- this.boxReset = debounce(() => {
- this.resetSize()
- }, 300)
- this.boxReset()
- window.addEventListener('resize', () => {
- this.boxReset()
- })
- console.log('mounted...........')
+ this.boxReset();
+ window.addEventListener('resize', this.boxReset);
},
destroyed() {
- console.log('destroyed...........')
+ window.removeEventListener('resize', this.boxReset);
},
methods: {
+ boxReset() {
+ debounce(() => {
+ this.resetSize();
+ }, 300)();
+ },
change() {
- this.isFullScreen = screenfull.isFullscreen
- },
- init() {
- if (screenfull.isEnabled) {
- screenfull.on('change', this.change)
- }
- },
- destroy() {
- if (screenfull.isEnabled) {
- screenfull.off('change', this.change)
- }
- },
+ this.isFullScreen = screenfull.isFullscreen;
+ },
+ init() {
+ if (screenfull.isEnabled) {
+ screenfull.on('change', this.change);
+ }
+ },
+ destroy() {
+ if (screenfull.isEnabled) {
+ screenfull.off('change', this.change);
+ }
+ },
// 全屏
screenfullChange() {
- if (!screenfull.isEnabled) {
- this.$message({
- message: 'you browser can not work',
- type: 'warning'
- })
- return false
- }
- screenfull.toggle(this.$refs.wholePlantContainerB)
- },
+ if (!screenfull.isEnabled) {
+ this.$message({
+ message: 'you browser can not work',
+ type: 'warning',
+ });
+ return false;
+ }
+ screenfull.toggle(this.$refs.wholePlantContainerB);
+ },
resetSize() {
- let wholePlantContainerBox = document.getElementById('wholePlantContainer')
- let rw = parseFloat(window.innerWidth)
- let rh = parseFloat(window.innerHeight)
- let bw = parseFloat(wholePlantContainerBox.style.width)
- let bh = parseFloat(wholePlantContainerBox.style.height)
- let wx = 0
- let hx = 0
+ let wholePlantContainerBox = document.getElementById(
+ 'wholePlantContainer'
+ );
+ let rw = parseFloat(window.innerWidth);
+ let rh = parseFloat(window.innerHeight);
+ let bw = parseFloat(wholePlantContainerBox.style.width);
+ let bh = parseFloat(wholePlantContainerBox.style.height);
+ let wx = 0;
+ let hx = 0;
if (screenfull.isFullscreen) {
- console.log('全屏')
- wx = rw / bw
- hx = rh / bh
- console.log(this.scaleNum)
- }else{
- console.log('非全屏')
- console.log(this.$store.state.app.sidebar.opened)
+ wx = rw / bw;
+ hx = rh / bh;
+ } else {
if (this.$store.state.app.sidebar.opened) {
- wx = (rw-280) / bw
- hx = (rh-116) / bh
- }else{
- wx = (rw-85) / bw
- hx = (rh-116) / bh
+ wx = (rw - 280) / bw;
+ hx = (rh - 116) / bh;
+ } else {
+ wx = (rw - 85) / bw;
+ hx = (rh - 116) / bh;
}
}
- this.scaleNum = wx
- }
- }
+ this.scaleNum = wx;
+ },
+ },
};
diff --git a/src/views/order/monitoring/components/monitoringRingCharts.vue b/src/views/order/monitoring/components/monitoringRingCharts.vue
index 08f193a7..248602be 100644
--- a/src/views/order/monitoring/components/monitoringRingCharts.vue
+++ b/src/views/order/monitoring/components/monitoringRingCharts.vue
@@ -1,168 +1,223 @@
\ No newline at end of file
From 7c5d8bde0b671ced89f7cd785f63f166a3966242 Mon Sep 17 00:00:00 2001
From: juzi <819872918@qq.com>
Date: Wed, 10 Apr 2024 17:36:37 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=83=BD=E6=BA=90=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/searchArea.vue | 43 +---------------
.../analysis/contrastAnalysis/index.vue | 9 ----
.../trendAnalysis/components/searchArea.vue | 49 ++-----------------
.../energy/analysis/trendAnalysis/index.vue | 9 ----
src/views/energy/base/energyPlc/index.vue | 4 +-
.../components/energyPlcParam.vue | 26 ++++++----
.../energy/base/energyPlcConnect/index.vue | 28 ++++++++---
.../base/energyQuantityManual/index.vue | 21 ++++++--
.../base/energyQuantityRealtime/index.vue | 4 +-
.../energy/base/tableNameConfig/index.vue | 5 +-
.../energy/monitoring/energyLimit/index.vue | 8 ++-
.../energy/monitoring/energyReport/index.vue | 4 +-
.../components/energyStatisticsDet.vue | 14 ++++--
.../components/energyStatisticsDetAdd.vue | 4 +-
.../monitoring/energyStatistics/index.vue | 21 +++++---
15 files changed, 102 insertions(+), 147 deletions(-)
diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue
index b24e6ed7..cb94dc98 100644
--- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue
+++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue
@@ -1,8 +1,7 @@
@@ -573,21 +547,6 @@ export default {
margin-bottom: 4px;
}
}
-.searchBarBox .foldClass {
- position: absolute;
- top: 14px;
- right: 0;
- cursor: pointer;
- font-size: 12px;
- color: #0b58ff;
-}
-.searchBarBox .foldClass .iconfont {
- font-size: 14px;
-}
-.divHeight {
- height: 45px;
- overflow: hidden;
-}
.separateStyle {
display: inline-block;
width: 1px;
diff --git a/src/views/energy/analysis/contrastAnalysis/index.vue b/src/views/energy/analysis/contrastAnalysis/index.vue
index 836cde62..9e59796e 100644
--- a/src/views/energy/analysis/contrastAnalysis/index.vue
+++ b/src/views/energy/analysis/contrastAnalysis/index.vue
@@ -4,7 +4,6 @@
id="contrastAnalysisBox">
@@ -38,7 +37,6 @@ export default {
mixins: [tableHeightMixin],
data() {
return {
- isFold: false,
chartData: [],
timeDim: '',
tableProps: [],
@@ -46,13 +44,6 @@ export default {
tableH: this.tableHeight(250) / 2,
};
},
- mounted() {
- window.addEventListener('resize', () => {
- this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437);
- // console.log(document.getElementById("contrastAnalysisBox").offsetWidth)
- });
- this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437);
- },
methods: {
_setTableHeight() {
this.tableH = this.tableHeight(250) / 2;
diff --git a/src/views/energy/analysis/trendAnalysis/components/searchArea.vue b/src/views/energy/analysis/trendAnalysis/components/searchArea.vue
index a9461420..efb2c2f3 100644
--- a/src/views/energy/analysis/trendAnalysis/components/searchArea.vue
+++ b/src/views/energy/analysis/trendAnalysis/components/searchArea.vue
@@ -1,8 +1,7 @@
+ class="searchBarBox"
+ ref="searchBarRef">
@@ -172,9 +171,9 @@
+ v-hasPermi="['analysis:energy-analysis:query']">
-
- {{ isExpand ? '收起' : '展开' }}
-
-
@@ -557,21 +531,6 @@ export default {
margin-bottom: 4px;
}
}
-.searchBarBox .foldClass {
- position: absolute;
- top: 14px;
- right: 0;
- cursor: pointer;
- font-size: 12px;
- color: #0b58ff;
-}
-.searchBarBox .foldClass .iconfont {
- font-size: 14px;
-}
-.divHeight {
- height: 45px;
- overflow: hidden;
-}
.separateStyle {
display: inline-block;
width: 1px;
diff --git a/src/views/energy/analysis/trendAnalysis/index.vue b/src/views/energy/analysis/trendAnalysis/index.vue
index e48b8760..a06bc090 100644
--- a/src/views/energy/analysis/trendAnalysis/index.vue
+++ b/src/views/energy/analysis/trendAnalysis/index.vue
@@ -4,7 +4,6 @@
id="trendAnalysisBox">
@@ -33,20 +32,12 @@ export default {
components: { SearchArea, LineChart },
data() {
return {
- isFold: false,
chartData: [],
timeDim: '',
tableProps: [],
list: [],
};
},
- mounted() {
- window.addEventListener('resize', () => {
- this.tableH = this.tableHeight(260);
- this.isFold = this.searchBarWidth('trendAnalysisBox', 1480);
- });
- this.isFold = this.searchBarWidth('trendAnalysisBox', 1480);
- },
methods: {
getList(params) {
this.timeDim = params.timeDim;
diff --git a/src/views/energy/base/energyPlc/index.vue b/src/views/energy/base/energyPlc/index.vue
index c17eee9a..6aaac02a 100644
--- a/src/views/energy/base/energyPlc/index.vue
+++ b/src/views/energy/base/energyPlc/index.vue
@@ -89,13 +89,13 @@ export default {
param: 'name',
},
{
- type: 'button',
+ type: this.$auth.hasPermi('base:energy-plc:query') ? 'button' : '',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('base:energy-plc:create') ? 'separate' : '',
},
{
type: this.$auth.hasPermi('base:energy-plc:create') ? 'button' : '',
diff --git a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue b/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue
index b49198fb..5ba761bf 100644
--- a/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue
+++ b/src/views/energy/base/energyPlcConnect/components/energyPlcParam.vue
@@ -22,7 +22,9 @@
readonly
style="width: 250px">
-
+
v);
}
},
getList() {
diff --git a/src/views/energy/base/energyPlcConnect/index.vue b/src/views/energy/base/energyPlcConnect/index.vue
index 2c0c103f..48f2ec2d 100644
--- a/src/views/energy/base/energyPlcConnect/index.vue
+++ b/src/views/energy/base/energyPlcConnect/index.vue
@@ -107,13 +107,17 @@ export default {
param: 'cnName',
},
{
- type: 'button',
+ type: this.$auth.hasPermi('base:energy-plc-connect:query')
+ ? 'button'
+ : '',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('base:energy-plc-connect:create')
+ ? 'separate'
+ : '',
},
{
type: this.$auth.hasPermi('base:energy-plc-connect:create')
@@ -127,17 +131,25 @@ export default {
],
tableProps,
tableBtn: [
- this.$auth.hasPermi('base:energy-plc-connect:bind')
+ this.$auth.hasPermiAnd([
+ 'base:energy-plc-param:query',
+ 'base:energy-type:query',
+ ])
? {
type: 'connect',
btnName: '绑定',
}
: undefined,
- {
- type: 'detail',
- btnName: '详情',
- },
- this.$auth.hasPermi('base:energy-plc-connect:update')
+ this.$auth.hasPermi('base:energy-plc-param:query')
+ ? {
+ type: 'detail',
+ btnName: '详情',
+ }
+ : undefined,
+ this.$auth.hasPermiAnd([
+ 'base:energy-plc-connect:update',
+ 'base:energy-plc-connect:query',
+ ])
? {
type: 'edit',
btnName: '编辑',
diff --git a/src/views/energy/base/energyQuantityManual/index.vue b/src/views/energy/base/energyQuantityManual/index.vue
index f4ecaf23..103ae546 100644
--- a/src/views/energy/base/energyQuantityManual/index.vue
+++ b/src/views/energy/base/energyQuantityManual/index.vue
@@ -114,13 +114,20 @@ export default {
defaultSelect: [],
},
{
- type: 'button',
+ type: this.$auth.hasPermi('base:energy-quantity-manual:query')
+ ? 'button'
+ : '',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermiOr([
+ 'base:energy-quantity-manual:export',
+ 'base:energy-quantity-manual:create',
+ ])
+ ? 'separate'
+ : '',
},
{
type: this.$auth.hasPermi('base:energy-quantity-manual:export')
@@ -147,13 +154,19 @@ export default {
// 班次基础信息列表
list: [],
tableBtn: [
- this.$auth.hasPermi('base:energy-quantity-manual:create')
+ this.$auth.hasPermiAnd([
+ 'base:energy-quantity-manual:query',
+ 'base:energy-quantity-manual:create',
+ ])
? {
type: 'meterReading',
btnName: '抄表',
}
: undefined,
- this.$auth.hasPermi('base:energy-quantity-manual:update')
+ this.$auth.hasPermiAnd([
+ 'base:energy-quantity-manual:update',
+ 'base:energy-quantity-manual:query',
+ ])
? {
type: 'edit',
btnName: '编辑',
diff --git a/src/views/energy/base/energyQuantityRealtime/index.vue b/src/views/energy/base/energyQuantityRealtime/index.vue
index 0b496447..347eba19 100644
--- a/src/views/energy/base/energyQuantityRealtime/index.vue
+++ b/src/views/energy/base/energyQuantityRealtime/index.vue
@@ -90,7 +90,9 @@ export default {
width: 350,
},
{
- type: 'button',
+ type: this.$auth.hasPermi('base:energy-quantity-realtime:query')
+ ? 'button'
+ : '',
btnName: '查询',
name: 'search',
color: 'primary',
diff --git a/src/views/energy/base/tableNameConfig/index.vue b/src/views/energy/base/tableNameConfig/index.vue
index 28a88967..baa13ffa 100644
--- a/src/views/energy/base/tableNameConfig/index.vue
+++ b/src/views/energy/base/tableNameConfig/index.vue
@@ -52,7 +52,10 @@ export default {
return {
tableProps,
tableBtn: [
- this.$auth.hasPermi('base:table-name-config:edit')
+ this.$auth.hasPermiAnd([
+ 'base:energy-table:query',
+ 'base:energy-table:update',
+ ])
? {
type: 'edit',
btnName: '编辑',
diff --git a/src/views/energy/monitoring/energyLimit/index.vue b/src/views/energy/monitoring/energyLimit/index.vue
index 4a4d20b9..008f9bf6 100644
--- a/src/views/energy/monitoring/energyLimit/index.vue
+++ b/src/views/energy/monitoring/energyLimit/index.vue
@@ -125,13 +125,17 @@ export default {
param: 'limitType',
},
{
- type: 'button',
+ type: this.$auth.hasPermi('monitoring:energy-limit:query')
+ ? 'button'
+ : '',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('monitoring:energy-limit:create')
+ ? 'separate'
+ : '',
},
{
type: this.$auth.hasPermi('monitoring:energy-limit:create')
diff --git a/src/views/energy/monitoring/energyReport/index.vue b/src/views/energy/monitoring/energyReport/index.vue
index 9ddb9532..cc54942d 100644
--- a/src/views/energy/monitoring/energyReport/index.vue
+++ b/src/views/energy/monitoring/energyReport/index.vue
@@ -113,7 +113,9 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('monitoring:energy-report:export')
+ ? 'separate'
+ : '',
},
{
type: this.$auth.hasPermi('monitoring:energy-report:export')
diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue
index 71f75c18..149254b8 100644
--- a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue
+++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDet.vue
@@ -22,6 +22,7 @@
v);
}
},
getList() {
diff --git a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue
index 4442f837..86eac4c5 100644
--- a/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue
+++ b/src/views/energy/monitoring/energyStatistics/components/energyStatisticsDetAdd.vue
@@ -88,7 +88,9 @@ export default {
type: 'separate',
},
{
- type: 'button',
+ type: this.$auth.hasPermi('monitoring:energy-statistics-det:create')
+ ? 'button'
+ : '',
btnName: '关联',
name: 'add',
color: 'primary',
diff --git a/src/views/energy/monitoring/energyStatistics/index.vue b/src/views/energy/monitoring/energyStatistics/index.vue
index 42c0b26d..f1815c66 100644
--- a/src/views/energy/monitoring/energyStatistics/index.vue
+++ b/src/views/energy/monitoring/energyStatistics/index.vue
@@ -104,7 +104,9 @@ export default {
color: 'primary',
},
{
- type: 'separate',
+ type: this.$auth.hasPermi('monitoring:energy-statistics:create')
+ ? 'separate'
+ : '',
},
{
type: this.$auth.hasPermi('monitoring:energy-statistics:create')
@@ -118,17 +120,22 @@ export default {
],
tableProps,
tableBtn: [
- this.$auth.hasPermi('monitoring:energy-statistics:bind')
+ this.$auth.hasPermi('monitoring:energy-statistics-det:query')
? {
type: 'connect',
btnName: '绑定',
}
: undefined,
- {
- type: 'detail',
- btnName: '详情',
- },
- this.$auth.hasPermi('monitoring:energy-statistics:update')
+ this.$auth.hasPermi('monitoring:energy-statistics:query')
+ ? {
+ type: 'detail',
+ btnName: '详情',
+ }
+ : undefined,
+ this.$auth.hasPermiAnd([
+ 'monitoring:energy-statistics:update',
+ 'monitoring:energy-statistics:query',
+ ])
? {
type: 'edit',
btnName: '编辑',