mooho-base-admin-plus 2.10.35 → 2.10.37
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/history.md +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +5368 -5397
- package/package/mooho-base-admin-plus.min.js +91 -92
- package/package.json +1 -1
- package/src/components/view/view-table-excel.vue +92 -89
- package/src/i18n/locale/en-US.js +1 -1
- package/src/i18n/locale/lang.js +1 -1
- package/src/i18n/locale/zh-CN.js +1 -1
package/package.json
CHANGED
|
@@ -69,92 +69,7 @@
|
|
|
69
69
|
// }
|
|
70
70
|
// ],
|
|
71
71
|
// minSpareRows: 1,
|
|
72
|
-
contextMenu: {
|
|
73
|
-
items: {
|
|
74
|
-
row_above: {
|
|
75
|
-
name: '上方插入行'
|
|
76
|
-
},
|
|
77
|
-
row_below: {
|
|
78
|
-
name: '下方插入行'
|
|
79
|
-
},
|
|
80
|
-
separator1: ContextMenu.SEPARATOR,
|
|
81
|
-
move_up: {
|
|
82
|
-
name: '整行上移',
|
|
83
|
-
callback: (key, selection, clickEvent) => {
|
|
84
|
-
let index = selection[0].start.row;
|
|
85
|
-
if (index > 0) {
|
|
86
|
-
let data = this.$refs.table.hotInstance.getSourceData();
|
|
87
|
-
let delRows = data.splice(index, 1);
|
|
88
|
-
data.splice(index - 1, 0, delRows[0]);
|
|
89
|
-
this.$refs.table.hotInstance.loadData(data);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
move_down: {
|
|
94
|
-
name: '整行下移',
|
|
95
|
-
callback: (key, selection, clickEvent) => {
|
|
96
|
-
let index = selection[0].start.row;
|
|
97
|
-
let data = this.$refs.table.hotInstance.getSourceData();
|
|
98
|
-
if (index < data.length - 1) {
|
|
99
|
-
let delRows = data.splice(index, 1);
|
|
100
|
-
data.splice(index + 1, 0, delRows[0]);
|
|
101
|
-
this.$refs.table.hotInstance.loadData(data);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
remove_row: {
|
|
106
|
-
name: '整行删除',
|
|
107
|
-
callback: (key, selection, clickEvent) => {
|
|
108
|
-
let delArr = [];
|
|
109
|
-
let ids = [];
|
|
110
|
-
let rows = [];
|
|
111
|
-
|
|
112
|
-
let data = this.$refs.table.hotInstance.getSourceData();
|
|
113
|
-
|
|
114
|
-
for (const sels of selection) {
|
|
115
|
-
let startRowIndex = sels.start.row;
|
|
116
|
-
let endRowIndex = sels.end.row;
|
|
117
|
-
|
|
118
|
-
delArr.push([startRowIndex, endRowIndex - startRowIndex + 1]);
|
|
119
|
-
|
|
120
|
-
for (let i = startRowIndex; i <= endRowIndex; i++) {
|
|
121
|
-
rows.push(i);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
for (let i = startRowIndex; i < endRowIndex; i++) {
|
|
125
|
-
if (data[i].id) {
|
|
126
|
-
ids.push(data[i].id);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
this.confirm('确定要删除该行吗?', async () => {
|
|
132
|
-
// if (ids.length > 0) {
|
|
133
|
-
// await modelApi.delete(this.viewCode, ids);
|
|
134
|
-
// }
|
|
135
|
-
let b = true;
|
|
136
|
-
|
|
137
|
-
this.$emit('on-remove', rows, val => {
|
|
138
|
-
b = val;
|
|
139
|
-
});
|
|
140
|
-
console.log(b);
|
|
141
|
-
if (b) {
|
|
142
|
-
this.$refs.table.hotInstance.alter('remove_row', delArr);
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// separator2: ContextMenu.SEPARATOR
|
|
148
|
-
// cut: { name: '剪切' },
|
|
149
|
-
// copy: { name: '复制' }
|
|
150
|
-
// 'paste': {
|
|
151
|
-
// name: '粘贴',
|
|
152
|
-
// callback: (key, selection, clickEvent) => {
|
|
153
|
-
// document.execCommand('paste');
|
|
154
|
-
// }
|
|
155
|
-
// }
|
|
156
|
-
}
|
|
157
|
-
},
|
|
72
|
+
contextMenu: { items: {} },
|
|
158
73
|
licenseKey: 'non-commercial-and-evaluation'
|
|
159
74
|
},
|
|
160
75
|
coords: {},
|
|
@@ -302,7 +217,7 @@
|
|
|
302
217
|
title: item.isRequired ? item.name + '<font style="color: red">*</font>' : item.name,
|
|
303
218
|
data: item.code,
|
|
304
219
|
width: item.controlWidth || 80,
|
|
305
|
-
className: item.align ? item.align
|
|
220
|
+
className: item.align ? 'ht' + item.align : 'htCenter',
|
|
306
221
|
controlType: item.controlType
|
|
307
222
|
};
|
|
308
223
|
|
|
@@ -455,10 +370,12 @@
|
|
|
455
370
|
);
|
|
456
371
|
});
|
|
457
372
|
|
|
373
|
+
// 冻结列
|
|
458
374
|
this.hotSetting.fixedColumnsStart = this.columns.filter(item => {
|
|
459
375
|
return item.isFixed == true;
|
|
460
376
|
}).length;
|
|
461
377
|
|
|
378
|
+
// 多级表头
|
|
462
379
|
if (
|
|
463
380
|
this.columns.filter(item => {
|
|
464
381
|
return !!(item.parentCode || '').trim();
|
|
@@ -516,10 +433,94 @@
|
|
|
516
433
|
// });
|
|
517
434
|
// }
|
|
518
435
|
|
|
436
|
+
console.log('xxx', 'view', view);
|
|
437
|
+
|
|
438
|
+
// 右键菜单 新增
|
|
439
|
+
if (this.tableView.createEnable) {
|
|
440
|
+
this.hotSetting.contextMenu.items.row_above = { name: '上方插入行' };
|
|
441
|
+
this.hotSetting.contextMenu.items.row_below = { name: '下方插入行' };
|
|
442
|
+
this.hotSetting.contextMenu.items.separator1 = ContextMenu.SEPARATOR;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// 右键菜单 调整
|
|
446
|
+
if (this.tableView.adjustEnable) {
|
|
447
|
+
this.hotSetting.contextMenu.items.move_up = {
|
|
448
|
+
name: '整行上移',
|
|
449
|
+
callback: (key, selection, clickEvent) => {
|
|
450
|
+
let index = selection[0].start.row;
|
|
451
|
+
if (index > 0) {
|
|
452
|
+
let data = this.$refs.table.hotInstance.getSourceData();
|
|
453
|
+
let delRows = data.splice(index, 1);
|
|
454
|
+
data.splice(index - 1, 0, delRows[0]);
|
|
455
|
+
this.$refs.table.hotInstance.loadData(data);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
this.hotSetting.contextMenu.items.move_down = {
|
|
460
|
+
name: '整行下移',
|
|
461
|
+
callback: (key, selection, clickEvent) => {
|
|
462
|
+
let index = selection[0].start.row;
|
|
463
|
+
let data = this.$refs.table.hotInstance.getSourceData();
|
|
464
|
+
if (index < data.length - 1) {
|
|
465
|
+
let delRows = data.splice(index, 1);
|
|
466
|
+
data.splice(index + 1, 0, delRows[0]);
|
|
467
|
+
this.$refs.table.hotInstance.loadData(data);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// 右键菜单 删除
|
|
474
|
+
if (this.tableView.removeEnable) {
|
|
475
|
+
this.hotSetting.contextMenu.items.remove_row = {
|
|
476
|
+
name: '整行删除',
|
|
477
|
+
callback: (key, selection, clickEvent) => {
|
|
478
|
+
let delArr = [];
|
|
479
|
+
let ids = [];
|
|
480
|
+
let rows = [];
|
|
481
|
+
|
|
482
|
+
let data = this.$refs.table.hotInstance.getSourceData();
|
|
483
|
+
|
|
484
|
+
for (const sels of selection) {
|
|
485
|
+
let startRowIndex = sels.start.row;
|
|
486
|
+
let endRowIndex = sels.end.row;
|
|
487
|
+
|
|
488
|
+
delArr.push([startRowIndex, endRowIndex - startRowIndex + 1]);
|
|
489
|
+
|
|
490
|
+
for (let i = startRowIndex; i <= endRowIndex; i++) {
|
|
491
|
+
rows.push(i);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
for (let i = startRowIndex; i < endRowIndex; i++) {
|
|
495
|
+
if (data[i].id) {
|
|
496
|
+
ids.push(data[i].id);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
this.confirm('确定要删除该行吗?', async () => {
|
|
502
|
+
// if (ids.length > 0) {
|
|
503
|
+
// await modelApi.delete(this.viewCode, ids);
|
|
504
|
+
// }
|
|
505
|
+
let b = true;
|
|
506
|
+
|
|
507
|
+
this.$emit('on-remove', rows, val => {
|
|
508
|
+
b = val;
|
|
509
|
+
});
|
|
510
|
+
console.log(b);
|
|
511
|
+
if (b) {
|
|
512
|
+
this.$refs.table.hotInstance.alter('remove_row', delArr);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// 变更事件
|
|
519
520
|
this.$refs.table.hotInstance.addHook('afterChange', changes => {
|
|
520
521
|
if (changes) {
|
|
521
522
|
changes.forEach(([row, property, oldValue, newValue]) => {
|
|
522
|
-
if (row == this.data.length - 1 && (oldValue ?? '') != (newValue ?? '')) {
|
|
523
|
+
if (this.tableView.createEnable && row == this.data.length - 1 && (oldValue ?? '') != (newValue ?? '')) {
|
|
523
524
|
this.data.push(this.getDefaultData());
|
|
524
525
|
this.$refs.table.hotInstance.loadData(this.data);
|
|
525
526
|
}
|
|
@@ -569,7 +570,9 @@
|
|
|
569
570
|
|
|
570
571
|
this.data = this.staticData;
|
|
571
572
|
|
|
572
|
-
this.
|
|
573
|
+
if (this.tableView.createEnable) {
|
|
574
|
+
this.data.push(this.getDefaultData());
|
|
575
|
+
}
|
|
573
576
|
|
|
574
577
|
//this.hotSetting.data = this.data;
|
|
575
578
|
|
package/src/i18n/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./lang.js";const t={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};e(t);export{t as default};
|
|
1
|
+
import{s as e}from"./lang.js";const t={i:{locale:"en-US",select:{placeholder:"Select",noMatch:"No matching data",loading:"Loading"},table:{noDataText:"No Data",noFilteredDataText:"No filter data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},datepicker:{selectDate:"Select date",selectTime:"Select time",startTime:"Start Time",endTime:"End Time",clear:"Clear",ok:"OK",datePanelLabel:"[mmmm] [yyyy]",month:"Month",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",year:"Year",weekStartDay:"0",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},months:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec"}},transfer:{titles:{source:"Source",target:"Target"},filterPlaceholder:"Search here",notFoundText:"Not Found"},modal:{okText:"OK",cancelText:"Cancel"},poptip:{okText:"OK",cancelText:"Cancel"},page:{prev:"Previous Page",next:"Next Page",total:"Total",item:"item",items:"items",prev5:"Previous 5 Pages",next5:"Next 5 Pages",page:"/page",goto:"Goto",p:""},rate:{star:"Star",stars:"Stars"},time:{before:" ago",after:" after",just:"just now",seconds:" seconds",minutes:" minutes",hours:" hours",days:" days"},tree:{emptyText:"No Data"}}};e(t);export{t as default};
|
package/src/i18n/locale/lang.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=typeof window!="undefined";function n(i){e&&typeof window.viewuiplus!="undefined"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[i.i.locale]=i)}export{n as s};
|
|
1
|
+
const e=typeof window!="undefined";function n(i){e&&typeof window.viewuiplus!="undefined"&&("langs"in viewuiplus||(viewuiplus.langs={}),viewuiplus.langs[i.i.locale]=i)}export{n as s};
|
package/src/i18n/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./lang.js";const t={i:{locale:"zh-CN",select:{placeholder:"\u8BF7\u9009\u62E9",noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D"},table:{noDataText:"\u6682\u65E0\u6570\u636E",noFilteredDataText:"\u6682\u65E0\u7B5B\u9009\u7ED3\u679C",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},datepicker:{selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",datePanelLabel:"[yyyy\u5E74] [m\u6708]",month:"\u6708",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",year:"\u5E74",weekStartDay:"0",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{m1:"1\u6708",m2:"2\u6708",m3:"3\u6708",m4:"4\u6708",m5:"5\u6708",m6:"6\u6708",m7:"7\u6708",m8:"8\u6708",m9:"9\u6708",m10:"10\u6708",m11:"11\u6708",m12:"12\u6708"}},transfer:{titles:{source:"\u6E90\u5217\u8868",target:"\u76EE\u7684\u5217\u8868"},filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",notFoundText:"\u5217\u8868\u4E3A\u7A7A"},modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},poptip:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},page:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",total:"\u5171",item:"\u6761",items:"\u6761",prev5:"\u5411\u524D 5 \u9875",next5:"\u5411\u540E 5 \u9875",page:"\u6761/\u9875",goto:"\u8DF3\u81F3",p:"\u9875"},rate:{star:"\u661F",stars:"\u661F"},time:{before:"\u524D",after:"\u540E",just:"\u521A\u521A",seconds:"\u79D2",minutes:"\u5206\u949F",hours:"\u5C0F\u65F6",days:"\u5929"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"}}};e(t);export{t as default};
|
|
1
|
+
import{s as e}from"./lang.js";const t={i:{locale:"zh-CN",select:{placeholder:"\u8BF7\u9009\u62E9",noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D"},table:{noDataText:"\u6682\u65E0\u6570\u636E",noFilteredDataText:"\u6682\u65E0\u7B5B\u9009\u7ED3\u679C",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},datepicker:{selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",clear:"\u6E05\u7A7A",ok:"\u786E\u5B9A",datePanelLabel:"[yyyy\u5E74] [m\u6708]",month:"\u6708",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",year:"\u5E74",weekStartDay:"0",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},months:{m1:"1\u6708",m2:"2\u6708",m3:"3\u6708",m4:"4\u6708",m5:"5\u6708",m6:"6\u6708",m7:"7\u6708",m8:"8\u6708",m9:"9\u6708",m10:"10\u6708",m11:"11\u6708",m12:"12\u6708"}},transfer:{titles:{source:"\u6E90\u5217\u8868",target:"\u76EE\u7684\u5217\u8868"},filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",notFoundText:"\u5217\u8868\u4E3A\u7A7A"},modal:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},poptip:{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88"},page:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",total:"\u5171",item:"\u6761",items:"\u6761",prev5:"\u5411\u524D 5 \u9875",next5:"\u5411\u540E 5 \u9875",page:"\u6761/\u9875",goto:"\u8DF3\u81F3",p:"\u9875"},rate:{star:"\u661F",stars:"\u661F"},time:{before:"\u524D",after:"\u540E",just:"\u521A\u521A",seconds:"\u79D2",minutes:"\u5206\u949F",hours:"\u5C0F\u65F6",days:"\u5929"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"}}};e(t);export{t as default};
|