vue2-client 1.3.8 → 1.3.9

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 (50) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +1 -1
  3. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +3 -3
  4. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  5. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  6. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -372
  7. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +13 -12
  8. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  9. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  10. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  11. package/src/base-client/plugins/AppData.js +4 -6
  12. package/src/base-client/plugins/GetLoginInfoService.js +252 -252
  13. package/src/base-client/plugins/PagedList.js +3 -3
  14. package/src/base-client/plugins/i18n-extend.js +32 -32
  15. package/src/components/Ellipsis/index.md +38 -38
  16. package/src/components/NumberInfo/index.md +43 -43
  17. package/src/components/STable/README.md +341 -341
  18. package/src/components/Trend/index.md +45 -45
  19. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  20. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  21. package/src/components/exception/ExceptionPage.vue +70 -70
  22. package/src/components/form/FormRow.vue +52 -52
  23. package/src/components/menu/SideMenu.vue +62 -62
  24. package/src/components/menu/menu.js +273 -273
  25. package/src/components/setting/Setting.vue +235 -235
  26. package/src/components/table/advance/ActionColumns.vue +158 -158
  27. package/src/components/table/advance/SearchArea.vue +355 -355
  28. package/src/components/tool/AStepItem.vue +60 -60
  29. package/src/components/tool/AvatarList.vue +68 -69
  30. package/src/components/tool/Drawer.vue +142 -142
  31. package/src/components/transition/PageToggleTransition.vue +97 -97
  32. package/src/config/replacer/resolve.config.js +67 -67
  33. package/src/layouts/AdminLayout.vue +174 -174
  34. package/src/layouts/header/AdminHeader.vue +3 -3
  35. package/src/layouts/header/HeaderSearch.vue +67 -67
  36. package/src/layouts/header/InstitutionDetail.vue +181 -0
  37. package/src/layouts/tabs/TabsHead.vue +190 -190
  38. package/src/layouts/tabs/TabsView.vue +379 -379
  39. package/src/mock/goods/index.js +108 -108
  40. package/src/pages/report/ReportTable.js +124 -125
  41. package/src/theme/default/nprogress.less +76 -76
  42. package/src/utils/colors.js +103 -103
  43. package/src/utils/excel/Blob.js +53 -54
  44. package/src/utils/excel/Export2Excel.js +4 -4
  45. package/src/utils/formatter.js +68 -68
  46. package/src/utils/i18n.js +1 -1
  47. package/src/utils/routerUtil.js +3 -3
  48. package/src/utils/theme-color-replacer-extend.js +3 -3
  49. package/src/utils/themeUtil.js +100 -102
  50. package/src/utils/util.js +2 -2
