Commit c96e1816 authored by 郝聪敏's avatar 郝聪敏

test: 测试数据库

parent b7644030
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') {
......
...@@ -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>
......
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
......
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'
......
// 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',
......
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
...@@ -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';
......
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);
...@@ -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;
}; };
...@@ -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;
}; };
...@@ -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;
}; };
...@@ -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: 22, // the weight needs to be larger than libs and app or it will be packaged into libs or app priority: 21, // 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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment