| | |
| | | <template> |
| | | <a-card |
| | | title="周期性保养标准" |
| | | title="二级保养标准" |
| | | :bordered='false' |
| | | > |
| | | <div class='table-page-search-wrapper'> |
| | |
| | | :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> |
| | |
| | | icon='plus' |
| | | v-has="'dailyMaintenanceStandard:add'" |
| | | >编制</a-button> |
| | | <a-upload |
| | | name="file" |
| | | :showUploadList="false" |
| | | :multiple="false" |
| | | :headers="tokenHeader" |
| | | :action="importExcelUrl" |
| | | @change="handleImportExcel" |
| | | > |
| | | <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 |
| | | type='primary' |
| | | @click='searchQuery' |
| | |
| | | icon='reload' |
| | | style='margin-left: 8px' |
| | | >重置</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> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | |
| | | <daily-maintenance-standard-detail :maintenanceStandardId='maintenanceStandardId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | <!-- <a-tab-pane |
| | | tab='计划用料' |
| | | key="2" |
| | | > |
| | |
| | | > |
| | | <maintenance-standard-work-instruction :maintenanceStandardId='maintenanceStandardId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tab-pane> --> |
| | | |
| | | </a-tabs> |
| | | </div> |
| | |
| | | |
| | | 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' |
| | |
| | | dataIndex: 'num', |
| | | }, |
| | | { |
| | | title: '标准类型', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceTypeName', |
| | | }, |
| | | { |
| | | title: '签审状态', |
| | | align: 'center', |
| | | dataIndex: 'approvalStatusName', |
| | |
| | | align: 'center', |
| | | dataIndex: 'useDepartName', |
| | | }, |
| | | { |
| | | title: '派工方式', |
| | | align: 'center', |
| | | dataIndex: 'assignModeName', |
| | | }, |
| | | |
| | | { |
| | | title: '责任班组', |
| | | align: 'center', |
| | |
| | | // dataIndex: 'specificEquipment', |
| | | // }, |
| | | { |
| | | title: '审核结果', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceStandardUda1', |
| | | }, |
| | | { |
| | | title: '审核意见', |
| | | align: 'center', |
| | | dataIndex: 'auditFeedback', |
| | | }, |
| | | { |
| | | title: '审批结果', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceStandardUda2', |
| | | }, |
| | | { |
| | | title: '审批意见', |
| | |
| | | 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 + '条' |
| | | }, |
| | |
| | | total: 0 |
| | | }, |
| | | maintenanceStandardId: '-1', |
| | | queryParam: { type: 'daily' } |
| | | queryParam: { type: 'daily', maintenanceType: '2' } |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | watch: { |
| | | selectionRows() { |
| | |
| | | |
| | | 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) //释放掉blob对象 |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |