diff --git a/src/resources/plugins/TsSheet/form/config/formtableinputer-conf/formtableinputer-attr-config-dialog.vue b/src/resources/plugins/TsSheet/form/config/formtableinputer-conf/formtableinputer-attr-config-dialog.vue index 2913f39bfd6c6726811b5c26b6ddaacffc251f3c..c2752cca26c2f77cc0d134a2af077e77e88f5e40 100644 --- a/src/resources/plugins/TsSheet/form/config/formtableinputer-conf/formtableinputer-attr-config-dialog.vue +++ b/src/resources/plugins/TsSheet/form/config/formtableinputer-conf/formtableinputer-attr-config-dialog.vue @@ -269,7 +269,9 @@ v-model="propertyLocal.config.format" :validateList="validateList" :dataList="[ + { value: 'yyyy/MM/dd HH:mm', text: 'yyyy/MM/dd HH:mm' }, { value: 'yyyy/MM/dd', text: 'yyyy/MM/dd' }, + { value: 'yyyy-MM-dd HH:mm', text: 'yyyy-MM-dd HH:mm' }, { value: 'yyyy-MM-dd', text: 'yyyy-MM-dd' }, { value: 'yyyy/MM', text: 'yyyy/MM' }, { value: 'yyyy-MM', text: 'yyyy-MM' }, @@ -294,7 +296,7 @@ @@ -1044,6 +1046,28 @@ export default { let {handler = '', matrixType = ''} = propertyLocal || {}; return !!((handler == 'formselect' && matrixType == 'custom')); // 下拉框并且是自定义矩阵,才显示新增按钮 }; + }, + getType() { + return (handler) => { + let { config } = this.propertyLocal || {}; + let { format } = config || {}; + if (handler == 'formtime') { + return 'time'; + } + let type = 'datetime'; + if (format) { + if (format.indexOf('HH') >= 0) { + type = 'datetime'; + } else if (format.indexOf('dd') > 0) { + type = 'date'; + } else if (format.indexOf('MM') > 0) { + type = 'month'; + } else if (format.indexOf('yyyy') > 0) { + type = 'year'; + } + } + return type; + }; } }, watch: { diff --git a/src/resources/plugins/TsSheet/form/config/formtableselector-conf/formtableselector-attr-config-dialog.vue b/src/resources/plugins/TsSheet/form/config/formtableselector-conf/formtableselector-attr-config-dialog.vue index b3267cf937617387187fa662dfb09ea484966972..6eee2fa1af7471efcfb09780ecd17ef5d3524c38 100644 --- a/src/resources/plugins/TsSheet/form/config/formtableselector-conf/formtableselector-attr-config-dialog.vue +++ b/src/resources/plugins/TsSheet/form/config/formtableselector-conf/formtableselector-attr-config-dialog.vue @@ -308,7 +308,9 @@ v-model="propertyLocal.config.format" :validateList="validateList" :dataList="[ + { value: 'yyyy/MM/dd HH:mm', text: 'yyyy/MM/dd HH:mm' }, { value: 'yyyy/MM/dd', text: 'yyyy/MM/dd' }, + { value: 'yyyy-MM-dd HH:mm', text: 'yyyy-MM-dd HH:mm' }, { value: 'yyyy-MM-dd', text: 'yyyy-MM-dd' }, { value: 'yyyy/MM', text: 'yyyy/MM' }, { value: 'yyyy-MM', text: 'yyyy-MM' }, @@ -333,7 +335,7 @@ @@ -1071,6 +1073,28 @@ export default { let {matrixType = ''} = config || {}; return !!((handler == 'formselect' && matrixType == 'custom')); // 下拉框并且是自定义矩阵,才显示新增按钮 }; + }, + getType() { + return (handler) => { + let { config } = this.propertyLocal || {}; + let { format } = config || {}; + if (handler == 'formtime') { + return 'time'; + } + let type = 'datetime'; + if (format) { + if (format.indexOf('HH') >= 0) { + type = 'datetime'; + } else if (format.indexOf('dd') > 0) { + type = 'date'; + } else if (format.indexOf('MM') > 0) { + type = 'month'; + } else if (format.indexOf('yyyy') > 0) { + type = 'year'; + } + } + return type; + }; } }, watch: {