projects/mesxc-zjl #324

Merged
juzi merged 3 commits from projects/mesxc-zjl into projects/mesxc-test 2024-04-10 17:39:30 +08:00
15 changed files with 102 additions and 147 deletions
Showing only changes of commit 7c5d8bde0b - Show all commits

View File

@ -1,8 +1,7 @@
<template>
<div
class="searchBarBox divHeight"
ref="searchBarRef"
:style="{ paddingRight: isFold ? '55px' : '0px' }">
ref="searchBarRef">
<el-form
:inline="true"
class="demo-form-inline">
@ -200,13 +199,6 @@
</el-button>
</el-form-item>
</el-form>
<span
v-if="isFold"
class="foldClass"
@click="switchMode">
{{ isExpand ? '收起' : '展开' }}
<svg-icon :icon-class="isExpand ? 'upward' : 'downward'" />
</span>
</div>
</template>
<script>
@ -217,16 +209,8 @@ import { getFactoryList } from '@/api/core/base/factory';
import moment from 'moment';
export default {
name: 'searchArea',
props: {
isFold: {
//
type: Boolean,
default: false,
},
},
data() {
return {
isExpand: false, //
//
queryParams: {
energyTypeId: null,
@ -525,16 +509,6 @@ export default {
let value = new Date(newData).getTime();
return value;
},
switchMode() {
//
this.isExpand = !this.isExpand;
const element = this.$refs.searchBarRef;
if (this.isExpand) {
element.classList.remove('divHeight');
} else {
element.classList.add('divHeight');
}
},
},
};
</script>
@ -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;

View File

@ -4,7 +4,6 @@
id="contrastAnalysisBox">
<!-- 搜索工作栏 -->
<search-area
:isFold="isFold"
@submit="getList"
@export="exportExl" />
<div v-show="chartData.length">
@ -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;

View File

@ -1,8 +1,7 @@
<template>
<div
class="searchBarBox divHeight"
ref="searchBarRef"
:style="{ paddingRight: isFold ? '55px' : '0px' }">
class="searchBarBox"
ref="searchBarRef">
<el-form
:inline="true"
class="demo-form-inline">
@ -172,9 +171,9 @@
</el-button>
<span
class="separateStyle"
v-hasPermi="['analysis:trend-analysis:export']"></span>
v-hasPermi="['analysis:energy-analysis:query']"></span>
<el-button
v-hasPermi="['analysis:trend-analysis:export']"
v-hasPermi="['analysis:energy-analysis:query']"
type="primary"
size="small"
plain
@ -183,13 +182,6 @@
</el-button>
</el-form-item>
</el-form>
<span
v-if="isFold"
class="foldClass"
@click="switchMode">
{{ isExpand ? '收起' : '展开' }}
<svg-icon :icon-class="isExpand ? 'upward' : 'downward'" />
</span>
</div>
</template>
<script>
@ -198,16 +190,8 @@ import { getEnergyTypeListAll } from '@/api/base/energyType';
import moment from 'moment';
export default {
name: 'searchArea',
props: {
isFold: {
//
type: Boolean,
default: false,
},
},
data() {
return {
isExpand: false, //
//
queryParams: {
energyTypeId: null,
@ -509,16 +493,6 @@ export default {
let value = new Date(newData).getTime();
return value;
},
switchMode() {
//
this.isExpand = !this.isExpand;
const element = this.$refs.searchBarRef;
if (this.isExpand) {
element.classList.remove('divHeight');
} else {
element.classList.add('divHeight');
}
},
},
};
</script>
@ -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;

View File

@ -4,7 +4,6 @@
id="trendAnalysisBox">
<!-- 搜索工作栏 -->
<search-area
:isFold="isFold"
@submit="getList"
@export="exportExl" />
<div v-show="chartData.length">
@ -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;

View File

@ -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' : '',

View File

@ -22,7 +22,9 @@
readonly
style="width: 250px"></el-input>
</el-form-item>
<el-form-item v-if="showBtn">
<el-form-item
v-if="showBtn"
v-hasPermi="['base:energy-plc-param:create']">
<el-button
type="success"
size="small"
@ -160,15 +162,19 @@ export default {
this.drawerTitle = '参数绑定';
this.showBtn = true;
this.tableBtn = [
{
type: 'edit',
btnName: '编辑',
},
{
type: 'delete',
btnName: '删除',
},
];
this.$auth.hasPermi('base:energy-plc-param:update')
? {
type: 'edit',
btnName: '编辑',
}
: undefined,
this.$auth.hasPermi('base:energy-plc-param:delete')
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v);
}
},
getList() {

View File

@ -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: '编辑',

View File

@ -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: '编辑',

View File

@ -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',

View File

@ -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: '编辑',

View File

@ -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')

View File

@ -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')

View File

@ -22,6 +22,7 @@
</el-form-item>
<el-form-item>
<el-button
v-hasPermi="['monitoring:energy-statistics-det:query']"
type="success"
size="small"
v-if="showBtn"
@ -30,6 +31,7 @@
新增
</el-button>
<el-button
v-hasPermi="['monitoring:energy-statistics-det:delete']"
type="danger"
size="small"
v-if="showBtn"
@ -161,11 +163,13 @@ export default {
this.drawerTitle = '参数绑定';
this.showBtn = true;
this.tableBtn = [
{
type: 'delete',
btnName: '删除',
},
];
this.$auth.hasPermi('monitoring:energy-statistics-det:delete')
? {
type: 'delete',
btnName: '删除',
}
: undefined,
].filter((v) => v);
}
},
getList() {

View File

@ -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',

View File

@ -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: '编辑',