227 lines
8.2 KiB
Vue
227 lines
8.2 KiB
Vue
<template>
|
||
<div class="calculate">
|
||
<div class="header">
|
||
<div class="headerTitle">计算引擎</div>
|
||
<el-button type="primary">注册/更新</el-button>
|
||
</div>
|
||
<div class="modulesList">
|
||
<div class="moduleRow" v-for="row in rowLength" :key="moduleList[(row - 1) * colLen].id">
|
||
<div class="moduleItem">
|
||
<div class="itemMain">
|
||
<div class="title">
|
||
{{ moduleList[(row - 1) * colLen].title }}
|
||
</div>
|
||
<div class="versionTime">
|
||
<div class="version">{{ '版本:' + moduleList[(row - 1) * colLen].version }}</div>
|
||
<div class="updateTime">{{ '更新于:' + moduleList[(row - 1) * colLen].updateTime }}</div>
|
||
</div>
|
||
<div class="main-main">
|
||
{{ moduleList[(row - 1) * colLen].desc }}
|
||
</div>
|
||
<div class="footer-main">
|
||
{{ '任务周期:' + moduleList[(row - 1) * colLen].taskRange }}
|
||
</div>
|
||
</div>
|
||
<div class="itemAside">
|
||
<el-button type="primary">查看</el-button>
|
||
<el-button v-if="moduleList[(row - 1) * colLen].status === 2" type="primary" plain>激活</el-button>
|
||
<el-button v-if="moduleList[(row - 1) * colLen].status === 1" type="danger" plain>禁用</el-button>
|
||
</div>
|
||
</div>
|
||
<div class="moduleItem" v-if="moduleList[(row - 1) * colLen + 1]">
|
||
<div class="itemMain">
|
||
<div class="title">
|
||
{{ moduleList[(row - 1) * colLen + 1].title }}
|
||
</div>
|
||
<div class="versionTime">
|
||
<div class="version">{{ '版本:' + moduleList[(row - 1) * colLen + 1].version }}</div>
|
||
<div class="updateTime">{{ '更新于:' + moduleList[(row - 1) * colLen + 1].updateTime }}</div>
|
||
</div>
|
||
<div class="main-main">
|
||
{{ moduleList[(row - 1) * colLen + 1].desc }}
|
||
</div>
|
||
<div class="footer-main">
|
||
{{ '任务周期:' + moduleList[(row - 1) * colLen + 1].taskRange }}
|
||
</div>
|
||
</div>
|
||
<div class="itemAside">
|
||
<el-button type="primary">查看</el-button>
|
||
<el-button v-if="moduleList[(row - 1) * colLen + 1].status === 2" type="primary" plain>激活</el-button>
|
||
<el-button v-if="moduleList[(row - 1) * colLen + 1].status === 1" type="danger" plain>禁用</el-button>
|
||
</div>
|
||
</div>
|
||
<div class="moduleItem" style="visibility: hidden" v-else></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { computed, ref } from 'vue'
|
||
const moduleList = ref([
|
||
{
|
||
id: 1,
|
||
status: 1,
|
||
title: '风场统计量实时计算模块',
|
||
version: '1.0.0',
|
||
updateTime: '2022-01-01 12:35:56',
|
||
desc: '此脚本以风场为单位,包含:全场总有功功率、全场总无功功率、全场平均风速等。',
|
||
taskRange: '0/5****?',
|
||
},
|
||
{
|
||
id: 2,
|
||
status: 2,
|
||
title: '单机组统计量实时计算模块',
|
||
version: '1.0.1',
|
||
updateTime: '2022-01-01 12:35:56',
|
||
desc: '此脚本以机组为单位,计算各机组的实时计算量,包含:有功可增量、有功可减量、4GC有功指令等',
|
||
taskRange: '0/5****?',
|
||
},
|
||
{
|
||
id: 1,
|
||
status: 1,
|
||
title: '风场统计量实时计算模块',
|
||
version: '1.0.0',
|
||
updateTime: '2022-01-01 12:35:56',
|
||
desc: '此脚本以风场为单位,包含:全场总有功功率、全场总无功功率、全场平均风速等。',
|
||
taskRange: '0/5****?',
|
||
},
|
||
{
|
||
id: 2,
|
||
status: 2,
|
||
title: '单机组统计量实时计算模块',
|
||
version: '1.0.1',
|
||
updateTime: '2022-01-01 12:35:56',
|
||
desc: '此脚本以机组为单位,计算各机组的实时计算量,包含:有功可增量、有功可减量、4GC有功指令等',
|
||
taskRange: '0/5****?',
|
||
},
|
||
{
|
||
id: 1,
|
||
status: 1,
|
||
title: '风场统计量实时计算模块',
|
||
version: '1.0.0',
|
||
updateTime: '2022-01-01 12:35:56',
|
||
desc: '此脚本以风场为单位,包含:全场总有功功率、全场总无功功率、全场平均风速等。',
|
||
taskRange: '0/5****?',
|
||
},
|
||
])
|
||
|
||
const colLen = 2
|
||
const rowLength = computed(() => {
|
||
return Math.ceil(moduleList.value.length / 2)
|
||
})
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
.calculate {
|
||
width: 100%;
|
||
height: 100%;
|
||
padding: 10px;
|
||
width: 100%;
|
||
height: 100%;
|
||
.header {
|
||
padding: 10px;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
width: 100%;
|
||
height: 60px;
|
||
border-bottom: 1px solid #eeeeee;
|
||
.headerTitle {
|
||
position: relative;
|
||
width: 134px;
|
||
height: 30px;
|
||
font-size: 18px;
|
||
line-height: 30px;
|
||
text-align: center;
|
||
&::before {
|
||
content: '';
|
||
position: absolute;
|
||
left: 0;
|
||
background: #0064aa;
|
||
height: 100%;
|
||
width: 4px;
|
||
border-radius: 0 8px 8px 0;
|
||
}
|
||
}
|
||
.el-button {
|
||
width: 100px;
|
||
height: 40px;
|
||
}
|
||
}
|
||
.modulesList {
|
||
width: 100%;
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
max-height: 100%;
|
||
min-width: 912px;
|
||
.moduleRow {
|
||
display: flex;
|
||
width: 100%;
|
||
.moduleItem {
|
||
margin: 10px 8px;
|
||
display: flex;
|
||
width: 50%;
|
||
min-height: 170px;
|
||
padding: 10px 20px;
|
||
border-radius: 20px;
|
||
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
|
||
.itemMain {
|
||
width: 90%;
|
||
height: 100%;
|
||
.title {
|
||
font-size: 20px;
|
||
font-weight: 600;
|
||
height: 25px;
|
||
line-height: 25px;
|
||
}
|
||
.versionTime {
|
||
margin-bottom: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
width: 100%;
|
||
height: 18px;
|
||
font-size: 14px;
|
||
color: #0064aa;
|
||
.version {
|
||
min-width: 100px;
|
||
}
|
||
.updateTime {
|
||
margin-left: 30px;
|
||
}
|
||
}
|
||
.main-main {
|
||
width: 100%;
|
||
height: 80px;
|
||
font-size: 16px;
|
||
white-space: pre-wrap;
|
||
}
|
||
.footer-main {
|
||
display: flex;
|
||
align-items: center;
|
||
height: 20px;
|
||
font-size: 14px;
|
||
color: #666666;
|
||
}
|
||
}
|
||
.itemAside {
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
align-items: center;
|
||
width: 10%;
|
||
min-width: 90px;
|
||
.el-button {
|
||
margin: 10px 0;
|
||
width: 80px;
|
||
height: 40px;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</style>
|