8.17 晚上第二次提交

master
zz 3 months ago
parent 2e754d65e5
commit c9779c1567

@ -40,6 +40,9 @@ export const ElectricityDateApi = {
getElectricityDatePage: async (params: any) => {
return await request.get({ url: `/cloud/billing-date/page`, params })
},
getElectricityDatenew: async (params: any) => {
return await request.get({ url: `/electricity-date/list`, params })
},
// 查询电价模型月份详情
getElectricityDate: async (id: number) => {

@ -0,0 +1,46 @@
import request from '@/config/axios'
// 场站运营模型 VO
export interface RunModelVO {
// 模型id
id: number
// 运营模型名称
name: string
// 运营商id
operatorId: number
// 时段数
periodsAmount: number
}
// 场站运营模型 API
export const RunModelApi = {
// 查询场站运营模型分页
getRunModelPage: async (params: any) => {
return await request.get({ url: `/cloud/run-model/page`, params })
},
// 查询场站运营模型详情
getRunModel: async (id: number) => {
return await request.get({ url: `/cloud/run-model/get?id=` + id })
},
// 新增场站运营模型
createRunModel: async (data: RunModelVO) => {
return await request.post({ url: `/cloud/run-model/create`, data })
},
// 修改场站运营模型
updateRunModel: async (data: RunModelVO) => {
return await request.put({ url: `/cloud/run-model/update`, data })
},
// 删除场站运营模型
deleteRunModel: async (id: number) => {
return await request.delete({ url: `/cloud/run-model/delete?id=` + id })
},
// 导出场站运营模型 Excel
exportRunModel: async (params) => {
return await request.download({ url: `/cloud/run-model/export-excel`, params })
},
}

@ -23,8 +23,10 @@
</el-form> -->
<el-descriptions :column="1" border>
<el-descriptions-item label="电池序列号" min-width="120">
<el-descriptions :column="3" border>
<el-descriptions-item label="电池序列号" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.btyNo || "--" }}
</el-descriptions-item>
<el-descriptions-item label="电池型号编号" >

@ -108,11 +108,11 @@
<el-table-column label="电芯供应商代码" align="center" prop="btyCoresSupplierCode" />
<el-table-column label="电池包生产日期" align="center" prop="btyPackProduceDate" />
<el-table-column label="电池包供应商代码" align="center" prop="btyPackSupplierCode" /> -->
<el-table-column label="电池包温度检测数量" align="center" prop="btyPackTempTestingCount" width="160"/>
<!-- <el-table-column label="电池包温度检测数量" align="center" prop="btyPackTempTestingCount" width="160"/>
<el-table-column label="BMS硬件版本" align="center" prop="bmsHardwareVersion" width="120"/>
<el-table-column label="BMS软件版本" align="center" prop="bmsSoftwareVersion" width="120"/>
<el-table-column label="BMS软件版本" align="center" prop="bmsSoftwareVersion" width="120"/> -->
<!-- <el-table-column label="BMS供应商代码" align="center" prop="bmsSupplierCode" /> -->
<el-table-column label="模组数量" align="center" prop="moduleCount" />
<!-- <el-table-column label="模组数量" align="center" prop="moduleCount" /> -->
<!-- <el-table-column label="电池包所属运营企业" align="center" prop="operationEnterprise" />
<el-table-column
label="生产时间"
@ -124,7 +124,7 @@
<!-- <el-table-column label="生产厂家" align="center" prop="producer" /> -->
<el-table-column label="额定容量" align="center" prop="ratedCapacity" />
<el-table-column label="额定电压" align="center" prop="ratedVoltage" />
<el-table-column label="单体蓄电池额定电压" align="center" prop="sglBtyRatedVoltage" width="160"/>
<!-- <el-table-column label="单体蓄电池额定电压" align="center" prop="sglBtyRatedVoltage" width="160"/> -->
<!-- <el-table-column label="运营企业统一社会信用代码" align="center" prop="etpSocialCreditCode" /> -->
<el-table-column label="电池规格" align="center" prop="specification" />
<!-- <el-table-column label="电池所属者" align="center" prop="ownerBy" /> -->

