9.19 表单宽度的修改

master
zz 2 months ago
parent ef7bf8f261
commit 5817fff11f

@ -127,7 +127,7 @@
:formatter="dateFormatter"
width="180px"
/> -->
<el-table-column label="状态" align="center" prop="status" >
<el-table-column label="状态" align="center" prop="status" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.MAINTENANCE_STATUS" :value="scope.row.status" />
</template>

@ -1,312 +1,220 @@
<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="billingDateId">
<el-select v-model="queryParams.billingDateId" style="width: 100%;">
<el-option
v-for="item in namelist"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<!-- <el-input
<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="billingDateId">
<el-select v-model="queryParams.billingDateId" style="width: 100%">
<el-option v-for="item in namelist" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<!-- <el-input
v-model="queryParams.name"
placeholder="请输入计费模型名称"
clearable
@keyup.enter="handleQuery"
class="!w-200px"
/> -->
</el-form-item>
<!-- <el-form-item label="换电服务单价" prop="price">
<el-input
v-model="queryParams.price"
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-240px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item> -->
<!-- <el-form-item label="开始时刻" prop="startTime">
<el-date-picker
v-model="queryParams.startTime"
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-200px"
/>
</el-form-item>
<el-form-item label="结束时刻" prop="endTime">
<el-date-picker
v-model="queryParams.endTime"
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-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="{
</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-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="索引" 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" >
<template #default="scope">
{{scope.row.price }}
</template>
</el-table-column>
<el-table-column label="电池服务费(分)" align="center" prop="batFee" >
<template #default="scope">
{{scope.row.batFee }}
</template>
</el-table-column>
<el-table-column label="平台服务费(分)" align="center" prop="platformFee" >
<template #default="scope">
{{scope.row.platformFee }}
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="status" >
<template #default="scope">
}"
>
<el-table-column label="序号" type="index" align="center" width="80" />
<el-table-column label="计费模型名称" align="center" prop="name" width="200" />
<el-table-column label="换电服务单价(分)" align="center" prop="price">
<template #default="scope">
{{ scope.row.price }}
</template>
</el-table-column>
<el-table-column label="电池服务费(分)" align="center" prop="batFee">
<template #default="scope">
{{ scope.row.batFee }}
</template>
</el-table-column>
<el-table-column label="平台服务费(分)" align="center" prop="platformFee">
<template #default="scope">
{{ scope.row.platformFee }}
</template>
</el-table-column>
<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>
<!-- MODEL_TIME_STATUS -->
<!-- <el-table-column label="数据来源:0:云平台;1;三方运营商" align="center" prop="source" />
<el-table-column label="唯一编码" align="center" prop="code" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/> -->
<!-- <el-table-column label="换电计费模型月id" align="center" prop="billingDateId" /> -->
<el-table-column label="开始时刻" align="center" prop="startTime" />
<el-table-column label="结束时刻" align="center" prop="endTime" />
<el-table-column label="操作" align="center" fixed="right" width="120">
<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>
<!-- 表单弹窗添加/修改 -->
<!-- <modelTimeForm ref="formRef" @success="getList" /> -->
</template>
</el-table-column>
<el-table-column label="开始时刻" align="center" prop="startTime" />
<el-table-column label="结束时刻" align="center" prop="endTime" />
<el-table-column label="操作" align="center" fixed="right" width="120">
<template #default="scope">
<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>
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import download from '@/utils/download'
import { BillingTimeApi, BillingTimeVO } from '@/api/operationsManagement/billingModel/timeModel'
//
import { ElectricityDateApi, ElectricityDateVO } from '@/api/operationsManagement/billingModel/monthModel'
import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import download from '@/utils/download'
import { BillingTimeApi, BillingTimeVO } from '@/api/operationsManagement/billingModel/timeModel'
//
import {
ElectricityDateApi,
ElectricityDateVO
} from '@/api/operationsManagement/billingModel/monthModel'
// import modelTimeForm from './hoursAndMinutes/modelTimeForm.vue'
/** 换电计费分时模型 列表 */
defineOptions({ name: 'BillingTime' })
const emit=defineEmits(["open"])
const props=defineProps({
selectId:{
type:String,
default:''
/** 换电计费分时模型 列表 */
defineOptions({ name: 'BillingTime' })
const emit = defineEmits(['open'])
const props = defineProps({
selectId: {
type: String,
default: ''
}
})
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const namelist = ref('') //
const list = ref<BillingTimeVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
billingModelId: props.selectId,
price: undefined,
batFee: undefined,
platformFee: undefined,
status: undefined,
source: undefined,
code: undefined,
createTime: [],
billingDateId: undefined,
startTime: [],
endTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
queryParams.billingModelId=props.selectId
const data = await BillingTimeApi.getBillingTimePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const namelist = ref('') //
const list = ref<BillingTimeVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
billingModelId: props.selectId,
price: undefined,
batFee: undefined,
platformFee: undefined,
status: undefined,
source: undefined,
code: undefined,
createTime: [],
billingDateId: undefined,
startTime: [],
endTime: []
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
queryParams.billingModelId = props.selectId
const data = await BillingTimeApi.getBillingTimePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
emit('open',type, id)
// formRef.value.open(type, id)
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
emit('open', type, id)
// formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BillingTimeApi.deleteBillingTime(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await BillingTimeApi.deleteBillingTime(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BillingTimeApi.exportBillingTime(queryParams)
download.excel(data, '换电计费分时模型.xls')
} catch {
} finally {
exportLoading.value = false
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BillingTimeApi.exportBillingTime(queryParams)
download.excel(data, '换电计费分时模型.xls')
} catch {
} finally {
exportLoading.value = false
}
async function getbillingDateData(){
const data = await ElectricityDateApi.getElectricityDatenew({modeId:props.selectId})//id
namelist.value=data||[]
}
/** 初始化 **/
// onMounted(() => {
// getList()
// })
defineExpose({ getList })
async function getbillingDateData() {
const data = await ElectricityDateApi.getElectricityDatenew({ modeId: props.selectId }) //id
watch(()=>props.selectId,async(newValue)=>{
getList()
getbillingDateData()
},{
deep:true,
immediate:true
})
</script>
namelist.value = data || []
}
/** 初始化 **/
// onMounted(() => {
// getList()
// })
defineExpose({ getList })
watch(
() => props.selectId,
async (newValue) => {
getList()
getbillingDateData()
},
{
deep: true,
immediate: true
}
)
</script>

@ -128,43 +128,17 @@
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="name" width="200"/>
<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="是否启用" 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="数据来源:0:云平台;1;三方运营商" align="center" prop="source" />
<el-table-column label="唯一编码" align="center" prop="code" /> -->
<!-- <el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/> -->
<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"
@ -184,9 +158,6 @@
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<!-- <modelDateForm ref="formRef" @success="getList" /> -->
</template>
<script setup lang="ts">

@ -1,163 +1,244 @@
<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" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.SITECLASSIFICATION_TYPE" :value="scope.row.stationType" />
</template>
</el-table-column>
<!-- <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" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.OAHFLAG_STATUS" :value="scope.row.oahFlag" />
</template>
</el-table-column>
<!-- 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" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.MODEL_TIME_STATUS" :value="scope.row.enable" />
</template>
</el-table-column>
<!-- 0:未启用 1:启用 -->
<el-table-column label="计费电量" align="center" prop="electricitySource" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.ELECTRICITYSOURCE" :value="scope.row.electricitySource" />
</template>
</el-table-column>
<!-- 计费电量1默认最大值2soc差值3soe差值4交流5直流60 -->
<el-table-column label="电价电量" align="center" prop="electricityPriceSource" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.ELECTRICITYSOURCE" :value="scope.row.electricityPriceSource" />
</template>
</el-table-column>
<!-- 电价电量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"
/>
<el-table-column label="结束日期 " align="center" prop="endDate" width="180"
/>
<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">
<template #default="scope">
<dict-tag :type="DICT_TYPE.PEAK_PLATEAU_STATE" :value="scope.row.type" />
</template>
</el-table-column>
<!-- 1尖2峰3平4谷 -->
<el-table-column label="尖电价开始时刻" align="center" prop="startTime" width="180"
/>
<el-table-column label="尖电价结束时刻" align="center" prop="endTime" width="180"
/>
</el-table>
</ContentWrap>
<br/>
</el-drawer>
</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" width="120" />
<el-table-column label="换电站名称" align="center" prop="stationName" width="120" />
<el-table-column label="换电站识别号" align="center" prop="stationSn" width="120" />
<!-- <el-table-column label="地理位置" align="center" prop="stationLocation" /> -->
<el-table-column label="站类型" align="center" prop="stationType" width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SITECLASSIFICATION_TYPE" :value="scope.row.stationType" />
</template>
</el-table-column>
<!-- <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" width="130" />
<!-- <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" width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OAHFLAG_STATUS" :value="scope.row.oahFlag" />
</template>
</el-table-column>
<!-- 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" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.MODEL_TIME_STATUS" :value="scope.row.enable" />
</template>
</el-table-column>
<!-- 0:未启用 1:启用 -->
<el-table-column label="计费电量" align="center" prop="electricitySource" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.ELECTRICITYSOURCE" :value="scope.row.electricitySource" />
</template>
</el-table-column>
<!-- 计费电量1默认最大值2soc差值3soe差值4交流5直流60 -->
<el-table-column label="电价电量" align="center" prop="electricityPriceSource" width="100">
<template #default="scope">
<dict-tag
:type="DICT_TYPE.ELECTRICITYSOURCE"
:value="scope.row.electricityPriceSource"
/>
</template>
</el-table-column>
<!-- 电价电量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" width="120" />
<el-table-column label="时段数量" align="center" prop="periodsAmount" />
<el-table-column label="开始日期" align="center" prop="startDate" width="180" />
<el-table-column label="结束日期" align="center" prop="endDate" width="180" />
<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">
<template #default="scope">
<dict-tag :type="DICT_TYPE.PEAK_PLATEAU_STATE" :value="scope.row.type" />
</template>
</el-table-column>
<!-- 1尖2峰3平4谷 -->
<el-table-column label="尖电价开始时刻" align="center" prop="startTime" width="180" />
<el-table-column label="尖电价结束时刻" align="center" prop="endTime" width="180" />
</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' })
const { t } = useI18n() //
const message = useMessage() //
import { dateFormatter } from '@/utils/formatTime'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import {
ElectricityPriceApi,
ElectricityPriceVO
} from '@/api/operationsManagement/electricityPriceModel'
/** 电价模型 表单 */
defineOptions({ name: 'ElectricityPriceForm' })
const { t } = useI18n() //
const message = useMessage() //
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({
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 (id?: number) => {
dialogVisible.value = true
resetForm()
//
if (id) {
formLoading.value = true
try {
const formData2 = await ElectricityPriceApi.getElectricityPrice(id)
oldlist.value = formData2
// console.log(formData2,"-++++++---")
electricityDate.value[0] = formData2.electricityDateResp
stationList.value = formData2.stationList
electricityTimeList.value = formData2.electricityTimeList
// console.log(electricityTimeList.value,"==========")
} 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
await ElectricityPriceApi.createElectricityPrice(data)
message.success(t('common.createSuccess'))
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
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({
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
name: undefined,
theTipPrice: undefined,
@ -166,73 +247,8 @@
theValleyPrice: undefined,
periodsAmount: undefined,
remark: undefined,
operatorId: undefined,
})
const formRules = reactive({
name: [{ required: true, message: '电价模型名称不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (id?: number) => {
dialogVisible.value = true
resetForm()
//
if (id) {
formLoading.value = true
try {
const formData2 = await ElectricityPriceApi.getElectricityPrice(id)
oldlist.value = formData2
// console.log(formData2,"-++++++---")
electricityDate.value[0] = formData2.electricityDateResp
stationList.value = formData2.stationList
electricityTimeList.value = formData2.electricityTimeList
// console.log(electricityTimeList.value,"==========")
} 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
await ElectricityPriceApi.createElectricityPrice(data)
message.success(t('common.createSuccess'))
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()
operatorId: undefined
}
</script>
formRef.value?.resetFields()
}
</script>

@ -14,12 +14,12 @@
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="stationNo" width="100" />
<el-table-column label="换电站名称" align="center" prop="stationName" width="100"/>
<el-table-column label="换电站识别号" align="center" prop="stationSn" width="120"/>
<!-- <el-table-column label="地理位置" align="center" prop="stationLocation" /> -->
<el-table-column label="站类型" align="center" prop="stationType" >
<el-table-column label="站类型" align="center" prop="stationType" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SITECLASSIFICATION_TYPE" :value="scope.row.stationType" />
</template>
@ -34,7 +34,7 @@
: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="contactWay" width="140"/>
<!-- <el-table-column label="服务电话" align="center" prop="serviceTel" /> -->
<!-- <el-table-column label="联系方式-邮箱地址 " align="center" prop="email" /> -->
<el-table-column label="负责人" align="center" prop="principal" />
@ -63,13 +63,13 @@
</el-table-column>
<!-- 0:未启用 1:启用 -->
<el-table-column label="计费电量" align="center" prop="electricitySource" >
<el-table-column label="计费电量" align="center" prop="electricitySource" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.ELECTRICITYSOURCE" :value="scope.row.electricitySource" />
</template>
</el-table-column>
<!-- 计费电量1默认最大值2soc差值3soe差值4交流5直流60 -->
<el-table-column label="电价电量" align="center" prop="electricityPriceSource" >
<el-table-column label="电价电量" align="center" prop="electricityPriceSource" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.ELECTRICITYSOURCE" :value="scope.row.electricityPriceSource" />
</template>

@ -389,7 +389,8 @@ const formRules = reactive({
latitude: [{ required: true, message: '纬度不能为空', trigger: 'blur' }],
longitude: [{ required: true, message: '经度不能为空', trigger: 'blur' }],
areaName: [{ required: true, message: '区域名称不能为空', trigger: 'blur' }],
areaCode: [{ required: true, message: '区域编号不能为空', trigger: 'blur' }]
areaCode: [{ required: true, message: '区域编号不能为空', trigger: 'blur' }],
Time: [{ required: true, message: '营业时间范围不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
const chargeModeIdList=ref()

@ -52,7 +52,7 @@
v-model="formData.teamId"
placeholder="请选择"
clearable
class="!w-240px"
style="width: 100%"
>
<el-option
v-for="item in carlist"

Loading…
Cancel
Save