| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" |
| | | <a-button v-has="'standardMain:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="importSafetyEquipmentCheck" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导入</a-button> |
| | | <a-button v-has="'standardMain:importSafety'" 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> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="importPrecisionCheck" |
| | | @change="handleImportExcel"> |
| | | <a-button v-has="'standardMain:importPrecision'" type="primary" icon="import">设备精度检查导入</a-button> |
| | | </a-upload> |
| | | <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" |
| | | :action="importOtherCheck" |
| | | @change="handleImportExcel"> |
| | | <a-button v-has="'standardMain:importOther'" type="primary" icon="import">其他检查导入</a-button> |
| | | </a-upload> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" |
| | | :pagination="ipagination" :loading="loading" @change="handleTableChange"> |
| | | :scroll="{x:'max-content'}" :pagination="ipagination" :loading="loading" @change="handleTableChange"> |
| | | |
| | | <!--是否有安全装置检查--> |
| | | <template slot="hasSafetyEquipmentCheck" slot-scope="text"> |
| | |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.standardStatus=='WAIT_SUBMIT'"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <a-divider type="vertical"/> |
| | | <a-popconfirm title="确定提交吗?" @confirm="handleSubmit(record)"> |
| | | <a @click.stop="event=>event.stopPropagation()">提交</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical"/> |
| | | </template> |
| | | <a @click="handleUpgrade(record)" v-if="record.standardStatus=='ENABLE'">升版</a> |
| | | </span> |
| | | |
| | | <template v-if="record.standardStatus=='ENABLE'"> |
| | | <a v-has="'standardMain:upgradeVersion'" @click="handleUpgrade(record)">升版</a> |
| | | <a-divider type="vertical"/> |
| | | </template> |
| | | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </span> |
| | | </a-table> |
| | | |
| | | <!-- table区域-end --> |
| | |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | | title: '规范状态', |
| | | align: 'center', |
| | | dataIndex: 'standardStatus_dictText', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '规范编码', |
| | | align: 'center', |
| | | dataIndex: 'standardCode' |
| | |
| | | dataIndex: 'standardName' |
| | | }, |
| | | { |
| | | title: '鉴定周期(年)', |
| | | title: '版本', |
| | | align: 'center', |
| | | dataIndex: 'evaluationPeriod', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '规范状态', |
| | | align: 'center', |
| | | dataIndex: 'standardStatus_dictText', |
| | | width: 150 |
| | | dataIndex: 'standardVersion', |
| | | width: 100 |
| | | }, |
| | | { |
| | | title: '是否有安全装置检查', |
| | | align: 'center', |
| | | dataIndex: 'hasSafetyEquipmentCheck', |
| | | scopedSlots: { customRender: 'hasSafetyEquipmentCheck' }, |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '是否有设备精度检查', |
| | | align: 'center', |
| | | dataIndex: 'hasPrecisionCheck', |
| | | scopedSlots: { customRender: 'hasPrecisionCheck' }, |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '是否有其他检查', |
| | | align: 'center', |
| | | dataIndex: 'hasOtherCheck', |
| | | scopedSlots: { customRender: 'hasOtherCheck' }, |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamTechnicalStatusEvaluationStandard/list', |
| | | submit: '/eam/eamTechnicalStatusEvaluationStandard/submit', |
| | | importExcelUrl: 'eam/eamTechnicalStatusEvaluationStandard/importExcel' |
| | | importSafetyEquipmentCheck: 'eam/eamTechnicalStatusEvaluationStandard/importSafetyEquipmentCheck', |
| | | importPrecisionCheck: 'eam/eamTechnicalStatusEvaluationStandard/importPrecisionCheck', |
| | | importOtherCheck: 'eam/eamTechnicalStatusEvaluationStandard/importOtherCheck' |
| | | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | importSafetyEquipmentCheck: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importSafetyEquipmentCheck}` |
| | | }, |
| | | importPrecisionCheck: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importPrecisionCheck}` |
| | | }, |
| | | importOtherCheck: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importOtherCheck}` |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | handleUpgrade(record) { |
| | | this.$refs.modalForm.edit(record, true) |
| | | this.$refs.modalForm.title = '升版' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | } |
| | | } |
| | | } |