feature(web): 增加flink job id和alias输入框的联动
This commit is contained in:
@@ -1927,39 +1927,81 @@ function filterableField(mapping, multiple = false) {
|
||||
}
|
||||
}
|
||||
|
||||
function flinkJobIdTextInput(require = false) {
|
||||
function formReloadFlinkJobIdTextInputAndAliasTextInput(id) {
|
||||
return {
|
||||
type: 'input-text',
|
||||
onEvent: {
|
||||
change: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'reload',
|
||||
componentId: `flink-job-id-input-select-${id}`
|
||||
},
|
||||
{
|
||||
actionType: 'reload',
|
||||
componentId: `alias-input-select-${id}`
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function flinkJobIdTextInput(id, require = false) {
|
||||
return {
|
||||
id: `flink-job-id-input-select-${id}`,
|
||||
type: 'select',
|
||||
name: 'flinkJobId',
|
||||
label: 'Flink job id',
|
||||
placeholder: '通过 ID 搜索',
|
||||
clearable: true,
|
||||
required: require,
|
||||
autoComplete: {
|
||||
searchable: true,
|
||||
source: {
|
||||
method: 'get',
|
||||
url: '${base}/table/all_flink_job_id?key=$term',
|
||||
url: '${base}/table/all_flink_job_id',
|
||||
data: {
|
||||
alias: '${alias|default:undefined}'
|
||||
}
|
||||
},
|
||||
/*onEvent: {
|
||||
change: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'reload',
|
||||
componentId: `alias-input-select-${id}`,
|
||||
},
|
||||
]
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
function aliasTextInput(require = false) {
|
||||
function aliasTextInput(id, require = false) {
|
||||
return {
|
||||
type: 'input-text',
|
||||
id: `alias-input-select-${id}`,
|
||||
type: 'select',
|
||||
name: 'alias',
|
||||
label: '别名',
|
||||
placeholder: '通过别名搜索',
|
||||
clearable: true,
|
||||
required: require,
|
||||
creatable: false,
|
||||
autoComplete: {
|
||||
searchable: true,
|
||||
source: {
|
||||
method: 'get',
|
||||
url: '${base}/table/all_alias?key=$term',
|
||||
url: '${base}/table/all_alias',
|
||||
data: {
|
||||
flink_job_id: '${flinkJobId|default:undefined}'
|
||||
}
|
||||
},
|
||||
/*onEvent: {
|
||||
change: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'reload',
|
||||
componentId: `flink-job-id-input-select-${id}`
|
||||
},
|
||||
]
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user