8.19 提交

master
zz 3 months ago
parent f8d40329be
commit 62e90e9b81

@ -40,8 +40,10 @@ export const ElectricityDateApi = {
getElectricityDatePage: async (params: any) => {
return await request.get({ url: `/cloud/billing-date/page`, params })
},
//获取modelId的列表
getElectricityDatenew: async (params: any) => {
return await request.get({ url: `/electricity-date/list`, params })
return await request.get({ url: `/cloud/billing-date/list`, params })
},
// 查询电价模型月份详情

@ -1,68 +1,73 @@
import request from '@/config/axios'
// 电价模型月份 VO
export interface ElectricityDateVO {
// 电网电价月份模型 ID
id: number
// 电网电价模型id
priceId: number
// 计费模型名称
name: string
// 时段数量
periodsAmount: number
// 序列
no: number
// 开始日期
startDate: string
// 结束日期
endDate: string
// 尖电价
theTipPrice: number
// 峰电价
peakPrice: number
// 平电价
flatPrice: number
// 谷电价
theValleyPrice: number
// 是否启用:0启用;1禁用
status: number
// 备注
remark: string
// 数据来源:0:云平台;1;三方运营商
source: number
// 唯一编码
code: string
}
// 电价模型月份 API
export const ElectricityDateApi = {
// 查询电价模型月份分页
getElectricityDatePage: async (params: any) => {
return await request.get({ url: `/cloud/electricity-date/page`, params })
},
// 查询电价模型月份详情
getElectricityDate: async (id: number) => {
return await request.get({ url: `/cloud/electricity-date/get?id=` + id })
},
// 新增电价模型月份
createElectricityDate: async (data: ElectricityDateVO) => {
return await request.post({ url: `/cloud/electricity-date/create`, data })
},
// 修改电价模型月份
updateElectricityDate: async (data: ElectricityDateVO) => {
return await request.put({ url: `/cloud/electricity-date/update`, data })
},
// 删除电价模型月份
deleteElectricityDate: async (id: number) => {
return await request.delete({ url: `/cloud/electricity-date/delete?id=` + id })
},
// 导出电价模型月份 Excel
exportElectricityDate: async (params) => {
return await request.download({ url: `/cloud/electricity-date/export-excel`, params })
},
}
import request from '@/config/axios'
// 电价模型月份 VO
export interface ElectricityDateVO {
// 电网电价月份模型 ID
id: number
// 电网电价模型id
priceId: number
// 计费模型名称
name: string
// 时段数量
periodsAmount: number
// 序列
no: number
// 开始日期
startDate: string
// 结束日期
endDate: string
// 尖电价
theTipPrice: number
// 峰电价
peakPrice: number
// 平电价
flatPrice: number
// 谷电价
theValleyPrice: number
// 是否启用:0启用;1禁用
status: number
// 备注
remark: string
// 数据来源:0:云平台;1;三方运营商
source: number
// 唯一编码
code: string
}
// 电价模型月份 API
export const ElectricityDateApi = {
// 查询电价模型月份分页
getElectricityDatePage: async (params: any) => {
return await request.get({ url: `/cloud/electricity-date/page`, params })
},
// 查询电价模型月份详情
getElectricityDate: async (id: number) => {
return await request.get({ url: `/cloud/electricity-date/get?id=` + id })
},
// 获得电价模型月份列表
getElectricityList: async (params: any) => {
return await request.get({ url: `/cloud/electricity-date/list`, params })
},
// 新增电价模型月份
createElectricityDate: async (data: ElectricityDateVO) => {
return await request.post({ url: `/cloud/electricity-date/create`, data })
},
// 修改电价模型月份
updateElectricityDate: async (data: ElectricityDateVO) => {
return await request.put({ url: `/cloud/electricity-date/update`, data })
},
// 删除电价模型月份
deleteElectricityDate: async (id: number) => {
return await request.delete({ url: `/cloud/electricity-date/delete?id=` + id })
},
// 导出电价模型月份 Excel
exportElectricityDate: async (params) => {
return await request.download({ url: `/cloud/electricity-date/export-excel`, params })
},
}

@ -1,12 +1,12 @@
<template>
<el-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="24">
<el-col :span="12">
<el-col :span="8">
<div>添加计费模型月份</div>
<br/>
<modelDateForm ref="DateformRef" @success="dateSuccess" :modelId="selectId"/>
</el-col>
<el-col :span="12">
<el-col :span="14">
<div>计费模月型列表</div>
<br/>
<monthList ref="monthRef" :selectId="selectId" @open="dateOpen" />
@ -16,12 +16,12 @@
<hr/>
<br/>
<el-row :gutter="24">
<el-col :span="12">
<el-col :span="8">
<div>添加计费模型时分</div>
<br/>
<modelTimeForm ref="formRef" @success="onSuccess" :selectId="selectId"/>
</el-col>
<el-col :span="12">
<el-col :span="14">
<div>计费模型时分列表</div>
<br/>
<modelTimeList ref="timeRef" :selectId="selectId" @open="modelOpen"/>

@ -267,10 +267,10 @@ const resetForm = () => {
formRef.value?.resetFields()
}
async function getbillingDateData(){
// const data = await ElectricityDateApi.getElectricityDatenew({modelId:props.selectId})
const data = await ElectricityDateApi.getElectricityDatePage({modelId:props.selectId})
const data = await ElectricityDateApi.getElectricityDatenew({modeId:props.selectId})//id
// const data = await ElectricityDateApi.getElectricityDatePage({modelId:props.selectId})
console.log(data,"----------")
billingDateData.value=data.list||[]
billingDateData.value=data||[]
}

@ -68,7 +68,7 @@
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
<!-- <el-button
type="primary"
plain
@click="openForm('create')"
@ -84,7 +84,7 @@
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-button> -->
</el-form-item>
</el-form>
</ContentWrap>
@ -121,14 +121,14 @@
<el-table-column label="结束时刻" align="center" prop="endTime" />
<el-table-column label="操作" align="center" fixed="right" width="120">
<template #default="scope">
<el-button
<!-- <el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
>
编辑
</el-button>
</el-button> -->
<el-button
link
type="danger"

@ -128,8 +128,8 @@
backgroundColor: '#eff4fa'
}">
<el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="电网电价月份模型 ID" align="center" prop="id" /> -->
<!-- <el-table-column label="电网电价模型id" align="center" prop="priceId" /> -->
<el-table-column label="电网电价月份模型 ID" align="center" prop="id" />
<el-table-column label="电网电价模型id" align="center" prop="priceId" />
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="时段数量" align="center" prop="periodsAmount" />
<!-- <el-table-column label="序列" align="center" prop="no" /> -->
@ -157,14 +157,14 @@
/> -->
<el-table-column label="操作" align="center" width="120" fixed="right">
<template #default="scope">
<el-button
<!-- <el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
>
编辑
</el-button>
</el-button> -->
<el-button
link
type="danger"