@@ -1,108 +1,108 @@
1
- import Mock from 'mockjs'
2
- import '@vue2-client/mock/extend'
3
- import { parseUrlParams } from '@vue2-client/utils/request'
4
-
5
- const current = new Date().getTime()
6
-
7
- const goodsList = Mock.mock({
8
- 'list|100': [{
9
- 'id|+1': 0,
10
- 'name': '@GOODS',
11
- 'orderId': `${current}-@integer(1,100)`,
12
- 'status|1-4': 1,
13
- 'send': '@BOOLEAN',
14
- 'sendTime': '@DATETIME',
15
- 'orderDate': '@DATE',
16
- 'auditTime': '@TIME'
17
- }]
18
- })
19
-
20
- Mock.mock(RegExp(`${process.env.VUE_APP_API_BASE_URL}/goods` + '.*'), 'get', ({ url }) => {
21
- const params = parseUrlParams(decodeURI(url))
22
- let { page, pageSize } = params
23
- // eslint-disable-next-line no-eval
24
- page = eval(page) - 1 || 0
25
- // eslint-disable-next-line no-eval
26
- pageSize = eval(pageSize) || 10
27
- delete params.page
28
- delete params.pageSize
29
- let result = goodsList.list.filter(item => {
30
- for (const [key, value] of Object.entries(params)) {
31
- if (item[key] != value) {
32
- return false
33
- }
34
- }
35
- return true
36
- })
37
- const total = result.length
38
- if ((page) * pageSize > total) {
39
- result = []
40
- } else {
41
- result = result.slice(page * pageSize, (page + 1) * pageSize)
42
- }
43
- return {
44
- code: 0,
45
- message: 'success',
46
- data: {
47
- page: page + 1,
48
- pageSize,
49
- total,
50
- list: result
51
- }
52
- }
53
- })
54
-
55
- const columnsConfig = [
56
- {
57
- title: '商品名称',
58
- dataIndex: 'name',
59
- searchAble: true
60
- },
61
- {
62
- title: '订单号',
63
- dataIndex: 'orderId'
64
- },
65
- {
66
- searchAble: true,
67
- dataIndex: 'status',
68
- dataType: 'select',
69
- slots: { title: 'statusTitle' },
70
- scopedSlots: { customRender: 'status' },
71
- search: {
72
- selectOptions: [
73
- { title: '已下单', value: 1 },
74
- { title: '已付款', value: 2 },
75
- { title: '已审核', value: 3 }
76
- // {title: '已发货', value: 4}
77
- ]
78
- }
79
- },
80
- {
81
- title: '发货',
82
- searchAble: true,
83
- dataIndex: 'send',
84
- dataType: 'boolean',
85
- scopedSlots: { customRender: 'send' }
86
- },
87
- {
88
- title: '发货时间',
89
- dataIndex: 'sendTime',
90
- dataType: 'datetime'
91
- },
92
- {
93
- title: '下单日期',
94
- searchAble: true,
95
- dataIndex: 'orderDate',
96
- dataType: 'date',
97
- visible: false
98
- },
99
- {
100
- title: '审核时间',
101
- dataIndex: 'auditTime',
102
- dataType: 'time'
103
- }
104
- ]
105
-
106
- Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/columns`, 'get', () => {
107
- return columnsConfig
108
- })
1
+ import Mock from 'mockjs'
2
+ import '@vue2-client/mock/extend'
3
+ import { parseUrlParams } from '@vue2-client/utils/request'
4
+
5
+ const current = new Date().getTime()
6
+
7
+ const goodsList = Mock.mock({
8
+ 'list|100': [{
9
+ 'id|+1': 0,
10
+ 'name': '@GOODS',
11
+ 'orderId': `${current}-@integer(1,100)`,
12
+ 'status|1-4': 1,
13
+ 'send': '@BOOLEAN',
14
+ 'sendTime': '@DATETIME',
15
+ 'orderDate': '@DATE',
16
+ 'auditTime': '@TIME'
17
+ }]
18
+ })
19
+
20
+ Mock.mock(RegExp(`${process.env.VUE_APP_API_BASE_URL}/goods` + '.*'), 'get', ({ url }) => {
21
+ const params = parseUrlParams(decodeURI(url))
22
+ let { page, pageSize } = params
23
+ // eslint-disable-next-line no-eval
24
+ page = eval(page) - 1 || 0
25
+ // eslint-disable-next-line no-eval
26
+ pageSize = eval(pageSize) || 10
27
+ delete params.page
28
+ delete params.pageSize
29
+ let result = goodsList.list.filter(item => {
30
+ for (const [key, value] of Object.entries(params)) {
31
+ if (item[key] !== value) {
32
+ return false
33
+ }
34
+ }
35
+ return true
36
+ })
37
+ const total = result.length
38
+ if ((page) * pageSize > total) {
39
+ result = []
40
+ } else {
41
+ result = result.slice(page * pageSize, (page + 1) * pageSize)
42
+ }
43
+ return {
44
+ code: 0,
45
+ message: 'success',
46
+ data: {
47
+ page: page + 1,
48
+ pageSize,
49
+ total,
50
+ list: result
51
+ }
52
+ }
53
+ })
54
+
55
+ const columnsConfig = [
56
+ {
57
+ title: '商品名称',
58
+ dataIndex: 'name',
59
+ searchAble: true
60
+ },
61
+ {
62
+ title: '订单号',
63
+ dataIndex: 'orderId'
64
+ },
65
+ {
66
+ searchAble: true,
67
+ dataIndex: 'status',
68
+ dataType: 'select',
69
+ slots: { title: 'statusTitle' },
70
+ scopedSlots: { customRender: 'status' },
71
+ search: {
72
+ selectOptions: [
73
+ { title: '已下单', value: 1 },
74
+ { title: '已付款', value: 2 },
75
+ { title: '已审核', value: 3 }
76
+ // {title: '已发货', value: 4}
77
+ ]
78
+ }
79
+ },
80
+ {
81
+ title: '发货',
82
+ searchAble: true,
83
+ dataIndex: 'send',
84
+ dataType: 'boolean',
85
+ scopedSlots: { customRender: 'send' }
86
+ },
87
+ {
88
+ title: '发货时间',
89
+ dataIndex: 'sendTime',
90
+ dataType: 'datetime'
91
+ },
92
+ {
93
+ title: '下单日期',
94
+ searchAble: true,
95
+ dataIndex: 'orderDate',
96
+ dataType: 'date',
97
+ visible: false
98
+ },
99
+ {
100
+ title: '审核时间',
101
+ dataIndex: 'auditTime',
102
+ dataType: 'time'
103
+ }
104
+ ]
105
+
106
+ Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/columns`, 'get', () => {
107
+ return columnsConfig
108
+ })
@@ -1,125 +1,124 @@
1
- export default {
2
- name: 'ReportTable',
3
- functional: true,
4
- render (h, content) {
5
- if (!content.props.tableData) {
6
- console.log('没有报表数据')
7
- return
8
- }
9
- console.log('content=>', content)
10
- const html = reportCompute(h, content.props.tableData)
11
- console.log('html=>', html)
12
- // 报表整体高度和宽度
13
- const reportClass = `h-${html.h} w-${html.w}`
14
- const report = (
15
- <div id='ReportTableHome'>
16
- <div id='reportTable' class={reportClass}>
17
- {html.el}
18
- </div>
19
- </div>
20
- )
21
- return report
22
- }
23
- }
24
- /**
25
- * class类生成
26
- * @param w
27
- * @param h
28
- * @param l left
29
- * @param t top
30
- * @returns {string}
31
- */
32
- function generClass ({ w = 1, h = 1, l, t }) {
33
- return `w-${w} h-${h} l-${l} t-${t}`
34
- }
35
- /**
36
- * 判断是否是个Number数据
37
- * @param value
38
- * @returns {boolean}
39
- */
40
- function typeNumber (value) {
41
- return Object.prototype.toString.call(value) === '[object Number]'
42
- }
43
- /**
44
- * 判断是否是个object数据
45
- * @param value
46
- * @returns {boolean}
47
- */
48
- function typeObject (value) {
49
- return Object.prototype.toString.call(value) === '[object Object]'
50
- }
51
- /**
52
- * 判断是否是个Array数据
53
- * @param value
54
- * @returns {boolean}
55
- */
56
- function typeArray (value) {
57
- return Object.prototype.toString.call(value) === '[object Array]'
58
- }
59
- /**
60
- * 一行数据转换html函数
61
- * @param h vue的h
62
- * @param row 一行json数据
63
- * @param left 起始left距离
64
- * @param top 起始top距离
65
- * @returns {{el: Array, h: number}}
66
- */
67
- function rowCompute (h, row, left, top) {
68
- if (typeObject(row)) {
69
- const el = []
70
- const keys = Object.keys(row).filter((res) => res != 'span')
71
- let heigth = 0
72
- for (const key of keys.values()) {
73
- const value = row[key]['value'] ? row[key]['value'] : row[key]
74
- const style = { l: left, t: top + heigth }
75
- style.w = row[key]['span'] ? row[key]['span'] : 1
76
- const nextL = left + style.w
77
- const nextT = top + heigth
78
- const divObject = rowCompute(h, value, nextL, nextT)
79
- el.push(divObject.el)
80
- style.h = divObject.h ? divObject.h : 1
81
- heigth += style.h
82
- const attrs = { class: generClass(style) + ' title' }
83
- const div = <div {...attrs}>{key == 'value' ? value : key}</div>
84
- el.push(div)
85
- }
86
- return { h: heigth, el: el }
87
- } else if (typeArray(row)) {
88
- const el = []
89
- for (const [i, value] of row.entries()) {
90
- const style = { l: (left + i), t: top, w: 1, h: 1 }
91
- const extraClass = typeNumber(value) ? 'bold' : 'title'
92
- const attrs = { class: generClass(style) + ` ${extraClass}` }
93
- const div = <div {...attrs}>{value}</div>
94
- el.push(div)
95
- }
96
- return { h: 1, el: el }
97
- }
98
- }
99
- /**
100
- * 完整报表数据转换html函数
101
- * @param h vue的h
102
- * @param jsonArr json数组
103
- * @returns {{el: Array, h: number}}
104
- */
105
- function reportCompute (h, jsonArr) {
106
- const html = []
107
- let heigth = 0
108
- let width = 0
109
- for (const [index, row] of jsonArr.entries()) {
110
- const rowHtml = rowCompute(h, row, 0, index)
111
- // 取第一行的宽度作为整个报表的宽度
112
- if (index == 0) {
113
- const reg = /w-\d\s/
114
- for (const vNode of rowHtml.el) {
115
- if (!vNode.data || !vNode.data.class) continue
116
- const c = vNode.data.class
117
- const w = c.match(reg)[0].split('-')[1]
118
- width += (w - 0)
119
- }
120
- }
121
- heigth += rowHtml.h
122
- html.push(rowHtml.el)
123
- }
124
- return { el: html, h: heigth, w: width }
125
- }
1
+ export default {
2
+ name: 'ReportTable',
3
+ functional: true,
4
+ render (h, content) {
5
+ if (!content.props.tableData) {
6
+ console.log('没有报表数据')
7
+ return
8
+ }
9
+ console.log('content=>', content)
10
+ const html = reportCompute(h, content.props.tableData)
11
+ console.log('html=>', html)
12
+ // 报表整体高度和宽度
13
+ const reportClass = `h-${html.h} w-${html.w}`
14
+ return (
15
+ <div id='ReportTableHome'>
16
+ <div id='reportTable' class={reportClass}>
17
+ {html.el}
18
+ </div>
19
+ </div>
20
+ )
21
+ }
22
+ }
23
+ /**
24
+ * class类生成
25
+ * @param w 宽
26
+ * @param h
27
+ * @param l left
28
+ * @param t top
29
+ * @returns {string}
30
+ */
31
+ function generClass ({ w = 1, h = 1, l, t }) {
32
+ return `w-${w} h-${h} l-${l} t-${t}`
33
+ }
34
+ /**
35
+ * 判断是否是个Number数据
36
+ * @param value
37
+ * @returns {boolean}
38
+ */
39
+ function typeNumber (value) {
40
+ return Object.prototype.toString.call(value) === '[object Number]'
41
+ }
42
+ /**
43
+ * 判断是否是个object数据
44
+ * @param value
45
+ * @returns {boolean}
46
+ */
47
+ function typeObject (value) {
48
+ return Object.prototype.toString.call(value) === '[object Object]'
49
+ }
50
+ /**
51
+ * 判断是否是个Array数据
52
+ * @param value
53
+ * @returns {boolean}
54
+ */
55
+ function typeArray (value) {
56
+ return Object.prototype.toString.call(value) === '[object Array]'
57
+ }
58
+ /**
59
+ * 一行数据转换html函数
60
+ * @param h vue的h
61
+ * @param row 一行json数据
62
+ * @param left 起始left距离
63
+ * @param top 起始top距离
64
+ * @returns {{el: Array, h: number}}
65
+ */
66
+ function rowCompute (h, row, left, top) {
67
+ if (typeObject(row)) {
68
+ const el = []
69
+ const keys = Object.keys(row).filter((res) => res !== 'span')
70
+ let heigth = 0
71
+ for (const key of keys.values()) {
72
+ const value = row[key]['value'] ? row[key]['value'] : row[key]
73
+ const style = { l: left, t: top + heigth }
74
+ style.w = row[key]['span'] ? row[key]['span'] : 1
75
+ const nextL = left + style.w
76
+ const nextT = top + heigth
77
+ const divObject = rowCompute(h, value, nextL, nextT)
78
+ el.push(divObject.el)
79
+ style.h = divObject.h ? divObject.h : 1
80
+ heigth += style.h
81
+ const attrs = { class: generClass(style) + ' title' }
82
+ const div = <div {...attrs}>{key === 'value' ? value : key}</div>
83
+ el.push(div)
84
+ }
85
+ return { h: heigth, el: el }
86
+ } else if (typeArray(row)) {
87
+ const el = []
88
+ for (const [i, value] of row.entries()) {
89
+ const style = { l: (left + i), t: top, w: 1, h: 1 }
90
+ const extraClass = typeNumber(value) ? 'bold' : 'title'
91
+ const attrs = { class: generClass(style) + ` ${extraClass}` }
92
+ const div = <div {...attrs}>{value}</div>
93
+ el.push(div)
94
+ }
95
+ return { h: 1, el: el }
96
+ }
97
+ }
98
+ /**
99
+ * 完整报表数据转换html函数
100
+ * @param h vue的h
101
+ * @param jsonArr json数组
102
+ * @returns {{el: Array, h: number}}
103
+ */
104
+ function reportCompute (h, jsonArr) {
105
+ const html = []
106
+ let heigth = 0
107
+ let width = 0
108
+ for (const [index, row] of jsonArr.entries()) {
109
+ const rowHtml = rowCompute(h, row, 0, index)
110
+ // 取第一行的宽度作为整个报表的宽度
111
+ if (index === 0) {
112
+ const reg = /w-\d\s/
113
+ for (const vNode of rowHtml.el) {
114
+ if (!vNode.data || !vNode.data.class) continue
115
+ const c = vNode.data.class
116
+ const w = c.match(reg)[0].split('-')[1]
117
+ width += (w - 0)
118
+ }
119
+ }
120
+ heigth += rowHtml.h
121
+ html.push(rowHtml.el)
122
+ }
123
+ return { el: html, h: heigth, w: width }
124
+ }
@@ -1,76 +1,76 @@
1
- @import '~ant-design-vue/lib/style/themes/default';
2
-
3
- /* Make clicks pass-through */
4
- #nprogress {
5
- pointer-events: none;
6
- }
7
-
8
- #nprogress .bar {
9
- background: @primary-color;
10
-
11
- position: fixed;
12
- z-index: 1031;
13
- top: 0;
14
- left: 0;
15
-
16
- width: 100%;
17
- height: 2px;
18
- }
19
-
20
- /* Fancy blur effect */
21
- #nprogress .peg {
22
- display: block;
23
- position: absolute;
24
- right: 0px;
25
- width: 100px;
26
- height: 100%;
27
- box-shadow: 0 0 10px @primary-color, 0 0 5px @primary-color;
28
- opacity: 1.0;
29
-
30
- -webkit-transform: rotate(3deg) translate(0px, -4px);
31
- -ms-transform: rotate(3deg) translate(0px, -4px);
32
- transform: rotate(3deg) translate(0px, -4px);
33
- }
34
-
35
- /* Remove these to get rid of the spinner */
36
- #nprogress .spinner {
37
- display: block;
38
- position: fixed;
39
- z-index: 1031;
40
- top: 15px;
41
- right: 15px;
42
- }
43
-
44
- #nprogress .spinner-icon {
45
- width: 18px;
46
- height: 18px;
47
- box-sizing: border-box;
48
-
49
- border: solid 2px transparent;
50
- border-top-color: @primary-color;
51
- border-left-color: @primary-color;
52
- border-radius: 50%;
53
-
54
- -webkit-animation: nprogress-spinner 400ms linear infinite;
55
- animation: nprogress-spinner 400ms linear infinite;
56
- }
57
-
58
- .nprogress-custom-parent {
59
- overflow: hidden;
60
- position: relative;
61
- }
62
-
63
- .nprogress-custom-parent #nprogress .spinner,
64
- .nprogress-custom-parent #nprogress .bar {
65
- position: absolute;
66
- }
67
-
68
- @-webkit-keyframes nprogress-spinner {
69
- 0% { -webkit-transform: rotate(0deg); }
70
- 100% { -webkit-transform: rotate(360deg); }
71
- }
72
- @keyframes nprogress-spinner {
73
- 0% { transform: rotate(0deg); }
74
- 100% { transform: rotate(360deg); }
75
- }
76
-
1
+ @import '~ant-design-vue/lib/style/themes/default';
2
+
3
+ /* Make clicks pass-through */
4
+ #nprogress {
5
+ pointer-events: none;
6
+ }
7
+
8
+ #nprogress .bar {
9
+ background: @primary-color;
10
+
11
+ position: fixed;
12
+ z-index: 1031;
13
+ top: 0;
14
+ left: 0;
15
+
16
+ width: 100%;
17
+ height: 2px;
18
+ }
19
+
20
+ /* Fancy blur effect */
21
+ #nprogress .peg {
22
+ display: block;
23
+ position: absolute;
24
+ right: 0;
25
+ width: 100px;
26
+ height: 100%;
27
+ box-shadow: 0 0 10px @primary-color, 0 0 5px @primary-color;
28
+ opacity: 1.0;
29
+
30
+ -webkit-transform: rotate(3deg) translate(0px, -4px);
31
+ -ms-transform: rotate(3deg) translate(0px, -4px);
32
+ transform: rotate(3deg) translate(0px, -4px);
33
+ }
34
+
35
+ /* Remove these to get rid of the spinner */
36
+ #nprogress .spinner {
37
+ display: block;
38
+ position: fixed;
39
+ z-index: 1031;
40
+ top: 15px;
41
+ right: 15px;
42
+ }
43
+
44
+ #nprogress .spinner-icon {
45
+ width: 18px;
46
+ height: 18px;
47
+ box-sizing: border-box;
48
+
49
+ border: solid 2px transparent;
50
+ border-top-color: @primary-color;
51
+ border-left-color: @primary-color;
52
+ border-radius: 50%;
53
+
54
+ -webkit-animation: nprogress-spinner 400ms linear infinite;
55
+ animation: nprogress-spinner 400ms linear infinite;
56
+ }
57
+
58
+ .nprogress-custom-parent {
59
+ overflow: hidden;
60
+ position: relative;
61
+ }
62
+
63
+ .nprogress-custom-parent #nprogress .spinner,
64
+ .nprogress-custom-parent #nprogress .bar {
65
+ position: absolute;
66
+ }
67
+
68
+ @-webkit-keyframes nprogress-spinner {
69
+ 0% { -webkit-transform: rotate(0deg); }
70
+ 100% { -webkit-transform: rotate(360deg); }
71
+ }
72
+ @keyframes nprogress-spinner {
73
+ 0% { transform: rotate(0deg); }
74
+ 100% { transform: rotate(360deg); }
75
+ }
76
+