From 1eaa58d2a9f7c0192a8d3238fe92def1035a8f7b Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期二, 04 三月 2025 13:13:24 +0800
Subject: [PATCH] art: 所有设备 台账 没有勾选 精度参数,工艺参数的设备不展示 精度参数tab ,工艺参数tab
---
src/views/eam/DailyInspectionStandardList.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 53 insertions(+), 1 deletions(-)
diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue
index 70a8850..7eb48de 100644
--- a/src/views/eam/DailyInspectionStandardList.vue
+++ b/src/views/eam/DailyInspectionStandardList.vue
@@ -83,6 +83,17 @@
</a-upload>
<a-button
type="primary"
+ @click="handleDownload"
+ icon="download"
+ >妯$増涓嬭浇</a-button>
+ <a-button
+ v-show="selectedRowKeys.length == 1 "
+ type="primary"
+ @click="handlePrint(selectionRows[0])"
+ icon="highlight"
+ >妯$増鎵撳嵃</a-button>
+ <a-button
+ type="primary"
@click="searchQuery"
icon="search"
>鏌ヨ</a-button>
@@ -262,7 +273,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import { getAction, requestPut } from '@/api/manage'
+import { getAction, requestPut, downFile } from '@/api/manage'
import DailyInspectionStandardDetail from './modules/dailyInspectionStandard/DailyInspectionStandardDetail'
import DailylnspectionStandardModal from './modules/dailyInspectionStandard/DailylnspectionStandardModal'
import AuditApprovalModal from './modules/dailyInspectionStandard/AuditApprovalModal'
@@ -440,6 +451,8 @@
versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect",
importExcelUrl: "/eam/inspectionStandard/importExcel",
passBatch: '/eam/inspectionStandard/auditApprovalBatch',
+ download: '/sys/upload/downloadFile',
+ uploadList: '/sys/upload/list',
},
version: '1.0',
dictOptions: {},
@@ -671,6 +684,45 @@
}
},
+ handleDownload() {
+ var params = {}//鏌ヨ鏉′欢
+ params.type = "inspection"
+ params.pageNo = 1
+ params.pageSize = 10
+ getAction(this.url.uploadList, params).then((res2) => {
+ if (res2.success) {
+ if (res2.result.records.length > 0) {
+ downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
+ if (!res) {
+ this.$message.warning('鏂囦欢涓嬭浇澶辫触')
+ return
+ } else {
+ let fileName = res2.result.records[0].name
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
+ window.navigator.msSaveBlob(new Blob([res]), fileName)
+ } else {
+ let url = window.URL.createObjectURL(new Blob([res]))
+ let link = document.createElement('a')
+ link.style.display = 'none'
+ link.href = url
+ link.setAttribute('download', fileName)
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌
+ window.URL.revokeObjectURL(url) //閲婃斁鎺塨lob瀵硅薄
+ }
+ }
+ })
+ }
+ }
+ })
+ },
+
+ handlePrint(record) {
+ let href = `${window._CONFIG['domianURL']}/jmreport/view/934677113625829376?id=` + record.id; //缃戠珯閾炬帴
+ window.open(href, "_blank");
+ },
+
}
}
</script>
--
Gitblit v1.9.3