1、产品结构树以及设备结构树中的列表增加行选中样式
2、产品结构树实现点击设备类出现设备类下挂载的NC程序列表
3、产品结构树实现在设备类中导入NC程序功能
已修改15个文件
已删除1个文件
176 ■■■■ 文件已修改
src/views/dnc/base/modules/DeviceStructure/DeviceStructureMain.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/DeviceStructure/Workshop/WorkshopInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/DeviceCustomTypeModal.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/DeviceCustomTypeModalForm.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/DeviceCustomTypeTableList.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Document/DocumentInfo.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/common/DocumentBatchDeleteModal.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/common/ImportFileModal.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/common/TableContextMenu.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/DeviceStructure/DeviceStructureMain.vue
@@ -16,7 +16,7 @@
    <template v-else>
      <a-tabs>
        <a-tab-pane :key="1" tab="车间属性">
        <a-tab-pane :key="1" tab="属性">
          <WorkshopInfo :currentLevelDetails="currentTreeNodeInfo" :size="containerSize"/>
        </a-tab-pane>
      </a-tabs>
src/views/dnc/base/modules/DeviceStructure/Document/HasReceivedDocumentTableList.vue
@@ -132,6 +132,9 @@
      customRow(record) {
        return {
          style: {
            backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent'
          },
          on: {
            contextmenu: event => {
              event.preventDefault()
src/views/dnc/base/modules/DeviceStructure/Document/HasSentDocumentTableList.vue
@@ -142,6 +142,9 @@
      customRow(record) {
        return {
          style: {
            backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent'
          },
          on: {
            contextmenu: event => {
              event.preventDefault()
src/views/dnc/base/modules/DeviceStructure/Workshop/WorkshopInfo.vue
@@ -1,6 +1,6 @@
<template>
  <a-descriptions bordered :size="size">
    <a-descriptions-item label="车间名称">{{currentLevelDetails.title}}</a-descriptions-item>
    <a-descriptions-item label="名称">{{currentLevelDetails.title}}</a-descriptions-item>
    <a-descriptions-item label="备注">{{currentLevelDetails.memo}}</a-descriptions-item>
  </a-descriptions>
</template>
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/DeviceCustomTypeModal.vue
@@ -54,7 +54,7 @@
      this.$nextTick(() => {
        if (this.$refs.realForm) {
          this.$refs.realForm.getWorkshopListByApi()
          this.$refs.realForm.handleProductionChange()
          this.$refs.realForm.handleProductionChange(tableRowInfo.productionId)
          this.$refs.realForm.edit({ ...tableRowInfo })
        }
      })
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/DeviceCustomTypeModalForm.vue
@@ -84,10 +84,10 @@
    },
    // è½¦é—´é€‰æ‹©æ”¹å˜åŽæ¸…空设备类选择并重新获取设备类列表
    handleProductionChange() {
    handleProductionChange(value) {
      if (this.model.deviceManagementId) delete this.model.deviceManagementId
      if (this.model.deviceManagementId_dictText) delete this.model.deviceManagementId_dictText
      dncApi.getDeviceCustomTypeListByProductionIdApi(this.model.productionId)
      dncApi.getDeviceCustomTypeListByProductionIdApi(value)
        .then(res => {
          if (res.success) this.deviceCustomTypeList = res.result
        })
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/DeviceCustomTypeTableList.vue
@@ -1,7 +1,7 @@
<template>
  <div style="flex: 0.25;margin-right: 10px">
    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false"
             :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="id" @change="handleTableChange">
             :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="id" @change="handleTableChange">
    </a-table>
  </div>
@@ -75,6 +75,9 @@
    customRow(record) {
      return {
        style: {
          backgroundColor: this.currentClickedTypeInfo.id === record.id ? '#BAE7FF' : 'transparent'
        },
        on: {
          contextmenu: event => {
            event.preventDefault()
@@ -82,9 +85,9 @@
            this.$emit('handleTableContextMenuOpen', this.currentRightClickedTypeInfo)
          },
          click: () => {
            if (this.currentClickedTypeInfo.docId === record.docId) return
            if (this.currentClickedTypeInfo.id === record.id) return
            this.currentClickedTypeInfo = Object.assign({}, record)
            // this.$bus.$emit('sendCurrentClickedDocumentInfo', record)
            this.$bus.$emit('sendCurrentClickedTypeInfo', record)
          }
        }
      }
src/views/dnc/base/modules/ProductStructure/Document/DocumentInfo.vue
ÎļþÒÑɾ³ý
src/views/dnc/base/modules/ProductStructure/Document/NcDocumentTableList.vue
@@ -1,7 +1,7 @@
<template>
  <div style="flex: 1">
    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination"
             :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
             :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
    </a-table>
@@ -23,7 +23,7 @@
    components: { NcDocumentAssignModal, DocumentModal },
    mixins: [JeecgListMixin],
    props: {
      currentTreeNodeInfo: {
    currentNCDocumentAttributionInfo: {
        type: Object
      },
      size: {
@@ -92,7 +92,7 @@
      }
    },
    watch: {
      currentTreeNodeInfo: {
    currentNCDocumentAttributionInfo: {
        handler(value) {
          this.currentClickedDocumentInfo = {}
        },
@@ -108,12 +108,14 @@
          this.$message.error('请设置url.list属性!')
          return
        }
      console.log('currentNCDocumentAttributionInfo', this.currentNCDocumentAttributionInfo)
      const { attributionId, attributionType, docClassCode } = this.currentNCDocumentAttributionInfo
        //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
        if (arg === 1) this.ipagination.current = 1
        var params = this.getQueryParams()//查询条件
        params.attributionId = this.currentTreeNodeInfo.id
        params.attributionType = this.currentTreeNodeInfo.type
        params.docClassCode = 'NC'
      params.attributionId = attributionId
      params.attributionType = attributionType
      params.docClassCode = docClassCode
        if (!params) return false
        this.dataSource = []
        this.loading = true
@@ -135,6 +137,9 @@
      customRow(record) {
        return {
        style: {
          backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent'
        },
          on: {
            contextmenu: event => {
              event.preventDefault()
src/views/dnc/base/modules/ProductStructure/Document/OtherDocumentTableList.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination"
             :scroll="{y:189}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
             :scroll="{y:265}" :customRow="customRow" :size="size" rowKey="docId" @change="handleTableChange">
    </a-table>
@@ -131,6 +131,9 @@
      customRow(record) {
        return {
          style: {
            backgroundColor: this.currentClickedDocumentInfo.docId === record.docId ? '#BAE7FF' : 'transparent'
          },
          on: {
            contextmenu: event => {
              event.preventDefault()
src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue
@@ -22,13 +22,18 @@
        <ProcessStepInfo :currentLevelDetails="currentLevelInfo.entity" :size="containerSize"/>
      </a-tab-pane>
      <a-tab-pane :key="1" tab="设备列表" v-if="currentLevelInfo.hasOwnProperty('deviceManagementId')">
<!--        <ProcessStepInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/>-->
        è®¾å¤‡åˆ—表
      </a-tab-pane>
      <!--系统参数配置中若参数为1时才展示对应层级的刀具列表-->
      <a-tab-pane :key="2" tab="刀具列表"
                  v-if="+currentLevelInfo.type===5&&isProcessHasCutterList||+currentLevelInfo.type===6&&isProcessStepHasCutterList">
        <CutterTableList ref="cutterTableListRef" :currentLevelInfo="currentLevelInfo" :size="containerSize"/>
      </a-tab-pane>
      <template v-if="currentLevelInfo.hasOwnProperty('attributionType')">
      <template v-if="currentLevelInfo.hasOwnProperty('docId')">
        <a-tab-pane :key="1" tab="文档属性">
          <DocumentInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/>
        </a-tab-pane>
@@ -97,6 +102,7 @@
  },
  created() {
    this.$bus.$on('sendCurrentClickedDocumentInfo', this.receiveCurrentLevelInfo)
    this.$bus.$on('sendCurrentClickedTypeInfo', this.receiveCurrentLevelInfo)
    this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentLevelInfo)
    this.$bus.$on('reloadMainBottomTableData', this.reloadMainBottomTableData)
    this.getCutterListDisplayPermission('dnc_cutter_process', 'isProcessHasCutterList')
src/views/dnc/base/modules/ProductStructure/ProductStructureMainTop.vue
@@ -10,7 +10,8 @@
            ref="deviceCustomTypeTableList" :currentTreeNodeInfo="currentTreeNodeInfo"
            @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/>
          <NcDocumentTableList ref="ncDocumentTableListRef" :currentTreeNodeInfo="currentTreeNodeInfo"
          <NcDocumentTableList ref="ncDocumentTableListRef"
                               :currentNCDocumentAttributionInfo="currentNCDocumentAttributionInfo"
                               @handleTableContextMenuOpen="handleTableContextMenuOpen" :size="tableContainerSize"/>
        </div>
      </a-tab-pane>
@@ -55,11 +56,14 @@
      isProcessStepHasDeviceTypeList: false,
      currentRightClickedTableRowInfo: {},
      currentTreeNodeInfo: {},
      currentClickedTypeInfo: {},
      currentNCDocumentAttributionInfo: {},//当前NC文档的所属级即父级的详细信息(引入设备类后NC挂载至设备类下反之则挂载在工序和工步下)
      hasLoadedDataTabKeyArray: []
    }
  },
  created() {
    this.$bus.$on('sendCurrentTreeNodeInfo', this.receiveCurrentTreeNodeInfo)
    this.$bus.$on('sendCurrentClickedTypeInfo', this.receiveCurrentClickedTypeInfo)
    this.$bus.$on('reloadDocumentListData', this.reloadDocumentListData)
    this.$bus.$on('tableMenuItemMethodTrigger', this.triggerCorrespondingMethod)
    this.getDeviceTypeListDisplayPermission('dnc_device_type_process', 'isProcessHasDeviceTypeList')
@@ -104,6 +108,19 @@
      this.hasLoadedDataTabKeyArray.push(this.activeTabKey)
    },
    receiveCurrentClickedTypeInfo(record) {
      const { id, attributionType } = record
      this.currentClickedTypeInfo = Object.assign({}, record)
      this.currentNCDocumentAttributionInfo = Object.assign({}, {
        attributionId: id,
        attributionType,
        docClassCode: 'NC'
      })
      this.$nextTick(() => {
        if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1)
      })
    },
    /**
     * æŽ§åˆ¶å³é”®èœå•开启
     * @param record å½“前表格行信息
@@ -134,13 +151,23 @@
    /**
     * æ–‡æ¡£ä»¥åŠNC程序导入/出库/入库成功后触发重新加载文档列表
     * @param docClassCode æ–‡æ¡£ç±»åˆ«
     * @param attributionId èŠ‚ç‚¹Id
     * @param attributionType æ–‡æ¡£çˆ¶çº§type类型
     * @param attributionId æ–‡æ¡£çˆ¶çº§Id
     */
    reloadDocumentListData({ docClassCode, attributionId }) {
      // å¦‚果上传的文档不是所属于当前所展示节点的文档则不重新获取文档列表
    reloadDocumentListData({ docClassCode, attributionType, attributionId }) {
      console.log('docClassCode, attributionType, attributionId', docClassCode, attributionType, attributionId)
      // åœ¨æ­¤å¤„设备NC文档父级参数是可此方法是结构树以及设备类两种不同导入方式的共同出口
      this.currentNCDocumentAttributionInfo = Object.assign({}, { docClassCode, attributionId, attributionType })
      // è‹¥å¼•入设备类则只需要判断当前出现的文档所属是否是当前左键选中的文档,若不是当前选中的文档则不刷新文档列表(避免无效刷新)
      if (this.currentRightClickedTableRowInfo.hasOwnProperty('deviceManagementId')) {
        if (this.currentClickedTypeInfo.id !== attributionId) return
      } else {
      if (this.currentTreeNodeInfo.id !== attributionId) return
      }
      if (docClassCode === 'NC') {
        this.$nextTick(() => {
        if (this.$refs.ncDocumentTableListRef) this.$refs.ncDocumentTableListRef.loadData(1)
        })
      } else {
        if (this.$refs.otherDocumentTableListRef) this.$refs.otherDocumentTableListRef.loadData(1)
      }
@@ -169,7 +196,7 @@
    // åˆ é™¤å½“前右键选中文档
    handleDelete() {
      const { docId, param, attributionId } = this.currentRightClickedTableRowInfo
      const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo
      const that = this
      that.$confirm({
        title: '提示',
@@ -184,7 +211,7 @@
                  message: '消息',
                  description: res.message
                })
                that.reloadDocumentListData({ docClassCode: param, attributionId })
                that.reloadDocumentListData({ docClassCode: param, attributionId, attributionType })
              } else {
                that.$notification.warning({
                  message: '消息',
@@ -218,7 +245,7 @@
     */
    handlePull(menuLabel) {
      const that = this
      const { docId, docName, param, attributionId } = this.currentRightClickedTableRowInfo
      const { docId, docName, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo
      that.$confirm({
        title: '提示',
        content: `确认${menuLabel}吗?`,
@@ -229,7 +256,7 @@
            .then(res => {
              console.log('res------------------', res)
              if (res.success) {
                that.reloadDocumentListData({ docClassCode: param, attributionId })
                that.reloadDocumentListData({ docClassCode: param, attributionId, attributionType })
                that.$notification.success({
                  message: '消息',
                  description: `${menuLabel}成功`
@@ -263,7 +290,7 @@
     */
    handleCancelPull(menuLabel) {
      const that = this
      const { docId, param, attributionId } = this.currentRightClickedTableRowInfo
      const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo
      that.$confirm({
        title: '提示',
        content: `确认${menuLabel}吗?`,
@@ -273,7 +300,7 @@
          dncApi.documentCancelOutboundApi(docId)
            .then(res => {
              if (res.success) {
                this.reloadDocumentListData({ docClassCode: param, attributionId })
                this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType })
                that.$notification.success({
                  message: '消息',
                  description: res.message
@@ -307,7 +334,7 @@
     */
    handlePublish(menuLabel) {
      const that = this
      const { docId, param, attributionId } = this.currentRightClickedTableRowInfo
      const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo
      that.$confirm({
        title: '提示',
        content: `确认${menuLabel}吗?`,
@@ -317,7 +344,7 @@
          dncApi.documentPublishApi(docId)
            .then(res => {
              if (res.success) {
                this.reloadDocumentListData({ docClassCode: param, attributionId })
                this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType })
                this.$bus.$emit('reloadMainBottomTableData', 'documentVersion')
                that.$notification.success({
                  message: '消息',
@@ -352,7 +379,7 @@
     */
    handleRepublish(menuLabel) {
      const that = this
      const { docId, param, attributionId } = this.currentRightClickedTableRowInfo
      const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo
      that.$confirm({
        title: '提示',
        content: `确认${menuLabel}吗?`,
@@ -362,7 +389,7 @@
          dncApi.documentRepublishApi(docId)
            .then(res => {
              if (res.success) {
                this.reloadDocumentListData({ docClassCode: param, attributionId })
                this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType })
                that.$notification.success({
                  message: '消息',
                  description: res.message
@@ -396,7 +423,7 @@
     */
    handlePigeonhole(menuLabel) {
      const that = this
      const { docId, param, attributionId } = this.currentRightClickedTableRowInfo
      const { docId, param, attributionId, attributionType } = this.currentRightClickedTableRowInfo
      that.$confirm({
        title: '提示',
        content: `${menuLabel}后不可取消,确认${menuLabel}吗?`,
@@ -406,7 +433,7 @@
          dncApi.documentPigeonholeApi(docId)
            .then(res => {
              if (res.success) {
                this.reloadDocumentListData({ docClassCode: param, attributionId })
                this.reloadDocumentListData({ docClassCode: param, attributionId, attributionType })
                that.$notification.success({
                  message: '消息',
                  description: res.message
src/views/dnc/base/modules/ProductStructure/ProductStructureTree.vue
@@ -10,7 +10,7 @@
          </a-tooltip>
          <a-button type="primary" v-has="'product_add'" icon="plus" style="margin-left: 8px"
                    @click="$refs.productModalFormRef.triggerCorrespondingMethod({modalTitle:'添加产品',methodName:'handleProductAdd'})">
            æ·»åŠ äº§å“
            äº§å“
          </a-button>
          <!--          <a-dropdown :trigger="['click']" placement="bottomCenter" style="margin: 0 8px">-->
          <!--            <a-menu slot="overlay">-->
src/views/dnc/common/DocumentBatchDeleteModal.vue
@@ -146,8 +146,7 @@
            } else {
              this.ipagination.total = 0
            }
          }
          else this.$message.warning(res.message)
        } else this.$message.warning(res.message)
        }).finally(() => {
          this.loading = false
        })
@@ -183,7 +182,12 @@
      // ç¡®è®¤æ‰¹é‡åˆ é™¤æ–‡æ¡£
      confirmBatchDeleteDocument() {
        const that = this
        const { selectedRowKeys, $notification, $confirm, currentDocumentInfo: { param, attributionId, attributionType } } = that
      const {
        selectedRowKeys,
        $notification,
        $confirm,
        currentDocumentInfo: { param, attributionId, attributionType }
      } = that
        if (selectedRowKeys.length === 0) {
          $notification.warning({
@@ -230,7 +234,7 @@
                  hasRequestedCount++
                  if (hasRequestedCount === selectedRowKeys.length && hasRequestedSuccessCount > 0) {
                    this.loadData()
                    this.$emit('reloadDocumentListData', { docClassCode: param, attributionId })
                  this.$emit('reloadDocumentListData', { docClassCode: param, attributionId, attributionType })
                  }
                })
            })
src/views/dnc/common/ImportFileModal.vue
@@ -64,9 +64,10 @@
          attributionType = treeNodeInfo.type
          docClassCode = treeNodeInfo.param
        } else {
          attributionId = tableRowInfo.attributionId
          // è‹¥å·¥åºåŠå·¥æ­¥å±‚级下有设备类时则导入NC的参数需要调整
          attributionId = tableRowInfo.param==='deviceCustomType'?tableRowInfo.id:tableRowInfo.attributionId
          attributionType = tableRowInfo.attributionType
          docClassCode = tableRowInfo.param
          docClassCode = tableRowInfo.param==='deviceCustomType'?'NC':tableRowInfo.param
        }
        this.setModalTitle(modalTitle, docClassCode)
        this.uploadParams = Object.assign({}, { attributionId, attributionType, docClassCode })
src/views/dnc/common/TableContextMenu.vue
@@ -45,7 +45,7 @@
          deviceCustomType:[
            { label: '编辑设备类信息', code: 'type_edit', subMenu: [], icon: 'edit', isCommonMethod: false },
            { label: '删除', code: 'type_delete', subMenu: [], icon: 'delete', isCommonMethod: false },
            { label: '导入NC程序', code: 'type_document_import', subMenu: [], icon: 'import', isCommonMethod: true },
            { label: '导入NC程序', code: 'type_import', subMenu: [], icon: 'import', isCommonMethod: true },
          ],
          //NC文档
          NC: [
@@ -159,6 +159,7 @@
          methodName = 'handle' + menuKeyArray.map(item => item[0].toUpperCase() + item.slice(1)).join('')
        }
        console.log('tableRowInfo---------------------------------------', this.tableRowInfo)
        console.log('methodName---------------------------------------', methodName)
        this.$bus.$emit('tableMenuItemMethodTrigger', {
          methodName,
          modalTitle,