file.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <div class="c_box">
  3. <div class="mask"></div>
  4. <!-- <div v-if="!cJson">暂未设置题目</div> -->
  5. <div class="choices" v-if="!cJson">
  6. <div class="binfo_input">
  7. <div><span>填写者上传区</span></div>
  8. </div>
  9. </div>
  10. <div v-else class="choice_box">
  11. <!-- <div class="title"><div>{{ `(${option[cJson.type].name})` }}</div><div v-html="cJson.title"></div></div> -->
  12. <div class="title" style="display: flex;">
  13. <span style="min-width:fit-content">{{ `(${option[cJson.type].name})` }}</span>
  14. <span>{{cJson.title }}</span>
  15. <span style="color: #efa030;min-width:fit-content" v-if="cJson.score">({{ cJson.score ? '分值:' + cJson.score + '分' : '' }})</span>
  16. <!-- </div><div v-html="cJson.title"></div> -->
  17. </div>
  18. <div class="detail" v-if="cJson.detail">{{ cJson.detail }}</div>
  19. <div class="choices">
  20. <div class="binfo_input">
  21. <div><span>填写者上传区</span></div>
  22. </div>
  23. <!-- <textarea readonly rows="2" class="binfo_input binfo_textarea" cols
  24. placeholder=""></textarea> -->
  25. </div>
  26. </div>
  27. </div>
  28. </template>
  29. <script>
  30. export default {
  31. props: {
  32. cJson: {
  33. type: Object,
  34. },
  35. },
  36. data() {
  37. return {
  38. option: {
  39. 1: { name: '附件' },
  40. // 2: { name: '多选题' }
  41. }
  42. }
  43. },
  44. }
  45. </script>
  46. <style scoped>
  47. @import '../../global_styles.css';
  48. .choice_box>.detail {
  49. width: 100%;
  50. word-break: break-all;
  51. color: rgb(136, 139, 146);
  52. margin: 10px 0 0;
  53. }
  54. .choice_box>.choices {
  55. margin-top: 10px;
  56. }
  57. .binfo_input {
  58. width: 100%;
  59. margin: 0;
  60. padding: 10px;
  61. display: block;
  62. min-width: 0;
  63. outline: none;
  64. box-sizing: border-box;
  65. background: none;
  66. border: none;
  67. border-radius: 5px;
  68. background: #fff;
  69. font-size: 16px;
  70. resize: none;
  71. font-family: 'Microsoft YaHei';
  72. min-height: 120px;
  73. /* border: 1px solid #3682fc00; */
  74. border: 1.5px solid #e0e0e0;
  75. }
  76. .binfo_input>div {
  77. border: 1.5px dashed #dfdfdf;
  78. height: 120px;
  79. width: 100%;
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. background: rgb(249, 250, 251);
  84. color: rgb(124, 124, 124);
  85. border-radius: 5px;
  86. }</style>