textQuestionDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="text-quesiton-container" id="text-quesiton-container">
  3. <div class="text-quesiton-header">
  4. <div class="text-header-left">
  5. {{this.quesitonTitle}}<span style="white-space: nowrap;" >【填空题】</span>
  6. </div>
  7. <el-button type="primary" @click="toQuestionnaireSurvey" style="margin-left: 30px;">返回统计</el-button>
  8. </div>
  9. <div class="survey-detail-zone">
  10. <el-table :data="detailData" border>
  11. <el-table-column label="序号" prop="index" width="60">
  12. <template slot-scope="{$index}">
  13. {{ (detailDataSearchP.CurrentIndex-1)*detailDataSearchP.PageSize+1+$index }}
  14. </template>
  15. </el-table-column>
  16. <el-table-column label="姓名" prop="UserName" width="85">
  17. <template slot-scope="{row}">
  18. {{ row.UserName }}
  19. </template>
  20. </el-table-column>
  21. <el-table-column label="文本内容" prop="Options">
  22. <template slot-scope="{row}">
  23. {{ row.Options }}
  24. </template>
  25. </el-table-column>
  26. <div slot="empty" class="table-noData">
  27. <img src="~@/assets/img/cus_m/nodata.png">
  28. <span>暂无数据</span>
  29. </div>
  30. </el-table>
  31. <!-- 页数选择器 -->
  32. <m-page
  33. :page_no="detailDataSearchP.CurrentIndex"
  34. :pageSize="detailDataSearchP.PageSize"
  35. :total="total"
  36. style="position: absolute;right: 60px;bottom: 50px;"
  37. @handleCurrentChange="pageChange"
  38. />
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. import mPage from '@/components/mPage.vue';
  44. import{etaTrialInterence}from '@/api/modules/crmApi.js';
  45. export default {
  46. name:'textQuestionDetail',
  47. components:{
  48. mPage
  49. },
  50. data() {
  51. return {
  52. detailData:[],
  53. quesitonTitle:'加载中······',
  54. detailDataSearchP:{
  55. CurrentIndex:1,
  56. PageSize:10,
  57. QuestionnaireId:0,
  58. },
  59. total:0,
  60. }
  61. },
  62. methods:{
  63. getDetailList(){
  64. etaTrialInterence.getTextDetailList(this.detailDataSearchP).then(res=>{
  65. if(res.Ret == 200){
  66. this.detailData = res.Data.List || []
  67. this.total = res.Data.Paging.Totals || 0
  68. }
  69. })
  70. },
  71. toQuestionnaireSurvey(){
  72. // this.$router.push('/questionnaireSurvey')
  73. this.$router.back()
  74. },
  75. pageChange(page_no){
  76. this.detailDataSearchP.CurrentIndex = page_no
  77. this.getDetailList()
  78. }
  79. },
  80. created(){
  81. this.quesitonTitle = this.$route.query.question
  82. this.detailDataSearchP.QuestionnaireId = +this.$route.query.quesionId || 0
  83. this.getDetailList()
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .text-quesiton-container{
  89. // height: auto;
  90. // min-height: 100%;
  91. .text-quesiton-header{
  92. background-color: white;
  93. padding: 20px 30px;
  94. box-sizing: border-box;
  95. display: flex;
  96. align-items: center;
  97. justify-content: space-between;
  98. // flex-wrap: wrap;
  99. border: 1px solid #DCDFE6;
  100. border-radius: 4px;
  101. margin-bottom: 20px;
  102. .text-header-left{
  103. display: flex;
  104. align-items: center;
  105. color: #333333;
  106. font-size: 14px;
  107. span{
  108. color: #999999;
  109. }
  110. }
  111. }
  112. // 详细数据
  113. .survey-detail-zone{
  114. background-color: white;
  115. min-height: calc(100vh - 212px);
  116. box-sizing: border-box;
  117. padding: 30px 30px 80px;
  118. .table-noData{
  119. display: flex;
  120. flex-direction: column;
  121. align-items: center;
  122. justify-content: center;
  123. margin: 18vh 0;
  124. img{
  125. height: 110px;
  126. width: 136px;
  127. }
  128. span{
  129. font-weight: 400;
  130. font-size: 16px;
  131. color: #999999;
  132. }
  133. }
  134. }
  135. }
  136. </style>