shareReportCustom.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <div class="shareReportCustom" v-if="fromData && fromData.length">
  3. <template v-for="(value, ind) in fromData">
  4. <template v-if="value.sfaReportCustomCollections">
  5. <div
  6. v-for="(item, index) in value.sfaReportCustomCollections"
  7. :key="item.reportCustomCollectionId">
  8. <template v-if="item.isShare == '1'">
  9. <template
  10. v-if="
  11. item.reportCustomCollectionType == 'sz' || item.reportCustomCollectionType == 'wb'
  12. ">
  13. <div class="text">{{ item.reportCustomCollectionName }}</div>
  14. <div class="content">{{ item.answerValue }}</div>
  15. </template>
  16. <template
  17. v-if="
  18. item.reportCustomCollectionType == 'duox' || item.reportCustomCollectionType == 'dx'
  19. ">
  20. <div class="text">{{ item.reportCustomCollectionName }}</div>
  21. <div class="content">
  22. <p v-for="value in item.sfaReportCustomOptions">
  23. <template v-if="value.answerValue == 'Y'">{{ value.customOption }}</template>
  24. </p>
  25. </div>
  26. </template>
  27. </template>
  28. </div>
  29. </template>
  30. </template>
  31. </div>
  32. </template>
  33. <script>
  34. import zRadio from '@/components/componentZRadio';
  35. import zCheckbox from '@/components/componentZCheckbox';
  36. export default {
  37. components: { zRadio, zCheckbox },
  38. props: {
  39. reportCustomData: {
  40. type: Array,
  41. default: () => [],
  42. },
  43. disabled: {
  44. type: Boolean,
  45. default: false,
  46. },
  47. },
  48. watch: {
  49. reportCustomData: {
  50. handler(val) {
  51. this.postName = localStorage.getItem('postName');
  52. this.filterFromData(val);
  53. },
  54. immediate: true,
  55. deep: true,
  56. },
  57. },
  58. data() {
  59. return {
  60. fromData: null,
  61. postName: '',
  62. };
  63. },
  64. methods: {
  65. filterFromData(val) {
  66. this.fromData = val;
  67. },
  68. },
  69. };
  70. </script>
  71. <style lang="scss">
  72. .shareReportCustom {
  73. .text {
  74. background: url('../assets/textBack1.png') no-repeat;
  75. width: 100%;
  76. min-height: vw(94);
  77. background-size: cover;
  78. color: #7d0207;
  79. font-size: vw(36);
  80. text-align: center;
  81. line-height: vw(50);
  82. margin: vw(35) 0 vw(20) 0;
  83. font-weight: bold;
  84. display: flex;
  85. align-items: center;
  86. justify-content: center;
  87. padding: vw(18) 0;
  88. }
  89. .content {
  90. font-size: vw(28);
  91. // font-weight: bold;
  92. color: #ffff;
  93. line-height: vw(48);
  94. white-space: pre-wrap;
  95. p {
  96. margin: 0;
  97. }
  98. }
  99. }
  100. </style>