Commit ace60bab by 胡悦

修复新增公告删除问题

1 parent 8147c031
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-07-26 10:46:04
* @LastEditors: huyue
* @LastEditTime: 2024-07-30 16:21:58
* @LastEditTime: 2024-07-30 17:11:03
-->
<script lang="ts" setup>
import { reactive, ref, nextTick, toRefs, onBeforeMount } from "vue";
......@@ -182,7 +182,6 @@ const deleteInvotice = (id: number) => {
list.value = list.value.filter((item) => item.id !== id);
console.log(list.value)
data.childPass.splice(index, 1);
console.log(id, index)
delete form[`c_filePath${id}`];
delete form[`u_filePath${id}`];
......@@ -196,7 +195,7 @@ const deleteInvotice = (id: number) => {
delete form[`c_loading${id}`];
delete form[`u_loading${id}`];
delete form[`e_loading${id}`];
data.activeKey.splice(index, 1);
// data.activeKey.splice(index, 1);
console.log(form, data)
};
/** 新增公告 */
......@@ -220,7 +219,7 @@ const addInvnotice = () => {
form[`e_loading${_id}`] = false;
data.activeKey.push(_id);
data.childPass.push(false);
console.log(data)
console.log(data, list)
};
onBeforeMount(() => {
if (query.value.id) findById();
......@@ -430,7 +429,7 @@ const onBeforeRemove = (fileItem: FileItem, modelName: string) => {
label="新增公告"
:rules="[{ required: true }]"
>
<a-collapse class="collapse" :default-active-key="data.activeKey">
<a-collapse class="collapse" :activeKey="data.activeKey" :default-active-key="data.activeKey">
<a-collapse-item
v-for="item in list"
:header="form[`c_title${item.id}`]"
......@@ -438,7 +437,9 @@ const onBeforeRemove = (fileItem: FileItem, modelName: string) => {
>
<template #extra>
<dir class="collapse-header">
<icon-delete v-if="!query.id && list.length > 1" @click="deleteInvotice(item.id)" />
<a-popconfirm content="是否确认删除" @ok="deleteInvotice(item.id)" position="tr">
<icon-delete class="icon" v-if="!query.id && list.length > 1" />
</a-popconfirm>
</dir>
</template>
<a-form
......@@ -711,6 +712,14 @@ const onBeforeRemove = (fileItem: FileItem, modelName: string) => {
height: 24px;
box-sizing: border-box;
margin: 0;
position: relative;
.icon {
margin-right: 10px;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
}
</style>
<style lang="scss">
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-07-23 16:43:07
* @LastEditors: huyue
* @LastEditTime: 2024-07-30 15:02:38
* @LastEditTime: 2024-07-30 16:50:32
-->
<!--
* @Description:
......@@ -217,8 +217,6 @@ getTableData()
<!-- <a-button type="text" v-if="record.systemPublishStatus === 1 || record.systemPublishStatus === 2">发布</a-button> -->
<a-button type="text" v-if="record.systemPublishStatus === 3">下架</a-button>
</a-popconfirm>
<a-button type="text" @click="edit(record)" v-if="record.systemPublishStatus === 1 || record.systemPublishStatus === 2">编辑</a-button>
<a-button type="text" @click="previewOA(record)">OA截图</a-button>
<a-image-preview
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditTime: 2024-07-25 11:09:38
* @LastEditTime: 2024-07-30 17:12:02
*/
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
......@@ -13,7 +13,7 @@ const resolve = (dir: string) => path.join(__dirname, dir)
// https://vitejs.dev/config/
export default defineConfig({
base: '/',
base: './',
plugins: [
vue(),
vitePluginForArco({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!