| | |
| | | <div class="headline"> |
| | | 题目设置详情 |
| | | <span style="margin-left: 30px" |
| | | ><el-button type="primary" @click="compileissue" |
| | | ><el-button type="primary" @click="Saveproblem" |
| | | >保 存</el-button |
| | | ></span |
| | | ><span style="margin-left: 30px" |
| | |
| | | </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> |
| | |
| | | }, |
| | | // 新增或修改详情 |
| | | 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( |
| | |
| | | label-width="100px" |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-row :gutter="10"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="问卷分类" prop="region"> |
| | | <el-select |
| | | v-model="ruleForm.categoryid" |
| | |
| | | </el-option-group> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="评价类型"> |
| | | <el-select |
| | | v-model="ruleForm.scoreType" |
| | | placeholder="请选择分类" |
| | | > |
| | | <el-option |
| | | v-for="group in appraiselist" |
| | | :key="group.value" |
| | | :label="group.label" |
| | | :value="group.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="问卷标题" prop="name"> |
| | | <div style="width: 30%"> |
| | | <el-input v-model="ruleForm.svyname"></el-input> |
| | |
| | | <div class="headline">选项设置</div> |
| | | <div |
| | | class="topicxq" |
| | | v-for="item in topicobj.svyLibTemplateTargetoptions" |
| | | v-for="item in topicobj.svyLibScriptOptions" |
| | | > |
| | | <el-row :gutter="10"> |
| | | <el-col :span="11" |
| | |
| | | { value: "topic", table: "topic" }, |
| | | { value: "topic", table: "topic" }, |
| | | ], |
| | | appraiselist: [ |
| | | { label: "分数", value: "1" }, |
| | | { label: "ABC等级", value: "2" }, |
| | | { label: "优良等级", value: "3" }, |
| | | ], |
| | | |
| | | fileList: [ |
| | | { |
| | |
| | | this.ruleForm.svyLibScripts = this.ruleForm.svyLibScripts.concat( |
| | | this.delScriptVOList |
| | | ); |
| | | console.log(this.ruleForm.svyLibScripts, "this.ruleForm.svyLibScripts"); |
| | | const result = this.tempDetpRelevanceslist.map( |
| | | (subArr) => subArr[subArr.length - 1] |
| | | ); |
| | | console.log(result, "result"); |
| | | // id数组查数组对象 |
| | | result.forEach((item) => { |
| | | const condition = this.ruleForm.tempDetpRelevances.some( |
| | |
| | | }); |
| | | } |
| | | }); |
| | | console.log(this.ruleForm.tempDetpRelevances); |
| | | // 数组对象查id数组 |
| | | this.ruleForm.tempDetpRelevances.forEach((item) => { |
| | | const condition = result.some((obj) => obj === item.deptId); |
| | |
| | | this.ruleForm.tempDetpRelevances[index].delFlag = 1; |
| | | } |
| | | }); |
| | | console.log(this.ruleForm.tempDetpRelevances); |
| | | setTimeout(() => { |
| | | this.submitForm(); |
| | | }, 1000); |
| | |
| | | // 新增题目 |
| | | addtopic(row) { |
| | | row.isoperation = 1; |
| | | row.svyLibTemplateTargetoptions.forEach((item) => { |
| | | row.svyLibScriptOptions.forEach((item) => { |
| | | item.isoperation = 1; |
| | | }); |
| | | this.ruleForm.svyLibScripts.push(row); |
| | | this.$modal.msgSuccess("新增成功"); |
| | | }, |
| | | handleDelete(row) { |
| | | let index = this.ruleForm.svyLibScripts.indexOf(row); |
| | |
| | | }, |
| | | |
| | | // 修改题目信息 |
| | | Submittopicobj() { |
| | | |
| | | }, |
| | | Submittopicobj() {}, |
| | | // 新增变量 |
| | | addvariable() { |
| | | this.variablelist.push({ |
| | |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="indexopen" |
| | | :close-on-click-modal="false" |
| | | width="900px" |
| | | append-to-body |
| | | > |
| | |
| | | } |
| | | }, |
| | | syioption(row) { |
| | | |
| | | const index = this.getIndexInArray(this.testuserList, row); |
| | | const item = this.testuserList.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中 |
| | | this.testuserList.splice(index - 1, 0, item); // 将item插入到索引位置的前一位 |
| | |
| | | |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.indexform = null; |
| | | this.indexopen = false; |
| | | this.reset(); |
| | | }, |
| | |
| | | baseTagList: [], |
| | | targetoptionList: [], |
| | | }; |
| | | this.resetForm("indexform"); |
| | | // this.resetForm("indexform"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | |
| | | this.reset(); |
| | | console.log(row); |
| | | this.title = "指标详情"; |
| | | this.indexform = {}; |
| | | this.indexform = row; |
| | | if (!row.targetoptionList[0]) { |
| | | row.targetoptionList = [ |
| | |
| | | <!-- 无匹配类型 --> |
| | | <div class="topicxq"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="12" |
| | | <el-col :span="20" |
| | | ><el-form-item label="无匹配话术"> |
| | | <el-input |
| | | type="text" |
| | | type="textarea" |
| | | style="width: 400px;" |
| | | placeholder="请输入" |
| | | v-model="topicobj.noMatchText" |
| | | show-word-limit |
| | |
| | | </div> |
| | | <div class="topicxq"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="12" |
| | | <el-col :span="20" |
| | | ><el-form-item label="听不清话术"> |
| | | <el-input |
| | | type="text" |
| | | style="width: 400px;" |
| | | type="textarea" |
| | | placeholder="请输入" |
| | | v-model="topicobj.noClearlyText" |
| | | show-word-limit |
| | |
| | | </div> |
| | | <div class="topicxq"> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="12" |
| | | <el-col :span="20" |
| | | ><el-form-item label="静默话术"> |
| | | <el-input |
| | | type="text" |
| | | type="textarea" |
| | | style="width: 400px;" |
| | | placeholder="请输入" |
| | | v-model="topicobj.slienceText" |
| | | show-word-limit |