ocpview-plus 1.0.6 → 1.0.8
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 +209 -140
- package/dist/ocpviewplus.min.js +14 -14
- package/package.json +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTable.vue +67 -16
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlbox.vue +1 -1
- package/src/components/masterplate/RewriteBillListDetails/BillInfoPanelEditTableControlboxNumberbox.vue +6 -0
package/package.json
CHANGED
|
@@ -435,17 +435,25 @@ export default {
|
|
|
435
435
|
* 【覆写】手工触发编辑事件
|
|
436
436
|
*/
|
|
437
437
|
valueChanged(obj) {
|
|
438
|
-
const $tableVM = this.$refs.table;
|
|
439
|
-
let editRecord = $tableVM.getEditRecord();
|
|
440
|
-
if (!editRecord) {
|
|
441
|
-
editRecord = this.VG_currentEditRecord;
|
|
442
|
-
}
|
|
443
|
-
const params = { ...obj, rowinfo: editRecord };
|
|
444
438
|
const column = this.findColumnConfig(obj.name, this.myConfig.items);
|
|
445
|
-
|
|
439
|
+
this.addRowInfo(obj, column);
|
|
440
|
+
const valueChangedSucc = column.valueChanged(obj);
|
|
446
441
|
this.updateFooterEvent();
|
|
447
442
|
return valueChangedSucc;
|
|
448
443
|
},
|
|
444
|
+
setDataBefore(obj, that) {
|
|
445
|
+
const column = this.findColumnConfig(
|
|
446
|
+
that.myConfig.name,
|
|
447
|
+
this.myConfig.items
|
|
448
|
+
);
|
|
449
|
+
let temp = {};
|
|
450
|
+
temp.data = obj;
|
|
451
|
+
temp.tabname = this.myConfig.name;
|
|
452
|
+
this.addRowInfo(temp, column);
|
|
453
|
+
const setDataBeforeSucc = column.setDataBefore(temp, that);
|
|
454
|
+
this.updateFooterEvent();
|
|
455
|
+
return setDataBeforeSucc;
|
|
456
|
+
},
|
|
449
457
|
|
|
450
458
|
/**
|
|
451
459
|
* 【覆写】获取全量数据
|
|
@@ -603,8 +611,54 @@ export default {
|
|
|
603
611
|
/**
|
|
604
612
|
* 【覆写】表格数据赋值事件
|
|
605
613
|
*/
|
|
606
|
-
setData(data = []) {
|
|
607
|
-
|
|
614
|
+
setData(data = [], flag = "set") {
|
|
615
|
+
switch (flag) {
|
|
616
|
+
case "set":
|
|
617
|
+
// console.log("初始化表格数据触发");
|
|
618
|
+
this.dataList = [...data];
|
|
619
|
+
break;
|
|
620
|
+
|
|
621
|
+
case "I":
|
|
622
|
+
// console.log("手工全量编辑触发");
|
|
623
|
+
const $tableVM = this.$refs.table;
|
|
624
|
+
// 移除表格组件
|
|
625
|
+
$tableVM.remove().then(() => {
|
|
626
|
+
$tableVM.insertAt([...data], -1);
|
|
627
|
+
});
|
|
628
|
+
break;
|
|
629
|
+
|
|
630
|
+
default:
|
|
631
|
+
break;
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* 【覆写】编辑项内容整理透传
|
|
637
|
+
*/
|
|
638
|
+
addRowInfo(obj, column) {
|
|
639
|
+
const $tableVM = this.$refs.table;
|
|
640
|
+
let editRecord = $tableVM.getEditRecord();
|
|
641
|
+
if (!editRecord) {
|
|
642
|
+
editRecord = this.VG_currentEditRecord;
|
|
643
|
+
}
|
|
644
|
+
obj.rowinfo = { ...editRecord, index: editRecord.rowIndex };
|
|
645
|
+
},
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* 【覆写】手工更新当前编辑项事件
|
|
649
|
+
*/
|
|
650
|
+
updataRow(editRecord, item) {
|
|
651
|
+
const { row, $table } = editRecord;
|
|
652
|
+
$table.setRow(row, item);
|
|
653
|
+
},
|
|
654
|
+
addRow(item) {
|
|
655
|
+
const $tableVM = this.$refs.table;
|
|
656
|
+
$tableVM.insertAt(item, -1);
|
|
657
|
+
},
|
|
658
|
+
delRow(editRecord) {
|
|
659
|
+
const { row } = editRecord;
|
|
660
|
+
const $tableVM = this.$refs.table;
|
|
661
|
+
$tableVM.remove(row);
|
|
608
662
|
},
|
|
609
663
|
|
|
610
664
|
/**
|
|
@@ -716,13 +770,10 @@ export default {
|
|
|
716
770
|
/**
|
|
717
771
|
* 批量更新数据【待完善】
|
|
718
772
|
*/
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
// ctname: "123",
|
|
724
|
-
// };
|
|
725
|
-
// });
|
|
773
|
+
batchUpdateDatas(record = {}) {
|
|
774
|
+
const $tableVM = this.$refs.table;
|
|
775
|
+
const tableData = $tableVM.getTableData().fullData;
|
|
776
|
+
tableData.forEach((item) => Object.assign(item, record));
|
|
726
777
|
},
|
|
727
778
|
|
|
728
779
|
/**
|
|
@@ -13,6 +13,12 @@ export default {
|
|
|
13
13
|
this.myConfig = Object.assign({}, this.myConfig, this.config);
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
parser(event) {
|
|
17
|
+
this.label = this.getValueNumber(this.value)
|
|
18
|
+
// if (event) {
|
|
19
|
+
// event.currentTarget.select();
|
|
20
|
+
// }
|
|
21
|
+
},
|
|
16
22
|
},
|
|
17
23
|
mounted() {
|
|
18
24
|
// console.log("我继承覆写了999999");
|