feat: 优化事件管理
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||||
* @Date: 2025-12-21 23:02:06
|
* @Date: 2025-12-21 23:02:06
|
||||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||||
* @LastEditTime: 2025-12-30 01:19:20
|
* @LastEditTime: 2026-01-04 10:35:46
|
||||||
* @FilePath: /project/zn-ai/src/renderer/components/TitleSection/index.vue
|
* @FilePath: /project/zn-ai/src/renderer/components/TitleSection/index.vue
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="flex box-border border-b-[1px] border-b-[#E5E8EE] mb-[20px] pb-[20px]">
|
<div class="flex justify-between items-center box-border border-b-[1px] border-b-[#E5E8EE] mb-[20px] pb-[20px]">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<el-icon v-if="attrs.onBackTo" @click="emits('back-to', true)" size="18px" color="#525866" class="mr-[15px] cursor-pointer">
|
<el-icon v-if="attrs.onBackTo" @click="emits('back-to', true)" size="18px" color="#525866" class="mr-[15px] cursor-pointer">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||||
* @Date: 2025-12-30 12:08:51
|
* @Date: 2025-12-30 12:08:51
|
||||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||||
* @LastEditTime: 2026-01-04 00:25:43
|
* @LastEditTime: 2026-01-04 10:30:54
|
||||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManager/addDialog.vue
|
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManager/addDialog.vue
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
-->
|
-->
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
import { UploadFilled } from '@element-plus/icons-vue';
|
import { UploadFilled } from '@element-plus/icons-vue';
|
||||||
import { RiMagicFill, RiDeleteBinLine } from '@remixicon/vue';
|
import { RiMagicFill, RiDeleteBinLine } from '@remixicon/vue';
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { ref, defineModel } from 'vue';
|
import { ref, defineModel, onMounted, watch } from 'vue';
|
||||||
|
|
||||||
const model = defineModel({ type: Boolean, default: false })
|
const model = defineModel({ type: Boolean, default: false })
|
||||||
defineProps({
|
defineProps({
|
||||||
@@ -71,7 +71,14 @@ defineProps({
|
|||||||
data: { type: Object, default: {} },
|
data: { type: Object, default: {} },
|
||||||
})
|
})
|
||||||
|
|
||||||
const activeIndex = ref(1);
|
// 监听 model 的变化
|
||||||
|
watch(model, (newVal, oldVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
activeIndex.value = 0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const activeIndex = ref(0);
|
||||||
// const dialogVisible = ref(false);
|
// const dialogVisible = ref(false);
|
||||||
const handleClose = (done: () => void) => {
|
const handleClose = (done: () => void) => {
|
||||||
done();
|
done();
|
||||||
@@ -93,9 +100,9 @@ const submitForm = async () => {
|
|||||||
}
|
}
|
||||||
// 上传成功
|
// 上传成功
|
||||||
const upSuccess = () => {
|
const upSuccess = () => {
|
||||||
if (activeIndex.value === 1) {
|
if (activeIndex.value === 0) {
|
||||||
activeIndex.value = 2;
|
activeIndex.value = 1;
|
||||||
} if (activeIndex.value === 2) {
|
} else if (activeIndex.value === 1) {
|
||||||
model.value = false;
|
model.value = false;
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '图片上传成功',
|
message: '图片上传成功',
|
||||||
@@ -103,6 +110,8 @@ const upSuccess = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
:deep(.el-steps--simple) {
|
:deep(.el-steps--simple) {
|
||||||
@@ -119,7 +128,7 @@ const upSuccess = () => {
|
|||||||
background: #525866;
|
background: #525866;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-step__icon.is-text) {
|
:deep(.el-step__head.is-process .el-step__icon.is-text) {
|
||||||
border-color: #2B7FFF;
|
border-color: #2B7FFF;
|
||||||
}
|
}
|
||||||
:deep(.el-step__head.is-success) {
|
:deep(.el-step__head.is-success) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||||
* @Date: 2025-12-22 01:11:57
|
* @Date: 2025-12-22 01:11:57
|
||||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||||
* @LastEditTime: 2026-01-03 22:09:31
|
* @LastEditTime: 2026-01-04 10:43:47
|
||||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/components/EventManagement/index.vue
|
* @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
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
-->
|
-->
|
||||||
@@ -84,5 +84,7 @@ const uploadImageChange = (row) => {
|
|||||||
box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 1px rgba(255, 255, 255, 0.24);
|
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-radius: 8px 8px 8px 8px;
|
||||||
border: 1px solid #1447E6;
|
border: 1px solid #1447E6;
|
||||||
|
padding-top: 18px;
|
||||||
|
padding-bottom: 18px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,13 +2,17 @@
|
|||||||
* @Author: kongbeiwu lishaohua-520@qq.com
|
* @Author: kongbeiwu lishaohua-520@qq.com
|
||||||
* @Date: 2025-12-29 13:45:28
|
* @Date: 2025-12-29 13:45:28
|
||||||
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
* @LastEditors: kongbeiwu lishaohua-520@qq.com
|
||||||
* @LastEditTime: 2025-12-30 11:58:46
|
* @LastEditTime: 2026-01-04 10:43:09
|
||||||
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/page.vue
|
* @FilePath: /project/zn-ai/src/renderer/views/knowledge/page.vue
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="bg-white box-border w-full h-full p-[20px]">
|
<div class="bg-white box-border w-full h-full p-[20px]">
|
||||||
<TitleSection @back-to="handleBack" :title="data.date" :desc="data.name" />
|
<TitleSection @back-to="handleBack" :title="data.date" :desc="data.name">
|
||||||
|
<template #right>
|
||||||
|
<el-button class="button" type="primary" :icon="Plus" @click="dialogVisible = true">添加事件</el-button>
|
||||||
|
</template>
|
||||||
|
</TitleSection>
|
||||||
<div class="flex flex-wrap items-center">
|
<div class="flex flex-wrap items-center">
|
||||||
<div v-for="item in 10" class="rounded-[12px] border border-[#E5E8EE] event-pic-item">
|
<div v-for="item in 10" class="rounded-[12px] border border-[#E5E8EE] event-pic-item">
|
||||||
<img src="@assets/images/task/xc.png" />
|
<img src="@assets/images/task/xc.png" />
|
||||||
@@ -39,14 +43,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 添加事件弹窗 -->
|
||||||
|
<UploadImage v-model="dialogVisible" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { DocumentCopy } from '@element-plus/icons-vue';
|
import { DocumentCopy, Plus } from '@element-plus/icons-vue';
|
||||||
import { RiInformationLine, RiEditLine, RiDeleteBinLine } from '@remixicon/vue';
|
import { RiInformationLine, RiEditLine, RiDeleteBinLine } from '@remixicon/vue';
|
||||||
import TitleSection from '@renderer/components/TitleSection/index.vue';
|
import TitleSection from '@renderer/components/TitleSection/index.vue';
|
||||||
|
import UploadImage from '../../components/EventManager/UploadImage.vue';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
data: object;
|
data: object;
|
||||||
@@ -55,6 +62,8 @@ const props = defineProps<Props>();
|
|||||||
|
|
||||||
const emits = defineEmits(["update:change"]);
|
const emits = defineEmits(["update:change"]);
|
||||||
|
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
|
||||||
// 复制文本
|
// 复制文本
|
||||||
const copyText = async (text) => {
|
const copyText = async (text) => {
|
||||||
try {
|
try {
|
||||||
@@ -87,4 +96,12 @@ const handleBack = (val) => {
|
|||||||
.event-pic-item:nth-child(4n) {
|
.event-pic-item:nth-child(4n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
: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;
|
||||||
|
padding-top: 18px;
|
||||||
|
padding-bottom: 18px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user