From 4fffa66d14a2b2943b35aca961317f3bed6649a0 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 21 六月 2024 17:09:44 +0800 Subject: [PATCH] 测试完成 --- src/views/knowledge/questionnaire/compilequer/index.vue | 119 ++++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 81 insertions(+), 38 deletions(-) diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue index 195ccbd..524e8af 100644 --- a/src/views/knowledge/questionnaire/compilequer/index.vue +++ b/src/views/knowledge/questionnaire/compilequer/index.vue @@ -39,28 +39,48 @@ label-width="100px" class="demo-ruleForm" > - <el-form-item label="闂嵎鍒嗙被" prop="region"> - <el-select - v-model="ruleForm.categoryid" - size="medium" - filterable - placeholder="璇烽�夋嫨鍒嗙被" - > - <el-option-group - v-for="group in optionsclass" - :key="group.id" - :label="group.name" - > - <el-option - v-for="item in group.svyLibTemplateCategoryList" - :key="item.id" - :label="item.name" - :value="item.id" + <el-row :gutter="10"> + <el-col :span="10"> + <el-form-item label="闂嵎鍒嗙被" prop="region"> + <el-select + v-model="ruleForm.categoryid" + size="medium" + filterable + placeholder="璇烽�夋嫨鍒嗙被" > - </el-option> - </el-option-group> - </el-select> - </el-form-item> + <el-option-group + v-for="group in optionsclass" + :key="group.id" + :label="group.name" + > + <el-option + v-for="item in group.svyLibTemplateCategoryList" + :key="item.id" + :label="item.name" + :value="item.id" + > + </el-option> + </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> @@ -267,14 +287,31 @@ <div v-if="Editprogress == 2"> <div class="leftvlue-jbxx">闂嵎棰樼洰璁剧疆</div> <el-divider></el-divider> - <div class="addtopic"> - <el-button - type="primary" - icon="el-icon-plus" - round - @click="getaddtopiclist" - >娣诲姞棰樼洰</el-button - > + <div style="display: flex; justify-content: space-between"> + <div> + <el-button + type="primary" + icon="el-icon-plus" + round + @click="getaddtopiclist" + >娣诲姞棰樼洰</el-button + > + </div> + <div style="display: flex"> + <span + style=" + width: 180px; + font-size: 20px; + font-weight: normal; + color: red; + " + >闂嵎鎬诲垎锛�</span + > + <el-input + v-model="ruleForm.scriptScore" + placeholder="璇疯緭鍏ュ垎鏁�" + ></el-input> + </div> </div> <div class="presentation"> <div class="presentation-left"> @@ -401,7 +438,7 @@ <el-input type="text" placeholder="璇疯緭鍏�" - v-model="item.topicid" + v-model="item.id" show-word-limit > </el-input> </el-form-item @@ -657,6 +694,11 @@ { value: "topic", table: "topic" }, { value: "topic", table: "topic" }, ], + appraiselist: [ + { label: "鍒嗘暟", value: "1" }, + { label: "ABC绛夌骇", value: "2" }, + { label: "浼樿壇绛夌骇", value: "3" }, + ], fileList: [ { @@ -775,6 +817,8 @@ }); }, submitForm(formName) { + this.$modal.loading("姝e湪涓婁紶鏁版嵁锛岃绋嶅��..."); + this.ruleForm.labelInfo = this.dynamicTags.join(","); this.ruleForm.suitway = this.ruleForm.suitway.join(","); @@ -782,12 +826,16 @@ this.ruleForm.isoperation = 2; compileQtemplate(this.ruleForm).then((response) => { this.$modal.msgSuccess("淇敼鎴愬姛"); + this.$modal.closeLoading(); + this.$router.go(-1); }); } else { this.ruleForm.isoperation = 1; compileQtemplate(this.ruleForm).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); + this.$modal.closeLoading(); + this.$router.go(-1); }); } @@ -799,11 +847,9 @@ 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( @@ -817,7 +863,6 @@ }); } }); - console.log(this.ruleForm.tempDetpRelevances); // 鏁扮粍瀵硅薄鏌d鏁扮粍 this.ruleForm.tempDetpRelevances.forEach((item) => { const condition = result.some((obj) => obj === item.deptId); @@ -827,7 +872,6 @@ this.ruleForm.tempDetpRelevances[index].delFlag = 1; } }); - console.log(this.ruleForm.tempDetpRelevances); setTimeout(() => { this.submitForm(); }, 1000); @@ -872,10 +916,11 @@ // 鏂板棰樼洰 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); @@ -917,9 +962,7 @@ }, // 淇敼棰樼洰淇℃伅 - Submittopicobj() { - - }, + Submittopicobj() {}, // 鏂板鍙橀噺 addvariable() { this.variablelist.push({ -- Gitblit v1.9.3