mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
引入海康威视插件
This commit is contained in:
@@ -15,7 +15,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>
|
||||
@@ -28,8 +28,8 @@
|
||||
<div>
|
||||
<a-modal
|
||||
v-model:open="formModal"
|
||||
width="70%"
|
||||
style="top: 20px"
|
||||
width="900px"
|
||||
style="top: 20px;"
|
||||
:footer="null"
|
||||
:get-container="() => $refs.policy"
|
||||
>
|
||||
@@ -48,6 +48,7 @@ export default {
|
||||
name: '',
|
||||
components: { policyForm },
|
||||
props: {},
|
||||
|
||||
data() {
|
||||
return {
|
||||
formModal: false,
|
||||
@@ -58,21 +59,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' }
|
||||
},
|
||||
@@ -80,7 +78,6 @@ export default {
|
||||
title: '策略描述',
|
||||
dataIndex: 'describe',
|
||||
key: 'describe',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
@@ -94,7 +91,6 @@ export default {
|
||||
title: '是否启用',
|
||||
dataIndex: 'is_open',
|
||||
key: 'isOpen',
|
||||
width: 120,
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'isOpen' }
|
||||
},
|
||||
@@ -103,8 +99,8 @@ export default {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
fixed:'right',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
@@ -130,16 +126,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) {
|
||||
@@ -236,10 +234,11 @@ export default {
|
||||
.policy {
|
||||
// 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