From 309b5a2eb4a99f20b2dcceca41c7ed1275bcc6ae Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期二, 22 七月 2025 17:26:08 +0800 Subject: [PATCH] '注册导航上传loading' --- src/views/item/index.vue | 84 +++++++++++------------------------------- 1 files changed, 22 insertions(+), 62 deletions(-) diff --git a/src/views/item/index.vue b/src/views/item/index.vue index fa46f25..b976c49 100644 --- a/src/views/item/index.vue +++ b/src/views/item/index.vue @@ -2,15 +2,16 @@ import { ref, reactive, onMounted } from "vue"; import { ElMessageBox, ElMessage } from "element-plus"; // import { downloadStreamFile } from "@/utils/download"; -import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; -import editDialog from "/@/views/fb_p_complaints/procurementComplaint/component/editDialog.vue"; -import printDialog from "/@/views/system/print/component/hiprint/preview.vue"; +// import { useProcurementComplaintApi } from "/@/api/fb_p_complaints/procurementComplaint"; +import { shouyeOrder } from "@/api/item/index"; +// import editDialog from "/@/views/fb_p_complaints/procurementComplaint/component/editDialog.vue"; +// import printDialog from "/@/views/system/print/component/hiprint/preview.vue"; import ModifyRecord from "/@/components/table/modifyRecord.vue"; -import ImportData from "/@/components/table/importData.vue"; -import commonFunction from "@/utils/commonFunction"; +// import ImportData from "/@/components/table/importData.vue"; +// import commonFunction from "@/utils/commonFunction"; -const { dateFormatYMD } = commonFunction(); -const procurementComplaintApi = useProcurementComplaintApi(); +// const { dateFormatYMD } = commonFunction(); +// const procurementComplaintApi = useProcurementComplaintApi(); const printDialogRef = ref(); const editDialogRef = ref(); const importDataRef = ref(); @@ -34,15 +35,19 @@ }); // 椤甸潰鍔犺浇鏃� -onMounted(async () => {}); +onMounted(async () => { + handleQuery(); +}); // 鏌ヨ鎿嶄綔 const handleQuery = async (params: any = {}) => { state.tableLoading = true; state.tableParams = Object.assign(state.tableParams, params); - const result = await procurementComplaintApi - .page(Object.assign(state.tableQueryParams, state.tableParams)) - .then(res => res.data.result); + const result = await shouyeOrder(); + console.log(result); + + // .page(Object.assign(state.tableQueryParams, state.tableParams)) + // .then(res => res.data.result); state.tableParams.total = result?.total; state.tableData = result?.items ?? []; state.tableLoading = false; @@ -91,46 +96,6 @@ }) .catch(() => {}); }; - -// 瀵煎嚭鏁版嵁 -const exportProcurementComplaintCommand = async (command: string) => { - try { - state.exportLoading = true; - if (command === "select") { - const params = Object.assign( - {}, - state.tableQueryParams, - state.tableParams, - { selectKeyList: state.selectData.map(u => u.id) } - ); - await procurementComplaintApi - .exportData(params) - .then(res => downloadStreamFile(res)); - } else if (command === "current") { - const params = Object.assign( - {}, - state.tableQueryParams, - state.tableParams - ); - await procurementComplaintApi - .exportData(params) - .then(res => downloadStreamFile(res)); - } else if (command === "all") { - const params = Object.assign( - {}, - state.tableQueryParams, - state.tableParams, - { page: 1, pageSize: 99999999 } - ); - await procurementComplaintApi - .exportData(params) - .then(res => downloadStreamFile(res)); - } - } finally { - state.exportLoading = false; - } -}; - handleQuery(); </script> <template> @@ -304,7 +269,7 @@ <el-button v-reclick="1000" type="primary" - icon="ele-Search" + icon="Search" @click="handleQuery" > 鏌ヨ @@ -315,14 +280,14 @@ > 閲嶇疆 </el-button> - <el-button + <!-- <el-button v-if="!state.showAdvanceQueryUI" icon="ele-ZoomIn" style="margin-left: 5px" @click="() => (state.showAdvanceQueryUI = true)" > 楂樼骇鏌ヨ - </el-button> + </el-button> --> <el-button v-if="state.showAdvanceQueryUI" icon="ele-ZoomOut" @@ -334,7 +299,7 @@ <el-button type="danger" style="margin-left: 5px" - icon="ele-Delete" + icon="Delete" :disabled="state.selectData.length == 0" @click="batchDelProcurementComplaint" > @@ -396,7 +361,7 @@ sortable > <template #default="{ row }"> - <span>{{ dateFormatYMD(null, null, row.decisionDate) }}</span> + <span>{{ row.decisionDate }}</span> </template> </el-table-column> <el-table-column @@ -482,12 +447,7 @@ @size-change="(val: any) => handleQuery({ pageSize: val })" @current-change="(val: any) => handleQuery({ page: val })" /> - <ImportData - ref="importDataRef" - :import="procurementComplaintApi.importData" - :download="procurementComplaintApi.downloadTemplate" - @refresh="handleQuery" - /> + <printDialog ref="printDialogRef" :title="'鎵撳嵃鏀垮簻閲囪喘鎶曡瘔鏁版嵁澶勭悊'" -- Gitblit v1.9.1