ocpview-plus 1.1.4 → 1.1.6
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/README.md +7 -0
- package/dist/ocpviewplus.min.esm.js +23 -10
- package/dist/ocpviewplus.min.js +2 -2
- package/package.json +1 -1
- package/src/components/masterplate/leftlistrightdetails.vue +2 -2
- package/src/components/masterplate/lefttreerightdetails.vue +6 -0
- package/src/components/poptextbox/poptextbox.vue +41 -29
package/package.json
CHANGED
|
@@ -170,9 +170,9 @@ export default {
|
|
|
170
170
|
},
|
|
171
171
|
methods: {
|
|
172
172
|
setLogName() {
|
|
173
|
-
this.logName.push({code:this.myConfig.
|
|
173
|
+
this.logName.push({code:this.myConfig.response,name:'主表'});
|
|
174
174
|
this.myConfig.detailConfig.formsConfig.items.forEach(el => {
|
|
175
|
-
this.initLogName(el.items,this.myConfig.
|
|
175
|
+
this.initLogName(el.items,this.myConfig.response,el.title)
|
|
176
176
|
});
|
|
177
177
|
if (this.myConfig.detailConfig.billDetailConfig !== undefined && this.myConfig.detailConfig.billDetailConfig.items) {
|
|
178
178
|
this.myConfig.detailConfig.billDetailConfig.items.forEach(el => {
|
|
@@ -128,6 +128,7 @@ export default {
|
|
|
128
128
|
this.conditionConfig.data = this.$Method.copy(this.dictData[this.conditionConfig.dictkey]);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
if (this.conditionConfig.valueChanged) this.conditionConfig.onChange = this.$Method.copy(this.conditionConfig.valueChanged);
|
|
131
132
|
this.conditionConfig.valueChanged = this.conditionValueChanged;
|
|
132
133
|
this.showCondition = true;
|
|
133
134
|
}
|
|
@@ -562,6 +563,11 @@ export default {
|
|
|
562
563
|
return this.$refs.condition;
|
|
563
564
|
},
|
|
564
565
|
conditionValueChanged(e) {
|
|
566
|
+
let flag = true;
|
|
567
|
+
if (this.conditionConfig.onChange) flag = this.conditionConfig.onChange(e);
|
|
568
|
+
if (flag === undefined) flag = true;
|
|
569
|
+
if (!flag) return flag;
|
|
570
|
+
|
|
565
571
|
this.$nextTick(() => {
|
|
566
572
|
let tmp = {};
|
|
567
573
|
let self = this;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<template>
|
|
1
|
+
<template>
|
|
2
2
|
<div v-show="myConfig.visible" :class="classes" >
|
|
3
3
|
<template v-if="multiple">
|
|
4
4
|
<div ref="myControl" class="ivu-select-selection">
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
</Tooltip>
|
|
34
34
|
<Icon type="ios-search" class="ivu-select-arrow" @click.enter.stop="click"></Icon>
|
|
35
35
|
</div>
|
|
36
|
-
</template>
|
|
36
|
+
</template>
|
|
37
37
|
<template v-else>
|
|
38
38
|
<Input ref="myControl" v-model="text" icon="ios-search" :size="myConfig.size" type="text" :placeholder="myConfig.placeholder" :disabled="myConfig.readOnly" :readonly="!myConfig.allowInput" :clearable="myConfig.clearable" @on-click="click" @keydown.enter.stop="onEnter" @on-blur="onEnter" @on-clear="onEnter"/>
|
|
39
|
-
</template>
|
|
39
|
+
</template>
|
|
40
40
|
<Modal v-model="popShow" :styles="queryConfig.popStyle" :width="currentWidth" :title="modeTitle" :footer-hide="footerHide" :draggable="draggable" :closable="myConfig.closable" class="efuture-model" >
|
|
41
41
|
<div>
|
|
42
42
|
<component :is="pop" ref="popView" :config="queryConfig" :dictData="myConfig.dictData" @conditionAction="conditionAction" :isPop="true" @dbclick="dbclick"/></div>
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</Row>
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
</Modal>
|
|
57
57
|
</div>
|
|
58
58
|
</template>
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
this.popShow = false;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
|
|
190
190
|
break;
|
|
191
191
|
case 'condition_cancel':
|
|
192
192
|
this.popShow = false;
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
let data = [];
|
|
211
211
|
data.push(rows);
|
|
212
212
|
rows = data;
|
|
213
|
-
}
|
|
213
|
+
}
|
|
214
214
|
if (this.myConfig.setDataBefore) {
|
|
215
215
|
if (isnull === 'Y') {
|
|
216
216
|
flag = this.myConfig.setDataBefore(null,this);
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
}
|
|
249
249
|
this.oldValue = this.value;
|
|
250
250
|
this.oldText = this.text;
|
|
251
|
-
}
|
|
251
|
+
}
|
|
252
252
|
this.setFatherValue();
|
|
253
253
|
} else {
|
|
254
254
|
if (this.multiple) {
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
} else {
|
|
275
275
|
name = '';
|
|
276
276
|
}
|
|
277
|
-
}
|
|
277
|
+
}
|
|
278
278
|
} else {
|
|
279
279
|
if (code) {
|
|
280
280
|
if (!name) {
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
}
|
|
283
283
|
} else {
|
|
284
284
|
name = '';
|
|
285
|
-
}
|
|
285
|
+
}
|
|
286
286
|
}
|
|
287
287
|
let obj = {};
|
|
288
288
|
obj.code = code;
|
|
@@ -337,14 +337,14 @@
|
|
|
337
337
|
if (this.config.multiSelect !== undefined) {
|
|
338
338
|
this.queryConfig.multiSelect = this.config.multiSelect;
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
|
|
341
341
|
if (this.config.showAll !== undefined) {
|
|
342
342
|
this.queryConfig.showAll = this.config.showAll;
|
|
343
343
|
}
|
|
344
344
|
if (this.queryConfig.popControl) {
|
|
345
345
|
if (this.queryConfig.popControl !== 'SimpleViewGrid' && this.queryConfig.popControl !== 'SimpleTree') {
|
|
346
346
|
this.footerHide = true;
|
|
347
|
-
}
|
|
347
|
+
}
|
|
348
348
|
}
|
|
349
349
|
this.setSizeConfig(this.queryConfig);
|
|
350
350
|
this.queryConfig.overrideSearchParam = this.overrideSearchParam;
|
|
@@ -355,10 +355,10 @@
|
|
|
355
355
|
this.queryConfig.items.forEach(el => {
|
|
356
356
|
let dictkey = el.dictkey;
|
|
357
357
|
if (el.customDictkey) {
|
|
358
|
-
dictkey = el.customDictkey;
|
|
358
|
+
dictkey = el.customDictkey;
|
|
359
359
|
}
|
|
360
360
|
if (dictkey) {
|
|
361
|
-
obj[dictkey] = '';
|
|
361
|
+
obj[dictkey] = '';
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
}
|
|
@@ -378,16 +378,16 @@
|
|
|
378
378
|
if (this.myConfig.multiple) {
|
|
379
379
|
this.multiple = true;
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
|
|
382
382
|
if(this.queryConfig.isTree) {
|
|
383
383
|
this.queryConfig.showTitle = false;
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
|
|
386
386
|
if (this.myConfig.setQueryConfig) {
|
|
387
387
|
this.myConfig.setQueryConfig(this.queryConfig);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
|
|
390
|
+
|
|
391
391
|
},
|
|
392
392
|
valueToFatherValue() {
|
|
393
393
|
let para= {};
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
} else {
|
|
403
403
|
para.value = this.value;
|
|
404
404
|
para.text = this.text;
|
|
405
|
-
}
|
|
405
|
+
}
|
|
406
406
|
return para;
|
|
407
407
|
},
|
|
408
408
|
click(){
|
|
@@ -431,12 +431,24 @@
|
|
|
431
431
|
if (this.config.selectkey) {
|
|
432
432
|
if(this.query && this.query.Config ) {
|
|
433
433
|
const lastParam = this.query.Config.lastQueryParam;
|
|
434
|
-
if(
|
|
435
|
-
const
|
|
436
|
-
|
|
437
|
-
|
|
434
|
+
if (this.query?.Config) {
|
|
435
|
+
const lastParam = this.query.Config.lastQueryParam || {}; // 始终记住前一次的参数
|
|
436
|
+
const currentParam = this.searchParam || {}; // 当前的参数
|
|
437
|
+
|
|
438
|
+
let finalParam = currentParam;
|
|
439
|
+
|
|
440
|
+
// 只有 lastflag = "1" 时才合并记录的旧参数
|
|
441
|
+
if (currentParam.lastflag === "1") {
|
|
442
|
+
finalParam = { ...lastParam, ...currentParam }; // 当前参数优先覆盖旧参数
|
|
438
443
|
}
|
|
439
|
-
|
|
444
|
+
|
|
445
|
+
// 无论是否合并,都要记录当前的最终 searchParam 作为下一次的 lastQueryParam
|
|
446
|
+
this.query.Config.lastQueryParam = { ...finalParam };
|
|
447
|
+
|
|
448
|
+
// 更新 this.searchParam
|
|
449
|
+
this.searchParam = finalParam;
|
|
450
|
+
|
|
451
|
+
// 传递给 popView
|
|
440
452
|
this.$refs['popView'].setSearchBeforeSearchParam(this.searchParam);
|
|
441
453
|
}
|
|
442
454
|
}
|
|
@@ -452,7 +464,7 @@
|
|
|
452
464
|
this.$refs['popView'].setData([]);
|
|
453
465
|
}
|
|
454
466
|
|
|
455
|
-
}
|
|
467
|
+
}
|
|
456
468
|
}
|
|
457
469
|
},
|
|
458
470
|
onEnter(e) {
|
|
@@ -470,7 +482,7 @@
|
|
|
470
482
|
if (this.myConfig.searchBefore) {
|
|
471
483
|
this.$refs['popView'].clearSearchBeforeSearchParam();
|
|
472
484
|
obj.value = this.text;
|
|
473
|
-
flag = this.myConfig.searchBefore(this,obj);
|
|
485
|
+
flag = this.myConfig.searchBefore(this,obj);
|
|
474
486
|
}
|
|
475
487
|
if (flag) {
|
|
476
488
|
if (!this.text) {
|
|
@@ -486,7 +498,7 @@
|
|
|
486
498
|
}
|
|
487
499
|
if (this.searchParam !== undefined) {
|
|
488
500
|
this.$refs['popView'].setSearchBeforeSearchParam(this.searchParam);
|
|
489
|
-
}
|
|
501
|
+
}
|
|
490
502
|
searchParam[this.queryConfig.responseCode] = this.text;
|
|
491
503
|
let data = this.$refs['popView'].popValueChanged(searchParam);
|
|
492
504
|
if (data.length === 0) {
|
|
@@ -517,7 +529,7 @@
|
|
|
517
529
|
let mktname=mktNameArray.join(',');
|
|
518
530
|
this.text=mktname;
|
|
519
531
|
},
|
|
520
|
-
|
|
532
|
+
|
|
521
533
|
onToggleExpand() {
|
|
522
534
|
return this.$refs.myTreeBox.onToggleExpand();
|
|
523
535
|
},
|
|
@@ -570,7 +582,7 @@
|
|
|
570
582
|
} else {
|
|
571
583
|
temp.label = el;
|
|
572
584
|
}
|
|
573
|
-
selectedMultiple.push(temp);
|
|
585
|
+
selectedMultiple.push(temp);
|
|
574
586
|
});
|
|
575
587
|
}
|
|
576
588
|
this.selectedMultiple = selectedMultiple;
|
|
@@ -607,6 +619,6 @@
|
|
|
607
619
|
immediate: true
|
|
608
620
|
}
|
|
609
621
|
}
|
|
610
|
-
|
|
622
|
+
|
|
611
623
|
};
|
|
612
|
-
</script>
|
|
624
|
+
</script>
|