no message
parent
0267bff56c
commit
f4029374a9
|
|
@ -6,8 +6,8 @@
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="id">
|
<a-form-item name="id">
|
||||||
<template #label><span title="任务ID">任务ID</span></template>
|
<template #label><span title="任务号">任务号</span></template>
|
||||||
<a-input v-model:value="queryParam.id" :placeholder="'请输入任务ID'" allow-clear />
|
<a-input v-model:value="queryParam.id" :placeholder="'请输入任务号'" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
|
|
@ -38,6 +38,12 @@
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
|
<a-col :lg="6">
|
||||||
|
<a-form-item v-if="toggleSearchStatus" name="type_MultiString">
|
||||||
|
<template #label><span title="业务类型">业务类型</span></template>
|
||||||
|
<JSelectMultiple v-model:value="queryParam.type_MultiString" dictCode="business_type" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item v-if="toggleSearchStatus" name="createTime">
|
<a-form-item v-if="toggleSearchStatus" name="createTime">
|
||||||
<template #label><span title="创建日期">创建日期</span></template>
|
<template #label><span title="创建日期">创建日期</span></template>
|
||||||
|
|
@ -52,7 +58,13 @@
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="'agvTask:data_agv_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增 </a-button>
|
<a-button type="primary" v-auth="'agvTask:data_agv_task:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增 </a-button>
|
||||||
<a-button type="primary" v-auth="'agvTask:data_agv_task:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
v-auth="'agvTask:data_agv_task:exportXls'"
|
||||||
|
preIcon="ant-design:export-outlined"
|
||||||
|
:loading="exportLoading"
|
||||||
|
@click="handleExport"
|
||||||
|
>
|
||||||
导出
|
导出
|
||||||
</a-button>
|
</a-button>
|
||||||
<j-upload-button
|
<j-upload-button
|
||||||
|
|
@ -151,9 +163,32 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
exportConfig: {
|
exportConfig: {
|
||||||
name: 'AGV任务表',
|
name: 'TES任务信息',
|
||||||
url: getExportUrl,
|
url: getExportUrl,
|
||||||
params: queryParam,
|
params: () => {
|
||||||
|
// 复用 beforeFetch 中的逻辑
|
||||||
|
const newQueryParam = { ...queryParam };
|
||||||
|
|
||||||
|
// 处理日期范围
|
||||||
|
if (newQueryParam.createTime) {
|
||||||
|
try {
|
||||||
|
const [begin, end] = newQueryParam.createTime.split(',');
|
||||||
|
if (begin !== undefined) newQueryParam.createTime_begin = begin;
|
||||||
|
if (end !== undefined) newQueryParam.createTime_end = end;
|
||||||
|
delete newQueryParam.createTime;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('日期范围处理错误:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理其他字段(如 fieldPickers)
|
||||||
|
for (let key in fieldPickers) {
|
||||||
|
if (newQueryParam[key] && fieldPickers[key]) {
|
||||||
|
newQueryParam[key] = getDateByPicker(newQueryParam[key], fieldPickers[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newQueryParam;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
importConfig: {
|
importConfig: {
|
||||||
url: getImportUrl,
|
url: getImportUrl,
|
||||||
|
|
@ -346,6 +381,21 @@
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加导出加载状态
|
||||||
|
const exportLoading = ref(false);
|
||||||
|
|
||||||
|
// 创建带加载状态的导出方法
|
||||||
|
async function handleExport() {
|
||||||
|
exportLoading.value = true;
|
||||||
|
try {
|
||||||
|
// 从 tableContext 中获取原始的 onExportXls 方法
|
||||||
|
// 或者直接调用 handleExportXls
|
||||||
|
await onExportXls();
|
||||||
|
} finally {
|
||||||
|
exportLoading.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue