cloud-web-corejs 1.0.280 → 1.1.0-dev.10

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 (193) hide show
  1. package/package.json +6 -2
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +45 -3
  4. package/src/components/VabUpload/mixins.js +174 -34
  5. package/src/components/VabUpload/previewGroup.js +128 -0
  6. package/src/components/VabUpload/view.vue +248 -209
  7. package/src/components/baseTabs/mixins.js +181 -181
  8. package/src/components/bizTab/BizBillActions.vue +129 -0
  9. package/src/components/bizTab/BizTabListPage.vue +391 -0
  10. package/src/components/bizTab/README.md +378 -0
  11. package/src/components/bizTab/billTableUtil.js +48 -0
  12. package/src/components/bizTab/billValidators.js +136 -0
  13. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  14. package/src/components/bizTab/index.js +24 -0
  15. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  16. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  17. package/src/components/excelExport/mixins.js +3 -3
  18. package/src/components/excelImport/index.vue +156 -156
  19. package/src/components/jsonImport/index.vue +1 -1
  20. package/src/components/langImport/index.vue +1 -1
  21. package/src/components/mobile/statusTag/mixins.js +1 -61
  22. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  23. package/src/components/mobile/wf/content.vue +1705 -1556
  24. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  25. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  26. package/src/components/mobile/wf/selectUserDialog.vue +122 -0
  27. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  28. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  29. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  30. package/src/components/obsUpload/index.vue +1 -1
  31. package/src/components/table/config.js +78 -78
  32. package/src/components/table/index.js +1276 -1276
  33. package/src/components/table/plugins/cell-area/index.js +1055 -0
  34. package/src/components/table/plugins/cell-area/index.scss +77 -0
  35. package/src/components/table/plugins/cell-area/util.js +224 -0
  36. package/src/components/table/tableForm.vue +330 -330
  37. package/src/components/table/tableFormMixin.js +318 -318
  38. package/src/components/table/vxeFilter/index.js +163 -163
  39. package/src/components/table/vxeFilter/mixin.js +316 -316
  40. package/src/components/wf/content.vue +1188 -1188
  41. package/src/components/wf/wf.js +40 -20
  42. package/src/components/wf/wfActionDropdown.vue +1 -1
  43. package/src/components/wf/wfActionItems.js +1 -1
  44. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  45. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  46. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  47. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  48. package/src/components/xform/form-designer/designer.js +51 -52
  49. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  50. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
  51. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  52. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  53. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
  54. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
  55. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  56. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  57. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  58. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  59. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  60. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  61. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  62. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  63. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  64. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  65. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  66. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  67. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  68. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  69. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  70. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  71. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
  72. package/src/components/xform/form-designer/indexMixin.js +35 -1
  73. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  74. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  75. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  76. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  77. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  78. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  79. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
  80. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  81. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  82. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  84. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  85. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  86. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  87. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  88. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  89. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  90. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  91. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  92. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  93. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  94. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  95. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
  96. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  97. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
  98. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  99. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  100. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
  101. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  102. package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
  103. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  104. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  105. package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
  106. package/src/components/xform/form-render/index.vue +153 -147
  107. package/src/components/xform/form-render/indexMixin.js +35 -3
  108. package/src/components/xform/lang/en-US.js +14 -0
  109. package/src/components/xform/lang/zh-CN.js +17 -0
  110. package/src/components/xform/mixins/defaultHandle.js +707 -707
  111. package/src/components/xform/styles/h5.scss +2238 -0
  112. package/src/components/xform/utils/textMaskUtil.js +182 -179
  113. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  114. package/src/components/xform/utils/util.js +56 -11
  115. package/src/directive/append-to-body/index.js +48 -0
  116. package/src/index.js +13 -4
  117. package/src/layout/components/Sidebar/default.vue +1655 -1655
  118. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  119. package/src/router/index.js +48 -27
  120. package/src/router/modules/customer.js +71 -14
  121. package/src/store/modules/permission.js +17 -18
  122. package/src/utils/assetUrl.js +19 -0
  123. package/src/utils/pdfUtil.js +429 -429
  124. package/src/utils/resolveViewComponent.js +142 -16
  125. package/src/utils/vab.js +1283 -1279
  126. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  127. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  128. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  129. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  130. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  131. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  132. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  133. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  134. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  135. package/src/views/bd/project/common/form_script/list.vue +16 -0
  136. package/src/views/bd/project/common/form_template/list.vue +15 -0
  137. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  138. package/src/views/bd/project/core/branchContext.js +100 -0
  139. package/src/views/bd/project/core/branchPage.js +78 -0
  140. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  141. package/src/views/bd/project/core/branchScope.js +44 -0
  142. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  143. package/src/views/bd/project/core/branchSelect.vue +85 -0
  144. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  145. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  146. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  147. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  148. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  149. package/src/views/bd/setting/form_template/edit.vue +378 -356
  150. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  151. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  152. package/src/views/bd/setting/form_template/list.vue +304 -303
  153. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  154. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  155. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  156. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  157. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  158. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  159. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  160. package/src/views/demo/bizTab/bill/list.vue +288 -0
  161. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  162. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  163. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  164. package/src/views/demo/bizTab/simple/list.vue +217 -0
  165. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  166. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  167. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  168. package/src/views/demo/bizTab/wf/list.vue +242 -0
  169. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  170. package/src/views/support/form-dialog-demo/index.vue +537 -0
  171. package/src/views/user/file_view_ins/list.vue +970 -970
  172. package/src/views/user/form/vform/designer.vue +823 -821
  173. package/src/views/user/home/default.vue +1117 -1117
  174. package/src/views/user/home/default2.vue +1 -1
  175. package/src/views/user/home/index.vue +103 -101
  176. package/src/views/user/home/wjl/content.vue +1569 -0
  177. package/src/views/user/notify_message/dialog.vue +139 -137
  178. package/src/views/user/outLink/cc_form_view.vue +188 -0
  179. package/src/views/user/outLink/form_view.vue +202 -202
  180. package/src/views/user/outLink/index.vue +110 -110
  181. package/src/views/user/outLink/view.vue +3 -3
  182. package/src/views/user/role/edit.vue +632 -632
  183. package/src/views/user/role/list.vue +260 -260
  184. package/src/views/user/wf/iframe/index.vue +51 -51
  185. package/src/views/user/wf/iframe/index2.vue +64 -64
  186. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  187. package/src/views/user/wf/wf_manage/list2.vue +871 -875
  188. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
  189. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  190. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  191. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  192. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  193. package/src/utils/wf.js +0 -766
