Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
c96e1816
Commit
c96e1816
authored
Jan 20, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: 测试数据库
parent
b7644030
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
130 additions
and
59 deletions
+130
-59
index.ts
app/web/component/layout/activity/index.ts
+1
-4
index.vue
app/web/component/layout/activity/index.vue
+0
-1
index.ts
app/web/component/layout/editor/index.ts
+1
-3
index.ts
app/web/component/layout/login/index.ts
+0
-4
config.ts
app/web/lib/config.ts
+2
-0
index.ts
app/web/page/editor/component/DynamicComponent/index.ts
+12
-13
index.ts
app/web/page/editor/view/dashboard/index.ts
+0
-1
qg.service.ts
app/web/service/qg.service.ts
+50
-0
config.default.ts
config/config.default.ts
+20
-0
config.local.ts
config/config.local.ts
+19
-8
config.prod.ts
config/config.prod.ts
+17
-17
webpack.config.js
webpack.config.js
+8
-8
No files found.
app/web/component/layout/activity/index.ts
View file @
c96e1816
import
{
Vue
,
Component
,
Prop
}
from
'
vue-property-decorator
'
;
import
{
Vue
,
Component
,
Prop
}
from
'
vue-property-decorator
'
;
import
cherryUi
from
'
@qg/cherry-ui
'
;
import
Raven
from
'
raven-js
'
;
import
Raven
from
'
raven-js
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
{
release
}
from
'
@/.sentryclirc
'
;
import
{
release
}
from
'
@/.sentryclirc
'
;
import
'
@qg/cherry-ui/dist/cherry.css
'
;
import
'
@/service/qg.service
'
;
Vue
.
use
(
cherryUi
);
// 初始化sentry
// 初始化sentry
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
...
...
app/web/component/layout/activity/index.vue
View file @
c96e1816
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
<meta
name=
"viewport"
content=
"initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
>
<meta
name=
"viewport"
content=
"initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
>
<link
rel=
"shortcut icon"
href=
"/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"shortcut icon"
href=
"/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
href=
"/public/asset/css/reset.css"
>
<link
rel=
"stylesheet"
href=
"/public/asset/css/reset.css"
>
<link
rel=
"stylesheet"
href=
""
>
</head>
</head>
<body>
<body>
<div
id=
"app"
><slot></slot></div>
<div
id=
"app"
><slot></slot></div>
...
...
app/web/component/layout/editor/index.ts
View file @
c96e1816
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'
vue-property-decorator
'
;
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'
vue-property-decorator
'
;
import
iView
from
'
iview
'
;
import
iView
from
'
iview
'
;
import
cherryUi
from
'
@qg/cherry-ui
'
;
import
Raven
from
'
raven-js
'
;
import
Raven
from
'
raven-js
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
{
release
}
from
'
@/.sentryclirc
'
;
import
{
release
}
from
'
@/.sentryclirc
'
;
import
VueContextMenu
from
'
@editor/component/Contextmenu/index
'
;
import
VueContextMenu
from
'
@editor/component/Contextmenu/index
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
'
@/service/qg.service
'
;
import
'
iview/dist/styles/iview.css
'
;
import
'
iview/dist/styles/iview.css
'
;
import
'
@qg/cherry-ui/dist/cherry.css
'
;
Vue
.
use
(
iView
);
Vue
.
use
(
iView
);
Vue
.
use
(
cherryUi
);
Vue
.
use
(
VueContextMenu
);
Vue
.
use
(
VueContextMenu
);
// 初始化sentry
// 初始化sentry
...
...
app/web/component/layout/login/index.ts
View file @
c96e1816
import
{
Vue
,
Component
,
Prop
}
from
'
vue-property-decorator
'
;
import
{
Vue
,
Component
,
Prop
}
from
'
vue-property-decorator
'
;
// import cherryUi from '../../../../../node_modules/@qg/cherry-ui/src/index';
import
cherryUi
from
'
@qg/cherry-ui
'
;
import
iView
from
'
iview
'
;
import
iView
from
'
iview
'
;
import
'
@qg/cherry-ui/dist/cherry.css
'
;
import
'
iview/dist/styles/iview.css
'
;
import
'
iview/dist/styles/iview.css
'
;
Vue
.
use
(
iView
);
Vue
.
use
(
iView
);
Vue
.
use
(
cherryUi
);
@
Component
({
@
Component
({
name
:
'
Layout
'
name
:
'
Layout
'
...
...
app/web/lib/config.ts
View file @
c96e1816
// export const basicComponents = require('@qg/cherry-ui/md/index.json');
// export const basicComponents = require('@qg/cherry-ui/md/index.json');
export
const
kaLoginForm
=
require
(
'
@qg/citrus-ui/md/index.json
'
);
export
const
basicComponents
=
[
export
const
basicComponents
=
[
{
{
eleName
:
'
freedom-container
'
,
eleName
:
'
freedom-container
'
,
...
...
app/web/page/editor/component/DynamicComponent/index.ts
View file @
c96e1816
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'
vue-property-decorator
'
;
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'
vue-property-decorator
'
;
import
components
from
'
@qg/cherry-ui/src/index.js
'
;
import
FreedomContainer
from
'
../../component/FreedomContainer/index.vue
'
;
import
FreedomContainer
from
'
../../component/FreedomContainer/index.vue
'
;
import
{
kebabCase
,
chunk
,
flatten
}
from
'
lodash
'
;
import
{
kebabCase
,
chunk
,
flatten
}
from
'
lodash
'
;
import
{
State
}
from
'
vuex-class
'
;
import
{
State
}
from
'
vuex-class
'
;
...
@@ -52,17 +51,17 @@ export default class DynamicComponent extends Vue {
...
@@ -52,17 +51,17 @@ export default class DynamicComponent extends Vue {
console
.
log
(
'
dragend
'
);
console
.
log
(
'
dragend
'
);
}
}
getProps
(
eleName
)
{
//
getProps(eleName) {
const
props
=
{};
//
const props = {};
for
(
const
key
of
Object
.
keys
(
components
))
{
//
for (const key of Object.keys(components)) {
const
component
=
components
[
key
];
//
const component = components[key];
if
(
kebabCase
(
component
.
name
)
===
eleName
&&
component
.
props
)
{
//
if (kebabCase(component.name) === eleName && component.props) {
for
(
const
prop
of
Object
.
keys
(
component
.
props
))
{
//
for (const prop of Object.keys(component.props)) {
props
[
prop
]
=
[
'
Object
'
,
'
Array
'
].
includes
(
component
.
props
[
prop
].
type
.
name
)
?
component
.
props
[
prop
].
default
&&
component
.
props
[
prop
].
default
()
:
component
.
props
[
prop
].
default
;
//
props[prop] = ['Object', 'Array'].includes(component.props[prop].type.name) ? component.props[prop].default && component.props[prop].default() : component.props[prop].default;
}
//
}
}
//
}
}
//
}
return
props
;
//
return props;
}
//
}
}
}
\ No newline at end of file
app/web/page/editor/view/dashboard/index.ts
View file @
c96e1816
...
@@ -5,7 +5,6 @@ import DynamicComponent from '@editor/component/DynamicComponent/index.vue';
...
@@ -5,7 +5,6 @@ import DynamicComponent from '@editor/component/DynamicComponent/index.vue';
import
VueGridLayout
from
'
vue-grid-layout
'
;
import
VueGridLayout
from
'
vue-grid-layout
'
;
import
FreedomContainer
from
'
../../component/FreedomContainer/index.vue
'
;
import
FreedomContainer
from
'
../../component/FreedomContainer/index.vue
'
;
import
DynamicForm
from
'
../../component/DynamicForm/index.vue
'
;
import
DynamicForm
from
'
../../component/DynamicForm/index.vue
'
;
import
components
from
'
@qg/cherry-ui/src/index.js
'
;
import
LoginForm
from
'
@/lib/Form/index.vue
'
;
import
LoginForm
from
'
@/lib/Form/index.vue
'
;
import
DownloadGuide
from
'
@/lib/DownloadGuide/index.vue
'
;
import
DownloadGuide
from
'
@/lib/DownloadGuide/index.vue
'
;
import
{
ContextMenu
}
from
'
@editor/mixins/contextMenu.mixin
'
;
import
{
ContextMenu
}
from
'
@editor/mixins/contextMenu.mixin
'
;
...
...
app/web/service/qg.service.ts
0 → 100644
View file @
c96e1816
import
Vue
from
'
vue
'
;
import
{
Button
,
Image
,
Icon
,
Cell
,
CellGroup
,
Row
,
Col
,
Dialog
,
Popup
,
Overlay
,
Divider
,
Loading
,
Picker
,
NavBar
,
Field
,
Checkbox
,
CardList
,
List
,
Form
,
Sticky
,
Tab
,
Tabs
}
from
'
@qg/cherry-ui
'
;
// import { KaLoginForm } from '@qg/citrus-ui';
Vue
.
use
(
Button
);
Vue
.
use
(
Image
);
// Vue.use(Cell);
// Vue.use(CellGroup);
// Vue.use(Row);
// Vue.use(Col);
// Vue.use(Popup);
// Vue.use(Divider);
// Vue.use(Picker);
Vue
.
use
(
Field
);
// Vue.use(Dialog);
// Vue.use(Checkbox);
// Vue.use(Icon);
// Vue.use(Sticky);
// Vue.use(Overlay);
Vue
.
use
(
Form
);
// Vue.use(CardList);
// Vue.use(Loading);
// Vue.use(List);
// Vue.use(Tab);
// Vue.use(Tabs);
// Vue.use(KaLoginForm);
config/config.default.ts
View file @
c96e1816
...
@@ -36,5 +36,25 @@ export default (appInfo: EggAppConfig) => {
...
@@ -36,5 +36,25 @@ export default (appInfo: EggAppConfig) => {
'
access
'
'
access
'
];
];
const
prodMysqlConfig
=
{
dialect
:
'
mysql
'
,
username
:
'
low_code_w
'
,
password
:
'
B2pRHuGMLBNybuKp
'
,
host
:
'
low-code-db.quantgroups.com
'
,
port
:
3306
,
database
:
'
low_code
'
,
};
const
localMysqlConfig
=
{
dialect
:
'
mysql
'
,
username
:
'
qa
'
,
password
:
'
qatest
'
,
host
:
'
172.17.5.9
'
,
port
:
31024
,
database
:
'
low_code
'
,
};
config
.
sequelize
=
process
.
env
.
NODE_ENV
===
'
production
'
?
prodMysqlConfig
:
localMysqlConfig
;
return
config
;
return
config
;
};
};
config/config.local.ts
View file @
c96e1816
...
@@ -27,14 +27,25 @@ export default (appInfo: EggAppConfig) => {
...
@@ -27,14 +27,25 @@ export default (appInfo: EggAppConfig) => {
browser
:
'
http://localhost:7001/editor/list
'
browser
:
'
http://localhost:7001/editor/list
'
};
};
exports
.
sequelize
=
{
// const prodMysqlConfig = {
dialect
:
'
mysql
'
,
// dialect: 'mysql',
username
:
'
qa
'
,
// username: 'low_code_w',
password
:
'
qatest
'
,
// password: 'B2pRHuGMLBNybuKp',
host
:
'
172.17.5.9
'
,
// host: 'low-code-db.quantgroups.com',
port
:
31024
,
// port: 3306,
database
:
'
low_code
'
,
// database: 'low_code',
};
// };
// const localMysqlConfig = {
// dialect: 'mysql',
// username: 'qa',
// password: 'qatest',
// host: '172.17.5.9',
// port: 31024,
// database: 'low_code',
// };
// exports.sequelize = process.env.NODE_ENV === 'test' ? localMysqlConfig : prodMysqlConfig;
return
exports
;
return
exports
;
};
};
config/config.prod.ts
View file @
c96e1816
...
@@ -13,26 +13,26 @@ export default (appInfo: EggAppConfig) => {
...
@@ -13,26 +13,26 @@ export default (appInfo: EggAppConfig) => {
dir
:
'
/home/quant_group/logs
'
,
dir
:
'
/home/quant_group/logs
'
,
};
};
const
prodMysqlConfig
=
{
//
const prodMysqlConfig = {
dialect
:
'
mysql
'
,
//
dialect: 'mysql',
username
:
'
low_code_w
'
,
//
username: 'low_code_w',
password
:
'
B2pRHuGMLBNybuKp
'
,
//
password: 'B2pRHuGMLBNybuKp',
host
:
'
low-code-db.quantgroups.com
'
,
//
host: 'low-code-db.quantgroups.com',
port
:
3306
,
//
port: 3306,
database
:
'
low_code
'
,
//
database: 'low_code',
};
//
};
const
localMysqlConfig
=
{
//
const localMysqlConfig = {
dialect
:
'
mysql
'
,
//
dialect: 'mysql',
username
:
'
qa
'
,
//
username: 'qa',
password
:
'
qatest
'
,
//
password: 'qatest',
host
:
'
172.17.5.9
'
,
//
host: '172.17.5.9',
port
:
31024
,
//
port: 31024,
database
:
'
low_code
'
,
//
database: 'low_code',
};
//
};
// exports.sequelize = process.env.NODE_ENV === 'test' ? localMysqlConfig : prodMysqlConfig;
// exports.sequelize = process.env.NODE_ENV === 'test' ? localMysqlConfig : prodMysqlConfig;
exports
.
sequelize
=
localMysqlConfig
;
//
exports.sequelize = localMysqlConfig;
return
exports
;
return
exports
;
};
};
webpack.config.js
View file @
c96e1816
...
@@ -90,17 +90,17 @@ module.exports = {
...
@@ -90,17 +90,17 @@ module.exports = {
default
:
false
,
default
:
false
,
saSdk
:
{
saSdk
:
{
name
:
"
chunk-sa-sdk
"
,
// split cherryUI into a single package
name
:
"
chunk-sa-sdk
"
,
// split cherryUI into a single package
priority
:
2
2
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
priority
:
2
1
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
sa-sdk-javascript
[\\/]
/
,
// in order to adapt to cnpm
test
:
/
[\\/]
node_modules
[\\/]
sa-sdk-javascript
[\\/]
/
,
// in order to adapt to cnpm
enforce
:
true
enforce
:
true
},
},
//
cherryUI: {
cherryUI
:
{
//
name: 'chunk-cherryUI', // 分离组件库
name
:
'
chunk-cherryUI
'
,
// 分离组件库
// priority: 21
,
priority
:
22
,
//
chunks: 'all',
chunks
:
'
all
'
,
//
test: /[\\/]node_modules[\\/]@qg[\\/]cherry-ui[\\/]/,
test
:
/
[\\/]
node_modules
[\\/]
@qg
[\\/]
cherry-ui
[\\/]
/
,
//
enforce: true
enforce
:
true
//
},
},
lodash
:
{
lodash
:
{
name
:
'
chunk-lodash
'
,
// 分离组件库
name
:
'
chunk-lodash
'
,
// 分离组件库
priority
:
19
,
priority
:
19
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment