vue2-client 1.4.9 → 1.4.11

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 (89) hide show
  1. package/CHANGELOG.md +362 -355
  2. package/index.js +30 -30
  3. package/package.json +78 -78
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  5. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  6. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  7. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  8. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  9. package/src/base-client/components/common/XAddForm/XAddForm.vue +354 -354
  10. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +327 -327
  11. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  12. package/src/base-client/components/common/XForm/XForm.vue +274 -274
  13. package/src/base-client/components/common/XForm/XFormItem.vue +389 -389
  14. package/src/base-client/components/common/XFormTable/XFormTable.vue +548 -547
  15. package/src/base-client/components/common/XFormTable/index.md +96 -96
  16. package/src/base-client/components/common/XTable/XTable.vue +262 -262
  17. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  18. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  19. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  20. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  21. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  22. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  23. package/src/base-client/plugins/AppData.js +69 -69
  24. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  25. package/src/base-client/plugins/PagedList.js +177 -177
  26. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  27. package/src/base-client/plugins/i18n-extend.js +32 -32
  28. package/src/components/Ellipsis/index.md +38 -38
  29. package/src/components/NumberInfo/index.md +43 -43
  30. package/src/components/STable/README.md +341 -341
  31. package/src/components/STable/index.js +318 -318
  32. package/src/components/Trend/index.md +45 -45
  33. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  34. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  35. package/src/components/exception/ExceptionPage.vue +70 -70
  36. package/src/components/form/FormRow.vue +52 -52
  37. package/src/components/index.js +36 -36
  38. package/src/components/menu/SideMenu.vue +62 -62
  39. package/src/components/menu/menu.js +273 -273
  40. package/src/components/setting/Setting.vue +235 -235
  41. package/src/components/table/StandardTable.vue +141 -141
  42. package/src/components/table/advance/ActionColumns.vue +158 -158
  43. package/src/components/table/advance/SearchArea.vue +355 -355
  44. package/src/components/tool/AStepItem.vue +60 -60
  45. package/src/components/tool/AvatarList.vue +68 -68
  46. package/src/components/tool/Drawer.vue +142 -142
  47. package/src/components/tool/TagSelect.vue +83 -83
  48. package/src/components/transition/PageToggleTransition.vue +97 -97
  49. package/src/config/replacer/resolve.config.js +67 -67
  50. package/src/layouts/AdminLayout.vue +174 -174
  51. package/src/layouts/header/AdminHeader.vue +104 -104
  52. package/src/layouts/header/HeaderNotice.vue +167 -167
  53. package/src/layouts/header/HeaderSearch.vue +67 -67
  54. package/src/layouts/header/InstitutionDetail.vue +181 -181
  55. package/src/layouts/tabs/TabsHead.vue +190 -190
  56. package/src/layouts/tabs/TabsView.vue +379 -379
  57. package/src/mock/goods/index.js +108 -108
  58. package/src/pages/CreateQueryPage.vue +65 -65
  59. package/src/pages/report/ReportTable.js +124 -124
  60. package/src/pages/report/ReportTableHome.vue +28 -28
  61. package/src/pages/resourceManage/orgListManage.vue +98 -98
  62. package/src/pages/system/dictionary/index.vue +43 -43
  63. package/src/pages/system/file/index.vue +317 -317
  64. package/src/pages/system/queryParams/index.vue +43 -43
  65. package/src/pages/system/ticket/index.vue +2 -2
  66. package/src/router/async/config.async.js +27 -27
  67. package/src/router/async/router.map.js +56 -56
  68. package/src/router/index.js +27 -27
  69. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  70. package/src/services/api/LogDetailsViewApi.js +10 -10
  71. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  72. package/src/services/api/TicketDetailsViewApi.js +34 -34
  73. package/src/services/api/commonTempTable.js +10 -10
  74. package/src/services/api/index.js +17 -17
  75. package/src/services/api/manage.js +8 -8
  76. package/src/store/mutation-types.js +2 -2
  77. package/src/theme/default/nprogress.less +76 -76
  78. package/src/theme/default/style.less +47 -47
  79. package/src/utils/colors.js +103 -103
  80. package/src/utils/excel/Blob.js +180 -180
  81. package/src/utils/excel/Export2Excel.js +141 -141
  82. package/src/utils/formatter.js +68 -68
  83. package/src/utils/i18n.js +80 -80
  84. package/src/utils/request.js +225 -225
  85. package/src/utils/routerUtil.js +364 -364
  86. package/src/utils/theme-color-replacer-extend.js +91 -91
  87. package/src/utils/themeUtil.js +100 -100
  88. package/src/utils/util.js +230 -230
  89. package/vue.config.js +99 -99
