feat: 🚀 修复bug

This commit is contained in:
2025-10-29 15:03:16 +08:00
parent d0d6853806
commit da31b2d347
8 changed files with 777 additions and 10 deletions

View File

@@ -1,6 +1,10 @@
import http from "@/api";
// 导出列表
export const getListApi = (params: Record<string, any>) => {
if (params?.status === "正在导出") {
params.status = 0;
}
return http.get<any>(`exports`, params);
};
//状态

View File

@@ -28,7 +28,7 @@ export const FORM_DATA: any[] = [
label: "导出失败"
},
{
value: 0,
value: "正在导出",
label: "正在导出"
},
{

View File

@@ -2,13 +2,20 @@
<template>
<div class="table-box">
<ProTable
ref="proTable"
ref="proTableRef"
:formData="dataStore.formData"
:columns="dataStore.columns"
:request-api="getListApi"
:init-param="dataStore.initParam"
:orgCode="dataStore.ruleForm.orgCode"
>
<template v-slot:search>
<SearchForm
@search="handleSearch"
@reset="handleReset"
:searchParams="dataStore.initParam"
:formData="dataStore.formData"
/>
</template>
<!-- 导出状态 -->
<template #status_text="scope">
<span v-if="scope.row.status_text === '导出成功'" style="color: #3ad6ac">
@@ -47,7 +54,7 @@ import { getListApi, getExportTypesApi } from "@/api/modules/exportList";
import { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/list/index";
import { cloneDeep } from "lodash-es";
const proTable = ref<any>();
const proTableRef = ref<any>();
// 数据源
const dataStore: any = reactive({
columns: COLUMNS, //列表配置项
@@ -74,6 +81,24 @@ const getExportTypes = async () => {
}
};
getExportTypes();
// 搜索
const handleSearch = async (params: any) => {
dataStore.initParam = cloneDeep(params);
//这里需要等到表格刷新以后才去请求
nextTick(() => {
proTableRef?.value!.getTableList();
});
};
// 重置
const handleReset = () => {
dataStore.initParam = cloneDeep(RULE_FORM);
//这里需要等到表格刷新以后才去请求
nextTick(() => {
proTableRef?.value!.getTableList();
});
};
</script>
<style scope lang="scss">
.main-container {

View File

@@ -32,8 +32,10 @@ const dataStore = reactive<any>({
formData: cloneDeep(DETAILS_FORM_DATA),
ruleForm: cloneDeep(DETAILS_RULE_FORM)
});
// 详情表单实例
const detailsRef = ref(null);
console.log(dataStore.buttons, "======================");
// 按钮点击事件
const handleButtonClickCallback = () => {};
</script>

View File

@@ -14,6 +14,7 @@ export const DETAILS_FORM_DATA: any[] = [
type: "textarea",
label: "仓位:",
disabled: false,
required: true,
class: "form-item1",
maxLength: 5000
}

View File

@@ -73,6 +73,7 @@ const handleSearch = async (params: any) => {
proTableRef?.value!.getTableList();
});
};
// 重置
const handleReset = () => {
dataStore.initParam = cloneDeep(RULE_FORM);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long