RuoYi il y a 2 ans
Parent
commit
21a17945fa

+ 123 - 109
ruoyi-ui/src/assets/styles/ruoyi.scss

@@ -1,129 +1,143 @@
1
- /**
2
- * 通用css样式布局处理
3
- * Copyright (c) 2019 ruoyi
4
- */
1
+/**
2
+* 通用css样式布局处理
3
+* Copyright (c) 2019 ruoyi
4
+*/
5 5
 
6
- /** 基础通用 **/
6
+/** 基础通用 **/
7 7
 .pt5 {
8
-	padding-top: 5px;
8
+  padding-top: 5px;
9 9
 }
10
+
10 11
 .pr5 {
11
-	padding-right: 5px;
12
+  padding-right: 5px;
12 13
 }
14
+
13 15
 .pb5 {
14
-	padding-bottom: 5px;
16
+  padding-bottom: 5px;
15 17
 }
18
+
16 19
 .mt5 {
17
-	margin-top: 5px;
20
+  margin-top: 5px;
18 21
 }
22
+
19 23
 .mr5 {
20
-	margin-right: 5px;
24
+  margin-right: 5px;
21 25
 }
26
+
22 27
 .mb5 {
23
-	margin-bottom: 5px;
28
+  margin-bottom: 5px;
24 29
 }
30
+
25 31
 .mb8 {
26
-	margin-bottom: 8px;
32
+  margin-bottom: 8px;
27 33
 }
34
+
28 35
 .ml5 {
29
-	margin-left: 5px;
36
+  margin-left: 5px;
30 37
 }
38
+
31 39
 .mt10 {
32
-	margin-top: 10px;
40
+  margin-top: 10px;
33 41
 }
42
+
34 43
 .mr10 {
35
-	margin-right: 10px;
44
+  margin-right: 10px;
36 45
 }
46
+
37 47
 .mb10 {
38
-	margin-bottom: 10px;
48
+  margin-bottom: 10px;
39 49
 }
40 50
 .ml10 {
41 51
 	margin-left: 10px;
42 52
 }
53
+
43 54
 .mt20 {
44
-	margin-top: 20px;
55
+  margin-top: 20px;
45 56
 }
57
+
46 58
 .mr20 {
47
-	margin-right: 20px;
59
+  margin-right: 20px;
48 60
 }
61
+
49 62
 .mb20 {
50
-	margin-bottom: 20px;
63
+  margin-bottom: 20px;
51 64
 }
52 65
 .ml20 {
53 66
 	margin-left: 20px;
54 67
 }
55 68
 
56 69
 .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
57
-	font-family: inherit;
58
-	font-weight: 500;
59
-	line-height: 1.1;
60
-	color: inherit;
70
+  font-family: inherit;
71
+  font-weight: 500;
72
+  line-height: 1.1;
73
+  color: inherit;
61 74
 }
62 75
 
63 76
 .el-message-box__status + .el-message-box__message{
64
-    word-break: break-word;
77
+  word-break: break-word;
65 78
 }
66 79
 
67 80
 .el-dialog:not(.is-fullscreen) {
68
-	margin-top: 6vh !important;
81
+  margin-top: 6vh !important;
69 82
 }
70 83
 
71 84
 .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
72
-    overflow: auto;
73
-	overflow-x: hidden;
74
-	max-height: 70vh;
75
-	padding: 10px 20px 0;
85
+  overflow: auto;
86
+  overflow-x: hidden;
87
+  max-height: 70vh;
88
+  padding: 10px 20px 0;
76 89
 }
77 90
 
78 91
 .el-table {
79
-	.el-table__header-wrapper, .el-table__fixed-header-wrapper {
80
-		th {
81
-			word-break: break-word;
82
-			background-color: #f8f8f9;
83
-			color: #515a6e;
84
-			height: 40px;
85
-			font-size: 13px;
86
-		}
87
-	}
88
-	.el-table__body-wrapper {
89
-		.el-button [class*="el-icon-"] + span {
90
-			margin-left: 1px;
91
-		}
92
-	}
92
+  .el-table__header-wrapper, .el-table__fixed-header-wrapper {
93
+    th {
94
+      word-break: break-word;
95
+      background-color: #f8f8f9;
96
+      color: #515a6e;
97
+      height: 40px;
98
+      font-size: 13px;
99
+    }
100
+  }
101
+
102
+  .el-table__body-wrapper {
103
+    .el-button [class*="el-icon-"] + span {
104
+      margin-left: 1px;
105
+    }
106
+  }
93 107
 }
94 108
 
95 109
 /** 表单布局 **/
