configs_setting_fix.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <div>
  2. <!--统计信息-->
  3. <div class="margin-bottom">
  4. <el-row :gutter="24">
  5. <el-col :span="6">
  6. <div>
  7. <el-statistic title="总题数/分数">
  8. <template slot="formatter"> {{summary.total_quantity}}/{{summary.total_score}} </template>
  9. </el-statistic>
  10. </div>
  11. </el-col>
  12. </el-row>
  13. <el-row :gutter="24" class="m-t-5">
  14. <el-col :span="6">
  15. <div>
  16. <el-statistic title="判断题数/分数">
  17. <template slot="formatter"> {{summary.judge_quantity}}/{{summary.judge_score}} </template>
  18. </el-statistic>
  19. </div>
  20. </el-col>
  21. <el-col :span="6">
  22. <div>
  23. <el-statistic title="单选题数/分数">
  24. <template slot="formatter"> {{summary.single_quantity}}/{{summary.single_score}} </template>
  25. </el-statistic>
  26. </div>
  27. </el-col>
  28. <el-col :span="6">
  29. <div>
  30. <el-statistic title="多选题数/分数">
  31. <template slot="formatter"> {{summary.multi_quantity}}/{{summary.multi_score}} </template>
  32. </el-statistic>
  33. </div>
  34. </el-col>
  35. <!--<el-col :span="6">
  36. <div>
  37. <el-statistic title="填空题数/分数">
  38. <template slot="formatter"> {{summary.fill_quantity}}/{{summary.fill_score}} </template>
  39. </el-statistic>
  40. </div>
  41. </el-col>-->
  42. <el-col :span="6">
  43. <div>
  44. <el-statistic title="简答题数/分数">
  45. <template slot="formatter"> {{summary.short_quantity}}/{{summary.short_score}} </template>
  46. </el-statistic>
  47. </div>
  48. </el-col>
  49. <!--<el-col :span="6">
  50. <div>
  51. <el-statistic title="材料题数/分数">
  52. <template slot="formatter"> {{summary.material_quantity}}/{{summary.material_score}} </template>
  53. </el-statistic>
  54. </div>
  55. </el-col>-->
  56. </el-row>
  57. </div>
  58. <!--试题列表-->
  59. <el-table :data="questions" height="350" border style="width: 100%">
  60. <el-table-column prop="id" label="ID" width="80"></el-table-column>
  61. <el-table-column prop="cates.name" label="分类" width="120">
  62. <template slot-scope="scope">
  63. <span v-if="scope.row.cate">{{scope.row.cate.name}}</span>
  64. <span v-else-if="scope.row.cates">{{scope.row.cates.name}}</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column prop="title" label="标题"></el-table-column>
  68. <el-table-column prop="kind" label="题型" width="80">
  69. <template slot-scope="scope">
  70. <el-tag size="small" effect="plain" v-if="scope.row.kind == 'JUDGE'">判断题</el-tag>
  71. <el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'SINGLE'" type="success">单选题</el-tag>
  72. <el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'MULTI'" type="info">多选题</el-tag>
  73. <el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'FILL'" type="warning">填空题</el-tag>
  74. <el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'SHORT'" type="danger">简答题</el-tag>
  75. <el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'MATERIAL'" type="danger">材料题</el-tag>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="score" label="分数" align="center">
  79. <template slot-scope="scope">
  80. <div v-if="scope.row.kind == 'SHORT'">
  81. <!--简答题最大分数-->
  82. <div>
  83. <span>最大得分数</span>
  84. <el-input-number size="mini" v-model="scope.row.score" :min="1" step-strictly @change="scoreChange(scope.$index)"></el-input-number>
  85. </div>
  86. <!--<div>总{{scope.row.score}}分</div>-->
  87. <div class="m-t-5">
  88. <!--设置简答题各关键词分数-->
  89. <el-button size="small" type="primary" @click="openShortScoreDialog(scope.row, scope.$index)">设置关键词分数</el-button>
  90. </div>
  91. </div>
  92. <div v-else>
  93. <el-input-number size="mini" v-model="scope.row.score" :min="1" step-strictly @change="scoreChange(scope.$index)"></el-input-number>
  94. </div>
  95. </template>
  96. </el-table-column>
  97. <el-table-column fixed="right" label="操作" width="100">
  98. <template slot-scope="scope">
  99. <el-button type="danger" icon="el-icon-delete" size="small" @click="deleteQuestion(scope.$index)">删除</el-button>
  100. </template>
  101. </el-table-column>
  102. </el-table>
  103. <button id="valid" type="button" @click="valid()" class="hide">验证</button>
  104. <input type="hidden" name="row[questions]" id="c-questions">
  105. </div>
  106. <!--简答题关键词分数设置弹窗-->
  107. <el-dialog title="简答题关键词分数设置" :visible.sync="shortScoreDialogVisible" width="50%">
  108. <el-table :data="shortScoreConfig" height="350" border style="width: 100%">
  109. <el-table-column prop="answer" label="关键词"></el-table-column>
  110. <el-table-column prop="score" label="得分数">
  111. <template slot-scope="scope">
  112. <el-input-number size="mini" v-model="scope.row.score" :min="1" step-strictly></el-input-number>
  113. </template>
  114. </el-table-column>
  115. </el-table>
  116. <div slot="footer" class="dialog-footer">
  117. <el-button @click="shortScoreDialogVisible = false">取 消</el-button>
  118. <el-button type="primary" @click="shortScoreDialogVisible = false; shortScoreSubmit()">确 定</el-button>
  119. </div>
  120. </el-dialog>