ÎļþÃû´Ó src/views/dnc/common/ProductStructureTree.vue ÐÞ¸Ä |
| | |
| | | <a-card class="tree_con" :loading="cardLoading" :bordered="false" @contextmenu.native="e=>e.preventDefault()"> |
| | | <a-spin :spinning="loading"> |
| | | <div style="display: flex;flex-direction: column;height: 100%"> |
| | | |
| | | <div style="display: flex"> |
| | | <a-input placeholder="è¾å
¥å
³é®åè¿è¡æç´¢" allowClear v-model="searchInput" |
| | | @change="handleSearchInputChange"/> |
| | |
| | | </div> |
| | | |
| | | <!--产åç»ææ --> |
| | | <div style="flex: 1;overflow:auto;margin-top: 10px"> |
| | | <div class="" style="flex: 1;overflow:auto;margin-top: 10px"> |
| | | <a-tree ref="tree" show-icon :checkStrictly="checkStrictly" :expandedKeys.sync="expandedKeys" |
| | | :selectedKeys="selectedKeys" :treeData="treeDataSource" :autoExpandParent="autoExpandParent" |
| | | @select="handleTreeSelect" @expand="handleTreeExpand" @rightClick="handleTreeRightClick"> |
| | |
| | | <PartModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> |
| | | <!--å·¥åºå¼¹çª--> |
| | | <ProcessModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> |
| | | <!--å·¥æ¥å¼¹çª--> |
| | | <ProcessStepModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="modalFormSubmitSuccess"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import dncApi from '@/api/dnc' |
| | | import { deleteAction } from '@/api/manage' |
| | | import ProductStructureTreeContextMenu from './modules/ProductStructureTree/ProductStructureTreeContextMenu' |
| | | import ProductModal from '../base/modules/ProductStructure/Product/ProductModal' |
| | | import ComponentModal from '../base/modules/ProductStructure/Component/ComponentModal' |
| | | import PartModal from '../base/modules/ProductStructure/Part/PartModal' |
| | | import ProcessModal from '../base/modules/ProductStructure/Process/ProcessModal' |
| | | import ProductStructureTreeContextMenu from './ProductStructureTreeContextMenu' |
| | | import ProductModal from './Product/ProductModal' |
| | | import ComponentModal from './Component/ComponentModal' |
| | | import PartModal from './Part/PartModal' |
| | | import ProcessModal from './Process/ProcessModal' |
| | | import ProcessStepModal from './ProcessStep/ProcessStepModal' |
| | | |
| | | export default { |
| | | name: 'ProductStructureTree', |
| | | components: { |
| | | ProcessStepModal, |
| | | ProcessModal, |
| | | PartModal, |
| | | ComponentModal, |
| | |
| | | case 3: |
| | | treeNode.slots = { icon: 'part' } |
| | | break |
| | | case 4: |
| | | case 5: |
| | | treeNode.slots = { icon: 'process' } |
| | | break |
| | | case 5: |
| | | case 6: |
| | | treeNode.slots = { icon: 'processStep' } |
| | | break |
| | | default: |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | /deep/ .ant-card-body { |
| | | padding: 0 12px 0 0; |
| | | } |
| | |
| | | width: calc(100% - 24px) !important; |
| | | } |
| | | |
| | | .tree_con { |
| | | overflow: hidden; |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | } |
| | | |
| | | @media screen and (min-width: 1920px) { |