From 77d0fbaf680094c8eedb6249902a18ef19a4ffda Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 23 一月 2026 09:45:47 +0800
Subject: [PATCH] 湟水峡 1.添加客户拜访记录页面 2.新建记录附件查看修改
---
src/views/equipmentManagement/inspectionManagement/index.vue | 66 ++++++++++++++++++++++-----------
1 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/src/views/equipmentManagement/inspectionManagement/index.vue b/src/views/equipmentManagement/inspectionManagement/index.vue
index 74886b2..c82921e 100644
--- a/src/views/equipmentManagement/inspectionManagement/index.vue
+++ b/src/views/equipmentManagement/inspectionManagement/index.vue
@@ -26,19 +26,28 @@
<el-space v-if="activeRadio !== 'task'">
<el-button type="primary" :icon="Plus" @click="handleAdd(undefined)">鏂板缓</el-button>
<el-button type="danger" :icon="Delete" @click="handleDelete">鍒犻櫎</el-button>
- <!-- <el-button type="info" plain :icon="Download">瀵煎嚭</el-button> -->
+ <el-button @click="handleOut">瀵煎嚭</el-button>
+ </el-space>
+ <el-space v-else>
+ <el-button @click="handleOut">瀵煎嚭</el-button>
</el-space>
</div>
<div>
- <div>
- <PIMTable :table-loading="tableLoading"
- :table-data="tableData"
- :column="tableColumns"
- @selection-change="handleSelectionChange"
- :is-selection="true"
- :border="true"
- :table-style="{ width: '100%', height: 'calc(100vh - 23em)' }"
- >
+ <PIMTable :table-loading="tableLoading"
+ :table-data="tableData"
+ :column="tableColumns"
+ @selection-change="handleSelectionChange"
+ @pagination="handlePagination"
+ :is-selection="true"
+ :border="true"
+ :page="{
+ current: pageNum,
+ size: pageSize,
+ total: total,
+ layout: 'total, sizes, prev, pager, next, jumper'
+ }"
+ :table-style="{ width: '100%', height: 'calc(100vh - 23em)' }"
+ >
<template #inspector="{ row }">
<div class="person-tags">
<!-- 璋冭瘯淇℃伅锛屼笂绾挎椂鍒犻櫎 -->
@@ -57,16 +66,7 @@
<span v-else class="no-data">--</span>
</div>
</template>
- </PIMTable>
- </div>
- <pagination
- v-if="total>0"
- :page="pageNum"
- :limit="pageSize"
- :total="total"
- @pagination="handlePagination"
- :layout="'total, prev, pager, next, jumper'"
- />
+ </PIMTable>
</div>
</el-card>
<form-dia ref="formDia" @closeDia="handleQuery"></form-dia>
@@ -77,9 +77,9 @@
<script setup>
import { Delete, Plus } from "@element-plus/icons-vue";
import { onMounted, ref, reactive, getCurrentInstance, nextTick } from "vue";
+import { ElMessageBox } from "element-plus";
// 缁勪欢寮曞叆
-import Pagination from "@/components/Pagination/index.vue";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
import FormDia from "@/views/equipmentManagement/inspectionManagement/components/formDia.vue";
import ViewFiles from "@/views/equipmentManagement/inspectionManagement/components/viewFiles.vue";
@@ -220,7 +220,7 @@
// 鍒嗛〉澶勭悊
const handlePagination = (val) => {
pageNum.value = val.page;
- pageSize.value = val.size;
+ pageSize.value = val.limit;
getList();
};
// 鑾峰彇鍒楄〃鏁版嵁
@@ -310,6 +310,28 @@
const handleSelectionChange = (selection) => {
selectedRows.value = selection;
};
+
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ // 鏍规嵁褰撳墠閫変腑鐨勬爣绛鹃〉璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
+ if (activeRadio.value === "taskManage") {
+ // 瀹氭椂浠诲姟绠$悊
+ proxy.download("/timingTask/export", {}, "瀹氭椂浠诲姟绠$悊.xlsx");
+ } else if (activeRadio.value === "task") {
+ // 瀹氭椂浠诲姟璁板綍
+ proxy.download("/inspectionTask/export", {}, "瀹氭椂浠诲姟璁板綍.xlsx");
+ }
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+};
</script>
<style scoped>
--
Gitblit v1.9.3