From b2278ee7b3934157b2400d75c39957a8885ade9f Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期一, 27 五月 2024 17:34:53 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/verbaltrick/index.vue | 43 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/views/repositoryai/verbaltrick/index.vue b/src/views/repositoryai/verbaltrick/index.vue index eccc72b..fc91097 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> @@ -188,8 +199,8 @@ <el-table-column label="闂鏂囨湰" align="center" - key="questiontext" - prop="questiontext" + key="questionText" + prop="questionText" width="200" :show-overflow-tooltip="true" /> @@ -351,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> @@ -411,7 +422,7 @@ getverbaltricklist, verbaltrickinfo, delverbaltrickinfo, - getverbaltrick, + compileverbaltrickclassify, getillnesslist, illnesslistget, getillness, @@ -597,12 +608,22 @@ 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 && @@ -656,6 +677,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) { -- Gitblit v1.9.3