合并冲突

This commit is contained in:
zhoumengru
2025-09-12 16:37:27 +08:00
36 changed files with 734 additions and 870 deletions

View File

@@ -1,11 +1,6 @@
<template>
<div class="station">
<searchBox
:btn-option-list="btnOptionList"
@onSearch="onSearch"
:search-options="searchOptions"
@operateForm="operateForm"
></searchBox>
<searchBox :btn-option-list="btnOptionList" @operateForm="operateForm"></searchBox>
<div class="content-table">
<ComTable
@@ -17,23 +12,26 @@
:page-option="pageOption"
>
<template #status="record">
<span>{{ ['未启用', '启用'][record.status] }}</span>
<a-tag :color="record.status == 0 ? 'red' : 'green'">{{
record.status == 0 ? '未投运' : '投运'
}}</a-tag>
<span>{{}}</span>
</template>
<template #work_mode="record">
<span>{{ workModeList.find((item) => record.value == item.value)?.label || '' }}</span>
<span>{{ workModeList.find((item) => record.work_mode == item.value)?.label || '' }}</span>
</template>
<template #policy_id="record">
<span>{{ policyList.find((item) => record.value == item.value)?.label || '' }}</span>
<span>{{ policyList.find((item) => record.policy_id == item.value)?.label || '' }}</span>
</template>
<template #action="record">
<OperateCom :record="record" :operate-list="operateList" @operateForm="operateForm" />
</template>
</ComTable>
</div>
<a-modal v-model:open="formModal" width="750px" style="top: 80px" :footer="null">
<a-modal v-model:open="formModal" width="750px" style="top: 80px" :footer="null" :destroy-on-close="true">
<!-- action:edit add -->
<EditCom
ref="EditCom"
:record="record"
@operateForm="operateForm"
type="station"
@@ -65,7 +63,7 @@ export default {
data() {
return {
tableOption: {
select:false
select: false
},
formModal: false,
formState: {},
@@ -78,16 +76,24 @@ export default {
paramsDate: {},
workModeList: [
{
label: '最优经济化',
value: 1
label: '峰谷套利',
value: '1'
},
{
label: '支撑电网稳定',
value: 2
label: '增网配容',
value: '2'
},
{
label: '自定义',
value: 3
label: '应急供电',
value: '3'
},
{
label: '并网保电',
value: '4'
},
{
label: '自定时段',
value: '5'
}
],
policyList: [
@@ -154,10 +160,10 @@ export default {
}
} catch (error) {
//统一处理报错提示
this.$refs.comTable.loading = false
}
},
operateForm(type, record = {}) {
console.log(record, record.id, 'rrrrrrrrrr')
this.formStatus = type
switch (type) {
case 'add':
@@ -208,9 +214,7 @@ export default {
callback()
}
},
onCancel() {
// console.log("Cancel");
},
onCancel() {},
class: 'test'
})
},
@@ -232,8 +236,27 @@ export default {
}
stationOptions.forEach((e, index) => {
e.list.forEach((i) => {
e.ruleForm[i.key] = row ? row[i.key] : ''
e.ruleForm.id = row.id
if (i.key == 'work_mode') {
console.log(row[i.key], 'rrrrrrrrr')
switch (row[i.key]) {
case '1':
case '5':
e.ruleForm[i.key] =row[i.key]
// this.$refs.EditCom.workModeIdSelect = row[i.key]
e.ruleForm['policy_id'] = row ? row['policy_id'] : ''
stationOptions[0].list[stationOptions[0].list.length - 1].type = 'select'
break
default:
e.ruleForm[i.key] =row[i.key]
console.log('1245')
stationOptions[0].list[stationOptions[0].list.length - 1].type = 'unshow'
break
}
} else {
e.ruleForm[i.key] = row ? row[i.key] : ''
}
})
})
},
@@ -250,9 +273,9 @@ export default {
.station {
height: 100%;
padding: 0 20px;
.content-table {
height: calc(100% - 70px);
padding: 10px;
height: calc(100% - 92px);
}
}
</style>