@ -1,12 +1,12 @@
<template>
<el-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="24">
<el-col :span="12">
<el-col :span="8">
<div>添加电价模型月份</div>
<br/>
<ElectricityDateForm ref="DateformRef" @success="dateSuccess" :priceId="selectId"/>
</el-col>
<el-col :span="12">
<el-col :span="14">
<div>电价模型月份列表</div>
<br/>
<ElectricityDate ref="monthRef" :selectId="selectId" @open="dateOpen" />
@ -17,12 +17,12 @@
<br/>
<el-row :gutter="24">
<el-col :span="12">
<el-col :span="8">
<div>添加电价模型小时</div>
<br/>
<ElectricityTimeForm ref="formRef" @success="onSuccess" :selectId="selectId"/>
</el-col>
<el-col :span="12">
<el-col :span="14">
<div>电价模型小时列表</div>
<br/>
<ElectricityTime ref="timeRef" :selectId="selectId" @open="modelOpen"/>

@ -63,10 +63,10 @@
</el-col>
<el-col :span="12">
<el-form-item label="电价模型名称" prop="electricityModel">
<el-select v-model="formData.electricityModelId" style="width: 100%;">
<el-form-item label="电价模型名称" prop="dateId">
<el-select v-model="formData.dateId" style="width: 100%;">
<el-option
v-for="item in electricityModel"
v-for="item in dateId"
:key="item.id"
:label="item.name"
:value="item.id"
@ -88,6 +88,7 @@ import {
ElectricityTimeVO
} from '@/api/operationsManagement/electricityPriceModel/timeModel'
import { ElectricityDateApi, ElectricityDateVO } from '@/api/operationsManagement/electricityPriceModel/monthModel'
/** 电价模型小时 表单 */
defineOptions({ name: 'ElectricityTimeForm' })
const props=defineProps({
@ -102,16 +103,17 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const electricityModel = ref('')
const dateId = ref('')
const formLoading = ref(false) // 12
const formType = ref('create') // create - update -
const formData = ref({
id: undefined,
dateId: props.selectId,
dateId: undefined,
name: undefined,
type: undefined,
startTime: undefined,
endTime: undefined,
electricityModelId: undefined,
electricityModelId: props.selectId,
// Time:[]
})
@ -152,7 +154,8 @@ const submitForm = async () => {
await formRef.value.validate()
//
formLoading.value = true
formData.value.dateId=props.selectId
formData.value.electricityModelId=props.selectId
// formData.value.dateId=props.selectId
try {
const data = formData.value as unknown as ElectricityTimeApi.ElectricityTimeVO
// data.startTime=formData.value.Time[0]
@ -188,9 +191,10 @@ const resetForm = () => {
async function getbillingDateData(){
// const data = await ElectricityDateApi.getElectricityDatenew({modelId:props.selectId})
const data = await ElectricityDateApi.getElectricityDatePage({priceId:props.selectId})
const data = await ElectricityDateApi.getElectricityList({modeId:props.selectId})
// console.log(data,"-++++++++++-")
electricityModel.value=data.list||[]
dateId.value=data||[]
// electricityModel.value=data||[]
}

Loading…
Cancel
Save