|
|
@@ -27,9 +27,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <a-table :scroll="{ x: '100%', y: 500 }" rowKey="file_id"
|
|
|
- :loading="state.listLoading" :columns="columns" :dataSource="state.list" :rowClassName="rowClassName"
|
|
|
- :pagination="paginationConfig"
|
|
|
+ <a-table :scroll="{ x: '100%', y: 500 }" rowKey="file_id" :loading="state.listLoading" :columns="columns"
|
|
|
+ :dataSource="state.list" :rowClassName="rowClassName" :pagination="paginationConfig"
|
|
|
:rowSelection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }">
|
|
|
<!-- 文件夹名称 -->
|
|
|
<template #file_name="{ record }">
|
|
|
@@ -74,7 +73,7 @@
|
|
|
<a-tooltip title="重命名" v-else-if="record.media_type === 4">
|
|
|
<EditOutlined style="margin-right: 10px;" @click="onClickRechristen(record)" />
|
|
|
</a-tooltip>
|
|
|
- <a-tooltip title="删除" >
|
|
|
+ <a-tooltip title="删除">
|
|
|
<DeleteOutlined style="margin-right: 10px;" @click="onClickDelete(record)" />
|
|
|
</a-tooltip>
|
|
|
<a-tooltip title="压缩下载">
|
|
|
@@ -92,7 +91,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { reactive, onMounted } from 'vue';
|
|
|
-import { message ,Modal} from 'ant-design-vue';
|
|
|
+import { message, Modal } from 'ant-design-vue';
|
|
|
import { EditOutlined, DeleteOutlined, DownloadOutlined, AimOutlined, CheckOutlined, CloseOutlined } from '@ant-design/icons-vue';
|
|
|
import Search from './components/Search.vue';
|
|
|
import FileInfo from './components/FileInfo.vue';
|
|
|
@@ -263,9 +262,11 @@ const onClickBatchDelete = async () => {
|
|
|
okType: 'danger',
|
|
|
onOk: async () => {
|
|
|
try {
|
|
|
- await apis.batchDeletePicture(data);
|
|
|
- message.success('删除成功');
|
|
|
- await fetchList();
|
|
|
+ const res = await apis.batchDeletePicture(data);
|
|
|
+ if (res.code === 0) {
|
|
|
+ await fetchList();
|
|
|
+ message.success('删除成功');
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
message.error('删除失败: ' + error);
|
|
|
}
|
|
|
@@ -344,7 +345,7 @@ const onClickSave = async (record: any) => {
|
|
|
|
|
|
// 点击删除
|
|
|
const onClickDelete = async (record: any) => {
|
|
|
- console.log(record,"record");
|
|
|
+ console.log(record, "record");
|
|
|
const data = {
|
|
|
id: record.file_id
|
|
|
}
|
|
|
@@ -354,9 +355,11 @@ const onClickDelete = async (record: any) => {
|
|
|
okType: 'danger',
|
|
|
onOk: async () => {
|
|
|
try {
|
|
|
- await apis.batchDeletePicture(data);
|
|
|
- message.success('删除成功');
|
|
|
- await fetchList();
|
|
|
+ const res = await apis.batchDeletePicture(data);
|
|
|
+ if (res.code === 0) {
|
|
|
+ await fetchList();
|
|
|
+ message.success('删除成功');
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
message.error('删除失败: ' + error);
|
|
|
}
|