Blame view

admin-web-master/src/layout/index.vue 26.7 KB
3f535f30   杨鑫   '初始'
1
  <template>
e65c626a   杨鑫   '改bug'
2
3
  	<div :class="classObj" class="app-wrapper">
  		<div
3c4666ce   杨鑫   '最新'
4
5
6
  			style=" width: 100%; height: 50px; background: #3F9B6A; position: fixed;top:0;left:0;z-index:1001;display: flex;flex-wrap: wrap; margin-bottom: 1px;">
  			<div style="width: 15%;margin-top: 8px;padding-left: 20px;">
  				<img src="../assets/images/logo2.png" alt="" style="height: 36px; object-fit: contain;" />
e65c626a   杨鑫   '改bug'
7
8
9
10
11
12
  			</div>
  			<ul
  				style="display: flex;flex-wrap: wrap;color: white;height: 100%;justify-content: space-around;font-size: 14px;text-align:center;">
  				<li :class="index ==  ins ? 'topList':'weiList'" style="line-height: 55px;height: 100%"
  					v-for="(item,ins) in msg" @click="clk(ins)">{{item}}</li>
  			</ul>
3ea048fb   杨鑫   最新修改
13
14
  			<div style="position: absolute;top:0px;right:0px;display: flex;align-items: center;height: 50px;">
  				<div style="border-radius:20px; width: 110px; height: 30px;background:rgba(255, 255, 255, 0.1);display: flex;flex-flow: row nowrap;justify-content: center;
e65c626a   杨鑫   '改bug'
15
         align-items: center;cursor: pointer;" @click="gzt">
f30d97e1   杨鑫   '最新'
16
17
18
19
20
  					<!-- <el-image src="https://028wlkj.cn:30021/public/static/logos/home-stable.png"
  						style="padding:10px 0;"></el-image> -->
  					<img src="../assets/images/gzt.png" alt=""
  						style="height: 24px;object-fit: contain;width:24px;margin-right:6px;" />
  					<div style="color: #fff;line-height: 20px;font-size:14px">工作台</div>
e65c626a   杨鑫   '改bug'
21
  				</div>
3ea048fb   杨鑫   最新修改
22
23
24
25
  				<div @click="gomsg" style="padding-left: 30px;cursor: pointer;">
  					<img src="../assets/images/msg.png" alt=""
  						style="height: 24px;object-fit: contain;width:24px;margin-right:6px;" />
  				</div>
e65c626a   杨鑫   '改bug'
26
  				<div class="right-menu">
be060284   杨鑫   '最新'
27
  					<div class="avatar-container">
3ea048fb   杨鑫   最新修改
28
  						<div class="avatar-wrapper" style="margin-left: 30px">
e65c626a   杨鑫   '改bug'
29
30
31
  							<img :src="userAvatar" class="user-avatar">
  							<span class="user-name">{{ name }}</span>
  						</div>
be060284   杨鑫   '最新'
32
  					</div>
77959fdb   杨鑫   最新2
33
  
be060284   杨鑫   '最新'
34
35
36
37
38
39
  					<!-- <el-dropdown  trigger="click">
  						<div class="avatar-wrapper" style="margin-left: 20px">
  							<img :src="userAvatar" class="user-avatar">
  							<span class="user-name">{{ name }}</span>
  						</div>
  						<el-dropdown-menu slot="dropdown" class="user-dropdown" >
e65c626a   杨鑫   '改bug'
40
  
f30d97e1   杨鑫   '最新'
41
  							<el-dropdown-item @click.native="changeHead">
3f535f30   杨鑫   '初始'
42
43
44
45
                  <span style="display: block">修改头像</span>
                </el-dropdown-item>
                <el-dropdown-item @click.native="changePwd">
                  <span style="display: block">修改密码</span>
f30d97e1   杨鑫   '最新'
46
                </el-dropdown-item>
3f535f30   杨鑫   '初始'
47
  
e65c626a   杨鑫   '改bug'
48
49
50
51
52
53
54
55
56
57
58
59
60
  							<div class="avatar-wrapper"
  								style="height:100px;padding:0 20px;display:flex;align-items:center;">
  								<img :src="userAvatar" class="user-avatar"
  									style="width:56px;height:56px;border-radius: 50%">
  								<div class="drName" style="color:#000;font-size:16px;margin-left:20px;">{{ name }}</div>
  							</div>
  
  							<el-dropdown-item divided @click.native="logout">
  								<div class="avatar-wrapper listTUI"
  									style="height:40px;display:flex;align-items:center;">
  									<div>退出登录</div>
  								</div>
  							</el-dropdown-item>
be060284   杨鑫   '最新'
61
62
  						</el-dropdown-menu>
  					</el-dropdown> -->
