vue2-client 1.6.12 → 1.6.13

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 (104) hide show
  1. package/CHANGELOG.md +555 -552
  2. package/index.js +30 -30
  3. package/package.json +78 -78
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +226 -226
  5. package/src/base-client/components/common/CitySelect/CitySelect.vue +247 -247
  6. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +733 -733
  7. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +508 -508
  8. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +140 -140
  9. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  10. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  11. package/src/base-client/components/common/XAddForm/XAddForm.vue +326 -326
  12. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  13. package/src/base-client/components/common/XForm/XForm.vue +180 -180
  14. package/src/base-client/components/common/XFormTable/XFormTable.vue +334 -334
  15. package/src/base-client/components/common/XFormTable/index.md +97 -97
  16. package/src/base-client/components/common/XTable/XTable.vue +505 -506
  17. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +109 -109
  18. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  19. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  20. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  21. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  22. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  23. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  24. package/src/base-client/plugins/AppData.js +76 -76
  25. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  26. package/src/base-client/plugins/PagedList.js +177 -177
  27. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  28. package/src/base-client/plugins/i18n-extend.js +32 -32
  29. package/src/components/Ellipsis/Ellipsis.vue +65 -65
  30. package/src/components/Ellipsis/index.md +38 -38
  31. package/src/components/NumberInfo/index.md +43 -43
  32. package/src/components/STable/README.md +341 -341
  33. package/src/components/STable/index.js +318 -318
  34. package/src/components/Trend/index.md +45 -45
  35. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  36. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  37. package/src/components/exception/ExceptionPage.vue +70 -70
  38. package/src/components/form/FormRow.vue +52 -52
  39. package/src/components/index.js +36 -36
  40. package/src/components/menu/SideMenu.vue +62 -62
  41. package/src/components/menu/menu.js +273 -273
  42. package/src/components/page/header/index.less +40 -40
  43. package/src/components/setting/Setting.vue +235 -235
  44. package/src/components/table/StandardTable.vue +141 -141
  45. package/src/components/table/advance/ActionColumns.vue +158 -158
  46. package/src/components/table/advance/SearchArea.vue +355 -355
  47. package/src/components/tool/AStepItem.vue +60 -60
  48. package/src/components/tool/AvatarList.vue +68 -68
  49. package/src/components/tool/Drawer.vue +142 -142
  50. package/src/components/tool/TagSelect.vue +83 -83
  51. package/src/components/transition/PageToggleTransition.vue +97 -97
  52. package/src/config/default/admin.config.js +18 -18
  53. package/src/config/default/setting.config.js +44 -44
  54. package/src/config/replacer/resolve.config.js +67 -67
  55. package/src/layouts/AdminLayout.vue +174 -174
  56. package/src/layouts/CommonLayout.vue +42 -42
  57. package/src/layouts/ComponentLayoutOne.vue +47 -47
  58. package/src/layouts/PageLayout.vue +151 -151
  59. package/src/layouts/SinglePageView.vue +111 -111
  60. package/src/layouts/footer/PageFooter.vue +49 -49
  61. package/src/layouts/header/AdminHeader.vue +104 -104
  62. package/src/layouts/header/HeaderAvatar.vue +64 -64
  63. package/src/layouts/header/HeaderNotice.vue +176 -176
  64. package/src/layouts/header/HeaderSearch.vue +67 -67
  65. package/src/layouts/header/InstitutionDetail.vue +181 -181
  66. package/src/layouts/header/index.less +92 -92
  67. package/src/layouts/tabs/TabsHead.vue +190 -190
  68. package/src/layouts/tabs/TabsView.vue +379 -379
  69. package/src/mock/goods/index.js +108 -108
  70. package/src/pages/exception/404.vue +25 -25
  71. package/src/pages/login/Login.vue +363 -363
  72. package/src/pages/report/ReportTable.js +124 -124
  73. package/src/pages/report/ReportTableHome.vue +28 -28
  74. package/src/pages/resourceManage/orgListManage.vue +98 -98
  75. package/src/pages/system/file/index.vue +317 -317
  76. package/src/pages/system/settings/index.vue +126 -126
  77. package/src/pages/system/settings/modifyPassword.vue +109 -109
  78. package/src/router/async/config.async.js +28 -28
  79. package/src/router/async/router.map.js +68 -68
  80. package/src/router/index.js +27 -27
  81. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  82. package/src/services/api/LogDetailsViewApi.js +10 -10
  83. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  84. package/src/services/api/TicketDetailsViewApi.js +34 -34
  85. package/src/services/api/cas.js +79 -79
  86. package/src/services/api/commonTempTable.js +10 -10
  87. package/src/services/api/index.js +17 -17
  88. package/src/services/api/logininfor/index.js +6 -6
  89. package/src/services/api/manage.js +8 -8
  90. package/src/services/apiService.js +14 -14
  91. package/src/services/user.js +64 -64
  92. package/src/store/modules/index.js +4 -4
  93. package/src/theme/default/nprogress.less +76 -76
  94. package/src/theme/default/style.less +47 -47
  95. package/src/utils/colors.js +107 -107
  96. package/src/utils/excel/Blob.js +180 -180
  97. package/src/utils/excel/Export2Excel.js +141 -141
  98. package/src/utils/formatter.js +68 -68
  99. package/src/utils/i18n.js +80 -80
  100. package/src/utils/request.js +311 -311
  101. package/src/utils/theme-color-replacer-extend.js +91 -91
  102. package/src/utils/themeUtil.js +100 -100
  103. package/src/utils/util.js +230 -230
  104. package/vue.config.js +106 -106
