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.

63 lines
1.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <script>
  2. export default {
  3. name: "quoteDetailBom",
  4. props:{
  5. quoteDetail:{
  6. type:Object,
  7. required:true
  8. },
  9. },
  10. model:{
  11. prop: "quoteDetail",
  12. event: "update"
  13. },
  14. data(){
  15. return{
  16. isAllBom:false,
  17. dataList:[],
  18. treeData:[],
  19. }
  20. },
  21. methods:{
  22. handleQueryQuoteDetailBom(){
  23. console.log(this.quoteDetail.id)
  24. },
  25. },
  26. created() {
  27. if (this.quoteDetail && this.quoteDetail.id){
  28. this.handleQueryQuoteDetailBom();
  29. }
  30. },
  31. watch:{
  32. 'quoteDetail.id'(newVal,oldVal){
  33. this.handleQueryQuoteDetailBom();
  34. },
  35. }
  36. }
  37. </script>
  38. <template>
  39. <div>
  40. <div style="margin-bottom: 10px">
  41. <el-link style="margin-right: 20px">切换版本</el-link>
  42. <el-checkbox v-model="isAllBom">全级BOM结构</el-checkbox>
  43. </div>
  44. <el-container>
  45. <el-aside width="300px">
  46. <el-tree
  47. :data="treeData">
  48. </el-tree>
  49. </el-aside>
  50. <el-main style="padding: 0">
  51. <el-table :data="dataList" border style="width: 100%" :height="420">
  52. </el-table>
  53. </el-main>
  54. </el-container>
  55. </div>
  56. </template>
  57. <style scoped>
  58. </style>