fix: 🧩 修复bug

This commit is contained in:
2025-03-28 16:55:37 +08:00
parent 2694a0c905
commit e0f8d6c574
35 changed files with 165 additions and 101 deletions

View File

@@ -69,9 +69,10 @@ import {
getVideoListDelApi,
getVideoReadApi,
getVideoUpdateApi,
getVideoSaveApi
getVideoSaveApi,
getVideoClassListApi
} from "@/api/modules/videoList";
import { getVideoClassListApi } from "@/api/modules/videoClass";
// import { getVideoClassListApi } from "@/api/modules/videoClass";
//深拷贝方法
import { cloneDeep } from "lodash-es";
//表格和搜索條件
@@ -81,7 +82,7 @@ import { useExport } from "@/hooks/useExport";
const proTableRef = ref<any>(null);
const formRef: any = ref(null);
//图片地址
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
// 数据源
const dataStore = reactive<any>({
title: "添加视频",
@@ -124,11 +125,11 @@ const handleResetClick = () => {
//视频分类接口
const getVideoClassList = async () => {
const result = await getVideoClassListApi({ page: 1, size: 500 });
const result = await getVideoClassListApi();
if (result?.code === 0) {
let arr: any[] = [];
if (result?.data?.data?.length) {
result?.data?.data?.forEach((item: any) => {
if (result?.data?.length) {
result?.data?.forEach((item: any) => {
let obj = {
value: item.id,
label: item.name
@@ -166,6 +167,7 @@ const getVideoSave = async () => {
useMsg("success", msg);
dataStore.visible = false;
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
proTableRef?.value?.getTableList();
}
};
//更新
@@ -176,11 +178,15 @@ const getVideoUpdate = async () => {
useMsg("success", msg);
dataStore.visible = false;
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
proTableRef?.value?.getTableList();
}
};
//导出接口
const getProductListExport = async () => {
const result = await getVideoListExportApi(dataStore.ruleForm);
const result = await getVideoListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};
//删除