feat: 事件管理

This commit is contained in:
kongbeiwu
2025-12-25 16:49:07 +08:00
parent e07ad476dd
commit ea63ad0a24
2 changed files with 73 additions and 7 deletions

View File

@@ -10,7 +10,8 @@
user-select: none;
}
body, #app {
body,
#app {
overflow: hidden;
}
@@ -51,3 +52,15 @@ body {
opacity: 1;
}
}
.zn-table {
margin-top: 15px;
border-radius: 10px;
border: 1px solid #E5E8EE;
}
.el-table {
margin-top: 0!important;
}
.el-table th.el-table__cell {
background-color: #F5F7FA!important;
}

View File

@@ -2,17 +2,70 @@
* @Author: kongbeiwu lishaohua-520@qq.com
* @Date: 2025-12-22 01:11:57
* @LastEditors: kongbeiwu lishaohua-520@qq.com
* @LastEditTime: 2025-12-22 01:20:51
* @LastEditTime: 2025-12-25 15:18:48
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManagement/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>事件管理11</div>
<div>
<el-button class="button" type="primary" :icon="Plus">添加事件</el-button>
<div class="zn-table mt-[20px]">
<el-table :data="tableData" class="zn-table" style="width: 100%"
show-overflow-tooltip>
<el-table-column prop="date" label="事件名称" width="180" align="center" />
<el-table-column prop="name" label="事件描述" width="180" align="center" />
<el-table-column prop="address" label="生效时间" align="center" />
<el-table-column prop="address" label="结束事件" align="center" />
<el-table-column prop="address" label="关联图片" align="center" />
<el-table-column prop="address" label="启用/停用" align="center" >
<template #default="scope">
<el-switch v-model="scope.row.switch" size="small" />
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button link size="small" type="primary">
查看图片
</el-button>
<el-button link size="small" type="primary">
上传图片
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue';
type TableData = {
address: string
date: string
name: string
switch: boolean
}
const tableData: TableData[] = [
{
date: '亲子周活动',
name: '私汤区到图腾泡池的道路关闭',
address: '2025-12-12 07:38:29',
switch: false,
},
{
date: '道路封闭',
name: '社媒打卡赢亲子套餐体验券',
address: '2025-12-12 07:38:29',
switch: true,
},
];
</script>
<style lang="less" scoped>
<style scoped>
:deep(.el-button.button) {
background: linear-gradient(180deg, #4A8FF9 0%, rgba(0, 0, 0, 0) 100%), #2B7FFF;
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 1px rgba(255, 255, 255, 0.24);
border-radius: 8px 8px 8px 8px;
border: 1px solid #1447E6;
}
</style>