8.17 晚上提交

master
zz 3 months ago
parent 519eea16ad
commit 2e754d65e5

@ -0,0 +1,52 @@
import request from '@/config/axios'
// 电池型号管理 VO
export interface BatteryTypeVO {
// 索引编号
id: number
// 运营商id
operatorId: number
// 电池型号代码
btyTypeCode: string
// 电池型号名称
btyTypeName: string
// 电池型号等级
btyTypeLevel: string
// 电池型号状态
btyTypeState: number
// 电池型号描述
btyTypeDesc: string
}
// 电池型号管理 API
export const BatteryTypeApi = {
// 查询电池型号管理分页
getBatteryTypePage: async (params: any) => {
return await request.get({ url: `/cloud/battery-type/page`, params })
},
// 查询电池型号管理详情
getBatteryType: async (id: number) => {
return await request.get({ url: `/cloud/battery-type/get?id=` + id })
},
// 新增电池型号管理
createBatteryType: async (data: BatteryTypeVO) => {
return await request.post({ url: `/cloud/battery-type/create`, data })
},
// 修改电池型号管理
updateBatteryType: async (data: BatteryTypeVO) => {
return await request.put({ url: `/cloud/battery-type/update`, data })
},
// 删除电池型号管理
deleteBatteryType: async (id: number) => {
return await request.delete({ url: `/cloud/battery-type/delete?id=` + id })
},
// 导出电池型号管理 Excel
exportBatteryType: async (params) => {
return await request.download({ url: `/cloud/battery-type/export-excel`, params })
},
}

@ -0,0 +1,68 @@
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 })
},
}

@ -0,0 +1,52 @@
import request from '@/config/axios'
// 电价模型小时 VO
export interface ElectricityTimeVO {
// 电网电价分时模型 ID
id: number
// 分时模型(月日)id
dateId: number
// 计费模型名称
name: string
// 1尖2峰3平4谷
type: number
// 尖电价开始时刻
startTime: string
// 尖电价结束时刻
endTime: string
// 电价模型id
electricityModelId: number
}
// 电价模型小时 API
export const ElectricityTimeApi = {
// 查询电价模型小时分页
getElectricityTimePage: async (params: any) => {
return await request.get({ url: `/cloud/electricity-time/page`, params })
},
// 查询电价模型小时详情
getElectricityTime: async (id: number) => {
return await request.get({ url: `/cloud/electricity-time/get?id=` + id })
},
// 新增电价模型小时
createElectricityTime: async (data: ElectricityTimeVO) => {
return await request.post({ url: `/cloud/electricity-time/create`, data })
},
// 修改电价模型小时
updateElectricityTime: async (data: ElectricityTimeVO) => {
return await request.put({ url: `/cloud/electricity-time/update`, data })
},
// 删除电价模型小时
deleteElectricityTime: async (id: number) => {
return await request.delete({ url: `/cloud/electricity-time/delete?id=` + id })
},
// 导出电价模型小时 Excel
exportElectricityTime: async (params) => {
return await request.download({ url: `/cloud/electricity-time/export-excel`, params })
},
}

