vue2-client 1.18.54 → 1.18.56

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.
Files changed (93) hide show
  1. package/.claude/settings.local.json +28 -28
  2. package/.eslintrc.js +74 -74
  3. package/Components.md +60 -60
  4. package/docs/index.md +30 -30
  5. package/index.js +31 -31
  6. package/jest-transform-stub.js +8 -8
  7. package/jest.setup.js +7 -7
  8. package/package.json +1 -1
  9. package/src/assets/img/querySlotDemo.svg +15 -15
  10. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  11. package/src/base-client/components/common/CitySelect/index.js +3 -3
  12. package/src/base-client/components/common/CitySelect/index.md +109 -109
  13. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
  14. package/src/base-client/components/common/CreateQuery/index.js +3 -3
  15. package/src/base-client/components/common/CreateQuery/index.md +42 -42
  16. package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
  17. package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
  18. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  19. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  20. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
  21. package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
  22. package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
  23. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  24. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
  25. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  26. package/src/base-client/components/common/Tree/Tree.vue +149 -149
  27. package/src/base-client/components/common/Tree/index.js +2 -2
  28. package/src/base-client/components/common/Upload/index.js +3 -3
  29. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  30. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  31. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  32. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  33. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  34. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  35. package/src/base-client/components/common/XDescriptions/index.md +322 -322
  36. package/src/base-client/components/common/XForm/index.md +178 -178
  37. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  38. package/src/base-client/components/common/XStepView/index.js +3 -3
  39. package/src/base-client/components/common/XStepView/index.md +31 -31
  40. package/src/base-client/components/common/XTable/XTable.vue +1715 -1715
  41. package/src/base-client/components/common/XTable/XTableWrapper.vue +786 -786
  42. package/src/base-client/components/common/XTable/index.md +255 -255
  43. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  44. package/src/base-client/plugins/Config.js +19 -19
  45. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  46. package/src/components/Charts/Bar.vue +62 -62
  47. package/src/components/Charts/ChartCard.vue +134 -134
  48. package/src/components/Charts/Liquid.vue +67 -67
  49. package/src/components/Charts/MiniArea.vue +39 -39
  50. package/src/components/Charts/MiniBar.vue +39 -39
  51. package/src/components/Charts/MiniProgress.vue +75 -75
  52. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  53. package/src/components/Charts/Radar.vue +68 -68
  54. package/src/components/Charts/RankList.vue +77 -77
  55. package/src/components/Charts/TagCloud.vue +113 -113
  56. package/src/components/Charts/TransferBar.vue +64 -64
  57. package/src/components/Charts/Trend.vue +82 -82
  58. package/src/components/Charts/chart.less +12 -12
  59. package/src/components/Charts/smooth.area.less +13 -13
  60. package/src/components/HeightScanner/index.vue +2 -2
  61. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  62. package/src/components/NumberInfo/index.js +3 -3
  63. package/src/components/NumberInfo/index.less +54 -54
  64. package/src/components/NumberInfo/index.md +43 -43
  65. package/src/components/card/ChartCard.vue +79 -79
  66. package/src/components/chart/Bar.vue +60 -60
  67. package/src/components/chart/MiniArea.vue +67 -67
  68. package/src/components/chart/MiniBar.vue +59 -59
  69. package/src/components/chart/MiniProgress.vue +57 -57
  70. package/src/components/chart/Radar.vue +80 -80
  71. package/src/components/chart/RankingList.vue +60 -60
  72. package/src/components/chart/Trend.vue +79 -79
  73. package/src/components/chart/index.less +9 -9
  74. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  75. package/src/components/input/IInput.vue +66 -66
  76. package/src/components/menu/SideMenu.vue +75 -75
  77. package/src/components/menu/menu.js +273 -273
  78. package/src/components/tool/AStepItem.vue +60 -60
  79. package/src/components/xScrollBox/index.vue +19 -8
  80. package/src/layouts/CommonLayout.vue +56 -56
  81. package/src/layouts/header/HeaderNotice.vue +177 -177
  82. package/src/lib.js +1 -1
  83. package/src/mock/extend/index.js +84 -84
  84. package/src/mock/goods/index.js +108 -108
  85. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  86. package/src/pages/system/dictionary/index.vue +44 -44
  87. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  88. package/src/pages/system/monitor/operLog/index.vue +37 -37
  89. package/src/services/api/cas.js +79 -79
  90. package/src/store/modules/setting.js +119 -119
  91. package/src/utils/authority-utils.js +85 -85
  92. package/src/utils/errorCode.js +6 -6
  93. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
@@ -5,21 +5,32 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
+ import { isMicroAppEnv } from '@vue2-client/utils/microAppUtils'
9
+
8
10
  export default {
9
11
  name: 'XScrollBox',
10
- data () {
12
+ data() {
11
13
  return {
12
14
  scrollBoxRef: null
13
15
  }
14
16
  },
15
17
  computed: {
16
18
  // 判断当前是否为 blank 模式
17
- isBlankMode () {
19
+ isBlankMode() {
18
20
  return process.env.VUE_APP_SINGLE_PAPER === 'TRUE'
19
21
  },
20
- computedStyle () {
22
+ computedStyle() {
21
23
  if (this.isBlankMode) {
22
- // blank 模式下使用 100%
24
+ // blank 模式下,如果是微应用环境,使用父级 CSS 变量
25
+ if (isMicroAppEnv()) {
26
+ return {
27
+ height: 'var(--parent-scroll-height, 100%)',
28
+ maxHeight: 'var(--parent-scroll-height, 100%)',
29
+ minHeight: 'var(--parent-scroll-height, 100%)',
30
+ overflow: 'auto'
31
+ }
32
+ }
33
+ // 非微应用环境使用 100%
23
34
  return {
24
35
  height: '100%',
25
36
  maxHeight: '100%',
@@ -36,7 +47,7 @@ export default {
36
47
  }
37
48
  }
38
49
  },
39
- mounted () {
50
+ mounted() {
40
51
  // 获取滚动容器引用
41
52
  this.scrollBoxRef = this.$el
42
53
  },
@@ -45,7 +56,7 @@ export default {
45
56
  * 滚动到顶部
46
57
  * @param {boolean} smooth - 是否平滑滚动,默认 true
47
58
  */
48
- scrollToTop (smooth = true) {
59
+ scrollToTop(smooth = true) {
49
60
  if (this.scrollBoxRef) {
50
61
  this.scrollBoxRef.scrollTo({
51
62
  top: 0,
@@ -61,7 +72,7 @@ export default {
61
72
  * @param {number} left - 水平位置,默认 0
62
73
  * @param {boolean} smooth - 是否平滑滚动,默认 true
63
74
  */
64
- scrollTo (top, left = 0, smooth = true) {
75
+ scrollTo(top, left = 0, smooth = true) {
65
76
  if (this.scrollBoxRef) {
66
77
  this.scrollBoxRef.scrollTo({
67
78
  top,
@@ -75,7 +86,7 @@ export default {
75
86
  * 获取当前滚动位置
76
87
  * @returns {Object} - { scrollTop, scrollLeft }
77
88
  */
78
- getScrollPosition () {
89
+ getScrollPosition() {
79
90
  if (this.scrollBoxRef) {
80
91
  return {
81
92
  scrollTop: this.scrollBoxRef.scrollTop,
@@ -1,56 +1,56 @@
1
- <template>
2
- <div class="common-layout">
3
- <div class="top"><a class="clearCacheBtn" @click="clearCache">清除缓存</a></div>
4
- <div class="content"><slot></slot></div>
5
- <page-footer :link-list="footerLinks" :copyright="copyright" :copyrightStyle="copyrightStyle"></page-footer>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- import PageFooter from '@vue2-client/layouts/footer/PageFooter'
11
- import { mapState } from 'vuex'
12
- import { indexedDB } from '@vue2-client/utils/indexedDB'
13
-
14
- export default {
15
- name: 'CommonLayout',
16
- components: { PageFooter },
17
- computed: {
18
- ...mapState('setting', ['footerLinks', 'copyright', 'copyrightStyle'])
19
- },
20
- methods: {
21
- clearCache () {
22
- indexedDB.clearCache()
23
- }
24
- }
25
- }
26
- </script>
27
-
28
- <style scoped lang="less">
29
- .common-layout{
30
- display: flex;
31
- flex-direction: column;
32
- height: 100vh;
33
- overflow: auto;
34
- background-color: @layout-body-background;
35
- background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
36
- background-repeat: no-repeat;
37
- background-position-x: center;
38
- background-position-y: 110px;
39
- background-size: 100%;
40
- .top {
41
- padding: 5px 10px;
42
- text-align: right;
43
- .clearCacheBtn {
44
- color: #fff !important;
45
- }
46
- }
47
- .content{
48
- padding: 32px 0;
49
- flex: 1;
50
- @media (min-width: 768px){
51
-
52
- padding: 112px 0 24px;
53
- }
54
- }
55
- }
56
- </style>
1
+ <template>
2
+ <div class="common-layout">
3
+ <div class="top"><a class="clearCacheBtn" @click="clearCache">清除缓存</a></div>
4
+ <div class="content"><slot></slot></div>
5
+ <page-footer :link-list="footerLinks" :copyright="copyright" :copyrightStyle="copyrightStyle"></page-footer>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ import PageFooter from '@vue2-client/layouts/footer/PageFooter'
11
+ import { mapState } from 'vuex'
12
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
13
+
14
+ export default {
15
+ name: 'CommonLayout',
16
+ components: { PageFooter },
17
+ computed: {
18
+ ...mapState('setting', ['footerLinks', 'copyright', 'copyrightStyle'])
19
+ },
20
+ methods: {
21
+ clearCache () {
22
+ indexedDB.clearCache()
23
+ }
24
+ }
25
+ }
26
+ </script>
27
+
28
+ <style scoped lang="less">
29
+ .common-layout{
30
+ display: flex;
31
+ flex-direction: column;
32
+ height: 100vh;
33
+ overflow: auto;
34
+ background-color: @layout-body-background;
35
+ background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
36
+ background-repeat: no-repeat;
37
+ background-position-x: center;
38
+ background-position-y: 110px;
39
+ background-size: 100%;
40
+ .top {
41
+ padding: 5px 10px;
42
+ text-align: right;
43
+ .clearCacheBtn {
44
+ color: #fff !important;
45
+ }
46
+ }
47
+ .content{
48
+ padding: 32px 0;
49
+ flex: 1;
50
+ @media (min-width: 768px){
51
+
52
+ padding: 112px 0 24px;
53
+ }
54
+ }
55
+ }
56
+ </style>
@@ -1,177 +1,177 @@
1
- <template>
2
- <div>
3
- <a-drawer
4
- :closable="false"
5
- :visible="institutionDetailVisible"
6
- :width="screenWidth * 0.5"
7
- placement="right"
8
- @close="onClose"
9
- >
10
- <institution-detail
11
- :affirmInstitution="affirmInstitution"
12
- :institutionId="institution"
13
- @get_to_be_confirmed="getToBeConfirmed"/>
14
- </a-drawer>
15
- <a-dropdown v-model="show" :trigger="['click']">
16
- <div slot="overlay">
17
- <a-spin :spinning="loading">
18
- <a-tabs
19
- v-model="activeKey"
20
- :style="{width: '500px'}"
21
- :tabBarStyle="{textAlign: 'center'}"
22
- class="dropdown-tabs">
23
- <a-tab-pane key="1" tab="通知">
24
- <a-list class="tab-pane">
25
- </a-list>
26
- </a-tab-pane>
27
- <a-tab-pane key="2" tab="消息">
28
- <a-list class="tab-pane"></a-list>
29
- </a-tab-pane>
30
- <a-tab-pane key="3" tab="待办">
31
- <a-list :data-source="backlog" class="tab-pane" item-layout="horizontal" :pagination="pagination">
32
- <a-list-item slot="renderItem" slot-scope="item">
33
- <a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
34
- <a-list-item-meta :description="item.description" :title="item.title"/>
35
- </a-list-item>
36
- </a-list>
37
- </a-tab-pane>
38
- </a-tabs>
39
- </a-spin>
40
- </div>
41
- <span class="header-notice" @click="fetchNotice">
42
- <a-badge :count="backlog.length" class="notice-badge">
43
- <a-icon :class="['header-notice-icon']" type="bell"/>
44
- </a-badge>
45
- </span>
46
- </a-dropdown>
47
- </div>
48
- </template>
49
-
50
- <script>
51
- import { post } from '@vue2-client/services/api'
52
- import InstitutionDetail from './InstitutionDetail'
53
- import ellipsis from '@vue2-client/components/Ellipsis'
54
-
55
- export default {
56
- name: 'HeaderNotice',
57
- data () {
58
- return {
59
- loading: false,
60
- screenWidth: document.documentElement.clientWidth,
61
- show: false,
62
- institutionDetailVisible: false,
63
- institution: undefined,
64
- affirmInstitution: undefined,
65
- backlog: [],
66
- pagination: {
67
- onChange: page => {
68
- console.log(page)
69
- },
70
- pageSize: 5
71
- },
72
- activeKey: '1'
73
- }
74
- },
75
- components: { InstitutionDetail },
76
- computed: {},
77
- created () {
78
- this.getToBeConfirmed()
79
- },
80
- methods: {
81
- onClose () {
82
- this.institutionDetailVisible = false
83
- this.getToBeConfirmed()
84
- },
85
- getToBeConfirmed () {
86
- this.institutionDetailVisible = false
87
- try {
88
- if (this.$login.f.name) {
89
- post('/api/af-system/logic/getTodo', { name: this.$login.f.name }).then(res => {
90
- this.backlog = [...res]
91
- if (this.backlog.length > 0) {
92
- const key = `open${Date.now()}`
93
- this.$notification.open({
94
- key,
95
- message: `您有${this.backlog.length}条待办需要确认`,
96
- top: '50px',
97
- description: <ellipsis length="200">{ this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';') }</ellipsis>,
98
- icon: <a-icon type="container" style="color: #f5222d"/>,
99
- btn: h => {
100
- return h(
101
- 'a-button',
102
- {
103
- props: {
104
- type: 'primary',
105
- size: 'small',
106
- },
107
- on: {
108
- click: () => this.viewBacklog(key),
109
- },
110
- },
111
- '查看',
112
- )
113
- }
114
- })
115
- }
116
- })
117
- }
118
- } catch (e) {
119
- console.log(e)
120
- }
121
- },
122
- viewBacklog (key) {
123
- this.$notification.close(key)
124
- this.show = true
125
- this.activeKey = '3'
126
- },
127
- confirm_institution (item) {
128
- this.institutionDetailVisible = true
129
- this.show = false
130
- this.institution = item.institution
131
- this.affirmInstitution = item.id
132
- },
133
- fetchNotice () {
134
- if (this.loading) {
135
- this.loading = false
136
- return
137
- }
138
- if (this.show) return
139
- this.loading = true
140
- setTimeout(() => {
141
- this.loading = false
142
- }, 1000)
143
- }
144
- }
145
- }
146
- </script>
147
-
148
- <style lang="less">
149
- .header-notice {
150
- display: inline-block;
151
- transition: all 0.3s;
152
-
153
- span {
154
- vertical-align: initial;
155
- }
156
-
157
- .notice-badge {
158
- color: inherit;
159
-
160
- .header-notice-icon {
161
- font-size: 16px;
162
- padding: 4px;
163
- }
164
- }
165
- }
166
-
167
- .dropdown-tabs {
168
- background-color: @base-bg-color;
169
- box-shadow: 0 2px 8px @shadow-color;
170
- border-radius: 4px;
171
-
172
- .tab-pane {
173
- padding: 0 24px 12px;
174
- min-height: 250px;
175
- }
176
- }
177
- </style>
1
+ <template>
2
+ <div>
3
+ <a-drawer
4
+ :closable="false"
5
+ :visible="institutionDetailVisible"
6
+ :width="screenWidth * 0.5"
7
+ placement="right"
8
+ @close="onClose"
9
+ >
10
+ <institution-detail
11
+ :affirmInstitution="affirmInstitution"
12
+ :institutionId="institution"
13
+ @get_to_be_confirmed="getToBeConfirmed"/>
14
+ </a-drawer>
15
+ <a-dropdown v-model="show" :trigger="['click']">
16
+ <div slot="overlay">
17
+ <a-spin :spinning="loading">
18
+ <a-tabs
19
+ v-model="activeKey"
20
+ :style="{width: '500px'}"
21
+ :tabBarStyle="{textAlign: 'center'}"
22
+ class="dropdown-tabs">
23
+ <a-tab-pane key="1" tab="通知">
24
+ <a-list class="tab-pane">
25
+ </a-list>
26
+ </a-tab-pane>
27
+ <a-tab-pane key="2" tab="消息">
28
+ <a-list class="tab-pane"></a-list>
29
+ </a-tab-pane>
30
+ <a-tab-pane key="3" tab="待办">
31
+ <a-list :data-source="backlog" class="tab-pane" item-layout="horizontal" :pagination="pagination">
32
+ <a-list-item slot="renderItem" slot-scope="item">
33
+ <a v-if="item.type==='制度待确认'" slot="actions" @click="confirm_institution(item)">查看</a>
34
+ <a-list-item-meta :description="item.description" :title="item.title"/>
35
+ </a-list-item>
36
+ </a-list>
37
+ </a-tab-pane>
38
+ </a-tabs>
39
+ </a-spin>
40
+ </div>
41
+ <span class="header-notice" @click="fetchNotice">
42
+ <a-badge :count="backlog.length" class="notice-badge">
43
+ <a-icon :class="['header-notice-icon']" type="bell"/>
44
+ </a-badge>
45
+ </span>
46
+ </a-dropdown>
47
+ </div>
48
+ </template>
49
+
50
+ <script>
51
+ import { post } from '@vue2-client/services/api'
52
+ import InstitutionDetail from './InstitutionDetail'
53
+ import ellipsis from '@vue2-client/components/Ellipsis'
54
+
55
+ export default {
56
+ name: 'HeaderNotice',
57
+ data () {
58
+ return {
59
+ loading: false,
60
+ screenWidth: document.documentElement.clientWidth,
61
+ show: false,
62
+ institutionDetailVisible: false,
63
+ institution: undefined,
64
+ affirmInstitution: undefined,
65
+ backlog: [],
66
+ pagination: {
67
+ onChange: page => {
68
+ console.log(page)
69
+ },
70
+ pageSize: 5
71
+ },
72
+ activeKey: '1'
73
+ }
74
+ },
75
+ components: { InstitutionDetail },
76
+ computed: {},
77
+ created () {
78
+ this.getToBeConfirmed()
79
+ },
80
+ methods: {
81
+ onClose () {
82
+ this.institutionDetailVisible = false
83
+ this.getToBeConfirmed()
84
+ },
85
+ getToBeConfirmed () {
86
+ this.institutionDetailVisible = false
87
+ try {
88
+ if (this.$login.f.name) {
89
+ post('/api/af-system/logic/getTodo', { name: this.$login.f.name }).then(res => {
90
+ this.backlog = [...res]
91
+ if (this.backlog.length > 0) {
92
+ const key = `open${Date.now()}`
93
+ this.$notification.open({
94
+ key,
95
+ message: `您有${this.backlog.length}条待办需要确认`,
96
+ top: '50px',
97
+ description: <ellipsis length="200">{ this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';') }</ellipsis>,
98
+ icon: <a-icon type="container" style="color: #f5222d"/>,
99
+ btn: h => {
100
+ return h(
101
+ 'a-button',
102
+ {
103
+ props: {
104
+ type: 'primary',
105
+ size: 'small',
106
+ },
107
+ on: {
108
+ click: () => this.viewBacklog(key),
109
+ },
110
+ },
111
+ '查看',
112
+ )
113
+ }
114
+ })
115
+ }
116
+ })
117
+ }
118
+ } catch (e) {
119
+ console.log(e)
120
+ }
121
+ },
122
+ viewBacklog (key) {
123
+ this.$notification.close(key)
124
+ this.show = true
125
+ this.activeKey = '3'
126
+ },
127
+ confirm_institution (item) {
128
+ this.institutionDetailVisible = true
129
+ this.show = false
130
+ this.institution = item.institution
131
+ this.affirmInstitution = item.id
132
+ },
133
+ fetchNotice () {
134
+ if (this.loading) {
135
+ this.loading = false
136
+ return
137
+ }
138
+ if (this.show) return
139
+ this.loading = true
140
+ setTimeout(() => {
141
+ this.loading = false
142
+ }, 1000)
143
+ }
144
+ }
145
+ }
146
+ </script>
147
+
148
+ <style lang="less">
149
+ .header-notice {
150
+ display: inline-block;
151
+ transition: all 0.3s;
152
+
153
+ span {
154
+ vertical-align: initial;
155
+ }
156
+
157
+ .notice-badge {
158
+ color: inherit;
159
+
160
+ .header-notice-icon {
161
+ font-size: 16px;
162
+ padding: 4px;
163
+ }
164
+ }
165
+ }
166
+
167
+ .dropdown-tabs {
168
+ background-color: @base-bg-color;
169
+ box-shadow: 0 2px 8px @shadow-color;
170
+ border-radius: 4px;
171
+
172
+ .tab-pane {
173
+ padding: 0 24px 12px;
174
+ min-height: 250px;
175
+ }
176
+ }
177
+ </style>
package/src/lib.js CHANGED
@@ -1 +1 @@
1
- console.log('进入模块')
1
+ console.log('进入模块')