reportResult.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <view class="default_page" :style="{'height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='生成报告' bgColor="transparent"></cus-header>
  4. <div class="box adffcac">
  5. <image class="box-loading" src="https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/e6d5bea9491a14aafd3f955d332e62d08e521229/report_success.png" v-if="result==0"></image>
  6. <image class="box-loading" src="https://gitee.com/hw_0302/chuang-heng-wechat-images/raw/e6d5bea9491a14aafd3f955d332e62d08e521229/report_fail.png" v-else></image>
  7. <div class="box-p1">{{result==0?'报告正在生成中~':'报告生成失败'}}</div>
  8. <div class="box-p2" v-if="result==0">预计所需时间7-10分钟</div>
  9. <div class="box-p3">{{result==0?'稍后可去报告管理中查看结果':'失败原因:网络延迟'}}</div>
  10. </div>
  11. <div class="form">
  12. <div class="form-item adfacjb">
  13. <div class="form-item-left">问卷名称</div>
  14. <div class="form-item-right">{{info.title||''}}</div>
  15. </div>
  16. <div class="form-item adfacjb">
  17. <div class="form-item-left">团队名称</div>
  18. <div class="form-item-right">{{info.teamName||''}}</div>
  19. </div>
  20. <div class="form-item adfacjb">
  21. <div class="form-item-left">创建时间</div>
  22. <div class="form-item-right">{{info.startTime||''}}</div>
  23. </div>
  24. </div>
  25. <div class="btn">
  26. <div class="zt_btn" @click="handleBack" v-if="result==0">返回</div>
  27. <div class="zt_btn" @click="handleReCreate" v-else>重新生成</div>
  28. </div>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data(){
  34. return {
  35. result:'',
  36. info:null
  37. }
  38. },
  39. onLoad(options) {
  40. this.result = options.result;
  41. this.info = options.info&&JSON.parse(decodeURIComponent(options.info));
  42. },
  43. methods:{
  44. handleBack(){
  45. uni.navigateBack()
  46. },
  47. handleReCreate(){
  48. this.$api.get(`/core/team/questionnaire/genReport/${this.info.teamQuestionnaireId}`).then(({data:res})=>{
  49. if(res.code!==0) return this.$showToast(res.msg)
  50. this.$showToast('重新生成成功')
  51. setTimeout(()=>{
  52. uni.redirectTo({
  53. url:'pagesHome/questionnaire?type=create'
  54. })
  55. },1500)
  56. })
  57. }
  58. }
  59. }
  60. </script>
  61. <style scoped lang="scss">
  62. .default_page{
  63. background: #F7F7F7;
  64. .box{
  65. width: 100%;
  66. background: #FFFFFF;
  67. border-radius: 36rpx 36rpx 0rpx 0rpx;
  68. padding: 54rpx 0 64rpx;
  69. &-loading{
  70. width: 340rpx;
  71. height: 340rpx;
  72. }
  73. &-p1{
  74. font-family: PingFang-SC, PingFang-SC;
  75. font-weight: bold;
  76. font-size: 32rpx;
  77. color: #002846;
  78. line-height: 40rpx;
  79. text-align: center;
  80. margin-top: 41rpx;
  81. }
  82. &-p2{
  83. font-family: PingFang-SC, PingFang-SC;
  84. font-weight: bold;
  85. font-size: 28rpx;
  86. color: #002846;
  87. line-height: 28rpx;
  88. text-align: center;
  89. margin-top: 23rpx;
  90. }
  91. &-p3{
  92. font-family: PingFangSC, PingFang SC;
  93. font-weight: 400;
  94. font-size: 28rpx;
  95. color: #667E90;
  96. line-height: 28rpx;
  97. text-align: center;
  98. margin-top: 24rpx;
  99. }
  100. }
  101. .form{
  102. width: 100%;
  103. margin-top: 20rpx;
  104. &-item{
  105. padding: 28rpx 24rpx;
  106. background: #FFFFFF;
  107. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  108. &-left{
  109. width: 140rpx;
  110. font-family: PingFangSC, PingFang SC;
  111. font-weight: 400;
  112. font-size: 30rpx;
  113. color: #002846;
  114. line-height: 42rpx;
  115. }
  116. &-right{
  117. width: calc(100% - 140rpx);
  118. padding-left: 20rpx;
  119. box-sizing: border-box;
  120. font-family: PingFangSC, PingFang SC;
  121. font-weight: 400;
  122. font-size: 30rpx;
  123. color: #667E90;
  124. line-height: 32rpx;
  125. text-align: right;
  126. }
  127. }
  128. }
  129. .btn{
  130. width: calc(100% -100rpx);
  131. margin: 120rpx 50rpx 0;
  132. }
  133. }
  134. </style>