e65c626a   杨鑫   '改bug'
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  				</div>
  				<!--  修改头像  -->
  				<el-dialog title="修改头像" :visible.sync="changeHeadObj.show" width="30%" :modal='false'
  					:before-close="handleHeadClose">
  					<div class="center-content">
  						<el-upload class="avatar-uploader" :data="dataObj" :action="action" :show-file-list="false"
  							:on-success="handleAvatarSuccess">
  							<img v-if="changeHeadObj.data.image" :src="changeHeadObj.data.image" class="avatar"
  								width="160" height="160">
  							<i v-else class="el-icon-plus avatar-uploader-icon" />
  						</el-upload>
  					</div>
  					<span slot="footer" class="dialog-footer">
  						<el-button @click="handleHeadClose">取 消</el-button>
  						<el-button type="primary" @click="HandleChangeHeadSubmit">确 定</el-button>
  					</span>
  				</el-dialog>
  				<!--  修改密码  -->
  				<el-dialog title="修改密码" :visible.sync="changePwdShow" width="30%" :before-close="handleClose"
  					:modal='false'>
  					<el-form ref="ruleForm" :model="ruleForm" status-icon :rules="rules" label-width="100px"
  						class="demo-ruleForm">
  						<el-form-item label="密码" prop="password">
  							<el-input v-model="ruleForm.password" type="password" autocomplete="off" />
  						</el-form-item>
  						<el-form-item label="新密码" prop="newPassword">
  							<el-input v-model="ruleForm.newPassword" type="password" autocomplete="off" />
  						</el-form-item>
  						<el-form-item label="确认密码" prop="confirmPass">
  							<el-input v-model="ruleForm.confirmPass" type="password" autocomplete="off" />
  						</el-form-item>
  					</el-form>
  					<span slot="footer" class="dialog-footer">
  						<el-button @click="handleClose">取 消</el-button>
  						<el-button type="primary" @click="confirmChangePwd">确 定</el-button>
  					</span>
  				</el-dialog>
  
  
  
  
  			</div>
  			<!-- <div style="margin: 12px; 15px 0 10px">
3f535f30   杨鑫   '初始'
106
107
108
109
            <el-badge :value="2" class="item">
             <img src="../../src/assets/images/msg1.png" alt="" style="height: 15px;object-fit: contain;margin: 8px 8px 0 12px;width:16px"/>
            </el-badge>
          </div> -->
e65c626a   杨鑫   '改bug'
110
  			<!-- <div style="position: relative;margin-left:15px">
3f535f30   杨鑫   '初始'
111
112
113
114
115
116
117
118
119
120
121
122
123
            <div class="user-profile">
              <div style="width: 30px;height: 30px;border-radius: 50%;background-color: #2d8a58;margin-right: 10px"></div>
           <div  @click="quit()">
             <span class="username">admin</span>
           </div>
  
            </div>
            <div v-if="quit1" class="yonghu">
              <div style="width: 100%;padding: 10px 0">修改密码</div>
              <div style="width: 100%;padding: 10px 0">退出登录</div>
            </div>
          </div> -->
  
e65c626a   杨鑫   '改bug'
124
  			<!-- <sidebar-item
3f535f30   杨鑫   '初始'
125
126
127
128
129
           v-for="(route, index) in routers"
           :key="index"
           class="tabLink"
           :item="route"
           :base-path="route.path"
084351b6   李宇   1
130
         /> -->
e65c626a   杨鑫   '改bug'
131
  			<!--    <sidebar-item
3f535f30   杨鑫   '初始'
132
133
134
135
136
137
138
          v-for="(route, index) in routers"
          :key="index"
          class="tabLink"
          :item="route"
          :base-path="route.path"
        /> -->
  
e65c626a   杨鑫   '改bug'
139
  		</div>
3f535f30   杨鑫   '初始'
140
  
e65c626a   杨鑫   '改bug'
141
142
143
144
  		<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
  		<sidebar class="sidebar-container" ref="sidebar" :mes="index" :list='listMune' />
  		<div class="main-container">
  			<!-- <div :class="{'fixed-header':fixedHeader}">
3f535f30   杨鑫   '初始'
145
146
               <navbar />
             </div> -->
e65c626a   杨鑫   '改bug'
147
148
149
  			<app-main />
  		</div>
  	</div>
3f535f30   杨鑫   '初始'
150
151
152
  </template>
  
  <script>
