From 41b1f5280255ac539e40d4cd794532ae1829ce17 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 01 八月 2024 18:25:36 +0800
Subject: [PATCH] 测试完成
---
src/views/knowledge/questionbank/index.vue | 167 ++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 121 insertions(+), 46 deletions(-)
diff --git a/src/views/knowledge/questionbank/index.vue b/src/views/knowledge/questionbank/index.vue
index 75826f5..2b6348f 100644
--- a/src/views/knowledge/questionbank/index.vue
+++ b/src/views/knowledge/questionbank/index.vue
@@ -68,36 +68,32 @@
v-show="showSearch"
label-width="98px"
>
- <el-form-item label="鍙敤闄㈠尯" prop="status">
- <el-select v-model="queryParams.courtyard" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in languagelist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="闂涓婚" prop="userName">
+ <el-form-item label="闂鏍囬" prop="userName">
<el-input
- v-model="queryParams.userName"
+ v-model="queryParams.scriptTopic"
placeholder="璇疯緭鍏�"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鏂囧瓧" prop="status">
- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in languagelist"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
+ <el-form-item label="闂鍐呭" prop="userName">
+ <el-input
+ v-model="queryParams.scriptContent"
+ placeholder="璇疯緭鍏�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鎸囨爣鍚嶇О" prop="targetname">
+ <el-input
+ v-model="queryParams.targetname"
+ placeholder="璇疯緭鍏�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
</el-form-item>
<el-form-item label="鏄惁鍙敤" prop="isavailable">
<el-select
@@ -169,27 +165,50 @@
width="50"
align="center"
/>
- <el-table-column
+ <!-- <el-table-column
label="搴忓彿"
fixed
align="center"
- key="topicid"
- prop="topicid"
- />
+ key="id"
+ prop="id"
+ /> -->
<el-table-column
label="棰樼洰鏍囬"
fixed
align="center"
- key="topic"
- prop="topic"
+ key="scriptTopic"
+ prop="scriptTopic"
+ width="200"
+ :show-overflow-tooltip="true"
+ />
+ <el-table-column
+ label="棰樺瀷"
+ align="center"
+ key="scriptType"
+ prop="scriptType"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <dict-tag
+ :options="askvaluetype"
+ :value="scope.row.scriptType"
+ />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎸囨爣鍚嶇О"
+ fixed
+ align="center"
+ key="targetname"
+ prop="targetname"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="棰樼洰鍐呭"
align="center"
- key="topicContent"
- prop="topicContent"
+ key="scriptContent"
+ prop="scriptContent"
width="200"
:show-overflow-tooltip="true"
/>
@@ -233,8 +252,8 @@
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
- <span v-for="item in scope.row.tag.split(',')"
- >{{ item }}銆�
+ <span v-for="item in scope.row.svyLibScriptTagList"
+ >{{ item.tagname }}銆�
</span>
</template>
</el-table-column>
@@ -275,7 +294,7 @@
@click="compileUpdate(scope.row)"
v-hasPermi="['system:user:edit']"
><span class="button-bji"
- ><i class="el-icon-edit"></i>缂栬緫闂</span
+ ><i class="el-icon-edit"></i>缂栬緫</span
></el-button
>
<el-button
@@ -290,7 +309,7 @@
<el-button
size="medium"
type="text"
- @click="handleDelete(scope.row)"
+ @click="topicpreview(scope.row)"
v-hasPermi="['system:user:remove']"
><span class="button-text"
><i class="el-icon-view"></i>棰勮</span
@@ -389,6 +408,35 @@
<el-button type="primary" @click="confirmillness">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <el-dialog title="棰樼洰棰勮" :visible.sync="topicVisible" width="50%">
+ <div class="preview-left">
+ <div class="dev-text">
+ <span>{{ topicform.scriptContent }}</span>
+ </div>
+
+ <div
+ class="dev-xx"
+ v-if="topicform.scriptType != 3 && topicform.scriptType != 4"
+ >
+ <el-radio-group v-model="topicform.asrtext">
+ <el-radio
+ v-for="(topicforms, index) in topicform.svyLibScriptOptions"
+ :key="topicforms.optioncontent"
+ :label="topicforms.optioncontent"
+ >{{ topicforms.optioncontent }}</el-radio
+ >
+ </el-radio-group>
+ </div>
+ <div v-else>
+ <el-input
+ type="textarea"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ v-model.sync="topicform.asrtext"
+ :rows="2"
+ />
+ </div>
+ </div>
+ </el-dialog>
</div>
</template>
@@ -433,13 +481,18 @@
total: 0,
namequestionnaire: "",
haoquestionnaire: "",
+ askvaluetype: "",
idds: "",
+ topicform: {
+ scriptContent: "",
+ },
amendtag: false, //鏄惁淇敼绫诲埆
dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规
deleteVisible: false, //鍒嗙被鍒犻櫎寮规
+ topicVisible: false, //棰勮寮规
deletefenl: "楂樿鍘�", //鍒犻櫎椤�
classifyform: {
- categoryname: "",
+ name: "",
}, //绫诲埆琛ㄥ崟
// 琛ㄦ牸鏁版嵁
userList: [],
@@ -473,7 +526,7 @@
illnesslistapi: [],
illnesslist: [],
defaultProps: {
- children: "svyLibTopicCategoryList",
+ children: "svyLibScriptCategoryList",
label: "name",
},
mode: [],
@@ -496,6 +549,7 @@
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
this.qyoptions = store.getters.usable;
+ this.askvaluetype = store.getters.askvaluetype;
},
methods: {
@@ -513,13 +567,13 @@
compileUpdate(row) {
this.$router.push({
path: "/knowledge/questionbank/particulars/",
- query: { id: row.topicid },
+ query: { id: row.id },
});
},
// 鐤剧梾-----------------------
illnessUpdate(row) {
this.illnessVisible = true;
- this.indexid = row.topicid;
+ this.indexid = row.id;
this.illnesslistapi = [];
const illnessqueryParams = {
pageNum: 1,
@@ -529,7 +583,7 @@
console.log(response);
this.optionsillness = response.rows;
});
- getillness({ outid: row.topicid, type: 4 }).then((res) => {
+ getillness({ outid: row.id, type: 4 }).then((res) => {
this.illnesslist = res.rows;
console.log(res);
});
@@ -625,10 +679,11 @@
(obj) => obj.id == this.classifyform.pid
);
calssvalue = this.deptOptions[index];
- calssvalue.svyLibTopicCategoryList.push(this.classifyform);
+ console.log(calssvalue, "calssvalue");
+ calssvalue.svyLibScriptCategoryList.push(this.classifyform);
} else if (this.radio == "涓诲垎绫�" && this.classifyform.name) {
this.classifyform.pid = null;
- this.classifyform.svyLibTopicCategoryList = [];
+ this.classifyform.svyLibScriptCategoryList = [];
} else {
return this.$modal.msgError("璇峰~鍐欏畬鏁翠俊鎭�");
}
@@ -683,14 +738,14 @@
return data.name.indexOf(value) !== -1;
},
handleNodeClick(data) {
- this.queryParams.assortid = data.id;
+ this.queryParams.categoryid = data.id;
this.getList();
},
// 琛ㄥ崟閲嶇疆
reset() {
this.form = {
- topicid: undefined,
+ id: undefined,
deptId: undefined,
userName: undefined,
nickName: undefined,
@@ -720,7 +775,7 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.topicid);
+ this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
@@ -740,7 +795,8 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
- const topicids = row.topicid || this.ids;
+ console.log(this.ids);
+ const topicids = row.id || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + topicids + '"鐨勬暟鎹」锛�')
.then(function () {
@@ -751,6 +807,10 @@
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
})
.catch(() => {});
+ },
+ topicpreview(row) {
+ this.topicform = row;
+ this.topicVisible = true;
},
},
};
@@ -887,6 +947,21 @@
vertical-align: bottom;
}
}
+.preview-left {
+ margin: 20px;
+ // margin: 20px;
+ padding: 30px;
+ // background: #ffff;
+ border: 1px solid #dcdfe6;
+ -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
+ 0 0 6px 0 rgba(0, 0, 0, 0.04);
+
+ .dev-text {
+ margin-bottom: 10px;
+ text-align: left;
+ font-size: 22px;
+ }
+}
::v-deep .el-tree-node__content {
display: -webkit-box;
--
Gitblit v1.9.3