cloud-web-corejs 1.0.54-dev.744 → 1.0.54-dev.746

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 (53) hide show
  1. package/package.json +192 -192
  2. package/src/App.vue +73 -71
  3. package/src/components/baseArea/index.vue +1628 -1628
  4. package/src/components/fileLibrary/categoryMoveDialog.vue +109 -109
  5. package/src/components/fileLibrary/fileObjAuthDialog.vue +297 -298
  6. package/src/components/fileLibrary/index.vue +1109 -1110
  7. package/src/components/fileLibrary/propertiesDialog.vue +190 -190
  8. package/src/components/fileLibrary/recycleBinDialog.vue +237 -236
  9. package/src/components/wf/mixins/setCandidateDialog.js +217 -217
  10. package/src/components/wf/mixins/setCandidateDialog2.js +252 -252
  11. package/src/components/xform/docs//345/257/271/346/257/224/345/212/237/350/203/275/350/220/275/345/234/260/346/226/271/346/241/210.md +986 -986
  12. package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +971 -0
  13. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +408 -0
  14. package/src/components/xform/form-designer/form-widget/field-widget/area-select-widget.vue +272 -272
  15. package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +216 -216
  16. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +928 -928
  17. package/src/components/xform/form-designer/index.vue +195 -195
  18. package/src/components/xform/form-designer/indexMixin.js +848 -848
  19. package/src/components/xform/form-designer/setting-panel/index.vue +313 -314
  20. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +124 -124
  21. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +369 -369
  22. package/src/components/xform/form-designer/widget-panel/index.vue +389 -389
  23. package/src/components/xform/form-designer/widget-panel/indexMixin.js +343 -343
  24. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +4531 -4531
  25. package/src/components/xform/form-render/container-item/data-table-mixin.js +4748 -4576
  26. package/src/components/xform/form-render/container-item/tab-item.vue +125 -125
  27. package/src/components/xform/form-render/indexMixin.js +5061 -5078
  28. package/src/components/xform/lang/en-US.js +457 -457
  29. package/src/components/xform/lang/zh-CN.js +628 -628
  30. package/src/components/xform/utils/formHttp.js +162 -0
  31. package/src/components/xform/utils/util.js +1585 -1554
  32. package/src/index.js +344 -230
  33. package/src/layout/components/AppMain.vue +122 -122
  34. package/src/layout/components/extractedCode/viewDialog.vue +207 -207
  35. package/src/layout/components/langTool.vue +128 -123
  36. package/src/layout/defaultLayout.vue +164 -158
  37. package/src/permission.js +185 -135
  38. package/src/store/config/index.js +667 -669
  39. package/src/store/modules/micro.js +46 -0
  40. package/src/store/modules/permission.js +461 -373
  41. package/src/store/modules/user.js +419 -415
  42. package/src/utils/auth.js +27 -1
  43. package/src/utils/index.js +579 -6
  44. package/src/utils/keepAlive.js +4 -0
  45. package/src/utils/menuAdapter.js +183 -0
  46. package/src/utils/request.js +417 -28
  47. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +483 -491
  48. package/src/views/bd/setting/form_script/form_list.vue +174 -174
  49. package/src/views/bd/setting/form_script/mixins/form_list.js +330 -330
  50. package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -171
  51. package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +253 -254
  52. package/src/views/user/menuFallback/index.vue +123 -0
  53. package/src/views/user/wf/wfReport/index.vue +625 -619
