WXL
2024-07-26 b14bdee1aaf639dd14440b42c6a0ce2e12549ee7
src/views/knowledge/questionnaire/compilequer/index.vue
@@ -671,6 +671,14 @@
            width="200"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="选项内容"
            align="center"
            key="targetoptions"
            prop="targetoptions"
            width="200"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="操作"
@@ -1014,6 +1022,7 @@
    // 新增题目
    addtopic(row) {
      row.isoperation = 1;
      console.log(row, "row");
      row.svyLibScriptOptions.forEach((item) => {
        item.isoperation = 1;
      });
@@ -1055,11 +1064,14 @@
      this.sortFn();
    },
    sortFn() {
      console.log(this.ruleForm.svyTemplateLibScripts, "序前值");
      this.ruleForm.svyTemplateLibScripts.forEach((item, index) => {
        item.sort = index + 1;
        item.svyLibTemplateTargetoptions.forEach((items) => {
          items.nextQuestion = Number(item.sort) + 1;
        });
        item.sort = Number(index) + 1;
        if (item.svyLibTemplateTargetoptions) {
          item.svyLibTemplateTargetoptions.forEach((items) => {
            items.nextQuestion = Number(item.sort) + 1;
          });
        }
      });
      console.log(this.ruleForm.svyTemplateLibScripts);
    },