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,158 +1,158 @@
1
- <template>
2
- <div class="action-columns" ref="root">
3
- <a-popover v-model="visible" placement="bottomRight" trigger="click" :get-popup-container="() => $refs.root">
4
- <div slot="title">
5
- <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange" class="check-all" />列展示
6
- <a-button @click="resetColumns" style="float: right" type="link" size="small">重置</a-button>
7
- </div>
8
- <a-list style="width: 100%" size="small" :key="i" v-for="(col, i) in columns" slot="content">
9
- <a-list-item>
10
- <a-checkbox v-model="col.visible" @change="e => onCheckChange(e, col)"/>
11
- <template v-if="col.title">
12
- {{ col.title }}:
13
- </template>
14
- <slot v-else-if="col.slots && col.slots.title" :name="col.slots.title"></slot>
15
- <template slot="actions">
16
- <a-tooltip title="固定在列头" :mouseEnterDelay="0.5" :get-popup-container="() => $refs.root">
17
- <a-icon :class="['left', {active: col.fixed === 'left'}]" @click="fixColumn('left', col)" type="vertical-align-top" />
18
- </a-tooltip>
19
- <a-tooltip title="固定在列尾" :mouseEnterDelay="0.5" :get-popup-container="() => $refs.root">
20
- <a-icon :class="['right', {active: col.fixed === 'right'}]" @click="fixColumn('right', col)" type="vertical-align-bottom" />
21
- </a-tooltip>
22
- <a-tooltip title="添加搜索" :mouseEnterDelay="0.5" :get-popup-container="() => $refs.root">
23
- <a-icon :class="{active: col.searchAble}" @click="setSearch(col)" type="search" />
24
- </a-tooltip>
25
- </template>
26
- </a-list-item>
27
- </a-list>
28
- <a-icon class="action" type="setting" />
29
- </a-popover>
30
- </div>
31
- </template>
32
-
33
- <script>
34
- import cloneDeep from 'lodash.clonedeep'
35
-
36
- export default {
37
- name: 'ActionColumns',
38
- // eslint-disable-next-line vue/require-prop-types
39
- props: ['columns', 'visibleColumns'],
40
- data () {
41
- return {
42
- visible: false,
43
- indeterminate: false,
44
- checkAll: true,
45
- checkedCounts: this.columns.length,
46
- backColumns: cloneDeep(this.columns)
47
- }
48
- },
49
- watch: {
50
- checkedCounts (val) {
51
- this.checkAll = val === this.columns.length
52
- this.indeterminate = val > 0 && val < this.columns.length
53
- },
54
- columns (newVal, oldVal) {
55
- if (newVal != oldVal) {
56
- this.checkedCounts = newVal.length
57
- this.formatColumns(newVal)
58
- }
59
- }
60
- },
61
- created () {
62
- this.formatColumns(this.columns)
63
- },
64
- methods: {
65
- onCheckChange (e, col) {
66
- if (!col.visible) {
67
- this.checkedCounts -= 1
68
- } else {
69
- this.checkedCounts += 1
70
- }
71
- },
72
- fixColumn (fixed, col) {
73
- if (fixed !== col.fixed) {
74
- this.$set(col, 'fixed', fixed)
75
- } else {
76
- this.$set(col, 'fixed', undefined)
77
- }
78
- },
79
- setSearch (col) {
80
- this.$set(col, 'searchAble', !col.searchAble)
81
- if (!col.searchAble && col.search) {
82
- this.resetSearch(col)
83
- }
84
- },
85
- resetSearch (col) {
86
- // col.search.value = col.dataType === 'boolean' ? false : undefined
87
- col.search.value = undefined
88
- col.search.backup = undefined
89
- },
90
- resetColumns () {
91
- const { columns, backColumns } = this
92
- let counts = columns.length
93
- backColumns.forEach((back, index) => {
94
- const column = columns[index]
95
- column.visible = back.visible === undefined || back.visible
96
- if (!column.visible) {
97
- counts -= 1
98
- }
99
- if (back.fixed !== undefined) {
100
- column.fixed = back.fixed
101
- } else {
102
- this.$set(column, 'fixed', undefined)
103
- }
104
- this.$set(column, 'searchAble', back.searchAble)
105
- // column.searchAble = back.searchAble
106
- this.resetSearch(column)
107
- })
108
- this.checkedCounts = counts
109
- this.visible = false
110
- this.$emit('reset', this.getConditions(columns))
111
- },
112
- onCheckAllChange (e) {
113
- if (e.target.checked) {
114
- this.checkedCounts = this.columns.length
115
- // eslint-disable-next-line no-return-assign
116
- this.columns.forEach(col => col.visible = true)
117
- } else {
118
- this.checkedCounts = 0
119
- // eslint-disable-next-line no-return-assign
120
- this.columns.forEach(col => col.visible = false)
121
- }
122
- },
123
- getConditions (columns) {
124
- const conditions = {}
125
- columns.filter(item => item.search.value !== undefined && item.search.value !== '' && item.search.value !== null)
126
- .forEach(col => {
127
- conditions[col.dataIndex] = col.search.value
128
- })
129
- return conditions
130
- },
131
- formatColumns (columns) {
132
- for (const col of columns) {
133
- if (col.visible === undefined) {
134
- this.$set(col, 'visible', true)
135
- }
136
- if (!col.visible) {
137
- this.checkedCounts -= 1
138
- }
139
- }
140
- }
141
- }
142
- }
143
- </script>
144
-
145
- <style scoped lang="less">
146
- .action-columns{
147
- display: inline-block;
148
- .check-all{
149
- margin-right: 8px;
150
- }
151
- .left,.right{
152
- transform: rotate(-90deg);
153
- }
154
- .active{
155
- color: @primary-color;
156
- }
157
- }
158
- </style>
1
+ <template>
2
+ <div class="action-columns" ref="root">
3
+ <a-popover v-model="visible" placement="bottomRight" trigger="click" :get-popup-container="() => $refs.root">
4
+ <div slot="title">
5
+ <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange" class="check-all" />列展示
6
+ <a-button @click="resetColumns" style="float: right" type="link" size="small">重置</a-button>
7
+ </div>
8
+ <a-list style="width: 100%" size="small" :key="i" v-for="(col, i) in columns" slot="content">
9
+ <a-list-item>
10
+ <a-checkbox v-model="col.visible" @change="e => onCheckChange(e, col)"/>
11
+ <template v-if="col.title">
12
+ {{ col.title }}:
13
+ </template>
14
+ <slot v-else-if="col.slots && col.slots.title" :name="col.slots.title"></slot>
15
+ <template slot="actions">
16
+ <a-tooltip title="固定在列头" :mouseEnterDelay="0.5" :get-popup-container="() => $refs.root">
17
+ <a-icon :class="['left', {active: col.fixed === 'left'}]" @click="fixColumn('left', col)" type="vertical-align-top" />
18
+ </a-tooltip>
19
+ <a-tooltip title="固定在列尾" :mouseEnterDelay="0.5" :get-popup-container="() => $refs.root">
20
+ <a-icon :class="['right', {active: col.fixed === 'right'}]" @click="fixColumn('right', col)" type="vertical-align-bottom" />
21
+ </a-tooltip>
22
+ <a-tooltip title="添加搜索" :mouseEnterDelay="0.5" :get-popup-container="() => $refs.root">
23
+ <a-icon :class="{active: col.searchAble}" @click="setSearch(col)" type="search" />
24
+ </a-tooltip>
25
+ </template>
26
+ </a-list-item>
27
+ </a-list>
28
+ <a-icon class="action" type="setting" />
29
+ </a-popover>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import cloneDeep from 'lodash.clonedeep'
35
+
36
+ export default {
37
+ name: 'ActionColumns',
38
+ // eslint-disable-next-line vue/require-prop-types
39
+ props: ['columns', 'visibleColumns'],
40
+ data () {
41
+ return {
42
+ visible: false,
43
+ indeterminate: false,
44
+ checkAll: true,
45
+ checkedCounts: this.columns.length,
46
+ backColumns: cloneDeep(this.columns)
47
+ }
48
+ },
49
+ watch: {
50
+ checkedCounts (val) {
51
+ this.checkAll = val === this.columns.length
52
+ this.indeterminate = val > 0 && val < this.columns.length
53
+ },
54
+ columns (newVal, oldVal) {
55
+ if (newVal !== oldVal) {
56
+ this.checkedCounts = newVal.length
57
+ this.formatColumns(newVal)
58
+ }
59
+ }
60
+ },
61
+ created () {
62
+ this.formatColumns(this.columns)
63
+ },
64
+ methods: {
65
+ onCheckChange (e, col) {
66
+ if (!col.visible) {
67
+ this.checkedCounts -= 1
68
+ } else {
69
+ this.checkedCounts += 1
70
+ }
71
+ },
72
+ fixColumn (fixed, col) {
73
+ if (fixed !== col.fixed) {
74
+ this.$set(col, 'fixed', fixed)
75
+ } else {
76
+ this.$set(col, 'fixed', undefined)
77
+ }
78
+ },
79
+ setSearch (col) {
80
+ this.$set(col, 'searchAble', !col.searchAble)
81
+ if (!col.searchAble && col.search) {
82
+ this.resetSearch(col)
83
+ }
84
+ },
85
+ resetSearch (col) {
86
+ // col.search.value = col.dataType === 'boolean' ? false : undefined
87
+ col.search.value = undefined
88
+ col.search.backup = undefined
89
+ },
90
+ resetColumns () {
91
+ const { columns, backColumns } = this
92
+ let counts = columns.length
93
+ backColumns.forEach((back, index) => {
94
+ const column = columns[index]
95
+ column.visible = back.visible === undefined || back.visible
96
+ if (!column.visible) {
97
+ counts -= 1
98
+ }
99
+ if (back.fixed !== undefined) {
100
+ column.fixed = back.fixed
101
+ } else {
102
+ this.$set(column, 'fixed', undefined)
103
+ }
104
+ this.$set(column, 'searchAble', back.searchAble)
105
+ // column.searchAble = back.searchAble
106
+ this.resetSearch(column)
107
+ })
108
+ this.checkedCounts = counts
109
+ this.visible = false
110
+ this.$emit('reset', this.getConditions(columns))
111
+ },
112
+ onCheckAllChange (e) {
113
+ if (e.target.checked) {
114
+ this.checkedCounts = this.columns.length
115
+ // eslint-disable-next-line no-return-assign
116
+ this.columns.forEach(col => col.visible = true)
117
+ } else {
118
+ this.checkedCounts = 0
119
+ // eslint-disable-next-line no-return-assign
120
+ this.columns.forEach(col => col.visible = false)
121
+ }
122
+ },
123
+ getConditions (columns) {
124
+ const conditions = {}
125
+ columns.filter(item => item.search.value !== undefined && item.search.value !== '' && item.search.value !== null)
126
+ .forEach(col => {
127
+ conditions[col.dataIndex] = col.search.value
128
+ })
129
+ return conditions
130
+ },
131
+ formatColumns (columns) {
132
+ for (const col of columns) {
133
+ if (col.visible === undefined) {
134
+ this.$set(col, 'visible', true)
135
+ }
136
+ if (!col.visible) {
137
+ this.checkedCounts -= 1
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ </script>
144
+
145
+ <style scoped lang="less">
146
+ .action-columns{
147
+ display: inline-block;
148
+ .check-all{
149
+ margin-right: 8px;
150
+ }
151
+ .left,.right{
152
+ transform: rotate(-90deg);
153
+ }
154
+ .active{
155
+ color: @primary-color;
156
+ }
157
+ }
158
+ </style>