| | |
| | | <template> |
| | | <div> |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId"> |
| | | :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange"> |
| | | |
| | | </a-table> |
| | | |
| | | <DocumentModal ref="modalForm" @ok="modalFormOk"/> |
| | | |
| | | <NcDocumentAssignModal :size="size" ref="documentAssignModalRef"/> |
| | | <NcDocumentAssignModal :size="size" ref="documentAssignModalRef" |
| | | :currentDocumentInfo="currentRightClickedDocumentInfo"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DocumentModal from './DocumentModal' |
| | | import DocumentModal from '../../../../common/DocumentModal' |
| | | import NcDocumentAssignModal from './NcDocumentAssignModal' |
| | | |
| | | export default { |
| | |
| | | { title: '上传时间', dataIndex: 'createTime', align: 'center' } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | | currentClickedDocumentInfo: {}, |
| | | url: { |
| | | list: '/nc/doc/find/page' |
| | | } |
| | |
| | | on: { |
| | | contextmenu: event => { |
| | | event.preventDefault() |
| | | this.$emit('handleTableContextMenuOpen', { ...record, param: 'NC' }) |
| | | this.currentRightClickedDocumentInfo = Object.assign({ param: 'NC' }, record) |
| | | this.$emit('handleTableContextMenuOpen', this.currentRightClickedDocumentInfo) |
| | | }, |
| | | click: () => { |
| | | this.$bus.$emit('sendCurrentLevelInfo', record) |
| | | if (this.currentClickedDocumentInfo.docId === record.docId) return |
| | | this.currentClickedDocumentInfo = Object.assign({}, record) |
| | | this.$bus.$emit('sendCurrentClickedDocumentInfo', record) |
| | | } |
| | | } |
| | | } |
| | |
| | | this.$refs.documentAssignModalRef.visible = true |
| | | }, |
| | | |
| | | handleDelete() { |
| | | // 此处函数为屏蔽mixins中的同名函数,通用函数写在父级中 |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, level, modalTitle, tableRowInfo }) { |
| | | if (this[methodName] && tableRowInfo.attributionType === 5) this[methodName](tableRowInfo, modalTitle) |
| | | if (this[methodName] && tableRowInfo.param === 'NC') this[methodName](tableRowInfo, modalTitle) |
| | | } |
| | | } |
| | | } |