fix: 🧩 修复bug
This commit is contained in:
@@ -29,7 +29,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
|
||||
{
|
||||
prop: "category_id",
|
||||
placeholder: "请选择",
|
||||
type: "treeSelect",
|
||||
type: "select",
|
||||
label: "文章分类: ",
|
||||
options: []
|
||||
},
|
||||
|
||||
@@ -27,7 +27,7 @@ export const FORM_DATA: FormItem[] = [
|
||||
{
|
||||
prop: "category_id",
|
||||
placeholder: "请选择",
|
||||
type: "treeSelect",
|
||||
type: "select",
|
||||
isArray: true,
|
||||
label: "文章分类: ",
|
||||
options: []
|
||||
@@ -38,7 +38,7 @@ export const FORM_DATA: FormItem[] = [
|
||||
options: [],
|
||||
startPlaceholder: "开始日期",
|
||||
endPlaceholder: "结束日期",
|
||||
startDate: "created_at",
|
||||
startDate: "release_time",
|
||||
// endDate: "createEndDate",
|
||||
label: "发布时间: "
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
//import { RenderScope } from "@/components/ProTable/interface";
|
||||
import { RenderScope } from "@/components/ProTable/interface";
|
||||
const YES_OR_NO: any = {
|
||||
1: "✔️",
|
||||
0: "❌"
|
||||
};
|
||||
export const COLUMNS = [
|
||||
{
|
||||
align: "center",
|
||||
@@ -32,7 +36,10 @@ export const COLUMNS = [
|
||||
{
|
||||
align: "left",
|
||||
label: "首页推荐",
|
||||
prop: "recommend"
|
||||
prop: "recommend",
|
||||
render: (scope: RenderScope<any>): VNode | string | any => {
|
||||
return YES_OR_NO[scope.row.recommend];
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ import { cloneDeep } from "lodash-es";
|
||||
//表格和搜索條件
|
||||
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
|
||||
//图片地址
|
||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
||||
import { h } from "@/utils/url";
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTableRef = ref<any>(null);
|
||||
const $router = useRouter();
|
||||
@@ -80,7 +80,14 @@ const handleAdd = (type: any) => {
|
||||
|
||||
//导出接口
|
||||
const getArticleListExport = async () => {
|
||||
const result = await getArticleListExportApi(dataStore.ruleForm);
|
||||
// searchParam,
|
||||
// searchInitParam,
|
||||
console.log(proTableRef?.value?.pageable, "===proTableRef?.value?.pageable==");
|
||||
console.log(proTableRef?.value?.searchParam, "=dataStore.initParam=");
|
||||
const result = await getArticleListExportApi({
|
||||
...proTableRef?.value?.searchParam,
|
||||
...proTableRef?.value?.pageable
|
||||
});
|
||||
await useExport(result);
|
||||
};
|
||||
//导出
|
||||
|
||||
@@ -28,7 +28,7 @@ import ProTable from "@/components/ProTable/index.vue";
|
||||
import { messageBox } from "@/utils/messageBox";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { useSearchInfoArray } from "@/hooks/useSearch";
|
||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
||||
import { h } from "@/utils/url";
|
||||
//列表接口
|
||||
import { getArticleTrashListApi, getArticleTrashDelApi, getArticleTrashRestoreApi } from "@/api/modules/articleRecycle";
|
||||
import { getArticleClassDataApi } from "@/api/modules/articleList";
|
||||
|
||||
@@ -34,7 +34,7 @@ import ProTable from "@/components/ProTable/index.vue";
|
||||
import { messageBox } from "@/utils/messageBox";
|
||||
import { useMsg } from "@/hooks/useMsg";
|
||||
import { useExport } from "@/hooks/useExport";
|
||||
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
|
||||
import { h } from "@/utils/url";
|
||||
//列表接口
|
||||
|
||||
import {
|
||||
@@ -61,7 +61,10 @@ const dataStore = reactive<any>({
|
||||
});
|
||||
//导出
|
||||
const getArticleRemarkExport = async () => {
|
||||
const result = await getArticleRemarkExportApi(dataStore.ruleForm);
|
||||
const result = await getArticleRemarkExportApi({
|
||||
...proTableRef?.value?.searchParam,
|
||||
...proTableRef?.value?.pageable
|
||||
});
|
||||
await useExport(result);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user