vue2-client 1.3.20 → 1.3.22

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