shareReportCustom.vue 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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">
  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/textBack.png') no-repeat;
  75. width: 100%;
  76. height: vw(94);
  77. background-size: cover;
  78. color: #7d0207;
  79. font-size: vw(36);
  80. text-align: center;
  81. line-height: vw(94);
  82. // margin-top: vw(152);
  83. // margin-bottom: vw(45);
  84. margin: vw(35) 0 vw(20) 0;
  85. font-weight: bold;
  86. }
  87. .content {
  88. font-size: vw(28);
  89. font-weight: bold;
  90. color: #ffff;
  91. line-height: vw(63);
  92. white-space: pre-wrap;
  93. }
  94. }
  95. </style>