rectify.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="task-page">
  3. <div class="head">
  4. <uni-segmented-control
  5. :current="current"
  6. :values="items" @clickItem="onClickItem"
  7. activeColor="#007aff">
  8. </uni-segmented-control>
  9. </div>
  10. <view class="content">
  11. <view v-show="current === 0">
  12. <rectify-form ref="rectify-form" @success="getWorkflow"></rectify-form>
  13. </view>
  14. <view v-show="current === 1">
  15. <rectify-history ref="rectify-history"></rectify-history>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import rectifyForm from './form/form.vue'
  22. import rectifyHistory from './history/index.vue'
  23. export default {
  24. data() {
  25. return {
  26. items: ['基本信息', '历史记录'],
  27. current: 0
  28. }
  29. },
  30. components:{
  31. rectifyForm,
  32. rectifyHistory
  33. },
  34. onLoad() {
  35. },
  36. methods: {
  37. onClickItem(e) {
  38. if (this.current != e.currentIndex) {
  39. this.current = e.currentIndex;
  40. }
  41. },
  42. getWorkflow(data){
  43. if(data&&data.activityInsRecordList){
  44. this.$refs['rectify-history'].loadData(data.activityInsRecordList)
  45. }
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .task-page{
  52. padding:20rpx;
  53. position: relative;
  54. .head{
  55. position: fixed;
  56. z-index: 999;
  57. width: 710rpx;
  58. left: 10px;
  59. top: var(--window-top);
  60. background-color: #fff;
  61. box-sizing: border-box;
  62. padding-top: 5px;
  63. }
  64. .content{
  65. margin-top:36px;
  66. }
  67. }
  68. </style>