Browse Source

refactor: 调整文件及目录的名称

master
alan 6 years ago
parent
commit
17efecf65b
  1. 4
      src/app/app.component.ts
  2. 3
      src/app/app.model.ts
  3. 6
      src/app/link_set/link-set.component.ts
  4. 0
      src/app/link_set/link-set.model.ts
  5. 22
      src/app/link_set/select/select.component.ts
  6. 11
      src/app/link_set/select/select.model.ts
  7. 2
      src/app/link_status/link_status.component.ts
  8. 0
      src/app/link_status/link_status.model.ts
  9. 2
      src/app/title/title.component.ts
  10. 4
      src/app/title/title_item/title_item.component.ts
  11. 0
      src/app/title/title_item/title_item.model.ts
  12. 0
      src/app/title/title_item/title_item.service.ts

4
src/app/app.component.ts

@ -1,8 +1,8 @@
import {Vtape} from '../ui/index'; import {Vtape} from '../ui/index';
import appModel from './app.model'; import appModel from './app.model';
import title from './title/title.component'; import title from './title/title.component';
import linkSet from './linkSet/linkSet.component'; import linkSet from './link_set/link-set.component';
import linkStatus from './linkStatus/linkStatus.component'; import linkStatus from './link_status/link_status.component';
import './app.component.scss'; import './app.component.scss';
const className = 'fr.main'; const className = 'fr.main';

3
src/app/app.model.ts

@ -2,10 +2,11 @@ const className = 'fr.model.main';
import {ModelType} from '@ui'; import {ModelType} from '@ui';
const Model: ModelType = { const Model: ModelType = {
childContext: ['tab'], childContext: ['tab', 'newLink'],
state () { state () {
return { return {
tab: '数据连接管理', tab: '数据连接管理',
newLink: '',
}; };
}, },
computed: { computed: {

6
src/app/linkSet/linkSet.component.ts → src/app/link_set/link-set.component.ts

@ -1,5 +1,5 @@
import {Htape, WidgetType, Vtape} from '@ui'; import {Htape, WidgetType, Vtape, Left} from '@ui';
import linkSetModel from './linkSet.model'; import linkSetModel from './link-set.model';
import Select from './select/select.component'; import Select from './select/select.component';
const className = 'fr.linkset'; const className = 'fr.linkset';
const Widget: WidgetType = { const Widget: WidgetType = {
@ -22,7 +22,7 @@ const Widget: WidgetType = {
items: [ items: [
{ {
el: { el: {
type: 'bi.left', type: Left,
cls:'select-group', cls:'select-group',
items:[ items:[
{ {

0
src/app/linkSet/linkSet.model.ts → src/app/link_set/link-set.model.ts

22
src/app/linkSet/select/select.component.ts → src/app/link_set/select/select.component.ts

@ -1,10 +1,16 @@
import {WidgetType, Combo, ButtonGroup, TextItem, Vertical} from '@ui'; import {WidgetType, Combo, ButtonGroup, TextItem, Vertical} from '@ui';
import selectModel from './select.model';
const linkList = [ const linkList = [
'APACHE KYLIN', 'DERBY', 'HP Vertica', 'IBM DB2', 'INFORMIX', 'Microsoft SQL Server', 'MySQL', 'Oracle', 'Privotal Greenplum Database', 'Postgresql', 'GaussDB 200', 'APACHE KYLIN', 'DERBY', 'HP Vertica', 'IBM DB2', 'INFORMIX', 'Microsoft SQL Server', 'MySQL', 'Oracle', 'Privotal Greenplum Database', 'Postgresql', 'GaussDB 200',
]; ];
const className = 'fr.linkset.select'; const className = 'fr.linkset.select';
const Widget: WidgetType = { const Widget: WidgetType = {
_store() {
return BI.Models.getModel(selectModel);
},
render() { render() {
let combo: any = null;
return { return {
type: Combo, type: Combo,
cls:'select', cls:'select',
@ -25,6 +31,8 @@ const Widget: WidgetType = {
height: 24, height: 24,
width: 152, width: 152,
text: item, text: item,
title: item,
value: item,
}; };
}), { }), {
type: TextItem, type: TextItem,
@ -32,12 +40,16 @@ const Widget: WidgetType = {
height: 24, height: 24,
width: 152, width: 152,
text: '更多数据连接...', text: '更多数据连接...',
title:'更多数据连接...',
value: 'more',
}, { }, {
type: TextItem, type: TextItem,
cls: 'link-item', cls: 'link-item',
height: 24, height: 24,
width: 152, width: 152,
text: '其他', text: '其他',
title:'其他',
value: 'other',
}], }],
layouts: [{ layouts: [{
type: Vertical, type: Vertical,
@ -45,6 +57,16 @@ const Widget: WidgetType = {
}, },
maxHeight: 400, maxHeight: 400,
}, },
listeners:[{
eventName: 'EVENT_CHANGE',
action: (v: string) => {
this.store.setNewLink(v);
combo.hideView();
},
}],
ref () {
combo = this;
},
}; };
}, },
}; };

11
src/app/link_set/select/select.model.ts

@ -0,0 +1,11 @@
const className = 'fr.model.linkset.select';
const Model = BI.inherit(Fix.Model, {
context: ['newLink'],
actions: {
setNewLink(value: string) {
this.model.newLink = value;
},
},
});
BI.model(className, Model);
export default className;

2
src/app/linkStatus/linkStatus.component.ts → src/app/link_status/link_status.component.ts

@ -1,5 +1,5 @@
import {WidgetType, Htape} from '@ui'; import {WidgetType, Htape} from '@ui';
import linkStatusModel from './linkStatus.model'; import linkStatusModel from './link_status.model';
const className = 'fr.linkstatus'; const className = 'fr.linkstatus';
const Widget: WidgetType = { const Widget: WidgetType = {

0
src/app/linkStatus/linkStatus.model.ts → src/app/link_status/link_status.model.ts

2
src/app/title/title.component.ts

@ -1,5 +1,5 @@
import {Left, WidgetType} from '@ui/index'; import {Left, WidgetType} from '@ui/index';
import TitleItem from './titleItem/title-item.component'; import TitleItem from './title_item/title_item.component';
const tabs = ['数据连接管理', '连接池状态']; const tabs = ['数据连接管理', '连接池状态'];
const className = 'fr.title'; const className = 'fr.title';
const Widget: WidgetType = { const Widget: WidgetType = {

4
src/app/title/titleItem/title-item.component.ts → src/app/title/title_item/title_item.component.ts

@ -1,6 +1,6 @@
import {Label} from '@ui'; import {Label} from '@ui';
import tableItemModel from './title-item.model'; import tableItemModel from './title_item.model';
import {getSelectStyle} from './title-item.service'; import {getSelectStyle} from './title_item.service';
const className = 'fr.title.item'; const className = 'fr.title.item';
const Widget = BI.inherit(BI.Widget, { const Widget = BI.inherit(BI.Widget, {
props: { props: {

0
src/app/title/titleItem/title-item.model.ts → src/app/title/title_item/title_item.model.ts

0
src/app/title/titleItem/title-item.service.ts → src/app/title/title_item/title_item.service.ts

Loading…
Cancel
Save