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

ibiz4j 发布系统代码

上级 9be72955
## v7.0.0-alpha.12 [2020-7-2]
### Bug修复
修复mpicker解析调整
修复表格列class逻辑调整
修复面板标签,隐藏表单项
修复嵌入视图导航服务逻辑调整
修复选择多数据视图选择数据异常
修复多行输入十行 高度问题
### 功能新增及优化
#### 模板
新增表单显示更多模式(658)
新增首页应用切换器(658)
新增状态向导面板(658)
优化门户操作栏
优化应用级数据状态同步功能
#### 基础文件
新增修改密码功能(654)
## v7.0.0-alpha.11 [2020-6-21] ## v7.0.0-alpha.11 [2020-6-21]
### Bug修复 ### Bug修复
......
...@@ -76,6 +76,7 @@ import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vu ...@@ -76,6 +76,7 @@ import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vu
import AppOrgSelect from './components/app-org-select/app-org-select.vue' import AppOrgSelect from './components/app-org-select/app-org-select.vue'
import AppDepartmentSelect from './components/app-department-select/app-department-select.vue' import AppDepartmentSelect from './components/app-department-select/app-department-select.vue'
import AppGroupSelect from './components/app-group-select/app-group-select.vue' import AppGroupSelect from './components/app-group-select/app-group-select.vue'
import UpdatePwd from './components/app-update-password/app-update-password.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载功能服务注册中心 // 全局挂载功能服务注册中心
...@@ -163,5 +164,6 @@ export const AppComponents = { ...@@ -163,5 +164,6 @@ export const AppComponents = {
v.component('app-breadcrumb',Breadcrumb); v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer); v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag); v.component('context-menu-drag',ContextMenuDrag);
v.component('app-update-password',UpdatePwd);
}, },
}; };
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="app-actionbar"> <div class="app-actionbar">
<div class="app-actionbar-item" v-for="(item,index) in items" :key="index"> <div class="app-actionbar-item" v-for="(item,index) in items" :key="index">
<Badge v-if="item.counterService&&item.counterService.counterData" :count="item.counterService.counterData[item.counterId]" type="primary"> <Badge v-if="item.counterService&&item.counterService.counterData" :count="item.counterService.counterData[item.counterId]" type="primary">
<i-button @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button> <i-button @click="handleClick(item.viewlogicname)"><i v-if="item.icon" style="margin-right: 5px;" :class="item.icon"></i>{{item.actionName}}</i-button>
</Badge> </Badge>
<i-button v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button> <i-button v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
</div> </div>
......
<template> <template>
<div class="app-department-select"> <div class="app-department-select">
<ibiz-select-tree :NodesData="Nodesdata" v-model="selectTreeValue" :multiple="multiple" @select="onSelect"></ibiz-select-tree> <ibiz-select-tree :NodesData="Nodesdata" v-model="selectTreeValue" :disabled="disabled" :multiple="multiple" @select="onSelect"></ibiz-select-tree>
</div> </div>
</template> </template>
...@@ -42,6 +42,14 @@ export default class AppDepartmentSelect extends Vue { ...@@ -42,6 +42,14 @@ export default class AppDepartmentSelect extends Vue {
*/ */
@Prop({default:false}) public multiple?: any; @Prop({default:false}) public multiple?: any;
/**
* 是否禁用
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop({default:false}) public disabled?: boolean;
/** /**
* 表单数据 * 表单数据
* *
......
<template> <template>
<div class="app-org-select"> <div class="app-org-select">
<ibiz-select-tree :NodesData="NodesData" v-model="selectTreeValue" :multiple="multiple" @select="treeSelectChange"></ibiz-select-tree> <ibiz-select-tree :NodesData="NodesData" v-model="selectTreeValue" :disabled="disabled" :multiple="multiple" @select="treeSelectChange"></ibiz-select-tree>
</div> </div>
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
...@@ -44,6 +44,14 @@ export default class AppOrgSelect extends Vue { ...@@ -44,6 +44,14 @@ export default class AppOrgSelect extends Vue {
*/ */
@Prop({default:false}) public multiple?:boolean; @Prop({default:false}) public multiple?:boolean;
/**
* 是否禁用
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop({default:false}) public disabled?: boolean;
/** /**
* 查询单位路径 * 查询单位路径
* *
......
.update-password{
.password-item{
margin-top:10px;
padding:0 10px 0 10px;
.ivu-btn{
margin-top:15px;
}
}
.password-btn{
margin-top: 42px;
}
}
\ No newline at end of file
<template>
<div class="update-password">
<div class="password-item">
<label for>
原密码:
<Input type="password" v-model="oldPwd" @on-blur="oldPwdVaild"/>
</label>
</div>
<div class="password-item">
<label for>
新密码:
<Input type="password" v-model="newPwd" @on-blur="newPwdVaild"/>
</label>
</div>
<div class="password-item">
<label for>
确认密码:
<Input type="password" v-model="confirmPwd" :disabled="!this.newPwd" @on-blur="confirmVaild" />
</label>
</div>
<div class="password-item password-btn">
<Button type="primary" long :disabled="!oldPwd || !newPwd || !confirmPwd || disUpdate" @click="updatePwd">确认修改</Button>
</div>
</div>
</template>
<script lang = 'ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
import { Subject } from "rxjs";
import { AppModal } from "@/utils";
import EntityService from '@/service/entity-service';
@Component({})
export default class AppUpdatePassword extends Vue {
/**
* 原密码
*
* @public
* @memberof AppUpdatePassword
*/
public oldPwd: string = "";
/**
* 新密码
*
* @public
* @memberof AppUpdatePassword
*/
public newPwd: string = "";
/**
* 确认密码
*
* @public
* @memberof AppUpdatePassword
*/
public confirmPwd: string = "";
/**
* 是否能禁用确认修改
*
* @public
* @memberof AppUpdatePassword
*/
public disUpdate:boolean = true;
/**
* 校验输入的原密码是否为空
*
* @public
* @memberof AppUpdatePassword
*/
public oldPwdVaild(){
if(!this.oldPwd){
this.$Notice.error({
title:'原密码不能为空!',
duration: 3
});
}
}
/**
* 校验输入的新密码是否为空
*
* @public
* @memberof AppUpdatePassword
*/
public newPwdVaild(){
if(!this.newPwd){
this.$Notice.error({
title:'新密码不能为空!',
duration: 3
});
}
}
/**
* 校验确认密码与新密码是否一致
*
* @public
* @memberof AppUpdatePassword
*/
public confirmVaild() {
if (this.newPwd && this.confirmPwd) {
if (this.confirmPwd !== this.newPwd) {
this.$Notice.error({
title:'两次输入密码不一致!',
duration: 3
});
}else{
this.disUpdate=false;
}
}
}
/**
* 实体服务对象
*
* @protected
* @type {EntityService}
* @memberof AppUpdatePassword
*/
protected entityService: EntityService = new EntityService();
/**
* 修改密码
*
* @public
* @memberof AppUpdatePassword
*/
public updatePwd(){
const post: Promise<any> = this.entityService.changPassword(null,{oldPwd:this.oldPwd,newPwd:this.newPwd});
post.then((response:any) =>{
if (response && response.status === 200) {
this.$emit("close");
}
}).catch((error: any) =>{
this.$Notice.error({
title:'系统异常',
duration: 3
});
console.error(error);
})
}
}
</script>
<style lang="less">
@import './app-update-password.less';
</style>
\ No newline at end of file
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
&nbsp;&nbsp;<avatar :src="user.avatar" /> &nbsp;&nbsp;<avatar :src="user.avatar" />
</div> </div>
<dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'> <dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'>
<dropdown-item name='updatepwd' style='font-size: 15px !important;'>
<span><Icon type="ios-create-outline" style='margin-right: 8px;'/></span>
<span>{{$t('components.appUser.changepwd')}}</span>
</dropdown-item>
<dropdown-item name='logout' style='font-size: 15px !important;'> <dropdown-item name='logout' style='font-size: 15px !important;'>
<span><i aria-hidden='true' class='ivu-icon ivu-icon-md-power' style='margin-right: 8px;'></i></span> <span><i aria-hidden='true' class='ivu-icon ivu-icon-md-power' style='margin-right: 8px;'></i></span>
<span>{{$t('components.appUser.logout')}}</span> <span>{{$t('components.appUser.logout')}}</span>
...@@ -16,7 +20,7 @@ ...@@ -16,7 +20,7 @@
</template> </template>
<script lang = 'ts'> <script lang = 'ts'>
import { Vue, Component } from 'vue-property-decorator'; import { Vue, Component } from 'vue-property-decorator';
import { Subject } from 'rxjs';
@Component({ @Component({
}) })
export default class AppUser extends Vue { export default class AppUser extends Vue {
...@@ -46,6 +50,13 @@ export default class AppUser extends Vue { ...@@ -46,6 +50,13 @@ export default class AppUser extends Vue {
this.logout(); this.logout();
} }
}); });
}else if (Object.is(data, 'updatepwd')) {
let container: Subject<any> = this.$appmodal.openModal({ viewname: 'app-update-password', title: "修改密码", width: 500, height: 400, }, {}, {});
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
});
} }
} }
......
...@@ -89,7 +89,6 @@ export default class FilterTree extends Vue { ...@@ -89,7 +89,6 @@ export default class FilterTree extends Vue {
}; };
if(this.datas.length == 0) { if(this.datas.length == 0) {
this.onAddItem(root); this.onAddItem(root);
this.onAddItem(root);
} }
return [root]; return [root];
} }
......
...@@ -8,4 +8,7 @@ ...@@ -8,4 +8,7 @@
.ivu-input-number-input{ .ivu-input-number-input{
text-align: right; text-align: right;
} }
.ivu-input-number-input:hover{
padding-right:22px;
}
} }
\ No newline at end of file
...@@ -157,6 +157,7 @@ export default { ...@@ -157,6 +157,7 @@ export default {
name: 'System', name: 'System',
logout: 'Logout', logout: 'Logout',
surelogout: 'Are you sure logout?', surelogout: 'Are you sure logout?',
changepwd: "Change Password",
}, },
appTheme: { appTheme: {
caption: { caption: {
......
...@@ -152,12 +152,13 @@ export default { ...@@ -152,12 +152,13 @@ export default {
placeholder: '请输入密码', placeholder: '请输入密码',
message: '密码不能为空', message: '密码不能为空',
}, },
loginfailed: '登失败', loginfailed: '登失败',
}, },
appUser: { appUser: {
name: '系统管理员', name: '系统管理员',
logout: '退出登陆', logout: '退出登录',
surelogout: '确认要退出登陆?', surelogout: '确认要退出登录?',
changepwd: "修改密码",
}, },
appTheme: { appTheme: {
caption: { caption: {
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
viewtag="task-index-view" viewtag="task-index-view"
:selectTheme="selectTheme" :selectTheme="selectTheme"
:isDefaultPage="isDefaultPage" :isDefaultPage="isDefaultPage"
:isBlankMode="isBlankMode"
:defPSAppView="defPSAppView" :defPSAppView="defPSAppView"
name="appmenu" name="appmenu"
ref='appmenu' ref='appmenu'
...@@ -626,6 +627,14 @@ export default class TaskIndexViewBase extends Vue { ...@@ -626,6 +627,14 @@ export default class TaskIndexViewBase extends Vue {
*/ */
public isDefaultPage: boolean = true; public isDefaultPage: boolean = true;
/**
* 空白视图模式
*
* @type {boolean}
* @memberof TaskIndexViewBase
*/
public isBlankMode:boolean = false;
/** /**
* 获取样式 * 获取样式
* *
......
...@@ -931,4 +931,15 @@ export default class EntityService { ...@@ -931,4 +931,15 @@ export default class EntityService {
return Http.getInstance().put(`uaa/access-center/app-switcher/default`,data,isloading); return Http.getInstance().put(`uaa/access-center/app-switcher/default`,data,isloading);
} }
/**
* 修改密码
*
* @param context
* @param data
* @param isloading
*/
public async changPassword(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().post(`v7/changepwd`,data,isloading);
}
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
export const getAppView = (state: any) => (viewtag: string) => { export const getAppView = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag)); const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) { if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`) console.warn(`获取应用视图实例,,视图「${viewtag}」不存在`)
return null; return null;
} }
return createdview; return createdview;
...@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => { ...@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => {
export const getViewDataChangeState = (state:any) => (viewtag: string) => { export const getViewDataChangeState = (state:any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag)); const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) { if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`) console.warn(`获取视图数据状态,,视图「${viewtag}」不存在`)
return false; return false;
} }
return createdview.viewdatachange; return createdview.viewdatachange;
...@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => { ...@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => {
export const getRefreshData = (state: any) => (viewtag: string) => { export const getRefreshData = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag)); const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) { if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`) console.warn(`获取数据刷新状态,视图「${viewtag}」不存在`)
return null; return null;
} }
return createdview.refreshdata; return createdview.refreshdata;
......
...@@ -6,15 +6,10 @@ ...@@ -6,15 +6,10 @@
* @param param1 * @param param1
*/ */
export const createdView = (state: any, { viewtag, secondtag }: { viewtag: string, secondtag: string }) => { export const createdView = (state: any, { viewtag, secondtag }: { viewtag: string, secondtag: string }) => {
// 该视图是否被创建
// const index = state.createdviews.findIndex((view: any) => Object.is(view.secondtag, viewtag));
// if (index !== -1) {
// return;
// }
// 原始数据中是否存在 // 原始数据中是否存在
const appview = state.appviews.find((appview: any) => Object.is(appview.viewtag, viewtag)); const appview = state.appviews.find((appview: any) => Object.is(appview.viewtag, viewtag));
if (!appview) { if (!appview) {
console.log(`----视图标识 ${viewtag} 不存在-----`) console.warn(`视图「${viewtag}」原始数据不存在`);
return; return;
} }
const _appview: any = JSON.parse(JSON.stringify(appview)); const _appview: any = JSON.parse(JSON.stringify(appview));
...@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => { ...@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => {
export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { viewtag: string, viewdatachange: boolean }) => { export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { viewtag: string, viewdatachange: boolean }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag)); const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) { if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`) console.warn(`设置数据状态变更,视图「${viewtag}」不存在`)
return; return;
} }
createdview.viewdatachange = viewdatachange; createdview.viewdatachange = viewdatachange;
...@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie ...@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie
export const refreshViewData = (state: any, { viewtag }: { viewtag: string }) => { export const refreshViewData = (state: any, { viewtag }: { viewtag: string }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag)); const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) { if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`) console.warn(`刷新视图数据,视图「${viewtag}」不存在`)
return; return;
} }
createdview.refreshdata += 1; createdview.refreshdata += 1;
......
...@@ -114,6 +114,12 @@ export class Interceptors { ...@@ -114,6 +114,12 @@ export class Interceptors {
if (res.status === 401) { if (res.status === 401) {
this.doNoLogin(_data.data); this.doNoLogin(_data.data);
} }
if(res.status === 403){
if(res.data && res.data.status && Object.is(res.data.status,"FORBIDDEN")){
let alertMessage:string ="非常抱歉,您无权操作此数据,如需操作请联系管理员!";
Object.assign(res.data,{localizedMessage:alertMessage,message:alertMessage});
}
}
// if (res.status === 404) { // if (res.status === 404) {
// this.router.push({ path: '/404' }); // this.router.push({ path: '/404' });
// } else if (res.status === 500) { // } else if (res.status === 500) {
......
...@@ -323,13 +323,21 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface { ...@@ -323,13 +323,21 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface {
@Prop() mode: any; @Prop() mode: any;
/** /**
* 当前菜单是否在默认视图上 * 应用起始页面
* *
* @type {*} * @type {boolean}
* @memberof TaskIndexViewBase * @memberof TaskIndexViewBase
*/ */
@Prop({ default: false }) isDefaultPage?: boolean; @Prop({ default: false }) isDefaultPage?: boolean;
/**
* 空白视图模式
*
* @type {boolean}
* @memberof TaskIndexViewBase
*/
@Prop({ default: false }) isBlankMode?:boolean;
/** /**
* 默认打开视图 * 默认打开视图
* *
...@@ -441,7 +449,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface { ...@@ -441,7 +449,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface {
* @memberof TaskIndexViewBase * @memberof TaskIndexViewBase
*/ */
public doMenuSelect(): void { public doMenuSelect(): void {
if (!this.isDefaultPage) { if (!this.isDefaultPage || this.isBlankMode) {
return; return;
} }
const appFuncs: any[] = this.menuMode.getAppFuncs(); const appFuncs: any[] = this.menuMode.getAppFuncs();
...@@ -485,7 +493,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface { ...@@ -485,7 +493,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface {
public computeMenuSelect(items: any[], appfunctag: string): boolean { public computeMenuSelect(items: any[], appfunctag: string): boolean {
const appFuncs: any[] = this.menuMode.getAppFuncs(); const appFuncs: any[] = this.menuMode.getAppFuncs();
return items.some((item: any) => { return items.some((item: any) => {
if (Object.is(appfunctag, '') && !Object.is(item.appfunctag, '')) { if (Object.is(appfunctag, '') && !Object.is(item.appfunctag, '') && item.opendefault) {
const appfunc = appFuncs.find((_appfunc: any) => Object.is(_appfunc.appfunctag, item.appfunctag)); const appfunc = appFuncs.find((_appfunc: any) => Object.is(_appfunc.appfunctag, item.appfunctag));
if (appfunc.routepath) { if (appfunc.routepath) {
this.defaultActive = item.name; this.defaultActive = item.name;
...@@ -493,7 +501,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface { ...@@ -493,7 +501,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface {
return true; return true;
} }
} }
if (Object.is(item.appfunctag, appfunctag)) { if (Object.is(item.appfunctag, appfunctag) && item.opendefault) {
this.setHideSideBar(item); this.setHideSideBar(item);
this.defaultActive = item.name; this.defaultActive = item.name;
return true; return true;
......
...@@ -129,6 +129,7 @@ import MainService from './main-form-service'; ...@@ -129,6 +129,7 @@ import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail'; import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
@Component({ @Component({
...@@ -990,7 +991,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -990,7 +991,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal } * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof MainBase * @memberof MainBase
*/ */
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { public async formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }){
...@@ -1016,6 +1017,25 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1016,6 +1017,25 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
* 表单项检查逻辑
*
* @public
* @param name 属性名
* @memberof MainBase
*/
public checkItem(name:string):Promise<any> {
return new Promise((resolve, reject) => {
var validator = new schema({[name]:this.rules[name]});
validator.validate({[name]:this.data[name]}).then(()=>{
resolve(true);
})
.catch(() => {
resolve(false);
});;
})
} }
/** /**
......
...@@ -85,6 +85,7 @@ import MainService from './main-form-service'; ...@@ -85,6 +85,7 @@ import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail'; import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
@Component({ @Component({
...@@ -841,7 +842,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -841,7 +842,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal } * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof MainBase * @memberof MainBase
*/ */
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { public async formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }){
...@@ -862,6 +863,25 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -862,6 +863,25 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
* 表单项检查逻辑
*
* @public
* @param name 属性名
* @memberof MainBase
*/
public checkItem(name:string):Promise<any> {
return new Promise((resolve, reject) => {
var validator = new schema({[name]:this.rules[name]});
validator.validate({[name]:this.data[name]}).then(()=>{
resolve(true);
})
.catch(() => {
resolve(false);
});;
})
} }
/** /**
......
...@@ -60,6 +60,7 @@ import MainService from './main-form-service'; ...@@ -60,6 +60,7 @@ import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail'; import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
@Component({ @Component({
...@@ -690,7 +691,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -690,7 +691,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal } * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof MainBase * @memberof MainBase
*/ */
public formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void { public async formLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }){
...@@ -705,6 +706,25 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -705,6 +706,25 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
* 表单项检查逻辑
*
* @public
* @param name 属性名
* @memberof MainBase
*/
public checkItem(name:string):Promise<any> {
return new Promise((resolve, reject) => {
var validator = new schema({[name]:this.rules[name]});
validator.validate({[name]:this.data[name]}).then(()=>{
resolve(true);
})
.catch(() => {
resolve(false);
});;
})
} }
/** /**
......
此差异已折叠。
...@@ -27,6 +27,10 @@ zuul: ...@@ -27,6 +27,10 @@ zuul:
path: /v7/login path: /v7/login
serviceId: ibzuaa-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ibzuaa-api
stripPrefix: false
uaa: uaa:
path: /uaa/** path: /uaa/**
serviceId: ibzuaa-api serviceId: ibzuaa-api
......
...@@ -8,6 +8,10 @@ zuul: ...@@ -8,6 +8,10 @@ zuul:
path: /v7/login path: /v7/login
serviceId: ibzuaa-api serviceId: ibzuaa-api
stripPrefix: false stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ibzuaa-api
stripPrefix: false
uaa: uaa:
path: /uaa/** path: /uaa/**
serviceId: ibzuaa-api serviceId: ibzuaa-api
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册