From d9cbb5e4cf6f0423b84b739c52d55f98f3af148a Mon Sep 17 00:00:00 2001 From: heimawl <1785969728@qq.com> Date: 星期二, 13 六月 2023 18:09:24 +0800 Subject: [PATCH] 完成标签管理模块搭建 --- src/views/knowledge/questionnaire/index.vue | 107 +++++++++++++++++++++++++++++++---------------------- 1 files changed, 63 insertions(+), 44 deletions(-) diff --git a/src/views/knowledge/questionnaire/index.vue b/src/views/knowledge/questionnaire/index.vue index 1fac129..824de78 100644 --- a/src/views/knowledge/questionnaire/index.vue +++ b/src/views/knowledge/questionnaire/index.vue @@ -105,18 +105,7 @@ >鏂板</el-button > </el-col> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="medium" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['system:user:edit']" - >淇敼</el-button - > - </el-col> + <el-col :span="1.5"> <el-button type="danger" @@ -202,30 +191,39 @@ <el-button size="medium" type="text" - @click="$router.push('/patient/patient/profile/')" + @click="goQRCode(scope.row)" v-hasPermi="['system:user:edit']" - > <span class="button-text"><i class="el-icon-edit"></i>浜岀淮鐮�</span></el-button + > + <span class="button-text" + ><i class="el-icon-edit"></i>浜岀淮鐮�</span + ></el-button > <el-button size="medium" type="text" @click="ViewQuestionnaire(scope.row)" v-hasPermi="['system:user:edit']" - ><span class="button-textck"><i class="el-icon-edit"></i>鏌ョ湅</span></el-button + ><span class="button-textck" + ><i class="el-icon-edit"></i>鏌ョ湅</span + ></el-button > <el-button size="medium" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']" - ><span class="button-textxg"><i class="el-icon-edit"></i>淇敼</span></el-button + ><span class="button-textxg" + ><i class="el-icon-edit"></i>淇敼</span + ></el-button > <el-button size="medium" type="text" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']" - ><span class="button-textsc"><i class="el-icon-edit"></i>鍒犻櫎</span></el-button + ><span class="button-textsc" + ><i class="el-icon-edit"></i>鍒犻櫎</span + ></el-button > </template> </el-table-column> @@ -346,7 +344,7 @@ </div> </div> <!-- 娣诲姞绫诲埆寮规 --> - <el-dialog title="鏂板绫诲埆" width="30%" :visible.sync="dialogFormVisible"> + <el-dialog width="30%" :visible.sync="dialogFormVisible"> <el-form :model="sidecolumnform"> <el-form-item label="璇疯緭鍏ョ被鍒悕绉�"> <el-input v-model="form.name" autocomplete="off"></el-input> @@ -355,6 +353,15 @@ <div slot="footer" class="dialog-footer"> <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button> <el-button type="primary" @click="submitsidecolumn">纭� 瀹�</el-button> + </div> + </el-dialog> + <!-- 浜岀淮鐮佸睍绀哄脊妗� --> + <el-dialog width="30%" :visible.sync="goQRCodeVisible"> + <div class="qrcode-dialo"> + <div class="qrcode-text"> + {{ namequestionnaire }}<span>{{ haoquestionnaire }}</span> + </div> + <div class="qrcode-img"></div> </div> </el-dialog> </div> @@ -390,6 +397,8 @@ showSearch: true, // 鎬绘潯鏁� total: 0, + namequestionnaire: "", + haoquestionnaire: "", // 鐢ㄦ埛琛ㄦ牸鏁版嵁 userList: [ { @@ -417,6 +426,7 @@ numberlbs: 2, sidecolumnform: {}, //娣诲姞绫诲埆琛ㄥ崟 dialogFormVisible: false, //娣诲姞绫诲埆寮规 + goQRCodeVisible: false, //浜岀淮鐮佸脊妗� sidecolumnval: "", //绫诲埆鎼滅储 propss: { multiple: true }, optionss: [ @@ -561,6 +571,11 @@ this.open = false; this.reset(); }, + goQRCode(row) { + this.goQRCodeVisible = true; + this.namequestionnaire = row.userName; + this.haoquestionnaire = row.nickName; + }, // 琛ㄥ崟閲嶇疆 reset() { this.form = { @@ -600,12 +615,8 @@ }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { - this.reset(); - getUser().then((response) => { - this.postOptions = response.posts; - this.roleOptions = response.roles; - this.open = true; - this.title = "鏂板鎮h��"; + this.$router.push({ + path: "/knowledge/questionnaire/compilequer/", }); }, /** 淇敼鎸夐挳鎿嶄綔 */ @@ -614,18 +625,6 @@ path: "/knowledge/questionnaire/compilequer/", query: { id: "1" }, }); - // this.reset(); - // const userId = row.userId || this.ids; - // getUser(userId).then((response) => { - // this.form = response.data; - // this.postOptions = response.posts; - // this.roleOptions = response.roles; - // this.$set(this.form, "postIds", response.postIds); - // this.$set(this.form, "roleIds", response.roleIds); - // this.open = true; - // this.title = "淇敼鐢ㄦ埛"; - // this.form.password = ""; - // }); }, // 鏌ョ湅闂嵎 ViewQuestionnaire() { @@ -713,6 +712,26 @@ display: center !important; } } +.qrcode-dialo { + text-align: center; + // display: flex; + margin: 20px; + padding: 30px; + background: #edf1f7; + 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); + .qrcode-text { + font-size: 20px; + span { + margin-left: 20px; + } + } + .qrcode-img { + width: 300px; + height: 400px; + } +} ::v-deep.el-tabs--left, .el-tabs--right { overflow: hidden; @@ -746,16 +765,16 @@ font-size: 20px; } } -.button-text{ - color: rgb(70, 204, 238) +.button-text { + color: rgb(70, 204, 238); } -.button-textck{ - color: rgb(39, 167, 67) +.button-textck { + color: rgb(39, 167, 67); } -.button-textxg{ - color: rgb(35, 81, 233) +.button-textxg { + color: rgb(35, 81, 233); } -.button-textsc{ - color: rgb(235, 23, 23) +.button-textsc { + color: rgb(235, 23, 23); } </style> -- Gitblit v1.9.3