@ -6,6 +6,7 @@
:rules="formRules"
label-width="160px"
v-loading="formLoading"
label-position="top"
>
<el-row :gutter="24">
<el-col :span="12">
@ -68,11 +69,11 @@
<el-input v-model="formData.specification" placeholder="请输入电池规格" />
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="电池性质" prop="btyFeature">
<el-input v-model="formData.btyFeature" placeholder="请输入电池性质" />
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<!-- <el-form-item label="电芯供应商代码" prop="btyCoresSupplierCode">
<el-input v-model="formData.btyCoresSupplierCode" placeholder="请输入电芯供应商代码" />
@ -181,7 +182,7 @@ const formData = ref({
const formRules = reactive({
btyNo: [{ required: true, message: '电池序列号不能为空', trigger: 'blur' }],
btyType: [{ required: true, message: '电池型号编号不能为空', trigger: 'change' }],
btyFeature: [{ required: true, message: '电池性质不能为空', trigger: 'blur' }]
ratedCapacity: [{ required: true, message: '额定容量不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref

@ -98,6 +98,7 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
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="operatorId" /> -->
<el-table-column label="电池序列号" align="center" prop="btyNo" />

@ -0,0 +1,141 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
label-position="top"
>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="运营商id" prop="operatorId">
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电池型号代码" prop="btyTypeCode">
<el-input v-model="formData.btyTypeCode" placeholder="请输入电池型号代码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电池型号名称" prop="btyTypeName">
<el-input v-model="formData.btyTypeName" placeholder="请输入电池型号名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电池型号等级" prop="btyTypeLevel">
<el-input v-model="formData.btyTypeLevel" placeholder="请输入电池型号等级" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电池型号状态" prop="btyTypeState">
<el-input v-model="formData.btyTypeState" placeholder="请输入电池型号状态" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电池型号描述" prop="btyTypeDesc">
<el-input v-model="formData.btyTypeDesc" placeholder="请输入电池型号描述" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { BatteryTypeApi, BatteryTypeVO } from '@/api/api/batteryManagement/batteryModel'
/** 电池型号管理 表单 */
defineOptions({ name: 'BatteryTypeForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
operatorId: undefined,
btyTypeCode: undefined,
btyTypeName: undefined,
btyTypeLevel: undefined,
btyTypeState: undefined,
btyTypeDesc: undefined,
})
const formRules = reactive({
btyTypeCode: [{ required: true, message: '电池型号代码不能为空', trigger: 'blur' }],
btyTypeName: [{ required: true, message: '电池型号名称不能为空', trigger: 'blur' }],
btyTypeState: [{ required: true, message: '电池型号状态不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await BatteryTypeApi.getBatteryType(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as BatteryTypeApi.BatteryTypeVO
if (formType.value === 'create') {
await BatteryTypeApi.createBatteryType(data)
message.success(t('common.createSuccess'))
} else {
await BatteryTypeApi.updateBatteryType(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
operatorId: undefined,
btyTypeCode: undefined,
btyTypeName: undefined,
btyTypeLevel: undefined,
btyTypeState: undefined,
btyTypeDesc: undefined,
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,245 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-form-item label="运营商id" prop="operatorId">
<el-input
v-model="queryParams.operatorId"
placeholder="请输入运营商id"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="电池型号代码" prop="btyTypeCode">
<el-input
v-model="queryParams.btyTypeCode"
placeholder="请输入电池型号代码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="电池型号名称" prop="btyTypeName">
<el-input
v-model="queryParams.btyTypeName"
placeholder="请输入电池型号名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="电池型号等级" prop="btyTypeLevel">
<el-input
v-model="queryParams.btyTypeLevel"
placeholder="请输入电池型号等级"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="电池型号状态" prop="btyTypeState">
<el-input
v-model="queryParams.btyTypeState"
placeholder="请输入电池型号状态"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="电池型号描述" prop="btyTypeDesc">
<el-input
v-model="queryParams.btyTypeDesc"
placeholder="请输入电池型号描述"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<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
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['cloud:battery-type:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['cloud:battery-type:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
 <el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="索引编号" align="center" prop="id" />
<el-table-column label="运营商id" align="center" prop="operatorId" /> -->
<el-table-column label="电池型号代码" align="center" prop="btyTypeCode" />
<el-table-column label="电池型号名称" align="center" prop="btyTypeName" />
<el-table-column label="电池型号等级" align="center" prop="btyTypeLevel" />
<el-table-column label="电池型号状态" align="center" prop="btyTypeState" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="电池型号描述" align="center" prop="btyTypeDesc" />
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['cloud:battery-type:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['cloud:battery-type:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BatteryTypeForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { BatteryTypeApi, BatteryTypeVO } from '@/api/api/batteryManagement/batteryModel'
import BatteryTypeForm from './BatteryTypeForm.vue'
/** 电池型号管理 列表 */
defineOptions({ name: 'BatteryType' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<BatteryTypeVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
operatorId: undefined,
btyTypeCode: undefined,
btyTypeName: undefined,
btyTypeLevel: undefined,
btyTypeState: undefined,
createTime: [],
btyTypeDesc: undefined,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await BatteryTypeApi.getBatteryTypePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BatteryTypeApi.deleteBatteryType(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BatteryTypeApi.exportBatteryType(queryParams)
download.excel(data, '电池型号管理.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -1,10 +1,8 @@
<template>
<el-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="12">
<el-col :span="12">
<div>添加计费模月型</div>
<div>添加计费模型月份</div>
<br/>
<ElectricityDateForm ref="DateformRef" @success="dateSuccess" :modelId="selectId"/>
</el-col>
@ -17,67 +15,19 @@
<br/>
<hr/>
<br/>
<el-row :gutter="12">
<el-col :span="12">
<div>添加计费时分模型</div>
<div>添加计费模型时分</div>
<br/>
<modelTimeForm ref="formRef" @success="onSuccess" :selectId="selectId"/>
</el-col>
<el-col :span="12">
<div>计费时分模型列表</div>
<div>计费模型时分列表</div>
<br/>
<modelTimeList ref="timeRef" :selectId="selectId" @open="modelOpen"/>
</el-col>
</el-row>
<!-- <el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="120px"
v-loading="formLoading"
>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计费模型" prop="type">
<el-select v-model="formData.type" clearable placeholder="请选择计费模型">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.BILLING_MODEL)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="时段数" prop="periodsAmount">
<el-input v-model="formData.periodsAmount" placeholder="请输入时段数" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注信息" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注信息" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="运营商id" prop="operatorId">
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template> -->
</el-drawer>
</template>
<script setup lang="ts">
@ -142,7 +92,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
const emit = defineEmits(['success']) // success
const modelOpen=(type,id)=>{
formRef.value.open(type,id,selectId.value)
console.log(type,id)
// console.log(type,id)
}
const dateOpen=(type,id)=>{
DateformRef.value.open(type,id)

@ -24,6 +24,19 @@
<el-table-column label="经度" align="center" prop="longitude" />
<el-table-column label="区域名称 " align="center" prop="areaName" />
<el-table-column label="区域编号 " align="center" prop="areaCode" />
<el-table-column label="营运时间" align="center" prop="operationTime" width="180"
:formatter="dateFormatter"/>
<el-table-column label="投放时间 " align="center" prop="launchTime" width="180"
:formatter="dateFormatter"/>
<el-table-column label="联系方式-手机号 " align="center" prop="contactWay" />
<el-table-column label="服务电话" align="center" prop="serviceTel" />
<el-table-column label="联系方式-邮箱地址 " align="center" prop="email" />
<el-table-column label="负责人" align="center" prop="principal" />
<el-table-column label="所属运营企业" align="center" prop="stationCompany" />
<el-table-column label="场站服务状态" align="center" prop="status" />
<el-table-column label="场站运行模式" align="center" prop="runModel" />
<el-table-column label="工位分类" align="center" prop="staType" />
<el-table-column label="区域分类" align="center" prop="areaType" />
<el-table-column label="站型类型 " align="center" prop="siteType" />
<!-- 1公共; 50:个人; 100公交专用101环卫专用102物流专用103 出租专用104分时租赁专用105小区共享专用106单位专用107私人共享桩专用255其他 -->
<el-table-column label="服务车型" align="center" prop="matchVehicles" />
@ -44,7 +57,7 @@
</el-table>
</ContentWrap>
<br/>
<div class="title_info" style="margin-top: 20px">换电计费分时模型 </div>
<div class="title_info" style="margin-top: 20px">换电计费模型小时信息 </div>
<br/>
<ContentWrap>
<el-table :data="billinglist" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
@ -73,7 +86,7 @@
<script setup lang="ts">
import { BillingModelApi, BillingModelVO } from '@/api/operationsManagement/billingModel'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
/** 换电计费模型 表单 */
defineOptions({ name: 'BillingModelForm' })

@ -5,6 +5,7 @@
:rules="formRules"
label-width="120px"
v-loading="formLoading"
label-position="top"
>
<el-row :gutter="24">

@ -94,7 +94,8 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="索引" align="center" prop="id" />
<el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="索引" align="center" prop="id" /> -->
<el-table-column label="计费模型名称" align="center" prop="name" />
<!-- <el-table-column label="计费模型id" align="center" prop="billingModelId" /> -->
<el-table-column label="换电服务单价" align="center" prop="price" />

@ -5,6 +5,7 @@
:rules="formRules"
label-width="110px"
v-loading="formLoading"
label-position="top"
>
<el-row :gutter="24">
<!-- <el-col :span="12">

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="80px"
label-width="100px"
>
<el-form-item label="计费模型名称" prop="name">
@ -15,7 +15,7 @@
placeholder="请输入计费模型名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="时段数量" prop="periodsAmount">
@ -24,7 +24,7 @@
placeholder="请输入时段数量"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
@ -36,7 +36,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="结束日期" prop="endDate">
@ -47,7 +47,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
class="!w-200px"
/>
</el-form-item> -->
<el-form-item label="尖电价" prop="theTipPrice">
@ -56,7 +56,7 @@
placeholder="请输入尖电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="峰电价" prop="peakPrice">
@ -65,7 +65,7 @@
placeholder="请输入峰电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="平电价" prop="flatPrice">
@ -74,7 +74,7 @@
placeholder="请输入平电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="谷电价" prop="theValleyPrice">
@ -83,7 +83,7 @@
placeholder="请输入谷电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
class="!w-200px"
/>
</el-form-item>
<!-- <el-form-item label="是否启用:0启用;1禁用" prop="status">
@ -91,7 +91,7 @@
v-model="queryParams.status"
placeholder="请选择是否启用:0启用;1禁用"
clearable
class="!w-240px"
class="!w-200px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
@ -127,6 +127,7 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
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="计费模型名称" align="center" prop="name" />

@ -48,20 +48,26 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="索引" align="center" prop="id" />
<el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="索引" align="center" prop="id" /> -->
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="站点" align="center" >
<el-dropdown placement="bottom-start">
<el-button>
站点集合
<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="(item , index ) in list.stationList" :key="index" :label="item.stationName" />
</el-dropdown-menu>
</template>
</el-dropdown>
<template #default="scope">
<el-dropdown placement="bottom-start">
<el-button>
站点集合
<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item
v-for="(item, index) in scope.row.stationList"
:key="index"
>{{ item.stationName }}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-table-column>
<!-- <el-table-column label="计费模型" align="center" prop="type" >
@ -89,7 +95,7 @@
link
type="primary"
@click="openDetail(scope.row.id)"
v-hasPermi="['system:sms-log:query']"
>
详情
</el-button>
@ -151,6 +157,7 @@ const getList = async () => {
try {
const data = await BillingModelApi.getBillingModelPage(queryParams)
// namelist.value = data.list.stationList
console.log('data.list',data.list)
list.value = data.list
total.value = data.total
} finally {

@ -1,56 +1,53 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
<el-form-item label="尖电价" prop="theTipPrice">
<el-input v-model="formData.theTipPrice" placeholder="请输入尖电价" />
</el-form-item>
<el-form-item label="峰电价" prop="peakPrice">
<el-input v-model="formData.peakPrice" placeholder="请输入峰电价" />
</el-form-item>
<el-form-item label="平电价" prop="flatPrice">
<el-input v-model="formData.flatPrice" placeholder="请输入平电价" />
</el-form-item>
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input v-model="formData.theValleyPrice" placeholder="请输入谷电价" />
</el-form-item>
<el-form-item label="时段数" prop="periodsAmount">
<el-input v-model="formData.periodsAmount" placeholder="请输入时段数" />
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注信息" />
</el-form-item>
<el-form-item label="运营商id" prop="operatorId">
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
<l-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="12">
<el-col :span="12">
<div>添加电价模型月份</div>
<br/>
<ElectricityDateForm ref="DateformRef" @success="dateSuccess" :modelId="selectId"/>
</el-col>
<el-col :span="12">
<div>电价模型月份列表</div>
<br/>
<ElectricityDate ref="monthRef" :selectId="selectId" @open="dateOpen" />
</el-col>
</el-row>
<br/>
<hr/>
<br/>
<el-row :gutter="12">
<el-col :span="12">
<div>添加电价模型小时</div>
<br/>
<ElectricityTimeForm ref="formRef" @success="onSuccess" :selectId="selectId"/>
</el-col>
<el-col :span="12">
<div>电价模型小时列表</div>
<br/>
<ElectricityTime ref="timeRef" :selectId="selectId" @open="modelOpen"/>
</el-col>
</el-row>
</l-drawer>
</template>
<script setup lang="ts">
import ElectricityTimeForm from './components/hoursAndMinutes/ElectricityTimeForm.vue'
import ElectricityTime from './components/hoursAndMinutes/index.vue'
import ElectricityDateForm from './components/month/ElectricityDateForm.vue'
import ElectricityDate from './components/month/index.vue'
import { ElectricityPriceApi, ElectricityPriceVO } from '@/api/operationsManagement/electricityPriceModel'
/** 电价模型 表单 */
defineOptions({ name: 'ElectricityPriceForm' })
const timeRef=ref()
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const DateformRef=ref()
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const selectId=ref()
const formData = ref({
id: undefined,
name: undefined,
@ -66,47 +63,40 @@ const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
const monthRef=ref()
const onSuccess=()=>{
timeRef.value.getList()
}
const dateSuccess=()=>{
monthRef.value.getList()
}
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ElectricityPriceApi.getElectricityPrice(id)
} finally {
formLoading.value = false
}
}
selectId.value=id
// resetForm()
// //
// if (id) {
// formLoading.value = true
// try {
// formData.value = await ElectricityPriceApi.getElectricityPrice(id)
// } finally {
// formLoading.value = false
// }
// }
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ElectricityPriceApi.ElectricityPriceVO
if (formType.value === 'create') {
await ElectricityPriceApi.createElectricityPrice(data)
message.success(t('common.createSuccess'))
} else {
await ElectricityPriceApi.updateElectricityPrice(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
const modelOpen=(type,id)=>{
formRef.value.open(type,id,selectId.value)
// console.log(type,id)
}
const dateOpen=(type,id)=>{
DateformRef.value.open(type,id)
}
/** 重置表单 */

@ -0,0 +1,148 @@
<template>
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
label-position="top"
>
<el-row :gutter="24">
<el-col :spam="12">
<el-form-item label="分时模型(月日)id" prop="dateId">
<el-input v-model="formData.dateId" placeholder="请输入分时模型(月日)id" />
</el-form-item>
</el-col>
<el-col :spam="12">
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
</el-col>
<el-col :spam="12">
<el-form-item label="1尖2峰3平4谷" prop="type">
<el-select v-model="formData.type" placeholder="请选择1尖2峰3平4谷">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
</el-col>
<el-col :spam="12">
<el-form-item label="尖电价开始时刻" prop="startTime">
<el-date-picker
v-model="formData.startTime"
type="date"
value-format="x"
placeholder="选择尖电价开始时刻"
/>
</el-form-item>
</el-col>
<el-col :spam="12">
<el-form-item label="尖电价结束时刻" prop="endTime">
<el-date-picker
v-model="formData.endTime"
type="date"
value-format="x"
placeholder="选择尖电价结束时刻"
/>
</el-form-item>
</el-col>
<el-col :spam="12">
<el-form-item label="电价模型id" prop="electricityModelId">
<el-input v-model="formData.electricityModelId" placeholder="请输入电价模型id" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button @click="submitForm" type="primary" :disabled="formLoading">{{ formType=='update'?'确认编辑':'确认新增' }}</el-button>
<el-button @click="onCencel" v-if="formType=='update'"></el-button>
</template>
<script setup lang="ts">
import {
ElectricityTimeApi,
ElectricityTimeVO
} from '@/api/operationsManagement/electricityPriceModel/timeModel'
/** 电价模型小时 表单 */
defineOptions({ name: 'ElectricityTimeForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
dateId: undefined,
name: undefined,
type: undefined,
startTime: undefined,
endTime: undefined,
electricityModelId: undefined
})
const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
electricityModelId: [{ required: true, message: '电价模型id不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
const onCencel=()=>{
formType.value='create'
resetForm()
}
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ElectricityTimeApi.getElectricityTime(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ElectricityTimeApi.ElectricityTimeVO
if (formType.value === 'create') {
await ElectricityTimeApi.createElectricityTime(data)
message.success(t('common.createSuccess'))
} else {
await ElectricityTimeApi.updateElectricityTime(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
dateId: undefined,
name: undefined,
type: undefined,
startTime: undefined,
endTime: undefined,
electricityModelId: undefined
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,204 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-form-item label="计费模型名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入计费模型名称"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<!-- <el-form-item label="1尖2峰3平4谷" prop="type">
<el-select
v-model="queryParams.type"
placeholder="请选择1尖2峰3平4谷"
clearable
class="!w-200px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
-->
<el-form-item label="电价模型id" prop="electricityModelId">
<el-input
v-model="queryParams.electricityModelId"
placeholder="请输入电价模型id"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<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
type="primary"
plain
@click="openForm('create')"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="电网电价分时模型 ID" align="center" prop="id" />
<el-table-column label="分时模型(月日)id" align="center" prop="dateId" />
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="1尖2峰3平4谷" align="center" prop="type" />
<el-table-column label="尖电价开始时刻" align="center" prop="startTime" />
<el-table-column label="尖电价结束时刻" align="center" prop="endTime" />
<el-table-column label="电价模型id" align="center" prop="electricityModelId" />
<el-table-column label="操作" align="center" width="120" fixed="right">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ElectricityTimeForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ElectricityTimeApi, ElectricityTimeVO } from '@/api/operationsManagement/electricityPriceModel/timeModel'
import ElectricityTimeForm from './ElectricityTimeForm.vue'
/** 电价模型小时 列表 */
defineOptions({ name: 'ElectricityTime' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<ElectricityTimeVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
dateId: undefined,
name: undefined,
type: undefined,
startTime: [],
endTime: [],
createTime: [],
electricityModelId: undefined,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ElectricityTimeApi.getElectricityTimePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ElectricityTimeApi.deleteElectricityTime(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ElectricityTimeApi.exportElectricityTime(queryParams)
download.excel(data, '电价模型小时.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -0,0 +1,217 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
label-position="top"
>
<el-row :span="24">
<!-- <el-col :span="11">
<el-form-item label="电网电价模型id" prop="priceId">
<el-input v-model="formData.priceId" placeholder="请输入电网电价模型id" />
</el-form-item>
</el-col> -->
<el-col :span="11">
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="时段数量" prop="periodsAmount">
<el-input v-model="formData.periodsAmount" placeholder="请输入时段数量" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="序列" prop="no">
<el-input v-model="formData.no" placeholder="请输入序列" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="开始日期" prop="startDate">
<el-date-picker
v-model="formData.startDate"
type="date"
value-format="x"
placeholder="选择开始日期"
/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="结束日期" prop="endDate">
<el-date-picker
v-model="formData.endDate"
type="date"
value-format="x"
placeholder="选择结束日期"
/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="尖电价" prop="theTipPrice">
<el-input v-model="formData.theTipPrice" placeholder="请输入尖电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="峰电价" prop="peakPrice">
<el-input v-model="formData.peakPrice" placeholder="请输入峰电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="平电价" prop="flatPrice">
<el-input v-model="formData.flatPrice" placeholder="请输入平电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input v-model="formData.theValleyPrice" placeholder="请输入谷电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="是否启用" prop="status">
<el-radio-group v-model="formData.status">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.MODEL_TIME_STATUS )"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注" />
</el-form-item>
</el-col>
<!-- <el-col :span="11">
<el-form-item label="数据来源:0:云平台;1;三方运营商" prop="source">
<el-input
v-model="formData.source"
placeholder="请输入数据来源:0:云平台;1;三方运营商"
/>
</el-form-item>
</el-col>-->
</el-row>
<!--
<el-form-item label="唯一编码" prop="code">
<el-input v-model="formData.code" placeholder="请输入唯一编码" />
</el-form-item> -->
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import {
ElectricityDateApi,
ElectricityDateVO
} from '@/api/operationsManagement/electricityPriceModel/monthModel'
/** 电价模型月份 表单 */
defineOptions({ name: 'ElectricityDateForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
priceId: undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
startDate: undefined,
endDate: undefined,
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
status: undefined,
remark: undefined,
source: undefined,
code: undefined
})
const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
theTipPrice: [{ required: true, message: '尖电价不能为空', trigger: 'blur' }],
peakPrice: [{ required: true, message: '峰电价不能为空', trigger: 'blur' }],
flatPrice: [{ required: true, message: '平电价不能为空', trigger: 'blur' }],
theValleyPrice: [{ required: true, message: '谷电价不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ElectricityDateApi.getElectricityDate(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ElectricityDateApi.ElectricityDateVO
if (formType.value === 'create') {
await ElectricityDateApi.createElectricityDate(data)
message.success(t('common.createSuccess'))
} else {
await ElectricityDateApi.updateElectricityDate(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
priceId: undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
startDate: undefined,
endDate: undefined,
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
status: undefined,
remark: undefined,
source: undefined,
code: undefined
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,250 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-form-item label="计费模型名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入计费模型名称"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="尖电价" prop="theTipPrice">
<el-input
v-model="queryParams.theTipPrice"
placeholder="请输入尖电价"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="峰电价" prop="peakPrice">
<el-input
v-model="queryParams.peakPrice"
placeholder="请输入峰电价"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="平电价" prop="flatPrice">
<el-input
v-model="queryParams.flatPrice"
placeholder="请输入平电价"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input
v-model="queryParams.theValleyPrice"
placeholder="请输入谷电价"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/>
</el-form-item>
<!-- <el-form-item label="是否启用:0启用;1禁用" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择是否启用:0启用;1禁用"
clearable
class="!w-200px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item> -->
<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
type="primary"
plain
@click="openForm('create')"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
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="计费模型名称" align="center" prop="name" />
<el-table-column label="时段数量" align="center" prop="periodsAmount" />
<el-table-column label="序列" align="center" prop="no" />
<el-table-column label="开始日期" align="center" prop="startDate" />
<el-table-column label="结束日期" align="center" prop="endDate" />
<el-table-column label="尖电价" align="center" prop="theTipPrice" />
<el-table-column label="峰电价" align="center" prop="peakPrice" />
<el-table-column label="平电价" align="center" prop="flatPrice" />
<el-table-column label="谷电价" align="center" prop="theValleyPrice" />
<el-table-column label="是否启用:0启用;1禁用" align="center" prop="status" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="数据来源:0:云平台;1;三方运营商" align="center" prop="source" />
<el-table-column label="唯一编码" align="center" prop="code" />
<el-table-column label="操作" align="center" width="120" fixed="right">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ElectricityDateForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ElectricityDateApi, ElectricityDateVO } from '@/api/operationsManagement/electricityPriceModel/monthModel'
import ElectricityDateForm from './ElectricityDateForm.vue'
/** 电价模型月份 列表 */
defineOptions({ name: 'ElectricityDate' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<ElectricityDateVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
priceId: undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
startDate: [],
endDate: [],
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
status: undefined,
remark: undefined,
source: undefined,
code: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ElectricityDateApi.getElectricityDatePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ElectricityDateApi.deleteElectricityDate(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ElectricityDateApi.exportElectricityDate(queryParams)
download.excel(data, '电价模型月份.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -1,45 +1,121 @@
<template>
<el-drawer :title="dialogTitle" v-model="dialogVisible" size="60%">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
<el-form-item label="尖电价" prop="theTipPrice">
<el-input v-model="formData.theTipPrice" placeholder="请输入尖电价" />
</el-form-item>
<el-form-item label="峰电价" prop="peakPrice">
<el-input v-model="formData.peakPrice" placeholder="请输入峰电价" />
</el-form-item>
<el-form-item label="平电价" prop="flatPrice">
<el-input v-model="formData.flatPrice" placeholder="请输入平电价" />
</el-form-item>
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input v-model="formData.theValleyPrice" placeholder="请输入谷电价" />
</el-form-item>
<el-form-item label="时段数" prop="periodsAmount">
<el-input v-model="formData.periodsAmount" placeholder="请输入时段数" />
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注信息" />
</el-form-item>
<el-form-item label="运营商id" prop="operatorId">
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
<el-drawer title="基本信息" v-model="dialogVisible" size="60%">
<el-descriptions :column="1" border>
<el-descriptions-item label="计费模型名称" min-width="120">
{{ oldlist.name || "--" }}
</el-descriptions-item>
</el-descriptions>
<br/>
<div class="title_info" style="margin-top: 20px">换电站基础信息 </div>
<br/>
<!-- table -->
<ContentWrap>
<el-table :data="stationList" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="换电站编码" align="center" prop="stationNo" />
<el-table-column label="换电站名称" align="center" prop="stationName" />
<el-table-column label="换电站识别号" align="center" prop="stationSn" />
<el-table-column label="地理位置" align="center" prop="stationLocation" />
<el-table-column label="站类型" align="center" prop="stationType" />
<el-table-column label="换电站现场照片" align="center" prop="avatar" />
<el-table-column label="纬度" align="center" prop="latitude" />
<el-table-column label="经度" align="center" prop="longitude" />
<el-table-column label="区域名称" align="center" prop="areaName" />
<el-table-column label="区域编号" align="center" prop="areaCode" />
<el-table-column label="营运时间" align="center" prop="operationTime" width="180"
:formatter="dateFormatter"/>
<el-table-column label="投放时间 " align="center" prop="launchTime" width="180"
:formatter="dateFormatter"/>
<el-table-column label="联系方式-手机号 " align="center" prop="contactWay" />
<el-table-column label="服务电话" align="center" prop="serviceTel" />
<el-table-column label="联系方式-邮箱地址 " align="center" prop="email" />
<el-table-column label="负责人" align="center" prop="principal" />
<el-table-column label="所属运营企业" align="center" prop="stationCompany" />
<el-table-column label="场站服务状态" align="center" prop="status" />
<el-table-column label="场站运行模式" align="center" prop="runModel" />
<el-table-column label="工位分类" align="center" prop="staType" />
<el-table-column label="区域分类" align="center" prop="areaType" />
<el-table-column label="站型类型 " align="center" prop="siteType" />
<!-- 1公共; 50:个人; 100公交专用101环卫专用102物流专用103 出租专用104分时租赁专用105小区共享专用106单位专用107私人共享桩专用255其他 -->
<el-table-column label="服务车型" align="center" prop="matchVehicles" />
<el-table-column label="是否全天营业" align="center" prop="oahFlag" />
<!-- 0;1 -->
<el-table-column label="站点分类" align="center" prop="siteClassification" />
<!-- 站点分类 1:充电站;2:换电站;3:充换电一体站 -->
<el-table-column label="建设场所" align="center" prop="constructionSite" />
<!-- construction建设场所 1居民区;2公共机构;3企事业单位;4写字楼;5工业园区;6交通枢纽;7大型文体设施;8城市绿地;9大型建筑配建停车场;10路边停车位;11城际高速服务区;2风景区;13公交场站;14加油加气站;15出租车;255其他 -->
<el-table-column label="是否启用" align="center" prop="enable" />
<!-- 0:未启用 1:启用 -->
<el-table-column label="计费电量" align="center" prop="electricitySource" />
<!-- 计费电量1默认最大值2soc差值3soe差值4交流5直流60 -->
<el-table-column label="电价电量" align="center" prop="electricityPriceSource" />
<!-- 电价电量1默认最大值2soc差值3soe差值4交流5直流60 -->
<el-table-column label="soc差值来源" align="center" prop="socSource" />
<!-- soc差值来源:1换电时的SOC;2:充电时的SOC -->
</el-table>
</ContentWrap>
<br/>
<div class="title_info" style="margin-top: 20px">电价模型月份信息 </div>
<br/>
<!-- table -->
<ContentWrap>
<el-table :data="electricityDate" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="计费模型名称 " align="center" prop="name" />
<el-table-column label="时段数量 " align="center" prop="periodsAmount" />
<el-table-column label="开始日期 " align="center" prop="startDate" width="180"
:formatter="dateFormatter" />
<el-table-column label="结束日期 " align="center" prop="endDate" width="180"
:formatter="dateFormatter"/>
<el-table-column label="尖电价 " align="center" prop="theTipPrice" />
<el-table-column label="峰电价 " align="center" prop="peakPrice" />
<el-table-column label="平电价 " align="center" prop="flatPrice" />
<el-table-column label="谷电价 " align="center" prop="theValleyPrice " />
<el-table-column label="是否启用" align="center" prop="status" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.MODEL_TIME_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="数据来源" align="center" prop="source" />
<!-- :0:云平台;1;三方运营商 -->
</el-table>
</ContentWrap>
<br/>
<div class="title_info" style="margin-top: 20px">电价模型小时信息 </div>
<br/>
<!-- table -->
<ContentWrap>
<el-table :data="electricityTimeList" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="类型 " align="center" prop="type " />
<!-- 1尖2峰3平4谷 -->
<el-table-column label="尖电价开始时刻" align="center" prop="startDate" width="180"
:formatter="dateFormatter" />
<el-table-column label="尖电价结束时刻" align="center" prop="endDate" width="180"
:formatter="dateFormatter"/>
</el-table>
</ContentWrap>
<br/>
</el-drawer>
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { ElectricityPriceApi, ElectricityPriceVO } from '@/api/operationsManagement/electricityPriceModel'
/** 电价模型 表单 */
defineOptions({ name: 'ElectricityPriceForm' })
@ -49,6 +125,10 @@
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const electricityDate = ref([])
const oldlist = ref([])
const stationList = ref([])
const electricityTimeList = ref([])
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
@ -68,16 +148,20 @@
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
const open = async (id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ElectricityPriceApi.getElectricityPrice(id)
const formData2 = await ElectricityPriceApi.getElectricityPrice(id)
oldlist.value = formData2
electricityDate.value = formData2.electricityDateResp
stationList.value = formData2.stationList
electricityTimeList.value = formData2.electricityTimeList
} finally {
formLoading.value = false
}
@ -94,13 +178,12 @@
formLoading.value = true
try {
const data = formData.value as unknown as ElectricityPriceApi.ElectricityPriceVO
if (formType.value === 'create') {
await ElectricityPriceApi.createElectricityPrice(data)
message.success(t('common.createSuccess'))
} else {
await ElectricityPriceApi.updateElectricityPrice(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')

@ -1,137 +1,60 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="计费模型名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入计费模型名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="尖电价" prop="theTipPrice">
<el-input
v-model="queryParams.theTipPrice"
placeholder="请输入尖电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="峰电价" prop="peakPrice">
<el-input
v-model="queryParams.peakPrice"
placeholder="请输入峰电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="平电价" prop="flatPrice">
<el-input
v-model="queryParams.flatPrice"
placeholder="请输入平电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input
v-model="queryParams.theValleyPrice"
placeholder="请输入谷电价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="时段数" prop="periodsAmount">
<el-input
v-model="queryParams.periodsAmount"
placeholder="请输入时段数"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注信息"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="运营商id" prop="operatorId">
<el-input
v-model="queryParams.operatorId"
placeholder="请输入运营商id"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<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
type="primary"
plain
@click="openForm('create')"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="计费模型 ID" align="center" prop="id" />
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="站点" align="center" >
<el-dropdown placement="bottom-start">
<el-button>
站点集合
<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item v-for="(item,index ) in list.stationList" :key="index" :label="item.stationName" />
</el-dropdown-menu>
</template>
</el-dropdown>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-form-item label="计费模型名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入计费模型名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<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 type="primary" plain @click="openForm('create')">
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button type="success" plain @click="handleExport" :loading="exportLoading">
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button> -->
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
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="计费模型名称" align="center" prop="name" />
<el-table-column label="站点" align="center">
<template #default="scope">
<el-dropdown placement="bottom-start">
<el-button>
站点集合
<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item
v-for="(item, index) in scope.row.stationList"
:key="index"
>{{ item.stationName }}</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown> </template>
</el-table-column>
<!-- <el-table-column label="尖电价" align="center" prop="theTipPrice" />
<el-table-column label="峰电价" align="center" prop="peakPrice" />
@ -149,31 +72,10 @@
<el-table-column label="运营商id" align="center" prop="operatorId" /> -->
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
>
删除
</el-button>
<el-button
link
type="danger"
@click="openDetail(scope.row.id)"
>
详情
</el-button>
</template>
<el-button link type="primary" @click="openForm('update', scope.row.id)"> 编辑 </el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)"> </el-button>
<el-button link type="danger" @click="openDetail(scope.row.id)"> </el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
@ -192,102 +94,105 @@
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ElectricityPriceApi, ElectricityPriceVO } from '@/api/operationsManagement/electricityPriceModel'
import ElectricityPriceForm from './ElectricityPriceForm.vue'
import electricityPriceModelDetails from './electricityPriceModelDetails.vue'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import {
ElectricityPriceApi,
ElectricityPriceVO
} from '@/api/operationsManagement/electricityPriceModel'
import ElectricityPriceForm from './ElectricityPriceForm.vue'
import electricityPriceModelDetails from './electricityPriceModelDetails.vue'
/** 电价模型 列表 */
defineOptions({ name: 'ElectricityPrice' })
const message = useMessage() //
const { t } = useI18n() //
/** 详情操作 */
/** 电价模型 列表 */
defineOptions({ name: 'ElectricityPrice' })
const message = useMessage() //
const { t } = useI18n() //
/** 详情操作 */
const detailRef = ref()
const loading = ref(true) //
const list = ref<ElectricityPriceVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
periodsAmount: undefined,
remark: undefined,
createTime: [],
operatorId: undefined,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ElectricityPriceApi.getElectricityPricePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ElectricityPriceApi.deleteElectricityPrice(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
const loading = ref(true) //
const list = ref<ElectricityPriceVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
periodsAmount: undefined,
remark: undefined,
createTime: [],
operatorId: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ElectricityPriceApi.getElectricityPricePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ElectricityPriceApi.exportElectricityPrice(queryParams)
download.excel(data, '电价模型.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ElectricityPriceApi.deleteElectricityPrice(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ElectricityPriceApi.exportElectricityPrice(queryParams)
download.excel(data, '电价模型.xls')
} catch {
} finally {
exportLoading.value = false
}
//
}
//
const openDetail = (id?: number) => {
detailRef.value.open(id)
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -0,0 +1,127 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
<el-form-item label="尖电价" prop="theTipPrice">
<el-input v-model="formData.theTipPrice" placeholder="请输入尖电价" />
</el-form-item>
<el-form-item label="峰电价" prop="peakPrice">
<el-input v-model="formData.peakPrice" placeholder="请输入峰电价" />
</el-form-item>
<el-form-item label="平电价" prop="flatPrice">
<el-input v-model="formData.flatPrice" placeholder="请输入平电价" />
</el-form-item>
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input v-model="formData.theValleyPrice" placeholder="请输入谷电价" />
</el-form-item>
<el-form-item label="时段数" prop="periodsAmount">
<el-input v-model="formData.periodsAmount" placeholder="请输入时段数" />
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input v-model="formData.remark" placeholder="请输入备注信息" />
</el-form-item>
<el-form-item label="运营商id" prop="operatorId">
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { ElectricityPriceApi, ElectricityPriceVO } from '@/api/operationsManagement/electricityPriceModel'
/** 电价模型 表单 */
defineOptions({ name: 'ElectricityPriceForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
name: undefined,
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
periodsAmount: undefined,
remark: undefined,
operatorId: undefined,
})
const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ElectricityPriceApi.getElectricityPrice(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ElectricityPriceApi.ElectricityPriceVO
if (formType.value === 'create') {
await ElectricityPriceApi.createElectricityPrice(data)
message.success(t('common.createSuccess'))
} else {
await ElectricityPriceApi.updateElectricityPrice(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
name: undefined,
theTipPrice: undefined,
peakPrice: undefined,
flatPrice: undefined,
theValleyPrice: undefined,
periodsAmount: undefined,
remark: undefined,
operatorId: undefined,
}
formRef.value?.resetFields()
}
</script>

@ -6,6 +6,7 @@
:rules="formRules"
label-width="130px"
v-loading="formLoading"
label-position="top"
>
<!--
<el-table-column label="所有人" align="center" prop="producer" />

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="80px"
label-width="100px"
>
<el-form-item label="车辆型号" prop="vehicleType">
<el-input
@ -58,7 +58,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 type="primary" @click="openForm('create')" v-hasPermi="['member:tag:create']">
<el-button type="primary" @click="openForm('create')" >
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
@ -66,7 +66,7 @@
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['infra:config:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
@ -80,6 +80,7 @@
@current-change="handleCurrentChange" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
 <el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="编号" align="center" prop="id" width="150px" />
<el-table-column label="车队id" align="center" prop="teamId" /> -->
<el-table-column label="车队名称" align="center" prop="teamName" />
@ -122,7 +123,7 @@
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['member:tag:update']"
>
编辑
</el-button>
@ -130,7 +131,7 @@
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['member:tag:delete']"
>
删除
</el-button>
@ -138,7 +139,7 @@
link
type="primary"
@click="openDetail(scope.row.id)"
v-hasPermi="['system:sms-log:query']"
>
详情
</el-button>
@ -148,7 +149,7 @@
type="danger"
@click="handleCheck2(scope.row.id)"
v-if="scope.row.status == 0"
v-hasPermi="['system:post:delete']"
>
启用
</el-button>
@ -157,7 +158,7 @@
type="danger"
@click="handleCheck2(scope.row.id)"
v-if="scope.row.status == 1"
v-hasPermi="['system:post:delete']"
>
禁用
</el-button>
@ -169,7 +170,7 @@
link
type="danger"
@click="dialogVisible_binding = true"
v-hasPermi="['system:post:delete']"
v-if="scope.row.teamId == null "
>
绑定车队
@ -178,7 +179,7 @@
link
type="danger"
@click="boundFleetJB(scope.row)"
v-hasPermi="['system:post:delete']"
v-if="scope.row.teamId != null "
>
解绑

@ -58,7 +58,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 type="primary" @click="openForm('create')" v-hasPermi="['member:tag:create']">
<el-button type="primary" @click="openForm('create')">
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
</el-form-item>
@ -118,7 +118,7 @@
</el-button> -->
<el-button link v-if="scope.row.auditState ==0" type="danger" @click="handleCheck(scope.row.id)"
v-hasPermi="['system:post:delete']">
>
审核
</el-button>
</template>

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
label-width="100px"
>
<el-form-item label="用户名" prop="userName">
<el-input
@ -70,6 +70,7 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
 <el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="编号" align="center" prop="id" width="150px" />
<el-table-column label="用户id" align="center" prop="userId" /> -->
<el-table-column label="用户名" align="center" prop="userName" />
@ -118,11 +119,11 @@
删除
</el-button> -->
<el-button link type="primary" @click="openDetail(scope.row.id)"
v-hasPermi="['system:sms-log:query']">
>
详情
</el-button>
<el-button link v-if="scope.row.auditState ==0" type="danger" @click="handleCheck(scope.row.id)"
v-hasPermi="['system:post:delete']">
>
审核
</el-button>
<!-- -->

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="80px"
label-width="100px"
>
<el-form-item label="车辆型号" prop="vehicleType">
<el-input
@ -58,7 +58,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 type="primary" @click="openForm('create')" v-hasPermi="['member:tag:create']">
<el-button type="primary" @click="openForm('create')" >
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
@ -66,7 +66,7 @@
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['infra:config:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
@ -79,6 +79,7 @@
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
 <el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="编号" align="center" prop="id" width="150px" /> -->
<el-table-column label="车辆型号" align="center" prop="vehicleType" />
<el-table-column label="车牌号" align="center" prop="vehicleNo" />
@ -136,7 +137,7 @@
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['member:tag:update']"
>
编辑
</el-button>
@ -144,20 +145,20 @@
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['member:tag:delete']"
>
删除
</el-button>
<el-button link type="primary" @click="openDetail(scope.row.id)"
v-hasPermi="['system:sms-log:query']">
>
详情
</el-button>
<el-button link v-if="scope.row.status == 0" type="danger" @click="handleCheck(scope.row.id)"
v-hasPermi="['system:post:delete']">
>
启用
</el-button>
<el-button link v-if="scope.row.status == 1" type="danger" @click="handleCheck(scope.row.id)"
v-hasPermi="['system:post:delete']">
>
禁用
</el-button>
<!-- <el-button link type="primary" @click="openPaymentForm(scope.row)"

@ -6,6 +6,7 @@
:rules="formRules"
label-width="150px"
v-loading="formLoading"
label-position="top"
>
<!--
<el-table-column label="所有人" align="center" prop="producer" />
@ -38,104 +39,123 @@
</template>
</el-table-column>-->
<el-row :gutter="24">
<el-col :span="12">
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="车辆型号" prop="vehicleType">
<el-input v-model="formData.vehicleType" placeholder="请输入车辆型号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="11">
<el-form-item label="车牌号" prop="vehicleNo">
<el-input v-model="formData.vehicleNo" placeholder="请输入车牌号" />
</el-form-item>
</el-col>
<el-col :span="12">
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="车辆VIN码" prop="vehicleVin">
<el-input v-model="formData.vehicleVin" placeholder="请输入车辆VIN码" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<!-- <el-col :span="11">
<el-form-item label="mac地址" prop="mac">
<el-input v-model="formData.mac" placeholder="请输入mac地址" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="11">
<el-form-item label="rfid" prop="rfid">
<el-input v-model="formData.rfid" placeholder="请输入rfid" />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-col :span="11">
<el-form-item label="品牌" prop="brand">
<el-input v-model="formData.brand" placeholder="请输入品牌" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
</el-row>
<!-- <el-col :span="11">
<el-form-item label="底盘号码" prop="chassisNumber">
<el-input v-model="formData.chassisNumber" placeholder="请输入底盘号码" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="12">
<!-- <el-col :span="11">
<el-form-item label="电动机号码" prop="engineNumber">
<el-input v-model="formData.engineNumber" placeholder="请输入电动机号码" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="12">
<!-- <el-col :span="11">
<el-form-item label="购车日期" prop="purchaseDate">
<el-input v-model="formData.purchaseDate" placeholder="请输入购车日期" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="11">
<el-form-item label="车辆厂家" prop="producer">
<el-input v-model="formData.producer" placeholder="请输入车辆厂家" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="11">
<el-form-item label="所有人" prop="possessor">
<el-input v-model="formData.possessor" placeholder="请输入所有人" />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="车辆性质" prop="vehicleProperty">
<el-select v-model="formData.vehicleProperty" clearable placeholder="请选择状态">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.VEHICLEPROPERTY)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
<el-select v-model="formData.vehicleProperty" clearable placeholder="请选择状态" style="width: 100%;">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.VEHICLEPROPERTY)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<!-- <el-col :span="11">
<el-form-item label="车辆外观" prop="vehicleApc">
<el-input v-model="formData.vehicleApc" placeholder="请输入车辆外观" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="11">
<el-form-item label="营业开始时间" prop="vehiclestartTimeApc">
<el-input v-model="formData.startTime" placeholder="请输入营业开始时间" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="11">
<el-form-item label="营业结束时间" prop="endTime">
<el-input v-model="formData.endTime" placeholder="请输入营业结束时间" />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-col :span="11">
<el-form-item label="是否允许离线换电" prop="canOffline">
<el-select v-model="formData.canOffline" clearable placeholder="请选择状态">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.CANOFFLINE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
<el-select v-model="formData.canOffline" clearable placeholder="请选择状态" style="width: 100%;">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CANOFFLINE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="状态" prop="status">
<el-select v-model="formData.status" clearable placeholder="请选择状态">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.PERSONAL_VEHICLE_FREEZE_NO)" :key="dict.value"
:label="dict.label" :value="dict.value" />
</el-select>
<el-select v-model="formData.status" clearable placeholder="请选择状态" style="width: 100%;">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.PERSONAL_VEHICLE_FREEZE_NO)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
{{}}
</el-col>
</el-row>
</el-form>
<template #footer>
@ -145,109 +165,108 @@
</Dialog>
</template>
<script setup lang="ts">
import * as vehiclesListApi from '@/api/system/vehicleManagement/personalVehicle/vehiclesList'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
const { t } = useI18n() //
const message = useMessage() //
import * as vehiclesListApi from '@/api/system/vehicleManagement/personalVehicle/vehiclesList'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
vehicleType:undefined,
vehicleNo:undefined,
vehicleVin:undefined,
mac:undefined,
rfid:undefined,
brand:undefined,
chassisNumber:undefined,
engineNumber:undefined,
purchaseDate:undefined,
producer:undefined,
possessor:undefined,
vehicleProperty:undefined,
vehicleApc:undefined,
startTime:undefined,
endTime:undefined,
canOffline:undefined,
status:undefined,
})
const formRules = reactive({
vehicleVin: [{ required: true, message: '车辆VIN码不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await vehiclesListApi.getMemberTag(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
//
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
vehicleType: undefined,
vehicleNo: undefined,
vehicleVin: undefined,
mac: undefined,
rfid: undefined,
brand: undefined,
chassisNumber: undefined,
engineNumber: undefined,
purchaseDate: undefined,
producer: undefined,
possessor: undefined,
vehicleProperty: undefined,
vehicleApc: undefined,
startTime: undefined,
endTime: undefined,
canOffline: undefined,
status: undefined
})
const formRules = reactive({
vehicleVin: [{ required: true, message: '车辆VIN码不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
const data = formData.value as unknown as vehiclesListApi.TagVO
if (formType.value === 'create') {
await vehiclesListApi.createMemberTag(data)
message.success(t('common.createSuccess'))
} else {
await vehiclesListApi.updateMemberTag(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
formData.value = await vehiclesListApi.getMemberTag(id)
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
vehicleType:undefined,
vehicleNo:undefined,
vehicleVin:undefined,
mac:undefined,
rfid:undefined,
brand:undefined,
chassisNumber:undefined,
engineNumber:undefined,
purchaseDate:undefined,
producer:undefined,
possessor:undefined,
vehicleProperty:undefined,
vehicleApc:undefined,
startTime:undefined,
endTime:undefined,
canOffline:undefined,
status:undefined,
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
const data = formData.value as unknown as vehiclesListApi.TagVO
if (formType.value === 'create') {
await vehiclesListApi.createMemberTag(data)
message.success(t('common.createSuccess'))
} else {
await vehiclesListApi.updateMemberTag(data)
message.success(t('common.updateSuccess'))
}
formRef.value?.resetFields()
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
vehicleType: undefined,
vehicleNo: undefined,
vehicleVin: undefined,
mac: undefined,
rfid: undefined,
brand: undefined,
chassisNumber: undefined,
engineNumber: undefined,
purchaseDate: undefined,
producer: undefined,
possessor: undefined,
vehicleProperty: undefined,
vehicleApc: undefined,
startTime: undefined,
endTime: undefined,
canOffline: undefined,
status: undefined
}
</script>
formRef.value?.resetFields()
}
</script>
Loading…
Cancel
Save