| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</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> |
| | | <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</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>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:'max-content'}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | | |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | |
| | | components: { |
| | | EamReportAccidentsRegisterModal |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | propsQueryParam: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '设备事故登记表管理页面', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | align: 'center', |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | return parseInt(index) + 1 |
| | | }, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '删除标记', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | title: '统一编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode', |
| | | fixed: 'left', |
| | | scopedSlots: { customRender: 'equipmentCode' } |
| | | }, |
| | | { |
| | | title: '报修ID', |
| | | align:"center", |
| | | dataIndex: 'reportId' |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设备ID', |
| | | align:"center", |
| | | dataIndex: 'equipmentId' |
| | | title: '设备型号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '是否有设备操作证;是 否', |
| | | title: '是否有设备操作证', |
| | | align:"center", |
| | | dataIndex: 'operationCertificate' |
| | | dataIndex: 'operationCertificate_dictText' |
| | | }, |
| | | { |
| | | title: '是否断电重启', |
| | | align:"center", |
| | | dataIndex: 'powerOffRestart' |
| | | dataIndex: 'powerOffRestart_dictText' |
| | | }, |
| | | { |
| | | title: '是否为批次首件', |
| | | align:"center", |
| | | dataIndex: 'batchFirstPiece' |
| | | dataIndex: 'batchFirstPiece_dictText' |
| | | }, |
| | | { |
| | | title: '变动因素;填写是或否', |
| | | title: '变动因素', |
| | | align:"center", |
| | | dataIndex: 'variableFactors' |
| | | dataIndex: 'variableFactors_dictText' |
| | | }, |
| | | { |
| | | title: '变动因素内容;刀具更换、工艺更改、加工程序更改、刀具补偿值更改、', |
| | | title: '变动因素内容', |
| | | align:"center", |
| | | dataIndex: 'variableFactorsValue' |
| | | dataIndex: 'variableFactorsValue_dictText' |
| | | }, |
| | | { |
| | | title: '执行程序', |
| | |
| | | align:"center", |
| | | dataIndex: 'technicalDirectorPartTime' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | selectRepairOrderData: {}, |
| | | url: { |
| | | list: "/eam/eamReportAccidentsRegister/list", |
| | | delete: "/eam/eamReportAccidentsRegister/delete", |
| | |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | created() { |
| | | if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) |
| | | else { |
| | | const operationColumn = { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 200, |
| | | fixed: 'right' |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | } |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |