From 669a325fc5cb1e9fcfdc2d2f8642763966338cd0 Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期四, 29 八月 2024 18:01:48 +0800
Subject: [PATCH] se-ui

---
 se-ui/src/views/system/role/index.vue |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/se-ui/src/views/system/role/index.vue b/se-ui/src/views/system/role/index.vue
index 3116194..ca99356 100644
--- a/se-ui/src/views/system/role/index.vue
+++ b/se-ui/src/views/system/role/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+  <div :style="styleObject" class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
       <el-form-item label="瑙掕壊鍚嶇О" prop="roleName">
         <el-input
@@ -166,16 +166,20 @@
     />
 
     <!-- 娣诲姞鎴栦慨鏀硅鑹查厤缃璇濇 -->
+    <!--     :wrapperClosable="false"  鐐瑰嚮閬僵灞傛槸鍚﹀彲浠ュ叧闂� Drawer-->
     <el-drawer
       title="淇℃伅淇敼"
       :visible.sync="open"
       direction="rtl"
       custom-class="demo-drawer"
+      size="500px"
       ref="drawer"
       append-to-body
+      :modal="false" 
+      :before-close="cancel"
     >
       <div class="demo-drawer__content">
-        <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
           <el-form-item label="瑙掕壊鍚嶇О" prop="roleName">
             <el-input v-model="form.roleName" placeholder="璇疯緭鍏ヨ鑹插悕绉�" />
           </el-form-item>
@@ -231,12 +235,12 @@
           </el-form-item>
         </el-form>
         <div class="demo-drawer__footer">
-          <!-- <el-button >鍙� 娑�</el-button>
+          <el-button @click="cancel">鍙� 娑�</el-button>
           <el-button
             type="primary"
-            @click="$refs.drawer.closeDrawer()"
+            @click="submitForm"
             :loading="loading"
-          >{{ loading ? '鎻愪氦涓� ...' : '纭� 瀹�' }}</el-button>-->
+          >{{ loading ? '鎻愪氦涓� ...' : '纭� 瀹�' }}</el-button>
         </div>
       </div>
     </el-drawer>
@@ -341,7 +345,18 @@
     </el-dialog>
   </div>
 </template>
-
+<style scoped>
+.demo-drawer__footer {
+  width: 100%;
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  border-top: 1px solid #e8e8e8;
+  padding: 10px 16px;
+  text-align: right;
+  background-color: bfa;
+}
+</style>
 <script>
 import {
   listRole,
@@ -424,6 +439,7 @@
         roleKey: undefined,
         status: undefined
       },
+      styleObject: {},
       // 琛ㄥ崟鍙傛暟
       form: {},
       defaultProps: {
@@ -517,6 +533,7 @@
     // 鍙栨秷鎸夐挳
     cancel() {
       this.open = false;
+      this.styleObject = { width: "100%" };
       this.reset();
     },
     // 鍙栨秷鎸夐挳锛堟暟鎹潈闄愶級
@@ -619,6 +636,7 @@
       this.reset();
       this.getMenuTreeselect();
       this.open = true;
+
       this.title = "娣诲姞瑙掕壊";
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
@@ -629,6 +647,7 @@
       getRole(roleId).then(response => {
         this.form = response.data;
         this.open = true;
+        this.styleObject = { width: "70%" };
         this.$nextTick(() => {
           roleMenu.then(res => {
             let checkedKeys = res.checkedKeys;
@@ -677,6 +696,7 @@
             updateRole(this.form).then(response => {
               this.$modal.msgSuccess("淇敼鎴愬姛");
               this.open = false;
+              this.styleObject = { width: "100%" };
               this.getList();
             });
           } else {
@@ -684,6 +704,7 @@
             addRole(this.form).then(response => {
               this.$modal.msgSuccess("鏂板鎴愬姛");
               this.open = false;
+              this.styleObject = { width: "100%" };
               this.getList();
             });
           }

--
Gitblit v1.9.3