| | |
| | | <div class="headline"> |
| | | 题目设置详情 |
| | | <span style="margin-left: 30px" |
| | | ><el-button type="primary" @click="compileissue" |
| | | ><el-button type="primary" @click="Saveproblem" |
| | | >保 存</el-button |
| | | ></span |
| | | > </span |
| | | ><span style="margin-left: 30px" |
| | | ><el-button type="success" round @click="drawer = true" |
| | | >+选择指标</el-button |
| | |
| | | </div> |
| | | <div style="margin-left: 8%"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="10"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="问题分类"> |
| | | <el-select |
| | | v-model="topicobj.categoryid" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="评价类型"> |
| | | <el-select |
| | | v-model="topicobj.scoretype" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8" v-if="topicobj.scoretype == 1"> |
| | | <el-form-item label="题目得分"> |
| | | <el-input |
| | | v-model="topicobj.score" |
| | | placeholder="请输入分数" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | created() { |
| | | this.gettabList(); |
| | | this.getissueinfo(); |
| | | this.test(); |
| | | this.gettargetInfo(); |
| | | this.mode = store.getters.mode; |
| | | this.languagelist = store.getters.languagelist; |
| | |
| | | }, |
| | | // 新增或修改详情 |
| | | compileissue() { |
| | | console.log(11223); |
| | | this.topicobj.svyLibScriptOptions = this.topicobj.svyLibScriptOptions.map( |
| | | (item) => { |
| | | if (item.isoperation != 1 && item.isoperation != 3) { |
| | |
| | | deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); |
| | | } |
| | | }, |
| | | // 判断分值 |
| | | Scorejudgment() { |
| | | let scorearr = this.topicobj.svyLibScriptOptions; |
| | | let isValid = scorearr.every((score) => { |
| | | if (score.score) { |
| | | console.log(Number(score.score), this.topicobj.score, "分值"); |
| | | if ( |
| | | Number(score.score) <= 0 || |
| | | Number(score.score) > Number(this.topicobj.score) |
| | | ) { |
| | | console.log(22); |
| | | this.$message({ |
| | | message: "选项分值必须大于0小于等于" + this.topicobj.score + "分", |
| | | type: "warning", |
| | | }); |
| | | return false; |
| | | } |
| | | return true; |
| | | } else { |
| | | this.$message({ |
| | | message: "选项分值未设置", |
| | | type: "warning", |
| | | }); |
| | | return false; |
| | | } |
| | | }); |
| | | |
| | | if (isValid) { |
| | | this.compileissue(); |
| | | // console.log("到保存了"); |
| | | } |
| | | }, |
| | | Saveproblem() { |
| | | if (this.topicobj.scoretype == 1) { |
| | | console.log(321); |
| | | this.Scorejudgment(); |
| | | } else { |
| | | this.compileissue(); |
| | | } |
| | | }, |
| | | // 删除标签 |
| | | handleClose(tag) { |
| | | this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); |
| | | }, |
| | | // 删除选项 |
| | | deletexuanx(row) { |
| | | const index = this.getIndexInArray( |