da35e096199c7eef4060f8c07bdb3c3e0fcc6b11.svn-base 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div v-if="visible">
  3. <el-dialog id="reviseplanDialog" title="修改计划" :destroy-on-close="true" :visible.sync="visible" :close-on-click-modal="false" append-to-body :before-close="closeDialog" width="90%">
  4. <el-row class="dialogMinHeight">
  5. <el-button class="successBorder" size="medium" style="position: absolute;z-index: 1;right: 2px;top: 2px;" @click="saveData()">应用</el-button>
  6. <el-tabs v-model="parentActiveName" type="border-card">
  7. <el-tab-pane label="栏舍配方" name="栏舍配方">
  8. <DhedFormula :parent-date="date" />
  9. </el-tab-pane>
  10. <el-tab-pane label="撒料计划" name="撒料计划">
  11. <MaterialIssuancePlan :parent-date="date" />
  12. </el-tab-pane>
  13. <el-tab-pane label="预混计划" name="预混计划">
  14. <PremixedPlan :parent-date="date" />
  15. </el-tab-pane>
  16. </el-tabs>
  17. </el-row>
  18. <div slot="footer" class="dialog-footer" style="bottom: 10px;">
  19. <el-button class="cancelClose" @click="closeDialog()">关闭</el-button>
  20. </div>
  21. </el-dialog>
  22. </div>
  23. </template>
  24. <script>
  25. import DhedFormula from './typePage/dhedFormula.vue'
  26. import MaterialIssuancePlan from './typePage/materialIssuancePlan.vue'
  27. import PremixedPlan from './typePage/premixedPlan.vue'
  28. export default {
  29. name: 'RevisePlan',
  30. components: {
  31. DhedFormula, MaterialIssuancePlan, PremixedPlan
  32. },
  33. props: {
  34. show: { type: Boolean, default: false }, // 弹框可见标志
  35. parentActiveName: { type: String, defalut: '栏舍配方' },
  36. parentDate: { type: String, defalut: '' }
  37. },
  38. data() {
  39. return {
  40. typeList: [{ id: '1', effect: 'dark', label: '栏舍配方' }, { id: '2', effect: 'plain', label: '撒料计划' }, { id: '3', effect: 'plain', label: '预混计划' }],
  41. visible: this.show,
  42. dialogFormVisible: false,
  43. dialogStatus: '',
  44. rules: {},
  45. date: '',
  46. parentActiveName: '',
  47. temp: {},
  48. isDhedFormula: true,
  49. isMaterialIssuancePlan: false,
  50. isPremixedPlan: false,
  51. textMap: {
  52. revisePlan: '修改计划'
  53. },
  54. isokDisable: false
  55. }
  56. },
  57. watch: {
  58. // 监听show,visible 随着show变化而变化
  59. show: {
  60. immediate: true,
  61. handler(show) {
  62. this.visible = show
  63. }
  64. },
  65. parentDate: {
  66. immediate: true,
  67. handler(newVal, oldVal) {
  68. console.log('newVal-date', newVal)
  69. this.date = newVal
  70. }
  71. },
  72. parentActiveName: {
  73. immediate: true,
  74. handler(newVal, oldVal) {
  75. console.log('newVal===', newVal)
  76. console.log('oldVal', oldVal)
  77. this.parentActiveName = newVal
  78. }
  79. }
  80. },
  81. created() {
  82. },
  83. methods: {
  84. closeDialog() {
  85. this.$emit('update:show', false) // 子组件更新弹框隐藏
  86. this.$emit('activeName', '栏舍配方')
  87. },
  88. saveData() {
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. #reviseplanDialog {
  95. margin-top: -10vh !important
  96. }
  97. </style>