ocpview-plus 1.2.8 → 1.3.0
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/dist/ocpviewplus.min.esm.js +67 -121
- package/dist/ocpviewplus.min.js +14 -14
- package/package.json +1 -1
- package/src/components/masterplate/RewriteListdetails/indexV3.vue +4 -0
- package/src/components/masterplate/base.vue +3 -0
- package/src/components/masterplate/billdetailform.vue +4 -154
- package/src/components/masterplate/billquerygrid.vue +9 -3
- package/src/components/masterplate/contractappendix.vue +10 -3
- package/src/components/masterplate/layouttemplate.vue +1 -1
- package/src/components/masterplate/lefttreerightdetails.vue +1 -1
- package/src/components/tree/basetree.vue +33 -1
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:config="myConfig.detailConfig"
|
|
18
18
|
:dictData="dictData"
|
|
19
19
|
:moduleMethod="moduleMethod"
|
|
20
|
+
@handleSuccessAfter="handleSuccessAfter"
|
|
20
21
|
@doAction="doAction"
|
|
21
22
|
>
|
|
22
23
|
<template #toolbar>
|
|
@@ -312,6 +313,9 @@ export default {
|
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
315
|
},
|
|
316
|
+
handleSuccessAfter(response, file, fileList) {
|
|
317
|
+
this.$emit('handleSuccessAfter' , response, file, fileList);
|
|
318
|
+
}
|
|
315
319
|
},
|
|
316
320
|
mounted() {},
|
|
317
321
|
};
|
|
@@ -1008,6 +1008,9 @@ export default {
|
|
|
1008
1008
|
},
|
|
1009
1009
|
setHideDividerValue(value) {
|
|
1010
1010
|
this.$refs.layout.setHideDividerValue(value);
|
|
1011
|
+
},
|
|
1012
|
+
handleSuccessAfter(response, file, fileList) {
|
|
1013
|
+
this.$emit('handleSuccessAfter' , response, file, fileList);
|
|
1011
1014
|
}
|
|
1012
1015
|
},
|
|
1013
1016
|
watch: {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<DetailsBoxs v-if="temp2.type === 'DetailsBox'" :ref="temp2.name" :config="temp2" :dictData="dictData" @doAction="doAction"/>
|
|
20
20
|
<FormCardBox v-if="temp2.type === 'FormCardBox'" :ref="temp2.name" :config="temp2" :dictData="dictData"/>
|
|
21
21
|
<AppendixBoxs v-if="temp2.type === 'AppendixBox'" :ref="temp2.name" :config="temp2" :modulecode="modulecode" @doAction="doAction"/>
|
|
22
|
-
<AppendixBoxs2 v-if="temp2.type === 'AppendixBox2'" :ref="temp2.name" :config="temp2" :dictData="dictData" :modulecode="modulecode" @doAction="doAction"/>
|
|
22
|
+
<AppendixBoxs2 v-if="temp2.type === 'AppendixBox2'" :ref="temp2.name" :config="temp2" :dictData="dictData" :modulecode="modulecode" @handleSuccessAfter="handleSuccessAfter" @doAction="doAction"/>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
</Card>
|
|
@@ -219,159 +219,6 @@ export default {
|
|
|
219
219
|
},
|
|
220
220
|
|
|
221
221
|
methods:{
|
|
222
|
-
loadDynamicConfig() {
|
|
223
|
-
try {
|
|
224
|
-
const postData = {
|
|
225
|
-
modulecode: this.myConfig.modulecode,
|
|
226
|
-
moduleid: this.myConfig.modulecode
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
this.asyncPost(
|
|
230
|
-
this.uiconfig.resources,
|
|
231
|
-
"uiconfigs.getPageConfig",
|
|
232
|
-
postData,
|
|
233
|
-
(data) => {
|
|
234
|
-
if (!data || !this.uiconfig) {
|
|
235
|
-
console.log('1 没有配置数据')
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
this.mergeDynamicConfig(
|
|
240
|
-
this.uiconfig,
|
|
241
|
-
data
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
,function(data) {
|
|
245
|
-
console.error(data)
|
|
246
|
-
},function(data) {
|
|
247
|
-
console.error(data)
|
|
248
|
-
});
|
|
249
|
-
} catch (e) {
|
|
250
|
-
console.error('动态配置加载失败', e);
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* 通用递归合并配置
|
|
256
|
-
* @param {Object} localConfig 本地 config(this.uiconfig)
|
|
257
|
-
* @param {Object} serverConfig 接口返回 config
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
mergeDynamicConfig(localConfig, serverConfig) {
|
|
261
|
-
if (!localConfig || !serverConfig) {
|
|
262
|
-
console.log('1 没有配置数据')
|
|
263
|
-
return;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// ✅ 1️⃣ 处理 billQueryConfig
|
|
267
|
-
if (
|
|
268
|
-
localConfig.billQueryConfig.gridConfig.items &&
|
|
269
|
-
serverConfig.billQueryConfig.gridConfig.items
|
|
270
|
-
) {
|
|
271
|
-
this.mergeFlatItems(
|
|
272
|
-
localConfig.billQueryConfig.gridConfig.items,
|
|
273
|
-
serverConfig.billQueryConfig.gridConfig.items
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// ✅ 2️⃣ 处理 detailConfig
|
|
278
|
-
if (localConfig.detailConfig && serverConfig.detailConfig) {
|
|
279
|
-
this.mergeDetailConfig(
|
|
280
|
-
localConfig.detailConfig,
|
|
281
|
-
serverConfig.detailConfig
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
mergeDetailConfig(localDetail, serverDetail) {
|
|
287
|
-
|
|
288
|
-
// ✅ formsConfig
|
|
289
|
-
if (
|
|
290
|
-
localDetail.formsConfig.items &&
|
|
291
|
-
serverDetail.formsConfig.items
|
|
292
|
-
) {
|
|
293
|
-
this.mergeContainerItems(
|
|
294
|
-
localDetail.formsConfig.items,
|
|
295
|
-
serverDetail.formsConfig.items
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// ✅ billDetailConfig
|
|
300
|
-
if (
|
|
301
|
-
localDetail.billDetailConfig.items &&
|
|
302
|
-
serverDetail.billDetailConfig.items
|
|
303
|
-
) {
|
|
304
|
-
this.mergeContainerItems(
|
|
305
|
-
localDetail.billDetailConfig.items,
|
|
306
|
-
serverDetail.billDetailConfig.items
|
|
307
|
-
);
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
mergeContainerItems(localContainers, serverContainers) {
|
|
312
|
-
|
|
313
|
-
const containerMap = this.buildItemMap(localContainers);
|
|
314
|
-
|
|
315
|
-
serverContainers.forEach(serverContainer => {
|
|
316
|
-
|
|
317
|
-
const localContainer = containerMap.get(serverContainer.name);
|
|
318
|
-
if (!localContainer) {
|
|
319
|
-
console.log('2 没有配置localcontainer')
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
// ✅ 合并容器自身属性
|
|
324
|
-
Object.assign(localContainer, serverContainer);
|
|
325
|
-
|
|
326
|
-
// ✅ 如果有子字段
|
|
327
|
-
if (
|
|
328
|
-
Array.isArray(localContainer.items) &&
|
|
329
|
-
Array.isArray(serverContainer.items)
|
|
330
|
-
) {
|
|
331
|
-
this.mergeFlatItems(
|
|
332
|
-
localContainer.items,
|
|
333
|
-
serverContainer.items
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
},
|
|
338
|
-
|
|
339
|
-
mergeFlatItems(localItems, serverItems) {
|
|
340
|
-
const fieldMap = this.buildItemMap(localItems);
|
|
341
|
-
|
|
342
|
-
serverItems.forEach(serverItem => {
|
|
343
|
-
const localItem = fieldMap.get(serverItem.name);
|
|
344
|
-
console.log(serverItem.name, localItem)
|
|
345
|
-
if (localItem) {
|
|
346
|
-
console.log('合并前', localItem)
|
|
347
|
-
Object.assign(localItem, serverItem);
|
|
348
|
-
console.log('merge后', JSON.stringify(this.uiconfig))
|
|
349
|
-
this.uiconfig = Object.assign({}, this.uiconfig);
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
},
|
|
353
|
-
|
|
354
|
-
buildItemMap(items, map = new Map()) {
|
|
355
|
-
if (!Array.isArray(items)) return map;
|
|
356
|
-
|
|
357
|
-
items.forEach(item => {
|
|
358
|
-
if (!item) {
|
|
359
|
-
console.log('3 没有配置数据')
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
if (item.name) {
|
|
364
|
-
map.set(item.name, item);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
if (Array.isArray(item.items)) {
|
|
368
|
-
this.buildItemMap(item.items, map);
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
return map;
|
|
373
|
-
},
|
|
374
|
-
|
|
375
222
|
getCurlAnchorData() {
|
|
376
223
|
let tmp = [];
|
|
377
224
|
this.anchorData.forEach(el => {
|
|
@@ -1140,6 +987,9 @@ export default {
|
|
|
1140
987
|
});
|
|
1141
988
|
});
|
|
1142
989
|
}
|
|
990
|
+
},
|
|
991
|
+
handleSuccessAfter(response, file, fileList) {
|
|
992
|
+
this.$emit('handleSuccessAfter' , response, file, fileList);
|
|
1143
993
|
}
|
|
1144
994
|
},
|
|
1145
995
|
props:{
|
|
@@ -118,13 +118,10 @@ export default {
|
|
|
118
118
|
this.myConfig.gridConfig.showCondition = false;
|
|
119
119
|
this.myConfig.gridConfig.overrideData = this.gridOverrideData;
|
|
120
120
|
this.myConfig.gridConfig.onSelectionChange = this.gridOnSelectionChange;
|
|
121
|
-
this.myConfig.gridConfig.resources = this.config.resources;
|
|
122
121
|
this.myConfig.gridConfig.height = 1;
|
|
123
122
|
this.myConfig.gridConfig.adjustHeight = 5;
|
|
124
123
|
this.myConfig.gridConfig.showBorder = true;
|
|
125
124
|
this.myConfig.gridConfig.showStripe = true;
|
|
126
|
-
this.myConfig.gridConfig.method = this.config.classPrefix + ".search";
|
|
127
|
-
this.myConfig.gridConfig.response = this.config.response;
|
|
128
125
|
this.myConfig.gridConfig.generalOrientation = true;
|
|
129
126
|
this.myConfig.gridConfig.pageSize = "small";
|
|
130
127
|
this.myConfig.gridConfig.items.forEach((el) => {
|
|
@@ -147,6 +144,15 @@ export default {
|
|
|
147
144
|
if (this.myConfig.gridConfig.initRefresh !== undefined) {
|
|
148
145
|
this.initRefresh = this.myConfig.gridConfig.initRefresh;
|
|
149
146
|
}
|
|
147
|
+
if (!this.myConfig.gridConfig.method) {
|
|
148
|
+
this.myConfig.gridConfig.method = this.myConfig.classPrefix + '.search';
|
|
149
|
+
}
|
|
150
|
+
if (!this.myConfig.gridConfig.resources) {
|
|
151
|
+
this.myConfig.gridConfig.resources = this.config.resources;
|
|
152
|
+
}
|
|
153
|
+
if (!this.myConfig.gridConfig.response) {
|
|
154
|
+
this.myConfig.gridConfig.response = this.config.response;
|
|
155
|
+
}
|
|
150
156
|
if (this.myConfig.enablePermissions !== undefined) {
|
|
151
157
|
this.enablePermissions = this.myConfig.enablePermissions;
|
|
152
158
|
}
|
|
@@ -90,7 +90,11 @@ export default {
|
|
|
90
90
|
name: 'filememo',
|
|
91
91
|
type: 'ComboBox',
|
|
92
92
|
dictkey: 'CUSTFILETYPE',
|
|
93
|
-
|
|
93
|
+
visible: false,
|
|
94
|
+
}, {
|
|
95
|
+
label: '附件类型',
|
|
96
|
+
name: 'filemode',
|
|
97
|
+
type: 'TextBox',
|
|
94
98
|
width: 300,
|
|
95
99
|
}, {
|
|
96
100
|
label: '文件名称',
|
|
@@ -268,7 +272,9 @@ export default {
|
|
|
268
272
|
if (this.myConfig.readOnly) {
|
|
269
273
|
del.readOnly = true;
|
|
270
274
|
}
|
|
271
|
-
|
|
275
|
+
if (params.row.scenetype !== '0') {
|
|
276
|
+
btnConfig.items.push(del);
|
|
277
|
+
}
|
|
272
278
|
} else {
|
|
273
279
|
let up = this.$Method.copy(this.rowBtnData[0]);
|
|
274
280
|
if (this.myConfig.readOnly) {
|
|
@@ -398,7 +404,7 @@ export default {
|
|
|
398
404
|
this.showPdf(params);
|
|
399
405
|
}
|
|
400
406
|
},
|
|
401
|
-
handleSuccess (
|
|
407
|
+
handleSuccess (response, file, fileList) {
|
|
402
408
|
this.getFilesInfo(this.billno, this.modulecode, this.myConfig.notdelfile, this.myConfig.scenetype, this.doInitData);
|
|
403
409
|
this.flag = false;
|
|
404
410
|
if (this.myConfig.scenetype === '4') {
|
|
@@ -406,6 +412,7 @@ export default {
|
|
|
406
412
|
} else {
|
|
407
413
|
this.hideLoading();
|
|
408
414
|
}
|
|
415
|
+
this.$emit('handleSuccessAfter' , response, file, fileList);
|
|
409
416
|
},
|
|
410
417
|
handleMaxSize (file) {
|
|
411
418
|
this.alert('文件[' + file.name + ']的文件大小不允许超过' + this.myConfig.fileSize + 'M');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<component ref="layout" :is="uiLayoutType" :config="uiconfig" :dictData="globalConfig.dictData" :moduleMethod="globalConfig.userModuleMethod"
|
|
3
|
+
<component ref="layout" :is="uiLayoutType" :config="uiconfig" :dictData="globalConfig.dictData" :moduleMethod="globalConfig.userModuleMethod" @handleSuccessAfter="handleSuccessAfter" @doAction="doAction" />
|
|
4
4
|
<Modal title="附件" v-model="showDetailAppendix" :width="appendixCurrentWidth" :footer-hide="true">
|
|
5
5
|
<AppendixBoxs v-if="detalAppendixFlag" ref="detailappendix" :config="billDetailAppendixConfig" @doAction="doAction"/>
|
|
6
6
|
</Modal>
|
|
@@ -460,7 +460,7 @@ export default {
|
|
|
460
460
|
this.$refs.form.setReadOnly(true);
|
|
461
461
|
let temp = this.$refs.form.getData();
|
|
462
462
|
this.treeSeletedNode =[temp];
|
|
463
|
-
//
|
|
463
|
+
//this.initTree(true);
|
|
464
464
|
this.$refs.tree.updateNode(temp,'U');
|
|
465
465
|
if (!this.showTree) {
|
|
466
466
|
this.$refs.grid.refurbish();
|
|
@@ -799,7 +799,39 @@ export default {
|
|
|
799
799
|
|
|
800
800
|
},
|
|
801
801
|
|
|
802
|
-
setNodes(data
|
|
802
|
+
setNodes(data, name, value) {
|
|
803
|
+
let tempName = name;
|
|
804
|
+
if (name === 'readOnly') {
|
|
805
|
+
tempName = 'disabled';
|
|
806
|
+
} else if (name === 'selected') {
|
|
807
|
+
if (this.myConfig.multiSelect && this.myConfig.showCheckBox) {
|
|
808
|
+
tempName ='checked';
|
|
809
|
+
} else {
|
|
810
|
+
tempName = 'selected';
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
let responseId = this.myConfig.responseId;
|
|
814
|
+
this.$refs.tree.flatState.forEach(el => {
|
|
815
|
+
let index = data.findIndex(
|
|
816
|
+
el2 => el.node[responseId] === el2[responseId]
|
|
817
|
+
);
|
|
818
|
+
if (index > -1) {
|
|
819
|
+
if (el.node[tempName] !== value) {
|
|
820
|
+
let obj ={};
|
|
821
|
+
obj[tempName] = value;
|
|
822
|
+
Object.assign(el.node,obj);
|
|
823
|
+
}
|
|
824
|
+
} else {
|
|
825
|
+
if (el.node[tempName] !== !value) {
|
|
826
|
+
let obj ={};
|
|
827
|
+
obj[tempName] = !value;
|
|
828
|
+
Object.assign(el.node,obj);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
});
|
|
832
|
+
},
|
|
833
|
+
|
|
834
|
+
setNodese(data = [], name, value) {
|
|
803
835
|
let tempName = name;
|
|
804
836
|
if (name === 'readOnly') {
|
|
805
837
|
tempName = 'disabled';
|