8.17 第三次提交

master
zz 3 months ago
parent c9779c1567
commit e8fd22ea20

@ -0,0 +1,48 @@
import request from '@/config/axios'
// 场站运营模型详情 VO
export interface RunModelDetailVO {
// id
id: number
// 运营模型id
modelId: number
// 运营区间模型名称
name: string
// 开始时刻
startTime: string
// 结束时刻
endTime: string
}
// 场站运营模型详情 API
export const RunModelDetailApi = {
// 查询场站运营模型详情分页
getRunModelDetailPage: async (params: any) => {
return await request.get({ url: `/cloud/run-model-detail/page`, params })
},
// 查询场站运营模型详情详情
getRunModelDetail: async (id: number) => {
return await request.get({ url: `/cloud/run-model-detail/get?id=` + id })
},
// 新增场站运营模型详情
createRunModelDetail: async (data: RunModelDetailVO) => {
return await request.post({ url: `/cloud/run-model-detail/create`, data })
},
// 修改场站运营模型详情
updateRunModelDetail: async (data: RunModelDetailVO) => {
return await request.put({ url: `/cloud/run-model-detail/update`, data })
},
// 删除场站运营模型详情
deleteRunModelDetail: async (id: number) => {
return await request.delete({ url: `/cloud/run-model-detail/delete?id=` + id })
},
// 导出场站运营模型详情 Excel
exportRunModelDetail: async (params) => {
return await request.download({ url: `/cloud/run-model-detail/export-excel`, params })
},
}

@ -190,7 +190,7 @@ const formData = ref({
// endTime: undefined // endTime: undefined
}) })
const formRules = reactive({ const formRules = reactive({
Time:[{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }], Time:[{ required: true, message: '时间不能为空', trigger: 'blur' }],
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
price: [{ required: true, message: '换电服务单价不能为空', trigger: 'blur' }] price: [{ required: true, message: '换电服务单价不能为空', trigger: 'blur' }]
}) })

@ -70,8 +70,8 @@
<el-date-picker <el-date-picker
v-model="formData.startDate" v-model="formData.startDate"
type="date" type="date"
format="YYYY-MM-DD" format="MM-DD"
value-format="YYYY-MM-DD" value-format="MM-DD"
placeholder="选择开始日期" placeholder="选择开始日期"
style="width: 100%;" style="width: 100%;"
/> />
@ -81,8 +81,8 @@
<el-date-picker <el-date-picker
v-model="formData.endDate" v-model="formData.endDate"
type="date" type="date"
format="YYYY-MM-DD" format="MM-DD"
value-format="YYYY-MM-DD" value-format="MM-DD"
placeholder="选择结束日期" placeholder="选择结束日期"
style="width: 100%;" style="width: 100%;"
/> />

@ -1,5 +1,4 @@
<template> <template>
<el-form <el-form
ref="formRef" ref="formRef"
:model="formData" :model="formData"
@ -34,8 +33,8 @@
<el-date-picker <el-date-picker
v-model="formData.startDate" v-model="formData.startDate"
type="date" type="date"
format="YYYY-MM-DD" format="MM-DD"
value-format="YYYY-MM-DD" value-format="MM-DD"
placeholder="选择开始日期" placeholder="选择开始日期"
style="width: 100%;" style="width: 100%;"
/> />
@ -46,8 +45,8 @@
<el-date-picker <el-date-picker
v-model="formData.endDate" v-model="formData.endDate"
type="date" type="date"
format="YYYY-MM-DD" format="MM-DD"
value-format="YYYY-MM-DD" value-format="MM-DD"
placeholder="选择结束日期" placeholder="选择结束日期"
style="width: 100%;" style="width: 100%;"
/> />

