提交 b965b5c0 编写于 作者: ibizdev's avatar ibizdev

zhouweidong 部署微服务应用 [ibz-wf,统一工作流]

上级 a903759d
......@@ -53,10 +53,8 @@
"@types/mockjs": "^1.0.2",
"@types/qs": "^6.9.0",
"@vue/cli-plugin-babel": "^4.1.0",
"@vue/cli-plugin-e2e-cypress": "^4.1.0",
"@vue/cli-plugin-router": "^4.1.0",
"@vue/cli-plugin-typescript": "^4.1.0",
"@vue/cli-plugin-unit-jest": "^4.1.0",
"@vue/cli-plugin-vuex": "^4.1.0",
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
......
......@@ -170,10 +170,20 @@ export default class DropDownList extends Vue {
/**
* 属性类型
* @type {string}
*
* @type {'string' | 'number'}
* @memberof DropDownList
*/
@Prop({ default: 'string' })
public valueType!: 'string' | 'number';
/**
* 选择实际值
*
* @type {*}
* @memberof DropDownList
*/
@Prop() public valueType?: string;
public value: any = null;
/**
* 计算属性(当前值)
......@@ -204,7 +214,7 @@ export default class DropDownList extends Vue {
})
return JSON.stringify([result]);
}
return this.itemValue;
return this.value;
}
/**
......@@ -263,10 +273,12 @@ export default class DropDownList extends Vue {
this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if (Object.is('load', type)) {
this.loadData();
this.readyValue();
}
});
}
this.loadData();
this.readyValue();
}
/**
......@@ -298,6 +310,29 @@ export default class DropDownList extends Vue {
});
}
}
/**
* 准备值
*
* @memberof DropDownList
*/
public readyValue() {
if (this.itemValue == null) {
this.value = null;
return;
}
if (this.$util.typeOf(this.itemValue) === this.valueType) {
this.value = this.itemValue;
} else if (this.valueType === 'number') {
if (this.itemValue.indexOf('.') === -1) {
this.value = parseInt(this.itemValue);
} else {
this.value = parseFloat(this.itemValue);
}
} else {
this.value = this.itemValue.toString();
}
}
/**
* 下拉点击事件
......@@ -331,32 +366,29 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
public formatCodeList(items: Array<any>){
let matching: boolean = true;
let matching: boolean = false;
this.items = [];
try{
if(this.valueType){
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = false;
if(type == 'number'){
item.value = item.value.toString();
items.forEach((item: any)=>{
const type = this.$util.typeOf(item.value);
if(type != this.valueType){
matching = true;
if(type === 'number'){
item.value = item.value.toString();
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
if(item.value.indexOf('.') == -1){
item.value = parseInt(item.value);
}else{
item.value = parseFloat(item.value);
}
item.value = parseFloat(item.value);
}
}
this.items.push(item);
});
if(!matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}else{
this.items = items;
this.items.push(item);
});
if(matching){
console.warn(`代码表 ${ this.tag } 值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`);
}
}catch(error){
console.warn('代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配');
}
......
此差异已折叠。
......@@ -37,6 +37,11 @@
git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/
mvn clean package -Pweb
cd ibzwf-app/ibzwf-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-app-web.jar
EXPOSE 8080
EXPOSE 30003
ADD ibzwf-app-web.jar /ibzwf-app-web.jar
......@@ -3,9 +3,23 @@ services:
ibzwf-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-app-web:latest
ports:
- "8080:8080"
- "30003:30003"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30003
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.100.243:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- NACOS=172.16.100.243:8848
- SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy:
resources:
limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册