| | |
| | | <el-col :span="8" |
| | | ><el-form-item label="题目标题"> |
| | | <el-input |
| | | v-model="topicobj.topic" |
| | | v-model="topicobj.scriptTopic" |
| | | placeholder="请输入标题" |
| | | ></el-input> </el-form-item |
| | | ></el-col> |
| | |
| | | <el-col :span="8" |
| | | ><el-form-item label="题目类型"> |
| | | <el-select |
| | | v-model="topicobj.scripttype" |
| | | v-model="topicobj.scriptType" |
| | | size="medium" |
| | | filterable |
| | | placeholder="请选择分类" |
| | |
| | | <el-input |
| | | style="width: 40vw" |
| | | type="textarea" |
| | | id="script" |
| | | v-model="topicobj.script" |
| | | @focus="handleInput('script')" |
| | | id="scriptContent" |
| | | v-model="topicobj.scriptContent" |
| | | @focus="handleInput('scriptContent')" |
| | | placeholder="请输入题目内容" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input |
| | | style="width: 40vw" |
| | | type="textarea" |
| | | v-model="topicobj.scriptContent" |
| | | v-model="topicobj.scriptDesc" |
| | | placeholder="请输入说明" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | </el-col></el-row |
| | | > --> |
| | | </div> |
| | | <div v-if="topicobj.valueType == 1"> |
| | | <div v-if="topicobj.scriptType != 3"> |
| | | <div class="headline"> |
| | | 选项设置<span style="margin-left: 30px" |
| | | ><el-button type="primary" round @click="addoption" |
| | |
| | | isavailable: "", |
| | | }, |
| | | optionlist: [ |
| | | { value: "topic", table: "topic" }, |
| | | { value: "topic", table: "topic" }, |
| | | { value: "topic", table: "topic" }, |
| | | { value: "scriptTopic", table: "scriptTopic" }, |
| | | { value: "scriptTopic", table: "scriptTopic" }, |
| | | { value: "scriptTopic", table: "scriptTopic" }, |
| | | ], |
| | | inputValueillness: "", |
| | | required: [], |
| | |
| | | return false; |
| | | } |
| | | return true; |
| | | } else if (this.topicobj.scriptType == 3) { |
| | | return true; |
| | | } else { |
| | | this.$message({ |
| | | message: "选项分值未设置", |
| | |
| | | .then(() => { |
| | | console.log(row); |
| | | console.log(this.topicobj); |
| | | this.topicobj.topic = row.targetname; |
| | | this.topicobj.scriptTopic = row.targetname; |
| | | this.topicobj.valueType = row.valueType; |
| | | this.topicobj.scriptContent = row.targetdesc; |
| | | this.topicobj.isavailable = "0"; |
| | |
| | | let inputValueArr = ""; |
| | | let el = document.querySelector("#" + this.currentInputId); |
| | | //el.selectionStart; 这就是当前光标所在的位置(字符串中字符的index) |
| | | if (this.currentInputId == "script") { |
| | | inputValueArr = this.topicobj.script.split(""); |
| | | if (this.currentInputId == "scriptContent") { |
| | | inputValueArr = this.topicobj.scriptContent.split(""); |
| | | console.log(123); |
| | | } else if (this.currentInputId == "nomatchtext") { |
| | | inputValueArr = this.topicobj.nomatchtext.split(""); |
| | |
| | | // 把数组重新转换为字符串并赋值 |
| | | inputValueArr = inputValueArr.join(""); |
| | | console.log(inputValueArr); |
| | | if (this.currentInputId == "script") { |
| | | this.topicobj.script = inputValueArr; |
| | | if (this.currentInputId == "scriptContent") { |
| | | this.topicobj.scriptContent = inputValueArr; |
| | | } else if (this.currentInputId == "nomatchtext") { |
| | | this.topicobj.nomatchtext = inputValueArr; |
| | | } else if (this.currentInputId == "sliencetext") { |
| | |
| | | border: 1px solid #dcdfe6; |
| | | -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), |
| | | 0 0 6px 0 rgba(0, 0, 0, 0.04); |
| | | .topic-dev { |
| | | .scriptTopic-dev { |
| | | margin-bottom: 25px; |
| | | font-size: 20px !important; |
| | | .dev-text { |