mooho-base-admin-plus 2.10.52 → 2.10.54
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 +5350 -5334
- package/package/mooho-base-admin-plus.min.js +92 -91
- package/package.json +1 -1
- package/src/components/view/view-form.vue +17 -4
- package/src/components/view/view-table-excel.vue +6 -55
- 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
|
@@ -843,8 +843,17 @@
|
|
|
843
843
|
*
|
|
844
844
|
* @public
|
|
845
845
|
*/
|
|
846
|
-
validate() {
|
|
847
|
-
|
|
846
|
+
async validate() {
|
|
847
|
+
let isOk = await this.$refs.form.validate();
|
|
848
|
+
|
|
849
|
+
for (let column of this.columns) {
|
|
850
|
+
if (column.controlType == 'ExcelTable' && !column.isReadonly && column.isShow) {
|
|
851
|
+
let tableOk = await this.$refs['table_' + column.code][0].validate();
|
|
852
|
+
isOk = isOk && tableOk;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
return isOk;
|
|
848
857
|
},
|
|
849
858
|
/**
|
|
850
859
|
* 获取完整数据
|
|
@@ -868,8 +877,12 @@
|
|
|
868
877
|
return false;
|
|
869
878
|
}
|
|
870
879
|
|
|
871
|
-
if (
|
|
872
|
-
|
|
880
|
+
if (column.controlType == 'Table') {
|
|
881
|
+
let isOk = this.$refs['table_' + column.code][0].validate();
|
|
882
|
+
|
|
883
|
+
if (!isOk) {
|
|
884
|
+
return false;
|
|
885
|
+
}
|
|
873
886
|
}
|
|
874
887
|
|
|
875
888
|
if (column.tableStoreType == 'Inner') {
|
|
@@ -719,69 +719,20 @@
|
|
|
719
719
|
*
|
|
720
720
|
* @public
|
|
721
721
|
*/
|
|
722
|
-
validate() {
|
|
722
|
+
async validate() {
|
|
723
723
|
let rows = [];
|
|
724
724
|
|
|
725
725
|
for (let i = 0; i < this.staticData.length - 1; i++) {
|
|
726
726
|
rows.push(i);
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
|
|
730
|
-
|
|
729
|
+
return new Promise(resolve => {
|
|
730
|
+
this.$refs.table.hotInstance.validateRows(rows, valid => {
|
|
731
|
+
resolve(valid);
|
|
732
|
+
});
|
|
731
733
|
});
|
|
732
|
-
|
|
733
|
-
if (!valid) {
|
|
734
|
-
this.error('Front_Msg_Form_Validate_Fail');
|
|
735
|
-
return false;
|
|
736
|
-
} else {
|
|
737
|
-
return true;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
// for (let i = 0; i < this.staticData.length - 1; i++) {
|
|
741
|
-
// let row = this.staticData[i];
|
|
742
|
-
|
|
743
|
-
// for (let j = 0; j < this.columns.length; j++) {
|
|
744
|
-
// let column = this.columns[j];
|
|
745
|
-
// let value = this.parseData(row, column.code);
|
|
746
|
-
|
|
747
|
-
// // 不显示的不验证
|
|
748
|
-
// if (column.isShow == false) {
|
|
749
|
-
// continue;
|
|
750
|
-
// }
|
|
751
|
-
|
|
752
|
-
// //let name = column.name.replaceAll('<font style="color: red">*</font>', '');
|
|
753
|
-
|
|
754
|
-
// if (column.isRequired) {
|
|
755
|
-
// if (value == null || !(String(value) || '').trim()) {
|
|
756
|
-
// this.error('Front_Msg_Row_Column_Required|' + (i + 1) + '|' + column.name);
|
|
757
|
-
// return false;
|
|
758
|
-
// }
|
|
759
|
-
// }
|
|
760
|
-
|
|
761
|
-
// // if (column.maxLength != null && value != null && String(value).length > column.maxLength) {
|
|
762
|
-
// // this.error('Front_Msg_Row_Validation_Max_Length|' + (i + 1) + '|' + column.name + '|' + column.maxLength.toString());
|
|
763
|
-
// // return false;
|
|
764
|
-
// // }
|
|
765
|
-
|
|
766
|
-
// if (column.maxValue != null && !isNaN(value) && value > column.maxValue) {
|
|
767
|
-
// this.error('Front_Msg_Row_Validation_Max_Value|' + (i + 1) + '|' + column.name + '|' + column.maxValue.toString());
|
|
768
|
-
// return false;
|
|
769
|
-
// }
|
|
770
|
-
|
|
771
|
-
// if (column.minValue != null && !isNaN(value) && value < column.minValue) {
|
|
772
|
-
// this.error('Front_Msg_Row_Validation_Min_Value|' + (i + 1) + '|' + column.name + '|' + column.minValue.toString());
|
|
773
|
-
// return false;
|
|
774
|
-
// }
|
|
775
|
-
|
|
776
|
-
// if (!!(column.pattern || '').trim() && value != null && new RegExp(column.pattern).test(value) == false) {
|
|
777
|
-
// this.error('Front_Msg_Row_Validation_Pattern|' + (i + 1) + '|' + column.name + '|' + column.pattern);
|
|
778
|
-
// return false;
|
|
779
|
-
// }
|
|
780
|
-
// }
|
|
781
|
-
// }
|
|
782
|
-
|
|
783
|
-
//return true;
|
|
784
734
|
},
|
|
735
|
+
|
|
785
736
|
/**
|
|
786
737
|
* 获取数据
|
|
787
738
|
*
|
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};
|