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

@@ -6,7 +6,6 @@ export const getBannerListApi = (params: any) => {
};
//新增
export const getBannerListSaveApi = (params: any) => {
console.log("1232323");
return http.post<any>(`${B}/save`, params, {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
@@ -37,3 +36,7 @@ export const getBannerListExportApi = (params: any) => {
responseType: "arraybuffer"
});
};
//分类
export const getBannerClassListApi = () => {
return http.get<any>(`/banner/list`); //v1/banner/list
};

View File

@@ -26,5 +26,9 @@ export const getProductBuypassUpdateApi = (params: any) => {
//新增
export const getProductBuypassListSaveApi = (params: any) => {
return http.post<any>(`${PRODUCT_BUYPASS}/save`, params);
return http.post<any>(`${PRODUCT_BUYPASS}/save`, params, {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
});
};

View File

@@ -26,3 +26,7 @@ export const getVideoListExportApi = (params: any) => {
responseType: "arraybuffer"
});
};
//视频分类
export const getVideoClassListApi = () => {
return http.get<any>(`/video/categorys`);
};

View File

@@ -189,7 +189,7 @@ const handlePicker = (item: any) => {
if (Array.isArray(_searchParam.value[prop]) && _searchParam.value[prop].length > 0) {
let _date: any = cloneDeep(_searchParam.value[prop]);
_date[0] = _date[0] + " " + "00:00:00";
_date[1] = _date[1] + " " + "00:00:00";
_date[1] = _date[1] + " " + "23:59:59";
_searchParam.value[item.startDate] = _date.join(",");
} else {
_searchParam.value[item.startDate] = "";

View File

@@ -102,7 +102,7 @@ const formItemContext = inject(formItemContextKey, void 0);
const self_disabled = computed(() => {
return props.disabled || formContext?.disabled;
});
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
/**
* @description 图片上传
* @param options upload 所有配置项

View File

@@ -88,7 +88,7 @@ const self_disabled = computed(() => {
});
const _fileList = ref<UploadUserFile[]>(props.fileList);
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
// 监听 props.fileList 列表默认值改变
watch(
() => props.fileList,

View File

@@ -37,7 +37,7 @@ import { ElNotification, formContextKey, formItemContextKey } from "element-plus
import type { UploadProps, UploadRequestOptions } from "element-plus";
interface UploadFileProps {
videoUrl: string; // 图片地址 ==> 必传
videoUrl: any; // 图片地址 ==> 必传
api?: (params: any) => Promise<any>; // 上传图片的 api 方法,一般项目上传都是同一个 api 方法,在组件里直接引入即可 ==> 非必传
width?: string;
disabled?: boolean; // 是否禁用上传组件 ==> 非必传(默认为 false

1
src/utils/url.ts Normal file
View File

@@ -0,0 +1 @@
export const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;

View File

@@ -28,7 +28,7 @@
<script setup lang="ts" name="QAListIndex">
import ProTable from "@/components/ProTable/index.vue";
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
import { useMsg } from "@/hooks/useMsg";
import { integerRexg } from "@/utils/regexp/index";
import { messageBox } from "@/utils/messageBox";

View File

@@ -29,7 +29,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
{
prop: "category_id",
placeholder: "请选择",
type: "treeSelect",
type: "select",
label: "文章分类: ",
options: []
},

View File

@@ -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: "发布时间: "
}

View File

@@ -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];
}
},
{

View File

@@ -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);
};
//导出

View File

@@ -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";

View File

@@ -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);
};

View File

@@ -42,6 +42,7 @@
ref="formRef"
/>
</div>
<!-- @handleRadioGroupEmits="handleRadioGroupEmits" -->
<template #footer>
<div style="flex: auto">
<el-button @click="handleResetClick">重置</el-button>
@@ -57,7 +58,7 @@ import ProTable from "@/components/ProTable/index.vue";
import rulesForm from "@/components/rulesForm/index.vue";
import { messageBox } from "@/utils/messageBox";
import { useMsg } from "@/hooks/useMsg";
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
//列表接口
import {
getBannerClassListApi,
@@ -99,6 +100,18 @@ const handleConfirmClick = () => {
}
});
};
// const handleRadioGroupEmits = (value: any) => {
// // if (value === "image") {
// // dataStore.editFormData = EDIT_FORM_DATA;
// // dataStore.rules = RULES;
// // } else {
// // dataStore.editFormData = EDIT_FORM_DATA1;
// // dataStore.rules = RULES1;
// // }
// console.log(value, "=========value============");
// };
//重置验证状态
const resetFields = () => {
if (!formRef.value!.ruleFormRef) return;

View File

@@ -60,12 +60,7 @@ export const EDIT_FORM_DATA: FormItem[] = [
placeholder: "请选择",
type: "select",
label: "Banner分类: ",
options: [
{
value: "1",
label: "Level one 1"
}
]
options: []
},
{
prop: "sort",
@@ -137,12 +132,7 @@ export const EDIT_FORM_DATA1: FormItem[] = [
placeholder: "请选择",
type: "select",
label: "Banner分类: ",
options: [
{
value: "1",
label: "Level one 1"
}
]
options: []
},
{
prop: "sort",
@@ -150,15 +140,15 @@ export const EDIT_FORM_DATA1: FormItem[] = [
type: "inputNumber",
label: "Banner排序: "
},
{
prop: "link",
placeholder: "请输入",
type: "inputSelect",
label: "链接地址: ",
placeholder1: "请选择",
prop1: "link_type",
options: []
},
// {
// prop: "link",
// placeholder: "请输入",
// type: "inputSelect",
// label: "链接地址: ",
// placeholder1: "请选择",
// prop1: "link_type",
// options: []
// },
{
prop: "video",
type: "video",

View File

@@ -57,7 +57,6 @@
@check="handleCheck"
placeholder="请选择"
style="padding: 0"
@visible-change="visibleChange"
/>
</template>
</el-input>
@@ -81,7 +80,7 @@ import { useMsg } from "@/hooks/useMsg";
import { useExport } from "@/hooks/useExport";
import { integerRexg } from "@/utils/regexp/index";
// 图片地址
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
// 列表接口
import {
getBannerListApi,
@@ -90,9 +89,10 @@ import {
getBannerListSortApi,
getBannerUpApi,
getBannerListSaveApi,
getBannerListExportApi
getBannerListExportApi,
getBannerClassListApi
} from "@/api/modules/banner";
import { getBannerClassListApi } from "@/api/modules/bannerClass";
// import { getBannerClassListApi } from "@/api/modules/bannerClass";
import { getSystemUrlsApi } from "@/api/modules/home";
// 深拷贝方法
import { cloneDeep } from "lodash-es";
@@ -113,7 +113,7 @@ const dataStore = reactive<any>({
formData: FORM_DATA, // 搜索配置项 dataStore.formData
visible: false,
data: [],
is: false
isFirstRequest: true
});
const selectedNodes = ref(null);
@@ -126,11 +126,7 @@ const treeProps = {
label: "label",
value: "value"
};
const visibleChange = (is: any) => {
dataStore.is = is;
if (dataStore.is) {
}
};
const buildTree = (data: any, outerLinkTo: any = "") => {
return data.map((item: any) => {
const { name, id, url, data: childData = [], children: nestedChildren = [] } = item;
@@ -149,15 +145,27 @@ const buildTree = (data: any, outerLinkTo: any = "") => {
};
});
};
let isFirstRequest = true;
// let isFirstRequest = true;
const handleRadioGroupEmits = (value: any) => {
getBannerClassList();
if (value === "image") {
dataStore.isFirstRequest = true;
dataStore.editFormData = EDIT_FORM_DATA;
dataStore.rules = RULES;
} else {
dataStore.editFormData = EDIT_FORM_DATA1;
dataStore.rules = RULES1;
}
};
const getSystemUrls = async (node: any, resolve: any) => {
//第一次请求
if (isFirstRequest) {
if (dataStore.isFirstRequest) {
const result = await getSystemUrlsApi();
if (result?.code === 0) {
const children = buildTree(result?.data);
resolve(children);
isFirstRequest = false;
dataStore.isFirstRequest = false;
}
} else {
//第二次请求
@@ -212,23 +220,32 @@ const handleCheck = (checkedNodes: any, values: any) => {
// 更新
const getBannerUp = async () => {
if (dataStore.editRuleForm.type === "video") {
dataStore.editRuleForm.link_to = "";
dataStore.editRuleForm.link = "";
}
if (dataStore.editRuleForm.type === "image") {
dataStore.editRuleForm.video = "";
}
const result = await getBannerUpApi(dataStore.editRuleForm);
if (result?.code === 0) {
dataStore.visible = false;
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
formRef!.value!.ruleFormRef.resetFields();
proTableRef?.value?.getTableList();
dataStore.isFirstRequest = true;
}
};
// 分类
const getBannerClassList = async () => {
const result = await getBannerClassListApi({ page: 1, size: 500 });
const result = await getBannerClassListApi();
if (result?.code === 0) {
let arr: any = [];
result?.data?.data?.forEach((item: any) => {
result?.data?.forEach((item: any) => {
arr.push({ value: item.id, label: item.name });
});
console.log(arr, "========arr===============");
dataStore.formData[1].options = arr;
dataStore.editFormData[4].options = arr;
}
@@ -241,13 +258,17 @@ const getBannerListSave = async () => {
dataStore.visible = false;
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
useMsg("success", result?.msg);
dataStore.isFirstRequest = true;
formRef!.value!.ruleFormRef.resetFields();
proTableRef?.value?.getTableList();
}
};
// 导出接口
const getArticleListExport = async () => {
const result = await getBannerListExportApi(dataStore.ruleForm);
const result = await getBannerListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};
// 导出
@@ -290,17 +311,9 @@ const handleBeforeClone = () => {
dataStore.editRuleForm = cloneDeep(EDIT_RULE_FORM);
resetFields();
dataStore.visible = false;
dataStore.isFirstRequest = true;
};
const handleRadioGroupEmits = (value: any) => {
if (value === "image") {
dataStore.editFormData = EDIT_FORM_DATA;
dataStore.rules = RULES;
} else {
dataStore.editFormData = EDIT_FORM_DATA1;
dataStore.rules = RULES1;
}
};
// 删除
const getBannerDel = async (id: any) => {
messageBox("你确定要删除?", async () => {

View File

@@ -62,7 +62,7 @@ import rulesForm from "@/components/rulesForm/index.vue";
import { messageBox } from "@/utils/messageBox";
import { useMsg } from "@/hooks/useMsg";
import { integerRexg } from "@/utils/regexp/index";
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
//列表接口
import {
getCategoryListApi,

View File

@@ -49,7 +49,7 @@ const proTableRef = ref<any>(null);
const $router = useRouter();
//图片地址
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
// 数据源
const dataStore = reactive<any>({
editTableData: cloneDeep(EDIT_TABLE_DATA), //添加|编辑里的表格数据

View File

@@ -37,7 +37,7 @@ import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/index";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
const proTableRef = ref<any>(null);
//图片地址
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
// 数据源
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项

View File

@@ -40,7 +40,10 @@ const handleExport = () => {
};
//导出
const getMenusLisExport = async () => {
const result = await getAgentListExportApi(dataStore.ruleForm);
const result = await getAgentListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};
const getAgentTypesList = async () => {

View File

@@ -40,7 +40,10 @@ const handleExport = () => {
};
//导出
const getMenusLisExport = async () => {
const result = await getLeaveMsgListExportApi(dataStore.ruleForm);
const result = await getLeaveMsgListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};
</script>

View File

@@ -40,7 +40,10 @@ const handleExport = () => {
};
//导出
const getBPListExport = async () => {
const result = await getBPListExportApi(dataStore.ruleForm);
const result = await getBPListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};
//

View File

@@ -97,6 +97,7 @@ const dataStore = reactive<any>({
const getProductBuypassListSave = async (params: any) => {
const result = await getProductBuypassListSaveApi(params);
if (result?.code === 0) {
useMsg("success", result?.msg);
// proTableRef?.value?.getTableList();
// console.log(result?.data);
}
@@ -105,6 +106,7 @@ const getProductBuypassListSave = async (params: any) => {
const getProductBuypassUpdate = async (params: any) => {
const result = await getProductBuypassUpdateApi(params);
if (result?.code === 0) {
useMsg("success", result?.msg);
// console.log(result?.data);
}
};
@@ -136,17 +138,16 @@ const handleInputOrChange = (it: any, scope: any, itIndex: any) => {
platform_id = item.id;
}
});
//更新
if (link_id) {
//添加
if (!link_id) {
getProductBuypassListSave({
id: link_id,
param: {
platform_id,
link
}
product_id: scope.row.id,
platform_id,
link
});
} else {
//添加
// 更新
getProductBuypassUpdate({
id: link_id,
param: {
@@ -177,7 +178,10 @@ const handleExport = () => {
//导出接口
const getProductBuypassListExport = async () => {
const result = await getProductBuypassListExportApi(dataStore.ruleForm);
const result = await getProductBuypassListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};

View File

@@ -53,7 +53,7 @@
<el-radio :value="0" :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否推荐" style="width: 440px">
<el-form-item label="热门" style="width: 440px">
<el-radio-group v-model="_ruleFormParam.is_hot">
<el-radio :value="1" :label="1"></el-radio>
<el-radio :value="0" :label="0"></el-radio>
@@ -63,7 +63,7 @@
<el-form-item label="SEO标题">
<el-input v-model="_ruleFormParam.seo_title" style="width: 440px" />
</el-form-item>
<el-form-item label="SEO关键">
<el-form-item label="SEO关键">
<el-input v-model="_ruleFormParam.seo_keywords" style="width: 440px" />
</el-form-item>
<el-form-item label="SEO描述">

View File

@@ -118,7 +118,7 @@ export const BASIC_INFO_FORM_DATA: FormItem[] = [
prop: "seo_keyword",
placeholder: "请输入",
type: "input",
label: "SEO关键: "
label: "SEO关键: "
},
{
prop: "seo_desc",

View File

@@ -14,12 +14,12 @@
<el-tab-pane label="图片信息" name="imgInfo">
<imgInfo :imgInfoData="dataStore.imgInfoData" ref="imgInfoRef" :attrList="dataStore.attrList" />
</el-tab-pane>
<el-tab-pane label="详细内容" name="third">
<el-tab-pane label="产品详情" name="third">
<div style="width: 1280px; margin: 0 auto">
<WangEditor v-model:value="dataStore.detail" />
</div>
</el-tab-pane>
<el-tab-pane label="相关信息及下载" name="related">
<el-tab-pane label="相关信息" name="related">
<!-- <related ref="relatedRef" :data="dataStore.related" /> -->
<div style="margin-bottom: 16px">
<el-button type="primary" size="small" @click="handleRelatedAdd()">添加行</el-button>

View File

@@ -52,7 +52,7 @@ import ProTable from "@/components/ProTable/index.vue";
import { integerRexg } from "@/utils/regexp/index";
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";
//列表接口
//getProductDelApi
import {
@@ -85,7 +85,10 @@ const handleExport = () => {
};
//导出接口
const getProductListExport = async () => {
const result = await getProductListExportApi(dataStore.ruleForm);
const result = await getProductListExportApi({
...proTableRef?.value?.searchParam,
...proTableRef?.value?.pageable
});
await useExport(result);
};
//上下架
@@ -128,9 +131,6 @@ const handleInput = (row: any) => {
//按钮点击事件
const handleBtnClick = (type: any, row: any) => {
// if (type === "删除") {
// // getProductDel(row.id);
// }
//添加SUK和删除暂时无法操作
if (type == "添加SUK" || type === "删除") {
return false;

View File

@@ -26,7 +26,7 @@
<script setup lang="ts" name="productRecycleIndex">
import ProTable from "@/components/ProTable/index.vue";
import { messageBox } from "@/utils/messageBox";
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
//列表接口
import { getProductTrashListApi, getProductTrashDelApi, getProductTrashRestoreApi } from "@/api/modules/productRecycle";
//深拷贝方法

View File

@@ -72,7 +72,7 @@ import {
} from "@/api/modules/videoClass";
//深拷贝方法
import { cloneDeep } from "lodash-es";
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
//表格和搜索條件
import { RULE_FORM, FORM_DATA, COLUMNS, EDIT_FORM_DATA, EDIT_RULE_FORM, RULES } from "./constant/index";
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)

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);
};
//删除

View File

@@ -36,7 +36,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);
// 数据源

View File

@@ -57,7 +57,7 @@
import rulesForm from "@/components/rulesForm/index.vue";
import ProTable from "@/components/ProTable/index.vue";
// import RecursiveForm from "./components/RecursiveForm";
const h = import.meta.env.VITE_APP_API_BASE_UPLOAD_URL;
import { h } from "@/utils/url";
import { messageBox } from "@/utils/messageBox";
import { useMsg } from "@/hooks/useMsg";
//列表接口

View File

@@ -292,7 +292,7 @@ const getMenusLisSave = async () => {
};
//导出
const getMenusLisExport = async () => {
const result = await getMenusLisExportApi(dataStore.ruleForm);
const result = await getMenusLisExportApi(dataStore.searchParam);
await useExport(result);
};