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

ibiz4j 部署微服务应用

上级 87b6146f
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
v-for="(item,i) in dataRight" v-for="(item,i) in dataRight"
:key="i" :key="i"
>{{dataLeft[item-1].label}}</Option> >{{dataLeft[item-1].label}}</Option>
<el-transfer v-model="dataRight" :data="dataLeft" @change=dataChange></el-transfer> <el-transfer v-model="dataRight" :data="dataLeft" @change="dataChange"></el-transfer>
</Select> </Select>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -14,11 +14,11 @@ import { Vue, Component, Watch, Prop, Model } from "vue-property-decorator"; ...@@ -14,11 +14,11 @@ import { Vue, Component, Watch, Prop, Model } from "vue-property-decorator";
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
@Component({}) @Component({})
export default class FromTransfer extends Vue { export default class AppTransfer extends Vue {
/** /**
* 表单传递右侧框中的数据 * 表单传递右侧框中的数据
*/ */
@Prop() public data: any; @Prop() public data?: any;
/** /**
* 左侧框数据 * 左侧框数据
*/ */
...@@ -31,7 +31,7 @@ export default class FromTransfer extends Vue { ...@@ -31,7 +31,7 @@ export default class FromTransfer extends Vue {
* 代码表服务对象 * 代码表服务对象
* *
* @type {CodeListService} * @type {CodeListService}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
public codeListService: CodeListService = new CodeListService({ public codeListService: CodeListService = new CodeListService({
...@@ -42,21 +42,21 @@ export default class FromTransfer extends Vue { ...@@ -42,21 +42,21 @@ export default class FromTransfer extends Vue {
* 额外参数 * 额外参数
* *
* @type {*} * @type {*}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
public otherParam: any; public otherParam: any;
/** /**
* 查询参数 * 查询参数
* @type {*} * @type {*}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
public queryParam: any; public queryParam: any;
/** /**
* 当前选中值 * 当前选中值
* @type {any} * @type {any}
* @memberof Drop * @memberof AppTransfer
*/ */
@Model("change") readonly itemValue!: any; @Model("change") readonly itemValue!: any;
...@@ -64,7 +64,7 @@ export default class FromTransfer extends Vue { ...@@ -64,7 +64,7 @@ export default class FromTransfer extends Vue {
* 代码表标识 * 代码表标识
* *
* @type {string} * @type {string}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
@Prop() public tag?: string; @Prop() public tag?: string;
...@@ -72,15 +72,14 @@ export default class FromTransfer extends Vue { ...@@ -72,15 +72,14 @@ export default class FromTransfer extends Vue {
* 代码表类型 * 代码表类型
* *
* @type {string} * @type {string}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
@Prop() public codelistType?: string; @Prop() public codelistType?: string;
/** /**
* 监听表单数据 * 监听表单数据
* *
* @memberof FromTransfer * @memberof AppTransfer
*/ */
@Watch("data", { deep: true }) @Watch("data", { deep: true })
...@@ -90,27 +89,27 @@ export default class FromTransfer extends Vue { ...@@ -90,27 +89,27 @@ export default class FromTransfer extends Vue {
} }
/** /**
* 组件change事件,右侧框数据变化时 * 组件change事件,右侧框数据变化时
* @memberof FromTransfer * @memberof AppTransfer
*/ */
dataChange(e:any){ dataChange(e: any) {
console.log(e); console.log(e);
let val:any[]=[]; let val: any[] = [];
let newVal:any; let newVal: any;
this.dataLeft.forEach((elem: any) => { this.dataLeft.forEach((elem: any) => {
e.forEach((item: any) => { e.forEach((item: any) => {
if (elem.key === item) val.push(elem.value); if (elem.key === item) val.push(elem.value);
}); });
}); });
newVal=val.join(','); newVal = val.join(",");
console.log(newVal); console.log(newVal, typeof newVal);
this.$emit("change", newVal); if (newVal) this.$emit("change", newVal);
} }
/** /**
* 传入额外参数 * 传入额外参数
* *
* @type {*} * @type {*}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
@Prop() public itemParam?: any; @Prop() public itemParam?: any;
...@@ -133,7 +132,7 @@ export default class FromTransfer extends Vue { ...@@ -133,7 +132,7 @@ export default class FromTransfer extends Vue {
/** /**
* 是否禁用 * 是否禁用
* @type {any} * @type {any}
* @memberof FromTransfer * @memberof AppTransfer
* *
*/ */
@Prop() public disabled?: any; @Prop() public disabled?: any;
...@@ -141,43 +140,22 @@ export default class FromTransfer extends Vue { ...@@ -141,43 +140,22 @@ export default class FromTransfer extends Vue {
/** /**
* 是否支持过滤 * 是否支持过滤
* @type {boolean} * @type {boolean}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
@Prop() public filterable?: boolean; @Prop() public filterable?: boolean;
/** /**
* 下拉选提示内容 * 下拉选提示内容
* @type {string} * @type {string}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
@Prop() public placeholder?: string; @Prop() public placeholder?: string;
/**
* 计算属性(当前值)
* @type {any}
* @memberof FromTransfer
*/
set currentVal(val: any) {
// const type: string = this.$util.typeOf(val);
// val =
// Object.is(type, "null") || Object.is(type, "undefined") ? undefined : val;
// this.dataLeft.forEach((elem: any) => {
// this.dataRight.forEach((item: any) => {
// if (elem.key === item) val.push(elem.value);
// });
// });
// val=val.join(',');
// this.$emit("change", val);
}
/** /**
* 获取值对象 * 获取值对象
* *
* @memberof FromTransfer * @memberof AppTransfer
*/ */
// get currentVal() {
// return this.itemValue;
// }
get currentVal() { get currentVal() {
return this.itemValue; return this.itemValue;
} }
...@@ -186,7 +164,7 @@ export default class FromTransfer extends Vue { ...@@ -186,7 +164,7 @@ export default class FromTransfer extends Vue {
* 代码表 * 代码表
* *
* @type {any[]} * @type {any[]}
* @memberof FromTransfer * @memberof AppTransfer
*/ */
// public items: any[] = []; // public items: any[] = [];
...@@ -195,7 +173,7 @@ export default class FromTransfer extends Vue { ...@@ -195,7 +173,7 @@ export default class FromTransfer extends Vue {
* *
* @param {*} arg * @param {*} arg
* @returns * @returns
* @memberof FromTransfer * @memberof AppTransfer
*/ */
public handlePublicParams(arg: any) { public handlePublicParams(arg: any) {
// 合并表单参数 // 合并表单参数
...@@ -225,11 +203,10 @@ export default class FromTransfer extends Vue { ...@@ -225,11 +203,10 @@ export default class FromTransfer extends Vue {
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof FromTransfer * @memberof AppTransfer
*/ */
public created() { public created() {
this.dataHandle(); this.dataHandle();
this.initRight();
} }
/** /**
...@@ -241,7 +218,9 @@ export default class FromTransfer extends Vue { ...@@ -241,7 +218,9 @@ export default class FromTransfer extends Vue {
if (codelist) { if (codelist) {
this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))]; this.dataLeft = [...JSON.parse(JSON.stringify(codelist.items))];
this.initLeft(); this.initLeft();
this.initRight();
console.log(this.dataLeft); console.log(this.dataLeft);
console.log(this.dataRight);
} else { } else {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
} }
...@@ -257,8 +236,8 @@ export default class FromTransfer extends Vue { ...@@ -257,8 +236,8 @@ export default class FromTransfer extends Vue {
.then((res: any) => { .then((res: any) => {
this.dataLeft = res; this.dataLeft = res;
console.log(this.dataLeft); console.log(this.dataLeft);
this.initLeft(); this.initLeft();
this.initRight();
}) })
.catch((error: any) => { .catch((error: any) => {
console.log(`----${this.tag}----代码表不存在`); console.log(`----${this.tag}----代码表不存在`);
...@@ -286,9 +265,16 @@ export default class FromTransfer extends Vue { ...@@ -286,9 +265,16 @@ export default class FromTransfer extends Vue {
* 初始化右侧框数据 * 初始化右侧框数据
*/ */
public initRight() { public initRight() {
if (this.data) { let _data: string = this.data;
this.data.forEach((elem: any) => { console.log(_data);
this.dataRight.push(elem); if (_data) {
let newData: any[] = _data.split(",");
this.dataLeft.forEach((elem: any) => {
newData.forEach((item: any) => {
if (item === elem.value) {
this.dataRight.push(elem.key);
}
});
}); });
} }
} }
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
git clone -b master $para2 ibzuaa/ git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/ cd ibzuaa/
mvn clean package -Papi mvn clean package -Pweb
cd ibzuaa-provider/ibzuaa-provider-api cd ibzuaa-app/ibzuaa-app-web
mvn -Papi docker:build mvn -Pweb docker:build
mvn -Papi docker:push mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-provider-api.yaml ibzlab-rt --with-registry-auth docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-app-web.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar
EXPOSE 8080 EXPOSE 30002
ADD ibzuaa-app-web.jar /ibzuaa-app-web.jar ADD ibzuaa-app-web.jar /ibzuaa-app-web.jar
...@@ -3,9 +3,23 @@ services: ...@@ -3,9 +3,23 @@ services:
ibzuaa-app-web: ibzuaa-app-web:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest
ports: ports:
- "8080:8080" - "30002:30002"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=30002
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211: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
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
- ABC=1
- DEC=2
deploy: deploy:
resources: resources:
limits: limits:
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-provider-api.jar
EXPOSE 40002 EXPOSE 8081
ADD ibzuaa-provider-api.jar /ibzuaa-provider-api.jar ADD ibzuaa-provider-api.jar /ibzuaa-provider-api.jar
...@@ -3,21 +3,9 @@ services: ...@@ -3,21 +3,9 @@ services:
ibzuaa-provider-api: ibzuaa-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest
ports: ports:
- "40002:40002" - "8081:8081"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40002
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211: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
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
deploy: deploy:
resources: resources:
limits: limits:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册