WXL
2024-07-10 43bb1026f5e6b04e790662361711c40f3499c2a9
src/views/repositoryai/verbaltrick/particulars/index.vue
@@ -104,9 +104,9 @@
          </el-row>
          <el-row :gutter="20">
            <el-col :span="20">
              <el-form-item label="问题主旨" prop="questiontitle">
              <el-form-item label="问题主旨" prop="scriptTopic">
                <el-input
                  v-model="indexform.questiontitle"
                  v-model="indexform.scriptTopic"
                  placeholder="请输入问题主旨"
                  maxlength="80"
                />
@@ -256,7 +256,7 @@
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="问题变量" prop="questionText">
              <el-form-item label="问题变量" prop="scriptContent">
                <div style="display: flex; margin-bottom: 10px">
                  <div
                    v-for="item in variablelist"
@@ -274,15 +274,15 @@
          >
          <el-row>
            <el-col :span="24">
              <el-form-item label="问题文本" prop="questionText">
              <el-form-item label="问题文本" prop="scriptContent">
                <el-input
                  :rows="2"
                  type="textarea"
                  id="questionText"
                  id="scriptContent"
                  show-word-limit
                  placeholder="请输入内容"
                  v-model.sync="indexform.questionText"
                  @focus="handleInput('questionText')"
                  v-model.sync="indexform.scriptContent"
                  @focus="handleInput('scriptContent')"
                />
              </el-form-item> </el-col
          ></el-row>
@@ -694,7 +694,7 @@
          .confirm('是否添加"' + res.rows[0].targetname + '"指标的选项?')
          .then(() => {
            this.indexform.valueType = res.rows[0].valueType;
            this.indexform.questiontitle = res.rows[0].targetname;
            this.indexform.scriptTopic = res.rows[0].targetname;
            this.indexform.targetname = res.rows[0].targetname;
            this.indexform.targetdesc = res.rows[0].targetdesc;
            this.indexform.isAvailable = "0";
@@ -911,8 +911,8 @@
      let inputValueArr = "";
      let el = document.querySelector("#" + this.currentInputId);
      //el.selectionStart; 这就是当前光标所在的位置(字符串中字符的index)
      if (this.currentInputId == "questionText") {
        inputValueArr = this.indexform.questionText.split("");
      if (this.currentInputId == "scriptContent") {
        inputValueArr = this.indexform.scriptContent.split("");
      } else if (this.currentInputId == "noMatchText") {
        inputValueArr = this.indexform.noMatchText.split("");
      } else if (this.currentInputId == "slienceText") {
@@ -933,8 +933,8 @@
      // 把数组重新转换为字符串并赋值
      inputValueArr = inputValueArr.join("");
      console.log(inputValueArr);
      if (this.currentInputId == "questionText") {
        this.indexform.questionText = inputValueArr;
      if (this.currentInputId == "scriptContent") {
        this.indexform.scriptContent = inputValueArr;
      } else if (this.currentInputId == "noMatchText") {
        this.indexform.noMatchText = inputValueArr;
      } else if (this.currentInputId == "slienceText") {