feat: 🚀 修复bug
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
import http from "@/api";
|
import http from "@/api";
|
||||||
// 导出列表
|
// 导出列表
|
||||||
export const getListApi = (params: Record<string, any>) => {
|
export const getListApi = (params: Record<string, any>) => {
|
||||||
|
if (params?.status === "正在导出") {
|
||||||
|
params.status = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return http.get<any>(`exports`, params);
|
return http.get<any>(`exports`, params);
|
||||||
};
|
};
|
||||||
//状态
|
//状态
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export const FORM_DATA: any[] = [
|
|||||||
label: "导出失败"
|
label: "导出失败"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 0,
|
value: "正在导出",
|
||||||
label: "正在导出"
|
label: "正在导出"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,13 +2,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTableRef"
|
||||||
:formData="dataStore.formData"
|
:formData="dataStore.formData"
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:request-api="getListApi"
|
:request-api="getListApi"
|
||||||
:init-param="dataStore.initParam"
|
: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">
|
<template #status_text="scope">
|
||||||
<span v-if="scope.row.status_text === '导出成功'" style="color: #3ad6ac">
|
<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 { RULE_FORM, FORM_DATA, COLUMNS } from "./constant/list/index";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
|
|
||||||
const proTable = ref<any>();
|
const proTableRef = ref<any>();
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore: any = reactive({
|
const dataStore: any = reactive({
|
||||||
columns: COLUMNS, //列表配置项
|
columns: COLUMNS, //列表配置项
|
||||||
@@ -74,6 +81,24 @@ const getExportTypes = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
getExportTypes();
|
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>
|
</script>
|
||||||
<style scope lang="scss">
|
<style scope lang="scss">
|
||||||
.main-container {
|
.main-container {
|
||||||
|
|||||||
@@ -32,8 +32,10 @@ const dataStore = reactive<any>({
|
|||||||
formData: cloneDeep(DETAILS_FORM_DATA),
|
formData: cloneDeep(DETAILS_FORM_DATA),
|
||||||
ruleForm: cloneDeep(DETAILS_RULE_FORM)
|
ruleForm: cloneDeep(DETAILS_RULE_FORM)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 详情表单实例
|
||||||
const detailsRef = ref(null);
|
const detailsRef = ref(null);
|
||||||
console.log(dataStore.buttons, "======================");
|
// 按钮点击事件
|
||||||
const handleButtonClickCallback = () => {};
|
const handleButtonClickCallback = () => {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
type: "textarea",
|
type: "textarea",
|
||||||
label: "仓位:",
|
label: "仓位:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
required: true,
|
||||||
class: "form-item1",
|
class: "form-item1",
|
||||||
maxLength: 5000
|
maxLength: 5000
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
|||||||
// import { useMsg } from "@/hooks/useMsg";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
|
|
||||||
//表格TS
|
// 表格TS
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
|
|
||||||
//深拷贝方法
|
// 深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTableRef = ref<ProTableInstance>();
|
const proTableRef = ref<ProTableInstance>();
|
||||||
@@ -59,13 +59,13 @@ const selectionChange = (selection: any) => {
|
|||||||
dataStore.selectionList = selection;
|
dataStore.selectionList = selection;
|
||||||
};
|
};
|
||||||
|
|
||||||
//顶部按钮点击事件
|
// 顶部按钮点击事件
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
$router.push({ path: "/foundation/set/goods/add" });
|
$router.push({ path: "/foundation/set/goods/add" });
|
||||||
};
|
};
|
||||||
|
|
||||||
//搜索
|
// 搜索
|
||||||
const handleSearch = async (params: any) => {
|
const handleSearch = async (params: any) => {
|
||||||
dataStore.initParam = cloneDeep(params);
|
dataStore.initParam = cloneDeep(params);
|
||||||
//这里需要等到表格刷新以后才去请求
|
//这里需要等到表格刷新以后才去请求
|
||||||
@@ -73,7 +73,8 @@ const handleSearch = async (params: any) => {
|
|||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
//重置
|
|
||||||
|
// 重置
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
dataStore.initParam = cloneDeep(RULE_FORM);
|
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||||
//这里需要等到表格刷新以后才去请求
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
|||||||
367
vite.config.ts.timestamp-1761526887211-bf09e25f7bade.mjs
Normal file
367
vite.config.ts.timestamp-1761526887211-bf09e25f7bade.mjs
Normal file
File diff suppressed because one or more lines are too long
367
vite.config.ts.timestamp-1761526957978-11dadb76ad61e.mjs
Normal file
367
vite.config.ts.timestamp-1761526957978-11dadb76ad61e.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user