You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.3 KiB
67 lines
2.3 KiB
import { shortcut, store } from '@core/core'; |
|
import { TitleMaintainModel } from './title_maintain.model'; |
|
import { PAGE_INDEX } from '@constants/constant'; |
|
import { Button } from '@fui/core'; |
|
|
|
@shortcut() |
|
@store(TitleMaintainModel) |
|
export class TitleMaintain extends BI.Widget { |
|
static xtype = 'dec.dcm.title.maintain'; |
|
|
|
store: TitleMaintainModel['store']; |
|
model: TitleMaintainModel['model']; |
|
|
|
render() { |
|
return { |
|
type: BI.FloatRightLayout.xtype, |
|
items: [{ |
|
type: BI.VerticalAdaptLayout.xtype, |
|
height: 40, |
|
items: [ |
|
{ |
|
type: BI.Button.xtype, |
|
$value: 'title-maintain-cancel', |
|
text: BI.i18nText('BI-Basic_Cancel'), |
|
clear: true, |
|
_rgap: 16, |
|
handler: () => { |
|
this.store.setIsCopy(false); |
|
this.store.setPageIndex(PAGE_INDEX.CONNECTION); |
|
this.store.shutdownConnectionStatus(); |
|
}, |
|
}, |
|
{ |
|
type: BI.Button.xtype, |
|
ref: (_ref) => { |
|
this.testConnectionBtn = _ref; |
|
}, |
|
invisible: () => this.model.noTestConnection, |
|
_rgap: 16, |
|
$value: 'title-maintain-connection-test', |
|
text: BI.i18nText('Dec-Dcm_Connection_Test'), |
|
light: true, |
|
handler: () => { |
|
this.store.setTestEvent(); |
|
}, |
|
}, |
|
{ |
|
type: BI.Button.xtype, |
|
_rgap: 16, |
|
$value: 'title-maintain-save', |
|
text: BI.i18nText('BI-Basic_Save'), |
|
handler: () => { |
|
this.store.setSaveEvent(); |
|
this.store.shutdownConnectionStatus(); |
|
}, |
|
}, |
|
], |
|
}], |
|
}; |
|
} |
|
|
|
mounted () { |
|
window.onunload = () => { |
|
this.store.shutdownConnectionStatus(); |
|
}; |
|
} |
|
}
|
|
|