report.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <div class="page">
  3. <div class="top adfacjb">
  4. <div class="t_l">
  5. <p>报告管理</p>
  6. <p class="tip">访问和分析PERILL评估报告</p>
  7. </div>
  8. <div class="t_r">
  9. <el-button type="primary" icon="el-icon-upload2">导出报告</el-button>
  10. </div>
  11. </div>
  12. <div class="tabs adfac">
  13. <div class="t_pre" :class="{'active':tidx===1}" @click="handleChangeTab(1)">团队报告</div>
  14. <div class="t_pre" :class="{'active':tidx===2}" @click="handleChangeTab(2)">个人报告</div>
  15. </div>
  16. <div class="query adfacjb">
  17. <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="queryParams.name" style="width: calc(100% - 448px);"></el-input>
  18. <el-select v-model="queryParams.team" placeholder="所有团队" style="width: 200px;"></el-select>
  19. <el-select v-model="queryParams.sort" placeholder="排序方式" style="width: 200px;"></el-select>
  20. </div>
  21. <template v-if="tidx===1">
  22. <div class="list">
  23. <reportList :item="item" :reportList="item.reportList" :showMore="item.showMore"
  24. v-for="(item, index) in teamList" :key="index"
  25. @toggleReport="e=>toggleReportTeam(e,index)">
  26. </reportList>
  27. </div>
  28. </template>
  29. <template v-else-if="tidx===2">
  30. <div class="list">
  31. <reportList :item="item" :reportList="item.reportList" :showMore="item.showMore" :isTeam="false"
  32. v-for="(item, index) in personList" :key="index"
  33. @toggleReport="e=>toggleReportPerson(e,index)">
  34. </reportList>
  35. </div>
  36. </template>
  37. </div>
  38. </template>
  39. <script setup name="">
  40. import reportList from '@/components/reportList/index.vue'
  41. import { ref, getCurrentInstance } from 'vue'
  42. const { proxy } = getCurrentInstance();
  43. const tidx = ref(1)
  44. const queryParams = ref({
  45. name: '',
  46. team: '',
  47. sort: ''
  48. })
  49. const teamList = ref([
  50. {
  51. companyName:'甜梦巧克力工厂',
  52. wjName:'问卷名称问卷名称问卷名称问卷名称问卷名称',
  53. teamType:'市场部',
  54. jzDatetime:'2025-06-18 12:00:30',
  55. zdPersons:20,
  56. tdPersons:99,
  57. showMore:false,
  58. reportList:[]
  59. },
  60. {
  61. companyName:'甜梦巧克力工厂',
  62. wjName:'问卷名称问卷名称问卷名称问卷名称问卷名称',
  63. teamType:'市场部',
  64. jzDatetime:'2025-06-18 12:00:30',
  65. zdPersons:20,
  66. tdPersons:99,
  67. showMore:false,
  68. reportList:[]
  69. },
  70. {
  71. companyName:'甜梦巧克力工厂',
  72. wjName:'问卷名称问卷名称问卷名称问卷名称问卷名称',
  73. teamType:'市场部',
  74. jzDatetime:'2025-06-18 12:00:30',
  75. zdPersons:20,
  76. tdPersons:99,
  77. showMore:false,
  78. reportList:[]
  79. }
  80. ])
  81. const personList = ref([
  82. {
  83. companyName:'甜梦巧克力工厂',
  84. wjName:'问卷名称问卷名称问卷名称问卷名称问卷名称',
  85. userName:'刘俊',
  86. teamType:'市场部',
  87. jzDatetime:'2025-06-18 12:00:30',
  88. showMore:false,
  89. reportList:[]
  90. },
  91. {
  92. companyName:'甜梦巧克力工厂',
  93. wjName:'问卷名称问卷名称问卷名称问卷名称问卷名称',
  94. userName:'刘俊',
  95. teamType:'市场部',
  96. jzDatetime:'2025-06-18 12:00:30',
  97. showMore:false,
  98. reportList:[]
  99. },
  100. {
  101. companyName:'甜梦巧克力工厂',
  102. wjName:'问卷名称问卷名称问卷名称问卷名称问卷名称',
  103. userName:'刘俊',
  104. teamType:'市场部',
  105. jzDatetime:'2025-06-18 12:00:30',
  106. showMore:false,
  107. reportList:[]
  108. }
  109. ])
  110. const handleChangeTab = (idx) => {
  111. tidx.value = idx
  112. }
  113. const toggleReportTeam = (e,idx) => {
  114. teamList.value[idx].showMore = !teamList.value[idx].showMore;
  115. if(teamList.value[idx].showMore){
  116. teamList.value[idx].reportList = [
  117. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:1},
  118. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:3},
  119. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:0},
  120. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:2}
  121. ];
  122. }else teamList.value[idx].reportList = [];
  123. }
  124. const toggleReportPerson = (e,idx) => {
  125. personList.value[idx].showMore = !personList.value[idx].showMore;
  126. if(personList.value[idx].showMore){
  127. personList.value[idx].reportList = [
  128. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:1},
  129. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:3},
  130. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:0},
  131. {reportName:'报告名称报告名称报告名称报告名称',reprtTime:'2025-06-18 12:00:30',status:2}
  132. ];
  133. }else personList.value[idx].reportList = [];
  134. }
  135. </script>
  136. <style scoped lang="scss">
  137. .page{
  138. padding: 28px 20px;
  139. background: #FAFAFA;
  140. .top{
  141. .t_l{
  142. p{
  143. font-family: PingFang-SC, PingFang-SC;
  144. font-weight: bold;
  145. font-size: 16px;
  146. color: #252525;
  147. line-height: 16px;
  148. &.tip{
  149. font-family: PingFangSC, PingFang SC;
  150. font-weight: 400;
  151. font-size: 14px;
  152. color: #6B7280;
  153. line-height: 14px;
  154. margin-top: 16px;
  155. }
  156. }
  157. }
  158. }
  159. .tabs{
  160. width: 100%;
  161. margin-top: 28px;
  162. border-bottom: 1px solid #E5E7EB;
  163. .t_pre{
  164. width: 116px;
  165. padding-bottom: 18px;
  166. position: relative;
  167. font-family: PingFangSC, PingFang SC;
  168. font-weight: 400;
  169. font-size: 14px;
  170. color: #252525;
  171. line-height: 16px;
  172. text-align: center;
  173. cursor: pointer;
  174. &.active{
  175. font-weight: bold;
  176. color: #761E6A;
  177. &::after{
  178. content: '';
  179. width: 116px;
  180. height: 2px;
  181. background: #761E6A;
  182. position: absolute;
  183. left: 0;
  184. bottom: 0;
  185. }
  186. }
  187. }
  188. }
  189. .query{
  190. width: 100%;
  191. padding: 16px 20px;
  192. box-sizing: border-box;
  193. background: #FFFFFF;
  194. border-radius: 6px;
  195. border: 1px solid #F3F4F6;
  196. margin-top: 31px;
  197. }
  198. .list{
  199. .l_item{
  200. margin-top: 10px;
  201. width: 100%;
  202. padding: 24px;
  203. box-sizing: border-box;
  204. background: #FFFFFF;
  205. border-radius: 6px;
  206. border: 1px solid #F3F4F6;
  207. .li_l{
  208. .li_pre{
  209. width: 335px;
  210. .lit_text{
  211. font-family: PingFang-SC, PingFang-SC;
  212. font-weight: bold;
  213. font-size: 14px;
  214. color: #252525;
  215. line-height: 14px;
  216. text-align: left;
  217. overflow: hidden;
  218. text-overflow: ellipsis;
  219. white-space: nowrap;
  220. }
  221. .lit_tip{
  222. font-family: PingFangSC, PingFang SC;
  223. font-weight: 400;
  224. font-size: 14px;
  225. color: #6B7280;
  226. line-height: 14px;
  227. text-align: left;
  228. margin-top: 16px;
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. </style>