e65c626a   杨鑫   '改bug'
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
  	import {
  		Navbar,
  		Sidebar,
  		AppMain
  	} from './components'
  	import ResizeMixin from './mixin/ResizeHandler'
  	import {
  		mapGetters
  	} from 'vuex'
  	import SidebarItem from './components/Sidebar/SidebarItem'
  	import Breadcrumb from '@/components/Breadcrumb'
  	import Hamburger from '@/components/Hamburger'
  	import Screenfull from '@/components/Screenfull'
  	import Search from '@/components/HeaderSearch'
  	import {
  		getToken,
  		getUserAvatar,
  		removeToken,
  		setUserAvatar
  	} from '@/utils/auth'
  	import {
  		changePwd,
  		changeHeader
  	} from '@/api/user'
  	import {
  		uploadUrl
  	} from '@/utils/request'
898bf4a3   杨鑫   '最新'
180
  	// import userData from '@/assets/lockhost.js';
e65c626a   杨鑫   '改bug'
181
  	export default {
e65c626a   杨鑫   '改bug'
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
  		data() {
  			const newPassFn = (rule, value, callback) => {
  				if (value === '') {
  					callback(new Error('请输入新密码'))
  				} else {
  					if (this.ruleForm.newPassword !== '') {
  						this.$refs.ruleForm.validateField('checkPass')
  					}
  					callback()
  				}
  			}
  			const confirmPassFn = (rule, value, callback) => {
  				if (value === '') {
  					callback(new Error('请再次输入密码'))
  				} else if (value !== this.ruleForm.newPassword) {
  					callback(new Error('两次输入密码不一致!'))
  				} else {
  					callback()
  				}
  			}
  			return {
60a10b3f   杨鑫   最新
203
204
  				msg: [],
  				list: [], 
a4bfb5fa   杨鑫   '最新'
205
  				// msg: ['招商服务系统'],
60a10b3f   杨鑫   最新
206
207
208
209
210
211
212
213
  				// msg: ['招商服务系统', '推广策划系统', '在线商城系统', '支付服务模块', '票务'],
  				// list: [
  				// 	['招商资源监测', '商家管理', '商铺租赁服务', '招商方案管理', '招商租赁管理', '广告服务', '轮播图设置', '商户意向管理', '问卷调查','客服服务管理', '系统设置'],
  				// 	['品牌策划', '活动策划', '氛围策划', '媒体推广'],
  				// 	['订单管理', '积分管理', '消息中心', '会员管理', '评论管理', '商品管理', '库存管理', '销售统计', '优惠券管理', '商城商家管理'],
  				// 	['联机交易', '对账处理', '日志管理', '商户服务'],
  				// 	['渠道售票统计分析', '销售额统计分析'],
  				// ],
e65c626a   杨鑫   '改bug'
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
  				listMune: [],
  				mumeList: [],
  				mumeChildren1: [],
  				mumeChildren2: [],
  				mumeChildren3: [],
  				mumeChildren4: [],
  				mumeChildren5: [],
  				index: 0,
  				show: false,
  				quit1: false,
  				device: true,
  				classObj: {},
  				userAvatar: null,
  				changePwdShow: false,
  				changeHeadObj: {
  					show: false,
  					data: {
  						image: null
  					}
  				},
  
  				action: uploadUrl,
  				headers: {
  					'Authorization-admin': getToken()
  				},
  				dataObj: {
  					folderId: 1
  				},
  				ruleForm: {
  					password: '',
  					newPassword: '',
  					confirmPass: ''
  				},
  				name: localStorage.getItem('roleName'),
  				rules: {
  					password: [{
  						required: true,
  						message: '请输入旧密码',
  						trigger: 'blur'
  					}],
  					newPassword: [{
  						required: true,
  						validator: newPassFn,
  						trigger: 'blur'
  					}],
  					confirmPass: [{
  						required: true,
  						validator: confirmPassFn,
  						trigger: 'blur'
  					}]
  				}
  			}
  		},
  		components: {
  			Navbar,
  			Sidebar,
  			AppMain
  		},
  
  		mixins: [ResizeMixin],
  		computed: {
  
  			sidebar() {
  				return this.$store.state.app.sidebar
  			},
  			device() {
  				return this.$store.state.app.device
  			},
  			fixedHeader() {
  				return this.$store.state.settings.fixedHeader
  
  			},
  			classObj() {
  				return {
  					hideSidebar: !this.sidebar.opened,
  					openSidebar: this.sidebar.opened,
  					withoutAnimation: this.sidebar.withoutAnimation,
  					mobile: this.device === 'mobile'
  				}
  			},
  
  
  			// ...mapGetters(['sidebar', 'avatar', 'device'])
  		},
  		created() {
  			this.userAvatar = getUserAvatar()
  		},
  		mounted() {
60a10b3f   杨鑫   最新
302
303
304
305
  			this.getMemu()
  			this.address()
  			this.waibu()
  			// this.neibu()
e65c626a   杨鑫   '改bug'
306
307
308
  		},
  
  		methods: {
f30d97e1   杨鑫   '最新'
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
  			address() {
  				const currentPath = window.location.pathname
  				console.log(window.location.pathname, '地址栏')
  				if (currentPath == '/cdwlMall/branding' || currentPath == '/cdwlMall/promotion' || currentPath ==
  					'/cdwlMall/activityHis' || currentPath == '/cdwlMall/atmosphereHis') {
  					this.clk(1)
  				} else if (currentPath == '/cdwlMall/member' || currentPath == '/cdwlMall/comment' || currentPath ==
  					'/cdwlMall/notice' || currentPath == '/cdwlMall/renovation' || currentPath ==
  					'/cdwlMall/stockControl' || currentPath == '/cdwlMall/order' || currentPath == '/cdwlMall/salesSta' ||
  					currentPath == '/cdwlMall/couponmanagement' || currentPath == '/cdwlMall/shopbus') {
  					this.clk(2)
  				} else if (currentPath == '/cdwlMall/online' || currentPath == '/cdwlMall/reconciliation' || currentPath ==
  					'/cdwlMall/transaction' || currentPath == '/cdwlMall/shopServe') {
  					this.clk(3)
  				} else if (currentPath == '/cdwlMall/analysis' || currentPath == '/cdwlMall/revenue') {
  					this.clk(4)
  				} else {
  					this.clk(0)
  				}
  			},
e65c626a   杨鑫   '改bug'
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
  			waibu() {
  				let list1 = []
  				let list2 = []
  				let list3 = []
  				let list4 = []
  				let list5 = []
  				this.routers.map(item => {
  					if (this.list[0] && this.list[0].length != 0) {
  
  						this.list[0].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									let filteredItem = {
  										...item
  									}
  									let newChildren = item.children.filter(child => {
  										return this.mumeChildren1.includes(child.permissionName);
  									})
  									filteredItem.children = newChildren
  									list1.push(filteredItem)
  								}
  							}
  						})
  					}
  
  					if (this.list[1] && this.list[1].length != 0) {
  						this.list[1].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									let filteredItem = {
  										...item
  									}
  									let newChildren = item.children.filter(child => {
  										return this.mumeChildren2.includes(child.permissionName);
  									})
  									filteredItem.children = newChildren
  									list2.push(filteredItem)
  									// list2.push(item)
  								}
  							}
  						})
  					}
  
  					if (this.list[2] && this.list[2].length != 0) {
  						this.list[2].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									let filteredItem = {
  										...item
  									}
  									let newChildren = item.children.filter(child => {
  										return this.mumeChildren3.includes(child.permissionName);
  									})
  									filteredItem.children = newChildren
  									list3.push(filteredItem)
  									// list3.push(item)
  								}
  							}
  						})
  					}
  
  
  					if (this.list[3] && this.list[3].length != 0) {
  						this.list[3].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									let filteredItem = {
  										...item
  									}
  									let newChildren = item.children.filter(child => {
  										return this.mumeChildren4.includes(child.permissionName);
  									})
  									filteredItem.children = newChildren
  									list4.push(filteredItem)
  									// list4.push(item)
  								}
  							}
  						})
  					}
  
  					if (this.list[4] && this.list[4].length != 0) {
  						this.list[4].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									let filteredItem = {
  										...item
  									}
  									let newChildren = item.children.filter(child => {
  										return this.mumeChildren5.includes(child.permissionName);
  									})
  									filteredItem.children = newChildren
  									list5.push(filteredItem)
  									// list5.push(item)
  								}
  							}
  						})
  					}
  
  				})
  
  				this.$nextTick(() => {
  
  					this.listMune.push(list1)
  					this.listMune.push(list2)
  					this.listMune.push(list3)
  					this.listMune.push(list4)
  					this.listMune.push(list5)
  				});
  
  			},
  			neibu() {
  				let list1 = []
  				let list2 = []
  				let list3 = []
  				let list4 = []
  				let list5 = []
  				this.routers.map(item => {
  					if (this.list[0] && this.list[0].length != 0) {
  
  						this.list[0].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									list1.push(item)
  								}
  							}
  						})
  					}
  
  					if (this.list[1] && this.list[1].length != 0) {
  						this.list[1].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									list2.push(item)
  								}
  							}
  						})
  					}
  
  					if (this.list[2] && this.list[2].length != 0) {
  						this.list[2].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									list3.push(item)
  								}
  							}
  						})
  					}
  
  
  					if (this.list[3] && this.list[3].length != 0) {
  						this.list[3].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									list4.push(item)
  								}
  							}
  						})
  					}
  
  					if (this.list[4] && this.list[4].length != 0) {
  						this.list[4].map(el => {
  							if (item.meta) {
  								if (item.meta.title == el) {
  									list5.push(item)
  								}
  							}
  						})
  					}
  
  				})
  
  				this.$nextTick(() => {
  
  					this.listMune.push(list1)
  					this.listMune.push(list2)
  					this.listMune.push(list3)
  					this.listMune.push(list4)
  					this.listMune.push(list5)
  				});
  				this.list[0] = list1
  				this.list[1] = list2
  				this.list[2] = list3
  				this.list[3] = list4
  				this.list[4] = list5
  
  			},
  			getMemu() {
898bf4a3   杨鑫   '最新'
516
  				// console.log(userData, 'userData')
f30d97e1   杨鑫   '最新'
517
  
8d583060   杨鑫   '最新'
518
519
520
521
522
  				let userData = JSON.parse(localStorage.getItem('user'));
  				if (!userData) {
  					window.location.href = 'https://admin-uat.028wlkj.com:1020/login'
  					// window.location.href = 'http://128.10.9.151:5173/home'
  				}
f30d97e1   杨鑫   '最新'
523
524
525
526
527
528
529
530
531
532
  				const protocol = window.location.protocol; // 获取协议,如 'https:'
  				const host = window.location.host; // 获取域名和端口,如 'zhgw.028wlkj.com:20443'
  				let baseUrl = protocol + '//' + host;
  				if (userData.user.avatar != null) {
  					this.userAvatar = baseUrl + '/cdwlImg' + userData.user.avatar
  				} else {
  					this.userAvatar = 'https://ykjc.028wlkj.com:50443/publicImg/user_img.png'
  				}
  				localStorage.setItem('roleName', userData.user.name)
  				this.name = userData.user.name
e65c626a   杨鑫   '改bug'
533
534
535
536
537
538
539
540
541
  				let ArrLu = []
  				let ArrChildren = []
  				let ArrziChildren1 = []
  				let ArrziChildren2 = []
  				let ArrziChildren3 = []
  				let ArrziChildren4 = []
  				let ArrziChildren5 = []
  				userData.menuList.map(item => {
  					if (item.id == '9001104') {
e65c626a   杨鑫   '改bug'
542
543
  						let liArr = []
  						ArrLu.push(item.name)
f30d97e1   杨鑫   '最新'
544
  						if (item.children !=null) {
e65c626a   杨鑫   '改bug'
545
  							item.children.map((el, index) => {
f30d97e1   杨鑫   '最新'
546
547
548
549
550
551
  								if ( el.children != null) {
  									for (let i = 0; i < el.children.length; i++) {
  										const child = el.children[i]
  										if (child.name) {
  											ArrziChildren1.push(child.name)
  										}
e65c626a   杨鑫   '改bug'
552
  									}
f30d97e1   杨鑫   '最新'
553
  									liArr.push(el.name)
e65c626a   杨鑫   '改bug'
554
  								}
e65c626a   杨鑫   '改bug'
555
556
557
558
559
560
561
  							})
  							ArrChildren.push(liArr)
  
  						}
  					} else if (item.id == '9001105') {
  						let liArr = []
  						ArrLu.push(item.name)
f30d97e1   杨鑫   '最新'
562
  						if ( item.children !=null) {
e65c626a   杨鑫   '改bug'
563
  							item.children.map((el, index) => {
f30d97e1   杨鑫   '最新'
564
565
566
567
568
569
  								if ( el.children != null) {
  									for (let i = 0; i < el.children.length; i++) {
  										const child = el.children[i]
  										if (child.name) {
  											ArrziChildren2.push(child.name)
  										}
e65c626a   杨鑫   '改bug'
570
  									}
f30d97e1   杨鑫   '最新'
571
  									liArr.push(el.name)
e65c626a   杨鑫   '改bug'
572
  								}
f30d97e1   杨鑫   '最新'
573
  
e65c626a   杨鑫   '改bug'
574
575
576
577
578
579
580
  							})
  							ArrChildren.push(liArr)
  
  						}
  					} else if (item.id == '9001106') {
  						let liArr = []
  						ArrLu.push(item.name)
f30d97e1   杨鑫   '最新'
581
  						if ( item.children !=null) {
e65c626a   杨鑫   '改bug'
582
  							item.children.map((el, index) => {
f30d97e1   杨鑫   '最新'
583
  							if ( el.children != null) {
e65c626a   杨鑫   '改bug'
584
585
586
587
588
589
590
  								for (let i = 0; i < el.children.length; i++) {
  									const child = el.children[i]
  									if (child.name) {
  										ArrziChildren3.push(child.name)
  									}
  								}
  								liArr.push(el.name)
f30d97e1   杨鑫   '最新'
591
  							}
e65c626a   杨鑫   '改bug'
592
593
594
595
596
597
  							})
  							ArrChildren.push(liArr)
  						}
  					} else if (item.id == '9001107') {
  						let liArr = []
  						ArrLu.push(item.name)
f30d97e1   杨鑫   '最新'
598
  						if ( item.children !=null) {
e65c626a   杨鑫   '改bug'
599
  							item.children.map((el, index) => {
f30d97e1   杨鑫   '最新'
600
601
602
603
604
605
  								if ( el.children != null) {
  									for (let i = 0; i < el.children.length; i++) {
  										const child = el.children[i]
  										if (child.name) {
  											ArrziChildren4.push(child.name)
  										}
e65c626a   杨鑫   '改bug'
606
  									}
f30d97e1   杨鑫   '最新'
607
  									liArr.push(el.name)
e65c626a   杨鑫   '改bug'
608
  								}
e65c626a   杨鑫   '改bug'
609
610
611
612
613
614
615
  							})
  							ArrChildren.push(liArr)
  
  						}
  					} else if (item.id == '9001108') {
  						let liArr = []
  						ArrLu.push(item.name)
f30d97e1   杨鑫   '最新'
616
  						if ( item.children !=null) {
e65c626a   杨鑫   '改bug'
617
  							item.children.map((el, index) => {
f30d97e1   杨鑫   '最新'
618
  							if ( el.children != null) {
e65c626a   杨鑫   '改bug'
619
620
621
622
623
624
625
  								for (let i = 0; i < el.children.length; i++) {
  									const child = el.children[i]
  									if (child.name) {
  										ArrziChildren5.push(child.name)
  									}
  								}
  								liArr.push(el.name)
f30d97e1   杨鑫   '最新'
626
  							}
e65c626a   杨鑫   '改bug'
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
  							})
  							ArrChildren.push(liArr)
  						}
  					}
  				})
  				this.mumeList = ArrChildren
  				this.list = ArrChildren
  				this.mumeChildren1 = ArrziChildren1
  				this.mumeChildren2 = ArrziChildren2
  				this.mumeChildren3 = ArrziChildren3
  				this.mumeChildren4 = ArrziChildren4
  				this.mumeChildren5 = ArrziChildren5
  				this.msg = ArrLu
  
  			},
  			// toggleSideBar() {
  			//   this.$store.dispatch('app/toggleSideBar')
  			// },
  			// 更换头像
  			changeHead() {
  				this.changeHeadObj.show = true
  				this.changeHeadObj.data.image = this.userAvatar
  			},
  			// 提交更换头像
  			async HandleChangeHeadSubmit() {
  				if (!this.changeHeadObj.data.image) return this.$message.error('请先上传头像')
  				const postData = {
  					avatar: this.changeHeadObj.data.image,
  					name: '更换'
  				}
  				await changeHeader(postData)
  				this.$message.success('更换成功')
  				setUserAvatar(postData.avatar)
  				this.userAvatar = postData.avatar
  				this.handleHeadClose()
  			},
  			handleAvatarSuccess(data) {
  				if (!data.data.url) return this.$message.error('上传失败,请稍后重试')
  				this.changeHeadObj.data.image = data.data.url
  			},
  			handleHeadClose() {
  				this.changeHeadObj.data.image = null
  				this.changeHeadObj.show = false
  			},
  			changePwd() {
  				this.ruleForm.newPassword = ''
  				this.ruleForm.password = ''
  				this.ruleForm.confirmPass = ''
  				this.changePwdShow = true
  			},
  			// 修改密码
  			confirmChangePwd() {
  				this.$refs.ruleForm.validate(valid => {
  					if (valid) {
  						const obj = {
  							password: this.ruleForm.password,
  							newPassword: this.ruleForm.newPassword
  						}
  						changePwd(obj).then(res => {
  							if (res.code === '') {
  								this.changePwdShow = false
  								this.$message({
  									message: '修改成功,请重新登录!',
  									type: 'success'
  								})
  								this.$nextTick(() => {
  									this.$refs['ruleForm'].clearValidate()
  								})
  								setTimeout(() => {
  									localStorage.clear()
  									removeToken()
  									this.$router.push(`/login?redirect=${this.$route.fullPath}`)
  								}, 2000)
  							}
  						}).catch(() => {})
  					} else {
  						console.log('error submit!!')
  						return false
  					}
  				})
  			},
  			handleClose() {
  				this.changePwdShow = false
  				this.$nextTick(() => {
  					this.$refs['ruleForm'].clearValidate()
  				})
  			},
  			async logout() {
  				localStorage.clear()
  				removeToken()
  				this.$router.push(`/login?redirect=${this.$route.fullPath}`)
  			},
  
  			gzt() {
  
  				// window.location.href = 'https://admin-uat.028wlkj.com:1020/application-manage'
77959fdb   杨鑫   最新2
723
  				window.location.href = 'https://zhgw-uat.028wlkj.com/home'
be060284   杨鑫   '最新'
724
  				// window.location.href = 'http://128.10.9.151:5173/home'
77959fdb   杨鑫   最新2
725
  
e65c626a   杨鑫   '改bug'
726
727
  
  			},
