mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
合并代码
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<div>{{ getPolicyType(record.type) }}</div>
|
||||
</template>
|
||||
<template #isOpen="record">
|
||||
<a-tag :color="record.is_open == 1 ? '#2db7f5' : '#f50'">{{
|
||||
<a-tag :color="record.is_open == 1 ? 'green' : 'red'">{{
|
||||
record.is_open == 1 ? '启用' : '禁用'
|
||||
}}</a-tag>
|
||||
</template>
|
||||
@@ -27,8 +27,8 @@
|
||||
<div>
|
||||
<a-modal
|
||||
v-model:open="formModal"
|
||||
width="70%"
|
||||
style="top: 20px"
|
||||
width="900px"
|
||||
style="top: 20px;"
|
||||
:footer="null"
|
||||
:get-container="() => $refs.policy"
|
||||
>
|
||||
@@ -47,6 +47,7 @@ export default {
|
||||
name: '',
|
||||
components: { policyForm },
|
||||
props: {},
|
||||
|
||||
data() {
|
||||
return {
|
||||
formModal: false,
|
||||
@@ -57,21 +58,18 @@ export default {
|
||||
title: '策略ID',
|
||||
dataIndex: 'policy_id',
|
||||
key: 'policyId',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '策略名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '策略类型',
|
||||
dataIndex: 'type', //策略类型:1:削峰套利;2:需求响应;3:自发自用
|
||||
key: 'type',
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'type' }
|
||||
},
|
||||
@@ -79,7 +77,6 @@ export default {
|
||||
title: '策略描述',
|
||||
dataIndex: 'describe',
|
||||
key: 'describe',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
@@ -93,7 +90,6 @@ export default {
|
||||
title: '是否启用',
|
||||
dataIndex: 'is_open',
|
||||
key: 'isOpen',
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'isOpen' }
|
||||
},
|
||||
@@ -102,8 +98,8 @@ export default {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
fixed:'right',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
@@ -128,16 +124,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getTableList() {
|
||||
this.$refs.comTable.loading = true
|
||||
try {
|
||||
this.$refs.comTable.loading = false
|
||||
const res = await getReq('/queryPolicyList', {
|
||||
page: this.pageOption.page,
|
||||
page_size: this.pageOption.pageSize
|
||||
})
|
||||
console.log(res)
|
||||
this.tableData = res.data
|
||||
this.pageOption.count = res.count
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
this.$refs.comTable.loading = false
|
||||
}
|
||||
},
|
||||
getPolicyType(type) {
|
||||
@@ -232,12 +230,13 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.policy {
|
||||
width: 100%;
|
||||
// width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 15px;
|
||||
padding: 0 10px;
|
||||
.content-table {
|
||||
width: 100%;
|
||||
height: calc(100% - 90px);
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user