@@ -1,262 +1,262 @@
1
- <template>
2
- <div>
3
- <a-row :gutter="48">
4
- <a-col>
5
- <span :style="{ float: 'left', overflow: 'hidden', marginBottom: '8px' }">
6
- <slot name="expand"></slot>
7
- </span>
8
- </a-col>
9
- <a-col>
10
- <span :style="{ float: 'right', overflow: 'hidden', marginBottom: '8px' }">
11
- <a-button-group>
12
- <a-button @click="toggleIsFormShow">
13
- <a-icon :style="iconStyle" type="vertical-align-top"/>
14
- </a-button>
15
- <a-button @click="refresh(true)">
16
- <a-icon :style="iconStyle" type="reload" />
17
- </a-button>
18
- <table-setting v-model="tableColumns" />
19
- </a-button-group>
20
- </span>
21
- </a-col>
22
- </a-row>
23
- <s-table
24
- ref="table"
25
- :alert="true"
26
- :columns="tableColumns"
27
- :data="loadData"
28
- :rowKey="rowKey"
29
- :rowSelection="rowSelection"
30
- :scroll="{ x: scrollXWidth, y: scrollYWidth }"
31
- :showPagination="showPagination"
32
- size="default"
33
- >
34
- <template
35
- v-for="(item, index) in tableColumns"
36
- :slot="item.dataIndex"
37
- slot-scope="text, record">
38
- <!-- 文本溢出省略(ellipsis) -->
39
- <span v-if="item.slotType === 'ellipsis'" :key="index">
40
- <ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis>
41
- </span>
42
- <!-- 徽标(badge) -->
43
- <span v-else-if="item.slotType === 'badge'" :key="index">
44
- <x-badge :badge-key="item.slotKeyMap" :value="text" />
45
- </span>
46
- <!-- 日期(date) -->
47
- <span v-else-if="item.slotType === 'date'" :key="index">
48
- {{ format(text,'yyyy-MM-dd') }}
49
- </span>
50
- <!-- 日期时间(datetime) -->
51
- <span v-else-if="item.slotType === 'dateTime'" :key="index">
52
- {{ format(text,'yyyy-MM-dd hh:mm:ss') }}
53
- </span>
54
- <!-- 操作列(action) -->
55
- <span v-else-if="item.slotType === 'action'" :key="index">
56
- <a @click="action(record, item.dataIndex)">{{ item.slotValue }}</a>
57
- </span>
58
- </template>
59
- <template slot="footer">
60
- <slot name="footer"></slot>
61
- </template>
62
- </s-table>
63
- </div>
64
- </template>
65
- <script>
66
- import { Ellipsis, STable } from '@vue2-client/components'
67
- import { formatDate } from '@vue2-client/utils/util'
68
- import XBadge from '@vue2-client/base-client/components/common/XBadge'
69
- import TableSetting from '@vue2-client/components/TableSetting/TableSetting'
70
-
71
- export default {
72
- name: 'XTable',
73
- components: {
74
- TableSetting,
75
- STable,
76
- Ellipsis,
77
- XBadge
78
- },
79
- data () {
80
- return {
81
- // 加载数据方法 必须为 Promise 对象
82
- loadData: parameter => {
83
- // 取到表格携带的表单参数
84
- const requestParameters = Object.assign({}, parameter)
85
- // 取到父组件传入的表单参数
86
- const conditionParams = Object.assign(this.fixedQueryForm, this.form)
87
- // 如果适用了综合筛选表单,则进行数据处理
88
- if (conditionParams.rowIdName) {
89
- const rowIdName = conditionParams.rowIdName
90
- const rowIdValue = conditionParams.rowIdValue
91
- delete conditionParams.rowIdName
92
- delete conditionParams.rowIdValue
93
- if (rowIdValue) {
94
- conditionParams[rowIdName] = rowIdValue
95
- }
96
- }
97
- // 如果传了燃气公司字段,则进行数据处理
98
- if (conditionParams.orgName) {
99
- requestParameters.orgName = conditionParams.orgName
100
- delete conditionParams.orgName
101
- }
102
- requestParameters.conditionParams = conditionParams
103
- requestParameters.queryParamsName = this.queryParamsName
104
- requestParameters.queryParams = this.queryParams
105
- // 加载数据
106
- return this.loadTableData(requestParameters)
107
- },
108
- rowKey: undefined,
109
- scrollXWidth: 1600,
110
- scrollYWidth: 437,
111
- selectedRowKeys: [],
112
- selectedRows: [],
113
- // 数据列
114
- tableColumns: this.jsonData,
115
- // 是否显示展示列抽屉
116
- visible: false,
117
- loading: false,
118
- dataSource: [],
119
- // 图标样式
120
- iconStyle: {
121
- position: 'relative',
122
- top: '1px'
123
- }
124
- }
125
- },
126
- watch: {
127
- form (rel) {
128
- this.form = rel
129
- this.refresh(true)
130
- },
131
- jsonData () {
132
- this.initTableParams()
133
- }
134
- },
135
- props: {
136
- jsonData: {
137
- type: Array,
138
- default: () => {
139
- return []
140
- }
141
- },
142
- queryParamsName: {
143
- type: String,
144
- default: () => {
145
- return ''
146
- }
147
- },
148
- // 查询参数对象, 用于没有对应查询配置文件名时
149
- queryParams: {
150
- type: Object,
151
- default: null
152
- },
153
- form: {
154
- type: Object,
155
- default: () => {
156
- return {}
157
- }
158
- },
159
- // 固定查询表单
160
- fixedQueryForm: {
161
- type: Object,
162
- default: () => {
163
- return {}
164
- }
165
- },
166
- // 按钮
167
- buttonState: {
168
- type: Object,
169
- default: () => {
170
- return undefined
171
- }
172
- },
173
- // 数据只有一页时是否展示分页,true:展示,auto:隐藏
174
- showPagination: {
175
- type: Boolean,
176
- default: true
177
- }
178
- },
179
- computed: {
180
- rowSelection () {
181
- return {
182
- selectedRowKeys: this.selectedRowKeys,
183
- onChange: this.onSelectChange
184
- }
185
- }
186
- },
187
- mounted () {
188
- this.initTableParams()
189
- },
190
- methods: {
191
- badgeFilter (key, value) {
192
- return this.$appdata.getParam(key, value)
193
- },
194
- initTableParams () {
195
- let totalWidth = 0
196
- this.rowKey = this.tableColumns[0].dataIndex
197
- for (let i = 0; i < this.tableColumns.length; i++) {
198
- const item = this.tableColumns[i]
199
- if (item.slotType === 'action') {
200
- item.fixed = 'right'
201
- item.width = 70
202
- }
203
- if (item.width) {
204
- totalWidth = totalWidth + item.width
205
- } else {
206
- totalWidth = totalWidth + 180
207
- }
208
- }
209
- const width = document.documentElement.clientWidth
210
- if (width >= 1600) {
211
- this.scrollYWidth = 429
212
- } else if (width >= 1200) {
213
- this.scrollYWidth = 390
214
- } else {
215
- this.scrollYWidth = 343
216
- }
217
- // 横向滚动长度大于所有宽度,才能实现固定表头
218
- this.scrollXWidth = totalWidth
219
- },
220
- loadTableData (requestParameters) {
221
- let data = []
222
- this.$emit('loadData', requestParameters, val => {
223
- data = val
224
- })
225
- const _this = this
226
- data.then(res => {
227
- _this.dataSource = res.data
228
- })
229
- return data
230
- },
231
- action (record, actionType) {
232
- this.$emit('action', record, record[this.jsonData[0].dataIndex], actionType)
233
- },
234
- onSelectChange (selectedRowKeys, selectedRows) {
235
- this.selectedRowKeys = selectedRowKeys
236
- this.selectedRows = selectedRows
237
- this.$emit('selectRow', selectedRowKeys)
238
- },
239
- clearRowKeys () {
240
- this.$refs.table.clearSelected()
241
- },
242
- /**
243
- * 表格重新加载方法
244
- * 如果参数为 true, 则强制刷新到第一页
245
- */
246
- refresh (bool) {
247
- this.$refs.table.refresh(bool)
248
- },
249
- format (date, format) {
250
- return formatDate(date, format)
251
- },
252
- showDrawer () {
253
- this.visible = true
254
- },
255
- toggleIsFormShow () {
256
- this.$emit('toggleIsFormShow')
257
- }
258
- }
259
- }
260
- </script>
261
- <style lang="less" scoped>
262
- </style>
1
+ <template>
2
+ <div>
3
+ <a-row :gutter="48">
4
+ <a-col>
5
+ <span :style="{ float: 'left', overflow: 'hidden', marginBottom: '8px' }">
6
+ <slot name="expand"></slot>
7
+ </span>
8
+ </a-col>
9
+ <a-col>
10
+ <span :style="{ float: 'right', overflow: 'hidden', marginBottom: '8px' }">
11
+ <a-button-group>
12
+ <a-button @click="toggleIsFormShow">
13
+ <a-icon :style="iconStyle" type="vertical-align-top"/>
14
+ </a-button>
15
+ <a-button @click="refresh(true)">
16
+ <a-icon :style="iconStyle" type="reload" />
17
+ </a-button>
18
+ <table-setting v-model="tableColumns" />
19
+ </a-button-group>
20
+ </span>
21
+ </a-col>
22
+ </a-row>
23
+ <s-table
24
+ ref="table"
25
+ :alert="true"
26
+ :columns="tableColumns"
27
+ :data="loadData"
28
+ :rowKey="rowKey"
29
+ :rowSelection="rowSelection"
30
+ :scroll="{ x: scrollXWidth, y: scrollYWidth }"
31
+ :showPagination="showPagination"
32
+ size="default"
33
+ >
34
+ <template
35
+ v-for="(item, index) in tableColumns"
36
+ :slot="item.dataIndex"
37
+ slot-scope="text, record">
38
+ <!-- 文本溢出省略(ellipsis) -->
39
+ <span v-if="item.slotType === 'ellipsis'" :key="index">
40
+ <ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis>
41
+ </span>
42
+ <!-- 徽标(badge) -->
43
+ <span v-else-if="item.slotType === 'badge'" :key="index">
44
+ <x-badge :badge-key="item.slotKeyMap" :value="text" />
45
+ </span>
46
+ <!-- 日期(date) -->
47
+ <span v-else-if="item.slotType === 'date'" :key="index">
48
+ {{ format(text,'yyyy-MM-dd') }}
49
+ </span>
50
+ <!-- 日期时间(datetime) -->
51
+ <span v-else-if="item.slotType === 'dateTime'" :key="index">
52
+ {{ format(text,'yyyy-MM-dd hh:mm:ss') }}
53
+ </span>
54
+ <!-- 操作列(action) -->
55
+ <span v-else-if="item.slotType === 'action'" :key="index">
56
+ <a @click="action(record, item.dataIndex)">{{ item.slotValue }}</a>
57
+ </span>
58
+ </template>
59
+ <template slot="footer">
60
+ <slot name="footer"></slot>
61
+ </template>
62
+ </s-table>
63
+ </div>
64
+ </template>
65
+ <script>
66
+ import { Ellipsis, STable } from '@vue2-client/components'
67
+ import { formatDate } from '@vue2-client/utils/util'
68
+ import XBadge from '@vue2-client/base-client/components/common/XBadge'
69
+ import TableSetting from '@vue2-client/components/TableSetting/TableSetting'
70
+
71
+ export default {
72
+ name: 'XTable',
73
+ components: {
74
+ TableSetting,
75
+ STable,
76
+ Ellipsis,
77
+ XBadge
78
+ },
79
+ data () {
80
+ return {
81
+ // 加载数据方法 必须为 Promise 对象
82
+ loadData: parameter => {
83
+ // 取到表格携带的表单参数
84
+ const requestParameters = Object.assign({}, parameter)
85
+ // 取到父组件传入的表单参数
86
+ const conditionParams = Object.assign(this.fixedQueryForm, this.form)
87
+ // 如果适用了综合筛选表单,则进行数据处理
88
+ if (conditionParams.rowIdName) {
89
+ const rowIdName = conditionParams.rowIdName
90
+ const rowIdValue = conditionParams.rowIdValue
91
+ delete conditionParams.rowIdName
92
+ delete conditionParams.rowIdValue
93
+ if (rowIdValue) {
94
+ conditionParams[rowIdName] = rowIdValue
95
+ }
96
+ }
97
+ // 如果传了燃气公司字段,则进行数据处理
98
+ if (conditionParams.orgName) {
99
+ requestParameters.orgName = conditionParams.orgName
100
+ delete conditionParams.orgName
101
+ }
102
+ requestParameters.conditionParams = conditionParams
103
+ requestParameters.queryParamsName = this.queryParamsName
104
+ requestParameters.queryParams = this.queryParams
105
+ // 加载数据
106
+ return this.loadTableData(requestParameters)
107
+ },
108
+ rowKey: undefined,
109
+ scrollXWidth: 1600,
110
+ scrollYWidth: 437,
111
+ selectedRowKeys: [],
112
+ selectedRows: [],
113
+ // 数据列
114
+ tableColumns: this.jsonData,
115
+ // 是否显示展示列抽屉
116
+ visible: false,
117
+ loading: false,
118
+ dataSource: [],
119
+ // 图标样式
120
+ iconStyle: {
121
+ position: 'relative',
122
+ top: '1px'
123
+ }
124
+ }
125
+ },
126
+ watch: {
127
+ form (rel) {
128
+ this.form = rel
129
+ this.refresh(true)
130
+ },
131
+ jsonData () {
132
+ this.initTableParams()
133
+ }
134
+ },
135
+ props: {
136
+ jsonData: {
137
+ type: Array,
138
+ default: () => {
139
+ return []
140
+ }
141
+ },
142
+ queryParamsName: {
143
+ type: String,
144
+ default: () => {
145
+ return ''
146
+ }
147
+ },
148
+ // 查询参数对象, 用于没有对应查询配置文件名时
149
+ queryParams: {
150
+ type: Object,
151
+ default: null
152
+ },
153
+ form: {
154
+ type: Object,
155
+ default: () => {
156
+ return {}
157
+ }
158
+ },
159
+ // 固定查询表单
160
+ fixedQueryForm: {
161
+ type: Object,
162
+ default: () => {
163
+ return {}
164
+ }
165
+ },
166
+ // 按钮
167
+ buttonState: {
168
+ type: Object,
169
+ default: () => {
170
+ return undefined
171
+ }
172
+ },
173
+ // 数据只有一页时是否展示分页,true:展示,auto:隐藏
174
+ showPagination: {
175
+ type: Boolean,
176
+ default: true
177
+ }
178
+ },
179
+ computed: {
180
+ rowSelection () {
181
+ return {
182
+ selectedRowKeys: this.selectedRowKeys,
183
+ onChange: this.onSelectChange
184
+ }
185
+ }
186
+ },
187
+ mounted () {
188
+ this.initTableParams()
189
+ },
190
+ methods: {
191
+ badgeFilter (key, value) {
192
+ return this.$appdata.getParam(key, value)
193
+ },
194
+ initTableParams () {
195
+ let totalWidth = 0
196
+ this.rowKey = this.tableColumns[0].dataIndex
197
+ for (let i = 0; i < this.tableColumns.length; i++) {
198
+ const item = this.tableColumns[i]
199
+ if (item.slotType === 'action') {
200
+ item.fixed = 'right'
201
+ item.width = 70
202
+ }
203
+ if (item.width) {
204
+ totalWidth = totalWidth + item.width
205
+ } else {
206
+ totalWidth = totalWidth + 180
207
+ }
208
+ }
209
+ const width = document.documentElement.clientWidth
210
+ if (width >= 1600) {
211
+ this.scrollYWidth = 429
212
+ } else if (width >= 1200) {
213
+ this.scrollYWidth = 390
214
+ } else {
215
+ this.scrollYWidth = 343
216
+ }
217
+ // 横向滚动长度大于所有宽度,才能实现固定表头
218
+ this.scrollXWidth = totalWidth
219
+ },
220
+ loadTableData (requestParameters) {
221
+ let data = []
222
+ this.$emit('loadData', requestParameters, val => {
223
+ data = val
224
+ })
225
+ const _this = this
226
+ data.then(res => {
227
+ _this.dataSource = res.data
228
+ })
229
+ return data
230
+ },
231
+ action (record, actionType) {
232
+ this.$emit('action', record, record[this.jsonData[0].dataIndex], actionType)
233
+ },
234
+ onSelectChange (selectedRowKeys, selectedRows) {
235
+ this.selectedRowKeys = selectedRowKeys
236
+ this.selectedRows = selectedRows
237
+ this.$emit('selectRow', selectedRowKeys)
238
+ },
239
+ clearRowKeys () {
240
+ this.$refs.table.clearSelected()
241
+ },
242
+ /**
243
+ * 表格重新加载方法
244
+ * 如果参数为 true, 则强制刷新到第一页
245
+ */
246
+ refresh (bool) {
247
+ this.$refs.table.refresh(bool)
248
+ },
249
+ format (date, format) {
250
+ return formatDate(date, format)
251
+ },
252
+ showDrawer () {
253
+ this.visible = true
254
+ },
255
+ toggleIsFormShow () {
256
+ this.$emit('toggleIsFormShow')
257
+ }
258
+ }
259
+ }
260
+ </script>
261
+ <style lang="less" scoped>
262
+ </style>