| | |
| | | <div |
| | | class="scriptTopic-dev" |
| | | :key="item.sort" |
| | | v-if="item.scriptType == 3" |
| | | v-if="item.scriptType == 4" |
| | | > |
| | | <div class="dev-text"> |
| | | {{ item.sort }}、[填空]<span>{{ item.scriptContent }}</span> |
| | |
| | | }, |
| | | activated() { |
| | | if (this.id != this.$route.query.id) { |
| | | this.gettabList(); |
| | | this.getissueinfo(); |
| | | this.gettabList(); |
| | | } |
| | | }, |
| | | created() { |
| | | this.gettabList(); |
| | | this.getissueinfo(); |
| | | this.gettabList(); |
| | | this.mode = store.getters.Askmode; |
| | | this.languagelist = store.getters.languagelist; |
| | | this.usable = store.getters.usable; |
| | |
| | | // 获取数据 |
| | | getissueinfo() { |
| | | this.id = this.$route.query.id; |
| | | this.ruleForm = { |
| | | svyTemplateLibScripts: [], |
| | | tempDetpRelevances: [], |
| | | svyLibTemplateTagList: [], |
| | | }; |
| | | |
| | | if (this.id) { |
| | | getQtemplateobj({ svyid: this.id }).then((res) => { |
| | | this.ruleForm = res.rows[0]; |
| | |
| | | }); |
| | | }, |
| | | submitForm(formName) { |
| | | this.$modal.loading("正在上传数据,请稍候..."); |
| | | this.$modal.loading("正在修正保存数据,请稍候..."); |
| | | this.ruleForm.suitway = this.ruleForm.suitway.join(","); |
| | | |
| | | if (!this.ruleForm.categoryid) { |
| | | this.ruleForm.categoryid = -1; |
| | | } |
| | | if (this.id) { |
| | | this.ruleForm.isoperation = 2; |
| | | compileQtemplate(this.ruleForm).then((res) => { |
| | |
| | | |
| | | const allGreaterThanTen = arr.every((array) => { |
| | | const totalScore = array.reduce((accumulator, current) => { |
| | | return accumulator + current.score; |
| | | return accumulator + Number(current.score); |
| | | }, 0); |
| | | console.log(totalScore); |
| | | console.log(this.ruleForm.scriptScore); |
| | | |
| | | return totalScore == this.ruleForm.scriptScore; |
| | | }); |
| | | if (allGreaterThanTen) { |
| | | this.$modal.msgSuccess("题目分值累加和模版总分相符"); |
| | | this.$modal.msgSuccess("分值校验成功"); |
| | | } else { |
| | | this.$modal.msgError("题目分值累加和模版分值不符"); |
| | | } |