ScoreResultsTable.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="ScoreResults">
  3. <el-table
  4. :data="list"
  5. header-row-class-name="header_row_class_name"
  6. border
  7. style="width: 100%; margin: 20px 0"
  8. >
  9. <el-table-column prop="orderNo" width="70px" label="">
  10. <template slot-scope="scope">
  11. <div class="btn_box">
  12. <div class="btn_div">
  13. <img
  14. @click="$emit('CHANEG_SCORE_RESULT', 1, scope.$index)"
  15. src="@/images/add-new-rule-sub.png"
  16. alt=""
  17. />
  18. </div>
  19. <div class="btn_div" v-if="list.length > 1">
  20. <img
  21. @click="$emit('CHANEG_SCORE_RESULT', 0, scope.$index)"
  22. src="@/images/add-new-rule-del.png"
  23. alt=""
  24. />
  25. </div>
  26. </div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column prop="content" label="得分范围">
  30. <template slot-scope="scope">
  31. <!-- <div>{{ scope.row.content.max }},{{ scope.row.content.min }}</div> -->
  32. <div class="range_box">
  33. <div class="range_child">
  34. <el-form-item label="大于:" label-width="50px">
  35. <el-input
  36. type="text"
  37. v-model="scope.row.content.max"
  38. clearable
  39. placeholder="请输入"
  40. ></el-input>
  41. </el-form-item>
  42. </div>
  43. <div class="range_child">
  44. <el-form-item label="小于:" label-width="50px">
  45. <el-input
  46. type="text"
  47. v-model="scope.row.content.min"
  48. clearable
  49. placeholder="请输入"
  50. ></el-input>
  51. </el-form-item>
  52. </div>
  53. </div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="result" label="结果">
  57. <template slot="header">
  58. <div class="custom_table_header">结果</div>
  59. </template>
  60. <template slot-scope="scope">
  61. <el-form-item>
  62. <el-input
  63. type="text"
  64. v-model="scope.row.result"
  65. clearable
  66. placeholder="请输入"
  67. ></el-input>
  68. </el-form-item>
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="pushInfo" label="建议">
  72. <template slot-scope="scope">
  73. <el-form-item>
  74. <el-input
  75. type="text"
  76. v-model="scope.row.pushInfo"
  77. clearable
  78. placeholder="请输入"
  79. ></el-input>
  80. </el-form-item>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. </div>
  85. </template>
  86. <script>
  87. export default {
  88. props: {
  89. list: {
  90. default: []
  91. }
  92. }
  93. };
  94. </script>
  95. <style lang="less" scoped>
  96. .ScoreResults {
  97. width: 100%;
  98. padding: 0 30px;
  99. box-sizing: border-box;
  100. /deep/.el-table th,
  101. .el-table tr {
  102. height: 50px;
  103. background: #e3eaf4;
  104. }
  105. /deep/.el-table th {
  106. padding: 0;
  107. }
  108. .btn_box {
  109. width: 100%;
  110. height: 100%;
  111. display: flex;
  112. align-items: center;
  113. justify-content: space-around;
  114. .btn_div {
  115. flex: 1;
  116. display: flex;
  117. align-items: center;
  118. justify-content: center;
  119. }
  120. img {
  121. width: 16px;
  122. height: 16px;
  123. cursor: pointer;
  124. }
  125. }
  126. .range_box {
  127. display: flex;
  128. .range_child {
  129. flex: 1;
  130. &:nth-child(1) {
  131. margin-right: 20px;
  132. }
  133. }
  134. }
  135. /deep/.el-input--mini .el-input__inner {
  136. width: 100%;
  137. }
  138. }
  139. </style>