lw-cdp-ui 1.4.30 → 1.4.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,8 @@
50
50
  }">
51
51
  <span>{{ item.name }}</span>
52
52
  <div :style="{ color: item.value >= 0 ? '#BF1220' : '#00B78B' }">
53
+ <el-icon v-if="item.value >= 0" class="icon-up"><el-icon-top /></el-icon>
54
+ <el-icon v-else class="icon-down"><el-icon-bottom /></el-icon>
53
55
  {{ Math.abs(item.value) }} {{ item.unitName }}
54
56
  </div>
55
57
  </div>
@@ -1,16 +1,21 @@
1
1
  <template>
2
2
  <div class="layout-aside">
3
-
4
3
  <slot name="logo" v-if="unPassport">
5
- <img class="logo" src="../../../assets/images/logo.svg" alt="" @click="openMneu">
4
+ <img class="logo" src="../../../assets/images/logo.svg" alt="" @click="openMneu" />
6
5
  </slot>
7
6
 
8
- <el-popover placement="right" :width="180" trigger="click" :show-arrow="false" :offset="3" popper-class="app-popper"
7
+ <el-popover
8
+ placement="right"
9
+ :width="180"
10
+ trigger="click"
11
+ :show-arrow="false"
12
+ :offset="3"
13
+ popper-class="app-popper"
9
14
  ref="popoverRef">
10
15
  <template #reference>
11
16
  <p>
12
17
  <el-icon class="menu-btn">
13
- <component is="el-icon-grid" />
18
+ <el-icon-grid />
14
19
  </el-icon>
15
20
  </p>
16
21
  </template>
@@ -21,14 +26,13 @@
21
26
  <el-icon-close />
22
27
  </el-icon>
23
28
  </div>
24
- <el-divider style="margin: 5px 0;" />
29
+ <el-divider style="margin: 5px 0" />
25
30
  <template v-if="grantedApplications.length > 0">
26
31
  <div class="menu-item" @click="switchMenu(item)" v-for="item in grantedApplications" :key="item.resourceId">
27
- <i class="iconfont" :class="item.icon" style="margin-right: 5px;"></i>
32
+ <i class="iconfont" :class="item.icon" style="margin-right: 5px"></i>
28
33
  {{ item?.aliasName || item.name }}
29
34
  </div>
30
35
  </template>
31
-
32
36
  </div>
33
37
  </el-popover>
34
38
  </div>
@@ -42,40 +46,40 @@ export default {
42
46
  unPassport: {
43
47
  type: Boolean,
44
48
  default: true
45
- },
49
+ }
46
50
  },
47
51
  data() {
48
52
  return {
49
53
  popVisible: false,
50
- grantedApplications: [],
51
- };
54
+ grantedApplications: []
55
+ }
52
56
  },
53
57
  mounted() {
54
- let { grantedApplications } = this.$tool.data.get('userAuthInfo');
58
+ let { grantedApplications } = this.$tool.data.get('userAuthInfo')
55
59
  this.grantedApplications = grantedApplications
56
- document.addEventListener('click', this.handleDocumentClick);
60
+ document.addEventListener('click', this.handleDocumentClick)
57
61
  },
58
62
  beforeDestroy() {
59
- document.removeEventListener('click', this.handleDocumentClick);
63
+ document.removeEventListener('click', this.handleDocumentClick)
60
64
  },
61
65
  methods: {
62
66
  handleDocumentClick(ev) {
63
- let popover = document.getElementById('popover');
64
- if (this.popVisible && (ev.target !== popover) && !popover.contains(ev.target)) {
65
- this.popVisible = false;
67
+ let popover = document.getElementById('popover')
68
+ if (this.popVisible && ev.target !== popover && !popover.contains(ev.target)) {
69
+ this.popVisible = false
66
70
  }
67
71
  },
68
72
  openMneu() {
69
73
  window.location.href = '/#/passport-application'
70
74
  },
71
75
  switchMenu(menuItem) {
72
- window.location.href = menuItem.url;
76
+ window.location.href = menuItem.url
73
77
  },
74
78
  closePopover() {
75
- this.$refs.popoverRef.hide(); // 关闭 popover
76
- },
79
+ this.$refs.popoverRef.hide() // 关闭 popover
80
+ }
77
81
  }
78
- };
82
+ }
79
83
  </script>
