| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button v-has="'standard:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="inspectionImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">点检标准导入</a-button> |
| | | <a-button v-has="'standard:pointInspection'" type="primary" icon="import">点检标准导入</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)"> |
| | | <a-button v-has="'standard:pointInspectionDownload'" type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)"> |
| | | 点检标准模板下载 |
| | | </a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="secondMaintenanceImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">二保标准导入</a-button> |
| | | <a-button v-has="'standard:secondMaintenance'" type="primary" icon="import">二保标准导入</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" |
| | | <a-button v-has="'standard:secondMaintenanceDownload'" type="primary" icon="download" |
| | | @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">二保标准模板下载 |
| | | </a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="thirdMaintenanceImportExcel" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">三保标准导入</a-button> |
| | | <a-button v-has="'standard:ThirdMaintenance'" type="primary" icon="import">三保标准导入</a-button> |
| | | </a-upload> |
| | | <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)"> |
| | | <a-button v-has="'standard:ThirdMaintenanceDownload'" type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)"> |
| | | 三保标准模板下载 |
| | | </a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | |
| | | <a style="margin-left: 24px" @click="onClearSelected">清空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a v-if="record.standardStatus === 'START'" @click.stop="handleUpgrade(record)">升版</a> |
| | | <a v-has="'standard:upgrade'" v-if="record.standardStatus === 'START'" @click.stop="handleUpgrade(record)">升版</a> |
| | | |
| | | <template v-if="record.standardStatus === 'WAIT_SUBMIT'"> |
| | | <a @click.stop="handleEdit(record)">编辑</a> |
| | | <a v-has="'standard:edit'" @click.stop="handleEdit(record)">编辑</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider v-has="'standard:edit'" type="vertical"/> |
| | | |
| | | <a-popconfirm title="确定发起流程吗?" @confirm="() => startProcess(record.id)"> |
| | | <a @click.stop="event=>event.stopPropagation()">发起流程</a> |
| | | <a v-has="'standard:saveFlow'" @click.stop="event=>event.stopPropagation()">发起流程</a> |
| | | </a-popconfirm> |
| | | |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider v-has="'standard:saveFlow'" type="vertical"/> |
| | | |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a @click.stop="event=>event.stopPropagation()">删除</a> |
| | | <a v-has="'standard:del'" @click.stop="event=>event.stopPropagation()">删除</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | |
| | | <template v-if="record.standardStatus != 'WAIT_SUBMIT'"> |
| | | <a-divider v-has="'standard:delete'" type="vertical" v-if="record.standardStatus=='START'"/> |
| | | |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a v-has="'standard:delete'" @click.stop="event=>event.stopPropagation()">删除</a> |
| | | </a-popconfirm> |
| | | </template> |
| | | </span> |
| | | </a-table> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab='保养标准明细项' key="1"> |
| | | <div class="table-operator" style="margin:-16px"> |
| | | <eam-maintenance-standard-detail-list ref="standardDetailRef" :standardId="standardId" |
| | | :pageSelectionRow="selectionRows[0]"/> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tabs defaultActiveKey="1" v-if="selectionRows.length===1"> |
| | | <template v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='POINT_INSPECTION'"> |
| | | <a-tab-pane tab="日点检" key="1"> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="DAY_INSPECTION"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="周点检" key="2" forceRender> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="WEEK_INSPECTION"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <template v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='SECOND_MAINTENANCE'"> |
| | | <a-tab-pane tab="操作工" key="1"> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="OPERATOR_MAINTENANCE"/> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="维修工" key="2" forceRender> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" |
| | | filterKey="REPAIRER_MAINTENANCE"/> |
| | | </a-tab-pane> |
| | | </template> |
| | | |
| | | <a-tab-pane tab="三保" key="1" v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='THIRD_MAINTENANCE'"> |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" |
| | | :pageSelectionRow="selectionRows[0]"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </div> |
| | | <!-- table区域-end --> |
| | |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | startProcess: '/eam/maintenanceStandard/saveEamMaintenanceStandardProcess', |
| | | exportXlsUrl: 'eam/maintenanceStandard/exportXls', |
| | | inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel', |
| | | weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel', |
| | | secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel', |
| | | thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel', |
| | | inspectionXlsDownloadUrl: '导入模板/点检标准导入模板_v1.0.xlsx', |
| | | weekMaintenanceXlsDownloadUrl: '导入模板/周保标准导入模板_v1.0.xlsx', |
| | | secondMaintenanceXlsDownloadUrl: '导入模板/二保标准导入模板_v1.0.xlsx', |
| | | thirdMaintenanceXlsDownloadUrl: '导入模板/三保标准导入模板_v1.0.xlsx' |
| | | inspectionImportExcel: '/eam/maintenanceStandard/importPointInspection', |
| | | secondMaintenanceImportExcel: '/eam/maintenanceStandard/importSecondMaintenanceStandard', |
| | | thirdMaintenanceImportExcel: '/eam/maintenanceStandard/importThirdMaintenanceStandard', |
| | | inspectionXlsDownloadUrl: '导入模板/设备点检标准导入模板.xlsx', |
| | | secondMaintenanceXlsDownloadUrl: '导入模板/生产设备二级保养规范.docx', |
| | | thirdMaintenanceXlsDownloadUrl: '导入模板/生产设备三级保养规范.docx' |
| | | }, |
| | | standardId: '-1' |
| | | } |
| | |
| | | computed: { |
| | | inspectionImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` |
| | | }, |
| | | weekMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}` |
| | | }, |
| | | secondMaintenanceImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}` |
| | |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | |
| | | batchDel() { |
| | | var ids = '' |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认删除', |
| | | content: '是否删除选中数据,只有待提交状态的数据才可删除成功?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | deleteAction(that.url.deleteBatch, { ids }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.standardId = '-1' |
| | | this.queryParam = {} |