vue2-client 1.8.310 → 1.8.312
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.
- package/.env +19 -19
- package/.eslintrc.js +90 -90
- package/CHANGELOG.md +824 -824
- package/Components.md +60 -60
- package/babel.config.js +21 -21
- package/docs/LowCode/lowcode.md +155 -155
- package/docs/LowCode/lowcodeForDeveloper.md +230 -230
- package/docs/index.md +30 -30
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.config.js +21 -21
- package/jest.setup.js +7 -7
- package/package.json +97 -97
- package/public/index.html +27 -27
- package/src/App.vue +188 -188
- package/src/ReportView.js +19 -19
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/assets/svg/badtwo.svg +1 -1
- package/src/assets/svg/goodtwo.svg +1 -1
- package/src/base-client/components/common/AMisRender/index.js +3 -3
- package/src/base-client/components/common/AMisRender/index.vue +263 -263
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +438 -416
- package/src/base-client/components/common/AddressSearchCombobox/demo.vue +36 -36
- package/src/base-client/components/common/AddressSearchCombobox/ic_map.svg +6 -6
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/CitySelect.vue +342 -342
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1014 -1014
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +452 -452
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +511 -511
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorPanel.vue +413 -350
- package/src/base-client/components/common/LowCodeComponent/LowCodePageOrganization.vue +502 -502
- package/src/base-client/components/common/LowCodeComponent/LowCodeRender.vue +728 -699
- package/src/base-client/components/common/LowCodeComponent/LowCodeRenderEnter.vue +29 -29
- package/src/base-client/components/common/LowCodeComponent/LowCodeUIStore.vue +219 -162
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/Upload.vue +239 -239
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +105 -105
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +807 -807
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XAddNativeForm/lowcodeEditorRegister.js +16 -16
- package/src/base-client/components/common/XAddNativeFormOA/XAddNativeFormOA.vue +303 -303
- package/src/base-client/components/common/XAddNativeFormOA/index.js +3 -3
- package/src/base-client/components/common/XAddNativeFormOA/index.md +146 -146
- package/src/base-client/components/common/XBadge/XBadge.vue +78 -78
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataCard/XDataCard.vue +355 -0
- package/src/base-client/components/common/XDataCard/index.js +3 -0
- package/src/base-client/components/common/XDataCard/index.md +1 -0
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/XDescriptions.vue +188 -187
- package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +306 -306
- package/src/base-client/components/common/XDescriptions/demo.vue +50 -50
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +83 -83
- package/src/base-client/components/common/XDetailsView/XDetailsView.vue +214 -214
- package/src/base-client/components/common/XDetailsView/index.js +3 -3
- package/src/base-client/components/common/XForm/XForm.vue +294 -294
- package/src/base-client/components/common/XForm/XFormItem.vue +911 -911
- package/src/base-client/components/common/XForm/XTreeSelect.vue +207 -207
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XFormCol/XFormCol.vue +36 -36
- package/src/base-client/components/common/XFormGroup/XFormGroup.vue +241 -241
- package/src/base-client/components/common/XFormGroup/demo.vue +40 -40
- package/src/base-client/components/common/XFormGroup/index.js +3 -3
- package/src/base-client/components/common/XFormGroup/index.md +38 -38
- package/src/base-client/components/common/XFormGroupDetails/XFormGroupDetails.vue +72 -72
- package/src/base-client/components/common/XFormGroupDetails/index.js +3 -3
- package/src/base-client/components/common/XFormTable/XFormTable.vue +545 -539
- package/src/base-client/components/common/XFormTable/demo.vue +72 -72
- package/src/base-client/components/common/XFormTable/index.md +98 -98
- package/src/base-client/components/common/XFormTable/lowcodeEditorRegister.js +30 -30
- package/src/base-client/components/common/XImportExcel/XImportExcel.vue +147 -147
- package/src/base-client/components/common/XReport/XReport.vue +858 -858
- package/src/base-client/components/common/XReport/XReportDemo.vue +266 -266
- package/src/base-client/components/common/XReport/XReportDesign.vue +509 -509
- package/src/base-client/components/common/XReport/XReportJsonRender.vue +295 -295
- package/src/base-client/components/common/XReport/XReportTrGroup.vue +801 -801
- package/src/base-client/components/common/XReport/index.js +3 -3
- package/src/base-client/components/common/XReport/index.md +44 -44
- package/src/base-client/components/common/XReportSlot/XReportSlot.vue +110 -110
- package/src/base-client/components/common/XReportSlot/index.js +3 -3
- package/src/base-client/components/common/XSimpleDescriptions/XSimpleDescriptions.vue +137 -0
- package/src/base-client/components/common/XSimpleDescriptions/index.js +3 -0
- package/src/base-client/components/common/XSimpleDescriptions/index.md +7 -0
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/XTable.vue +715 -676
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/common/XTree/XTree.vue +423 -423
- package/src/base-client/components/common/XTree/index.js +3 -3
- package/src/base-client/components/common/XTree/index.md +36 -36
- package/src/base-client/components/common/XTreeOne/XTreeOne.vue +114 -114
- package/src/base-client/components/common/XTreeOne/lowcodeEditorRegister.js +11 -11
- package/src/base-client/components/index.js +51 -51
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
- package/src/base-client/plugins/AppData.js +121 -121
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/GetLoginInfoService.js +183 -183
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/bootstrap.js +39 -39
- package/src/components/CodeMirror/inedx.vue +118 -118
- package/src/components/CodeMirror/setting.js +40 -40
- package/src/components/FilePreview/FilePreview.vue +166 -166
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/STable/index.js +361 -361
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/checkbox/ImgCheckbox.vue +163 -163
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/config/CreateQueryConfig.js +322 -322
- package/src/config/default/antd.config.js +89 -89
- package/src/config/default/setting.config.js +55 -55
- package/src/font-style/font.css +4 -4
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/PageLayout.vue +151 -151
- package/src/layouts/SinglePageView.vue +138 -138
- package/src/layouts/header/AdminHeader.vue +132 -132
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/layouts/tabs/TabsHead.vue +189 -189
- package/src/layouts/tabs/TabsView.vue +387 -387
- package/src/lib.js +1 -1
- package/src/main.js +26 -26
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/AMisDemo/AMisDemo.vue +325 -325
- package/src/pages/AMisDemo/AMisDemo2.vue +74 -74
- package/src/pages/DynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/DynamicStatistics/DataTabs.vue +83 -83
- package/src/pages/DynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/DynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/DynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/DynamicStatistics/QuestionHistoryAndFavorites.vue +591 -591
- package/src/pages/DynamicStatistics/SearchBar.vue +192 -192
- package/src/pages/DynamicStatistics/index.vue +282 -282
- package/src/pages/Example/index.vue +193 -33
- package/src/pages/NewDynamicStatistics/ChartSelector.vue +331 -331
- package/src/pages/NewDynamicStatistics/DataTabs.vue +122 -122
- package/src/pages/NewDynamicStatistics/DynamicTable.vue +128 -128
- package/src/pages/NewDynamicStatistics/EvaluationArea.vue +69 -69
- package/src/pages/NewDynamicStatistics/FavoriteList.vue +51 -51
- package/src/pages/NewDynamicStatistics/QuestionHistoryAndFavorites.vue +289 -289
- package/src/pages/NewDynamicStatistics/SearchBar.vue +193 -193
- package/src/pages/NewDynamicStatistics/index.vue +258 -258
- package/src/pages/ServiceReview/index.vue +284 -284
- package/src/pages/XReportView/index.vue +62 -62
- package/src/pages/login/Login.vue +378 -378
- package/src/pages/login/LoginV3.vue +389 -389
- package/src/pages/lowCode/lowCodeEditor.vue +1219 -1030
- package/src/pages/lowCode/lowCodeRenderPage.vue +43 -43
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/pages/system/settings/modifyPassword.vue +117 -117
- package/src/pages/system/ticket/index.vue +480 -480
- package/src/pages/system/ticket/submitTicketSuccess.vue +484 -484
- package/src/router/async/config.async.js +34 -34
- package/src/router/async/router.map.js +104 -104
- package/src/router/guards.js +223 -223
- package/src/router/index.js +27 -27
- package/src/router.js +19 -19
- package/src/services/api/TicketDetailsViewApi.js +46 -46
- package/src/services/api/cas.js +79 -79
- package/src/services/api/common.js +307 -307
- package/src/services/api/entity.js +18 -18
- package/src/services/api/index.js +17 -17
- package/src/services/api/restTools.js +46 -46
- package/src/services/apiService.js +14 -14
- package/src/services/user.js +71 -71
- package/src/services/v3Api.js +81 -81
- package/src/store/modules/index.js +5 -5
- package/src/store/modules/lowCode.js +33 -33
- package/src/store/modules/setting.js +119 -119
- package/src/theme/default/style.less +58 -58
- package/src/theme/global.less +139 -139
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package/src/utils/formatter.js +80 -80
- package/src/utils/htmlToPDF.js +108 -108
- package/src/utils/htmlToPDFApi.js +5 -5
- package/src/utils/indexedDB.js +258 -258
- package/src/utils/login.js +188 -188
- package/src/utils/lowcode/lowcodeComponentMixin.js +120 -120
- package/src/utils/lowcode/lowcodeLog.js +29 -29
- package/src/utils/lowcode/lowcodeUtils.js +373 -373
- package/src/utils/lowcode/registerComponentForEditor.js +11 -11
- package/src/utils/lowcode/registerComponentForRender.js +11 -11
- package/src/utils/map-utils.js +47 -47
- package/src/utils/reg.js +95 -95
- package/src/utils/request.js +347 -347
- package/src/utils/routerUtil.js +435 -435
- package/src/utils/runEvalFunction.js +6 -6
- package/src/utils/util.js +241 -241
- package/src/utils/waterMark.js +31 -31
- package/test/Amis.spec.js +163 -163
- package/test/Tree.spec.js +167 -167
- package/test/myDialog.spec.js +46 -46
- package/vue.config.js +181 -181
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
|
@@ -1,539 +1,545 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-row type="flex" :gutter="{ xs: 8, sm: 10, md: 12, lg: 16 }">
|
|
3
|
-
<a-col
|
|
4
|
-
:xs="14"
|
|
5
|
-
:sm="14"
|
|
6
|
-
:md="12"
|
|
7
|
-
:lg="9"
|
|
8
|
-
:xl="6"
|
|
9
|
-
:xxl="5"
|
|
10
|
-
v-if="xTreeConfigName"
|
|
11
|
-
:style="{ maxWidth: '400px'}">
|
|
12
|
-
<x-tree
|
|
13
|
-
:config-name="xTreeConfigName"
|
|
14
|
-
:env="env"
|
|
15
|
-
@action="action"
|
|
16
|
-
@btnFuncClick="treeBtnFuncClick"
|
|
17
|
-
@treeOnChecked="treeOnChecked"
|
|
18
|
-
ref="xtree"
|
|
19
|
-
></x-tree>
|
|
20
|
-
</a-col>
|
|
21
|
-
<a-col
|
|
22
|
-
:xs="xTreeConfigName ? 10 : 24"
|
|
23
|
-
:sm="xTreeConfigName ? 10 : 24"
|
|
24
|
-
:md="xTreeConfigName ? 12 : 24"
|
|
25
|
-
:lg="xTreeConfigName ? 15 : 24"
|
|
26
|
-
:xl="xTreeConfigName ? 18 : 24"
|
|
27
|
-
:xxl="xTreeConfigName ? 19 : 24">
|
|
28
|
-
<a-skeleton :loading="loading" :paragraph="{ rows: 4 }"/>
|
|
29
|
-
<a-row style="height: 12px" v-if="xTreeConfigName"></a-row>
|
|
30
|
-
<div v-show="!loading">
|
|
31
|
-
<template v-if="!loadError">
|
|
32
|
-
<x-add-form
|
|
33
|
-
ref="xAddForm"
|
|
34
|
-
@afterSubmit="onAddOrEditSubmitAfterSubmit"
|
|
35
|
-
>
|
|
36
|
-
<template slot="groupFormItems" slot-scope="{form, model, rules, modifyModelData}">
|
|
37
|
-
<slot
|
|
38
|
-
name="groupFormItems"
|
|
39
|
-
:form="form"
|
|
40
|
-
:model="model"
|
|
41
|
-
:rules="rules"
|
|
42
|
-
:modifyModelData="modifyModelData"></slot>
|
|
43
|
-
</template>
|
|
44
|
-
</x-add-form>
|
|
45
|
-
<div v-if="crudTitle" class="crud_title">
|
|
46
|
-
{{ crudTitle }}
|
|
47
|
-
</div>
|
|
48
|
-
<x-form
|
|
49
|
-
ref="xForm"
|
|
50
|
-
@toggleAdvanced="toggleAdvanced"
|
|
51
|
-
@onSubmit="onSearchSubmit">
|
|
52
|
-
<slot name="formBtnExpand"></slot>
|
|
53
|
-
</x-form>
|
|
54
|
-
<x-table
|
|
55
|
-
ref="xTable"
|
|
56
|
-
:fixedQueryForm="fixedQueryForm"
|
|
57
|
-
:queryParamsName="queryParamsName"
|
|
58
|
-
:query-params-json="queryParamsJson"
|
|
59
|
-
:show-pagination="showPagination"
|
|
60
|
-
:customDelete="customDelete"
|
|
61
|
-
:extraHeight="extraHeight"
|
|
62
|
-
@add="add"
|
|
63
|
-
@edit="edit"
|
|
64
|
-
@del="del"
|
|
65
|
-
@afterDelete="afterDelete"
|
|
66
|
-
@action="action"
|
|
67
|
-
@selectRow="selectRow"
|
|
68
|
-
@afterQuery="afterQuery"
|
|
69
|
-
@tempTableEdit="tempTableEdit"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
</
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
import
|
|
107
|
-
import
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
this.
|
|
290
|
-
} else {
|
|
291
|
-
this.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
this.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.$refs.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
*
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
this.$
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
*
|
|
475
|
-
*/
|
|
476
|
-
|
|
477
|
-
this.$
|
|
478
|
-
},
|
|
479
|
-
/**
|
|
480
|
-
*
|
|
481
|
-
*/
|
|
482
|
-
|
|
483
|
-
this.
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
*
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<a-row type="flex" :gutter="{ xs: 8, sm: 10, md: 12, lg: 16 }">
|
|
3
|
+
<a-col
|
|
4
|
+
:xs="14"
|
|
5
|
+
:sm="14"
|
|
6
|
+
:md="12"
|
|
7
|
+
:lg="9"
|
|
8
|
+
:xl="6"
|
|
9
|
+
:xxl="5"
|
|
10
|
+
v-if="xTreeConfigName"
|
|
11
|
+
:style="{ maxWidth: '400px'}">
|
|
12
|
+
<x-tree
|
|
13
|
+
:config-name="xTreeConfigName"
|
|
14
|
+
:env="env"
|
|
15
|
+
@action="action"
|
|
16
|
+
@btnFuncClick="treeBtnFuncClick"
|
|
17
|
+
@treeOnChecked="treeOnChecked"
|
|
18
|
+
ref="xtree"
|
|
19
|
+
></x-tree>
|
|
20
|
+
</a-col>
|
|
21
|
+
<a-col
|
|
22
|
+
:xs="xTreeConfigName ? 10 : 24"
|
|
23
|
+
:sm="xTreeConfigName ? 10 : 24"
|
|
24
|
+
:md="xTreeConfigName ? 12 : 24"
|
|
25
|
+
:lg="xTreeConfigName ? 15 : 24"
|
|
26
|
+
:xl="xTreeConfigName ? 18 : 24"
|
|
27
|
+
:xxl="xTreeConfigName ? 19 : 24">
|
|
28
|
+
<a-skeleton :loading="loading" :paragraph="{ rows: 4 }"/>
|
|
29
|
+
<a-row style="height: 12px" v-if="xTreeConfigName"></a-row>
|
|
30
|
+
<div v-show="!loading">
|
|
31
|
+
<template v-if="!loadError">
|
|
32
|
+
<x-add-form
|
|
33
|
+
ref="xAddForm"
|
|
34
|
+
@afterSubmit="onAddOrEditSubmitAfterSubmit"
|
|
35
|
+
>
|
|
36
|
+
<template slot="groupFormItems" slot-scope="{form, model, rules, modifyModelData}">
|
|
37
|
+
<slot
|
|
38
|
+
name="groupFormItems"
|
|
39
|
+
:form="form"
|
|
40
|
+
:model="model"
|
|
41
|
+
:rules="rules"
|
|
42
|
+
:modifyModelData="modifyModelData"></slot>
|
|
43
|
+
</template>
|
|
44
|
+
</x-add-form>
|
|
45
|
+
<div v-if="crudTitle" class="crud_title">
|
|
46
|
+
{{ crudTitle }}
|
|
47
|
+
</div>
|
|
48
|
+
<x-form
|
|
49
|
+
ref="xForm"
|
|
50
|
+
@toggleAdvanced="toggleAdvanced"
|
|
51
|
+
@onSubmit="onSearchSubmit">
|
|
52
|
+
<slot name="formBtnExpand"></slot>
|
|
53
|
+
</x-form>
|
|
54
|
+
<x-table
|
|
55
|
+
ref="xTable"
|
|
56
|
+
:fixedQueryForm="fixedQueryForm"
|
|
57
|
+
:queryParamsName="queryParamsName"
|
|
58
|
+
:query-params-json="queryParamsJson"
|
|
59
|
+
:show-pagination="showPagination"
|
|
60
|
+
:customDelete="customDelete"
|
|
61
|
+
:extraHeight="extraHeight"
|
|
62
|
+
@add="add"
|
|
63
|
+
@edit="edit"
|
|
64
|
+
@del="del"
|
|
65
|
+
@afterDelete="afterDelete"
|
|
66
|
+
@action="action"
|
|
67
|
+
@selectRow="selectRow"
|
|
68
|
+
@afterQuery="afterQuery"
|
|
69
|
+
@tempTableEdit="tempTableEdit"
|
|
70
|
+
:card-mode-config="cardModeConfig"
|
|
71
|
+
:allow-card-mode="allowedCardMode">
|
|
72
|
+
<template slot="leftButton" slot-scope="{selectedRowKeys, selectedRows}">
|
|
73
|
+
<slot name="leftButton" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
|
|
74
|
+
</template>
|
|
75
|
+
<template slot="button" slot-scope="{selectedRowKeys, selectedRows}">
|
|
76
|
+
<slot name="button" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
|
|
77
|
+
</template>
|
|
78
|
+
<template slot="rightBtnExpand" slot-scope="{selectedRowKeys, selectedRows}">
|
|
79
|
+
<slot name="rightBtnExpand" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
|
|
80
|
+
<a-tooltip title="收起查询条件" placement="bottom">
|
|
81
|
+
<a-button @click="toggleIsFormShow">
|
|
82
|
+
<a-icon :style="iconStyle" :type="toggleIsFormIcon"/>
|
|
83
|
+
</a-button>
|
|
84
|
+
</a-tooltip>
|
|
85
|
+
</template>
|
|
86
|
+
<!-- 底部插槽 -->
|
|
87
|
+
<template slot="footer" slot-scope="{selectedRowKeys, selectedRows}">
|
|
88
|
+
<slot name="footer" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
|
|
89
|
+
</template>
|
|
90
|
+
<!-- excel导入说明插槽 -->
|
|
91
|
+
<template #importExcelSlot>
|
|
92
|
+
<slot name="importExcelSlot"></slot>
|
|
93
|
+
</template>
|
|
94
|
+
</x-table>
|
|
95
|
+
</template>
|
|
96
|
+
<template v-else>
|
|
97
|
+
<a-empty>
|
|
98
|
+
<span slot="description"> 页面配置不存在请联系系统管理员, </span>
|
|
99
|
+
</a-empty>
|
|
100
|
+
</template>
|
|
101
|
+
</div>
|
|
102
|
+
</a-col>
|
|
103
|
+
</a-row>
|
|
104
|
+
</template>
|
|
105
|
+
<script>
|
|
106
|
+
import XForm from '@vue2-client/base-client/components/common/XForm'
|
|
107
|
+
import XAddForm from '@vue2-client/base-client/components/common/XAddForm'
|
|
108
|
+
import XTable from '@vue2-client/base-client/components/common/XTable'
|
|
109
|
+
import XTree from '@vue2-client/base-client/components/common/XTree'
|
|
110
|
+
import XImportExcel from '@vue2-client/base-client/components/common/XImportExcel'
|
|
111
|
+
import {
|
|
112
|
+
getConfigByName,
|
|
113
|
+
getConfigByLogic,
|
|
114
|
+
parseConfig,
|
|
115
|
+
} from '@vue2-client/services/api/common'
|
|
116
|
+
import { mapState } from 'vuex'
|
|
117
|
+
import lowcodeComponentMixin from '@vue2-client/utils/lowcode/lowcodeComponentMixin'
|
|
118
|
+
|
|
119
|
+
export default {
|
|
120
|
+
name: 'XFormTable',
|
|
121
|
+
components: {
|
|
122
|
+
XTable,
|
|
123
|
+
XForm,
|
|
124
|
+
XTree,
|
|
125
|
+
XAddForm,
|
|
126
|
+
XImportExcel
|
|
127
|
+
},
|
|
128
|
+
data () {
|
|
129
|
+
return {
|
|
130
|
+
// 加载状态
|
|
131
|
+
loading: false,
|
|
132
|
+
// 图标样式
|
|
133
|
+
iconStyle: {
|
|
134
|
+
position: 'relative',
|
|
135
|
+
top: '1px'
|
|
136
|
+
},
|
|
137
|
+
loadError: false,
|
|
138
|
+
// 实际查询配置内容
|
|
139
|
+
realQueryConfig: {},
|
|
140
|
+
toggleIsFormIcon: 'vertical-align-top',
|
|
141
|
+
table_selectedRowKeys: [],
|
|
142
|
+
table_selectedRows: [],
|
|
143
|
+
allowedCardMode: false,
|
|
144
|
+
cardModeConfig: undefined
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
computed: {
|
|
148
|
+
...mapState('setting', ['isMobile'])
|
|
149
|
+
},
|
|
150
|
+
mixins: [lowcodeComponentMixin],
|
|
151
|
+
props: {
|
|
152
|
+
// 业务名称
|
|
153
|
+
title: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: ''
|
|
156
|
+
},
|
|
157
|
+
// 卡片标题
|
|
158
|
+
crudTitle: {
|
|
159
|
+
type: String,
|
|
160
|
+
default: null
|
|
161
|
+
},
|
|
162
|
+
// 查询配置文件名
|
|
163
|
+
queryParamsName: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: null
|
|
166
|
+
},
|
|
167
|
+
// 配置所属命名空间
|
|
168
|
+
serviceName: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: undefined
|
|
171
|
+
},
|
|
172
|
+
// 查询配置文件Json,用于查询配置生成器的预览
|
|
173
|
+
queryParamsJson: {
|
|
174
|
+
type: Object,
|
|
175
|
+
default: null
|
|
176
|
+
},
|
|
177
|
+
// xTree 配置
|
|
178
|
+
xTreeConfigName: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: null
|
|
181
|
+
},
|
|
182
|
+
// 业务逻辑名称, 通过logic获取表单表格配置
|
|
183
|
+
logicName: {
|
|
184
|
+
type: String,
|
|
185
|
+
default: null
|
|
186
|
+
},
|
|
187
|
+
// 执行logic传递的参数
|
|
188
|
+
logicParam: {
|
|
189
|
+
type: Object,
|
|
190
|
+
default: () => {
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
// 固定新增表单
|
|
194
|
+
fixedAddForm: {
|
|
195
|
+
type: Object,
|
|
196
|
+
default: () => {
|
|
197
|
+
return {}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
// 固定查询表单
|
|
201
|
+
fixedQueryForm: {
|
|
202
|
+
type: Object,
|
|
203
|
+
default: () => {
|
|
204
|
+
return {}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
// 预览模式
|
|
208
|
+
viewMode: {
|
|
209
|
+
type: Boolean,
|
|
210
|
+
default: () => {
|
|
211
|
+
return false
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
// 环境
|
|
215
|
+
env: {
|
|
216
|
+
type: String,
|
|
217
|
+
default: () => {
|
|
218
|
+
return 'prod'
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
// 数据只有一页时是否展示分页,true:展示,auto:隐藏
|
|
222
|
+
showPagination: {
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: true
|
|
225
|
+
},
|
|
226
|
+
// 调用logic获取数据源的追加参数
|
|
227
|
+
getDataParams: {
|
|
228
|
+
type: Object,
|
|
229
|
+
default: undefined
|
|
230
|
+
},
|
|
231
|
+
// 可以控制组件中导出等按钮的隐藏
|
|
232
|
+
buttonState: {
|
|
233
|
+
type: Object,
|
|
234
|
+
default: undefined
|
|
235
|
+
},
|
|
236
|
+
// 是否自定义新增按钮的功能
|
|
237
|
+
customAdd: {
|
|
238
|
+
type: Boolean,
|
|
239
|
+
default: false
|
|
240
|
+
},
|
|
241
|
+
// 是否自定义删除按钮的功能
|
|
242
|
+
customDelete: {
|
|
243
|
+
type: Boolean,
|
|
244
|
+
default: false
|
|
245
|
+
},
|
|
246
|
+
// 是否自定义修改按钮的功能
|
|
247
|
+
customEdit: {
|
|
248
|
+
type: Boolean,
|
|
249
|
+
default: false
|
|
250
|
+
},
|
|
251
|
+
// 自适应底部边距
|
|
252
|
+
extraHeight: {
|
|
253
|
+
type: Number,
|
|
254
|
+
default: 80
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
watch: {
|
|
258
|
+
logicParam: {
|
|
259
|
+
handler () {
|
|
260
|
+
this.initConfig()
|
|
261
|
+
},
|
|
262
|
+
deep: true
|
|
263
|
+
},
|
|
264
|
+
queryParamsJson: {
|
|
265
|
+
handler () {
|
|
266
|
+
this.initConfig()
|
|
267
|
+
},
|
|
268
|
+
deep: true
|
|
269
|
+
},
|
|
270
|
+
queryParamsName: {
|
|
271
|
+
handler () {
|
|
272
|
+
this.initConfig()
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
serviceName: {
|
|
276
|
+
handler () {
|
|
277
|
+
this.initConfig()
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
created () {
|
|
282
|
+
this.initConfig()
|
|
283
|
+
},
|
|
284
|
+
methods: {
|
|
285
|
+
initConfig () {
|
|
286
|
+
this.loading = true
|
|
287
|
+
this.loadError = false
|
|
288
|
+
if (this.queryParamsName) {
|
|
289
|
+
this.getConfig()
|
|
290
|
+
} else if (this.queryParamsJson) {
|
|
291
|
+
this.getConfigBySource()
|
|
292
|
+
} else if (this.logicName && this.logicParam) {
|
|
293
|
+
this.getColumnJsonByLogic()
|
|
294
|
+
} else {
|
|
295
|
+
this.loading = false
|
|
296
|
+
this.loadError = true
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
getConfig () {
|
|
300
|
+
getConfigByName(this.queryParamsName, this.serviceName, (res) => {
|
|
301
|
+
this.allowedCardMode = res.allowedCardMode
|
|
302
|
+
this.cardModeConfig = res.cardModeConfig
|
|
303
|
+
this.updateComponents(res)
|
|
304
|
+
}, this.env === 'dev')
|
|
305
|
+
},
|
|
306
|
+
getConfigBySource () {
|
|
307
|
+
parseConfig(this.queryParamsJson, 'CRUD_FORM', this.serviceName, this.env === 'dev').then(res => {
|
|
308
|
+
this.updateComponents(res, true)
|
|
309
|
+
})
|
|
310
|
+
},
|
|
311
|
+
getColumnJsonByLogic () {
|
|
312
|
+
getConfigByLogic(this.logicName, this.logicParam, this.serviceName, (res) => {
|
|
313
|
+
this.updateComponents(res, true)
|
|
314
|
+
}, this.env === 'dev')
|
|
315
|
+
},
|
|
316
|
+
/**
|
|
317
|
+
* 更新子组件
|
|
318
|
+
* @param res 参数
|
|
319
|
+
* @param setQueryParams 是否设置queryParams参数
|
|
320
|
+
*/
|
|
321
|
+
updateComponents (res, setQueryParams) {
|
|
322
|
+
this.realQueryConfig = res
|
|
323
|
+
if (this.$refs.xTable && this.$refs.xForm && this.$refs.xAddForm) {
|
|
324
|
+
this.$refs.xForm.init({
|
|
325
|
+
formItems: res.formJson,
|
|
326
|
+
serviceName: this.serviceName,
|
|
327
|
+
getDataParams: this.getDataParams,
|
|
328
|
+
env: this.env
|
|
329
|
+
})
|
|
330
|
+
this.$refs.xTable.init({
|
|
331
|
+
queryParams: setQueryParams ? res : null,
|
|
332
|
+
tableColumns: res.columnJson,
|
|
333
|
+
buttonState: Object.assign(res.buttonState, this.buttonState),
|
|
334
|
+
title: this.title,
|
|
335
|
+
viewMode: this.viewMode,
|
|
336
|
+
tableSummaryMap: res.tableSummaryMap,
|
|
337
|
+
isTableTemp: this.isTableTemp,
|
|
338
|
+
serviceName: this.serviceName,
|
|
339
|
+
env: this.env,
|
|
340
|
+
form: this.$refs.xForm.form
|
|
341
|
+
})
|
|
342
|
+
}
|
|
343
|
+
this.loading = false
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* 提交查询表单事件
|
|
347
|
+
* @param res 参数
|
|
348
|
+
*/
|
|
349
|
+
onSearchSubmit (res) {
|
|
350
|
+
if (res.valid) {
|
|
351
|
+
// 表单赋值
|
|
352
|
+
this.$refs.xTable.setQueryForm(res.form)
|
|
353
|
+
// commit
|
|
354
|
+
this.$emit('afterSearchSubmit', res)
|
|
355
|
+
} else {
|
|
356
|
+
return false
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
active (props) {
|
|
360
|
+
let num = false
|
|
361
|
+
for (const key in props) {
|
|
362
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
363
|
+
if (this.$props.hasOwnProperty(key)) {
|
|
364
|
+
console.log('key', this.$props[key] instanceof Object)
|
|
365
|
+
if (this.$props[key] instanceof Object) {
|
|
366
|
+
this.$props[key] = JSON.parse(props[key])
|
|
367
|
+
} else {
|
|
368
|
+
this.$props[key] = props[key]
|
|
369
|
+
}
|
|
370
|
+
num = true
|
|
371
|
+
}
|
|
372
|
+
console.log(key, props[key])
|
|
373
|
+
}
|
|
374
|
+
console.warn('activeProps', this.$props)
|
|
375
|
+
if (num) {
|
|
376
|
+
this.initConfig()
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* 提交新增/修改表单后事件
|
|
381
|
+
*/
|
|
382
|
+
onAddOrEditSubmitAfterSubmit (res) {
|
|
383
|
+
this.refreshTable(res.businessType === '新增')
|
|
384
|
+
// commit
|
|
385
|
+
this.$emit('afterSubmit', res)
|
|
386
|
+
},
|
|
387
|
+
/**
|
|
388
|
+
* 表格查询后事件
|
|
389
|
+
* @param res 参数
|
|
390
|
+
* @param conditionParams 查询条件
|
|
391
|
+
*/
|
|
392
|
+
afterQuery (res, conditionParams) {
|
|
393
|
+
this.$emit('afterQuery', res, conditionParams)
|
|
394
|
+
},
|
|
395
|
+
/**
|
|
396
|
+
* 详情按钮事件
|
|
397
|
+
* @param record 本条数据
|
|
398
|
+
* @param id 数据标识
|
|
399
|
+
* @param actionType 操作类型
|
|
400
|
+
* @param fun 向上级传递的事件
|
|
401
|
+
*/
|
|
402
|
+
action (record, id, actionType, fun = 'action') {
|
|
403
|
+
this.$emit(fun, record, id, actionType)
|
|
404
|
+
this.$lowCodeEmit(fun, record)
|
|
405
|
+
},
|
|
406
|
+
treeOnChecked (checkedKeys, deepNodes, deepKeys) {
|
|
407
|
+
this.$emit('treeOnChecked', checkedKeys, deepNodes, deepKeys)
|
|
408
|
+
},
|
|
409
|
+
treeBtnFuncClick (index, func) {
|
|
410
|
+
this.$emit('treeBtnFuncClick', index, func)
|
|
411
|
+
},
|
|
412
|
+
/**
|
|
413
|
+
* 新增按钮事件
|
|
414
|
+
*/
|
|
415
|
+
del (keys, callback) {
|
|
416
|
+
if (this.customDelete) {
|
|
417
|
+
this.$emit('del', keys, callback)
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
/**
|
|
421
|
+
* 新增按钮事件
|
|
422
|
+
*/
|
|
423
|
+
add () {
|
|
424
|
+
if (this.customAdd) {
|
|
425
|
+
this.$emit('add')
|
|
426
|
+
} else {
|
|
427
|
+
const res = this.realQueryConfig
|
|
428
|
+
this.$refs.xAddForm.init({
|
|
429
|
+
businessType: '新增',
|
|
430
|
+
title: this.title,
|
|
431
|
+
isShow: !res.buttonState || res.buttonState.add || res.buttonState.edit,
|
|
432
|
+
configName: this.queryParamsName,
|
|
433
|
+
configContent: this.queryParamsJson,
|
|
434
|
+
formItems: res.formJson,
|
|
435
|
+
viewMode: this.viewMode,
|
|
436
|
+
isTableTemp: this.isTableTemp,
|
|
437
|
+
serviceName: this.serviceName,
|
|
438
|
+
fixedAddForm: this.fixedAddForm,
|
|
439
|
+
getDataParams: this.getDataParams,
|
|
440
|
+
layout: res.xAddFormLayout || 'horizontal',
|
|
441
|
+
env: this.env
|
|
442
|
+
})
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
/**
|
|
446
|
+
* 修改按钮事件
|
|
447
|
+
* @param modifyModelData 修改表单数据
|
|
448
|
+
*/
|
|
449
|
+
edit (modifyModelData) {
|
|
450
|
+
if (this.customAdd) {
|
|
451
|
+
this.$emit('edit')
|
|
452
|
+
} else {
|
|
453
|
+
const res = this.realQueryConfig
|
|
454
|
+
this.$refs.xAddForm.init({
|
|
455
|
+
businessType: '修改',
|
|
456
|
+
title: this.title,
|
|
457
|
+
isShow: !res.buttonState || res.buttonState.add || res.buttonState.edit,
|
|
458
|
+
configName: this.queryParamsName,
|
|
459
|
+
configContent: this.queryParamsJson,
|
|
460
|
+
formItems: res.formJson,
|
|
461
|
+
viewMode: this.viewMode,
|
|
462
|
+
isTableTemp: this.isTableTemp,
|
|
463
|
+
serviceName: this.serviceName,
|
|
464
|
+
fixedAddForm: this.fixedAddForm,
|
|
465
|
+
getDataParams: this.getDataParams,
|
|
466
|
+
modifyModelData: modifyModelData,
|
|
467
|
+
layout: res.xAddFormLayout || 'horizontal',
|
|
468
|
+
env: this.env
|
|
469
|
+
})
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
/**
|
|
473
|
+
* 删除后事件
|
|
474
|
+
* @param res
|
|
475
|
+
*/
|
|
476
|
+
afterDelete (res) {
|
|
477
|
+
this.$emit('afterDelete', res)
|
|
478
|
+
},
|
|
479
|
+
/**
|
|
480
|
+
* 更多条件是否展示
|
|
481
|
+
*/
|
|
482
|
+
toggleAdvanced () {
|
|
483
|
+
this.$refs.xTable.setScrollYHeight({})
|
|
484
|
+
},
|
|
485
|
+
/**
|
|
486
|
+
* 查询表单部分显示/隐藏切换
|
|
487
|
+
*/
|
|
488
|
+
toggleIsFormShow () {
|
|
489
|
+
this.toggleIsFormIcon = this.toggleIsFormIcon === 'vertical-align-top' ? 'vertical-align-bottom' : 'vertical-align-top'
|
|
490
|
+
this.$refs.xForm.toggleVisible()
|
|
491
|
+
this.$refs.xTable.setScrollYHeight({})
|
|
492
|
+
},
|
|
493
|
+
/**
|
|
494
|
+
* 选择列事件
|
|
495
|
+
* @param selectedRowKeys 选中列Key集合
|
|
496
|
+
* @param selectedRows 选中列
|
|
497
|
+
*/
|
|
498
|
+
selectRow (selectedRowKeys, selectedRows) {
|
|
499
|
+
this.table_selectedRowKeys = selectedRowKeys
|
|
500
|
+
this.table_selectedRows = selectedRows
|
|
501
|
+
this.$emit('selectRow', selectedRowKeys, selectedRows)
|
|
502
|
+
},
|
|
503
|
+
/**
|
|
504
|
+
* 临时表修改
|
|
505
|
+
* @param res 参数
|
|
506
|
+
*/
|
|
507
|
+
tempTableEdit (res) {
|
|
508
|
+
this.$emit('tempTableEdit', res)
|
|
509
|
+
},
|
|
510
|
+
/**
|
|
511
|
+
* 刷新表格
|
|
512
|
+
* @param toFirstPage 是否到第一页
|
|
513
|
+
*/
|
|
514
|
+
refreshTable (toFirstPage = true) {
|
|
515
|
+
this.$refs.xTable.refresh(toFirstPage)
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
action: {
|
|
519
|
+
/**
|
|
520
|
+
* 实现doAction方法
|
|
521
|
+
*/
|
|
522
|
+
doAction (actionType, args, data) {
|
|
523
|
+
switch (actionType) {
|
|
524
|
+
case 'refreshTable':
|
|
525
|
+
for (const item in args) {
|
|
526
|
+
console.log('item', item)
|
|
527
|
+
}
|
|
528
|
+
break
|
|
529
|
+
default:
|
|
530
|
+
break
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
</script>
|
|
536
|
+
<style lang="less" scoped>
|
|
537
|
+
.crud_title {
|
|
538
|
+
height: 32px;
|
|
539
|
+
font-size: 16px;
|
|
540
|
+
font-weight: 500;
|
|
541
|
+
color: #000000d9;
|
|
542
|
+
line-height: 32px;
|
|
543
|
+
margin-bottom: 12px;
|
|
544
|
+
}
|
|
545
|
+
</style>
|