96 110
 .form-header {
97
-    font-size:15px;
98
-	color:#6379bb;
99
-	border-bottom:1px solid #ddd;
100
-	margin:8px 10px 25px 10px;
101
-	padding-bottom:5px
111
+  font-size: 15px;
112
+  color: #6379bb;
113
+  border-bottom: 1px solid #ddd;
114
+  margin: 8px 10px 25px 10px;
115
+  padding-bottom: 5px
102 116
 }
103 117
 
104 118
 /** 表格布局 **/
105 119
 .pagination-container {
106
-	position: relative;
107
-	height: 25px;
108
-	margin-bottom: 10px;
109
-	margin-top: 15px;
110
-	padding: 10px 20px !important;
120
+  position: relative;
121
+  height: 25px;
122
+  margin-bottom: 10px;
123
+  margin-top: 15px;
124
+  padding: 10px 20px !important;
111 125
 }
112 126
 
113 127
 /* tree border */
114 128
 .tree-border {
115
-    margin-top: 5px;
116
-    border: 1px solid #e5e6e7;
117
-    background: #FFFFFF none;
118
-    border-radius:4px;
129
+  margin-top: 5px;
130
+  border: 1px solid #e5e6e7;
131
+  background: #FFFFFF none;
132
+  border-radius: 4px;
119 133
 }
120 134
 
121 135
 .pagination-container .el-pagination {
122
-	right: 0;
123
-	position: absolute;
136
+  right: 0;
137
+  position: absolute;
124 138
 }
125 139
 
126
-@media ( max-width : 768px) {
140
+@media (max-width: 768px) {
127 141
   .pagination-container .el-pagination > .el-pagination__jump {
128 142
     display: none !important;
129 143
   }
@@ -133,9 +147,9 @@
133 147
 }
134 148
 
135 149
 .el-table .fixed-width .el-button--mini {
136
-	padding-left: 0;
137
-	padding-right: 0;
138
-	width: inherit;
150
+  padding-left: 0;
151
+  padding-right: 0;
152
+  width: inherit;
139 153
 }
140 154
 
141 155
 /** 表格更多操作下拉样式 */
@@ -145,51 +159,51 @@
145 159
 }
146 160
 
147 161
 .el-table .el-dropdown, .el-icon-arrow-down {
148
-	font-size: 12px;
162
+  font-size: 12px;
149 163
 }
150 164
 
151 165
 .el-tree-node__content > .el-checkbox {
152
-	margin-right: 8px;
166
+  margin-right: 8px;
153 167
 }
154 168
 
155 169
 .list-group-striped > .list-group-item {
156
-	border-left: 0;
157
-	border-right: 0;
158
-	border-radius: 0;
159
-	padding-left: 0;
160
-	padding-right: 0;
170
+  border-left: 0;
171
+  border-right: 0;
172
+  border-radius: 0;
173
+  padding-left: 0;
174
+  padding-right: 0;
161 175
 }
162 176
 
163 177
 .list-group {
164
-	padding-left: 0px;
165
-	list-style: none;
178
+  padding-left: 0px;
179
+  list-style: none;
166 180
 }
167 181
 
168 182
 .list-group-item {
169
-	border-bottom: 1px solid #e7eaec;
170
-	border-top: 1px solid #e7eaec;
171
-	margin-bottom: -1px;
172
-	padding: 11px 0px;
173
-	font-size: 13px;
183
+  border-bottom: 1px solid #e7eaec;
184
+  border-top: 1px solid #e7eaec;
185
+  margin-bottom: -1px;
186
+  padding: 11px 0px;
187
+  font-size: 13px;
174 188
 }
175 189
 
176 190
 .pull-right {
177
-	float: right !important;
191
+  float: right !important;
178 192
 }
179 193
 
180 194
 .el-card__header {
181
-	padding: 14px 15px 7px;
182
-	min-height: 40px;
195
+  padding: 14px 15px 7px;
196
+  min-height: 40px;
183 197
 }
184 198
 
185 199
 .el-card__body {
186
-	padding: 15px 20px 20px 20px;
200
+  padding: 15px 20px 20px 20px;
187 201
 }
188 202
 
189 203
 .card-box {
190
-	padding-right: 15px;
191
-	padding-left: 15px;
192
-	margin-bottom: 10px;
204
+  padding-right: 15px;
205
+  padding-left: 15px;
206
+  margin-bottom: 10px;
193 207
 }
194 208
 
195 209
 /* button color */
@@ -215,63 +229,63 @@
215 229
 
216 230
 /* text color */
217 231
 .text-navy {
218
-	color: #1ab394;
232
+  color: #1ab394;
219 233
 }
220 234
 
221 235
 .text-primary {
222
-	color: inherit;
236
+  color: inherit;
223 237
 }
224 238
 
225 239
 .text-success {
226
-	color: #1c84c6;
240
+  color: #1c84c6;
227 241
 }