3ea048fb   杨鑫   最新修改
728
729
730
  			gomsg(){
  				window.location.href = 'https://zhgw-uat.028wlkj.com/cdwlOa/systemMessages'
  			},
e65c626a   杨鑫   '改bug'
731
732
733
734
  			findMatchingNames(List, msg) {
  				return List.filter((item) => msg.includes(item.name))
  			},
  			findMatchingValues(tree1, tree2) {
25e99daf   杨鑫   '最新'
735
  				let result = []
e65c626a   杨鑫   '改bug'
736
737
738
739
740
741
742
743
744
745
  				tree1.forEach((item1) => {
  					tree2.forEach((item2) => {
  						if (item1 === item2.name) {
  							result.push(item2);
  						}
  
  						// if (item1.children && item1.children.length > 0 && item2.children && item2.children.length > 0) {
  						//   const childrenResult = findMatchingValues(item1.children, item2.children);
  						//   result = result.concat(childrenResult);
  						// }
87726dd1   杨鑫   '最新'
746
747
  					})
  				})
e65c626a   杨鑫   '改bug'
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
  
  				return result;
  			},
  			find(tree1, tree2) {
  				let result = [];
  
  				tree1.forEach((item1) => {
  					tree2.forEach((item2) => {
  						if (item1.meta.title === item2.name) {
  							result.push(item2);
  						}
  
  						if (item1.children && item1.children.length > 0 && item2.children && item2.children
  							.length > 0) {
  							const childrenResult = find(item1.children, item2.children);
  							result = result.concat(childrenResult);
  						}
  					});
  				});
  
  				return result;
  			},
  
  
  			quit() {
  				if (!this.quit1) {
  					this.quit1 = true
  				} else {
  					this.quit1 = false
  				}
  			},
  			clk(index) {
  				this.index = index
  				this.listMune = []
59e07aed   杨鑫   '修改bug'
782
783
784
785
786
787
788
  				this.list = [
  					['招商资源监测', '商家管理', '商铺租赁服务', '招商方案管理', '招商租赁管理', '广告服务', '轮播图设置', '商户意向管理', '问卷调查','客服服务管理', '系统设置'],
  					['品牌策划', '活动策划', '氛围策划', '媒体推广'],
  					['订单管理', '积分管理', '消息中心', '会员管理', '评论管理', '商品管理', '库存管理', '销售统计', '优惠券管理', '商城商家管理'],
  					['联机交易', '对账处理', '日志管理', '商户服务'],
  					['渠道售票统计分析', '销售额统计分析'],
  				]
60a10b3f   杨鑫   最新
789
  				// this.neibu()
59e07aed   杨鑫   '修改bug'
790
791
  
  
60a10b3f   杨鑫   最新
792
793
794
  				this.getMemu()
  				this.waibu()
  				this.list = this.mumeList
3f950a0f   wesley88   1
795
  				 
77959fdb   杨鑫   最新2
796
  
e65c626a   杨鑫   '改bug'
797
798
799
800
801
802
803
804
805
806
807
808
809
810
  			},
  			handleClickOutside() {
  				this.$store.dispatch('app/closeSideBar', {
  					withoutAnimation: false
  				})
  			}
  		},
  		computed: {
  			...mapGetters([
  				'sidebar',
  				'routers'
  			]),
  		}
  	}
