|
|
|
@ -0,0 +1,162 @@
|
|
|
|
|
<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>
|
|
|
|
|
<!-- ==== -->
|
|
|
|
|
<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默认(最大值),2:soc差值;3:soe差值,4:交流,5:直流,6:0 -->
|
|
|
|
|
<el-table-column label="电价电量" align="center" prop="electricityPriceSource" />
|
|
|
|
|
<!-- 电价电量:1默认(最大值),2:soc差值;3:soe差值,4:交流,5:直流,6:0 -->
|
|
|
|
|
<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="runModelDetailList" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
|
|
|
|
|
backgroundColor: '#eff4fa'
|
|
|
|
|
}">
|
|
|
|
|
|
|
|
|
|
<el-table-column label="运营模型id " align="center" prop="modelId" />
|
|
|
|
|
<el-table-column label="运营区间模型名称 " align="center" prop="name" />
|
|
|
|
|
<el-table-column label="开始日期 " align="center" prop="startTime" width="180"
|
|
|
|
|
:formatter="dateFormatter" />
|
|
|
|
|
<el-table-column label="结束日期 " align="center" prop="endTime" width="180"
|
|
|
|
|
:formatter="dateFormatter"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
<!-- ===== -->
|
|
|
|
|
</el-drawer>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { RunModelApi, RunModelVO } from '@/api/operationsManagement/operationalModel'
|
|
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
|
/** 场站运营模型 表单 */
|
|
|
|
|
defineOptions({ name: 'RunModelForm' })
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
|
const oldlist = ref([])
|
|
|
|
|
const stationList = ref([])
|
|
|
|
|
const runModelDetailList = ref([])
|
|
|
|
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
|
|
|
const dialogTitle = ref('') // 弹窗的标题
|
|
|
|
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
|
|
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
|
|
|
|
const formData = ref({
|
|
|
|
|
id: undefined,
|
|
|
|
|
name: undefined,
|
|
|
|
|
operatorId: undefined,
|
|
|
|
|
periodsAmount: 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 RunModelApi.getRunModel(id)
|
|
|
|
|
// formData.value = await RunModelApi.getRunModel(id)
|
|
|
|
|
oldlist.value = formData2
|
|
|
|
|
stationList.value = formData2.stationList
|
|
|
|
|
runModelDetailList.value = formData2.runModelDetailList
|
|
|
|
|
} 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 RunModelApi.RunModelVO
|
|
|
|
|
|
|
|
|
|
await RunModelApi.createRunModel(data)
|
|
|
|
|
message.success(t('common.createSuccess'))
|
|
|
|
|
|
|
|
|
|
dialogVisible.value = false
|
|
|
|
|
// 发送操作成功的事件
|
|
|
|
|
emit('success')
|
|
|
|
|
} finally {
|
|
|
|
|
formLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 重置表单 */
|
|
|
|
|
const resetForm = () => {
|
|
|
|
|
formData.value = {
|
|
|
|
|
id: undefined,
|
|
|
|
|
name: undefined,
|
|
|
|
|
operatorId: undefined,
|
|
|
|
|
periodsAmount: undefined,
|
|
|
|
|
}
|
|
|
|
|
formRef.value?.resetFields()
|
|
|
|
|
}
|
|
|
|
|
</script>
|