@ -1,6 +1,6 @@
<template>
<el-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="12">
<el-row :gutter="24">
<el-col :span="12">
<div>添加计费模型月份</div>
<br/>
@ -15,7 +15,7 @@
<br/>
<hr/>
<br/>
<el-row :gutter="12">
<el-row :gutter="24">
<el-col :span="12">
<div>添加计费模型时分</div>
<br/>

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

@ -101,7 +101,7 @@
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
<!-- <el-button
type="primary"
plain
@click="openForm('create')"
@ -117,7 +117,7 @@
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-button> -->
</el-form-item>
</el-form>
</ContentWrap>

@ -49,7 +49,7 @@
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="id" />
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="站点" align="center" >
<template #default="scope">

@ -1,6 +1,6 @@
<template>
<l-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="12">
<el-drawer v-model="dialogVisible" size="90%">
<el-row :gutter="24">
<el-col :span="12">
<div>添加电价模型月份</div>
<br/>
@ -16,7 +16,7 @@
<hr/>
<br/>
<el-row :gutter="12">
<el-row :gutter="24">
<el-col :span="12">
<div>添加电价模型小时</div>
<br/>
@ -28,7 +28,7 @@
<ElectricityTime ref="timeRef" :selectId="selectId" @open="modelOpen"/>
</el-col>
</el-row>
</l-drawer>
</el-drawer>
</template>
<script setup lang="ts">
import ElectricityTimeForm from './components/hoursAndMinutes/ElectricityTimeForm.vue'

@ -8,25 +8,34 @@
label-position="top"
>
<el-row :gutter="24">
<el-col :spam="12">
<el-col :span="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-col :span="12">
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
</el-col>
<el-col :spam="12">
<!-- <el-col :span="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-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 label="尖电价开始时刻" prop="startTime">
<el-date-picker
v-model="formData.startTime"
type="date"
@ -35,25 +44,26 @@
/>
</el-form-item>
</el-col>
<el-col :spam="12">
<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-col :spam="12">
<el-col :span="12">
<el-form-item label="电价模型id" prop="electricityModelId">
<el-input v-model="formData.electricityModelId" placeholder="请输入电价模型id" />
</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>
<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 {
@ -78,7 +88,8 @@ const formData = ref({
type: undefined,
startTime: undefined,
endTime: undefined,
electricityModelId: undefined
electricityModelId: undefined,
Time:[]
})
const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
@ -145,4 +156,13 @@ const resetForm = () => {
}
formRef.value?.resetFields()
}
// watch(()=>props.selectId,async(newValue)=>{
// console.log('newValue',newValue)
// getbillingDateData()
// },{
// deep:true,
// immediate:true
// })
</script>