@ -97,21 +97,21 @@
backgroundColor: '#eff4fa' backgroundColor: '#eff4fa'
}"> }">
<el-table-column label="序号" type="index" align="center" width="80" /> <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="id" /> -->
<!-- <el-table-column label="电网电价模型id" align="center" prop="priceId" /> --> <!-- <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" />
<el-table-column label="时段数量" align="center" prop="periodsAmount" /> <!-- <el-table-column label="时段数量" align="center" prop="periodsAmount" />
<el-table-column label="序列" align="center" prop="no" /> <el-table-column label="序列" align="center" prop="no" /> -->
<el-table-column label="开始日期" align="center" prop="startDate" /> <el-table-column label="开始日期" align="center" prop="startDate" />
<el-table-column label="结束日期" align="center" prop="endDate" /> <el-table-column label="结束日期" align="center" prop="endDate" />
<el-table-column label="尖电价" align="center" prop="theTipPrice" /> <el-table-column label="尖电价" align="center" prop="theTipPrice" />
<el-table-column label="峰电价" align="center" prop="peakPrice" /> <el-table-column label="峰电价" align="center" prop="peakPrice" />
<el-table-column label="平电价" align="center" prop="flatPrice" /> <el-table-column label="平电价" align="center" prop="flatPrice" />
<el-table-column label="谷电价" align="center" prop="theValleyPrice" /> <el-table-column label="谷电价" align="center" prop="theValleyPrice" />
<el-table-column label="是否启用:0启用;1禁用" align="center" prop="status" /> <!-- <el-table-column label="是否启用:0启用;1禁用" align="center" prop="status" /> -->
<el-table-column label="备注" align="center" prop="remark" /> <el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="数据来源:0:云平台;1;三方运营商" align="center" prop="source" /> <!-- <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="code" /> -->
<el-table-column label="操作" align="center" width="120" fixed="right"> <el-table-column label="操作" align="center" width="120" fixed="right">
<template #default="scope"> <template #default="scope">

@ -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默认最大值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="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) // 12
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>

