From 2d3928fd56cf81e6cb122531dc91c83501fabbe4 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期二, 14 十一月 2023 13:50:25 +0800 Subject: [PATCH] 设备点检标准导入功能 --- src/views/eam/DailyInspectionStandardList.vue | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue index 15245f8..b0f4b28 100644 --- a/src/views/eam/DailyInspectionStandardList.vue +++ b/src/views/eam/DailyInspectionStandardList.vue @@ -1,6 +1,6 @@ <template> <a-card - title="鏃ュ父鐐规" + title="鑷富缁存姢鐐规鏍囧噯" :bordered='false' > <div class='table-page-search-wrapper'> @@ -68,6 +68,9 @@ icon='plus' v-has="'dailyInspectionStandard:add'" >鏂板</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">瀵煎叆</a-button> + </a-upload> <a-button type="primary" @click="searchQuery" @@ -99,7 +102,7 @@ size='middle' bordered rowKey='id' - :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" + :scroll="{ x: 'calc(1600px + 50%)', y: 900 }" :columns='columns' :dataSource='dataSource' :pagination='ipagination' @@ -216,23 +219,14 @@ return parseInt(index) + 1 } }, - { - title: '鐗堟湰', - align: 'center', - dataIndex: 'version', - }, - { - title: '鐗堟湰鐘舵��', - align: 'center', - dataIndex: 'versionStatusName', - }, + { title: '鏍囧噯缂栫爜', align: 'center', dataIndex: 'num', }, { - title: '瀵硅薄閮ㄩ棬', + title: '浣跨敤閮ㄩ棬', align: 'center', dataIndex: 'useDepartName', }, @@ -260,6 +254,26 @@ title: '娲惧伐鏂瑰紡', align: 'center', dataIndex: 'assignModeName', + }, + // { + // title: '鐢熸晥鏃堕棿', + // align: 'center', + // dataIndex: 'takeEffectTime', + // }, + // { + // title: '澶辨晥鏃堕棿', + // align: 'center', + // dataIndex: 'loseEfficacyTime', + // }, + { + title: '鐗堟湰', + align: 'center', + dataIndex: 'version', + }, + { + title: '鐗堟湰鐘舵��', + align: 'center', + dataIndex: 'versionStatusName', }, { title: '鍒涘缓浜�', @@ -295,6 +309,7 @@ delete: '/eam/inspectionStandard/delete', deleteBatch: '/eam/inspectionStandard/deleteBatch', versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect", + importExcelUrl: "/eam/inspectionStandard/importExcel", }, version: '1.0', dictOptions: {}, @@ -313,6 +328,11 @@ inspectionStandardId: '-1' } }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, methods: { clickThenSelect(record) { return { -- Gitblit v1.9.3