引入海康威视插件

This commit is contained in:
zhoumengru
2025-09-11 16:14:55 +08:00
parent 671dd9fec7
commit e995c25fd2
57 changed files with 11735 additions and 2304 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="alarmLog">
<searchBox :btn-option-list="btnOptionList" @operateForm="operateForm"></searchBox>
<!-- <searchBox :btn-option-list="btnOptionList" @operateForm="operateForm"></searchBox> -->
<div class="content-table">
<ComTable
@@ -15,8 +15,8 @@
</template>
<template #status="record">
<span
><a-tag :color="record.status ? 'red' : 'green'">{{
record.status ? '异常' : '正常'
><a-tag :color="record.status==0 ? 'red' : 'green'">{{
record.status==0 ? '异常' : '正常'
}}</a-tag></span
>
</template>
@@ -193,10 +193,10 @@ export default {
<style lang="scss" scoped>
.alarmLog {
height: 100%;
padding: 20px;
.content-table {
height: calc(100% - 90px);
padding: 10px;
height: 100%;
}
}
</style>

View File

@@ -18,8 +18,8 @@
<span>{{ getType(record.type) }}</span>
</template>
<template #isEnable="record">
<span><a-tag :color="record.is_open ? 'green' : 'red'">{{
record.is_open ? '启用' : '禁用'
<span><a-tag :color="record.is_open==1 ? 'green' : 'red'">{{
record.is_open==1 ? '启用' : '禁用'
}}</a-tag></span>
</template>
@@ -203,7 +203,7 @@ export default {
if (i.key === 'id') {
e.ruleForm.id = row.id
} else if (i.key === 'is_open') {
e.ruleForm.is_open = Boolean(row.is_open)
e.ruleForm.is_open = Boolean(Number(row.is_open))
} else {
e.ruleForm[i.key] = row[i.key] || ''
}
@@ -232,10 +232,12 @@ export default {
<style lang="scss" scoped>
.device {
height: 100%;
padding: 0 10px;
.content-table {
width: 100%;
height: calc(100% - 90px);
padding: 10px;
padding: 0 10px;
}
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="syslog">
<searchBox :btn-option-list="btnOptionList" @operateForm="operateForm"></searchBox>
<!-- <searchBox :btn-option-list="btnOptionList" @operateForm="operateForm"></searchBox> -->
<div class="content-table">
<ComTable
@@ -12,8 +12,8 @@
>
<template #status="record">
<span>
<a-tag :color="record.status ? 'red' : 'green'">{{
record.status ? '异常' : '正常'
<a-tag :color="record.status==0 ? 'red' : 'green'">{{
record.status==0 ? '异常' : '正常'
}}</a-tag>
</span>
</template>
@@ -176,10 +176,10 @@ export default {
<style lang="scss" scoped>
.syslog {
height: 100%;
padding: 20px;
.content-table {
height: calc(100% - 90px);
padding: 10px;
height: 100%;
}
}
</style>

View File

@@ -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>

View File

@@ -44,6 +44,7 @@ import { columnList, userOptions } from '../../../public/config/columnList'
import { getReq, postReq } from '@/request/api.js'
import EditCom from '@/components/EditCom.vue'
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
import { Modal } from 'ant-design-vue'
import { createVNode } from 'vue'
export default {
name: '',