浏览代码

静态信息bug解决

wyq 3 年之前
父节点
当前提交
d0b6a37d07
共有 1 个文件被更改,包括 165 次插入177 次删除
  1. 165 177
      src/components/knowledgeExtra/AddAssess/index.vue

+ 165 - 177
src/components/knowledgeExtra/AddAssess/index.vue

@@ -160,13 +160,10 @@ it .ql-editor,
 </style>  
 <template>
   <div class="add_assess">
-    <el-form
-      size="mini"
-      :model="scaleData"
-      label-position="left"
-      ref="scaleFormRef"
-    >
-      <h5><span>*</span>量表内容:</h5>
+    <el-form size="mini" :model="scaleData" label-position="left" ref="scaleFormRef">
+      <h5>
+        <span>*</span>量表内容:
+      </h5>
       <div
         class="table_map"
         v-for="(table, tableIndex) in scaleData.klScaleParent"
@@ -194,13 +191,11 @@ it .ql-editor,
                   placeholder="请选择"
                   @change="initializationTableData($event, tableIndex)"
                 >
-                  <el-option label="问题选项" :value="11"> </el-option>
-                  <el-option label="概述文本" :value="12"> </el-option>
+                  <el-option label="问题选项" :value="11"></el-option>
+                  <el-option label="概述文本" :value="12"></el-option>
                 </el-select>
               </el-form-item>
-              <div class="hint_msg">
-                注:内容类型修改后已填的所在标题下的内容将会清空
-              </div>
+              <div class="hint_msg">注:内容类型修改后已填的所在标题下的内容将会清空</div>
             </div>
 
             <div v-if="table.textType === 11">
@@ -213,14 +208,9 @@ it .ql-editor,
                   <el-radio :label="1">计分结果</el-radio>
                 </el-radio-group>
               </el-form-item>
-              <div class="hint_msg">
-                注:结果类型修改后已填的所在标题下的内容将会清空
-              </div>
+              <div class="hint_msg">注:结果类型修改后已填的所在标题下的内容将会清空</div>
             </div>
-            <div
-              class="num_box"
-              v-if="table.resultType === 1 && table.textType === 11"
-            >
+            <div class="num_box" v-if="table.resultType === 1 && table.textType === 11">
               <div class="num">
                 <el-form-item
                   label="系数:"
@@ -270,7 +260,7 @@ it .ql-editor,
                     ? require('@/images/icon_hover_top.png')
                     : require('@/images/icon_default_top.png')
                 "
-                alt=""
+                alt
               />
             </div>
             <div
@@ -286,16 +276,14 @@ it .ql-editor,
                     ? require('@/images/icon_hover_down.png')
                     : require('@/images/icon_default_down.png')
                 "
-                alt=""
+                alt
               />
             </div>
           </div>
           <div
             v-if="table.resultType === 1 && table.textType === 11"
             class="right_hint_msg"
-          >
-            备注:先计算系数再计算常数
-          </div>
+          >备注:先计算系数再计算常数</div>
         </div>
         <ScaleTable
           v-if="table.textType === 11"
@@ -321,7 +309,7 @@ it .ql-editor,
                   $event,
                   `klScaleParent[${tableIndex}].klScaleSaveGroup[0].content`
                 )
-              " -->
+            "-->
             <quillEditor
               :id="`klScaleParent[${tableIndex}].klScaleSaveGroup[0].content`"
               v-model="table.klScaleSaveGroup[0].content"
@@ -350,12 +338,7 @@ it .ql-editor,
         </div>
       </div>
     </el-form>
-    <el-form
-      size="mini"
-      :model="scoreresults"
-      label-position="left"
-      ref="ScoreResultsRef"
-    >
+    <el-form size="mini" :model="scoreresults" label-position="left" ref="ScoreResultsRef">
       <ScoreResultsTable
         ref="ScoreResultsTable"
         v-if="ScoreResultsShow"
@@ -370,50 +353,50 @@ it .ql-editor,
       @click="assessCommitTest"
     >
       暂时用的按钮
-    </button> -->
+    </button>-->
   </div>
 </template>
 
 <script>
