plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.4 KiB

  1. <script>
  2. import {getBomTreeStructure} from "../../../../../api/quotation/quoteOfRouting";
  3. export default {
  4. name: "quoteRouting",
  5. props:{
  6. detail:{
  7. type:Object,
  8. request:true,
  9. },
  10. height:{
  11. type:Number,
  12. default:400,
  13. }
  14. },
  15. data(){
  16. return{
  17. treeLoading:false,
  18. routingTreeStructure:[],
  19. routingProps:{
  20. label:'label',
  21. value:'value',
  22. children:'list'
  23. },
  24. selectRouting:[],
  25. }
  26. },
  27. methods:{
  28. nodeClick(val){
  29. },
  30. getBomTreeStructure(){
  31. let params = {
  32. site:this.detail.site,
  33. testPartNo:this.detail.productNo
  34. }
  35. getBomTreeStructure(params).then(({data})=>{
  36. if (data && data.code === 0){
  37. this.routingTreeStructure = data.rows
  38. }else {
  39. this.$message.warning(data.msg)
  40. }
  41. }).catch((error)=>{
  42. this.$message.error(error)
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <template>
  49. <div>
  50. {{detail}}
  51. <el-container>
  52. <el-aside width="24%" style="padding: 0;" :style="{height: height}" v-loading="treeLoading">
  53. <el-tree :data="routingTreeStructure"
  54. :props="routingProps"
  55. @node-click="nodeClick"
  56. node-key="value" style="height: 100%"
  57. default-expand-all
  58. highlight-current ref="tree"
  59. ></el-tree>
  60. </el-aside>
  61. <el-main style="padding: 0">
  62. </el-main>
  63. </el-container>
  64. </div>
  65. </template>
  66. <style scoped>
  67. </style>