From 6670fda2939518181d60c6254f2bcb37917f0e2f Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期二, 10 六月 2025 14:42:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/eam/DailyMaintenanceStandardList.vue | 107 ++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 85 insertions(+), 22 deletions(-)
diff --git a/src/views/eam/DailyMaintenanceStandardList.vue b/src/views/eam/DailyMaintenanceStandardList.vue
index 98ea2ac..4edd32c 100644
--- a/src/views/eam/DailyMaintenanceStandardList.vue
+++ b/src/views/eam/DailyMaintenanceStandardList.vue
@@ -1,6 +1,6 @@
<template>
<a-card
- title="鍛ㄦ湡鎬т繚鍏绘爣鍑�"
+ title=""
:bordered='false'
>
<div class='table-page-search-wrapper'>
@@ -28,10 +28,10 @@
:md='8'
:sm='24'
>
- <a-form-item label='璁惧鍚嶇О'>
+ <a-form-item label='缁熶竴缂栧彿'>
<a-input
- placeholder='璇疯緭鍏ヨ澶囧悕绉�'
- v-model='queryParam.name'
+ placeholder='璇疯緭鍏ョ粺涓�缂栧彿'
+ v-model='queryParam.equipmentNum'
></a-input>
</a-form-item>
</a-col>
@@ -91,17 +91,6 @@
icon='plus'
v-has="'dailyMaintenanceStandard:add'"
>缂栧埗</a-button>
- <a-button
- type='primary'
- @click='searchQuery'
- icon='search'
- >鏌ヨ</a-button>
- <a-button
- type='primary'
- @click='searchReset'
- icon='reload'
- style='margin-left: 8px'
- >閲嶇疆</a-button>
<a-upload
name="file"
:showUploadList="false"
@@ -113,8 +102,31 @@
<a-button
type="primary"
icon="import"
+ v-has="'dailyMaintenanceStandard:import'"
>瀵煎叆</a-button>
</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>
+ <a-button
+ type='primary'
+ @click='searchReset'
+ icon='reload'
+ style='margin-left: 8px'
+ >閲嶇疆</a-button>
</div>
<!-- table鍖哄煙-begin -->
@@ -233,7 +245,7 @@
<daily-maintenance-standard-detail :maintenanceStandardId='maintenanceStandardId' />
</div>
</a-tab-pane>
- <a-tab-pane
+ <!-- <a-tab-pane
tab='璁″垝鐢ㄦ枡'
key="2"
>
@@ -265,7 +277,7 @@
>
<maintenance-standard-work-instruction :maintenanceStandardId='maintenanceStandardId' />
</div>
- </a-tab-pane>
+ </a-tab-pane> -->
</a-tabs>
</div>
@@ -286,7 +298,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import { getAction, postAction, requestPut } from '@/api/manage'
+import { getAction, postAction, requestPut, downFile } from '@/api/manage'
import DailyMaintenanceStandardDetail from './modules/dailyMaintenanceStandard/DailyMaintenanceStandardDetail'
import MaintenanceStandardPlanningMaterial from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardPlanningMaterial'
import MaintenanceStandardSafetyRequirement from '@/views/eam/modules/dailyMaintenanceStandard/MaintenanceStandardSafetyRequirement'
@@ -366,9 +378,19 @@
// dataIndex: 'specificEquipment',
// },
{
+ title: '瀹℃牳缁撴灉',
+ align: 'center',
+ dataIndex: 'maintenanceStandardUda1',
+ },
+ {
title: '瀹℃牳鎰忚',
align: 'center',
dataIndex: 'auditFeedback',
+ },
+ {
+ title: '瀹℃壒缁撴灉',
+ align: 'center',
+ dataIndex: 'maintenanceStandardUda2',
},
{
title: '瀹℃壒鎰忚',
@@ -454,12 +476,14 @@
deleteBatch: '/eam/maintenanceStandard/deleteBatch',
versionTakeEffect: "/eam/maintenanceStandard/versionTakeEffect",
importExcelUrl: "/eam/maintenanceStandard/importExcelOfTwoMaintenance",
+ download: '/sys/upload/downloadFile',
+ uploadList: '/sys/upload/list',
},
/* 鍒嗛〉鍙傛暟 */
ipagination: {
current: 1,
- pageSize: 5,
- pageSizeOptions: ['5', '10', '50'],
+ pageSize: 20,
+ pageSizeOptions: ['5', '10', '20', '50'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
},
@@ -468,7 +492,7 @@
total: 0
},
maintenanceStandardId: '-1',
- queryParam: { type: 'daily' }
+ queryParam: { type: 'daily', maintenanceType: '2' }
}
},
computed: {
@@ -588,9 +612,48 @@
searchReset() {
this.maintenanceStandardId = '-1'
- this.queryParam = { type: 'daily' }
+ this.queryParam = { type: 'daily', maintenanceType: '2' }
this.loadData(1);
},
+
+ handleDownload() {
+ var params = {}//鏌ヨ鏉′欢
+ params.type = "twoMaintenance"
+ 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/934696640354902016?id=` + record.id; //缃戠珯閾炬帴
+ window.open(href, "_blank");
+ },
}
}
</script>
--
Gitblit v1.9.3