@@ -1,555 +1,554 @@
1
- <template>
2
- <el-dialog
3
- :visible.sync="showDialog"
4
- v-el-drag-dialog
5
- v-el-dialog-center
6
- v-bind="dialogConfig"
7
- @close="close"
8
- >
9
- <div class="cont" style="height: 450px" v-bind="bodyConfig">
10
- <v-form-render
11
- :form-json.sync="formJson"
12
- :form-data="formData"
13
- :option-data="optionData"
14
- ref="vFormRef"
15
- :reportTemplate.sync="formTemplate"
16
- :conditionParam.sync="conditionParam"
17
- :formInsData.sync="formInsData"
18
- v-if="showRender"
19
- visible-key="showRender"
20
- :parent-target="_self"
21
- @reload="reload"
22
- :dataTableOption="dataTableOption"
23
- v-bind="formConfig"
24
- :param="dialogParam"
25
- class="data-table_height labMargin"
26
- />
27
- </div>
28
- <label id="labBtn" class="transverse">
29
- <div class="icon">
30
- <i class="el-icon-more"></i>
31
- <i class="el-icon-more"></i>
32
- </div>
33
- </label>
34
- <div class="multipleChoice">
35
- <el-tooltip
36
- :enterable="false"
37
- effect="dark"
38
- :content="$t1('全部删除')"
39
- placement="top"
40
- ><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a>
41
- </el-tooltip>
42
- <div class="list">
43
- <template v-if="showRender">
44
- <div class="item" v-for="(checkRow, index) in checkRows" :key="'c' + index">
45
- <p>{{ checkRow[showFormField] }}</p>
46
- <a class="el-icon-close" @click="clearTable1Select(index)"></a>
47
- </div>
48
- </template>
49
- </div>
50
- </div>
51
- <span
52
- slot="footer"
53
- class="dialog-footer"
54
- v-if="option.showFooter !== false"
55
- v-bind="option.footerConfig"
56
- >
57
- <span class="fl tips" v-if="!selectMulti">{{
58
- $t1("注:双击确认选择(单选)")
59
- }}</span>
60
- <el-button type="primary" plain class="button-sty" @click="close">
61
- <i class="el-icon-close el-icon"></i>
62
- {{ $t1("取 消") }}
63
- </el-button>
64
- <el-button type="primary" @click="dialogSubmit" class="button-sty">
65
- <i class="el-icon-check el-icon"></i>
66
- {{ $t1("确 定") }}
67
- </el-button>
68
- </span>
69
- </el-dialog>
70
- </template>
71
-
72
- <script>
73
- import { selectDialogMixins } from "../../../../../mixins/selectDialog/index.js";
74
- import VFormRender from "../../../../../components/xform/form-render/index.vue";
75
- import { traverseAllWidgetsNew } from "../../../../../components/xform/utils/util";
76
-
77
- export default {
78
- components: { VFormRender },
79
- props: ["visiable", "multi", "rows", "param", "widget", "option"],
80
- mixins: [selectDialogMixins],
81
- inject: ["getFormConfig"],
82
- mounted() {},
83
- data() {
84
- var that = this;
85
- return {
86
- showFormField: "_tt",
87
- showDialog: true,
88
- falseValue: false,
89
- selectMulti: true,
90
-
91
- formJson: {},
92
- formData: {},
93
- optionData: {},
94
- showRender: false,
95
- formTemplate: {},
96
- /* formCode: null,*/
97
- layoutType: null,
98
- conditionParam: null,
99
- formInsData: null,
100
- dataTableOption: {
101
- class: "is-pointer",
102
- queryFormDialog: true,
103
- onCheckboxChange: (param) => {
104
- if (this.currentLayoutType == "H5") {
105
- this.changeH5Checkbox(param);
106
- } else {
107
- this.addDataTable(param);
108
- }
109
- },
110
- onCheckboxAll: (param) => {
111
- this.checkAll(param);
112
- },
113
- onCellDblclick: (param) => {
114
- this.checkWithSubmit(param);
115
- },
116
- callback: () => {
117
- if (this.checkRows.length) {
118
- let $grid = this.getGrid();
119
- let datas = $grid.getTableData().tableData;
120
- let fieldKey = this.fieldKey;
121
- this.checkRows.forEach((checkRow) => {
122
- let row = datas.find(
123
- (row) => row[fieldKey] == checkRow[fieldKey]
124
- );
125
- if (row) {
126
- $grid.setCheckboxRow(row, true);
127
- }
128
- });
129
- }
130
- },
131
- otherConfig: {
132
- onFilter: () => {
133
- this.checkRows = [];
134
- },
135
- },
136
- config: {
137
- checkboxConfig: {
138
- checkStrictly: true,
139
- showHeader: true,
140
- trigger: "row",
141
- },
142
- },
143
- },
144
- $grid: null,
145
- currentLayoutType: null,
146
- };
147
- },
148
- computed: {
149
- formCode() {
150
- return this.option.formCode;
151
- },
152
- dialogParam() {
153
- return this.option?.param;
154
- },
155
- formConfig() {
156
- return this.option?.formConfig;
157
- },
158
- dialogConfig() {
159
- let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
160
- if (this.option.dialogConfig?.customClass) {
161
- customClass = customClass + " " + this.option.dialogConfig.customClass;
162
- }
163
- let config = {
164
- title: this.formTemplate.formName,
165
- appendToBody: true,
166
- modalAppendToBody: true,
167
- closeOnClickModal: false,
168
- modal: false,
169
- width: "1200px",
170
- fullscreen: this.option.fullscreen,
171
- };
172
- config = Object.assign({}, config, this.option.dialogConfig, {
173
- customClass,
174
- });
175
- config.title = this.$t1(config.title);
176
- return config;
177
- },
178
- bodyConfig() {
179
- let config = {};
180
- let classStr = this.currentLayoutType;
181
- if (this.option.bodyConfig?.class) {
182
- classStr = classStr + " " + this.option.bodyConfig.class;
183
- }
184
- if (this.option.showFooter == false) {
185
- classStr = classStr + " nfootBtn";
186
- }
187
- config = Object.assign({}, config, this.option.bodyConfig, {
188
- class: classStr,
189
- });
190
- return config;
191
- },
192
- },
193
- created() {
194
- let currentFormConfig = this.getFormConfig();
195
- this.currentLayoutType = currentFormConfig.layoutType;
196
- this.initSetting();
197
-
198
- if (this.option.rows?.length) {
199
- this.checkRows.push(...this.$baseLodash.cloneDeep(this.option.rows));
200
- }
201
-
202
- this.selectMulti = this.option.multiple ?? true;
203
- this.dataTableOption.config.checkboxConfig.showHeader = this.selectMulti;
204
- if (this.option.queryParam) {
205
- this.dataTableOption.queryParam = this.option.queryParam;
206
- }
207
- this.getReportTemplate();
208
- },
209
- methods: {
210
- reload() {
211
- this.showRender = false;
212
- return this.getReportTemplate();
213
- },
214
- async getReportTemplate() {
215
- let param = {
216
- objTypeCode: this.$attrs.objTypeCode,
217
- objId: this.$attrs.objId,
218
- taskId: this.$attrs.taskId,
219
- };
220
- this.conditionParam = param;
221
- let url, data;
222
- url = USER_PREFIX + `/formTemplate/getByFormCode`;
223
- data = { stringOne: this.formCode };
224
-
225
- let that = this;
226
- return this.$http({
227
- url: url,
228
- method: `post`,
229
- data: data,
230
- isLoading: true,
231
- loadingTarget: document.body,
232
- modalStrictly: true,
233
- success: (res) => {
234
- let formTemplate = res.objx || {};
235
- this.formTemplate = formTemplate;
236
- this.formJson = formTemplate.formViewContent
237
- ? JSON.parse(formTemplate.formViewContent)
238
- : {};
239
- this.layoutType = this.formJson.formConfig.layoutType;
240
- let formConfig = this.formJson.formConfig;
241
- if (this.option.fieldKey) {
242
- this.fieldKey = this.option.fieldKey;
243
- } else if (formConfig.searchDialogUniqueField) {
244
- this.fieldKey = formConfig.searchDialogUniqueField;
245
- }
246
- /*this.$nextTick(() => {
247
- let widgetList = this.formJson.widgetList;
248
- setTimeout(()=>{
249
- this.$grid = this.$refs.vFormRef.getWidgetRef(widgetList[0].options.name).getGridTable();
250
- },200)
251
- })*/
252
- this.initShowFormField();
253
- this.showRender = true;
254
- },
255
- });
256
- },
257
- getDataTableWidget() {
258
- let result = null;
259
- traverseAllWidgetsNew(this.formJson.widgetList, (widget) => {
260
- //修复data-table旧数据表格列widget与editWidget为空的问题
261
- if (!result && widget.type == "data-table") {
262
- result = widget;
263
- }
264
- });
265
- return result;
266
- },
267
- getGrid() {
268
- if (!this.$grid) {
269
- // let widgetList = this.formJson.widgetList;
270
- let dataTableWidget = this.getDataTableWidget();
271
- this.$grid = this.$refs.vFormRef
272
- .getWidgetRef(dataTableWidget.options.name)
273
- .getGridTable();
274
- }
275
- return this.$grid;
276
- },
277
- initShowFormField() {
278
- let showFormField =
279
- this.formJson.formConfig.searchDialogNameField || null;
280
- if (!showFormField) {
281
- // let widgetList = this.formJson.widgetList;
282
- let dataTableWidget = this.getDataTableWidget();
283
- let tableColumns = dataTableWidget.options.tableColumns;
284
- let column = tableColumns.find((column) => !!column.prop);
285
- this.showFormField = column.prop;
286
- } else {
287
- this.showFormField = showFormField;
288
- }
289
- },
290
- async getFormInsData() {
291
- let formTemplate = this.formTemplate;
292
- let insUuid = formTemplate.insUuid;
293
- let formConfig = this.formJson.formConfig;
294
- let isSystemBill = formConfig.formType == 1;
295
- return this.$http({
296
- url: USER_PREFIX + `/form_ins/getFormInsData`,
297
- method: `post`,
298
- data: {
299
- insUuid: insUuid,
300
- tableAlias: this.formCode,
301
- },
302
- isLoading: true,
303
- loadingTarget: document.body,
304
- modalStrictly: true,
305
- success: (res) => {
306
- let formData = res.objx && res.objx.data ? res.objx.data : {};
307
- this.formData = formData;
308
- this.formInsData = res.objx;
309
- // this.formInsData = formData;
310
- },
311
- });
312
- },
313
- changeH5Checkbox(obj) {
314
- let fieldKey = this.fieldKey;
315
- let selectMulti = this.selectMulti;
316
- let row = obj.row;
317
- let that = this;
318
- if (selectMulti) {
319
- let rows = this.checkRows;
320
- if (obj.checked) {
321
- let flag = rows.some((item) => {
322
- return row[fieldKey] == item[fieldKey];
323
- });
324
- if (!flag) {
325
- rows.push(obj.row);
326
- }
327
- } else {
328
- let rowid = obj.row[fieldKey];
329
- let delIndex;
330
- for (var i = 0; i < rows.length; i++) {
331
- if (rows[i][fieldKey] == rowid) {
332
- delIndex = i;
333
- break;
334
- }
335
- }
336
- if (delIndex != null) rows.splice(delIndex, 1);
337
- }
338
- } else {
339
- this.checkRows = [];
340
- this.checkRows.push(obj.row);
341
- }
342
- },
343
- addDataTable(obj) {
344
- let fieldKey = this.fieldKey;
345
- let selectMulti = this.selectMulti;
346
- let row = obj.row;
347
- let that = this;
348
- let $table1 = obj.$table;
349
- if (selectMulti) {
350
- let rows = this.checkRows;
351
- if (obj.checked) {
352
- let flag = rows.some((item) => {
353
- return row[fieldKey] == item[fieldKey];
354
- });
355
- if (!flag) {
356
- rows.push(obj.row);
357
- }
358
- } else {
359
- let rowid = obj.row[fieldKey];
360
- let delIndex;
361
- for (var i = 0; i < rows.length; i++) {
362
- if (rows[i][fieldKey] == rowid) {
363
- delIndex = i;
364
- break;
365
- }
366
- }
367
- if (delIndex != null) rows.splice(delIndex, 1);
368
- }
369
- } else {
370
- $table1.clearCheckboxRow();
371
- $table1.setCheckboxRow(obj.row, true);
372
- this.checkRows = [];
373
- this.checkRows.push(obj.row);
374
- }
375
-
376
- if (obj.checked) {
377
- // let ay = $table1.getTableData().fullData;
378
- // let aRows = this.findAllRows(ay);
379
- let aRows = $table1.getTableData().visibleData;
380
- let cRows = $table1.getCheckboxRecords();
381
- if (aRows.length == cRows.length) {
382
- $table1.setAllCheckboxRow(true);
383
- } else {
384
- $table1.setAllCheckboxRow(false);
385
- }
386
- } else {
387
- $table1.setAllCheckboxRow(false);
388
- }
389
- },
390
- clearTable1Select(index) {
391
- if (this.currentLayoutType == "H5") {
392
- this.checkRows.splice(index, 1);
393
- } else {
394
- let fieldKey = this.fieldKey;
395
- let selectMulti = this.selectMulti;
396
- let row = this.checkRows[index];
397
- var rowid = row[fieldKey];
398
- let $grid1 = this.getGrid();
399
-
400
- // let rows = $grid1.getTableData().fullData;
401
- let rows = $grid1.getTableData().visibleData;
402
- let row2 = this.findTreeRowById(rows, rowid);
403
- if (selectMulti) {
404
- if (row2) $grid1.setCheckboxRow(row2, false);
405
- } else {
406
- $grid1.clearCheckboxRow();
407
- }
408
- this.checkRows.splice(index, 1);
409
- if (row2) $grid1.setAllCheckboxRow(false);
410
- }
411
- },
412
- checkAll(res) {
413
- if (this.currentLayoutType !== "H5") {
414
- let fieldKey = this.fieldKey;
415
- var $grid = res.$grid;
416
- // let tableData = $grid.getTableData().fullData;
417
- // let allRows = this.findAllRows(tableData);
418
- let tableData = $grid.getTableData().visibleData;
419
- let allRows = $grid.getTableData().visibleData;
420
- $grid.setCheckboxRow(allRows, res.checked);
421
- allRows.forEach((lineData) => {
422
- let rowid = lineData[fieldKey];
423
- let tableData2 = this.checkRows;
424
- let row2;
425
- for (var i = 0; i < tableData2.length; i++) {
426
- let lineData2 = tableData2[i];
427
- if (lineData2[fieldKey] == rowid) {
428
- row2 = tableData2[i];
429
- }
430
- }
431
- if (res.checked) {
432
- if (!row2) {
433
- this.checkRows.push(lineData);
434
- }
435
- } else {
436
- if (row2) {
437
- let delIndex;
438
- let checkRows = this.checkRows;
439
- for (var i = 0; i < checkRows.length; i++) {
440
- if (checkRows[i][fieldKey] == rowid) {
441
- delIndex = i;
442
- break;
443
- }
444
- }
445
- if (delIndex != null) checkRows.splice(delIndex, 1);
446
- }
447
- }
448
- });
449
- }
450
- },
451
- clearChecked() {
452
- if (this.currentLayoutType !== "H5") {
453
- let $grid1 = this.getGrid();
454
- $grid1.clearCheckboxRow();
455
- }
456
- this.checkRows = [];
457
- },
458
- checkWithSubmit(obj) {
459
- if (!this.selectMulti) {
460
- let $grid1 = this.getGrid();
461
- var rows = $grid1.getCheckboxRecords(true);
462
- if (rows && rows.length) {
463
- this.dialogSubmit();
464
- }
465
- }
466
- },
467
- close() {
468
- let formRef = this.$refs.vFormRef;
469
- this.showDialog = false;
470
- this.$emit("update:visiable", false);
471
- this.option.close && this.option.close(formRef, this);
472
- },
473
- dialogSubmit() {
474
- let formRef = this.$refs.vFormRef;
475
- if (this.option.confirm) {
476
- if (this.option.confirm(this.checkRows, formRef, this) !== false) {
477
- this.close();
478
- }
479
- } else {
480
- this.close();
481
- }
482
- },
483
- },
484
- };
485
- </script>
486
-
487
- <style scoped lang="scss">
488
- ::v-deep .H5 .h5-fixed-bottom-btns {
489
- bottom: 95px;
490
- }
491
- ::v-deep .tree-container {
492
- height: 100%;
493
- .tree-box {
494
- width: 14%;
495
- height: 100%;
496
- min-width: 13%;
497
- border-right: solid 1px #f0f0f0;
498
- .container-wrapper {
499
- height: calc(100% - 34px);
500
- > div {
501
- height: 100%;
502
- }
503
- }
504
- .tree-btns + .tree-list {
505
- height: calc(100% - 41px);
506
- }
507
- }
508
- .main-right {
509
- width: calc(86% - 8px);
510
- height: 100%;
511
- }
512
- .grid-height {
513
- height: 100% !important;
514
- }
515
- #labBtn {
516
- background-color: #f4f6fa;
517
- position: relative;
518
- width: 8px !important;
519
- z-index: 8;
520
- cursor: e-resize;
521
- display: inline-block !important;
522
- height: calc(100% + 8px);
523
- margin: -8px 0px !important;
524
- .icon {
525
- position: absolute;
526
- top: 50%;
527
- left: -4.5px;
528
- font-size: 17px;
529
- margin-top: -16.8px;
530
- color: #2a6494;
531
- i {
532
- display: block;
533
- transform: rotate(90deg);
534
- -ms-transform: rotate(90deg);
535
- -moz-transform: rotate(90deg);
536
- -webkit-transform: rotate(90deg);
537
- -o-transform: rotate(90deg);
538
- }
539
- }
540
- }
541
- }
542
- ::v-deep .labMargin .tree-container {
543
- display: flex;
544
- }
545
- /* ::v-deep .tree-container #labBtn {
546
- background-color: #f4f6fa;
547
- position: relative;
548
- width: 8px !important;
549
- z-index: 8;
550
- cursor: e-resize;
551
- display: inline-block !important;
552
- height: calc(100vh - 75px);
553
- margin: -7px 0 !important;
554
- } */
555
- </style>
1
+ <template>
2
+ <el-dialog
3
+ :visible.sync="showDialog"
4
+ v-el-drag-dialog
5
+ v-el-dialog-center
6
+ v-bind="dialogConfig"
7
+ @close="close"
8
+ >
9
+ <div class="cont" style="height: 450px" v-bind="bodyConfig">
10
+ <v-form-render
11
+ :form-json.sync="formJson"
12
+ :form-data="formData"
13
+ :option-data="optionData"
14
+ ref="vFormRef"
15
+ :reportTemplate.sync="formTemplate"
16
+ :conditionParam.sync="conditionParam"
17
+ :formInsData.sync="formInsData"
18
+ v-if="showRender"
19
+ visible-key="showRender"
20
+ :parent-target="_self"
21
+ @reload="reload"
22
+ :dataTableOption="dataTableOption"
23
+ v-bind="formConfig"
24
+ :param="dialogParam"
25
+ class="data-table_height labMargin"
26
+ />
27
+ </div>
28
+ <label id="labBtn" class="transverse">
29
+ <div class="icon">
30
+ <i class="el-icon-more"></i>
31
+ <i class="el-icon-more"></i>
32
+ </div>
33
+ </label>
34
+ <div class="multipleChoice">
35
+ <el-tooltip
36
+ :enterable="false"
37
+ effect="dark"
38
+ :content="$t1('全部删除')"
39
+ placement="top"
40
+ ><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a>
41
+ </el-tooltip>
42
+ <div class="list">
43
+ <template v-if="showRender">
44
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="'c' + index">
45
+ <p>{{ checkRow[showFormField] }}</p>
46
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
47
+ </div>
48
+ </template>
49
+ </div>
50
+ </div>
51
+ <span
52
+ slot="footer"
53
+ class="dialog-footer"
54
+ v-if="option.showFooter !== false"
55
+ v-bind="option.footerConfig"
56
+ >
57
+ <span class="fl tips" v-if="!selectMulti">{{
58
+ $t1("注:双击确认选择(单选)")
59
+ }}</span>
60
+ <el-button type="primary" plain class="button-sty" @click="close">
61
+ <i class="el-icon-close el-icon"></i>
62
+ {{ $t1("取 消") }}
63
+ </el-button>
64
+ <el-button type="primary" @click="dialogSubmit" class="button-sty">
65
+ <i class="el-icon-check el-icon"></i>
66
+ {{ $t1("确 定") }}
67
+ </el-button>
68
+ </span>
69
+ </el-dialog>
70
+ </template>
71
+
72
+ <script>
73
+ import { selectDialogMixins } from "../../../../../mixins/selectDialog/index.js";
74
+ import VFormRender from "../../../../../components/xform/form-render/index.vue";
75
+ import { traverseAllWidgetsNew } from "../../../../../components/xform/utils/util";
76
+
77
+ export default {
78
+ components: { VFormRender },
79
+ props: ["visiable", "multi", "rows", "param", "widget", "option"],
80
+ mixins: [selectDialogMixins],
81
+ inject: ["getFormConfig"],
82
+ mounted() {},
83
+ data() {
84
+ var that = this;
85
+ return {
86
+ showFormField: "_tt",
87
+ showDialog: true,
88
+ falseValue: false,
89
+ selectMulti: true,
90
+
91
+ formJson: {},
92
+ formData: {},
93
+ optionData: {},
94
+ showRender: false,
95
+ formTemplate: {},
96
+ /* formCode: null,*/
97
+ layoutType: null,
98
+ conditionParam: null,
99
+ formInsData: null,
100
+ dataTableOption: {
101
+ class: "is-pointer",
102
+ queryFormDialog: true,
103
+ onCheckboxChange: (param) => {
104
+ if (this.currentLayoutType == "H5") {
105
+ this.changeH5Checkbox(param);
106
+ } else {
107
+ this.addDataTable(param);
108
+ }
109
+ },
110
+ onCheckboxAll: (param) => {
111
+ this.checkAll(param);
112
+ },
113
+ onCellDblclick: (param) => {
114
+ this.checkWithSubmit(param);
115
+ },
116
+ callback: () => {
117
+ if (this.checkRows.length) {
118
+ let $grid = this.getGrid();
119
+ let datas = $grid.getTableData().tableData;
120
+ let fieldKey = this.fieldKey;
121
+ this.checkRows.forEach((checkRow) => {
122
+ let row = datas.find(
123
+ (row) => row[fieldKey] == checkRow[fieldKey]
124
+ );
125
+ if (row) {
126
+ $grid.setCheckboxRow(row, true);
127
+ }
128
+ });
129
+ }
130
+ },
131
+ otherConfig: {
132
+ onFilter: () => {
133
+ this.checkRows = [];
134
+ },
135
+ },
136
+ config: {
137
+ checkboxConfig: {
138
+ checkStrictly: true,
139
+ showHeader: true,
140
+ trigger: "row",
141
+ },
142
+ },
143
+ },
144
+ $grid: null,
145
+ currentLayoutType: null,
146
+ };
147
+ },
148
+ computed: {
149
+ formCode() {
150
+ return this.option.formCode;
151
+ },
152
+ dialogParam() {
153
+ return this.option?.param;
154
+ },
155
+ formConfig() {
156
+ return this.option?.formConfig;
157
+ },
158
+ dialogConfig() {
159
+ let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
160
+ if (this.option.dialogConfig?.customClass) {
161
+ customClass = customClass + " " + this.option.dialogConfig.customClass;
162
+ }
163
+ let config = {
164
+ title: this.formTemplate.formName,
165
+ appendToBody: true,
166
+ modalAppendToBody: true,
167
+ closeOnClickModal: false,
168
+ modal: false,
169
+ width: "1200px",
170
+ fullscreen: this.option.fullscreen,
171
+ };
172
+ config = Object.assign({}, config, this.option.dialogConfig, {
173
+ customClass,
174
+ });
175
+ config.title = this.$t1(config.title);
176
+ return config;
177
+ },
178
+ bodyConfig() {
179
+ let config = {};
180
+ let classStr = this.currentLayoutType;
181
+ if (this.option.bodyConfig?.class) {
182
+ classStr = classStr + " " + this.option.bodyConfig.class;
183
+ }
184
+ if (this.option.showFooter == false) {
185
+ classStr = classStr + " nfootBtn";
186
+ }
187
+ config = Object.assign({}, config, this.option.bodyConfig, {
188
+ class: classStr,
189
+ });
190
+ return config;
191
+ },
192
+ },
193
+ created() {
194
+ let currentFormConfig = this.getFormConfig();
195
+ this.currentLayoutType = currentFormConfig.layoutType;
196
+ this.initSetting();
197
+
198
+ if (this.option.rows?.length) {
199
+ this.checkRows.push(...this.$baseLodash.cloneDeep(this.option.rows));
200
+ }
201
+
202
+ this.selectMulti = this.option.multiple ?? true;
203
+ this.dataTableOption.config.checkboxConfig.showHeader = this.selectMulti;
204
+ if (this.option.queryParam) {
205
+ this.dataTableOption.queryParam = this.option.queryParam;
206
+ }
207
+ this.getReportTemplate();
208
+ },
209
+ methods: {
210
+ reload() {
211
+ this.showRender = false;
212
+ return this.getReportTemplate();
213
+ },
214
+ async getReportTemplate() {
215
+ let param = {
216
+ objTypeCode: this.$attrs.objTypeCode,
217
+ objId: this.$attrs.objId,
218
+ taskId: this.$attrs.taskId,
219
+ };
220
+ this.conditionParam = param;
221
+ let url, data;
222
+ url = USER_PREFIX + `/formTemplate/getByFormCode`;
223
+ data = { stringOne: this.formCode };
224
+
225
+ let that = this;
226
+ return this.$http({
227
+ url: url,
228
+ method: `post`,
229
+ data: data,
230
+ isLoading: true,
231
+ loadingTarget: document.body,
232
+ modalStrictly: true,
233
+ success: (res) => {
234
+ let formTemplate = res.objx || {};
235
+ this.formTemplate = formTemplate;
236
+ this.formJson = formTemplate.formViewContent
237
+ ? JSON.parse(formTemplate.formViewContent)
238
+ : {};
239
+ this.layoutType = this.formJson.formConfig.layoutType;
240
+ let formConfig = this.formJson.formConfig;
241
+ if (this.option.fieldKey) {
242
+ this.fieldKey = this.option.fieldKey;
243
+ } else if (formConfig.searchDialogUniqueField) {
244
+ this.fieldKey = formConfig.searchDialogUniqueField;
245
+ }
246
+ /*this.$nextTick(() => {
247
+ let widgetList = this.formJson.widgetList;
248
+ setTimeout(()=>{
249
+ this.$grid = this.$refs.vFormRef.getWidgetRef(widgetList[0].options.name).getGridTable();
250
+ },200)
251
+ })*/
252
+ this.initShowFormField();
253
+ this.showRender = true;
254
+ },
255
+ });
256
+ },
257
+ getDataTableWidget() {
258
+ let result = null;
259
+ traverseAllWidgetsNew(this.formJson.widgetList, (widget) => {
260
+ //修复data-table旧数据表格列widget与editWidget为空的问题
261
+ if (!result && widget.type == "data-table") {
262
+ result = widget;
263
+ }
264
+ });
265
+ return result;
266
+ },
267
+ getGrid() {
268
+ if (!this.$grid) {
269
+ // let widgetList = this.formJson.widgetList;
270
+ let dataTableWidget = this.getDataTableWidget();
271
+ this.$grid = this.$refs.vFormRef
272
+ .getWidgetRef(dataTableWidget.options.name)
273
+ .getGridTable();
274
+ }
275
+ return this.$grid;
276
+ },
277
+ initShowFormField() {
278
+ let showFormField =
279
+ this.formJson.formConfig.searchDialogNameField || null;
280
+ if (!showFormField) {
281
+ // let widgetList = this.formJson.widgetList;
282
+ let dataTableWidget = this.getDataTableWidget();
283
+ let tableColumns = dataTableWidget.options.tableColumns;
284
+ let column = tableColumns.find((column) => !!column.prop);
285
+ this.showFormField = column.prop;
286
+ } else {
287
+ this.showFormField = showFormField;
288
+ }
289
+ },
290
+ async getFormInsData() {
291
+ let formTemplate = this.formTemplate;
292
+ let insUuid = formTemplate.insUuid;
293
+ let formConfig = this.formJson.formConfig;
294
+ let isSystemBill = formConfig.formType == 1;
295
+ return this.$http({
296
+ url: USER_PREFIX + `/form_ins/getFormInsData`,
297
+ method: `post`,
298
+ data: {
299
+ insUuid: insUuid,
300
+ tableAlias: this.formCode,
301
+ },
302
+ isLoading: true,
303
+ loadingTarget: document.body,
304
+ modalStrictly: true,
305
+ success: (res) => {
306
+ let formData = res.objx && res.objx.data ? res.objx.data : {};
307
+ this.formData = formData;
308
+ this.formInsData = res.objx;
309
+ // this.formInsData = formData;
310
+ },
311
+ });
312
+ },
313
+ changeH5Checkbox(obj) {
314
+ let fieldKey = this.fieldKey;
315
+ let selectMulti = this.selectMulti;
316
+ let row = obj.row;
317
+ let that = this;
318
+ if (selectMulti) {
319
+ let rows = this.checkRows;
320
+ if (obj.checked) {
321
+ let flag = rows.some((item) => {
322
+ return row[fieldKey] == item[fieldKey];
323
+ });
324
+ if (!flag) {
325
+ rows.push(obj.row);
326
+ }
327
+ } else {
328
+ let rowid = obj.row[fieldKey];
329
+ let delIndex;
330
+ for (var i = 0; i < rows.length; i++) {
331
+ if (rows[i][fieldKey] == rowid) {
332
+ delIndex = i;
333
+ break;
334
+ }
335
+ }
336
+ if (delIndex != null) rows.splice(delIndex, 1);
337
+ }
338
+ } else {
339
+ this.checkRows = [];
340
+ this.checkRows.push(obj.row);
341
+ }
342
+ },
343
+ addDataTable(obj) {
344
+ let fieldKey = this.fieldKey;
345
+ let selectMulti = this.selectMulti;
346
+ let row = obj.row;
347
+ let that = this;
348
+ let $table1 = obj.$table;
349
+ if (selectMulti) {
350
+ let rows = this.checkRows;
351
+ if (obj.checked) {
352
+ let flag = rows.some((item) => {
353
+ return row[fieldKey] == item[fieldKey];
354
+ });
355
+ if (!flag) {
356
+ rows.push(obj.row);
357
+ }
358
+ } else {
359
+ let rowid = obj.row[fieldKey];
360
+ let delIndex;
361
+ for (var i = 0; i < rows.length; i++) {
362
+ if (rows[i][fieldKey] == rowid) {
363
+ delIndex = i;
364
+ break;
365
+ }
366
+ }
367
+ if (delIndex != null) rows.splice(delIndex, 1);
368
+ }
369
+ } else {
370
+ $table1.clearCheckboxRow();
371
+ $table1.setCheckboxRow(obj.row, true);
372
+ this.checkRows = [];
373
+ this.checkRows.push(obj.row);
374
+ }
375
+
376
+ if (obj.checked) {
377
+ // let ay = $table1.getTableData().fullData;
378
+ // let aRows = this.findAllRows(ay);
379
+ let aRows = $table1.getTableData().visibleData;
380
+ let cRows = $table1.getCheckboxRecords();
381
+ if (aRows.length == cRows.length) {
382
+ $table1.setAllCheckboxRow(true);
383
+ } else {
384
+ $table1.setAllCheckboxRow(false);
385
+ }
386
+ } else {
387
+ $table1.setAllCheckboxRow(false);
388
+ }
389
+ },
390
+ clearTable1Select(index) {
391
+ if (this.currentLayoutType == "H5") {
392
+ this.checkRows.splice(index, 1);
393
+ } else {
394
+ let fieldKey = this.fieldKey;
395
+ let selectMulti = this.selectMulti;
396
+ let row = this.checkRows[index];
397
+ var rowid = row[fieldKey];
398
+ let $grid1 = this.getGrid();
399
+
400
+ // let rows = $grid1.getTableData().fullData;
401
+ let rows = $grid1.getTableData().visibleData;
402
+ let row2 = this.findTreeRowById(rows, rowid);
403
+ if (selectMulti) {
404
+ if (row2) $grid1.setCheckboxRow(row2, false);
405
+ } else {
406
+ $grid1.clearCheckboxRow();
407
+ }
408
+ this.checkRows.splice(index, 1);
409
+ if (row2) $grid1.setAllCheckboxRow(false);
410
+ }
411
+ },
412
+ checkAll(res) {
413
+ if (this.currentLayoutType !== "H5") {
414
+ let fieldKey = this.fieldKey;
415
+ var $grid = res.$grid;
416
+ // let tableData = $grid.getTableData().fullData;
417
+ // let allRows = this.findAllRows(tableData);
418
+ let tableData = $grid.getTableData().visibleData;
419
+ let allRows = $grid.getTableData().visibleData;
420
+ $grid.setCheckboxRow(allRows, res.checked);
421
+ allRows.forEach((lineData) => {
422
+ let rowid = lineData[fieldKey];
423
+ let tableData2 = this.checkRows;
424
+ let row2;
425
+ for (var i = 0; i < tableData2.length; i++) {
426
+ let lineData2 = tableData2[i];
427
+ if (lineData2[fieldKey] == rowid) {
428
+ row2 = tableData2[i];
429
+ }
430
+ }
431
+ if (res.checked) {
432
+ if (!row2) {
433
+ this.checkRows.push(lineData);
434
+ }
435
+ } else {
436
+ if (row2) {
437
+ let delIndex;
438
+ let checkRows = this.checkRows;
439
+ for (var i = 0; i < checkRows.length; i++) {
440
+ if (checkRows[i][fieldKey] == rowid) {
441
+ delIndex = i;
442
+ break;
443
+ }
444
+ }
445
+ if (delIndex != null) checkRows.splice(delIndex, 1);
446
+ }
447
+ }
448
+ });
449
+ }
450
+ },
451
+ clearChecked() {
452
+ if (this.currentLayoutType !== "H5") {
453
+ let $grid1 = this.getGrid();
454
+ $grid1.clearCheckboxRow();
455
+ }
456
+ this.checkRows = [];
457
+ },
458
+ checkWithSubmit(obj) {
459
+ if (!this.selectMulti) {
460
+ let $grid1 = this.getGrid();
461
+ var rows = $grid1.getCheckboxRecords(true);
462
+ if (rows && rows.length) {
463
+ this.dialogSubmit();
464
+ }
465
+ }
466
+ },
467
+ close() {
468
+ let formRef = this.$refs.vFormRef;
469
+ this.showDialog = false;
470
+ this.$emit("update:visiable", false);
471
+ this.option.close && this.option.close(formRef, this);
472
+ },
473
+ dialogSubmit() {
474
+ let formRef = this.$refs.vFormRef;
475
+ if (this.option.confirm) {
476
+ if (this.option.confirm(this.checkRows, formRef, this) !== false) {
477
+ this.close();
478
+ }
479
+ } else {
480
+ this.close();
481
+ }
482
+ },
483
+ },
484
+ };
485
+ </script>
486
+
487
+ <style scoped lang="scss">
488
+ /* 原 ::v-deep .H5 .h5-fixed-bottom-btns{bottom:95px} 已删:本文件从未把 H5 类
489
+ 绑到任何元素上,该选择器从来没生效过。H5 底栏已改为流内布局。 */
490
+ ::v-deep .tree-container {
491
+ height: 100%;
492
+ .tree-box {
493
+ width: 14%;
494
+ height: 100%;
495
+ min-width: 13%;
496
+ border-right: solid 1px #f0f0f0;
497
+ .container-wrapper {
498
+ height: calc(100% - 34px);
499
+ > div {
500
+ height: 100%;
501
+ }
502
+ }
503
+ .tree-btns + .tree-list {
504
+ height: calc(100% - 41px);
505
+ }
506
+ }
507
+ .main-right {
508
+ width: calc(86% - 8px);
509
+ height: 100%;
510
+ }
511
+ .grid-height {
512
+ height: 100% !important;
513
+ }
514
+ #labBtn {
515
+ background-color: #f4f6fa;
516
+ position: relative;
517
+ width: 8px !important;
518
+ z-index: 8;
519
+ cursor: e-resize;
520
+ display: inline-block !important;
521
+ height: calc(100% + 8px);
522
+ margin: -8px 0px !important;
523
+ .icon {
524
+ position: absolute;
525
+ top: 50%;
526
+ left: -4.5px;
527
+ font-size: 17px;
528
+ margin-top: -16.8px;
529
+ color: #2a6494;
530
+ i {
531
+ display: block;
532
+ transform: rotate(90deg);
533
+ -ms-transform: rotate(90deg);
534
+ -moz-transform: rotate(90deg);
535
+ -webkit-transform: rotate(90deg);
536
+ -o-transform: rotate(90deg);
537
+ }
538
+ }
539
+ }
540
+ }
541
+ ::v-deep .labMargin .tree-container {
542
+ display: flex;
543
+ }
544
+ /* ::v-deep .tree-container #labBtn {
545
+ background-color: #f4f6fa;
546
+ position: relative;
547
+ width: 8px !important;
548
+ z-index: 8;
549
+ cursor: e-resize;
550
+ display: inline-block !important;
551
+ height: calc(100vh - 75px);
552
+ margin: -7px 0 !important;
553
+ } */
554
+ </style>