|
@@ -264,8 +264,22 @@ export const formSchema: FormSchema[] = [
|
|
|
colProps: {span: 12},
|
|
|
labelWidth: 250,
|
|
|
required: true,
|
|
|
- componentProps:{
|
|
|
- AutoComplete:'off'
|
|
|
+ componentProps: ({ formModel }) =>{
|
|
|
+ return {
|
|
|
+ AutoComplete:'off',
|
|
|
+ onblur: ({currentTarget}) => {
|
|
|
+ var stringLog = currentTarget.value;
|
|
|
+ var newString = ''
|
|
|
+ for (let i = 0; i < stringLog.length; i++) {
|
|
|
+ if( (/^[A-Za-z]$/.test(stringLog[i]))&&(/^[a-z]$/.test(stringLog[i]))){
|
|
|
+ newString=newString+stringLog[i].toUpperCase()
|
|
|
+ }else{
|
|
|
+ newString =newString+stringLog[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formModel.name = newString
|
|
|
+ },
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -274,8 +288,22 @@ export const formSchema: FormSchema[] = [
|
|
|
component: 'Input',
|
|
|
labelWidth: 200,
|
|
|
colProps: {span: 12},
|
|
|
- componentProps:{
|
|
|
- AutoComplete:'off'
|
|
|
+ componentProps: ({ formModel }) =>{
|
|
|
+ return {
|
|
|
+ AutoComplete:'off',
|
|
|
+ onblur: ({currentTarget}) => {
|
|
|
+ var stringLog = currentTarget.value;
|
|
|
+ var newString = ''
|
|
|
+ for (let i = 0; i < stringLog.length; i++) {
|
|
|
+ if( (/^[A-Za-z]$/.test(stringLog[i]))&&(/^[a-z]$/.test(stringLog[i]))){
|
|
|
+ newString=newString+stringLog[i].toUpperCase()
|
|
|
+ }else{
|
|
|
+ newString =newString+stringLog[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formModel.abbreviation = newString
|
|
|
+ },
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -284,8 +312,22 @@ export const formSchema: FormSchema[] = [
|
|
|
component: 'Input',
|
|
|
labelWidth: 250,
|
|
|
colProps: {span: 12},
|
|
|
- componentProps:{
|
|
|
- AutoComplete:'off'
|
|
|
+ componentProps: ({ formModel }) =>{
|
|
|
+ return {
|
|
|
+ AutoComplete:'off',
|
|
|
+ onblur: ({currentTarget}) => {
|
|
|
+ var stringLog = currentTarget.value;
|
|
|
+ var newString = ''
|
|
|
+ for (let i = 0; i < stringLog.length; i++) {
|
|
|
+ if( (/^[A-Za-z]$/.test(stringLog[i]))&&(/^[a-z]$/.test(stringLog[i]))){
|
|
|
+ newString=newString+stringLog[i].toUpperCase()
|
|
|
+ }else{
|
|
|
+ newString =newString+stringLog[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formModel.abbreviation = newString
|
|
|
+ },
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
{
|