80
84
  <style lang="scss">
81
85
  .layout-aside {
@@ -9,7 +9,6 @@
9
9
  <bu v-if="isShowBu" :isInitialized="isInitialized" />
10
10
  </template>
11
11
 
12
-
13
12
  <el-dropdown class="user panel-item" trigger="click" @command="handleUser">
14
13
  <div class="user-avatar">
15
14
  <el-avatar :size="30" :src="$store.state.user.img || empty"></el-avatar>
@@ -42,7 +41,7 @@
42
41
  import bu from './bu.vue'
43
42
  import task from './task.vue'
44
43
  import empty from '@/assets/images/empty.jpg'
45
- import setting from './setting.vue';
44
+ import setting from './setting.vue'
46
45
  export default {
47
46
  props: {
48
47
  isShowBu: {
@@ -61,7 +60,7 @@ export default {
61
60
  unPassport: {
62
61
  type: Boolean,
63
62
  default: true
64
- },
63
+ }
65
64
  },
66
65
  components: {
67
66
  bu,
@@ -72,12 +71,11 @@ export default {
72
71
  return {
73
72
  empty,
74
73
  settingDialog: false,
75
- userName: "",
76
- userNameF: "",
74
+ userName: '',
75
+ userNameF: '',
77
76
  searchVisible: false,
78
77
  tasksVisible: false,
79
- msg: false,
80
-
78
+ msg: false
81
79
  }
82
80
  },
83
81
  created() {
@@ -86,41 +84,45 @@ export default {
86
84
  methods: {
87
85
  //个人信息
88
86
  handleUser(command) {
89
- if (command == "setting") {
90
- this.settingDialog = true;
87
+ if (command == 'setting') {
88
+ this.settingDialog = true
91
89
  }
92
- if (command == "cmd") {
93
- this.$router.push({ path: '/cmd' });
90
+ if (command == 'cmd') {
91
+ this.$router.push({ path: '/cmd' })
94
92
  }
95
- if (command == "clearCache") {
93
+ if (command == 'clearCache') {
96
94
  this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?', '提示', {
97
- type: 'info',
98
- }).then(() => {
99
- this.$tool.data.clear()
100
-
101
- window.location.href = '/#/passport-login';
102
- }).catch(() => {
103
- //取消
95
+ type: 'info'
104
96
  })
97
+ .then(() => {
98
+ this.$tool.data.clear()
99
+
100
+ window.location.href = '/#/passport-login'
101
+ })
102
+ .catch(() => {
103
+ //取消
104
+ })
105
105
  }
106
- if (command == "outLogin") {
106
+ if (command == 'outLogin') {
107
107
  this.$confirm('确认是否退出当前用户?', '提示', {
108
108
  type: 'warning',
109
109
  confirmButtonText: '退出',
110
110
  confirmButtonClass: 'el-button--danger'
111
- }).then(() => {
112
- this.$store.commit("clearViewTags");
113
- this.$store.commit("clearKeepLive");
114
- this.$store.commit("clearIframeList")
115
- window.location.href = '/#/passport-login';
116
- }).catch(() => {
117
- //取消退出
118
111
  })
112
+ .then(() => {
113
+ this.$store.commit('clearViewTags')
114
+ this.$store.commit('clearKeepLive')
115
+ this.$store.commit('clearIframeList')
116
+ window.location.href = this.$config?.LOGIN_URL || '/#/passport-login'
117
+ })
118
+ .catch(() => {
119
+ //取消退出
120
+ })
119
121
  }
120
122
  },
121
123
  //全屏
122
124
  screen() {
123
- var element = document.documentElement;
125
+ var element = document.documentElement
124
126
  this.$tool.screen(element)
125
127
  },
126
128
  //显示短消息
@@ -75,7 +75,9 @@
75
75
  <div class="aminui-body-menu-top">
76
76
  <div class="left">
77
77
  <Aside class="menu" :unPassport="unPassport"></Aside>
78
- <span class="title">{{ $t('loginPage.accountLogin') }}</span>
78
+ <span class="title">
79
+ <slot name="accountLogin">{{ $t('loginPage.accountLogin') }}</slot>
80
+ </span>
79
81
  </div>
80
82
  <userbar :isShowBu="isShowBu" :isInitialized="isInitialized" :unPassport="unPassport"></userbar>
81
83
  </div>