228 242
 
229 243
 .text-info {
230
-	color: #23c6c8;
244
+  color: #23c6c8;
231 245
 }
232 246
 
233 247
 .text-warning {
234
-	color: #f8ac59;
248
+  color: #f8ac59;
235 249
 }
236 250
 
237 251
 .text-danger {
238
-	color: #ed5565;
252
+  color: #ed5565;
239 253
 }
240 254
 
241 255
 .text-muted {
242
-	color: #888888;
256
+  color: #888888;
243 257
 }
244 258
 
245 259
 /* image */
246 260
 .img-circle {
247
-	border-radius: 50%;
261
+  border-radius: 50%;
248 262
 }
249 263
 
250 264
 .img-lg {
251
-	width: 120px;
252
-	height: 120px;
265
+  width: 120px;
266
+  height: 120px;
253 267
 }
254 268
 
255 269
 .avatar-upload-preview {
256
-	position: relative;
257
-	top: 50%;
258
-	left: 50%;
259
-	transform: translate(-50%, -50%);
260
-	width: 200px;
261
-	height: 200px;
262
-	border-radius: 50%;
263
-	box-shadow: 0 0 4px #ccc;
264
-	overflow: hidden;
270
+  position: relative;
271
+  top: 50%;
272
+  left: 50%;
273
+  transform: translate(-50%, -50%);
274
+  width: 200px;
275
+  height: 200px;
276
+  border-radius: 50%;
277
+  box-shadow: 0 0 4px #ccc;
278
+  overflow: hidden;
265 279
 }
266 280
 
267 281
 /* 拖拽列样式 */
