cloud-web-corejs 1.0.281 → 1.1.0-dev.4
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/package.json +6 -2
- package/src/components/VabUpload/image-viewer.vue +442 -442
- package/src/components/VabUpload/index.vue +44 -2
- package/src/components/VabUpload/mixins.js +126 -19
- package/src/components/VabUpload/view.vue +247 -209
- package/src/components/baseTabs/mixins.js +181 -181
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +705 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +23 -12
- package/src/components/excelExport/exportItemConfigUtil.js +30 -0
- package/src/components/excelExport/mixins.js +3 -3
- package/src/components/mobile/statusTag/mixins.js +1 -61
- package/src/components/mobile/wf/content.vue +1662 -1556
- package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
- package/src/components/table/config.js +78 -78
- package/src/components/table/index.js +1276 -1276
- package/src/components/table/plugins/cell-area/index.js +1055 -0
- package/src/components/table/plugins/cell-area/index.scss +77 -0
- package/src/components/table/plugins/cell-area/util.js +224 -0
- package/src/components/table/tableForm.vue +330 -330
- package/src/components/table/tableFormMixin.js +318 -318
- package/src/components/table/vxeFilter/index.js +163 -163
- package/src/components/table/vxeFilter/mixin.js +316 -316
- package/src/components/wf/content.vue +1188 -1188
- package/src/components/wf/wf.js +40 -20
- package/src/components/wf/wfActionDropdown.vue +1 -1
- package/src/components/wf/wfActionItems.js +1 -1
- 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
- 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
- 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
- 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
- package/src/components/xform/form-designer/designer.js +15 -0
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
- package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
- package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
- package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
- package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
- package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
- package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
- package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
- package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
- package/src/components/xform/form-render/container-item/list-h5-item.vue +1688 -1700
- package/src/components/xform/form-render/index.vue +153 -147
- package/src/components/xform/form-render/indexMixin.js +12 -0
- package/src/components/xform/lang/en-US.js +10 -0
- package/src/components/xform/lang/zh-CN.js +12 -0
- package/src/components/xform/mixins/defaultHandle.js +707 -707
- package/src/components/xform/styles/h5.scss +1992 -0
- package/src/components/xform/utils/textMaskUtil.js +182 -179
- package/src/components/xform/utils/treeTableUtil.js +1292 -1265
- package/src/components/xform/utils/util.js +56 -11
- package/src/index.js +9 -4
- package/src/layout/components/extractedCode/viewDialog.vue +7 -7
- package/src/router/index.js +21 -0
- package/src/router/modules/customer.js +71 -14
- package/src/store/modules/permission.js +17 -18
- package/src/utils/pdfUtil.js +429 -429
- package/src/utils/resolveViewComponent.js +142 -16
- package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
- package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
- package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
- package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
- package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
- package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
- package/src/views/bd/project/branch/form_script/list.vue +31 -0
- package/src/views/bd/project/branch/form_template/list.vue +30 -0
- package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
- package/src/views/bd/project/common/form_script/list.vue +16 -0
- package/src/views/bd/project/common/form_template/list.vue +15 -0
- package/src/views/bd/project/common/menu_kind/list.vue +15 -0
- package/src/views/bd/project/core/branchContext.js +100 -0
- package/src/views/bd/project/core/branchPage.js +78 -0
- package/src/views/bd/project/core/branchPageWrap.vue +225 -0
- package/src/views/bd/project/core/branchScope.js +44 -0
- package/src/views/bd/project/core/branchSearchPage.js +285 -0
- package/src/views/bd/project/core/branchSelect.vue +85 -0
- package/src/views/bd/project/core/branchTreeBar.vue +81 -0
- package/src/views/bd/project/core/httpBranchPatch.js +58 -0
- package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
- package/src/views/bd/project/datatable/table_model/list.vue +15 -0
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/table_model/edit.vue +1066 -1066
- package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
- package/src/views/demo/bizTab/bill/billConfig.js +41 -0
- package/src/views/demo/bizTab/bill/detail.vue +436 -0
- package/src/views/demo/bizTab/bill/list.vue +288 -0
- package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
- package/src/views/demo/bizTab/simple/billApi.js +123 -0
- package/src/views/demo/bizTab/simple/detail.vue +407 -0
- package/src/views/demo/bizTab/simple/list.vue +217 -0
- package/src/views/demo/bizTab/standalone/index.vue +121 -0
- package/src/views/demo/bizTab/wf/billConfig.js +44 -0
- package/src/views/demo/bizTab/wf/detail.vue +661 -0
- package/src/views/demo/bizTab/wf/list.vue +242 -0
- package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
- package/src/views/support/form-dialog-demo/index.vue +537 -0
- package/src/views/user/file_view_ins/list.vue +3 -3
- package/src/views/user/home/index.vue +8 -6
- package/src/views/user/home/wjl/content.vue +1569 -0
- package/src/views/user/notify_message/dialog.vue +7 -5
- package/src/views/user/outLink/cc_form_view.vue +188 -0
- package/src/views/user/outLink/form_view.vue +2 -2
- package/src/views/user/outLink/index.vue +4 -4
- package/src/views/user/outLink/view.vue +3 -3
- package/src/views/user/role/edit.vue +632 -632
- package/src/views/user/role/list.vue +260 -260
- package/src/views/user/wf/iframe/index.vue +3 -3
- package/src/views/user/wf/iframe/index2.vue +3 -3
- package/src/views/user/wf/wf_manage/list.vue +1112 -1116
- package/src/views/user/wf/wf_manage/list2.vue +9 -13
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
- package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
- package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
- 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
|
-
|
|
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
|
-
transform: rotate(90deg);
|
|
534
|
-
-
|
|
535
|
-
-
|
|
536
|
-
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
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>
|