check.vue 1.3 KB

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