-import api from "@api/knowledgeTree.js";
-import ScaleTable from "./scale-table.vue";
-import "quill/dist/quill.core.css";
-import "quill/dist/quill.snow.css";
-import "quill/dist/quill.bubble.css";
-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";
-import { numInputChange } from "./util";
+import api from '@api/knowledgeTree.js';
+import ScaleTable from './scale-table.vue';
+import 'quill/dist/quill.core.css';
+import 'quill/dist/quill.snow.css';
+import 'quill/dist/quill.bubble.css';
+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';
+import { numInputChange } from './util';
 const defaultDate = {
   groupId: new Date().valueOf().toString(),
-  issueId: new Date().valueOf().toString() + "-" + new Date().valueOf(),
+  issueId: new Date().valueOf().toString() + '-' + new Date().valueOf(),
   two_constant: 0,
-  two_content: "",
+  two_content: '',
   two_factor: 1,
   two_orderNo: 0,
-  two_remark: "",
+  two_remark: '',
   two_resultType: null,
-  two_ruleCode: "",
+  two_ruleCode: '',
   two_score: 0,
   two_selectType: 21,
   two_status: 0,
   two_textType: 21,
-  content: "",
+  content: '',
   orderNo: 0,
-  pushInfo: "",
-  remark: "",
-  result: "",
-  ruleCode: "",
+  pushInfo: '',
+  remark: '',
+  result: '',
+  ruleCode: '',
   score: null,
   status: 1,
   textType: 31
 };
 const defaultTable = {
   constant: 0,
-  content: "",
+  content: '',
   factor: 1,
   klScaleSaveGroup: [
     {
@@ -421,9 +404,9 @@ const defaultTable = {
     }
   ],
   orderNo: 0,
-  remark: "string",
+  remark: 'string',
   resultType: 1,
-  ruleCode: "string",
+  ruleCode: 'string',
   score: null,
   status: 1,
   textType: 11
@@ -446,7 +429,7 @@ export default {
           // 表格层
           {
             constant: 0,
-            content: "",
+            content: '',
             factor: 1,
             klScaleSaveGroup: [
               // 问题层+结果层(包括分组)
@@ -454,70 +437,70 @@ export default {
                 groupId: 0,
                 issueId: 0,
                 two_constant: 0,
-                two_content: "",
+                two_content: '',
                 two_factor: 1,
                 two_orderNo: 0,
-                two_remark: "",
+                two_remark: '',
                 two_resultType: null,
-                two_ruleCode: "",
+                two_ruleCode: '',
                 two_score: 0,
                 two_selectType: 21,
                 two_status: 1,
                 two_textType: 21,
-                content: "",
+                content: '',
                 orderNo: 0,
-                pushInfo: "",
-                remark: "",
-                result: "",
-                ruleCode: "",
+                pushInfo: '',
+                remark: '',
+                result: '',
+                ruleCode: '',
                 score: null,
                 status: 1,
                 textType: 31
               }
             ],
             orderNo: 0,
-            remark: "string",
+            remark: 'string',
             resultType: 1,
-            ruleCode: "string",
+            ruleCode: 'string',
             score: null,
             status: 1,
             textType: 11
           }
         ],
-        modifier: "0"
+        modifier: '0'
       },
       toolbars: [
         [
-          ["bold", "underline", "strike"],
-          [{ list: "ordered" }, { list: "bullet" }],
-          [{ script: "sub" }, { script: "super" }],
+          ['bold', 'underline', 'strike'],
+          [{ list: 'ordered' }, { list: 'bullet' }],
+          [{ script: 'sub' }, { script: 'super' }],
           [{ color: [] }, { background: [] }],
           [{ align: [] }],
-          ["image"]
+          ['image']
         ]
       ],
       editorOption: {
         modules: {
           ImageExtend: {
             loading: true,
-            name: "upfile",
+            name: 'upfile',
             size: 1,
-            sizeError: (err) => {
+            sizeError: err => {
               this.$message({
                 showClose: true,
-                message: "请上传 1M 以内的图片!",
-                type: "warning"
+                message: '请上传 1M 以内的图片!',
+                type: 'warning'
               });
             },
             action: config.urls.promptServer,
-            response: (res) => {
-              if (res.code == "0") {
+            response: res => {
+              if (res.code == '0') {
                 return config.imgHost + res.data.url;
               } else {
                 this.$message({
                   showClose: true,
                   message: res.msg,
-                  type: "warning"
+                  type: 'warning'
                 });
               }
             }
@@ -525,7 +508,7 @@ export default {
           toolbar: {
             container: container,
             handlers: {
-              image: function () {
+              image: function() {
                 QuillWatch.emit(this.quill.id);
               }
             }
@@ -542,9 +525,9 @@ export default {
               min: null
             },
             orderNo: null,
-            pushInfo: "",
+            pushInfo: '',
             remark: null,
-            result: "",
+            result: '',
             ruleCode: null,
             score: null,
             status: 2,
@@ -565,11 +548,10 @@ export default {
     },
     CHANGE_ISSUE_CONTENT(data) {
       const { value, tableIndex, rowIndex, name } = data;
-      const thisIssueId =
-        this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup[rowIndex]
-          .issueId;
+      const thisIssueId = this.scaleData.klScaleParent[tableIndex]
+        .klScaleSaveGroup[rowIndex].issueId;
       this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.forEach(
-        (item) => {
+        item => {
           if (item.issueId === thisIssueId) item[name] = value;
         }
       );
@@ -590,7 +572,7 @@ export default {
       const params = {
         conceptId: 0,
         klScaleParent: [],
-        modifier: "0"
+        modifier: '0'
       };
       // 2. 遍历数据
       this.scaleData.klScaleParent.forEach((table, tableIndex) => {
@@ -604,7 +586,7 @@ export default {
           let groupArr = [];
           // 5. 遍历数据 添加组、问题、以及选项。
           table.klScaleSaveGroup.forEach((group, groupIndex) => {
-            const groupFindIndex = groupArr.findIndex((item) => {
+            const groupFindIndex = groupArr.findIndex(item => {
               return item.groupNum === group.groupId;
             });
             // 6. 查看数组中有没有同组的,如果没有同组的,直接push
@@ -646,7 +628,7 @@ export default {
               const issueIdFindIndex = groupArr[
                 groupFindIndex
               ].klScaleSub.findIndex(
-                (issItem) => issItem.issueId === group.issueId
+                issItem => issItem.issueId === group.issueId
               );
               if (issueIdFindIndex === -1) {
                 // 8. 如果没有相同的issueId,则在该组中添加当前项的问题
@@ -701,12 +683,12 @@ export default {
           // 文本类型单独处理
           // console.dir(table);
           // 处理富文本的图标 替换占位符 config.imgHost
-          let regExp = new RegExp(config.imgHost, "g");
+          let regExp = new RegExp(config.imgHost, 'g');
           let regContent = table.klScaleSaveGroup[0].content.replace(
             regExp,
-            "{imageUrlPrefix}"
+            '{imageUrlPrefix}'
           );
-          console.log("regContent", regContent);
+          console.log('regContent', regContent);
           params.klScaleParent.push({
             ...table,
             klScaleSaveGroup: [
@@ -718,9 +700,9 @@ export default {
                     content: regContent,
                     factor: 0,
                     orderNo: 0,
-                    remark: "string",
+                    remark: 'string',
                     resultType: null,
-                    ruleCode: "string",
+                    ruleCode: 'string',
                     score: null,
                     selectType: 0,
                     status: 1,
@@ -747,7 +729,7 @@ export default {
       // 12. 创建一个得分结果的表格  并将数据赋值上
       const table = {
         constant: 0,
-        content: "得分结果",
+        content: '得分结果',
         factor: 0,
         klScaleSaveGroup: [
           {
@@ -755,13 +737,13 @@ export default {
             klScaleSub: [
               {
                 constant: 0,
-                content: "得分范围",
+                content: '得分范围',
                 factor: 0,
                 klScaleDetail: [...scoreresultPatam],
                 orderNo: 0,
-                remark: "string",
+                remark: 'string',
                 resultType: null,
-                ruleCode: "string",
+                ruleCode: 'string',
                 score: null,
                 selectType: 21,
                 status: 2,
@@ -771,9 +753,9 @@ export default {
           }
         ],
         orderNo: 0,
-        remark: "string",
+        remark: 'string',
         resultType: null,
-        ruleCode: "string",
+        ruleCode: 'string',
         score: null,
         status: 2,
         textType: 13
@@ -791,11 +773,11 @@ export default {
         //   typeof tableItem.factor + tableItem.factor,
         //   typeof tableItem.score + tableItem.score
         // );
-        typeof tableItem.constant == "string" &&
+        typeof tableItem.constant == 'string' &&
           (tableItem.constant = parseFloat(tableItem.constant));
-        typeof tableItem.factor == "string" &&
+        typeof tableItem.factor == 'string' &&
           (tableItem.factor = parseFloat(tableItem.factor));
-        typeof tableItem.score == "string" &&
+        typeof tableItem.score == 'string' &&
           (tableItem.score = parseFloat(tableItem.score));
         tableItem.klScaleSaveGroup.forEach((groupItem, groupIndex) => {
           groupItem.groupNum = groupIndex;
@@ -808,11 +790,11 @@ export default {
             //   typeof issueItem.factor == "string" + issueItem.factor,
             //   typeof issueItem.score == "string" + issueItem.score
             // );
-            typeof issueItem.constant == "string" &&
+            typeof issueItem.constant == 'string' &&
               (issueItem.constant = parseFloat(issueItem.constant));
-            typeof issueItem.factor == "string" &&
+            typeof issueItem.factor == 'string' &&
               (issueItem.factor = parseFloat(issueItem.factor));
-            typeof issueItem.score == "string" &&
+            typeof issueItem.score == 'string' &&
               (issueItem.score = parseFloat(issueItem.score));
 
             issueItem.klScaleDetail.forEach((optionItem, optionIndex) => {
@@ -821,7 +803,7 @@ export default {
               //   "optionItem.score",
               //   typeof optionItem.score == "string" + optionItem.score
               // );
-              typeof optionItem.score == "string" &&
+              typeof optionItem.score == 'string' &&
                 (optionItem.score = parseFloat(optionItem.score));
             });
           });
@@ -835,21 +817,21 @@ export default {
     assessCommit() {
       // new Promise((resolve))
       let valid1 = new Promise((resolve, reject) => {
-        this.$refs["scaleFormRef"].validate((valid, object, err) => {
+        this.$refs['scaleFormRef'].validate((valid, object, err) => {
           if (valid) {
             resolve(true);
           } else {
-            reject({ type: "c", object });
+            reject({ type: 'c', object });
             return false;
           }
         });
       });
       let valid2 = new Promise((resolve, reject) => {
-        this.$refs["ScoreResultsRef"].validate((valid, object) => {
+        this.$refs['ScoreResultsRef'].validate((valid, object) => {
           if (valid) {
             resolve(true);
           } else {
-            reject({ type: "c", object });
+            reject({ type: 'c', object });
             return false;
           }
         });
@@ -878,9 +860,9 @@ export default {
             min: null
           },
           orderNo: null,
-          pushInfo: "",
+          pushInfo: '',
           remark: null,
-          result: "",
+          result: '',
           ruleCode: null,
           score: null,
           status: 2,
@@ -913,7 +895,7 @@ export default {
           );
           setTimeout(() => {
             const top = document.getElementById(id).getBoundingClientRect().top;
-            this.$emit("scrollTo", top);
+            this.$emit('scrollTo', top);
             // `klScaleParent[${tableIndex}].content`
             const inp = this.$refs[`klScaleParent[${tableIndex + 1}].content`];
             inp && inp[0].focus();
@@ -922,13 +904,13 @@ export default {
         case -1:
           this.$delete(this.scaleData.klScaleParent, tableIndex);
           break;
-        case "up":
+        case 'up':
           const thisTable = this.scaleData.klScaleParent[tableIndex];
           const beforeTable = this.scaleData.klScaleParent[tableIndex - 1];
           this.$set(this.scaleData.klScaleParent, tableIndex - 1, thisTable);
           this.$set(this.scaleData.klScaleParent, tableIndex, beforeTable);
           break;
-        case "down":
+        case 'down':
           const thisTable1 = this.scaleData.klScaleParent[tableIndex];
           const afterTable = this.scaleData.klScaleParent[tableIndex + 1];
           this.$set(this.scaleData.klScaleParent, tableIndex + 1, thisTable1);
@@ -957,7 +939,7 @@ export default {
         case 1: //type 1: 添加组
           // 设置新的 groupId、issueId
           child.groupId = new Date().valueOf().toString();
-          child.issueId = child.groupId + "-" + new Date().valueOf();
+          child.issueId = child.groupId + '-' + new Date().valueOf();
           // 使用当前的组id(groupId)  找到最后一个groupId为当前groupId的索引;
           let groupIndex;
           this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.forEach(
@@ -977,7 +959,7 @@ export default {
         case 2: //type 2: 添加问题
           // 设置新的 groupId(相同的组id)、issueId
           child.groupId = groupId;
-          child.issueId = child.groupId + "-" + new Date().valueOf();
+          child.issueId = child.groupId + '-' + new Date().valueOf();
           let issueIndex;
           // 使用当前的组id(issueId)  找到最后一个issueId为当前issueId的索引;
           this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.forEach(
@@ -1000,8 +982,8 @@ export default {
           child.groupId = groupId;
           child.issueId = issueId;
           // 添加相同问题的内容、常数、系数、选择
-          const thisRowData =
-            this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup[rowIndex];
+          const thisRowData = this.scaleData.klScaleParent[tableIndex]
+            .klScaleSaveGroup[rowIndex];
           child.two_content = thisRowData.content;
           child.two_factor = thisRowData.two_factor;
           child.two_constant = thisRowData.two_constant;
@@ -1016,20 +998,20 @@ export default {
         case -1: //type -1: 删除组 => 删除所有组id为当前组id的数据
           const newTableBygroupId = this.scaleData.klScaleParent[
             tableIndex
-          ].klScaleSaveGroup.filter((item) => item.groupId !== groupId);
+          ].klScaleSaveGroup.filter(item => item.groupId !== groupId);
           this.$set(
             this.scaleData.klScaleParent[tableIndex],
-            "klScaleSaveGroup",
+            'klScaleSaveGroup',
             newTableBygroupId
           );
           break;
         case -2: //type -2: 删除问题 => 删除所有问题id为当前问题id的数据
           const newTableByissueId = this.scaleData.klScaleParent[
             tableIndex
-          ].klScaleSaveGroup.filter((item) => item.issueId !== issueId);
+          ].klScaleSaveGroup.filter(item => item.issueId !== issueId);
           this.$set(
             this.scaleData.klScaleParent[tableIndex],
-            "klScaleSaveGroup",
+            'klScaleSaveGroup',
             newTableByissueId
           );
           break;
@@ -1042,7 +1024,7 @@ export default {
         case 4: //type 4: 复制组=> 将组id符合的数据复制一份,重置组id和问题id
           let copyGroupData = this.scaleData.klScaleParent[
             tableIndex
-          ].klScaleSaveGroup.filter((item) => item.groupId === groupId);
+          ].klScaleSaveGroup.filter(item => item.groupId === groupId);
           copyGroupData = JSON.parse(JSON.stringify(copyGroupData));
           let newId = new Date().valueOf().toString();
           // 筛选并设置相同的issueId
@@ -1051,7 +1033,7 @@ export default {
             item.groupId = newId;
             if (i === 0 || item.issueId !== arr[i - 1].issueId) {
               newIssueIdArr.push(
-                newId + "-" + new Date().valueOf().toString() + "-" + i
+                newId + '-' + new Date().valueOf().toString() + '-' + i
               ); //加索引 防重复
             } else if (item.issueId === arr[i - 1].issueId) {
               newIssueIdArr.push(newIssueIdArr[i - 1]);
@@ -1077,13 +1059,13 @@ export default {
         case 5: //type 5: 复制问题 => 将问题id符合的数据复制一份,重置问题id
           let copyIssueData = this.scaleData.klScaleParent[
             tableIndex
-          ].klScaleSaveGroup.filter((item) => item.issueId === issueId);
+          ].klScaleSaveGroup.filter(item => item.issueId === issueId);
           copyIssueData = JSON.parse(JSON.stringify(copyIssueData));
           let newIssueIdArrIssue = [];
           copyIssueData.forEach((item, i, arr) => {
             if (i === 0 || item.issueId !== arr[i - 1].issueId) {
               newIssueIdArrIssue.push(
-                groupId + "-" + new Date().valueOf().toString() + "-" + i
+                groupId + '-' + new Date().valueOf().toString() + '-' + i
               );
             } else if (item.issueId === arr[i - 1].issueId) {
               newIssueIdArrIssue.push(newIssueIdArrIssue[i - 1]);
@@ -1117,7 +1099,7 @@ export default {
     },
     // 清空选项
     initializationTableData(e, tableIndex) {
-      this.$set(this.scaleData.klScaleParent[tableIndex], "klScaleSaveGroup", [
+      this.$set(this.scaleData.klScaleParent[tableIndex], 'klScaleSaveGroup', [
         { ...defaultDate }
       ]);
       if (e === 12) {
@@ -1131,7 +1113,7 @@ export default {
     },
     resizeTable() {
       this.$nextTick(() => {
-        this.$refs.ScaleTable.forEach((item) => {
+        this.$refs.ScaleTable.forEach(item => {
           item.resizeTable();
         });
         this.$refs.ScoreResultsTable &&
@@ -1140,38 +1122,38 @@ export default {
       });
     },
     initText() {
-      "upload";
+      'upload';
       let quillArr;
       if (this.$refs.scalequillEditor && this.$refs.scalequillEditor.length) {
         quillArr = this.$refs.scalequillEditor;
       }
       // return;
       quillArr &&
-        quillArr.forEach((item) => {
+        quillArr.forEach(item => {
           let { quill } = item;
           quill.root.addEventListener(
-            "paste",
-            (evt) => {
+            'paste',
+            evt => {
               if (
                 evt.clipboardData &&
                 evt.clipboardData.files &&
                 evt.clipboardData.files.length
               ) {
                 evt.preventDefault();
-                [].forEach.call(evt.clipboardData.files, (file) => {
+                [].forEach.call(evt.clipboardData.files, file => {
                   if (!file.type.match(/^image\/(gif|jpe?g|a?png|bmp)/i))
                     return;
                   if (file.size > 1024 * 1000) return;
                   let formData = new FormData();
-                  formData.append("upfile", file);
-                  api.uploadFile(formData).then((res) => {
-                    if (res.data.code == "0") {
+                  formData.append('upfile', file);
+                  api.uploadFile(formData).then(res => {
+                    if (res.data.code == '0') {
                       let imgUrl = config.imgHost + res.data.data.url;
                       var range = quill.getSelection();
                       if (range) {
                         // this.uploadAttachment(res, file, null);
                         let length = quill.getSelection().index;
-                        quill.insertEmbed(length, "image", imgUrl);
+                        quill.insertEmbed(length, 'image', imgUrl);
                         quill.setSelection(length + 1);
                         //  将光标移动到图片后面
                         quill.setSelection(range.index + 1);
@@ -1180,7 +1162,7 @@ export default {
                       this.$message({
                         showClose: true,
                         message: res.msg,
-                        type: "warning"
+                        type: 'warning'
                       });
                     }
                   });
@@ -1195,7 +1177,7 @@ export default {
   watch: {
     scaleData: {
       handler() {
-        console.log("监听", this.scaleData);
+        console.log('监听', this.scaleData);
         this.resizeTable();
       },
       deep: true
@@ -1209,6 +1191,8 @@ export default {
           ...this.data,
           klScaleParent: []
         };
+        console.log(this.childScaleData);
+
         delete obj.klScaleDetail;
         let scoreresults = {
           scoreresultsdatas: []
@@ -1218,7 +1202,7 @@ export default {
           if (table.textType === 13) {
             // 计算结果
             scoreresults.scoreresultsdatas = table.subMenuList[0].subMenuList;
-            scoreresults.scoreresultsdatas.forEach((item) => {
+            scoreresults.scoreresultsdatas.forEach(item => {
               item.content = JSON.parse(item.content);
             });
           } else if (table.textType === 11) {
@@ -1236,41 +1220,44 @@ export default {
               textType: table.textType,
               klScaleSaveGroup: []
             });
-
-            table.subMenuList.forEach((issueItem, issueIndex) => {
-              const arr = issueItem.subMenuList.map(
-                (optionItem, optionIndex) => {
-                  return {
-                    groupId: issueItem.groupNum,
-                    issueId: optionItem.parentId,
-                    two_constant: issueItem.constant,
-                    two_content: issueItem.content,
-                    two_factor: issueItem.factor,
-                    two_orderNo: issueItem.orderNo,
-                    two_remark: issueItem.remark,
-                    two_resultType: issueItem.resultType,
-                    two_ruleCode: issueItem.ruleCode,
-                    two_score: issueItem.score,
-                    two_selectType: issueItem.selectType,
-                    two_status: issueItem.status,
-                    two_textType: issueItem.textType,
-                    content: optionItem.content,
-                    orderNo: optionItem.orderNo,
-                    pushInfo: optionItem.pushInfo,
-                    remark: optionItem.remark,
-                    result: optionItem.result,
-                    ruleCode: optionItem.ruleCode,
-                    score: optionItem.score,
-                    status: optionItem.status,
-                    textType: optionItem.textType
-                  };
-                }
-              );
-              obj.klScaleParent[tableIndex].klScaleSaveGroup.push(...arr);
+            obj.klScaleParent.forEach((item, index) => {
+              if (table.content == obj.klScaleParent[index].content) {
+                table.subMenuList.forEach((issueItem, issueIndex) => {
+                  const arr = issueItem.subMenuList.map(
+                    (optionItem, optionIndex) => {
+                      return {
+                        groupId: issueItem.groupNum,
+                        issueId: optionItem.parentId,
+                        two_constant: issueItem.constant,
+                        two_content: issueItem.content,
+                        two_factor: issueItem.factor,
+                        two_orderNo: issueItem.orderNo,
+                        two_remark: issueItem.remark,
+                        two_resultType: issueItem.resultType,
+                        two_ruleCode: issueItem.ruleCode,
+                        two_score: issueItem.score,
+                        two_selectType: issueItem.selectType,
+                        two_status: issueItem.status,
+                        two_textType: issueItem.textType,
+                        content: optionItem.content,
+                        orderNo: optionItem.orderNo,
+                        pushInfo: optionItem.pushInfo,
+                        remark: optionItem.remark,
+                        result: optionItem.result,
+                        ruleCode: optionItem.ruleCode,
+                        score: optionItem.score,
+                        status: optionItem.status,
+                        textType: optionItem.textType
+                      };
+                    }
+                  );
+                  obj.klScaleParent[index].klScaleSaveGroup.push(...arr);
+                });
+              }
             });
           } else if (table.textType === 12) {
             // 文本
-            let regExp = new RegExp("{imageUrlPrefix}", "g");
+            let regExp = new RegExp('{imageUrlPrefix}', 'g');
             let regContent = table.subMenuList[0].content.replace(
               regExp,
               config.imgHost
@@ -1324,7 +1311,7 @@ export default {
     // 判断是否需要得分结果
     ScoreResultsShow() {
       const index = this.scaleData.klScaleParent.findIndex(
-        (item) => item.resultType === 1
+        item => item.resultType === 1
       );
       if (index === -1) {
         return false;
@@ -1333,8 +1320,9 @@ export default {
     }
   },
   created() {
-    this.editorOption.modules.toolbar.container =
-      this.toolbars[this.toolbarMode];
+    this.editorOption.modules.toolbar.container = this.toolbars[
+      this.toolbarMode
+    ];
   },
   mounted() {
     setTimeout(() => {