From fdd75d75c3a3a582f120a0e1e873eacc61c732e8 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期五, 15 三月 2024 15:48:28 +0800
Subject: [PATCH] xg
---
src/views/mdc/base/MdcplancloseList.vue | 38 ++++++++++++++++++++++++++------------
1 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/src/views/mdc/base/MdcplancloseList.vue b/src/views/mdc/base/MdcplancloseList.vue
index ad95362..a90b63a 100644
--- a/src/views/mdc/base/MdcplancloseList.vue
+++ b/src/views/mdc/base/MdcplancloseList.vue
@@ -33,10 +33,11 @@
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
- <!--<a-button type="primary" icon="download" @click="handleExportXls('mdcPlanClose')">瀵煎嚭</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" icon="download" @click="importTemplate('璁″垝鍋滄満妯℃澘')">瀵煎叆妯℃澘</a-button>
+ <a-button type="primary" icon="download" @click="handleExportXls('璁″垝鍋滄満绠$悊')">瀵煎嚭</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>
<!-- 楂樼骇鏌ヨ鍖哄煙 -->
<!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
@@ -57,7 +58,7 @@
<a-table
ref="table"
size="middle"
- :scroll="{x:true}"
+ :scroll="{x:'max-content',y:465}"
bordered
rowKey="id"
:columns="columns"
@@ -125,29 +126,33 @@
{
title:'绫诲瀷',
align:"center",
- dataIndex: 'planCloseType'
+ dataIndex: 'planCloseType',
+ width:500
},
{
title:'鏃堕棿绫诲瀷',
align:"center",
- dataIndex: 'planCloseTimeType'
+ dataIndex: 'planCloseTimeType',
+ width:350
},
{
title:'鏃堕暱锛堝垎閽燂級',
align:"center",
- dataIndex: 'planCloseTimeLong'
+ dataIndex: 'planCloseTimeLong',
+ width:350
},
{
title:'澶囨敞',
align:"center",
- dataIndex: 'remark'
+ dataIndex: 'remark',
+ width:380
},
{
title: '鎿嶄綔',
dataIndex: 'action',
align:"center",
fixed:"right",
- width:147,
+ width:150,
scopedSlots: { customRender: 'action' }
}
],
@@ -155,8 +160,8 @@
list: "/mdc/mdcPlanClose/list",
delete: "/mdc/mdcPlanClose/delete",
deleteBatch: "/mdc/mdcPlanClose/deleteBatch",
- exportXlsUrl: "/plan/mdcplanclose/exportXls",
- importExcelUrl: "plan/mdcplanclose/importExcel",
+ exportXlsUrl: "/mdc/mdcPlanClose/exportXls",
+ importExcelUrl: "mdc/mdcPlanClose/importExcel",
},
dictOptions:{},
@@ -172,6 +177,15 @@
},
},
methods: {
+ importTemplate(fileName){
+ var a = document.createElement("a");
+ a.href = "/static/璁″垝鍋滄満绠$悊.xls";
+ a.download = "璁″垝鍋滄満绠$悊.xls";
+ a.style.display = "none";
+ document.body.appendChild(a);
+ a.click();
+ a.remove();
+ },
initDictConfig(){
},
getSuperFieldList(){
--
Gitblit v1.9.3