多语言缩写,马来西亚柴发拓扑图,古楠街微电网拓扑图

This commit is contained in:
huangjp
2026-03-19 16:26:06 +08:00
parent 983a638769
commit 5fc2340fc0
67 changed files with 4161 additions and 663 deletions

View File

@ -17,13 +17,13 @@
>
{{ $t("dashboard.month") }}
</div>
<div
<!-- <div
class="header-title"
:class="{ active: currentType === 'year' }"
@click="selectTime('year')"
>
{{ $t("dashboard.year") }}
</div>
</div> -->
</div>
</div>
<div v-loading="loading" class="charts-box">

View File

@ -14,13 +14,13 @@
>
{{ $t("dashboard.month") }}
</div>
<div
<!-- <div
class="header-title"
:class="{ active: currentType === 'year' }"
@click="selectTime('year')"
>
{{ $t("dashboard.year") }}
</div>
</div> -->
</div>
</div>
<div v-loading="loading" class="charts-box">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1081,7 +1081,6 @@ export default {
const result = changeTheme()
this.configData = config[result]
console.log('配置' + JSON.stringify(this.configData))
setTimeout(() => {
if (this.$store.getters.menuList.length) {
this.permissionId = this.$store.getters.menuList.find(item => {

View File

@ -163,7 +163,8 @@ import pv1AndStorage_sts_261 from './components/top-center/pv1storage-sts-261.vu
import pv2AndStorage_261 from './components/top-center/pv2storage261.vue'
import pv2AndStorage_sts_261 from './components/top-center/pv2storage-sts-261.vue'
import pv8FourthTopCenter from './components/top-center/pv8fourth.vue'
import pv8FourthDieselTopCenter from './components/top-center/pv8FourthDiesel.vue'
import pv3SeventhMiniGrid from './components/top-center/pv3seventhminigrid.vue'
export default {
name: 'Index',
components: {
@ -211,7 +212,9 @@ export default {
pv2AndStorage_261,
pv1AndStorage_sts_261,
pv2AndStorage_sts_261,
pv8FourthTopCenter
pv8FourthTopCenter,
pv3SeventhMiniGrid,
pv8FourthDieselTopCenter
},
props: {},
data() {

View File

@ -7,6 +7,8 @@
</div>
<div class="title">Zetatech smart energy storage management platform</div>
<!-- 测试服务器 -->
<!-- <div class="title">智慧储能管控平台</div> -->
</div>
<el-form
ref="loginForm"
@ -69,6 +71,8 @@
@click.native.prevent="handleLogin"
>
Login
<!-- 测试服务器 -->
<!-- 登录 -->
</el-button>
<!-- <div class="forget-psd">
<lang-select class="set-language" />
@ -105,6 +109,7 @@
// import LangSelect from '@/components/LangSelect'
import SocialSign from './components/SocialSignin'
import logo from '@/assets/login_images/zetatechlogo.png'
// import logo from '@/assets/login_images/zhongzilogo.png'
// import { validURL } from '@/utils/validate'
export default {

View File

@ -30,6 +30,7 @@ export default {
const res = await GetPvRegionalDistribution({
deptId: deptId
})
console.log('大屏环形图', res)
this.initChart(res.data)
} catch (error) {
console.log(error)

View File

@ -2,10 +2,10 @@
<div>
<!-- 触发弹窗的按钮 -->
<el-button v-permission="['sys:remote:connect']" type="primary" icon="el-icon-search" :loading="serachLoading" @click="openDialog">
远程连接
{{ $t('remote.remoteConnection') }}
</el-button>
<el-button v-permission="['sys:remote:connectcustomer']" type="primary" icon="el-icon-search" :loading="serachLoading" @click="openDialog">
远程连接
{{ $t('remote.remoteConnection') }}
</el-button>
<!-- 全屏弹窗 -->
<el-dialog
@ -55,26 +55,32 @@ export default {
},
stationId() {
return this.$store.getters.currentStation.id || undefined
},
userLevel() { // 0内部用户 1 客户一级
return this.$store.getters.userinfo.userLevel || undefined
}
},
mounted() {
window.addEventListener('message', this.handleIframeMessage)
},
beforeDestroy() {
window.removeEventListener('message', this.handleIframeMessage)
},
methods: {
// 打开弹窗并生成带参 iframe 地址
async openDialog() {
try {
// 1. 准备要传入的参数示例IP、端口、用户信息等
await this.getDetails()
const ip = this.stationRemoteDetails.ip
const emsType = this.stationRemoteDetails.type
const port = this.stationRemoteDetails.port
const params = {
userName: this.stationRemoteDetails.userName,
intranetIp: this.stationRemoteDetails.intranetIp,
password: this.stationRemoteDetails.password,
lang: this.language
lang: this.language,
autoLogin: this.userLevel !== 1 ? 'true' : 'false', // 0内部用户 1 客户一级
emsType: emsType
}
// 2. 拼接成带参 URL
this.iframeUrl = `http://${ip}:${port}/${emsType}?${new URLSearchParams(params).toString()}`
// 3. 打开弹窗
this.iframeUrl = `${ip}/${emsType}?${new URLSearchParams(params).toString()}`
this.dialogVisible = true
} catch (error) {
this.dialogVisible = false
@ -84,6 +90,11 @@ export default {
const res = await GetRemoteDetails({ stationId: this.stationId })
this.stationRemoteDetails = Object.assign({}, res.data)
},
handleIframeMessage(event) {
if (event.data?.type === 'EMS_LOGOUT') {
this.closeDialog()
}
},
// 关闭弹窗时,触发 iframe 内的退出登录
closeDialog() {
try {

View File

@ -500,7 +500,6 @@ export default {
try {
const res = await GetTotal(params)
this.totalData = res.data
console.log('收益报表 ', this.totalData)
this.chargeArr = []
this.dischargeArr = []
if (res.data.finish === 0) {

View File

@ -1,57 +1,70 @@
<template>
<div class="energy-wrap">
<el-row :gutter="20">
<el-col :span="24">
<el-form :model="filters" label-width="90px">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="模板名称:">
<el-input v-model="filters.templateName" placeholder="请输入模板名称" />
</el-form-item>
</el-col>
<el-col :span="6" :offset="0">
<el-form-item label="是否启用:">
<el-select
v-model="filters.isEnable"
placeholder="是否启用"
style="width: 100%"
>
<el-option
v-for="item in useList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button type="primary" icon="el-icon-search" :loading="searchLoading" @click="on_refresh">查询</el-button>
<el-button
type="primary"
icon="el-icon-refresh"
class="reset-btn"
:loading="resetLoading"
@click="on_reset"
>重置</el-button>
</el-col>
<el-col :span="8" class="main-btns">
<el-button type="primary" @click="handleAdd">新增</el-button>
<el-button type="danger" :loading="batchDeleteLoading" @click="handleBatchDelete">批量删除</el-button>
<el-button type="primary" class="reset-btn" @click="handleExportTempData">导入</el-button>
<el-button type="primary" class="reset-btn" :loading="downLoading" @click="handleExportTempData">导出</el-button>
<el-button type="primary" class="reset-btn" :loading="downTempLoading" @click="handleExportTemp">导出模板</el-button>
</el-col>
</el-row>
</el-form>
</el-col>
</el-row>
<el-form id="searchForm" :model="filters" label-width="120px">
<el-row :gutter="5" class="search-row">
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
<el-form-item :label="$t('priceConfig.temName') + ':'">
<el-input v-model="filters.templateName" :placeholder="$t('priceConfig.inputTemName')" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
<el-form-item :label="$t('priceConfig.enableOrNot') + ':'">
<el-select
v-model="filters.isEnable"
:placeholder="$t('priceConfig.enableOrNot')"
style="width: 100%"
>
<el-option
v-for="item in useList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
<el-form-item :label="$t('priceConfig.validTime') + ':'">
<el-date-picker
v-model="filters.time"
style="width: 100%"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="~"
:start-placeholder="$t('priceConfig.startTime')"
:end-placeholder="$t('priceConfig.endTime')"
@change="selectFilterTime"
/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
<el-button type="primary" icon="el-icon-search" :loading="searchLoading" @click="on_refresh">{{ $t('priceConfig.query') }}</el-button>
<el-button
type="primary"
icon="el-icon-refresh"
class="reset-btn"
:loading="resetLoading"
@click="on_reset"
>{{ $t('priceConfig.reset') }}</el-button>
</el-col>
<el-col xs="24" sm="24" class="btn-group-col">
<el-button type="primary" @click="handleAdd">{{ $t('priceConfig.add') }}</el-button>
<el-button type="danger" :loading="batchDeleteLoading" @click="handleBatchDelete">{{ $t('priceConfig.batchDelete') }}</el-button>
<el-upload class="upload-demo" :action="uploadUrl" :headers="headers" :data="uploadData" :show-file-list="false" :file-list="fileList" :on-success="handleOnSuccess" :on-error="handleOnError">
<el-button type="primary" class="reset-btn">{{ $t('priceConfig.import') }}</el-button>
</el-upload>
<el-button type="primary" class="reset-btn" :loading="downLoading" @click="handleExportTempData">{{ $t('priceConfig.export') }}</el-button>
<el-button type="primary" class="reset-btn" :loading="downTempLoading" @click="handleExportTemp">{{ $t('priceConfig.exportTem') }}</el-button>
</el-col>
</el-row>
</el-form>
<div class="table-box">
<el-table
v-loading="tableLoading"
header-align="center"
:height="$setTableHeight(120)"
:height="$setAutoTableHeight(86,searchHeight)"
:data="tableData"
style="width: 100%"
:span-method="firmSpanMethod"
@ -67,56 +80,68 @@
/>
<el-table-column
prop="templateNo"
label="模板编号"
:label="$t('priceConfig.temNum')"
align="center"
/>
<el-table-column
prop="templateName"
label="模板名称"
:label="$t('priceConfig.temName')"
align="center"
/>
<el-table-column
prop="beginTime"
label="时间段开始"
:label="$t('priceConfig.startTime')"
align="center"
/>
<el-table-column
prop="endTime"
label="时间段结束"
:label="$t('priceConfig.endTime')"
align="center"
/>
<el-table-column
prop="type"
label="用电类型"
:label="$t('priceConfig.eleType')"
align="center"
/>
<el-table-column
prop="price"
label="价格"
:label="$t('priceConfig.price')"
align="center"
/>
<el-table-column
prop="isEnable"
label="是否启用"
:label="$t('priceConfig.enableOrNot')"
align="center"
>
<template slot-scope="scope">
<div v-if="scope.row.isEnable === 0">
禁用
{{ $t('priceConfig.disEnable') }}
</div>
<div v-else style="color:#4EFFD8">
启用
{{ $t('priceConfig.enable') }}
</div>
</template>
</el-table-column>
<el-table-column
prop="updateTime"
label="修改时间"
prop="validityStartTime"
:label="$t('priceConfig.validStartTime')"
align="center"
/>
<el-table-column
label="操作"
prop="validityEndTime"
:label="$t('priceConfig.validEndTime')"
align="center"
/>
<el-table-column
prop="updateTime"
:label="$t('priceConfig.updateTime')"
align="center"
/>
<el-table-column
:label="$t('priceConfig.operation')"
align="center"
width="160"
>
@ -125,20 +150,20 @@
type="text"
size="mini"
@click="handleEdit(scope.row)"
>编辑</el-button>
>{{ $t('priceConfig.edit') }}</el-button>
<el-button
type="text"
size="mini"
class="btn-delete-table-text"
@click="handleDelete(scope.row)"
>删除</el-button>
>{{ $t('priceConfig.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog
:append-to-body="false"
:title="operateType === 1 ? '新增电价曲线模板':'编辑电价曲线模板'"
:title="operateType === 1 ? $t('priceConfig.addEleCurveTem'):$t('priceConfig.EditEleCurveTem')"
:visible.sync="addShow"
width="60%"
top="5px"
@ -149,49 +174,30 @@
>
<el-row>
<el-col :span="24">
<el-form ref="topForm" :model="operateInfo.formInfo" :rules="formRules" label-width="120px">
<el-form ref="topForm" :model="operateInfo.formInfo" :rules="formRules" label-width="140px">
<el-row :gutter="10">
<el-col :span="7">
<el-form-item label="模板编号:" prop="templateNo">
<el-input v-model="operateInfo.formInfo.templateNo" placeholder="请输入模板编号" />
<el-form-item v-if="operateType !== 1" :label="$t('priceConfig.temNum') + ':'" prop="templateNo">
<el-input v-model="operateInfo.formInfo.templateNo" :placeholder="$t('priceConfig.inputTemNum')" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="模板名称:" prop="templateName">
<el-input v-model="operateInfo.formInfo.templateName" placeholder="请输入模板名称" />
<el-form-item :label="$t('priceConfig.temName') + ':'" prop="templateName">
<el-input v-model="operateInfo.formInfo.templateName" :placeholder="$t('priceConfig.inputTemName')" />
</el-form-item>
</el-col>
<el-col :span="3" class="main-btns">
<el-button type="primary" @click="handleAddPeriod">添加</el-button>
<el-button type="primary" @click="handleAddPeriod">{{ $t('priceConfig.add') }}</el-button>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="7">
<el-form-item label="所属电站:" prop="stationId">
<el-select
v-model="operateInfo.formInfo.stationId"
placeholder="选择所属电站"
filterable
@change="changeSelectStation"
>
<el-option
v-for="item in stations"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="是否启用:" prop="isEnable">
<el-form-item :label="$t('priceConfig.enableOrNot') + ':'" prop="isEnable">
<el-select
v-model="operateInfo.formInfo.isEnable"
placeholder="是否启用"
:placeholder="$t('priceConfig.enableOrNot')"
>
<el-option
v-for="item in useList"
@ -202,7 +208,40 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item :label="$t('priceConfig.eleFactor') + ':'" prop="discount">
<el-input-number
v-model="operateInfo.formInfo.discount"
:max="100000"
:min="0.0001"
:placeholder="$t('priceConfig.inputEleFactor')"
style="width: 100%;"
:controls="false"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="14">
<el-form-item :label="$t('priceConfig.temValid') + ':'" prop="time">
<el-date-picker
v-model="operateInfo.formInfo.time"
style="width: 100%"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="~"
:start-placeholder="$t('priceConfig.startTime')"
:end-placeholder="$t('priceConfig.endTime')"
@change="selectTime"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-col>
</el-row>
@ -219,7 +258,7 @@
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" prop="beginTime" label="时间段开始">
<el-table-column align="center" prop="beginTime" :label="$t('priceConfig.startTime')">
<template slot-scope="scope">
<el-form-item :prop="'list.' + scope.$index +'.beginTime'" :rules="rules2.beginTime" style="margin-left: 0;">
<el-time-picker
@ -228,13 +267,14 @@
style="width: 80%;"
format="HH:mm"
value-format="HH:mm"
placeholder="起始时间"
:clearable="false"
:placeholder="$t('priceConfig.startTime')"
@change="selectBeginTime(scope.row.beginTime,scope.$index)"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column align="center" prop="endTime" label="时间段结束">
<el-table-column align="center" prop="endTime" :label="$t('priceConfig.endTime')">
<template slot-scope="scope">
<el-form-item :prop="'list.' + scope.$index +'.endTime'" :rules="rules2.endTime" style="margin-left: 0;">
<el-time-picker
@ -243,30 +283,46 @@
style="width: 80%;"
value-format="HH:mm"
format="HH:mm"
placeholder="截至时间"
:placeholder="$t('priceConfig.endTime')"
:clearable="false"
@change="selectEndTime(scope.row.endTime,scope.$index)"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column align="center" prop="type" label="类型">
<el-table-column align="center" prop="type" :label="$t('priceConfig.type')">
<template slot-scope="scope">
<el-form-item :prop="'list.' + scope.$index +'.price'" style="margin-left: 0;">
<el-input v-model="scope.row.type" maxlength="9" style="width: 80%;" @input="changeType(scope.row.p,scope.$index )" />
<el-select v-model="scope.row.type" :placeholder="$t('priceConfig.selectType')">
<el-option
v-for="item in eleTypeList"
:key="item.label"
:label="item.label"
:value="item.label"
/>
</el-select>
<!-- <el-input v-model="scope.row.type" maxlength="9" style="width: 80%;" @input="changeType(scope.row.p,scope.$index )" /> -->
</el-form-item>
</template>
</el-table-column>
<el-table-column align="center" prop="p" label="电价(元)">
<el-table-column align="center" prop="p" :label="$t('priceConfig.electrovalency')">
<template slot-scope="scope">
<el-form-item :prop="'list.' + scope.$index +'.price'" :rules="rules2.price" style="margin-left: 0;">
<el-input v-model="scope.row.price" maxlength="9" style="width: 80%;" type="number" @input="changePrice(scope.row.p,scope.$index )" />
<el-input-number
v-model="scope.row.price"
style="width: 100%;"
:controls="false"
@input="changePrice(scope.row.p,scope.$index )"
/>
<!-- <el-input v-model.number="scope.row.price" maxlength="9" style="width: 80%;" type="number" @input="changePrice(scope.row.p,scope.$index )" /> -->
</el-form-item>
</template>
</el-table-column>
<el-table-column
label="操作"
:label="$t('priceConfig.operation')"
align="center"
width="160"
>
@ -276,20 +332,20 @@
size="mini"
class="btn-delete-table-text"
@click="handleDeletePeriod(scope.row,scope.$index)"
>删除</el-button>
>{{ $t('priceConfig.delete') }}</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<div class="chart">
<div class="chart" style="height: 250px;">
<!-- <chart v-if="operateType === 2" :options="operateInfo.curves" /> -->
<chart :options="operateInfo.list" />
</div>
<span slot="footer" class="dialog-footer">
<el-button style="background-color: #0094ff;" type="primary" :loading="submitLoading" @click="handleSureOperate"> </el-button>
<el-button @click="handleCancelOperate"> </el-button>
<el-button style="background-color: #0094ff;" type="primary" :loading="submitLoading" @click="handleSureOperate">{{ $t('priceConfig.sure') }}</el-button>
<el-button @click="handleCancelOperate">{{ $t('priceConfig.cancel') }}</el-button>
</span>
</el-dialog>
@ -297,8 +353,8 @@
</template>
<script>
import chart from './chart'
import { GetElecPriceCurveAll, GetElecPriceCurveOne, DeletePriceCurveOne, DeletePriceCurve, AddElecPriceCurveOne, UpdateElecPriceCurveOne } from '@/api/revenue-management/price-configuration'
import chart from '../components/chart.vue'
import { GetElecPriceCurveAll, AddSearch, GetElecPriceCurveOne, DeletePriceCurveOne, DeletePriceCurve, AddElecPriceCurveOne, UpdateElecPriceCurveOne } from '@/api/revenue-management/price-configuration'
import { handleDownExcel } from '@/utils'
import { getToken } from '@/utils/auth'
export default {
@ -308,16 +364,21 @@ export default {
/** 筛选条件 */
filters: {
templateName: '',
isEnable: ''
isEnable: '',
time: [],
validityStartTime: '',
validityEndTime: ''
},
uploadUrl: process.env.VUE_APP_BASE_API + '/business/elecPriceCurve/importExcel',
headers: {
authorization: getToken(),
lang: sessionStorage.getItem('language') ? sessionStorage.getItem('language') : 'zh_CN',
stationId: undefined
lang: sessionStorage.getItem('language') ? sessionStorage.getItem('language') : 'zh_CN'
},
uploadData: { stationId: null },
fileList: [],
cellList: [],
useList: [{ label: '是', value: 1 }, { label: '否', value: 0 }],
useList: [{ label: this.$t('priceConfig.enable'), value: 1 }, { label: this.$t('priceConfig.disEnable'), value: 0 }],
searchLoading: false,
resetLoading: false,
batchDeleteLoading: false,
@ -331,7 +392,11 @@ export default {
templateNo: '',
templateName: '',
stationId: '',
isEnable: ''
isEnable: '',
discount: undefined,
time: [],
validityStartTime: null,
validityEndTime: null
},
list: []
},
@ -339,7 +404,9 @@ export default {
operateType: 1, // '新增计划曲线模板':'编辑计划曲线模板'",
// stations: [],
rules2: {},
formRules: {},
formRules: {
time: [{ required: true, message: this.$t('priceConfig.selectTemValid'), trigger: 'blur' }]
},
selectIds: [],
currentIndex: ''
@ -351,6 +418,15 @@ export default {
},
currentStation() {
return this.$store.getters.currentStation || undefined
},
eleTypeList() {
return this.$store.getters.dicts['electrovalence_type'] || []
},
searchHeight() {
return this.$store.getters.searchHeight
},
language() {
return this.$store.getters.language || undefined
}
},
watch: {
@ -358,14 +434,46 @@ export default {
handler(val) {
if (val && val.id) {
this.filters.stationId = val.id
this.uploadData.stationId = val.id
this.getAllCurveTemp()
}
},
deep: true,
immediate: true
}
},
language: {
handler() {
this.useList = [{ label: this.$t('priceConfig.enable'), value: 1 }, { label: this.$t('priceConfig.disEnable'), value: 0 }]
}
},
deep: true
},
methods: {
selectFilterTime(val) {
this.filters.validityStartTime = val[0]
this.filters.validityEndTime = val[1]
},
async getAddSearch() {
const params = {
stationId: this.filters.stationId
}
const res = await AddSearch(params)
this.operateInfo = {
formInfo: {
id: res.data.id,
templateNo: res.data.templateNo,
stationId: res.data.stationId,
stationName: res.data.stationName,
templateName: res.data.templateName,
isEnable: res.data.isEnable,
discount: res.data.discount === null ? undefined : res.data.discount,
time: [res.data.validityStartTime, res.data.validityEndTime],
validityStartTime: res.data.validityStartTime,
validityEndTime: res.data.validityEndTime
},
list: [...res.data.list]
}
},
/** 获取所有电价曲线模板 */
async getAllCurveTemp() {
try {
@ -374,6 +482,8 @@ export default {
stationId: this.filters.stationId,
templateName: this.filters.templateName,
isEnable: this.filters.isEnable,
validityStartTime: this.filters.validityStartTime,
validityEndTime: this.filters.validityEndTime,
elecType: 2
}
const res = await GetElecPriceCurveAll(param)
@ -399,7 +509,10 @@ export default {
this.filters = {
templateName: '',
isEnable: '',
stationId: this.filters.stationId
stationId: this.filters.stationId,
time: [],
validityStartTime: '',
validityEndTime: ''
}
await this.getAllCurveTemp()
this.resetLoading = false
@ -409,19 +522,20 @@ export default {
handleAdd() {
this.addShow = true
this.operateType = 1
this.getAddSearch()
},
/** 批量删除 */
async handleBatchDelete() {
if (this.selectIds.length === 0) {
return this.$message({
message: '请选择要删除的数据',
message: this.$t('priceConfig.noSelectData'),
type: 'warning'
})
}
this.$confirm('是否删除此模板?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
this.$confirm(this.$t('priceConfig.deleteTip'), this.$t('priceConfig.tip'), {
confirmButtonText: this.$t('priceConfig.sure'),
cancelButtonText: this.$t('priceConfig.cancel'),
type: 'warning',
showClose: false,
center: true
@ -435,10 +549,10 @@ export default {
ids: ids
}
DeletePriceCurve(params).then(res => {
this.$message.success('删除成功')
this.$message.success(this.$t('priceConfig.delSuccess'))
this.getAllCurveTemp()
}).catch(() => {
this.$message.error('删除失败')
this.$message.error(this.$t('priceConfig.delFail'))
}).finally(() => {
this.batchDeleteLoading = false
})
@ -449,7 +563,7 @@ export default {
handleExportTempData() {
if (this.selectIds.length === 0) {
return this.$message({
message: '请选择要导出的数据',
message: this.$t('priceConfig.noSelectData'),
type: 'warning'
})
}
@ -459,7 +573,7 @@ export default {
})
this.downLoading = true
const params = {
title: '电价曲线',
title: this.$t('priceConfig.eleCurve'),
ids: ids
}
handleDownExcel('/business/elecPriceCurve/exportExcel', params, (callback) => {
@ -473,18 +587,44 @@ export default {
const self = this
self.downTempLoading = true
const params = {
title: '电价曲线模板'
title: this.$t('priceConfig.eleCurveTem')
}
handleDownExcel('/business/elecPriceCurve/exportTemplate', params, (callback) => {
console.log(callback)
self.downTempLoading = false
})
},
handleOnSuccess(file, fileList) {
if (file.code === 200) {
this.$notify({
title: this.$t('priceConfig.tip'),
message: file.msg,
type: 'success',
duration: 2000
})
this.getAllCurveTemp()
} else {
this.$notify({
title: this.$t('priceConfig.tip'),
message: file.msg,
type: 'error',
duration: 2000
})
}
},
handleOnError(file, fileList) {
this.$notify({
title: this.$t('priceConfig.tip'),
message: file.msg,
type: 'error',
duration: 2000
})
},
/** 合并行 */
firmSpanMethod({ row, column, rowIndex, columnIndex }) {
// 合并列
// 判断列的属性
if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9) {
if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11) {
// console.log('单元格数组若下一项为0则代表合并上一项', this.cellList)
const rowCell = this.cellList[rowIndex]
@ -535,6 +675,10 @@ export default {
}
}
},
selectTime(val) {
this.operateInfo.formInfo.validityStartTime = val[0]
this.operateInfo.formInfo.validityEndTime = val[1]
},
handleTableSelection(val) {
this.selectIds = val
},
@ -564,7 +708,11 @@ export default {
stationId: res.data.stationId,
stationName: res.data.stationName,
templateName: res.data.templateName,
isEnable: res.data.isEnable
isEnable: res.data.isEnable,
discount: res.data.discount === null ? undefined : res.data.discount,
time: [res.data.validityStartTime, res.data.validityEndTime],
validityStartTime: res.data.validityStartTime,
validityEndTime: res.data.validityEndTime
},
list: [...res.data.list]
}
@ -573,9 +721,9 @@ export default {
},
/** 删除 */
handleDelete(row) {
this.$confirm('是否删除此模板?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
this.$confirm(this.$t('priceConfig.deleteTip'), this.$t('priceConfig.tip'), {
confirmButtonText: this.$t('priceConfig.sure'),
cancelButtonText: this.$t('priceConfig.cancel'),
type: 'warning',
showClose: false,
center: true
@ -585,13 +733,13 @@ export default {
}
if (!row.isEnable) {
DeletePriceCurveOne(params).then(() => {
this.$message.success('删除成功')
this.$message.success(this.$t('priceConfig.delSuccess'))
this.getAllCurveTemp()
}).catch(() => {
this.$message.warning('删除失败')
this.$message.warning(this.$t('priceConfig.delFail'))
})
} else {
this.$message.warning('请禁用后删除')
this.$message.warning(this.$t('priceConfig.disableDel'))
}
})
},
@ -638,7 +786,9 @@ export default {
stationId: undefined,
templateName: '',
templateNo: '',
isEnable: undefined
isEnable: undefined,
discount: undefined,
time: []
},
list: []
}
@ -663,7 +813,7 @@ export default {
this.operateInfo.list[index + 1].beginTime = val
}
if (this.timeStamp(val) < this.timeStamp(this.operateInfo.list[index].beginTime)) {
this.$message.warning('截至时间不能小于起始时间')
this.$message.warning(this.$t('priceConfig.endTimeError'))
this.operateInfo.list[index].endTime = this.operateInfo.list[index].beginTime
}
},
@ -696,8 +846,8 @@ export default {
})
if (c > 0) {
this.$notify({
title: '提示',
message: '时间设置错误,开始时间不能与结束时间相同',
title: this.$t('priceConfig.tip'),
message: this.$t('priceConfig.timeError'),
type: 'warning',
duration: 2000
})
@ -732,7 +882,7 @@ export default {
AddElecPriceCurveOne(params).then(res => {
if (res.code === 200) {
this.$notify({
title: '新增成功',
title: this.$t('priceConfig.tip'),
message: res.msg,
type: 'success',
duration: 2000
@ -741,7 +891,7 @@ export default {
this.getAllCurveTemp()
} else {
this.$notify({
title: '新增提示',
title: this.$t('priceConfig.tip'),
message: res.msg,
type: 'warning',
duration: 2000
@ -763,7 +913,7 @@ export default {
UpdateElecPriceCurveOne(params).then(res => {
if (res.code === 200) {
this.$notify({
title: '修改成功',
title: this.$t('priceConfig.tip'),
message: res.msg,
type: 'success',
duration: 2000
@ -772,7 +922,7 @@ export default {
this.getAllCurveTemp()
} else {
this.$notify({
title: '修改提示',
title: this.$t('priceConfig.tip'),
message: res.msg,
type: 'warning',
duration: 2000
@ -793,6 +943,10 @@ export default {
.energy-wrap{
width: 100%;
height: 100%;
.search-row{
display: flex;
flex-wrap: wrap;
}
.main-btns {
text-align: right;
// padding: 10px 20px;

View File

@ -34,13 +34,13 @@
class="reset-btn"
:loading="downLoadingReport"
@click="handleExportReport"
>{{ $t("state.exportBill") }}</el-button>
>{{ $t("state.exportBill") }}</el-button> -->
<el-button
type="primary"
class="reset-btn"
:loading="downLoading"
@click="handleExportTempData"
>{{ $t("state.exportReport") }}</el-button> -->
>{{ $t("state.exportReport") }}</el-button>
</el-col>
</el-row>
</el-form>
@ -120,7 +120,7 @@
<div class="center">
<ItemBox :title="$t('state.monthlyPowerGeneration')">
<div v-loading="loading" class="charts-box">
<div v-loading="load_data" class="charts-box">
<Chart
ref="chart"
:key="key"
@ -135,16 +135,16 @@
<ItemBox :title="$t('state.projectRevenue')">
<div class="box">
<div class="value-box">
<div class="title">{{ $t("state.monthlyPVpowerGeneration") }}</div>
<div class="title">{{ $t("state.monthlyIncome") }}</div>
<div class="bottom-value">
<div class="value">
{{ totalData.monthIncone }}
<span class="unit">kWh</span>
<span class="unit">{{ $t("state.rmb") }}</span>
</div>
</div>
</div>
<div class="value-box">
<div class="title">{{ $t("state.monthlyIncome") }}</div>
<div class="title">{{ $t("realTimeMonitor.sophCharging.accruedIncome") }}</div>
<div class="bottom-value">
<div class="value">
{{ totalData.totalIncome }}
@ -252,8 +252,7 @@ export default {
powerOptions: undefined,
currentType: 'day',
color: ['#4197FF'],
key: 0,
dontClick: true
key: 0
}
},
computed: {
@ -278,20 +277,17 @@ export default {
}
},
mounted() {
const currentData = []
for (let i = 1; i < 32; i++) {
currentData.push({
date: i,
chargeElec: Number((Math.random() * 50 + 30).toFixed(2))
})
}
this.initCharts(currentData, 1)
// const currentData = []
// for (let i = 1; i < 32; i++) {
// currentData.push({
// date: i,
// chargeElec: Number((Math.random() * 50 + 30).toFixed(2))
// })
// }
// this.initCharts(currentData, 1)
},
methods: {
closeComputed() {
if (this.dontClick) {
return
}
this.computedShow = false
if (this.timer) {
clearInterval(this.timer)
@ -347,9 +343,6 @@ export default {
return percentage === 100 ? this.$t('state.finish') : `${percentage}%`
},
async sureComputed() {
if (this.dontClick) {
return
}
const that = this
if (this.filter.time.length === 0) {
this.$message.warning(this.$t('state.selectComputedTime'))
@ -403,10 +396,10 @@ export default {
} catch (error) {
console.log(error)
} finally {
// console.log(error);
// console.log(error)
}
const res = await GetTotal(params)
this.initCharts(res.data)
// const res = await GetTotal(params)
// this.initCharts(res.data)
},
async get_table_data() {
this.load_data = true
@ -416,7 +409,7 @@ export default {
}
try {
const res = await GetTotal(params)
await getPvMonthData(params)
this.getPvMonthData(params)
this.totalData = res.data
if (res.data.finish === 0) {
this.$message.warning(`${this.$t('state.computeding')}${res.data.progress}${this.$t('state.laterQuery')}`)
@ -428,9 +421,6 @@ export default {
}
},
handleExportReport() {
if (this.dontClick) {
return
}
this.downLoadingReport = true
const params = {
title: this.$t('state.bill'),
@ -447,9 +437,6 @@ export default {
)
},
handleExportTempData() {
if (this.dontClick) {
return
}
this.downLoading = true
const params = {
title: this.$t('state.earningReport'),
@ -457,7 +444,7 @@ export default {
time: this.month
}
handleDownExcel(
'/business/earningsCalculate/export',
'/business/earningsCalculate/exportPv',
params,
(callback) => {
console.log(callback)
@ -466,9 +453,6 @@ export default {
)
},
handleComputeReport() {
if (this.dontClick) {
return
}
this.computedShow = true
this.getProgress()
},
@ -507,7 +491,7 @@ export default {
},
formatter: (params) => {
// 获取xAxis data中的数据
let dataStr = `<div><p style="font-weight:bold;margin:0 8px 15px;">${this.month}-${params[0].name}</p></div>`
let dataStr = `<div><p style="font-weight:bold;margin:0 8px 15px;">${params[0].name}</p></div>`
params.forEach((item) => {
dataStr += `<div>
<div style="margin: 0 8px;">

View File

@ -32,7 +32,9 @@ const topCenterList = [
{ label: '261光储1单柜(STS)', value: 'pv1AndStorage_sts_261' }, // 新增
{ label: '261光储2单柜', value: 'pv2AndStorage_261' }, // 新增
{ label: '261光储2单柜(STS)', value: 'pv2AndStorage_sts_261' },
{ label: 'PV8四并一', value: 'pv8FourthTopCenter' }
{ label: 'PV8四并一', value: 'pv8FourthTopCenter' },
{ label: 'PV3七并一', value: 'pv3SeventhMiniGrid' },
{ label: 'PV8四并一(柴发)', value: 'pv8FourthDieselTopCenter' }
]
const rightTopList = [
{ label: '实时告警', value: 'topRight' },

View File

@ -65,14 +65,14 @@
{{ scope.row.ip }}
</template>
</el-table-column>
<el-table-column
<!-- <el-table-column
label="端口"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.port }}
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
label="类型"
show-overflow-tooltip
@ -153,22 +153,22 @@
/>
</el-select>
</el-form-item>
<el-form-item label="远程IP" prop="ip">
<el-form-item label="远程地址" prop="ip">
<el-input
v-model="remote.ip"
type="text"
maxlength="200"
placeholder="请输入远程访问IP(例:255.255.255.255)"
placeholder="请输入远程访问域名(例:www.baidu.com)"
/>
</el-form-item>
<el-form-item label="端口" prop="port">
<!-- <el-form-item label="端口" prop="port">
<el-input
v-model="remote.port"
type="text"
maxlength="200"
placeholder="请输入远程访问端口"
placeholder="(ip地址需要输入端口)请输入远程访问端口"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="类型" prop="type">
<el-input
v-model="remote.type"
@ -232,7 +232,7 @@ const defaultRemote = {
intranetIp: '',
ip: '',
password: '',
port: '',
// port: '',
stationId: null,
type: '',
userName: ''