@ -1,30 +1,25 @@
<template> <template>
<Dialog :title="dialogTitle" v-model="dialogVisible"> <el-drawer v-model="dialogVisible" size="90%">
<el-form <el-row :gutter="24">
ref="formRef" <el-col :span="12">
:model="formData" <div>添加运营模型小时</div>
:rules="formRules" <br/>
label-width="100px" <RunModelDetailForm ref="formRef" @success="onSuccess" :selectId="selectId"/>
v-loading="formLoading"
> </el-col>
<el-form-item label="运营模型名称" prop="name"> <el-col :span="12">
<el-input v-model="formData.name" placeholder="请输入运营模型名称" /> <div>运营模型小时列表</div>
</el-form-item> <br/>
<el-form-item label="运营商id" prop="operatorId"> <RunModelDetail ref="timeRef" :selectId="selectId" @open="modelOpen" />
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" /> <!-- <ElectricityDate ref="monthRef" :selectId="selectId" @open="dateOpen" /> -->
</el-form-item> </el-col>
<el-form-item label="时段数" prop="periodsAmount"> </el-row>
<el-input v-model="formData.periodsAmount" placeholder="请输入时段数" /> </el-drawer>
</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> </template>
<script setup lang="ts"> <script setup lang="ts">
import { RunModelApi, RunModelVO } from '@/api/operationsManagement/billingModel/monthModel' import { RunModelApi, RunModelVO } from '@/api/operationsManagement/operationalModel'
import RunModelDetailForm from './hoursAndMinutes/RunModelDetailForm.vue'
import RunModelDetail from './hoursAndMinutes/index.vue'
/** 场站运营模型 表单 */ /** 场站运营模型 表单 */
defineOptions({ name: 'RunModelForm' }) defineOptions({ name: 'RunModelForm' })
@ -36,6 +31,7 @@
const dialogTitle = ref('') // const dialogTitle = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const selectId=ref()
const formData = ref({ const formData = ref({
id: undefined, id: undefined,
name: undefined, name: undefined,
@ -46,27 +42,35 @@
name: [{ required: true, message: '运营模型名称不能为空', trigger: 'blur' }], name: [{ required: true, message: '运营模型名称不能为空', trigger: 'blur' }],
}) })
const formRef = ref() // Ref const formRef = ref() // Ref
const timeRef=ref()
const onSuccess=()=>{
timeRef.value.getList()
}
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, id?: number) => { const open = async (type: string, id?: number) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() selectId.value=id
// // resetForm()
if (id) { // //
formLoading.value = true // if (id) {
try { // formLoading.value = true
formData.value = await RunModelApi.getRunModel(id) // try {
} finally { // formData.value = await RunModelApi.getRunModel(id)
formLoading.value = false // } finally {
} // formLoading.value = false
} // }
// }
} }
defineExpose({ open }) // open defineExpose({ open }) // open
/** 提交表单 */ /** 提交表单 */
const emit = defineEmits(['success']) // success const emit = defineEmits(['success']) // success
const modelOpen=(type,id)=>{
formRef.value.open(type,id,selectId.value)
// console.log(type,id)
}
const submitForm = async () => { const submitForm = async () => {
// //
await formRef.value.validate() await formRef.value.validate()

@ -0,0 +1,160 @@
<template>
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="140px"
v-loading="formLoading"
>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="运营模型id" prop="modelId">
<el-input v-model="formData.modelId" placeholder="请输入运营模型id" />
</el-form-item>
</el-col>
<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="Time">
<el-time-picker
v-model="formData.Time"
is-range
range-separator="至"
start-placeholder="初始时间"
end-placeholder="结束时间"
value-format="HH:mm:ss"
/>
</el-form-item>
<!-- <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 :span="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-row>
<el-button @click="submitForm" type="primary" :disabled="formLoading">{{ formType=='update'?'确认编辑':'确认新增' }}</el-button>
<el-button @click="onCencel" v-if="formType=='update'"></el-button>
</el-form>
</template>
<script setup lang="ts">
import { RunModelDetailApi, RunModelDetailVO } from '@/api/operationsManagement/operationalModel/time'
/** 场站运营模型详情 表单 */
defineOptions({ name: 'RunModelDetailForm' })
const props=defineProps({
selectId:{
type:String,
default:''
}
})
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,
modelId: undefined,
name: undefined,
// startTime: undefined,
// endTime: undefined,
Time:[]
})
const formRules = reactive({
modelId: [{ required: true, message: '运营模型id不能为空', trigger: 'blur' }],
name: [{ required: true, message: '运营区间模型名称不能为空', trigger: 'blur' }],
time: [{ required: true, message: '时间不能为空', trigger: 'blur' }],
// startTime: [{ required: true, message: '', trigger: 'blur' }],
// endTime: [{ required: true, message: '', 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 RunModelDetailApi.getRunModelDetail(id)
const res= await RunModelDetailApi.getRunModelDetail(id)
formData.value={...res,Time:[res?.startTime,res?.endTime]}
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
formData.value.modelId=props.selectId
try {
const data = formData.value as unknown as RunModelDetailApi.RunModelDetailVO
data.startTime=formData.value.Time[0]
data.endTime=formData.value.Time[1]
if (formType.value === 'create') {
await RunModelDetailApi.createRunModelDetail(data)
message.success(t('common.createSuccess'))
} else {
await RunModelDetailApi.updateRunModelDetail(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
modelId: undefined,
name: undefined,
startTime: undefined,
endTime: undefined,
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,186 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="130px"
>
<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')"
v-hasPermi="['cloud:run-model-detail:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['cloud:run-model-detail: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="id" align="center" prop="id" /> -->
<el-table-column label="运营模型id" align="center" prop="modelId" />
<el-table-column label="运营区间模型名称" align="center" prop="name" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="开始时刻" align="center" prop="startTime" />
<el-table-column label="结束时刻" align="center" prop="endTime" />
<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>
<!-- 表单弹窗添加/修改 -->
<!-- <RunModelDetailForm ref="formRef" @success="getList" /> -->
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { RunModelDetailApi, RunModelDetailVO } from '@/api/operationsManagement/operationalModel/time'
import RunModelDetailForm from './RunModelDetailForm.vue'
/** 场站运营模型详情 列表 */
defineOptions({ name: 'RunModelDetail' })
const message = useMessage() //
const { t } = useI18n() //
const emit=defineEmits(["open"])
const loading = ref(true) //
const list = ref<RunModelDetailVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
modelId: undefined,
name: undefined,
createTime: [],
startTime: [],
endTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await RunModelDetailApi.getRunModelDetailPage(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)
emit('open',type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RunModelDetailApi.deleteRunModelDetail(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RunModelDetailApi.exportRunModelDetail(queryParams)
download.excel(data, '场站运营模型详情.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -6,7 +6,7 @@
:model="queryParams" :model="queryParams"
ref="queryFormRef" ref="queryFormRef"
:inline="true" :inline="true"
label-width="68px" label-width="100px"
> >
<el-form-item label="运营模型名称" prop="name"> <el-form-item label="运营模型名称" prop="name">
<el-input <el-input
@ -17,39 +17,11 @@
class="!w-240px" class="!w-240px"
/> />
</el-form-item> </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 label="时段数" prop="periodsAmount">
<el-input
v-model="queryParams.periodsAmount"
placeholder="请输入时段数"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <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 @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button <!-- <el-button
type="primary" type="primary"
plain plain
@click="openForm('create')" @click="openForm('create')"
@ -65,7 +37,7 @@
v-hasPermi="['cloud:run-model:export']" v-hasPermi="['cloud:run-model:export']"
> >
<Icon icon="ep:download" class="mr-5px" /> 导出 <Icon icon="ep:download" class="mr-5px" /> 导出
</el-button> </el-button> -->
</el-form-item> </el-form-item>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
@ -74,23 +46,30 @@
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <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="模型id" align="center" prop="id" />
<el-table-column label="运营模型名称" align="center" prop="name" /> <el-table-column label="站点" align="center">
<el-table-column <template #default="scope">
label="创建时间" <el-dropdown placement="bottom-start">
align="center" <el-button>
prop="createTime" 站点集合
:formatter="dateFormatter" <el-icon class="el-icon--right"><arrow-down /></el-icon>
width="180px" </el-button>
/> <template #dropdown>
<el-table-column label="运营商id" align="center" prop="operatorId" /> <el-dropdown-menu>
<el-table-column label="时段数" align="center" prop="periodsAmount" /> <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"> <el-table-column label="操作" align="center">
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
type="primary" type="primary"
@click="openForm('update', scope.row.id)" @click="openForm('update', scope.row.id)"
v-hasPermi="['cloud:run-model:update']"
> >
编辑 编辑
</el-button> </el-button>
@ -98,10 +77,18 @@
link link
type="danger" type="danger"
@click="handleDelete(scope.row.id)" @click="handleDelete(scope.row.id)"
v-hasPermi="['cloud:run-model:delete']"
> >
删除 删除
</el-button> </el-button>
<el-button
link
type="danger"
@click="openDetail(scope.row.id)"
>
详情
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -116,20 +103,24 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<RunModelForm ref="formRef" @success="getList" /> <RunModelForm ref="formRef" @success="getList" />
<!-- 详情 -->
<RunModelDetails ref="detailRef" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { RunModelApi, RunModelVO } from '@/api/operationsManagement/billingModel/monthModel' import { RunModelApi, RunModelVO } from '@/api/operationsManagement/operationalModel'
import RunModelForm from './RunModelForm.vue' import RunModelForm from './RunModelForm.vue'
import RunModelDetails from './RunModelDetails.vue'
/** 场站运营模型 列表 */ /** 场站运营模型 列表 */
defineOptions({ name: 'RunModel' }) defineOptions({ name: 'RunModel' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
/** 详情操作 */
const detailRef = ref()
const loading = ref(true) // const loading = ref(true) //
const list = ref<RunModelVO[]>([]) // const list = ref<RunModelVO[]>([]) //
// //
@ -202,7 +193,10 @@
exportLoading.value = false exportLoading.value = false
} }
} }
//
const openDetail = (id?: number) => {
detailRef.value.open(id)
}
/** 初始化 **/ /** 初始化 **/
onMounted(() => { onMounted(() => {
getList() getList()

Loading…
Cancel
Save