@ -106,7 +106,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ElectricityTimeForm ref="formRef" @success="getList" />
<!-- <ElectricityTimeForm ref="formRef" @success="getList" /> -->
</template>
<script setup lang="ts">
@ -117,7 +117,13 @@ import ElectricityTimeForm from './ElectricityTimeForm.vue'
/** 电价模型小时 列表 */
defineOptions({ name: 'ElectricityTime' })
const emit=defineEmits(["open"])
const props=defineProps({
selectId:{
type:String,
default:''
}
})
const message = useMessage() //
const { t } = useI18n() //
@ -134,7 +140,7 @@ const queryParams = reactive({
startTime: [],
endTime: [],
createTime: [],
electricityModelId: undefined,
electricityModelId:props.selectId,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
@ -143,6 +149,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
queryParams.electricityModelId=props.selectId
const data = await ElectricityTimeApi.getElectricityTimePage(queryParams)
list.value = data.list
total.value = data.total
@ -166,7 +173,8 @@ const resetQuery = () => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
emit('open',type, id)
// formRef.value.open(type, id)
}
/** 删除按钮操作 */
@ -196,9 +204,15 @@ const handleExport = async () => {
exportLoading.value = false
}
}
defineExpose({ getList })
/** 初始化 **/
onMounted(() => {
// onMounted(() => {
// getList()
// })
watch(()=>props.selectId,async(newValue)=>{
getList()
},{
deep:true,
immediate:true
})
</script>

@ -1,5 +1,5 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
@ -8,68 +8,72 @@
v-loading="formLoading"
label-position="top"
>
<el-row :span="24">
<!-- <el-col :span="11">
<el-row :gutter="24">
<!-- <el-col :span="12">
<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-col :span="12">
<el-form-item label="计费模型名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入计费模型名称" />
</el-form-item>
</el-col>
<el-col :span="11">
<!-- <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="11">
<el-col :span="12">
<el-form-item label="序列" prop="no">
<el-input v-model="formData.no" placeholder="请输入序列" />
</el-form-item>
</el-col>
<el-col :span="11">
</el-col> -->
<el-col :span="12">
<el-form-item label="开始日期" prop="startDate">
<el-date-picker
v-model="formData.startDate"
type="date"
value-format="x"
placeholder="选择开始日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="选择开始日期"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="结束日期" prop="endDate">
<el-date-picker
v-model="formData.endDate"
type="date"
value-format="x"
placeholder="选择结束日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
placeholder="选择结束日期"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="尖电价" prop="theTipPrice">
<el-input v-model="formData.theTipPrice" placeholder="请输入尖电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="峰电价" prop="peakPrice">
<el-input v-model="formData.peakPrice" placeholder="请输入峰电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="平电价" prop="flatPrice">
<el-input v-model="formData.flatPrice" placeholder="请输入平电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="谷电价" prop="theValleyPrice">
<el-input v-model="formData.theValleyPrice" placeholder="请输入谷电价" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="是否启用" prop="status">
<el-radio-group v-model="formData.status">
<el-radio
@ -82,12 +86,12 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="11">
<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="11">
<!-- <el-col :span="12">
<el-form-item label="数据来源:0:云平台;1;三方运营商" prop="source">
<el-input
v-model="formData.source"
@ -103,11 +107,10 @@
<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>
<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 { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
@ -120,7 +123,12 @@ defineOptions({ name: 'ElectricityDateForm' })
const { t } = useI18n() //
const message = useMessage() //
const props=defineProps({
modeId:{
type:String,
default:''
}
})
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
@ -140,7 +148,8 @@ const formData = ref({
status: undefined,
remark: undefined,
source: undefined,
code: undefined
code: undefined,
modeId:'',
})
const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
@ -150,7 +159,11 @@ const formRules = reactive({
theValleyPrice: [{ 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
@ -177,7 +190,9 @@ const submitForm = async () => {
//
formLoading.value = true
try {
console.log('props.modeI电价',props.modeId)
const data = formData.value as unknown as ElectricityDateApi.ElectricityDateVO
data.modeId =props.modeId
if (formType.value === 'create') {
await ElectricityDateApi.createElectricityDate(data)
message.success(t('common.createSuccess'))

@ -70,7 +70,7 @@
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
<!-- <el-button
type="primary"
plain
@click="openForm('create')"
@ -86,7 +86,7 @@
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-button> -->
</el-form-item>
</el-form>
</ContentWrap>
@ -98,7 +98,7 @@
}">
<el-table-column label="序号" type="index" align="center" width="80" />
<el-table-column label="电网电价月份模型 ID" align="center" prop="id" />
<el-table-column label="电网电价模型id" align="center" prop="priceId" />
<!-- <el-table-column label="电网电价模型id" align="center" prop="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" />
@ -144,7 +144,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ElectricityDateForm ref="formRef" @success="getList" />
<!-- <ElectricityDateForm ref="formRef" @success="getList" /> -->
</template>
<script setup lang="ts">
@ -155,7 +155,13 @@ import ElectricityDateForm from './ElectricityDateForm.vue'
/** 电价模型月份 列表 */
defineOptions({ name: 'ElectricityDate' })
const emit=defineEmits(["open"])
const props=defineProps({
selectId:{
type:String,
default:''
}
})
const message = useMessage() //
const { t } = useI18n() //
@ -166,7 +172,7 @@ const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
priceId: undefined,
priceId:undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
@ -189,6 +195,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
queryParams.modeId=props.selectId
const data = await ElectricityDateApi.getElectricityDatePage(queryParams)
list.value = data.list
total.value = data.total
@ -212,7 +219,8 @@ const resetQuery = () => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
emit('open',type, id)
// formRef.value.open(type, id)
}
/** 删除按钮操作 */
@ -243,8 +251,15 @@ const handleExport = async () => {
}
}
/** 初始化 **/
onMounted(() => {
// /** **/
// onMounted(() => {
// getList()
// })
watch(()=>props.selectId,(newValue)=>{
getList()
},{
deep:true,
immediate:true
})
defineExpose({ getList })
</script>

@ -0,0 +1,102 @@
<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="运营商id" prop="operatorId">
<el-input v-model="formData.operatorId" placeholder="请输入运营商id" />
</el-form-item>
<el-form-item label="时段数" prop="periodsAmount">
<el-input v-model="formData.periodsAmount" 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 { RunModelApi, RunModelVO } from '@/api/operationsManagement/billingModel/monthModel'
/** 场站运营模型 表单 */
defineOptions({ name: 'RunModelForm' })
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,
operatorId: undefined,
periodsAmount: 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 RunModelApi.getRunModel(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 RunModelApi.RunModelVO
if (formType.value === 'create') {
await RunModelApi.createRunModel(data)
message.success(t('common.createSuccess'))
} else {
await RunModelApi.updateRunModel(data)
message.success(t('common.updateSuccess'))
}
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,5 +1,210 @@
<template>
<span>111</span>
</template>
<script setup lang="ts">
</script>
<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="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-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:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['cloud:run-model: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="运营模型名称" align="center" prop="name" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="运营商id" align="center" prop="operatorId" />
<el-table-column label="时段数" align="center" prop="periodsAmount" />
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['cloud:run-model:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['cloud:run-model: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>
<!-- 表单弹窗添加/修改 -->
<RunModelForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { RunModelApi, RunModelVO } from '@/api/operationsManagement/billingModel/monthModel'
import RunModelForm from './RunModelForm.vue'
/** 场站运营模型 列表 */
defineOptions({ name: 'RunModel' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<RunModelVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
createTime: [],
operatorId: undefined,
periodsAmount: undefined,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await RunModelApi.getRunModelPage(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 RunModelApi.deleteRunModel(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RunModelApi.exportRunModel(queryParams)
download.excel(data, '场站运营模型.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -1,7 +1,9 @@
<template>
<el-drawer title="详情" v-model="dialogVisible" style="width: 800px;">
<el-descriptions :column="1" border>
<el-descriptions-item label="运营商编码" min-width="120">
<el-descriptions :column="3" border>
<el-descriptions-item label="运营商编码" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.code || "--" }}
</el-descriptions-item>
<el-descriptions-item label="运营商名称" >

@ -1,7 +1,9 @@
<template>
<el-drawer title="基本信息" v-model="dialogVisible">
<el-descriptions :column="1" border>
<el-descriptions-item label="车队名称" min-width="120">
<el-descriptions :column="3" border>
<el-descriptions-item label="车队名称" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.teamName || "--" }}
</el-descriptions-item>
<el-descriptions-item label="车辆型号" >

@ -115,16 +115,16 @@
<el-col :span="12">
<el-form-item label="是否允许离线换电" prop="canOffline">
<el-select v-model="formData.canOffline" clearable placeholder="请选择状态">
<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" />
:label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-select v-model="formData.status" clearable placeholder="请选择状态">
<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>

@ -26,7 +26,7 @@
class="!w-240px"
/>
</el-form-item>
<el-form-item label="车辆VIN码" prop="navehicleVinme">
<el-form-item label="车辆VIN码" prop="vehicleVin">
<el-input
v-model="queryParams.vehicleVin"
placeholder="请输入车辆VIN码"

@ -58,9 +58,9 @@
<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')">
<!-- <el-button type="primary" @click="openForm('create')">
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
</el-button> -->
</el-form-item>
</el-form>
</ContentWrap>

@ -1,7 +1,9 @@
<template>
<el-drawer title="基本信息" v-model="dialogVisible">
<el-descriptions :column="1" border>
<el-descriptions-item label="用户名" min-width="120">
<el-descriptions :column="3" border>
<el-descriptions-item label="用户名" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.userName || '--' }}
</el-descriptions-item>
<el-descriptions-item label="手机号">

@ -1,7 +1,9 @@
<template>
<el-drawer title="基本信息" v-model="dialogVisible" width="800">
<el-descriptions :column="1" border>
<el-descriptions-item label="车辆型号" min-width="120">
<el-descriptions :column="3" border>
<el-descriptions-item label="车辆型号" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.vehicleType || "--" }}
</el-descriptions-item>
<el-descriptions-item label="车牌号" >

Loading…
Cancel
Save