From 791db9676de3fac540b3a508d222a77a83f11d29 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期六, 27 一月 2024 14:00:12 +0800 Subject: [PATCH] 设备管理添加导出按钮 --- src/views/mdc/base/EquipmentList.vue | 67 ++++++++++++++++++--------------- 1 files changed, 36 insertions(+), 31 deletions(-) diff --git a/src/views/mdc/base/EquipmentList.vue b/src/views/mdc/base/EquipmentList.vue index 55ce880..279cd11 100644 --- a/src/views/mdc/base/EquipmentList.vue +++ b/src/views/mdc/base/EquipmentList.vue @@ -38,6 +38,7 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" style="border-top: 5px"> <a-button @click="handleAdd" type="primary" icon="plus" >娣诲姞璁惧</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('璁惧淇℃伅')">瀵煎嚭</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay" @click="handleMenuClick"> <a-menu-item key="1"> @@ -64,6 +65,7 @@ bordered size="middle" rowKey="id" + :scroll="{x:'max-content',y:465}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" @@ -180,25 +182,25 @@ title: '璁惧缂栧彿', align: "center", dataIndex: 'equipmentId', - width: 120, + width: 200, // sorter: true }, { title: '璁惧鍚嶇О', align: "center", - width: 150, + width: 200, dataIndex: 'equipmentName', }, { title: '杞﹂棿', align: "center", - width: 180, + width: 200, dataIndex: 'productionName' }, { title: '璁惧绫诲瀷', align: "center", - width: 120, + width: 200, dataIndex: 'equipmentType', // scopedSlots: {customRender: "avatarslot"} }, @@ -206,33 +208,33 @@ { title: '椹卞姩绫诲瀷', align: "center", - width: 80, + width: 200, dataIndex: 'driveType', // sorter: true }, { title: '鏈哄簥IP', align: "center", - width: 100, + width: 200, dataIndex: 'equipmentIp' }, { title: '璁惧鍔熺巼', align: "center", - width: 100, + width: 200, dataIndex: 'devicePower' }, { title: '閮ㄩ棬', align: "center", - width: 180, + width: 200, dataIndex: 'orgCodeTxt' }, { title: '绯荤粺鐗堟湰', align: "center", - width: 80, + width: 200, dataIndex: 'systemVersion' }, { @@ -240,7 +242,8 @@ dataIndex: 'action', scopedSlots: {customRender: 'action'}, align: "center", - width: 120 + width: 150, + fixed:'right' } ], @@ -254,7 +257,7 @@ list: "/mdc/mdcEquipment/list", delete: "/mdc/mdcEquipment/delete", deleteBatch: "/mdc/mdcEquipment/deleteBatch", - // exportXlsUrl: "/sys/user/exportXls", + exportXlsUrl: "/mdc/mdcEquipment/exportXls", // importExcelUrl: "sys/user/importExcel", }, isDepartType:'' @@ -290,25 +293,25 @@ title: '璁惧缂栧彿', align: "center", dataIndex: 'equipmentId', - width: 120, + width: 200, // sorter: true }, { title: '璁惧鍚嶇О', align: "center", - width: 150, + width: 200, dataIndex: 'equipmentName', }, { title: '杞﹂棿', align: "center", - width: 180, + width: 200, dataIndex: 'productionName' }, { title: '璁惧绫诲瀷', align: "center", - width: 120, + width: 200, dataIndex: 'equipmentType', // scopedSlots: {customRender: "avatarslot"} }, @@ -316,33 +319,33 @@ { title: '椹卞姩绫诲瀷', align: "center", - width: 80, + width: 200, dataIndex: 'driveType', // sorter: true }, { title: '鏈哄簥IP', align: "center", - width: 100, + width: 200, dataIndex: 'equipmentIp' }, { title: '璁惧鍔熺巼', align: "center", - width: 100, + width: 200, dataIndex: 'devicePower' }, // { // title: '閮ㄩ棬', // align: "center", - // width: 180, + // width: 200, // dataIndex: 'orgCodeTxt' // }, { title: '绯荤粺鐗堟湰', align: "center", - width: 80, + width: 200, dataIndex: 'systemVersion' }, { @@ -350,7 +353,8 @@ dataIndex: 'action', scopedSlots: {customRender: 'action'}, align: "center", - width: 120 + width: 150, + fixed:'right' } ] @@ -370,25 +374,25 @@ title: '璁惧缂栧彿', align: "center", dataIndex: 'equipmentId', - width: 120, + width: 200, // sorter: true }, { title: '璁惧鍚嶇О', align: "center", - width: 150, + width: 200, dataIndex: 'equipmentName', }, { title: '杞﹂棿', align: "center", - width: 180, + width: 200, dataIndex: 'productionName' }, { title: '璁惧绫诲瀷', align: "center", - width: 120, + width: 200, dataIndex: 'equipmentType', // scopedSlots: {customRender: "avatarslot"} }, @@ -396,33 +400,33 @@ { title: '椹卞姩绫诲瀷', align: "center", - width: 80, + width: 200, dataIndex: 'driveType', // sorter: true }, { title: '鏈哄簥IP', align: "center", - width: 100, + width: 200, dataIndex: 'equipmentIp' }, { title: '璁惧鍔熺巼', align: "center", - width: 100, + width: 200, dataIndex: 'devicePower' }, { title: '閮ㄩ棬', align: "center", - width: 180, + width: 200, dataIndex: 'orgCodeTxt' }, { title: '绯荤粺鐗堟湰', align: "center", - width: 80, + width: 200, dataIndex: 'systemVersion' }, { @@ -430,7 +434,8 @@ dataIndex: 'action', scopedSlots: {customRender: 'action'}, align: "center", - width: 120 + width: 150, + fixed:'right' } ] -- Gitblit v1.9.3