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

ibiz4j 部署微服务应用

上级 d0432f8f
...@@ -18,14 +18,16 @@ ...@@ -18,14 +18,16 @@
"@fullcalendar/list": "^4.4.0", "@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0", "@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0", "@fullcalendar/vue": "^4.4.0",
"vuedraggable": "^2.23.2",
"async-validator": "^3.3.0",
"axios": "^0.19.1", "axios": "^0.19.1",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"echarts": "^4.6.0", "echarts": "^4.6.0",
"element-ui": "^2.13.0", "element-ui": "^2.13.0",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.13", "ibiz-gantt-elastic": "^1.0.15",
"ibiz-vue-lib": "^0.1.7", "ibiz-vue-lib": "^0.1.9",
"interactjs": "^1.9.4", "interactjs": "^1.9.4",
"moment": "^2.24.0", "moment": "^2.24.0",
"path-to-regexp": "^6.1.0", "path-to-regexp": "^6.1.0",
......
...@@ -17,7 +17,7 @@ export default class AppDepartmentSelect extends Vue { ...@@ -17,7 +17,7 @@ export default class AppDepartmentSelect extends Vue {
* @type {*} * @type {*}
* @memberof AppDepartmentSelect * @memberof AppDepartmentSelect
*/ */
@Prop({default:'/ibzorganizations/{orgid}/ibzdepartments/picker'}) public url?: any; @Prop() public url?: any;
/** /**
* 过滤项 * 过滤项
...@@ -108,7 +108,7 @@ export default class AppDepartmentSelect extends Vue { ...@@ -108,7 +108,7 @@ export default class AppDepartmentSelect extends Vue {
public searchNodesData(){ public searchNodesData(){
// 处理过滤参数,生成url // 处理过滤参数,生成url
let param = this.handleFilter(); let param = this.handleFilter();
let _url = this.url.replace(/{orgid}/,param) let _url = this.url.replace('${orgid}',param)
if(this.oldurl === _url){ if(this.oldurl === _url){
return; return;
} }
......
...@@ -44,6 +44,13 @@ export default class AppOrgSelect extends Vue { ...@@ -44,6 +44,13 @@ export default class AppOrgSelect extends Vue {
*/ */
@Prop({default:false}) public multiple?:boolean; @Prop({default:false}) public multiple?:boolean;
/**
* 查询单位路径
*
* @memberof AppOrgSelect
*/
@Prop() public url!:string;
/** /**
* 监听表单数据变化 * 监听表单数据变化
* *
...@@ -57,20 +64,13 @@ export default class AppOrgSelect extends Vue { ...@@ -57,20 +64,13 @@ export default class AppOrgSelect extends Vue {
let tempFilterValue:any = this.initBasicData(); let tempFilterValue:any = this.initBasicData();
// filter值变化才去请求数据 // filter值变化才去请求数据
if(tempFilterValue && (this.copyFilterValue !== tempFilterValue)){ if(tempFilterValue && (this.copyFilterValue !== tempFilterValue)){
this.loadTreeData(this.orgDataUrl.replace('${orgid}',tempFilterValue)); this.loadTreeData(this.url.replace('${orgid}',tempFilterValue));
this.copyFilterValue = tempFilterValue; this.copyFilterValue = tempFilterValue;
} }
} }
} }
} }
/**
* 查询单位路径
*
* @memberof AppOrgSelect
*/
public orgDataUrl:string ="/ibzorganizations/${orgid}/suborg/picker";
/** /**
* 选择值 * 选择值
* *
...@@ -99,7 +99,7 @@ export default class AppOrgSelect extends Vue { ...@@ -99,7 +99,7 @@ export default class AppOrgSelect extends Vue {
*/ */
public created(){ public created(){
if(!this.filter){ if(!this.filter){
this.loadTreeData(this.orgDataUrl.replace('${orgid}','alls')); this.loadTreeData(this.url);
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="ibiz-group-picker"> <div class="ibiz-group-picker">
<div class="ibiz-group-container"> <div class="ibiz-group-container">
<div v-if="showTree" class="ibiz-group-tree"> <div v-if="showTree" class="ibiz-group-tree">
<ibiz-select-tree :NodesData="treeItems" v-model="treeSelectVal" :treeOnly="true" @select="treeSelect"></ibiz-select-tree> <ibiz-select-tree :NodesData="treeItems" v-model="treeSelectVal" :treeOnly="true" :defaultChecked="true" @select="treeSelect"></ibiz-select-tree>
</div> </div>
<div class="ibiz-group-content"> <div class="ibiz-group-content">
<ibiz-group-card :data="cardItems" text="label" value="id" groupName="group" :multiple="multiple" :defaultSelect="cardSelctVal" @select="groupSelect"></ibiz-group-card> <ibiz-group-card :data="cardItems" text="label" value="id" groupName="group" :multiple="multiple" :defaultSelect="cardSelctVal" @select="groupSelect"></ibiz-group-card>
...@@ -47,6 +47,22 @@ export default class IBizGroupPicker extends Vue { ...@@ -47,6 +47,22 @@ export default class IBizGroupPicker extends Vue {
*/ */
protected multiple: boolean = false; protected multiple: boolean = false;
/**
* 加载树url
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected treeurl:any;
/**
* 加载人员url
*
* @type {*}
* @memberof IBizGroupPicker
*/
protected url:any;
/** /**
* 树数据集 * 树数据集
* *
...@@ -110,10 +126,9 @@ export default class IBizGroupPicker extends Vue { ...@@ -110,10 +126,9 @@ export default class IBizGroupPicker extends Vue {
* @memberof IBizGroupPicker * @memberof IBizGroupPicker
*/ */
get showTree() { get showTree() {
if(this.viewParam.hasfilter && Object.is(this.viewData.srforgid, this.viewParam.filtervalue)) { if(this.viewParam) {
return false; return this.viewParam.showtree;
} }
return true;
} }
/** /**
...@@ -129,6 +144,8 @@ export default class IBizGroupPicker extends Vue { ...@@ -129,6 +144,8 @@ export default class IBizGroupPicker extends Vue {
this.viewData = JSON.parse(this.viewdata); this.viewData = JSON.parse(this.viewdata);
this.viewParam = JSON.parse(this.viewparam); this.viewParam = JSON.parse(this.viewparam);
this.multiple = this.viewParam.multiple; this.multiple = this.viewParam.multiple;
this.treeurl = this.viewParam.treeurl;
this.url = this.viewParam.url;
if (this.viewParam.selects) { if (this.viewParam.selects) {
this.viewParam.selects.forEach((select: any) => { this.viewParam.selects.forEach((select: any) => {
this.selects.push(select); this.selects.push(select);
...@@ -159,8 +176,9 @@ export default class IBizGroupPicker extends Vue { ...@@ -159,8 +176,9 @@ export default class IBizGroupPicker extends Vue {
* @memberof IBizGroupPicker * @memberof IBizGroupPicker
*/ */
public loadTree() { public loadTree() {
let orgid = this.viewParam.filtervalue?this.viewParam.filtervalue:"alls"; let orgid = this.viewParam.filtervalue;
let get = Http.getInstance().get(`/ibzorganizations/${orgid}/suborg/ibzdepartments/picker`, true); let tempTreeUrl:string = this.treeurl.replace('${orgid}',orgid);
let get = Http.getInstance().get(tempTreeUrl, true);
get.then((response: any) => { get.then((response: any) => {
if(response.status === 200) { if(response.status === 200) {
this.treeItems = response.data; this.treeItems = response.data;
...@@ -177,7 +195,8 @@ export default class IBizGroupPicker extends Vue { ...@@ -177,7 +195,8 @@ export default class IBizGroupPicker extends Vue {
* @memberof IBizGroupPicker * @memberof IBizGroupPicker
*/ */
public loadGroupData(key: string) { public loadGroupData(key: string) {
let get = Http.getInstance().get(`/ibzorganizations/${key}/ibzemployees/picker`, true); let tempUrl = this.url.replace('${selected-orgid}',key);
let get = Http.getInstance().get(tempUrl, true);
get.then((response: any) => { get.then((response: any) => {
if(response.status === 200) { if(response.status === 200) {
this.cardItems = response.data; this.cardItems = response.data;
......
...@@ -32,13 +32,21 @@ export default class IBizGroupSelect extends Vue { ...@@ -32,13 +32,21 @@ export default class IBizGroupSelect extends Vue {
*/ */
@Prop() name!: string; @Prop() name!: string;
/**
* 树加载地址
*
* @type {*}
* @memberof IBizGroupSelect
*/
@Prop() treeurl?:boolean;
/** /**
* 数据接口地址 * 数据接口地址
* *
* @type {*} * @type {*}
* @memberof IBizGroupSelect * @memberof IBizGroupSelect
*/ */
@Prop() url?: string; @Prop() url!: string;
/** /**
* 多选 * 多选
...@@ -175,10 +183,14 @@ export default class IBizGroupSelect extends Vue { ...@@ -175,10 +183,14 @@ export default class IBizGroupSelect extends Vue {
}else{ }else{
filtervalue = context.srforgid; filtervalue = context.srforgid;
} }
}else{
filtervalue = context.srforgid;
} }
const param: any = {}; const param: any = {};
Object.assign(param, { Object.assign(param, {
hasfilter: this.filter ? true : false, showtree: this.treeurl?true:false,
url:this.url,
treeurl:this.treeurl,
filtervalue: filtervalue, filtervalue: filtervalue,
multiple: this.multiple, multiple: this.multiple,
selects: this.selects selects: this.selects
...@@ -199,7 +211,6 @@ export default class IBizGroupSelect extends Vue { ...@@ -199,7 +211,6 @@ export default class IBizGroupSelect extends Vue {
* @memberof IBizGroupSelect * @memberof IBizGroupSelect
*/ */
public openViewClose(result: any) { public openViewClose(result: any) {
console.log(result)
this.selects = []; this.selects = [];
if (result.datas && result.datas.length > 0) { if (result.datas && result.datas.length > 0) {
this.selects = result.datas this.selects = result.datas
......
...@@ -201,11 +201,11 @@ export default class TabPageExp extends Vue { ...@@ -201,11 +201,11 @@ export default class TabPageExp extends Vue {
* @param {*} caption * @param {*} caption
* @memberof TabPageExp * @memberof TabPageExp
*/ */
public setCurPageCaption(routename: string, caption: any, info: string) { public setCurPageCaption(caption: string, title: any, info: string) {
if(!Object.is(this.$route.name, routename)) { if(this.$route.meta && (!Object.is(this.$route.meta.caption, caption))) {
return; return;
} }
this.$store.commit("setCurPageCaption", { route: this.$route, caption: caption, info: info }); this.$store.commit("setCurPageCaption", { route: this.$route, caption: title, info: info });
setTimeout(() => { setTimeout(() => {
this.moveToView(this.$route); this.moveToView(this.$route);
}, 1); }, 1);
......
...@@ -247,9 +247,9 @@ export default class EditViewEngine extends ViewEngine { ...@@ -247,9 +247,9 @@ export default class EditViewEngine extends ViewEngine {
*/ */
public setTabCaption(info: string): void { public setTabCaption(info: string): void {
let viewdata: any = this.view.model; let viewdata: any = this.view.model;
let viewParam = this.view.$store.getters['viewaction/getAppView'](this.view.viewtag); if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) {
if (viewdata && viewParam && info && !Object.is(info, '') && this.view.$tabPageExp) { this.view.$tabPageExp.setCurPageCaption(viewdata.srfCaption, viewdata.srfTitle, info);
this.view.$tabPageExp.setCurPageCaption(`${viewParam.viewmodule}_${viewParam.viewname}`.toLocaleLowerCase(), viewdata.srfCaption, info); this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)} - ${viewdata.dataInfo}`;
} }
} }
......
...@@ -61,7 +61,7 @@ mock.onGet('v7/mainappmenu').reply((config: any) => { ...@@ -61,7 +61,7 @@ mock.onGet('v7/mainappmenu').reply((config: any) => {
iconcls: 'fa fa-sort-amount-asc', iconcls: 'fa fa-sort-amount-asc',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_2', appfunctag: 'Auto6',
resourcetag: '', resourcetag: '',
}, },
], ],
......
...@@ -622,6 +622,21 @@ export default class EntityService { ...@@ -622,6 +622,21 @@ export default class EntityService {
return Http.getInstance().delete(`/${this.APPDENAME}/batch`,isloading,data[this.APPDEKEY]); return Http.getInstance().delete(`/${this.APPDENAME}/batch`,isloading,data[this.APPDEKEY]);
} }
/**
* getDataInfo接口方法
*
* @param {*} [context={}]
* @param {*} [data]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async getDataInfo(context: any = {},data: any, isloading?: boolean):Promise<any> {
if(context[this.APPLYDEKEY]){
return this.Get(context,data, isloading);
}
}
/** /**
* WFStart接口方法 * WFStart接口方法
* *
......
...@@ -138,6 +138,17 @@ export declare interface Util { ...@@ -138,6 +138,17 @@ export declare interface Util {
* @memberof Util * @memberof Util
*/ */
dateFormat(date: any,fmt?: string):string dateFormat(date: any,fmt?: string):string
/**
* 表单项校验
*
* @param property 表单项属性名
* @param data 表单数据
* @param rules 表单值规则
* @returns {Promise}
* @memberof Util
*/
validateItem(property: string, data:any, rules:any): Promise<any>
} }
declare module "vue/types/vue" { declare module "vue/types/vue" {
......
...@@ -73,7 +73,7 @@ export class UIActionTool { ...@@ -73,7 +73,7 @@ export class UIActionTool {
values.push(value); values.push(value);
}); });
} }
Object.assign(_data, { [name]: values.length > 0 ? values.join(';') : value }); Object.assign(_data, { [name]: values.length > 0 ? values.join(',') : value });
}); });
} }
return _data; return _data;
......
import qs from 'qs'; import qs from 'qs';
import { Route } from 'vue-router'; import { Route } from 'vue-router';
import Schema from "async-validator";
/** /**
* 平台工具类 * 平台工具类
...@@ -362,4 +363,23 @@ export class Util { ...@@ -362,4 +363,23 @@ export class Util {
return FirstOBJ; return FirstOBJ;
} }
/**
* 表单项校验
*
* @param property 表单项属性名
* @param data 表单数据
* @param rules 表单值规则
* @returns {Promise}
* @memberof Util
*/
public static validateItem(property: string, data:any, rules:any) {
// 1.获取数值和规则
const value = data[property];
const rule = rules[property];
// 2.创建校验规则
const schema = new Schema({ [property]: rule })
// 校验返回Promise
return schema.validate({ [property]: value })
}
} }
\ No newline at end of file
...@@ -564,8 +564,8 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -564,8 +564,8 @@ export default class MainBase extends Vue implements ControlInterface {
case 'Auto5': case 'Auto5':
this.clickAuto5(item); this.clickAuto5(item);
return; return;
case '_2': case 'Auto6':
this.click_2(item); this.clickAuto6(item);
return; return;
default: default:
console.warn('未指定应用功能'); console.warn('未指定应用功能');
...@@ -616,7 +616,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -616,7 +616,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {*} [item={}] * @param {*} [item={}]
* @memberof Main * @memberof Main
*/ */
public click_2(item: any = {}) { public clickAuto6(item: any = {}) {
const viewparam: any = {}; const viewparam: any = {};
Object.assign(viewparam, {}); Object.assign(viewparam, {});
const deResParameters: any[] = []; const deResParameters: any[] = [];
......
...@@ -65,7 +65,7 @@ export default class MainModel { ...@@ -65,7 +65,7 @@ export default class MainModel {
iconcls: 'fa fa-sort-amount-asc', iconcls: 'fa fa-sort-amount-asc',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: '_2', appfunctag: 'Auto6',
resourcetag: '', resourcetag: '',
}, },
]; ];
...@@ -103,7 +103,7 @@ export default class MainModel { ...@@ -103,7 +103,7 @@ export default class MainModel {
], ],
}, },
{ {
appfunctag: '_2', appfunctag: 'Auto6',
appfuncyype: 'APPVIEW', appfuncyype: 'APPVIEW',
openmode: '', openmode: '',
codename: 'sys_authloggridview', codename: 'sys_authloggridview',
......
<template> <template>
<div class='grid' style="height:100%;"> <div class='grid' style="height:100%;">
<el-table v-if="isDisplay === true" <i-form>
<el-table v-if="isDisplay === true"
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }" :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)" @sort-change="onSortChange($event)"
:border="isDragendCol" :border="isDragendCol"
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
{{$t('entities.syspermission.main_grid.columns.sys_permissionid')}} {{$t('entities.syspermission.main_grid.columns.sys_permissionid')}}
</span> </span>
</template> </template>
<template v-slot="{row,column}"> <template v-slot="{row,column,$index}">
<span>{{row.sys_permissionid}}</span> <span>{{row.sys_permissionid}}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
{{$t('entities.syspermission.main_grid.columns.sys_permissionname')}} {{$t('entities.syspermission.main_grid.columns.sys_permissionname')}}
</span> </span>
</template> </template>
<template v-slot="{row,column}"> <template v-slot="{row,column,$index}">
<span>{{row.sys_permissionname}}</span> <span>{{row.sys_permissionname}}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
<el-table-column></el-table-column> <el-table-column></el-table-column>
</template> </template>
</el-table> </el-table>
</i-form>
<row class='grid-pagination' v-show="items.length > 0"> <row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)" <page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)" @on-page-size-change="onPageSizeChange($event)"
...@@ -96,6 +98,7 @@ import SysPermissionService from '@/service/sys-permission/sys-permission-servic ...@@ -96,6 +98,7 @@ import SysPermissionService from '@/service/sys-permission/sys-permission-servic
import MainService from './main-grid-service'; import MainService from './main-grid-service';
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
@Component({ @Component({
...@@ -522,6 +525,26 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -522,6 +525,26 @@ export default class MainBase extends Vue implements ControlInterface {
}, },
] ]
/**
* 表格模型集合
*
* @type {*}
* @memberof Main
*/
public gridItemsModel: any[] = [];
/**
* 获取表格行模型
*
* @type {*}
* @memberof Main
*/
public getGridRowModel(){
return {
srfkey: new FormItemModel(),
}
}
/** /**
* 属性值规则 * 属性值规则
* *
...@@ -535,6 +558,50 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -535,6 +558,50 @@ export default class MainBase extends Vue implements ControlInterface {
], ],
} }
/**
* 表格行编辑项校验
*
* @param {string} property 属性名
* @param {*} data 行数据
* @param {number} rowIndex 行索引
* @returns Promise<any>
*
* @memberof Main
*/
public validate(property:string, data:any, rowIndex:number):Promise<any>{
return new Promise((resolve, reject) => {
this.$util.validateItem(property,data,this.rules).then(()=>{
this.gridItemsModel[rowIndex][property].setError(null);
resolve(true);
}).catch(({ errors, fields }) => {
this.gridItemsModel[rowIndex][property].setError(errors[0].message);
resolve(false);
});
});
}
/**
* 校验所有修改过的编辑项
*
* @returns Promise<any>
* @memberof Main
*/
public async validateAll(){
let validateState = true;
let index = -1;
for(let item of this.items){
index++;
if(item.rowDataState === "create" || item.rowDataState === "update"){
for(let property of Object.keys(this.rules)){
if(!await this.validate(property,item,index)){
validateState = false;
}
}
}
}
return validateState;
}
/** /**
* 表格数据加载 * 表格数据加载
* *
...@@ -577,8 +644,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -577,8 +644,10 @@ export default class MainBase extends Vue implements ControlInterface {
const data: any = response.data; const data: any = response.data;
this.totalrow = response.total; this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data)); this.items = JSON.parse(JSON.stringify(data));
// 清空selections // 清空selections,gridItemsModel
this.selections = []; this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.$emit('load', this.items); this.$emit('load', this.items);
// 设置默认选中 // 设置默认选中
let _this = this; let _this = this;
...@@ -627,6 +696,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -627,6 +696,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.items.some((val: any, num: number) =>{ this.items.some((val: any, num: number) =>{
if(JSON.stringify(val) == JSON.stringify(record)){ if(JSON.stringify(val) == JSON.stringify(record)){
this.items.splice(num,1); this.items.splice(num,1);
this.gridItemsModel.splice(num,1);
return true; return true;
} }
}); });
...@@ -676,9 +746,10 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -676,9 +746,10 @@ export default class MainBase extends Vue implements ControlInterface {
//删除items中已删除的项 //删除items中已删除的项
console.log(this.items); console.log(this.items);
_datas.forEach((data: any) => { _datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
this.gridItemsModel.splice(index,1);
return true; return true;
} }
}); });
...@@ -1241,41 +1312,56 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1241,41 +1312,56 @@ export default class MainBase extends Vue implements ControlInterface {
* 保存 * 保存
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {Promise<any>}
* @memberof Main * @memberof Main
*/ */
public save(args: any[], params?: any, $event?: any, xData?: any): void { public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this; let _this = this;
let promises:any = []; if(!await this.validateAll()){
_this.items.forEach((item:any)=>{ this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
if(!item.rowDataState){ return [];
return; }
} else if(Object.is(item.rowDataState, 'create')){ let successItems:any = [];
if(!this.createAction){ let errorItems:any = [];
this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONPickupGridView视图表格createAction参数未配置' }); let errorMessage:any = [];
return; for (const item of _this.items) {
} try {
Object.assign(item,{viewparams:this.viewparams}); if(Object.is(item.rowDataState, 'create')){
promises.push(this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator)); if(!this.createAction){
}else if(Object.is(item.rowDataState, 'update')){ this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONPickupGridView视图表格createAction参数未配置' });
if(!this.updateAction){ }else{
this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONPickupGridView视图表格updateAction参数未配置' }); Object.assign(item,{viewparams:this.viewparams});
return; let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
} successItems.push(JSON.parse(JSON.stringify(response.data)));
Object.assign(item,{viewparams:this.viewparams}); }
if(item.syspermission){ }else if(Object.is(item.rowDataState, 'update')){
Object.assign(this.context,{syspermission:item.syspermission}) if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: 'SYS_PERMISSIONPickupGridView视图表格updateAction参数未配置' });
}else{
Object.assign(item,{viewparams:this.viewparams});
if(item.syspermission){
Object.assign(this.context,{syspermission:item.syspermission});
}
let response = await this.service.add(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
}
} }
promises.push(this.service.add(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator)); } catch (error) {
errorItems.push(JSON.parse(JSON.stringify(item)));
errorMessage.push(error);
} }
}); }
Promise.all(promises).then((response: any) => { this.$emit('save', successItems);
this.$emit('save', response); this.refresh([]);
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' }); this.$Notice.success({ title: '', desc: '保存成功!' });
this.refresh([]); }else{
}).catch((response: any) => { errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' });
}); console.error(errorMessage[index]);
});
}
return successItems;
} }
......
...@@ -2089,6 +2089,11 @@ async-validator@^1.10.0: ...@@ -2089,6 +2089,11 @@ async-validator@^1.10.0:
resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-1.12.2.tgz#beae671e7174d2938b7b4b69d2fb7e722b7fd72c" resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-1.12.2.tgz#beae671e7174d2938b7b4b69d2fb7e722b7fd72c"
integrity sha512-57EETfCPFiB7M4QscvQzWSGNsmtkjjzZv318SK1CBlstk+hycV72ocjriMOOM48HjvmoAoJGpJNjC7Z76RlnZA== integrity sha512-57EETfCPFiB7M4QscvQzWSGNsmtkjjzZv318SK1CBlstk+hycV72ocjriMOOM48HjvmoAoJGpJNjC7Z76RlnZA==
async-validator@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-3.3.0.tgz#1d92193bbe60d6d6c8b246692c7005e9ed14a8ee"
integrity sha512-cAHGD9EL8aCqWXjnb44q94MWiDFzUo1tMhvLb2WzcpWqGiKugsjWG9cvl+jPgkPca7asNbsBU3fa0cwkI/P+Xg==
async-validator@~1.8.1: async-validator@~1.8.1:
version "1.8.5" version "1.8.5"
resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-1.8.5.tgz#dc3e08ec1fd0dddb67e60842f02c0cd1cec6d7f0" resolved "https://registry.yarnpkg.com/async-validator/-/async-validator-1.8.5.tgz#dc3e08ec1fd0dddb67e60842f02c0cd1cec6d7f0"
...@@ -5233,10 +5238,10 @@ human-signals@^1.1.1: ...@@ -5233,10 +5238,10 @@ human-signals@^1.1.1:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
ibiz-gantt-elastic@^1.0.13: ibiz-gantt-elastic@^1.0.15:
version "1.0.13" version "1.0.15"
resolved "https://registry.yarnpkg.com/ibiz-gantt-elastic/-/ibiz-gantt-elastic-1.0.13.tgz#420751337f7d4352df7f351a72ba0e13551bdf23" resolved "https://registry.yarnpkg.com/ibiz-gantt-elastic/-/ibiz-gantt-elastic-1.0.15.tgz#e57736254aaf5baea28225bce2d29d8bd8adcc2d"
integrity sha512-floFaw93UNo9y/9BAExApvz8ATuUuxv2bOUOUbj9jvqY5WkWFKo4C9Bmu4779M5foTHy6SGWItNgZnvbm8i0QQ== integrity sha512-V3uLoN3BN32BagpV1kLm4nFSs4neJ/Cnykd7OIyLv11rjqTWFAENHBpZekioPFF4k2iCyAdRr5smzZbGJdSQxg==
dependencies: dependencies:
dayjs "^1.8.16" dayjs "^1.8.16"
resize-observer-polyfill "^1.5.1" resize-observer-polyfill "^1.5.1"
...@@ -5244,10 +5249,10 @@ ibiz-gantt-elastic@^1.0.13: ...@@ -5244,10 +5249,10 @@ ibiz-gantt-elastic@^1.0.13:
vue-slider-component "^3.0.40" vue-slider-component "^3.0.40"
vue-switches "^2.0.1" vue-switches "^2.0.1"
ibiz-vue-lib@^0.1.7: ibiz-vue-lib@^0.1.9:
version "0.1.7" version "0.1.9"
resolved "https://registry.yarnpkg.com/ibiz-vue-lib/-/ibiz-vue-lib-0.1.7.tgz#33d51fd08f9e527b5576910c7314f6803714ff37" resolved "https://registry.yarnpkg.com/ibiz-vue-lib/-/ibiz-vue-lib-0.1.9.tgz#d7088deb5577af3095887ca897c1710bae174682"
integrity sha512-EFreVH9JOVSyIZY/1ZRrIYYlfBWCEZnDKeAs1339SZa1IhaJ06kzpwziOENc4vzGBDh+ps11LJLAWrIjUEjVLQ== integrity sha512-CotV3xIB04+QUUeMlfsVj5BseVPQ+IHyKdwU+MXGh+2e91Nt7N/z/LElakhAiGkSpaaKoMdlKCOdhD0qqJ3wNQ==
dependencies: dependencies:
axios "^0.19.2" axios "^0.19.2"
core-js "^3.6.4" core-js "^3.6.4"
...@@ -9103,6 +9108,11 @@ sort-keys@^1.0.0: ...@@ -9103,6 +9108,11 @@ sort-keys@^1.0.0:
dependencies: dependencies:
is-plain-obj "^1.0.0" is-plain-obj "^1.0.0"
sortablejs@^1.10.1:
version "1.10.2"
resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.10.2.tgz#6e40364d913f98b85a14f6678f92b5c1221f5290"
integrity sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A==
source-list-map@^2.0.0: source-list-map@^2.0.0:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
...@@ -10225,6 +10235,13 @@ vue@^2.2.6, vue@^2.6.10, vue@^2.6.11: ...@@ -10225,6 +10235,13 @@ vue@^2.2.6, vue@^2.6.10, vue@^2.6.11:
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5" resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ== integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==
vuedraggable@^2.23.2:
version "2.23.2"
resolved "https://registry.yarnpkg.com/vuedraggable/-/vuedraggable-2.23.2.tgz#0d95d7fdf4f02f56755a26b3c9dca5c7ca9cfa72"
integrity sha512-PgHCjUpxEAEZJq36ys49HfQmXglattf/7ofOzUrW2/rRdG7tu6fK84ir14t1jYv4kdXewTEa2ieKEAhhEMdwkQ==
dependencies:
sortablejs "^1.10.1"
vuex@^3.1.2: vuex@^3.1.2:
version "3.1.2" version "3.1.2"
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.1.2.tgz#a2863f4005aa73f2587e55c3fadf3f01f69c7d4d" resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.1.2.tgz#a2863f4005aa73f2587e55c3fadf3f01f69c7d4d"
......
...@@ -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 ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_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:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ ...@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBZ_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:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册