From 8dcf2987d3fcb5a7a8244513148606ead6715d53 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期日, 01 九月 2024 00:31:28 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/questionnaire/compilequer/index.vue | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index 0eb6d7e..83ebd65 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -695,7 +695,7 @@
<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>
@@ -1278,13 +1278,13 @@
},
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;
@@ -1337,6 +1337,12 @@
// 鑾峰彇鏁版嵁
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];
@@ -1365,9 +1371,11 @@
});
},
submitForm(formName) {
- this.$modal.loading("姝e湪涓婁紶鏁版嵁锛岃绋嶅��...");
+ this.$modal.loading("姝e湪淇淇濆瓨鏁版嵁锛岃绋嶅��...");
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) => {
@@ -1808,12 +1816,15 @@
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("棰樼洰鍒嗗�肩疮鍔犲拰妯$増鍒嗗�间笉绗�");
}
--
Gitblit v1.9.3