| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class='table-operator'> |
| | | <a-button @click='handleAdd' type='primary' icon='plus'>新增</a-button> |
| | | <!-- <a-button @click='handleChangeCertificate' type='primary' icon='plus'>变更操作证</a-button>--> |
| | | <!-- <a-button @click='handleAdd' type='primary' icon='plus'>新增</a-button>--> |
| | | <a-button @click='handleChangeCertificate' 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'> |
| | |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange ,type:'radio'}" |
| | | :customRow='clickThenSelect' |
| | | @change='handleTableChange'> |
| | | |
| | | |
| | | |
| | | <template slot='htmlSlot' slot-scope='text'> |
| | | <div v-html='text'></div> |
| | |
| | | |
| | | <span slot='action' slot-scope='text, record'> |
| | | <!-- <a @click='handleEdit(record)'>编辑</a>--> |
| | | <!-- <a-divider type='vertical' />--> |
| | | <a @click='handleDetail(record)'>详情</a> |
| | | <!-- <a-divider type='vertical' />--> |
| | | <!-- <a @click='handleDetail(record)'>详情</a>--> |
| | | <!-- <a-divider type="vertical" />--> |
| | | <!-- <a-dropdown>--> |
| | | <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>--> |
| | |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="操作证管理明细" key="1" > |
| | | <OperationCertificateDetailList :mainId="operationCertificateDetailMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <operation-certificate-modal ref='modalForm' @ok='modalFormOk' /> |
| | | </a-card> |
| | | </template> |
| | |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import OperationCertificateModal from './modules/operationCertificate/OperationCertificateModal' |
| | | import OperationCertificateDetailList from './modules/operationCertificate/OperationCertificateDetailList' |
| | | import { filterMultiDictText } from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | import { getAction } from '@/api/manage' |
| | | export default { |
| | | name: 'OperationCertificateList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | OperationCertificateModal |
| | | OperationCertificateModal, |
| | | OperationCertificateDetailList |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | align: 'center', |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align: 'center', |
| | | // fixed: 'right', |
| | | // width: 147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: '/eam/operationCertificate/list', |
| | |
| | | |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | | superFieldList: [], |
| | | /* 分页参数 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedMainId:'', |
| | | |
| | | operationCertificateDetailMainId: '', |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | methods: { |
| | | initDictConfig() { |
| | | }, |
| | | |
| | | // handleChangeCertificate: function (record) { |
| | | // this.$refs.modalForm.edit(record) |
| | | // this.$refs.modalForm.title = '变更操作证' |
| | | // this.$refs.modalForm.disableSubmit = false |
| | | // // this.$refs.modalForm.isRevise = false; |
| | | // }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | handleChangeCertificate: function() { |
| | | if (this.selectionRows.length <= 0) { |
| | | this.$message.warning('请选择一条记录') |
| | | return |
| | | } |
| | | const record = this.selectionRows[0] |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = '变更操作证' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.loadSubTableDataFlag = false |
| | | // this.$refs.modalForm.isRevise = false; |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.selectedMainId='' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedMainId=selectedRowKeys[0] |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.operationCertificateDetailMainId = selectionRows[0]['id'] |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list属性!") |
| | | return |
| | | } |
| | | //加载数据 若传入参数1则加载第一页的内容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | this.onClearSelected() |
| | | var params = this.getQueryParams();//查询条件 |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if(res.code===510){ |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | getSuperFieldList() { |
| | | let fieldList = [] |
| | | fieldList.push({ type: 'string', value: 'num', text: '操作证编号', dictCode: '' }) |