lyh
3 天以前 76e5433c49a1dc0ccd9f0b37a385f3297d568411
src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue
@@ -9,17 +9,21 @@
    </a-table>
    <DocumentModal ref="modalForm" @ok="modalFormOk"/>
    <NcDocumentAssignModal :size="size" ref="documentAssignModalRef"
                           :currentDocumentInfo="currentRightClickedDocumentInfo"/>
  </div>
</template>
<script>
  import { getAction } from '@/api/manage'
import { getAction, postAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import DocumentModal from '../../../../common/DocumentModal'
  import NcDocumentAssignModal from '@views/dnc/base/modules/ProductStructure/Document/NcDocumentAssignModal.vue'
  export default {
    name: 'OtherDocumentTableList',
    components: { DocumentModal },
    components: { NcDocumentAssignModal, DocumentModal },
    mixins: [JeecgListMixin],
    props: {
      currentTreeNodeInfo: {
@@ -54,7 +58,7 @@
          },
          { title: '设备编号', dataIndex: 'docCode', align: 'center' },
          {
            title: '出库状态',
            title: '生命周期',
            dataIndex: 'pullStatus_dictText',
            key: 'pullStatus',
            align: 'center',
@@ -72,8 +76,6 @@
              { text: '编制', value: 1 },
              { text: '校对', value: 2 },
              { text: '批准', value: 3 },
              { text: '试切', value: 4 },
              { text: '定型', value: 5 }
            ]
          },
          { title: '系统指定版本', dataIndex: 'publishVersion', align: 'center', width: 200 },
@@ -86,16 +88,18 @@
          }
        ],
        dataSource: [],
        currentRightClickedDocumentInfo: {},
        currentClickedDocumentInfo: {},
        url: {
          list: '/nc/doc/find/page'
          list: '/nc/doc/find/page',
          startDispatchFile:'/dncFlow/dispatchFile/startDispatchFile',
        }
      }
    },
    watch: {
      currentTreeNodeInfo: {
        handler(value) {
          this.currentClickedDocumentInfo = {}
          this.currentClickedDocumentInfo = this.currentRightClickedDocumentInfo = {}
        },
        immediate: true
      }
@@ -143,6 +147,7 @@
          on: {
            contextmenu: event => {
              event.preventDefault()
              this.currentRightClickedDocumentInfo = Object.assign({ param: 'OTHER' }, record)
              this.$emit('handleTableContextMenuOpen', { ...record, param: 'OTHER' })
            },
            click: () => {
@@ -181,6 +186,53 @@
        this.$refs.modalForm.title = modalTitle
      },
      handleDocumentAssign(record, modalTitle) {
        if (!this.$refs.documentAssignModalRef) return
        this.$refs.documentAssignModalRef.title = modalTitle
        this.$refs.documentAssignModalRef.visible = true
      },
      handleDocumentDispatch(record) {
        const that = this
        console.log("sssss",record)
        that.$confirm({
          title: '提示',
          content: `确认发起审签流程吗?`,
          okText: '确认',
          cancelText: '取消',
          onOk: () => {
            let dispatchFile = {
              'docId':record.docId,
              'attributionId':record.attributionId,
              'attributionType':record.attributionType,
              'fileId':record.publishFileId,
              'docClassCode':record.classificationId_dictText,
            }
            postAction(this.url.startDispatchFile,dispatchFile)
              .then(res => {
                if (res.success) {
                  this.$message.success('流程发起成功')
                } else {
                  that.$notification.error({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .catch(err => {
                that.$notification.error({
                  message: '消息',
                  description: err.message
                })
              })
              .finally(() => {
                that.$destroyAll()
              })
          },
          onCancel: () => {
            that.$destroyAll()
          }
        })
      },
      handleDelete() {
        // 此处函数为屏蔽mixins中的同名函数,通用函数写在父级中
      },