Browse Source

得分表格添加,demo状态

reaper 4 years ago
parent
commit
943b93903a

+ 41 - 0
src/components/knowledgeExtra/AddAssess/ScoreResultsTable.vue

@@ -0,0 +1,41 @@
+<template>
+  <div class="ScoreResults">
+    <el-table
+      :data="list"
+      header-row-class-name="header_row_class_name"
+      border
+      style="width: 100%; margin: 20px 0"
+    >
+      <el-table-column prop="issueId" label=""> </el-table-column>
+      <el-table-column prop="issueId" label="得分范围"> </el-table-column>
+      <el-table-column prop="issueId" label="结果"> </el-table-column>
+      <el-table-column prop="issueId" label="建议"></el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      list: []
+    };
+  }
+};
+</script>
+
+<style lang="less" scoped>
+.ScoreResults {
+  width: 100%;
+  padding: 0 30px;
+  box-sizing: border-box;
+  /deep/.el-table th,
+  .el-table tr {
+    height: 50px;
+    background: #e3eaf4;
+  }
+  /deep/.el-table th {
+    padding: 0;
+  }
+}
+</style>

+ 6 - 2
src/components/knowledgeExtra/AddAssess/index.vue

@@ -136,7 +136,7 @@ it .ql-editor,
         <div class="table_top_box">
           <div class="table_top_box_left">
             <el-form-item label="标题:" label-width="70px">
-              <el-input v-model.trim="table.content" />
+              <el-input maxlength="20" v-model.trim="table.content" />
             </el-form-item>
             <div style="margin: 0 20px">
               <el-form-item label="内容类型:" label-width="100px">
@@ -256,6 +256,7 @@ it .ql-editor,
             删除标题
           </div>
         </div>
+        <ScoreResultsTable />
       </div>
     </el-form>
   </div>
@@ -270,6 +271,8 @@ import { quillEditor, Quill } from "vue-quill-editor";
 import config from "@api/config";
 import { container, ImageExtend, QuillWatch } from "quill-image-extend-module";
 Quill.register("modules/ImageExtend", ImageExtend);
+import ScoreResultsTable from "./ScoreResultsTable.vue";
+import rules from "./rules";
 const defaultDate = {
   groupId: "",
   issueId: "",
@@ -312,9 +315,10 @@ const defaultTable = {
   textType: 11
 };
 export default {
-  components: { ScaleTable, quillEditor },
+  components: { ScaleTable, quillEditor, ScoreResultsTable },
   data() {
     return {
+      rules: rules,
       moveTopHover: false,
       moveBottomHover: false,
       scaleData: {

+ 5 - 0
src/components/knowledgeExtra/AddAssess/rules.js

@@ -0,0 +1,5 @@
+export default {
+  tableContent: [
+    { required: true, message: "请输入标题", trigger: ["blur"] },
+  ]
+}

+ 4 - 1
src/components/knowledgeExtra/AddAssess/scale-table.vue

@@ -37,7 +37,7 @@
     width: 100%;
   }
   /deep/.el-table th {
-    padding: 2px 0;
+    padding: 0;
   }
 }
 /deep/.el-table th,
@@ -45,6 +45,9 @@
   height: 50px;
   background: #e3eaf4;
 }
+/deep/.el-table th {
+  padding: 0;
+}
 .custom_table_header {
   vertical-align: middle;
   &::before {