index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view>
  3. <list ref="listRef" :produceFilter="produceFilter"></list>
  4. </view>
  5. </template>
  6. <script>
  7. import list from './list.vue'
  8. export default {
  9. components: {
  10. list
  11. },
  12. mixins: [],
  13. data() {
  14. return {
  15. produceFilter: {}
  16. }
  17. },
  18. computed: {
  19. },
  20. created() {
  21. uni.$off('successInit')
  22. uni.$on('successInit', (data) => {
  23. this.$nextTick(() => {
  24. this.$refs.listRef.successInit()
  25. })
  26. })
  27. },
  28. onUnload() {
  29. if (this.produceFilter && this.produceFilter.fromProduceReport == "1") {
  30. uni.$emit("refreshProduceReportWork")
  31. }
  32. uni.$off('successInit')
  33. },
  34. onLoad(options = {}) {
  35. this.produceFilter = {
  36. produceSourceTaskId: options.produceSourceTaskId || "",
  37. workOrderCode: options.workOrderCode ? decodeURIComponent(options.workOrderCode) : "",
  38. fromProduceReport: options.fromProduceReport || ""
  39. }
  40. this.$nextTick(() => {
  41. this.$refs.listRef.getList()
  42. })
  43. uni.setNavigationBarColor({
  44. frontColor: '#000000',
  45. });
  46. },
  47. methods: {
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. </style>