3f535f30   杨鑫   '初始'
811
812
813
  </script>
  
  <style lang="scss" scoped>
e65c626a   杨鑫   '改bug'
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
  	@import "~@/styles/mixin.scss";
  	@import "~@/styles/variables.scss";
  
  	.app-wrapper {
  		@include clearfix;
  		position: relative;
  		height: 100%;
  		width: 100%;
  
  		&.mobile.openSidebar {
  			position: fixed;
  			top: 0;
  		}
  	}
  
  	.drawer-bg {
  		background: #000;
  		opacity: 0.3;
  		width: 100%;
  		top: 0;
  		height: 100%;
  		position: absolute;
  		z-index: 999;
  	}
  
  	.fixed-header {
  		position: fixed;
  		top: 0;
  		right: 0;
  		z-index: 9;
  		width: calc(100% - #{$sideBarWidth});
  		transition: width 0.28s;
  	}
  
  	.hideSidebar .fixed-header {
  		width: calc(100% - 54px)
  	}
  
  	.mobile .fixed-header {
  		width: 100%;
  	}
  
  	.sidebar-container {
  		margin-top: 50px;
  	}
  
  	.main-container {
  		// margin-top: 50px;
  		position: fixed;
  		right: 0;
  		top: 50px;
  	}
  
  	.topList {
  		position: relative;
  		width: 100px;
  		font-size: 14px;
  	}
  
  	.topList::after {
  		content: '';
  		position: absolute;
  		left: 28px;
  		right: 0;
  		bottom: -4px;
  		height: 8px;
  		width: 50%;
  		background: #fff;
  		transform: scaleY(0.5);
  		transform-origin: 0 0;
  	}
  
  	.weiList {
  		position: relative;
  		width: 100px;
  		font-size: 14px;
  	}
  
  	.weiList::after {
  		content: '';
  		position: absolute;
  		left: 28px;
  		right: 0;
  		bottom: -4px;
  		height: 8px;
  		width: 50%;
  		background: #3f9B6A;
  		transform: scaleY(0.5);
  		transform-origin: 0 0;
  	}
  
  	::v-deep .el-badge__content.is-fixed.is-dot {
  		left: -18px;
  		top: 6px;
  		width: 7px;
  		height: 7px;
  		border-radius: 50%;
  	}
  
  	.el-badge {
  		::v-deep .el-badge__content {
  			margin-top: 9px;
  			margin-right: 7px;
  		}
  	}
  
  	.user-profile {
  		display: flex;
  		align-items: center;
  		margin-top: 10px;
  	}
  
  
  	.yonghu {
  		text-align: center;
  		width: 100px;
  		background-color: #fff;
  		position: absolute;
  		top: 50px;
  		left: 0;
  	}
  
  	.username {
  		color: #fff
  	}
  
  	.breadcrumb-container {
  		float: left;
  	}
  
  	.right-menu {
  		float: right;
3ea048fb   杨鑫   最新修改
946
947
  		height: 50px;
  		// line-height: 40px;
e65c626a   杨鑫   '改bug'
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
  
  		&:focus {
  			outline: none;
  		}
  
  		.right-menu-item {
  			display: inline-block;
  			padding: 0 8px;
  			height: 100%;
  			font-size: 18px;
  			color: #5a5e66;
  			vertical-align: text-bottom;
  
  			&.hover-effect {
  				cursor: pointer;
  				transition: background 0.3s;
  
  				&:hover {
  					background: rgba(0, 0, 0, 0.025);
  				}
  			}
  		}
  
  		.avatar-container {
  			margin-right: 30px;
  
  			.avatar-wrapper {
  				margin-top: 5px;
  				// padding:20px;
  				position: relative;
  
  				.user-avatar {
  					cursor: pointer;
  					width: 30px;
  					height: 30px;
  					border-radius: 50%;
  					margin-top: 5px
  				}
  
  				.el-icon-caret-bottom {
  					cursor: pointer;
  					position: absolute;
  					right: -20px;
  					top: 25px;
  					font-size: 12px;
  				}
  			}
  		}
  	}
  
  
  	.user-name {
  		vertical-align: top;
  		font-size: 14px;
  		margin-left: 5px;
3ea048fb   杨鑫   最新修改
1003
  		// margin-top: -4px;
e65c626a   杨鑫   '改bug'
1004
  		display: inline-block;
3ea048fb   杨鑫   最新修改
1005
  		line-height: 40px;
e65c626a   杨鑫   '改bug'
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
  		color: #fff
  	}
  
  	.el-icon-plus {
  		width: 160px;
  		height: 160px;
  		display: flex;
  		align-items: center;
  		justify-content: center;
  		border: 1px solid #a1a0a0;
  		border-radius: 5px;
  	}
  
  	.center-content {
  		display: flex;
  		align-items: center;
  		justify-content: center;
  	}
  
  	::v-deep .el-submenu__icon-arrow {
  		position: absolute;
  		top: 50%;
  		right: 10px;
  		margin-top: -7px;
  	}
  
  	.user-dropdown {
  		width: 340px;
  	}
  
  	.el-popper {
  		margin-top: 0px;
  	}
  
  	.el-dropdown-menu__item--divided:before {
  		height: 0px;
  	}
  
  	.drName:hover {
  		color: #3f9b6a;
  	}
  
  	.el-dropdown-menu__item:focus,
  	.el-dropdown-menu__item:not(.is-disabled):hover {
  		background-color: #ecf5f0;
  		color: #3f9b6a;
  	}
  
  	.el-menu {
  		padding: 12px 0;
  	}
77959fdb   杨鑫   最新2
1057
  </style>