From 55f9876e876c7ddfcc2a7a2b870dfc224c9467a6 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 01 四月 2026 17:28:43 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/questionbank/particulars/index.vue | 166 ++++++++++++++++++++++++++++++++-----------------------
1 files changed, 97 insertions(+), 69 deletions(-)
diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index b009153..880f6bd 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -23,7 +23,13 @@
</div>
<div v-if="Editprogress == 1">
<el-card class="box-card">
- <el-form :inline="true" ref="topicobj" :model="topicobj" :rules="rules" class="demo-form-inline">
+ <el-form
+ :inline="true"
+ ref="topicobj"
+ :model="topicobj"
+ :rules="rules"
+ class="demo-form-inline"
+ >
<div class="headline">
鍩虹淇℃伅閰嶇疆
<span style="margin-left: 30px"
@@ -65,6 +71,7 @@
v-model="topicobj.categoryid"
size="medium"
filterable
+ @change="categoryidChange"
placeholder="璇烽�夋嫨鍒嗙被"
>
<el-option-group
@@ -87,7 +94,7 @@
<el-form-item label="璇勪环绫诲瀷" prop="scoretype">
<el-select
v-model="topicobj.scoretype"
- placeholder="璇烽�夋嫨鍒嗙被"
+ placeholder="璇烽�夋嫨绫诲瀷"
>
<el-option
v-for="group in appraiselist"
@@ -121,7 +128,7 @@
><el-form-item label="鏄惁鍙敤" prop="isavailable">
<el-radio-group v-model="topicobj.isavailable">
<el-radio
- @change="$forceUpdate()"
+ @change="$forceUpdate()"
v-for="(item, index) in usable"
:label="item.value"
>{{ item.label }}</el-radio
@@ -143,7 +150,6 @@
</el-col> -->
</el-row>
<el-row :gutter="10">
-
<el-col :span="8"
><el-form-item label="闂绫诲瀷" prop="scriptType">
<el-select
@@ -151,7 +157,7 @@
@change="changefn"
size="medium"
filterable
- placeholder="璇烽�夋嫨鍒嗙被"
+ placeholder="璇烽�夋嫨绫诲瀷"
>
<el-option
class="topicobjaa"
@@ -185,7 +191,7 @@
v-model="topicobj.language"
size="medium"
filterable
- placeholder="璇烽�夋嫨鍒嗙被"
+ placeholder="璇烽�夋嫨"
>
<el-option
class="topicobjaa"
@@ -245,7 +251,6 @@
</el-form-item>
</el-col>
</el-row> -->
-
<!-- <el-form-item label="閫変腑鎸囨爣锛�">
<span style="margin-left: 30px"
@@ -329,8 +334,8 @@
style="width: 100px; height: 100px"
:src="topicobj.picturePath"
:preview-src-list="
- topicobj.picturePath ? [topicobj.picturePath] : []
- "
+ topicobj.picturePath ? [topicobj.picturePath] : []
+ "
>
</el-image>
</div>
@@ -342,7 +347,12 @@
</div>
<div v-if="Editprogress == 2">
<el-card class="box-card">
- <el-form :inline="true" ref="topicobj" :model="topicobj" class="demo-form-inline">
+ <el-form
+ :inline="true"
+ ref="topicobj"
+ :model="topicobj"
+ class="demo-form-inline"
+ >
<div class="headline">
鎸囨爣璁剧疆璇︽儏
<span v-if="topicobj.targetname" style="margin-left: 30px"
@@ -521,8 +531,8 @@
style="width: 100px; height: 100px"
:src="item.picturePath"
:preview-src-list="
- item.picturePath ? [item.picturePath] : []
- "
+ item.picturePath ? [item.picturePath] : []
+ "
>
</el-image>
</div>
@@ -731,8 +741,8 @@
svyLibScriptOptions: [],
svyLibScriptTagList: [],
suitway: "1",
- scoretype:'4',
- language:'鏅�氳瘽',
+ scoretype: "4",
+ language: "鏅�氳瘽",
},
headers: {
Authorization: "Bearer " + getToken(),
@@ -873,13 +883,12 @@
getissueinfo() {
this.id = this.$route.query.id;
-
// 鍒嗙被
getissueclassify({}).then((res) => {
this.classifylist = res.rows;
if (this.$route.query.categoryid) {
- this.topicobj.categoryid = Number(this.$route.query.categoryid);
- }
+ this.topicobj.categoryid = Number(this.$route.query.categoryid);
+ }
});
if (!this.id) {
return;
@@ -919,75 +928,94 @@
this.drawer = true;
});
},
+ // categoryidChange(id) {
+ // // 閬嶅巻鎵�鏈夊垎缁勶紝鍦ㄦ瘡涓垎缁勭殑 svyLibScriptCategoryList 涓煡鎵�
+ // let targetOption = null;
+ // for (const group of this.classifylist) {
+ // targetOption = group.svyLibScriptCategoryList.find(item => item.id == id);
+ // if (targetOption) break;
+ // }
+
+ // if (targetOption) {
+ // console.log('閫変腑鐨勯�夐」:', targetOption);
+ // // 娉ㄦ剰锛氳繖閲� targetOption.name 鏄�夐」鍚嶏紝濡傗�滀綇闄㈡弧鎰忓害璋冩煡鈥�
+ // if (targetOption.name.includes('浣忛櫌')) {
+ // this.topicobj.type = "zymyd";
+ // } else if (targetOption.name.includes('闂ㄨ瘖')) {
+ // this.topicobj.type = "mzmyd";
+ // } else if (targetOption.name.includes('鍑洪櫌')) {
+ // this.topicobj.type = "cymyd";
+ // } else if (targetOption.name.includes('甯哥敤')) {
+ // this.topicobj.type = "cymyd"; // 娉ㄦ剰锛氳繖閲屽拰鈥滃嚭闄⑩�濋噸澶嶄簡锛岀‘璁ゆ槸鍚﹂渶鍖哄垎
+ // }
+ // }
+ // },
// 鏂板鎴栦慨鏀硅鎯�
compileissue() {
this.$refs["topicobj"].validate((valid) => {
if (valid) {
- this.topicobj.svyLibScriptOptions = this.topicobj.svyLibScriptOptions.map(
- (item) => {
- if (item.isoperation != 1 && item.isoperation != 3) {
- item.isoperation = 2;
- }
- return item;
- }
- );
- this.topicobj.targetoptions = this.topicobj.svyLibScriptOptions
- .filter((item) => item.isoperation != 3)
- .map((item) => item.optioncontent)
- .join(", ");
- this.topicobj.otherdata = JSON.stringify(this.variablelist);
- if (this.id) {
- this.topicobj.isoperation = 2;
- compileissue(this.topicobj).then((res) => {
- if (res.code == 200) {
- this.$message({
- message: "淇敼鎴愬姛",
- type: "success",
+ this.topicobj.svyLibScriptOptions =
+ this.topicobj.svyLibScriptOptions.map((item) => {
+ if (item.isoperation != 1 && item.isoperation != 3) {
+ item.isoperation = 2;
+ }
+ return item;
});
- this.$router.go(-1);
+ this.topicobj.targetoptions = this.topicobj.svyLibScriptOptions
+ .filter((item) => item.isoperation != 3)
+ .map((item) => item.optioncontent)
+ .join(", ");
+ this.topicobj.otherdata = JSON.stringify(this.variablelist);
+ if (this.id) {
+ this.topicobj.isoperation = 2;
+ compileissue(this.topicobj).then((res) => {
+ if (res.code == 200) {
+ this.$message({
+ message: "淇敼鎴愬姛",
+ type: "success",
+ });
+ this.$router.go(-1);
+ } else {
+ this.$message({
+ message: "淇敼澶辫触",
+ type: "error",
+ });
+ }
+ });
} else {
- this.$message({
- message: "淇敼澶辫触",
- type: "error",
+ this.topicobj.isoperation = 1;
+ compileissue(this.topicobj).then((res) => {
+ if (res.code == 200) {
+ this.$message({
+ message: "鏂板鎴愬姛",
+ type: "success",
+ });
+ this.$router.go(-1);
+ } else {
+ this.$message({
+ message: "鏂板澶辫触",
+ type: "error",
+ });
+ }
});
}
- });
- } else {
- this.topicobj.isoperation = 1;
- compileissue(this.topicobj).then((res) => {
- if (res.code == 200) {
- this.$message({
- message: "鏂板鎴愬姛",
- type: "success",
- });
- this.$router.go(-1);
- } else {
- this.$message({
- message: "鏂板澶辫触",
- type: "error",
- });
+ this.illnesslist.forEach((item, index) => {
+ if (!item.id) {
+ addtargetillness(item).then((res) => {});
+ }
+ });
+ if (this.illnesslistapi.length) {
+ deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
}
- });
- }
- this.illnesslist.forEach((item, index) => {
- if (!item.id) {
- addtargetillness(item).then((res) => {});
}
});
- if (this.illnesslistapi.length) {
- deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
- }
- }
- })
-
-
},
// 鍒ゆ柇鍒嗗��
Scorejudgment() {
let scorearr = this.topicobj.svyLibScriptOptions;
let isValid = scorearr.every((score, index) => {
if (this.topicobj.scriptType == 1) {
- if (score.score||score.score==0) {
+ if (score.score || score.score == 0) {
if (
Number(score.score) < 0 ||
Number(score.score) > Number(this.topicobj.score)
--
Gitblit v1.9.3