productCassification.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <a-row :class="['p-4', `${prefixCls}--box`]" :gutter="10">
  3. <a-col :xl="6" :lg="8" :md="10" :sm="24" style="flex: 1">
  4. <a-card :bordered="false" style="height: 100%">
  5. <a-tabs defaultActiveKey="user-info">
  6. <a-tab-pane tab="产品分类(Product Classification)" key="base-info" forceRender>
  7. <productCassificationTree @select="selectId" ref="treeListRef"/>
  8. </a-tab-pane>
  9. </a-tabs>
  10. </a-card>
  11. </a-col>
  12. <a-col :xl="18" :lg="16" :md="14" :sm="24" style="flex: 1">
  13. <a-card :bordered="false" style="height: 100%">
  14. <a-tabs defaultActiveKey="user-info">
  15. <a-tab-pane tab="分类列表(Classification List)" key="base-info" forceRender>
  16. <productCassification2 ref="classListRef" @success="addListSuccess"/>
  17. </a-tab-pane>
  18. </a-tabs>
  19. </a-card>
  20. </a-col>
  21. </a-row>
  22. </template>
  23. <script lang="ts" setup name="system-depart-user">
  24. import { provide, ref } from 'vue';
  25. import { useDesign } from '/@/hooks/web/useDesign';
  26. import productCassificationTree from './productCassificationTree.vue';
  27. import productCassification2 from './productCassification1.vue';
  28. // import DepartUserInfoTab from './components/DepartUserInfoTab.vue';
  29. // import DepartRoleInfoTab from './components/DepartRoleInfoTab.vue';
  30. const { prefixCls } = useDesign('depart-user');
  31. provide('prefixCls', prefixCls);
  32. const classListRef = ref();
  33. const treeListRef = ref();
  34. // 左侧树选择后触发
  35. async function selectId(data) {
  36. await classListRef.value.getAppointRow(data)
  37. }
  38. function addListSuccess(){
  39. treeListRef.value.loadDepartTreeData()
  40. }
  41. </script>
  42. <style lang="less">
  43. // @import './index.less';
  44. </style>