@ -43,9 +43,9 @@
< / div >
< / div >
< / div >
< / div >
< / m - l i s t - b o x >
< / m - l i s t - b o x >
< template v-if ="!sqlType && showType.length " >
< template v-if ="!sqlType" >
< m -list -box >
< m -list -box >
< div slot = "text" > { { $t ( 'Title' ) } } < / div >
< div slot = "text" > < b class = 'requiredIcon' > * < / b > { { $t ( 'Title' ) } } < / div >
< div slot = "content" >
< div slot = "content" >
< x -input
< x -input
type = "input"
type = "input"
@ -56,7 +56,7 @@
< / div >
< / div >
< / m - l i s t - b o x >
< / m - l i s t - b o x >
< m -list -box >
< m -list -box >
< div slot = "text" > { { $t ( 'Recipient' ) } } < / div >
< div slot = "text" > < b class = 'requiredIcon' > * < / b > { { $t ( 'Recipient' ) } } < / div >
< div slot = "content" >
< div slot = "content" >
< m -email ref = "refEmail" v-model ="receivers" :disabled="isDetails" :repeat-data="receiversCc" > < / m -email >
< m -email ref = "refEmail" v-model ="receivers" :disabled="isDetails" :repeat-data="receiversCc" > < / m -email >
< / div >
< / div >
@ -195,6 +195,9 @@
* /
* /
_onSqlType ( a ) {
_onSqlType ( a ) {
this . sqlType = a
this . sqlType = a
if ( a == 0 ) {
this . showType = [ 'TABLE' ]
}
} ,
} ,
/ * *
/ * *
* return udfs
* return udfs
@ -240,12 +243,24 @@
if ( ! this . $refs . refDs . _verifDatasource ( ) ) {
if ( ! this . $refs . refDs . _verifDatasource ( ) ) {
return false
return false
}
}
if ( this . sqlType == 0 && ! this . showType . length ) {
this . $message . warning ( ` ${ i18n . $t ( 'One form or attachment must be selected' ) } ` )
return false
}
if ( this . sqlType == 0 && ! this . title ) {
this . $message . warning ( ` ${ i18n . $t ( 'Mail subject required' ) } ` )
return false
}
if ( this . sqlType == 0 && ! this . receivers . length ) {
this . $message . warning ( ` ${ i18n . $t ( 'Recipient required' ) } ` )
return false
}
/ / r e c e i v e r s S u b c o m p o n e n t v e r i f i c a t i o n
/ / r e c e i v e r s S u b c o m p o n e n t v e r i f i c a t i o n
if ( ! this . $refs . refEmail . _manualEmail ( ) ) {
if ( ! this . sqlType && ! this . $refs . refEmail . _manualEmail ( ) ) {
return false
return false
}
}
/ / r e c e i v e r s C c S u b c o m p o n e n t v e r i f i c a t i o n
/ / r e c e i v e r s C c S u b c o m p o n e n t v e r i f i c a t i o n
if ( ! this . $refs . refCc . _manualEmail ( ) ) {
if ( ! this . sqlType && ! this . $refs . refCc . _manualEmail ( ) ) {
return false
return false
}
}
/ / u d f s S u b c o m p o n e n t v e r i f i c a t i o n V e r i f i c a t i o n o n l y i f t h e d a t a t y p e i s H I V E
/ / u d f s S u b c o m p o n e n t v e r i f i c a t i o n V e r i f i c a t i o n o n l y i f t h e d a t a t y p e i s H I V E
@ -356,14 +371,6 @@
this . connParams = ''
this . connParams = ''
}
}
} ,
} ,
/ /
showType ( val ) {
if ( ! val . length ) {
this . title = ''
this . receivers = [ ]
this . receiversCc = [ ]
}
}
} ,
} ,
created ( ) {
created ( ) {
let o = this . backfillItem
let o = this . backfillItem
@ -412,3 +419,10 @@
components : { mListBox , mDatasource , mLocalParams , mUdfs , mSqlType , mStatementList , mEmail }
components : { mListBox , mDatasource , mLocalParams , mUdfs , mSqlType , mStatementList , mEmail }
}
}
< / script >
< / script >
< style lang = "scss" rel = "stylesheet/scss" >
. requiredIcon {
color : # ff0000 ;
padding - right : 4 px ;
}
< / style >