| | |
| | | @click="handleTemplateXlsDownload" |
| | | >导å
¥æ¨¡æ¿ä¸è½½ |
| | | </a-button> |
| | | <a-button |
| | | @click="EquipmentCategoryStatistics" |
| | | type="primary" |
| | | icon="area-chart" |
| | | >å°è´¦ç»è®¡</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <!-- <a-menu-item key="1" @click="handleOpenNameplateModal(selectionRows)">--> |
| | |
| | | <nameplate-modal ref="nameplateModalRef" :printedRows="printedRows"/> |
| | | <!--å±¥åå¼¹çª--> |
| | | <resume-drawer ref="resumeDrawerRef" :currentTableRowRecord="currentTableRowRecord"/> |
| | | <!--å°è´¦ç»è®¡--> |
| | | <equipment-category-statistics-list ref="EquipmentCategoryStatistics"/> |
| | | |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import EamSecondMaintenanceOrderList from '@views/eam/maintenance/EamSecondMaintenanceOrderList.vue' |
| | | import EamThirdMaintenanceOrderList from '@views/eam/maintenance/EamThirdMaintenanceOrderList.vue' |
| | | import EamEquipmentFluidList from '@views/eam/equipment/modules/EamEquipmentFluidList.vue' |
| | | import EquipmentCategoryStatisticsList from '@views/eam/equipment/modules/EquipmentCategoryStatisticsList.vue' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EquipmentCategoryStatisticsList, |
| | | EamInspectionOrderList, |
| | | EamRepairOrderList, |
| | | EamMaintenanceStandardList, |
| | |
| | | templateXlsDownload(this.url.templateXlsDownloadUrl) |
| | | }, |
| | | |
| | | EquipmentCategoryStatistics() { |
| | | this.$refs.EquipmentCategoryStatistics.visible = true; // æ¾ç¤ºå¼¹çª |
| | | this.$refs.EquipmentCategoryStatistics.loadData() |
| | | }, |
| | | |
| | | loadAppHomeUrlConfigValue() { |
| | | let params = { settingKey: 'app_home_url' } |
| | | getSystemConfigValue(params).then(res => { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | cancelText="å
³é" |
| | | @cancel="handleCancel" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | <div class="table-operator"> |
| | | <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('å°è´¦ç»è®¡')" |
| | | >导åº</a-button> |
| | | </div> |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | @change="handleTableChange" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :loading="loading"> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <div slot="footer"> |
| | | <a-button @click="handleCancel">å
³é</a-button> |
| | | </div> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { downFile, getAction } from '@/api/manage' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | export default { |
| | | name: "EquipmentCategoryStatisticsList", |
| | | mixins:[JeecgListMixin], |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | title: 'å°è´¦ç»è®¡', |
| | | width: 1200, |
| | | visible: false, |
| | | confirmLoading: false, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '设å¤ç§ç±»', |
| | | align: "center", |
| | | dataIndex: 'equipmentType', |
| | | }, |
| | | { |
| | | title: 'è®¾å¤æ»æ°', |
| | | align: "left", |
| | | dataIndex: 'equipmentCount' |
| | | }, |
| | | { |
| | | title: 'æ»åå¼', |
| | | align: "center", |
| | | dataIndex: 'originalValue', |
| | | // æ ¼å¼åæ°å¼æ¾ç¤º |
| | | render: (text) => { |
| | | return text.toFixed(2) |
| | | } |
| | | }, |
| | | { |
| | | title: 'é«ç²¾åº¦æ»æ°', |
| | | align: "center", |
| | | dataIndex: 'highPrecisionCount' |
| | | }, |
| | | { |
| | | title: 'é«ç²¾åº¦åå¼', |
| | | align: "center", |
| | | dataIndex: 'highPrecisionOriginalValue', |
| | | render: (text) => { |
| | | return text.toFixed(2) |
| | | } |
| | | }, |
| | | { |
| | | title: 'å½äº§æ»æ°', |
| | | align: "left", |
| | | dataIndex: 'domesticCount' |
| | | }, |
| | | { |
| | | title: 'å½äº§åå¼', |
| | | align: "left", |
| | | dataIndex: 'domesticOriginalValue', |
| | | render: (text) => { |
| | | return text.toFixed(2) |
| | | } |
| | | }, |
| | | { |
| | | title: 'è¿å£æ»æ°', |
| | | align: "left", |
| | | dataIndex: 'importCount' |
| | | }, |
| | | { |
| | | title: 'è¿å£åå¼', |
| | | align: "left", |
| | | dataIndex: 'importOriginalValue', |
| | | render: (text) => { |
| | | return text.toFixed(2) |
| | | } |
| | | }, |
| | | { |
| | | title: 'å®å¥½æ»æ°', |
| | | align: "left", |
| | | dataIndex: 'intactCount' |
| | | }, |
| | | { |
| | | title: 'å®å¥½åå¼', |
| | | align: "left", |
| | | dataIndex: 'intactOriginalValue', |
| | | render: (text) => { |
| | | return text.toFixed(2) |
| | | } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipment/queryLedgerStatistics", |
| | | exportXlsUrl: "/eam/equipment/exportLedgerStatisticsXls" |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | handleExportXls(fileName) { |
| | | if (!fileName || typeof fileName != "string") { |
| | | fileName = "å¯¼åºæä»¶" |
| | | } |
| | | downFile(this.url.exportXlsUrl).then((data) => { |
| | | if (!data) { |
| | | this.$message.warning("æä»¶ä¸è½½å¤±è´¥") |
| | | return |
| | | } |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls') |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' })) |
| | | let link = document.createElement('a') |
| | | link.style.display = 'none' |
| | | link.href = url |
| | | link.setAttribute('download', fileName + '.xls') |
| | | document.body.appendChild(link) |
| | | link.click() |
| | | document.body.removeChild(link); //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url); //éæ¾æblob对象 |
| | | } |
| | | }) |
| | | }, |
| | | loadData() { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | this.onClearSelected() |
| | | this.loading = true; |
| | | getAction(this.url.list).then((res) => { |
| | | if (res.success) { |
| | | // ä¿®å¤æ°æ®è®¿é®è·¯å¾ï¼ç´æ¥ä½¿ç¨res.resultèéres.result.records |
| | | this.dataSource = res.result; |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |