From 99b062eeca471bdcbfcacd88e308fab9972cd6ec Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 19 八月 2025 14:21:33 +0800
Subject: [PATCH] 展示优化
---
src/views/repositoryai/verbaltrick/index.vue | 258 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 199 insertions(+), 59 deletions(-)
diff --git a/src/views/repositoryai/verbaltrick/index.vue b/src/views/repositoryai/verbaltrick/index.vue
index e0fedf6..e3f02ae 100644
--- a/src/views/repositoryai/verbaltrick/index.vue
+++ b/src/views/repositoryai/verbaltrick/index.vue
@@ -4,7 +4,7 @@
<div class="sidecolumn">
<div class="sidecolumn-top">
<div class="top-wj">闂绫诲瀷</div>
- <div class="top-tj" @click="dialogFormVisible = true">+娣诲姞</div>
+ <div class="top-tj" @click="Newcategory">+娣诲姞</div>
</div>
<div class="center-ss">
<el-input
@@ -29,7 +29,7 @@
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
- <span>
+ <span v-if="data.id > 0">
<el-button
type="text"
icon="el-icon-delete"
@@ -37,6 +37,17 @@
size="mini"
@click="() => remove(node, data)"
>
+ </el-button>
+ </span>
+ <span v-if="data.id > 0">
+ <el-button
+ type="text"
+ circle
+ size="mini"
+ @click="() => altertag(node, data)"
+ ><span class="button-textxg"
+ ><i class="el-icon-edit-outline"></i
+ ></span>
</el-button>
</span>
</span>
@@ -57,48 +68,26 @@
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="scriptTopic">
<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="userName">
+ <el-form-item label="鍏宠仈鎸囨爣" prop="targetname">
<el-input
- v-model="queryParams.userName"
+ v-model="queryParams.targetname"
placeholder="璇疯緭鍏�"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
- </el-form-item>
- <el-form-item label="閫傜敤鏂瑰紡" prop="status">
- <el-select v-model="queryParams.applyway" 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="status">
- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨">
+ <el-select v-model="queryParams.language" placeholder="璇烽�夋嫨">
<el-option
v-for="item in languagelist"
:key="item.value"
@@ -108,8 +97,11 @@
</el-option>
</el-select>
</el-form-item>
- <el-form-item label="鏄惁鍙敤" prop="status">
- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨">
+ <el-form-item label="鏄惁鍙敤" prop="isavailable">
+ <el-select
+ v-model="queryParams.isavailable"
+ placeholder="璇烽�夋嫨"
+ >
<el-option
v-for="item in qyoptions"
:key="item.value"
@@ -170,30 +162,31 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
- <el-table-column label="搴忓彿" align="center" key="id" prop="id" />
<el-table-column
- label="闂涓婚"
+ label="搴忓彿"
+ fixed
align="center"
- key="questiontitle"
- prop="questiontitle"
+ key="id"
+ prop="id"
+ />
+ <el-table-column
+ label="闂鏍囬"
+ fixed
+ align="center"
+ key="scriptTopic"
+ prop="scriptTopic"
:show-overflow-tooltip="true"
/>
<el-table-column
label="闂鏂囨湰"
align="center"
- key="questiontext"
- prop="questiontext"
+ key="scriptContent"
+ prop="scriptContent"
width="200"
:show-overflow-tooltip="true"
/>
- <el-table-column
- label="闂璇煶"
- align="center"
- key="questionvoice"
- prop="questionvoice"
- width="200"
- /><el-table-column
+ <el-table-column
label="鍏宠仈鎸囨爣"
align="center"
key="targetname"
@@ -204,12 +197,23 @@
/><el-table-column
label="閫傜敤鏂瑰紡"
align="center"
- key="application"
- prop="application"
+ key="suitway"
+ prop="suitway"
width="120"
>
<template slot-scope="scope">
- <dict-tag :options="mode" :value="scope.row.suitWay" />
+ <dict-tag :options="mode" :value="scope.row.suitway" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="闂绫诲瀷"
+ align="center"
+ key="valueType"
+ prop="valueType"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <dict-tag :options="valuetype" :value="scope.row.valueType" />
</template>
</el-table-column>
<el-table-column
@@ -266,6 +270,7 @@
<el-table-column
label="鎿嶄綔"
+ fixed="right"
align="center"
width="250"
class-name="small-padding fixed-width"
@@ -314,11 +319,11 @@
</div>
</div>
<!-- 娣诲姞绫诲埆寮规 -->
- <el-dialog title="鏂板绫诲埆" width="30%" :visible.sync="dialogFormVisible">
+ <el-dialog :title="title" width="30%" :visible.sync="dialogFormVisible">
<div style="text-align: center; margin-bottom: 20px">
<el-radio-group v-model="radio">
- <el-radio-button label="涓诲垎绫�"></el-radio-button>
- <el-radio-button label="瀛愬垎绫�"></el-radio-button>
+ <el-radio-button label="涓诲垎绫�" v-show="zifon"></el-radio-button>
+ <el-radio-button label="瀛愬垎绫�" v-show="zufon"></el-radio-button>
</el-radio-group>
</div>
<el-divider></el-divider>
@@ -343,7 +348,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
+ <el-button @click="getDeptTree()">鍙� 娑�</el-button>
<el-button type="primary" @click="submitsidecolumn">纭� 瀹�</el-button>
</div>
</el-dialog>
@@ -395,6 +400,55 @@
<el-button type="primary" @click="confirmillness">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <!-- 闅忚棰樼洰棰勮 -->
+ <el-dialog title="闅忚棰樼洰棰勮" :visible.sync="topicVisible" width="50%">
+ <div class="preview-left">
+ <div v-if="topicform.valueType == 1">
+ <div class="dev-text">
+ [鍗曢�塢<span>{{ topicform.scriptContent }}</span>
+ </div>
+
+ <div class="dev-xx">
+ <el-radio-group v-model="topicform.asrtext">
+ <el-radio
+ v-for="(
+ topicforms, index
+ ) in topicform.ivrLibaScriptTargetoptionList"
+ :key="topicforms.targetvalue"
+ :label="topicforms.targetvalue"
+ >{{ topicforms.targetvalue }}</el-radio
+ >
+ </el-radio-group>
+ </div>
+ </div>
+ <div class="scriptTopic-dev" v-if="topicform.valueType == 2">
+ <div class="dev-text">
+ [澶氶�塢<span>{{ topicform.scriptContent }}</span>
+ </div>
+ <div class="dev-xx">
+ <el-checkbox-group v-model="topicform.remark">
+ <el-checkbox
+ v-for="(
+ topicforms, index
+ ) in topicform.ivrLibaScriptTargetoptionList"
+ :key="topicforms.targetvalue"
+ :label="topicforms.targetvalue"
+ >{{ topicforms.targetvalue }}
+ </el-checkbox>
+ </el-checkbox-group>
+ </div>
+ </div>
+ <div class="scriptTopic-dev" v-if="topicform.valueType == 3">
+ <div class="dev-text">
+ [濉┖]<span>{{ topicform.scriptContent }}</span>
+ </div>
+ <div class="dev-xx">
+ <el-input placeholder="璇疯緭鍏ョ瓟妗�" v-model="radioas" clearable>
+ </el-input>
+ </div>
+ </div>
+ </div>
+ </el-dialog>
</div>
</template>
@@ -402,8 +456,9 @@
import {
getverbaltricklist,
verbaltrickinfo,
- delverbaltrickinfo,
getverbaltrick,
+ delverbaltrickinfo,
+ compileverbaltrickclassify,
getillnesslist,
illnesslistget,
getillness,
@@ -437,9 +492,13 @@
total: 0,
namequestionnaire: "",
haoquestionnaire: "",
+ topicform: {
+ scriptContent: "",
+ },
idds: "",
amendtag: false, //鏄惁淇敼绫诲埆
dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规
+ topicVisible: false, //棰勮寮规
indexid: null,
inputValue: "",
inputVisible: false,
@@ -468,7 +527,7 @@
},
],
// 寮瑰嚭灞傛爣棰�
- title: "",
+ title: "鏂板绫诲埆",
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
// 鏃ユ湡鑼冨洿
@@ -487,11 +546,13 @@
indexopen: false, //寮规灞曠ず鍚�
propss: { multiple: true },
radio: "涓诲垎绫�",
-
+ zufon: true,
+ zifon: true,
usable: [],
mode: [],
languagelist: [],
+ valuetype:[],
qyoptions: [],
// 鏌ヨ鍙傛暟
queryParams: {
@@ -513,6 +574,7 @@
this.getDeptTree();
this.mode = store.getters.mode;
this.languagelist = store.getters.languagelist;
+ this.valuetype = store.getters.valuetypelb;
this.qyoptions = store.getters.usable;
},
@@ -523,7 +585,7 @@
getverbaltricklist(this.queryParams).then((res) => {
this.userList = res.rows;
this.loading = false;
- this.total=res.total
+ this.total = res.total;
});
},
@@ -575,7 +637,7 @@
handleAdd() {
this.$router.push({
path: "/knowledge/verbaltrick/particulars/",
- query: { id: "" },
+ query: { id: "", categoryid: this.queryParams.categoryid },
});
},
// 鍒嗙被鏍�-----------------------------------------
@@ -589,12 +651,21 @@
getDeptTree() {
getbaltrickclassify({}).then((res) => {
this.deptOptions = res.rows;
- console.log(res);
+ this.dialogFormVisible = false;
});
},
// 娣诲姞绫诲埆鏍�
submitsidecolumn() {
+ if (this.classifyform.id) {
+ compileverbaltrickclassify(this.classifyform).then((res) => {
+ this.getDeptTree();
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
+ });
+ return;
+ }
let calssvalue = {};
if (
this.classifyform.pid &&
@@ -615,6 +686,8 @@
addbaltrickclassify(this.classifyform).then((res) => {
this.getDeptTree();
this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.classifyform = {};
+ this.dialogFormVisible = false;
});
},
remove(a, b) {
@@ -646,6 +719,27 @@
.catch(() => {});
}
},
+ altertag(a, b) {
+ this.dialogFormVisible = true;
+ if (!b.pid) {
+ this.radio = "涓诲垎绫�";
+ this.title = "淇敼涓诲垎绫�";
+ this.zufon = false;
+ } else {
+ this.radio = "瀛愬垎绫�";
+ this.title = "淇敼瀛愬垎绫�";
+ this.zifon = false;
+ }
+ this.classifyform = b;
+ this.dialogFormVisible = true;
+ },
+ Newcategory(){
+ this.classifyform= {}, //绫诲埆琛ㄥ崟
+ this.radio = "涓诲垎绫�";
+ this.dialogFormVisible = true
+ this.zifon = true;
+ this.zufon = true;
+ },
// 绛涢�夎妭鐐�
filterNode(value, data) {
@@ -658,7 +752,13 @@
},
// 棰勮
- preview(row) {},
+ preview(row) {
+ getverbaltrick({ id: row.id }).then((res) => {
+ this.topicform = res.data;
+ console.log(this.topicform);
+ this.topicVisible = true;
+ });
+ },
// 鐤剧梾-----------------------
illnessUpdate(row) {
this.illnessVisible = true;
@@ -747,7 +847,7 @@
margin-top: 20px;
margin: 20px;
padding: 30px;
- background: #edf1f7;
+ background: #fff;
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);
@@ -862,6 +962,24 @@
font-size: 20px;
cursor: pointer;
}
+::v-deep .el-tree {
+ position: relative;
+ cursor: default;
+ border-radius: 5px;
+ background: #eff8fe;
+ color: #606266;
+ border: 1px solid #bbe1fa;
+ // 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);
+}
+::v-deep
+ .el-tree--highlight-current
+ .el-tree-node.is-current
+ > .el-tree-node__content {
+ background-color: #7799fb;
+ color: #fff;
+}
::v-deep .el-button--mini.is-circle {
padding: 7px;
margin: 0;
@@ -882,6 +1000,28 @@
font-size: 20px;
}
}
+.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;
+ }
+ .scriptTopic-dev {
+ margin-bottom: 25px;
+ font-size: 20px !important;
+ .dev-text {
+ margin-bottom: 10px;
+ }
+ }
+}
.button-text {
color: rgb(70, 204, 238);
}
--
Gitblit v1.9.3