From f8d40329be026656e6769d9e84f939b43a3c9eea Mon Sep 17 00:00:00 2001
From: zz <2510566342@qq.com>
Date: Sun, 18 Aug 2024 22:14:57 +0800
Subject: [PATCH] =?UTF-8?q?8.18=20=E6=A8=A1=E5=9E=8B=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E6=8F=90=E4=BA=A422?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../billingModel/BillingModelForm.vue | 4 +-
.../hoursAndMinutes/modelTimeForm.vue | 8 +-
.../billingModel/components/month/index.vue | 6 +-
...ctricityDateForm.vue => modelDateForm.vue} | 49 +----------
.../ElectricityPriceForm.vue | 2 +-
.../hoursAndMinutes/ElectricityTimeForm.vue | 83 ++++++++++++++-----
.../components/hoursAndMinutes/index.vue | 14 ++--
.../components/month/ElectricityDateForm.vue | 15 ++--
.../components/month/index.vue | 9 +-
.../electricityPriceModel/index.vue | 6 +-
.../operationalModel/RunModelForm.vue | 2 +-
.../hoursAndMinutes/RunModelDetailForm.vue | 15 ++--
.../hoursAndMinutes/index.vue | 28 +++++--
.../operationalModel/index.vue | 1 +
14 files changed, 128 insertions(+), 114 deletions(-)
rename src/views/system/operationsManagement/billingModel/components/month/{ElectricityDateForm.vue => modelDateForm.vue} (78%)
diff --git a/src/views/system/operationsManagement/billingModel/BillingModelForm.vue b/src/views/system/operationsManagement/billingModel/BillingModelForm.vue
index 4dd33c7..dd231fe 100644
--- a/src/views/system/operationsManagement/billingModel/BillingModelForm.vue
+++ b/src/views/system/operationsManagement/billingModel/BillingModelForm.vue
@@ -4,7 +4,7 @@
添加计费模型月份
-
+
计费模月型列表
@@ -34,7 +34,7 @@
import { BillingModelApi, BillingModelVO } from '@/api/operationsManagement/billingModel'
import modelTimeList from './components/hoursAndMinutes/modelTimeList.vue'
import modelTimeForm from './components/hoursAndMinutes/modelTimeForm.vue'
-import ElectricityDateForm from './components/month/ElectricityDateForm.vue'
+import modelDateForm from './components/month/modelDateForm.vue'
import monthList from './components/month/index.vue'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
diff --git a/src/views/system/operationsManagement/billingModel/components/hoursAndMinutes/modelTimeForm.vue b/src/views/system/operationsManagement/billingModel/components/hoursAndMinutes/modelTimeForm.vue
index 98de17c..f578edb 100644
--- a/src/views/system/operationsManagement/billingModel/components/hoursAndMinutes/modelTimeForm.vue
+++ b/src/views/system/operationsManagement/billingModel/components/hoursAndMinutes/modelTimeForm.vue
@@ -15,7 +15,7 @@
-
+
{
formRef.value?.resetFields()
}
async function getbillingDateData(){
- const data = await ElectricityDateApi.getElectricityDatenew({modelId:props.selectId})
- // const data = await ElectricityDateApi.getElectricityDatePage({modelId:props.selectId})
+ // const data = await ElectricityDateApi.getElectricityDatenew({modelId:props.selectId})
+ const data = await ElectricityDateApi.getElectricityDatePage({modelId:props.selectId})
+ console.log(data,"----------")
billingDateData.value=data.list||[]
}
+
// onMounted(()=>{
// getbillingDateData()
// })
diff --git a/src/views/system/operationsManagement/billingModel/components/month/index.vue b/src/views/system/operationsManagement/billingModel/components/month/index.vue
index d598de0..2cf67a0 100644
--- a/src/views/system/operationsManagement/billingModel/components/month/index.vue
+++ b/src/views/system/operationsManagement/billingModel/components/month/index.vue
@@ -128,7 +128,7 @@
backgroundColor: '#eff4fa'
}">
-
+
@@ -186,7 +186,7 @@
-
+
\ No newline at end of file
diff --git a/src/views/system/operationsManagement/electricityPriceModel/components/hoursAndMinutes/index.vue b/src/views/system/operationsManagement/electricityPriceModel/components/hoursAndMinutes/index.vue
index 344b380..2aa0934 100644
--- a/src/views/system/operationsManagement/electricityPriceModel/components/hoursAndMinutes/index.vue
+++ b/src/views/system/operationsManagement/electricityPriceModel/components/hoursAndMinutes/index.vue
@@ -29,7 +29,7 @@
-->
-
+
搜索
重置
@@ -70,11 +70,11 @@
-
+
-
+
{
loading.value = true
try {
- queryParams.electricityModelId=props.selectId
+ queryParams.dateId=props.selectId
const data = await ElectricityTimeApi.getElectricityTimePage(queryParams)
list.value = data.list
total.value = data.total
diff --git a/src/views/system/operationsManagement/electricityPriceModel/components/month/ElectricityDateForm.vue b/src/views/system/operationsManagement/electricityPriceModel/components/month/ElectricityDateForm.vue
index ef9ce65..fd1c264 100644
--- a/src/views/system/operationsManagement/electricityPriceModel/components/month/ElectricityDateForm.vue
+++ b/src/views/system/operationsManagement/electricityPriceModel/components/month/ElectricityDateForm.vue
@@ -123,7 +123,7 @@ defineOptions({ name: 'ElectricityDateForm' })
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
const props=defineProps({
- modeId:{
+ priceId:{
type:String,
default:''
}
@@ -131,10 +131,10 @@ const props=defineProps({
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
-const formType = ref('') // 表单的类型:create - 新增;update - 修改
+const formType = ref('create') // 表单的类型:create - 新增;update - 修改
const formData = ref({
id: undefined,
- priceId: undefined,
+ // priceId: undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
@@ -148,7 +148,8 @@ const formData = ref({
remark: undefined,
source: undefined,
code: undefined,
- modeId:'',
+ // priceId:'',
+ priceId:props.priceId,
})
const formRules = reactive({
name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }],
@@ -189,9 +190,9 @@ const submitForm = async () => {
// 提交请求
formLoading.value = true
try {
- console.log('props.modeI电价',props.modeId)
+ console.log('props.modelId电价',props.priceId)
const data = formData.value as unknown as ElectricityDateApi.ElectricityDateVO
- data.modeId =props.modeId
+ data.priceId =props.priceId
if (formType.value === 'create') {
await ElectricityDateApi.createElectricityDate(data)
message.success(t('common.createSuccess'))
@@ -211,7 +212,7 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: undefined,
- priceId: undefined,
+ // priceId: undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
diff --git a/src/views/system/operationsManagement/electricityPriceModel/components/month/index.vue b/src/views/system/operationsManagement/electricityPriceModel/components/month/index.vue
index c7fc50a..d4de772 100644
--- a/src/views/system/operationsManagement/electricityPriceModel/components/month/index.vue
+++ b/src/views/system/operationsManagement/electricityPriceModel/components/month/index.vue
@@ -97,8 +97,8 @@
backgroundColor: '#eff4fa'
}">
-
-
+
+
@@ -172,7 +172,8 @@ const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
- priceId:undefined,
+ priceId:props.selectId,
+ // priceId:undefined,
name: undefined,
periodsAmount: undefined,
no: undefined,
@@ -195,7 +196,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
- queryParams.modeId=props.selectId
+ queryParams.priceId=props.selectId
const data = await ElectricityDateApi.getElectricityDatePage(queryParams)
list.value = data.list
total.value = data.total
diff --git a/src/views/system/operationsManagement/electricityPriceModel/index.vue b/src/views/system/operationsManagement/electricityPriceModel/index.vue
index de44f57..4b8cad1 100644
--- a/src/views/system/operationsManagement/electricityPriceModel/index.vue
+++ b/src/views/system/operationsManagement/electricityPriceModel/index.vue
@@ -21,10 +21,10 @@
搜索
重置
-
+
diff --git a/src/views/system/operationsManagement/operationalModel/RunModelForm.vue b/src/views/system/operationsManagement/operationalModel/RunModelForm.vue
index 92ec61e..c483977 100644
--- a/src/views/system/operationsManagement/operationalModel/RunModelForm.vue
+++ b/src/views/system/operationsManagement/operationalModel/RunModelForm.vue
@@ -68,7 +68,7 @@
/** 提交表单 */
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
const modelOpen=(type,id)=>{
- formRef.value.open(type,id,selectId.value)
+ formRef.value.open(type,id)
// console.log(type,id)
}
const submitForm = async () => {
diff --git a/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/RunModelDetailForm.vue b/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/RunModelDetailForm.vue
index db04873..67c3047 100644
--- a/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/RunModelDetailForm.vue
+++ b/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/RunModelDetailForm.vue
@@ -8,11 +8,11 @@
v-loading="formLoading"
>
-
-
+
@@ -77,17 +77,17 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
-const formType = ref('') // 表单的类型:create - 新增;update - 修改
+const formType = ref('create') // 表单的类型:create - 新增;update - 修改
const formData = ref({
id: undefined,
- modelId: undefined,
+ modelId: props.selectId,
name: undefined,
// startTime: undefined,
// endTime: undefined,
Time:[]
})
const formRules = reactive({
- modelId: [{ required: true, message: '运营模型id不能为空', trigger: 'blur' }],
+ // 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' }],
@@ -126,9 +126,10 @@ 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.modelId=props.selectId
data.startTime=formData.value.Time[0]
data.endTime=formData.value.Time[1]
if (formType.value === 'create') {
diff --git a/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/index.vue b/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/index.vue
index 2ce5418..7646301 100644
--- a/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/index.vue
+++ b/src/views/system/operationsManagement/operationalModel/hoursAndMinutes/index.vue
@@ -46,16 +46,16 @@
-
+
-
-
+
@@ -101,6 +101,12 @@ import RunModelDetailForm from './RunModelDetailForm.vue'
/** 场站运营模型详情 列表 */
defineOptions({ name: 'RunModelDetail' })
+const props=defineProps({
+ selectId:{
+ type:String,
+ default:''
+ }
+})
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const emit=defineEmits(["open"])
@@ -111,7 +117,7 @@ const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
- modelId: undefined,
+ modelId: props.selectId,
name: undefined,
createTime: [],
startTime: [],
@@ -124,6 +130,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
+ queryParams.modelId=props.selectId
const data = await RunModelDetailApi.getRunModelDetailPage(queryParams)
list.value = data.list
total.value = data.total
@@ -179,8 +186,15 @@ const handleExport = async () => {
}
}
-/** 初始化 **/
-onMounted(() => {
+// /** 初始化 **/
+// onMounted(() => {
+// getList()
+// })
+watch(()=>props.selectId,(newValue)=>{
getList()
+},{
+ deep:true,
+ immediate:true
})
+defineExpose({ getList })
\ No newline at end of file
diff --git a/src/views/system/operationsManagement/operationalModel/index.vue b/src/views/system/operationsManagement/operationalModel/index.vue
index 8ebbe5d..329f92d 100644
--- a/src/views/system/operationsManagement/operationalModel/index.vue
+++ b/src/views/system/operationsManagement/operationalModel/index.vue
@@ -46,6 +46,7 @@
+