268
-.sortable-ghost{
269
-	opacity: .8;
270
-	color: #fff!important;
271
-	background: #42b983!important;
282
+.sortable-ghost {
283
+  opacity: .8;
284
+  color: #fff !important;
285
+  background: #42b983 !important;
272 286
 }
273 287
 
274 288
 .top-right-btn {
275
-	position: relative;
276
-	float: right;
289
+  position: relative;
290
+  float: right;
277 291
 }

+ 2 - 1
ruoyi-ui/src/components/FileUpload/index.vue

@@ -173,10 +173,11 @@ export default {
173 173
     },
174 174
     // 获取文件名称
175 175
     getFileName(name) {
176
+      // 如果是url那么取最后的名字 如果不是直接返回
176 177
       if (name.lastIndexOf("/") > -1) {
177 178
         return name.slice(name.lastIndexOf("/") + 1);
178 179
       } else {
179
-        return "";
180
+        return name;
180 181
       }
181 182
     },
182 183
     // 对象转成指定字符串分隔

+ 3 - 3
ruoyi-ui/src/components/ImageUpload/index.vue

@@ -19,7 +19,7 @@
19 19
     >
20 20
       <i class="el-icon-plus"></i>
21 21
     </el-upload>
22
-    
22
+
23 23
     <!-- 上传提示 -->
24 24
     <div class="el-upload__tip" slot="tip" v-if="showTip">
25 25
       请上传
@@ -214,8 +214,8 @@ export default {
214 214
 }
215 215
 
216 216
 ::v-deep .el-list-enter, .el-list-leave-active {
217
-    opacity: 0;
218
-    transform: translateY(0);
217
+  opacity: 0;
218
+  transform: translateY(0);
219 219
 }
220 220
 </style>
221 221
 

+ 12 - 11
ruoyi-ui/src/components/TopNav/index.vue

@@ -5,13 +5,12 @@
5 5
     @select="handleSelect"
6 6
   >
7 7
     <template v-for="(item, index) in topMenus">
8
-      <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
9
-        ><svg-icon
10
-          v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
11
-          :icon-class="item.meta.icon"
12
-        />
13
-        {{ item.meta.title }}</el-menu-item
14
-      >
8
+      <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber">
9
+        <svg-icon
10
+        v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
11
+        :icon-class="item.meta.icon"/>
12
+        {{ item.meta.title }}
13
+      </el-menu-item>
15 14
     </template>
16 15
 
17 16
     <!-- 顶部菜单超出数量折叠 -->
@@ -21,10 +20,12 @@
21 20
         <el-menu-item
22 21
           :index="item.path"
23 22
           :key="index"
24
-          v-if="index >= visibleNumber"
25
-          ><svg-icon :icon-class="item.meta.icon" />
26
-          {{ item.meta.title }}</el-menu-item
27
-        >
23
+          v-if="index >= visibleNumber">
24
+          <svg-icon
25
+            v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
26
+            :icon-class="item.meta.icon"/>
27
+          {{ item.meta.title }}
28
+        </el-menu-item>
28 29
       </template>
29 30
     </el-submenu>
30 31
   </el-menu>

+ 1 - 1
ruoyi-ui/src/directive/permission/hasPermi.js

@@ -2,7 +2,7 @@
2 2
  * v-hasPermi 操作权限处理
3 3
  * Copyright (c) 2019 ruoyi
4 4
  */
5
- 
5
+
6 6
 import store from '@/store'
7 7
 
8 8
 export default {

+ 1 - 1
ruoyi-ui/src/directive/permission/hasRole.js

@@ -2,7 +2,7 @@
2 2
  * v-hasRole 角色权限处理
3 3
  * Copyright (c) 2019 ruoyi
4 4
  */
5
- 
5
+
6 6
 import store from '@/store'
7 7
 
8 8
 export default {

+ 1 - 1
ruoyi-ui/src/layout/components/Navbar.vue

@@ -8,7 +8,7 @@
8 8
     <div class="right-menu">
9 9
       <template v-if="device!=='mobile'">
10 10
         <search id="header-search" class="right-menu-item" />
11
-        
11
+
12 12
         <el-tooltip content="源码地址" effect="dark" placement="bottom">
13 13
           <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
14 14
         </el-tooltip>

+ 1 - 1
ruoyi-ui/src/layout/components/Settings/index.vue

@@ -38,7 +38,7 @@
38 38
         <el-divider/>
39 39
 
40 40
         <h3 class="drawer-title">系统布局配置</h3>
41
-      
41
+
42 42
         <div class="drawer-item">
43 43
           <span>开启 TopNav</span>
44 44
           <el-switch v-model="topNav" class="drawer-switch" />

+ 1 - 1
ruoyi-ui/src/plugins/tab.js

@@ -35,7 +35,7 @@ export default {
35 35
       return store.dispatch('tagsView/delView', router.currentRoute).then(({ visitedViews }) => {
36 36
         const latestView = visitedViews.slice(-1)[0]
37 37
         if (latestView) {
38
-            return router.push(latestView.fullPath)
38
+          return router.push(latestView.fullPath)
39 39
         }
40 40
         return router.push('/');
41 41
       });

+ 6 - 6
ruoyi-ui/src/utils/index.js

@@ -5,12 +5,12 @@ import { parseTime } from './ruoyi'
5 5
  */
6 6
 export function formatDate(cellValue) {
7 7
   if (cellValue == null || cellValue == "") return "";
8
-  var date = new Date(cellValue) 
8
+  var date = new Date(cellValue)
9 9
   var year = date.getFullYear()
10 10
   var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
11
-  var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() 
12
-  var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() 
13
-  var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() 
11
+  var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
12
+  var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
13
+  var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
14 14
   var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
15 15
   return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
16 16
 }
@@ -330,7 +330,7 @@ export function makeMap(str, expectsLowerCase) {
330 330
     ? val => map[val.toLowerCase()]
331 331
     : val => map[val]
332 332
 }
333
- 
333
+
334 334
 export const exportDefault = 'export default '
335 335
 
336 336
 export const beautifierConf = {
@@ -387,4 +387,4 @@ export function camelCase(str) {
387 387
 export function isNumberStr(str) {
388 388
   return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
389 389
 }
390
- 
390
+

+ 3 - 3
ruoyi-ui/src/views/system/operlog/index.vue

@@ -160,7 +160,7 @@
160 160
     />
161 161
 
162 162
     <!-- 操作日志详细 -->
163
-    <el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
163
+    <el-dialog title="操作日志详细" :visible.sync="open" width="800px" append-to-body>
164 164
       <el-form ref="form" :model="form" label-width="100px" size="mini">
165 165
         <el-row>
166 166
           <el-col :span="12">
@@ -182,7 +182,7 @@
182 182
           <el-col :span="24">
183 183
             <el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
184 184
           </el-col>
185
-          <el-col :span="6">
185
+          <el-col :span="8">
186 186
             <el-form-item label="操作状态:">
187 187
               <div v-if="form.status === 0">正常</div>
188 188
               <div v-else-if="form.status === 1">失败</div>
@@ -191,7 +191,7 @@
191 191
           <el-col :span="8">
192 192
             <el-form-item label="消耗时间:">{{ form.costTime }}毫秒</el-form-item>
193 193
           </el-col>
194
-          <el-col :span="10">
194
+          <el-col :span="8">
195 195
             <el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
196 196
           </el-col>
197 197
           <el-col :span="24">

+ 1 - 1
ruoyi-ui/src/views/system/user/authRole.vue

@@ -33,7 +33,7 @@
33 33
         </template>
34 34
       </el-table-column>
35 35
     </el-table>
36
-    
36
+
37 37
     <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
38 38
 
39 39
     <el-form label-width="100px">