From 08881d6b6412822d5035f63a0775ca1f213c8668 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 20 十月 2025 10:17:22 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/questionnaire/compilequer/index.vue | 120 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 97 insertions(+), 23 deletions(-)
diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue
index 6d2bd8b..fa849d3 100644
--- a/src/views/knowledge/questionnaire/compilequer/index.vue
+++ b/src/views/knowledge/questionnaire/compilequer/index.vue
@@ -262,7 +262,7 @@
<el-option
class="ruleFormaa"
v-for="item in flatArray"
- :key="item.deptCode"
+ :key="item.id"
:label="item.label"
:value="item.deptCode"
>
@@ -285,7 +285,7 @@
<el-option
class="ruleFormaa"
v-for="item in flatArray"
- :key="item.deptCode"
+ :key="item.id"
:label="item.label"
:value="item.deptCode"
>
@@ -310,7 +310,7 @@
>涓嬩竴姝�</el-button
>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Departmenttreatment('ruleForm')"
+ <el-button @click="toExamine('ruleForm')"
>淇濆瓨闂嵎鍩虹淇℃伅</el-button
>
</el-form-item>
@@ -550,6 +550,26 @@
placeholder="璇疯緭鍏ラ鍙�"
></el-input>
</el-form-item>
+
+ <el-form-item prop="valueType">
+ <template #label>
+ 缁撴灉绫诲瀷
+ <el-tooltip
+ class="item"
+ effect="light"
+ content="鏈被鍨嬩负缁撴灉鏀堕泦绫诲瀷锛涢�夐」鐢ㄤ簬鎸囧悜鎬ч鐩鏄惁绛夛紱鏂囨湰閫傜敤澶嶆潅鎯呭喌锛涙暟鍊肩敤浜庢敹闆嗘暟鍊煎瀷鏁版嵁"
+ placement="top-start"
+ >
+ <i class="el-icon-warning-outline"></i>
+ </el-tooltip>
+ <!-- 鍦ㄦ爣绛惧悗鎻掑叆绾㈣壊鏄熷彿 -->
+ </template>
+ <el-radio-group v-model="topicobj.valueType">
+ <el-radio :label="1">閫夐」</el-radio>
+ <el-radio :label="2">鏂囨湰</el-radio>
+ <el-radio :label="3">鏁板��</el-radio>
+ </el-radio-group>
+ </el-form-item>
</el-col>
</el-row>
@@ -566,10 +586,10 @@
</el-form-item></el-col
>
<el-col :span="12"
- ><el-form-item label="鏄惁鍙敤">
- <el-radio-group v-model="topicobj.isenable">
+ ><el-form-item label="鏄惁闅愯棌">
+ <el-radio-group v-model="topicobj.ishide">
<el-radio
- v-for="(item, index) in usable"
+ v-for="(item, index) in hides"
:label="item.value"
>{{ item.label }}</el-radio
>
@@ -582,8 +602,8 @@
v-if="topicobj.scriptType == 1"
>
<el-radio-group v-model="topicobj.branchFlag">
- <el-radio :label="1">鏄�</el-radio>
- <el-radio :label="0">鍚�</el-radio>
+ <el-radio label="1">鏄�</el-radio>
+ <el-radio label="0">鍚�</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="閫変腑鎻愮ず" v-if="topicobj.scriptType != 1">
@@ -634,9 +654,9 @@
label="ABC绛夌骇"
>
<el-radio-group v-model="item.score">
- <el-radio label="A">A</el-radio>
- <el-radio label="B">B</el-radio>
- <el-radio label="C">C</el-radio>
+ <el-radio :label="1">A</el-radio>
+ <el-radio :label="2">B</el-radio>
+ <el-radio :label="3">C</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
@@ -656,6 +676,12 @@
<el-radio-group v-model="item.isabnormal">
<el-radio :label="1">鏄�</el-radio>
<el-radio :label="0">鍚�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="鏄惁閫変腑鏀堕泦闄勫姞淇℃伅">
+ <el-radio-group v-model="item.appendflag">
+ <el-radio label="1">鏄�</el-radio>
+ <el-radio label="0">鍚�</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
@@ -691,7 +717,9 @@
<el-image
style="width: 100px; height: 100px"
:src="item.picturePath"
- :preview-src-list="[...item.picturePath]"
+ :preview-src-list="
+ item.picturePath ? [item.picturePath] : []
+ "
>
</el-image>
</div>
@@ -747,9 +775,7 @@
>
<el-button type="primary" @click="laststep()">涓婁竴姝�</el-button>
<el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button>
- <el-button @click="Departmenttreatment('ruleForm')"
- >淇濆瓨闂鏁版嵁</el-button
- >
+ <el-button @click="toExamine('ruleForm')">淇濆瓨闂鏁版嵁</el-button>
</div>
<!-- 闂嵎棰勮 -->
<div v-if="Editprogress == 3">
@@ -1146,9 +1172,9 @@
label="ABC绛夌骇"
>
<el-radio-group v-model="item.score">
- <el-radio label="A">A</el-radio>
- <el-radio label="B">B</el-radio>
- <el-radio label="C">C</el-radio>
+ <el-radio :label="1">A</el-radio>
+ <el-radio :label="2">B</el-radio>
+ <el-radio :label="3">C</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
@@ -1212,7 +1238,9 @@
<el-image
style="width: 100px; height: 100px"
:src="item.picturePath"
- :preview-src-list="[...item.picturePath]"
+ :preview-src-list="
+ item.picturePath ? [item.picturePath] : []
+ "
>
</el-image>
</div>
@@ -1295,6 +1323,7 @@
svyTemplateLibScripts: [],
tempDetpRelevances: [],
svyLibTemplateTagList: [],
+ suitway: [],
scoreType: "4",
isenable: "0",
longTemp: "0",
@@ -1400,6 +1429,10 @@
usable: [
{ value: "0", label: "鍙敤" },
{ value: "1", label: "鍋滅敤" },
+ ],
+ hides: [
+ { value: 0, label: "姝e父" },
+ { value: 1, label: "闅愯棌" },
],
longtype: [
{ value: "0", label: "鏅�氫换鍔�" },
@@ -1618,8 +1651,8 @@
this.confirmillness();
this.putbelongDepts();
this.$modal.closeLoading();
- // this.$router.go(-1);
- window.location.reload();
+ this.$router.go(-1);
+ // window.location.reload();
});
} else {
this.ruleForm.isoperation = 1;
@@ -1636,6 +1669,44 @@
});
}
},
+ // 棰樼洰鏍¢獙
+ toExamine() {
+ // 閬嶅巻棰樼洰闆嗗悎
+ for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) {
+ const question = this.ruleForm.svyTemplateLibScripts[i];
+
+ // 濡傛灉 scriptType 涓� 4锛屽垯璺宠繃褰撳墠棰樼洰
+ if (question.scriptType === 4) {
+ continue;
+ }
+ // 鑾峰彇褰撳墠棰樼洰鐨勯�夐」闆嗗悎
+ const options = question.svyLibTemplateTargetoptions;
+
+ // 鍒涘缓涓�涓� Set 鏉ュ瓨鍌ㄩ�夐」鍚嶇О锛岀敤浜庢娴嬮噸澶�
+ const optionNames = new Set();
+
+ // 閬嶅巻閫夐」闆嗗悎
+ for (let j = 0; j < options.length; j++) {
+ const option = options[j];
+ const optionContent = option.optioncontent;
+
+ // 濡傛灉閫夐」鍚嶇О宸茬粡瀛樺湪浜� Set 涓紝璇存槑閲嶅
+ if (optionNames.has(optionContent)) {
+ this.$message.error(
+ `棰樼洰 ${question.id} 鐨勯�夐」鍚嶇О "${optionContent}" 閲嶅`
+ );
+ return false; // 杩斿洖 false 琛ㄧず鏍¢獙澶辫触
+ }
+ // 灏嗛�夐」鍚嶇О娣诲姞鍒� Set 涓�
+ optionNames.add(optionContent);
+ }
+ }
+
+ // 濡傛灉鎵�鏈夐鐩兘鏍¢獙閫氳繃锛岃繑鍥� true
+ console.log("鎵�鏈夐鐩牎楠岄�氳繃锛岄�夐」鍚嶇О鏃犻噸澶�");
+ this.Departmenttreatment();
+ },
+
// 绉戝/闄㈠尯澶勭悊
Departmenttreatment() {
this.tempDetpRelevanceslist.forEach((item) => {
@@ -2346,7 +2417,10 @@
display: flex;
.presentation-left {
width: 45%;
- // height: 500px;
+ max-height: 80vh;
+ padding: 0 20px;
+ font-size: 18px;
+ overflow: auto;
.button-textxg {
color: #024df0;
}
@@ -2366,7 +2440,7 @@
}
.presentation-right {
width: 55%;
- max-height: 688px;
+ max-height: 80vh;
padding: 0 20px;
font-size: 18px;
overflow: auto;
--
Gitblit v1.9.3