@@ -0,0 +1,408 @@
1
+ <template>
2
+ <el-dialog
3
+ title="单据列表"
4
+ :append-to-body="true"
5
+ :modal-append-to-body="true"
6
+ :close-on-click-modal="falseValue"
7
+ :visible.sync="showDialog"
8
+ :modal="falseValue"
9
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
10
+ width="1200px"
11
+ @close="dialogClose"
12
+ v-el-drag-dialog
13
+ v-el-dialog-center
14
+ >
15
+ <div class="cont" style="height:450px">
16
+ <vxe-grid
17
+ class="is-pointer"
18
+ ref="table-m1"
19
+ v-bind="vxeOption"
20
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
21
+ @custom="$vxeTableUtil.customHandle"
22
+ @checkbox-change="addDataTable"
23
+ @checkbox-all="checkAll"
24
+ @cell-dblclick="checkWithSubmit"
25
+ >
26
+ <template #form>
27
+ <div class="clearfix screen-btns">
28
+ <div class="fr">
29
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
30
+ plain>重置
31
+ </vxe-button>
32
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索</vxe-button>
33
+ </div>
34
+ </div>
35
+ <template v-if="searchFields.length>0">
36
+ <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
37
+ @submit="searchEvent" @reset="searchEvent">
38
+ <vxe-form-item v-for="(item,index) in searchFields"
39
+ :key="index" :title="item.label+':'">
40
+ <template v-slot>
41
+ <el-input v-model="formData[item.prop]" size="small" clearable/>
42
+ </template>
43
+ </vxe-form-item>
44
+ </vxe-form>
45
+ </template>
46
+ </template>
47
+ </vxe-grid>
48
+ </div>
49
+ <label id="labBtn" class="transverse">
50
+ <div class="icon">
51
+ <i class="el-icon-more"></i>
52
+ <i class="el-icon-more"></i>
53
+ </div>
54
+ </label>
55
+ <div class="multipleChoice">
56
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a class="allDel icon-quanbushanchu"
57
+ @click="clearChecked()"></a>
58
+ </el-tooltip>
59
+ <div class="list">
60
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="'c'+index">
61
+ <p>{{ checkRow[showFormField] }}</p>
62
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <span slot="footer" class="dialog-footer">
67
+ <span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
68
+ <el-button type="primary" plain class="button-sty" @click="dialogClose">
69
+ <i class="el-icon-close el-icon"></i>
70
+ {{ $t2('取 消', 'system.button.cancel2') }}
71
+ </el-button>
72
+ <el-button type="primary" @click="dialogPrimary" class="button-sty">
73
+ <i class="el-icon-check el-icon"></i>
74
+ {{ $t2('确 定', 'system.button.confirm2') }}
75
+ </el-button>
76
+ </span>
77
+ </el-dialog>
78
+ </template>
79
+
80
+ <script>
81
+ import {selectDialogMixins} from '../../../../../mixins/selectDialog/index.js';
82
+
83
+ export default {
84
+ name: "vabSearchDialog",
85
+ props: ['visiable', 'multi', 'rows', 'param', 'formCode', 'showFormField', 'widget'],
86
+ mixins: [selectDialogMixins],
87
+ inject: ['scriptHttp'],
88
+ created() {
89
+ this.initSetting();
90
+ this.checkField = this.showFormField;
91
+ },
92
+ mounted() {
93
+ this.initTableM1();
94
+ },
95
+ data() {
96
+ var that = this;
97
+ return {
98
+ showDialog: true,
99
+ falseValue: false,
100
+ selectMulti: true,
101
+ formData: {},
102
+ vxeOption: {},
103
+ formInsListField0DTOs: [],
104
+ formInsListField1DTOs: [],
105
+ targetFormTemplate: null,
106
+ formJson: null,
107
+ tableColumns: [],
108
+ searchFields: [],
109
+ tableConfig: {},
110
+ checkField: null,
111
+ filedKey: 'dialogConfig'
112
+ };
113
+ },
114
+ methods: {
115
+ searchEvent() {
116
+ this.$refs['table-m1'].commitProxy('reload');
117
+ },
118
+ resetEvent() {
119
+ this.formData = {};
120
+ this.$refs['table-m1'].commitProxy('reload');
121
+ },
122
+ async initTableM1() {
123
+ let that = this;
124
+ let tableRef = 'table-m1';
125
+ let syncColumns = [];
126
+ await this.createColumns().then(res => {
127
+ syncColumns = res;
128
+ });
129
+ this.checkField = this.tableConfig.showFormField || this.showFormField || 'id';
130
+ let defaultPath = USER_PREFIX + '/form_ins/listPage';
131
+ let path = this.tableConfig.url || defaultPath;
132
+
133
+ let optionModel = this.widget.options;
134
+ let targetFormConfig = this.targetFormConfig;
135
+ let isScriptEnabled = false;
136
+ let scriptUuid = null;
137
+ let scriptUuid2 = null;
138
+ let returnType = 0;
139
+ if (this.targetFormTemplate) {
140
+ let gridConfig = targetFormConfig[this.filedKey] || {};
141
+ isScriptEnabled = !!gridConfig.isLoadDataByAccess && !!gridConfig.scriptUuid;
142
+ scriptUuid = gridConfig.scriptUuid;
143
+ scriptUuid2 = gridConfig.scriptUuid2;
144
+ returnType = isScriptEnabled ? gridConfig.accessReturnType : 1;
145
+ } else {
146
+ isScriptEnabled = !!optionModel.isLoadDataByAccess && !!optionModel.scriptUuid;
147
+ scriptUuid = optionModel.scriptUuid;
148
+ scriptUuid2 = optionModel.scriptUuid2;
149
+ returnType = isScriptEnabled ? optionModel.accessReturnType : 1;
150
+ }
151
+ if(returnType===null || returnType===undefined){
152
+ returnType = 1;
153
+ }
154
+
155
+ let tableOption = {
156
+ vue: that,
157
+ tableRef: tableRef,
158
+ tableName: 'user-form_form_ins_dialog-m1',
159
+ path: path,
160
+ param: () => {
161
+ let customParam = this.getCustomParam();
162
+ let condition = {
163
+ ...this.formData,
164
+ ...this.param,
165
+ ...customParam
166
+ }
167
+ Object.keys(condition).forEach(key => {
168
+ if (condition[key] === "" || condition[key] === null) {
169
+ delete condition[key]
170
+ }
171
+ })
172
+ if (path == defaultPath) {
173
+ return {
174
+ formCode: this.formCode,
175
+ condition: condition
176
+ };
177
+ } else {
178
+ return {
179
+ ...condition
180
+ };
181
+ }
182
+
183
+ },
184
+ columns: [
185
+ {type: 'checkbox', fixed: 'left', width: 48, resizable: false},
186
+ ...syncColumns,
187
+ {
188
+ width: 47,
189
+ fixed: 'right',
190
+ title: '',
191
+ sortable: false
192
+ }
193
+ ],
194
+ config: {
195
+ checkboxConfig: {
196
+ checkStrictly: true,
197
+ showHeader: this.selectMulti,
198
+ trigger: 'row'
199
+ },
200
+ proxyConfig: {
201
+ props: {
202
+ result: returnType === 1 ? 'objx.records' : 'objx', // 配置响应结果列表字段
203
+ total: returnType === 1 ? 'objx.total' : 'objx.length' // 配置响应结果总页数字段
204
+ },
205
+ ajax: {
206
+ // 接收 Promise 对象
207
+ query: ({page, sorts, filters, form}) => {
208
+ if (!path) {
209
+ return;
210
+ }
211
+
212
+ let formData = tableOption.param ? tableOption.param() || {} : {};
213
+ const queryParams = Object.assign({}, formData);
214
+ if (isScriptEnabled) {
215
+ let condition = queryParams.condition
216
+ delete queryParams.condition;
217
+ delete queryParams.formCode;
218
+ Object.assign(queryParams, condition);
219
+ }
220
+
221
+ // 处理排序条件
222
+ const firstSort = sorts[0];
223
+ if (firstSort) {
224
+ queryParams.sort = firstSort.property;
225
+ queryParams.order = firstSort.order;
226
+ }
227
+ // 处理筛选条件
228
+ filters.forEach(({property, values}) => {
229
+ queryParams[property] = values.join(",");
230
+ });
231
+ if (page.pageSize !== undefined) {
232
+ queryParams["size"] = `${page.pageSize}`;
233
+ queryParams["current"] = `${page.currentPage}`;
234
+ }
235
+
236
+ var $grid = this.$refs[tableRef];
237
+ let isQueryAllPage = $grid.isQueryAllPage;
238
+ let pathStr1 = "";
239
+ if (isQueryAllPage === false) {
240
+ queryParams.searchCount = false;
241
+ }
242
+
243
+ var reqPath = typeof path == "function" ? path() : path;
244
+
245
+ let toDo = (res) => {
246
+ let rows = res.objx ? res.objx.records || res.objx || [] : [];
247
+ if (tableOption.callback) {
248
+ that.$nextTick(() => {
249
+ setTimeout(function () {
250
+ tableOption.callback(rows);
251
+ }, 0);
252
+ });
253
+ }
254
+ }
255
+
256
+ return new Promise((resolve, reject) => {
257
+ if (isScriptEnabled) {
258
+ let option1 = this.$baseLodash.cloneDeep(optionModel);
259
+ option1.scriptUuid = scriptUuid;
260
+ option1.scriptUuid2 = scriptUuid2;
261
+ this.scriptHttp({
262
+ options: option1,
263
+ params: queryParams,
264
+ targetFormTemplate: this.targetFormTemplate,
265
+ isLoading: false,
266
+ callback: (res) => {
267
+ resolve(res);
268
+ if (res.type == "success") {
269
+ toDo(res);
270
+ }
271
+ }
272
+ });
273
+ } else {
274
+ that.$http({
275
+ url: reqPath,
276
+ method: "post",
277
+ data: queryParams,
278
+ callback: (res) => {
279
+ resolve(res);
280
+ if (res.type == "success") {
281
+ toDo(res);
282
+ }
283
+ },
284
+ error: (error) => {
285
+ reject(error);
286
+ },
287
+ });
288
+ }
289
+ });
290
+ }
291
+ },
292
+ }
293
+ }
294
+ };
295
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
296
+ that.vxeOption = opts;
297
+ });
298
+ },
299
+ async createColumns() {
300
+ await this.getFormTemplate();
301
+ await this.getListFields();
302
+
303
+ let formField = this.formField;
304
+ return this.tableColumns.map((row, index) => {
305
+ let column = {
306
+ title: row.label,
307
+ field: row.prop,
308
+ width: 150
309
+ }
310
+ if (index === 0) {
311
+ column.fixed = 'left';
312
+ }
313
+ return column;
314
+ })
315
+ },
316
+ async getListFields() {
317
+ if (!this.formCode) return;
318
+ return this.$http({
319
+ url: USER_PREFIX + '/form_ins/getListFields',
320
+ method: `post`,
321
+ data: {stringOne: this.formCode},
322
+ isLoading: true,
323
+ loadingTarget: document.body,
324
+ // modalStrictly: true,
325
+ success: res => {
326
+ let formInsListFieldDTOs = res.objx || [];
327
+ this.formInsListField0DTOs = formInsListFieldDTOs.filter(item => item.fieldType === 0);
328
+ this.formInsListField1DTOs = formInsListFieldDTOs.filter(item => item.fieldType === 1);
329
+
330
+ if (!this.tableColumns.length) {
331
+ this.tableColumns = this.formInsListField0DTOs.map(row => {
332
+ return {
333
+ label: row.fieldDesc,
334
+ prop: row.fieldName,
335
+ width: 150
336
+ }
337
+ });
338
+ }
339
+ if (!this.searchFields.length) {
340
+ this.searchFields = this.formInsListField1DTOs.map(row => {
341
+ return {
342
+ label: row.fieldDesc,
343
+ prop: row.fieldName
344
+ }
345
+ });
346
+ }
347
+ }
348
+ });
349
+ },
350
+ async getFormTemplate() {
351
+ let options = this.widget.options;
352
+ let customGridConfig = options[this.filedKey] || {};
353
+ this.customGridConfig = customGridConfig
354
+ let searchField0s = customGridConfig && customGridConfig.searchFields ? customGridConfig.searchFields : [];
355
+ let tableColumn0s = customGridConfig && customGridConfig.tableColumns ? customGridConfig.tableColumns : [];
356
+ if (!this.formCode) {
357
+ this.searchFields = searchField0s;
358
+ this.tableColumns = tableColumn0s;
359
+ this.tableConfig = customGridConfig;
360
+ this.targetFormTemplate = null
361
+ this.targetFormConfig = null;
362
+ return;
363
+ }
364
+ return this.$http({
365
+ url: USER_PREFIX + `/formTemplate/getByFormCode`,
366
+ method: `post`,
367
+ data: {
368
+ stringOne: this.formCode
369
+ },
370
+ isLoading: true,
371
+ loadingTarget: document.body,
372
+ success: res => {
373
+ let targetFormTemplate = res.objx || {};
374
+ let formJson = targetFormTemplate.formViewContent ? JSON.parse(targetFormTemplate.formViewContent) : {};
375
+ let formConfig = formJson.formConfig;
376
+ this.targetFormTemplate = res.objx ? targetFormTemplate : null
377
+ this.targetFormConfig = formConfig;
378
+
379
+ let gridConfig = formConfig[this.filedKey] || {}
380
+
381
+ let searchFields = gridConfig.searchFields || []
382
+ let tableColumns = gridConfig.tableColumns || [];
383
+ searchFields = searchFields.filter(item => {
384
+ return !!item.prop && !!item.label;
385
+ });
386
+ this.tableColumns = tableColumns;
387
+ this.searchFields = searchFields;
388
+
389
+ let tableConfig = {};
390
+ Object.assign(tableConfig, gridConfig, customGridConfig)
391
+ this.tableConfig = tableConfig;
392
+ }
393
+ });
394
+ },
395
+ getCustomParam() {
396
+ let tableConfig = this.tableConfig
397
+ if (!!tableConfig.searchParams) {
398
+ var e = new Function(tableConfig.searchParams);
399
+ return e.call(this);
400
+ }
401
+ }
402
+ }
403
+ }
404
+ </script>
405
+
406
+ <style scoped>
407
+
408
+ </style>