From a346cfbcb03a303dca252d910d2181f00e7adc20 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期二, 03 九月 2024 10:39:10 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/verbaltrick/index.vue | 246 +++++++++++++++++++++++++++++++++++++----------- 1 files changed, 187 insertions(+), 59 deletions(-) diff --git a/src/views/repositoryai/verbaltrick/index.vue b/src/views/repositoryai/verbaltrick/index.vue index e0fedf6..7dfaf18 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,27 @@ 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 +98,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 +163,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 +198,12 @@ /><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 @@ -266,6 +260,7 @@ <el-table-column label="鎿嶄綔" + fixed="right" align="center" width="250" class-name="small-padding fixed-width" @@ -314,11 +309,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 +338,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 +390,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 +446,9 @@ import { getverbaltricklist, verbaltrickinfo, - delverbaltrickinfo, getverbaltrick, + delverbaltrickinfo, + compileverbaltrickclassify, getillnesslist, illnesslistget, getillness, @@ -437,9 +482,13 @@ total: 0, namequestionnaire: "", haoquestionnaire: "", + topicform: { + scriptContent: "", + }, idds: "", amendtag: false, //鏄惁淇敼绫诲埆 dialogFormVisible: false, //淇敼娣诲姞绫诲埆寮规 + topicVisible: false, //棰勮寮规 indexid: null, inputValue: "", inputVisible: false, @@ -468,7 +517,7 @@ }, ], // 寮瑰嚭灞傛爣棰� - title: "", + title: "鏂板绫诲埆", // 鏄惁鏄剧ず寮瑰嚭灞� open: false, // 鏃ユ湡鑼冨洿 @@ -487,7 +536,8 @@ indexopen: false, //寮规灞曠ず鍚� propss: { multiple: true }, radio: "涓诲垎绫�", - + zufon: true, + zifon: true, usable: [], mode: [], @@ -523,7 +573,7 @@ getverbaltricklist(this.queryParams).then((res) => { this.userList = res.rows; this.loading = false; - this.total=res.total + this.total = res.total; }); }, @@ -575,7 +625,7 @@ handleAdd() { this.$router.push({ path: "/knowledge/verbaltrick/particulars/", - query: { id: "" }, + query: { id: "", categoryid: this.queryParams.categoryid }, }); }, // 鍒嗙被鏍�----------------------------------------- @@ -589,12 +639,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 +674,8 @@ addbaltrickclassify(this.classifyform).then((res) => { this.getDeptTree(); this.$modal.msgSuccess("鏂板鎴愬姛"); + this.classifyform = {}; + this.dialogFormVisible = false; }); }, remove(a, b) { @@ -646,6 +707,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 +740,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 +835,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 +950,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 +988,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