@@ -1,334 +1,334 @@
1
- <template>
2
- <div>
3
- <a-skeleton :loading="loading" :paragraph="{ rows: 4 }" />
4
- <div v-show="!loading">
5
- <x-add-form
6
- ref="xAddForm"
7
- :get-data-params="getDataParams"
8
- @onSubmit="onAddOrEditSubmit"
9
- />
10
- <x-form
11
- ref="xForm"
12
- :get-data-params="getDataParams"
13
- style="margin-bottom: 14px;"
14
- @onSubmit="onSearchSubmit">
15
- <slot name="formBtnExpand"></slot>
16
- </x-form>
17
- <x-table
18
- ref="xTable"
19
- :fixedQueryForm="fixedQueryForm"
20
- :queryParamsName="queryParamsName"
21
- :query-params-json="queryParamsJson"
22
- :show-pagination="showPagination"
23
- @add="add"
24
- @edit="edit"
25
- @afterDelete="afterDelete"
26
- @action="action"
27
- @selectRow="selectRow"
28
- @afterQuery="afterQuery"
29
- @tempTableEdit="tempTableEdit">
30
- <template slot="button" slot-scope="{selectedRowKeys, selectedRows}">
31
- <slot name="button" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
32
- </template>
33
- <template slot="rightBtnExpand" slot-scope="{selectedRowKeys, selectedRows}">
34
- <slot name="rightBtnExpand" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
35
- <a-button @click="toggleIsFormShow">
36
- <a-icon :style="iconStyle" type="vertical-align-top"/>
37
- </a-button>
38
- </template>
39
- <!-- 底部插槽 -->
40
- <template slot="footer" slot-scope="{selectedRowKeys, selectedRows}">
41
- <slot name="footer" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
42
- </template>
43
- </x-table>
44
- </div>
45
- </div>
46
- </template>
47
- <script>
48
- import XForm from '@vue2-client/base-client/components/common/XForm'
49
- import XAddForm from '@vue2-client/base-client/components/common/XAddForm'
50
- import XTable from '@vue2-client/base-client/components/common/XTable'
51
- import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
52
- import { addOrModify, commonApi } from '@vue2-client/services/api/common'
53
- import { indexedDB } from '@vue2-client/utils/indexedDB'
54
- import { mapState } from 'vuex'
55
- import { post } from '@vue2-client/services/api/restTools'
56
-
57
- export default {
58
- name: 'XFormTable',
59
- components: {
60
- XTable,
61
- XForm,
62
- XAddForm,
63
- XImportExcel
64
- },
65
- data () {
66
- return {
67
- // 加载状态
68
- loading: false,
69
- // 图标样式
70
- iconStyle: {
71
- position: 'relative',
72
- top: '1px'
73
- }
74
- }
75
- },
76
- computed: {
77
- ...mapState('setting', ['isMobile'])
78
- },
79
- props: {
80
- // 业务名称
81
- title: {
82
- type: String,
83
- default: ''
84
- },
85
- // 查询配置文件名
86
- queryParamsName: {
87
- type: String,
88
- default: null
89
- },
90
- // 查询配置文件Json,用于查询配置生成器的预览
91
- queryParamsJson: {
92
- type: Object,
93
- default: null
94
- },
95
- // 业务逻辑名称, 通过logic获取表单表格配置
96
- logicName: {
97
- type: String,
98
- default: null
99
- },
100
- // 执行logic传递的参数
101
- logicParam: {
102
- type: Object,
103
- default: () => {}
104
- },
105
- // 固定新增表单
106
- fixedAddForm: {
107
- type: Object,
108
- default: () => {
109
- return {}
110
- }
111
- },
112
- // 固定查询表单
113
- fixedQueryForm: {
114
- type: Object,
115
- default: () => {
116
- return {}
117
- }
118
- },
119
- // 预览模式
120
- viewMode: {
121
- type: Boolean,
122
- default: () => {
123
- return false
124
- }
125
- },
126
- // 数据只有一页时是否展示分页,true:展示,auto:隐藏
127
- showPagination: {
128
- type: Boolean,
129
- default: true
130
- },
131
- // 调用logic获取数据源的追加参数
132
- getDataParams: {
133
- type: Object,
134
- default: undefined
135
- }
136
- },
137
- watch: {
138
- logicParam: {
139
- handler () {
140
- this.getColumnJsonByLogic()
141
- },
142
- deep: true
143
- },
144
- fixedQueryForm: {
145
- handler () {
146
- this.$nextTick(() => {
147
- this.refreshTable(true)
148
- })
149
- },
150
- deep: true
151
- },
152
- queryParamsJson: {
153
- handler () {
154
- this.getColumnsJsonBySource()
155
- },
156
- deep: true
157
- },
158
- queryParamsName: {
159
- handler () {
160
- this.getColumnsJson()
161
- }
162
- }
163
- },
164
- created () {
165
- if (this.queryParamsName) {
166
- this.getColumnsJson()
167
- } else if (this.queryParamsJson) {
168
- this.getColumnsJsonBySource()
169
- }
170
- },
171
- methods: {
172
- getColumnsJson () {
173
- this.loading = true
174
- indexedDB.getByWeb(this.queryParamsName, commonApi.getColumnsJson, { str: this.queryParamsName }, (res) => {
175
- this.updateComponents(res)
176
- })
177
- },
178
- getColumnsJsonBySource () {
179
- this.loading = true
180
- post(commonApi.getColumnsJson, { queryObject: this.queryParamsJson }).then(res => {
181
- this.updateComponents(res, true)
182
- })
183
- },
184
- getColumnJsonByLogic () {
185
- this.loading = true
186
- indexedDB.getByWeb(`${this.logicName}_${JSON.stringify(this.logicParam)}`, commonApi.getColumnsJson, { logic: this.logicName, logicParam: this.logicParam }, (res) => {
187
- this.updateComponents(res, true)
188
- })
189
- },
190
- /**
191
- * 更新子组件
192
- * @param res 参数
193
- * @param setQueryParams 是否设置queryParams参数
194
- */
195
- updateComponents (res, setQueryParams) {
196
- this.$refs.xTable.init({
197
- queryParams: setQueryParams ? res : null,
198
- tableColumns: res.columnJson,
199
- buttonState: res.buttonState,
200
- title: this.title,
201
- viewMode: this.viewMode,
202
- isTableTemp: this.isTableTemp,
203
- serviceName: res.serviceName
204
- })
205
- this.$refs.xForm.init({
206
- formItems: res.formJson,
207
- serviceName: res.serviceName
208
- })
209
- this.$refs.xAddForm.init({
210
- isShow: !res.buttonState || res.buttonState.add || res.buttonState.edit,
211
- formItems: res.formJson,
212
- viewMode: this.viewMode,
213
- isTableTemp: this.isTableTemp,
214
- serviceName: res.serviceName
215
- })
216
- this.loading = false
217
- },
218
- /**
219
- * 提交查询表单事件
220
- * @param res 参数
221
- */
222
- onSearchSubmit (res) {
223
- if (res.valid) {
224
- // 表单赋值
225
- this.$refs.xTable.setQueryForm(res.form)
226
- // commit
227
- this.$emit('afterSearchSubmit', res)
228
- } else {
229
- return false
230
- }
231
- },
232
- /**
233
- * 提交新增表单事件
234
- */
235
- onAddOrEditSubmit (res, callback) {
236
- // 组织请求
237
- const requestParameters = {
238
- queryParamsName: this.queryParamsName,
239
- queryParams: this.queryParamsJson,
240
- form: res.realForm,
241
- businessType: res.businessType,
242
- operator: res.currUserName
243
- }
244
- addOrModify(requestParameters, res.serviceName).then(data => {
245
- this.$message.success(res.businessType + '成功!')
246
- this.refreshTable(res.businessType === '新增')
247
- // commit
248
- this.$emit('afterSubmit', { type: res.businessType, id: data.id, form: requestParameters.form })
249
- }).catch(e => {
250
- this.$message.error(res.businessType + '失败:' + e)
251
- }).finally(() => {
252
- callback()
253
- })
254
- },
255
- /**
256
- * 表格查询后事件
257
- * @param res 参数
258
- * @param conditionParams 查询条件
259
- */
260
- afterQuery (res, conditionParams) {
261
- this.$emit('afterQuery', res, conditionParams)
262
- },
263
- /**
264
- * 详情按钮事件
265
- * @param record 本条数据
266
- * @param id 数据标识
267
- * @param actionType 操作类型
268
- */
269
- action (record, id, actionType) {
270
- this.$emit('action', record, id, actionType)
271
- },
272
- /**
273
- * 新增按钮事件
274
- */
275
- add () {
276
- this.$refs.xAddForm.open({
277
- businessType: '新增',
278
- title: this.title,
279
- fixedAddForm: this.fixedAddForm
280
- })
281
- },
282
- /**
283
- * 修改按钮事件
284
- * @param res 参数
285
- */
286
- edit (res) {
287
- this.$refs.xAddForm.open({
288
- businessType: '修改',
289
- modifyModelData: res,
290
- title: this.title,
291
- fixedAddForm: this.fixedAddForm
292
- })
293
- },
294
- /**
295
- * 删除后事件
296
- * @param res
297
- */
298
- afterDelete (res) {
299
- this.$emit('afterDelete', res)
300
- },
301
- /**
302
- * 查询表单部分显示/隐藏切换
303
- */
304
- toggleIsFormShow () {
305
- this.$refs.xForm.toggleVisible()
306
- },
307
- /**
308
- * 选择列事件
309
- * @param selectedRowKeys 选中列Key集合
310
- * @param selectedRows 选中列
311
- */
312
- selectRow (selectedRowKeys, selectedRows) {
313
- this.$emit('selectRow', selectedRowKeys, selectedRows)
314
- },
315
- /**
316
- * 临时表修改
317
- * @param res 参数
318
- */
319
- tempTableEdit (res) {
320
- this.$emit('tempTableEdit', res)
321
- },
322
- /**
323
- * 刷新表格
324
- * @param toFirstPage 是否到第一页
325
- */
326
- refreshTable (toFirstPage = true) {
327
- this.$refs.xTable.refresh(toFirstPage)
328
- },
329
- }
330
- }
331
- </script>
332
- <style lang="less" scoped>
333
-
334
- </style>
1
+ <template>
2
+ <div>
3
+ <a-skeleton :loading="loading" :paragraph="{ rows: 4 }" />
4
+ <div v-show="!loading">
5
+ <x-add-form
6
+ ref="xAddForm"
7
+ :get-data-params="getDataParams"
8
+ @onSubmit="onAddOrEditSubmit"
9
+ />
10
+ <x-form
11
+ ref="xForm"
12
+ :get-data-params="getDataParams"
13
+ style="margin-bottom: 14px;"
14
+ @onSubmit="onSearchSubmit">
15
+ <slot name="formBtnExpand"></slot>
16
+ </x-form>
17
+ <x-table
18
+ ref="xTable"
19
+ :fixedQueryForm="fixedQueryForm"
20
+ :queryParamsName="queryParamsName"
21
+ :query-params-json="queryParamsJson"
22
+ :show-pagination="showPagination"
23
+ @add="add"
24
+ @edit="edit"
25
+ @afterDelete="afterDelete"
26
+ @action="action"
27
+ @selectRow="selectRow"
28
+ @afterQuery="afterQuery"
29
+ @tempTableEdit="tempTableEdit">
30
+ <template slot="button" slot-scope="{selectedRowKeys, selectedRows}">
31
+ <slot name="button" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
32
+ </template>
33
+ <template slot="rightBtnExpand" slot-scope="{selectedRowKeys, selectedRows}">
34
+ <slot name="rightBtnExpand" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
35
+ <a-button @click="toggleIsFormShow">
36
+ <a-icon :style="iconStyle" type="vertical-align-top"/>
37
+ </a-button>
38
+ </template>
39
+ <!-- 底部插槽 -->
40
+ <template slot="footer" slot-scope="{selectedRowKeys, selectedRows}">
41
+ <slot name="footer" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
42
+ </template>
43
+ </x-table>
44
+ </div>
45
+ </div>
46
+ </template>
47
+ <script>
48
+ import XForm from '@vue2-client/base-client/components/common/XForm'
49
+ import XAddForm from '@vue2-client/base-client/components/common/XAddForm'
50
+ import XTable from '@vue2-client/base-client/components/common/XTable'
51
+ import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
52
+ import { addOrModify, commonApi } from '@vue2-client/services/api/common'
53
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
54
+ import { mapState } from 'vuex'
55
+ import { post } from '@vue2-client/services/api/restTools'
56
+
57
+ export default {
58
+ name: 'XFormTable',
59
+ components: {
60
+ XTable,
61
+ XForm,
62
+ XAddForm,
63
+ XImportExcel
64
+ },
65
+ data () {
66
+ return {
67
+ // 加载状态
68
+ loading: false,
69
+ // 图标样式
70
+ iconStyle: {
71
+ position: 'relative',
72
+ top: '1px'
73
+ }
74
+ }
75
+ },
76
+ computed: {
77
+ ...mapState('setting', ['isMobile'])
78
+ },
79
+ props: {
80
+ // 业务名称
81
+ title: {
82
+ type: String,
83
+ default: ''
84
+ },
85
+ // 查询配置文件名
86
+ queryParamsName: {
87
+ type: String,
88
+ default: null
89
+ },
90
+ // 查询配置文件Json,用于查询配置生成器的预览
91
+ queryParamsJson: {
92
+ type: Object,
93
+ default: null
94
+ },
95
+ // 业务逻辑名称, 通过logic获取表单表格配置
96
+ logicName: {
97
+ type: String,
98
+ default: null
99
+ },
100
+ // 执行logic传递的参数
101
+ logicParam: {
102
+ type: Object,
103
+ default: () => {}
104
+ },
105
+ // 固定新增表单
106
+ fixedAddForm: {
107
+ type: Object,
108
+ default: () => {
109
+ return {}
110
+ }
111
+ },
112
+ // 固定查询表单
113
+ fixedQueryForm: {
114
+ type: Object,
115
+ default: () => {
116
+ return {}
117
+ }
118
+ },
119
+ // 预览模式
120
+ viewMode: {
121
+ type: Boolean,
122
+ default: () => {
123
+ return false
124
+ }
125
+ },
126
+ // 数据只有一页时是否展示分页,true:展示,auto:隐藏
127
+ showPagination: {
128
+ type: Boolean,
129
+ default: true
130
+ },
131
+ // 调用logic获取数据源的追加参数
132
+ getDataParams: {
133
+ type: Object,
134
+ default: undefined
135
+ }
136
+ },
137
+ watch: {
138
+ logicParam: {
139
+ handler () {
140
+ this.getColumnJsonByLogic()
141
+ },
142
+ deep: true
143
+ },
144
+ fixedQueryForm: {
145
+ handler () {
146
+ this.$nextTick(() => {
147
+ this.refreshTable(true)
148
+ })
149
+ },
150
+ deep: true
151
+ },
152
+ queryParamsJson: {
153
+ handler () {
154
+ this.getColumnsJsonBySource()
155
+ },
156
+ deep: true
157
+ },
158
+ queryParamsName: {
159
+ handler () {
160
+ this.getColumnsJson()
161
+ }
162
+ }
163
+ },
164
+ created () {
165
+ if (this.queryParamsName) {
166
+ this.getColumnsJson()
167
+ } else if (this.queryParamsJson) {
168
+ this.getColumnsJsonBySource()
169
+ }
170
+ },
171
+ methods: {
172
+ getColumnsJson () {
173
+ this.loading = true
174
+ indexedDB.getByWeb(this.queryParamsName, commonApi.getColumnsJson, { str: this.queryParamsName }, (res) => {
175
+ this.updateComponents(res)
176
+ })
177
+ },
178
+ getColumnsJsonBySource () {
179
+ this.loading = true
180
+ post(commonApi.getColumnsJson, { queryObject: this.queryParamsJson }).then(res => {
181
+ this.updateComponents(res, true)
182
+ })
183
+ },
184
+ getColumnJsonByLogic () {
185
+ this.loading = true
186
+ indexedDB.getByWeb(`${this.logicName}_${JSON.stringify(this.logicParam)}`, commonApi.getColumnsJson, { logic: this.logicName, logicParam: this.logicParam }, (res) => {
187
+ this.updateComponents(res, true)
188
+ })
189
+ },
190
+ /**
191
+ * 更新子组件
192
+ * @param res 参数
193
+ * @param setQueryParams 是否设置queryParams参数
194
+ */
195
+ updateComponents (res, setQueryParams) {
196
+ this.$refs.xTable.init({
197
+ queryParams: setQueryParams ? res : null,
198
+ tableColumns: res.columnJson,
199
+ buttonState: res.buttonState,
200
+ title: this.title,
201
+ viewMode: this.viewMode,
202
+ isTableTemp: this.isTableTemp,
203
+ serviceName: res.serviceName
204
+ })
205
+ this.$refs.xForm.init({
206
+ formItems: res.formJson,
207
+ serviceName: res.serviceName
208
+ })
209
+ this.$refs.xAddForm.init({
210
+ isShow: !res.buttonState || res.buttonState.add || res.buttonState.edit,
211
+ formItems: res.formJson,
212
+ viewMode: this.viewMode,
213
+ isTableTemp: this.isTableTemp,
214
+ serviceName: res.serviceName
215
+ })
216
+ this.loading = false
217
+ },
218
+ /**
219
+ * 提交查询表单事件
220
+ * @param res 参数
221
+ */
222
+ onSearchSubmit (res) {
223
+ if (res.valid) {
224
+ // 表单赋值
225
+ this.$refs.xTable.setQueryForm(res.form)
226
+ // commit
227
+ this.$emit('afterSearchSubmit', res)
228
+ } else {
229
+ return false
230
+ }
231
+ },
232
+ /**
233
+ * 提交新增表单事件
234
+ */
235
+ onAddOrEditSubmit (res, callback) {
236
+ // 组织请求
237
+ const requestParameters = {
238
+ queryParamsName: this.queryParamsName,
239
+ queryParams: this.queryParamsJson,
240
+ form: res.realForm,
241
+ businessType: res.businessType,
242
+ operator: res.currUserName
243
+ }
244
+ addOrModify(requestParameters, res.serviceName).then(data => {
245
+ this.$message.success(res.businessType + '成功!')
246
+ this.refreshTable(res.businessType === '新增')
247
+ // commit
248
+ this.$emit('afterSubmit', { type: res.businessType, id: data.id, form: requestParameters.form })
249
+ }).catch(e => {
250
+ this.$message.error(res.businessType + '失败:' + e)
251
+ }).finally(() => {
252
+ callback()
253
+ })
254
+ },
255
+ /**
256
+ * 表格查询后事件
257
+ * @param res 参数
258
+ * @param conditionParams 查询条件
259
+ */
260
+ afterQuery (res, conditionParams) {
261
+ this.$emit('afterQuery', res, conditionParams)
262
+ },
263
+ /**
264
+ * 详情按钮事件
265
+ * @param record 本条数据
266
+ * @param id 数据标识
267
+ * @param actionType 操作类型
268
+ */
269
+ action (record, id, actionType) {
270
+ this.$emit('action', record, id, actionType)
271
+ },
272
+ /**
273
+ * 新增按钮事件
274
+ */
275
+ add () {
276
+ this.$refs.xAddForm.open({
277
+ businessType: '新增',
278
+ title: this.title,
279
+ fixedAddForm: this.fixedAddForm
280
+ })
281
+ },
282
+ /**
283
+ * 修改按钮事件
284
+ * @param res 参数
285
+ */
286
+ edit (res) {
287
+ this.$refs.xAddForm.open({
288
+ businessType: '修改',
289
+ modifyModelData: res,
290
+ title: this.title,
291
+ fixedAddForm: this.fixedAddForm
292
+ })
293
+ },
294
+ /**
295
+ * 删除后事件
296
+ * @param res
297
+ */
298
+ afterDelete (res) {
299
+ this.$emit('afterDelete', res)
300
+ },
301
+ /**
302
+ * 查询表单部分显示/隐藏切换
303
+ */
304
+ toggleIsFormShow () {
305
+ this.$refs.xForm.toggleVisible()
306
+ },
307
+ /**
308
+ * 选择列事件
309
+ * @param selectedRowKeys 选中列Key集合
310
+ * @param selectedRows 选中列
311
+ */
312
+ selectRow (selectedRowKeys, selectedRows) {
313
+ this.$emit('selectRow', selectedRowKeys, selectedRows)
314
+ },
315
+ /**
316
+ * 临时表修改
317
+ * @param res 参数
318
+ */
319
+ tempTableEdit (res) {
320
+ this.$emit('tempTableEdit', res)
321
+ },
322
+ /**
323
+ * 刷新表格
324
+ * @param toFirstPage 是否到第一页
325
+ */
326
+ refreshTable (toFirstPage = true) {
327
+ this.$refs.xTable.refresh(toFirstPage)
328
+ },
329
+ }
330
+ }
331
+ </script>
332
+ <style lang="less" scoped>
333
+
334
+ </style>