From cc73ea5320fed8a39e00bfc0fa02810199559122 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期二, 16 七月 2024 15:55:40 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/verbaltrick/index.vue | 162 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 149 insertions(+), 13 deletions(-) diff --git a/src/views/repositoryai/verbaltrick/index.vue b/src/views/repositoryai/verbaltrick/index.vue index 96a7c9e..bf55daf 100644 --- a/src/views/repositoryai/verbaltrick/index.vue +++ b/src/views/repositoryai/verbaltrick/index.vue @@ -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> @@ -170,20 +181,26 @@ @selection-change="handleSelectionChange" > <el-table-column type="selection" width="50" align="center" /> - <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> + <el-table-column + label="搴忓彿" + fixed + align="center" + key="id" + prop="id" + /> <el-table-column label="闂涓婚" fixed align="center" - key="questiontitle" - prop="questiontitle" + 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" /> @@ -191,8 +208,8 @@ <el-table-column label="闂璇煶" align="center" - key="questionvoice" - prop="questionvoice" + key="scriptVoice" + prop="scriptVoice" width="200" /><el-table-column label="鍏宠仈鎸囨爣" @@ -345,7 +362,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> @@ -397,6 +414,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> @@ -404,8 +470,9 @@ import { getverbaltricklist, verbaltrickinfo, - delverbaltrickinfo, getverbaltrick, + delverbaltrickinfo, + compileverbaltrickclassify, getillnesslist, illnesslistget, getillness, @@ -439,9 +506,13 @@ total: 0, namequestionnaire: "", haoquestionnaire: "", + topicform: { + scriptContent: "", + }, idds: "", amendtag: false, //鏄惁淇敼绫诲埆 dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规 + topicVisible: false, //棰勮寮规 indexid: null, inputValue: "", inputVisible: false, @@ -591,12 +662,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 && @@ -650,6 +730,16 @@ .catch(() => {}); } }, + altertag(a, b) { + this.dialogFormVisible = true; + if (!b.pid) { + this.radio = "涓诲垎绫�"; + } else { + this.radio = "瀛愬垎绫�"; + } + this.classifyform = b; + this.dialogFormVisible = true; + }, // 绛涢�夎妭鐐� filterNode(value, data) { @@ -662,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; @@ -751,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); @@ -866,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; @@ -886,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