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

ibiz4j 发布系统代码

上级 c7a3d7b8
## v7.0.0-alpha.12 [2020-7-2]
### Bug修复
修复mpicker解析调整
修复表格列class逻辑调整
修复面板标签,隐藏表单项
修复嵌入视图导航服务逻辑调整
修复选择多数据视图选择数据异常
修复多行输入十行 高度问题
### 功能新增及优化
#### 模板
新增表单显示更多模式(658)
新增首页应用切换器(658)
新增状态向导面板(658)
优化门户操作栏
优化应用级数据状态同步功能
#### 基础文件
新增修改密码功能(654)
## v7.0.0-alpha.11 [2020-6-21]
### Bug修复
......
......@@ -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 AppDepartmentSelect from './components/app-department-select/app-department-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实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载功能服务注册中心
......@@ -163,5 +164,6 @@ export const AppComponents = {
v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag);
v.component('app-update-password',UpdatePwd);
},
};
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div class="app-actionbar">
<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">
<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>
<i-button v-else @click="handleClick(item.viewlogicname)">{{item.actionName}}</i-button>
</div>
......
<template>
<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>
</template>
......@@ -42,6 +42,14 @@ export default class AppDepartmentSelect extends Vue {
*/
@Prop({default:false}) public multiple?: any;
/**
* 是否禁用
*
* @type {*}
* @memberof AppDepartmentSelect
*/
@Prop({default:false}) public disabled?: boolean;
/**
* 表单数据
*
......
<template>
<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>
</template>
<script lang = 'ts'>
......@@ -44,6 +44,14 @@ export default class AppOrgSelect extends Vue {
*/
@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 @@
&nbsp;&nbsp;<avatar :src="user.avatar" />
</div>
<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;'>
<span><i aria-hidden='true' class='ivu-icon ivu-icon-md-power' style='margin-right: 8px;'></i></span>
<span>{{$t('components.appUser.logout')}}</span>
......@@ -16,7 +20,7 @@
</template>
<script lang = 'ts'>
import { Vue, Component } from 'vue-property-decorator';
import { Subject } from 'rxjs';
@Component({
})
export default class AppUser extends Vue {
......@@ -46,6 +50,13 @@ export default class AppUser extends Vue {
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 {
};
if(this.datas.length == 0) {
this.onAddItem(root);
this.onAddItem(root);
}
return [root];
}
......
......@@ -8,4 +8,7 @@
.ivu-input-number-input{
text-align: right;
}
.ivu-input-number-input:hover{
padding-right:22px;
}
}
\ No newline at end of file
......@@ -157,6 +157,7 @@ export default {
name: 'System',
logout: 'Logout',
surelogout: 'Are you sure logout?',
changepwd: "Change Password",
},
appTheme: {
caption: {
......
......@@ -152,12 +152,13 @@ export default {
placeholder: '请输入密码',
message: '密码不能为空',
},
loginfailed: '登失败',
loginfailed: '登失败',
},
appUser: {
name: '系统管理员',
logout: '退出登陆',
surelogout: '确认要退出登陆?',
logout: '退出登录',
surelogout: '确认要退出登录?',
changepwd: "修改密码",
},
appTheme: {
caption: {
......
......@@ -21,6 +21,7 @@
viewtag="app-index-view"
:selectTheme="selectTheme"
:isDefaultPage="isDefaultPage"
:isBlankMode="isBlankMode"
:defPSAppView="defPSAppView"
name="appmenu"
ref='appmenu'
......@@ -626,6 +627,14 @@ export default class AppIndexViewBase extends Vue {
*/
public isDefaultPage: boolean = false;
/**
* 空白视图模式
*
* @type {boolean}
* @memberof AppIndexViewBase
*/
public isBlankMode:boolean = false;
/**
* 获取样式
*
......
......@@ -931,4 +931,15 @@ export default class EntityService {
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 @@
export const getAppView = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取应用视图实例,,视图「${viewtag}」不存在`)
return null;
}
return createdview;
......@@ -20,7 +20,7 @@ export const getAppView = (state: any) => (viewtag: string) => {
export const getViewDataChangeState = (state:any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取视图数据状态,,视图「${viewtag}」不存在`)
return false;
}
return createdview.viewdatachange;
......@@ -34,7 +34,7 @@ export const getViewDataChangeState = (state:any) => (viewtag: string) => {
export const getRefreshData = (state: any) => (viewtag: string) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图 ${viewtag} 不存在-----`)
console.warn(`获取数据刷新状态,视图「${viewtag}」不存在`)
return null;
}
return createdview.refreshdata;
......
......@@ -6,15 +6,10 @@
* @param param1
*/
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));
if (!appview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`视图「${viewtag}」原始数据不存在`);
return;
}
const _appview: any = JSON.parse(JSON.stringify(appview));
......@@ -48,7 +43,7 @@ export const removeView = (state: any, viewtag: string) => {
export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { viewtag: string, viewdatachange: boolean }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`设置数据状态变更,视图「${viewtag}」不存在`)
return;
}
createdview.viewdatachange = viewdatachange;
......@@ -63,7 +58,7 @@ export const setViewDataChange = (state: any, { viewtag, viewdatachange }: { vie
export const refreshViewData = (state: any, { viewtag }: { viewtag: string }) => {
const createdview = state.createdviews.find((appview: any) => Object.is(appview.secondtag, viewtag));
if (!createdview) {
console.log(`----视图标识 ${viewtag} 不存在-----`)
console.warn(`刷新视图数据,视图「${viewtag}」不存在`)
return;
}
createdview.refreshdata += 1;
......
......@@ -114,6 +114,12 @@ export class Interceptors {
if (res.status === 401) {
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) {
// this.router.push({ path: '/404' });
// } else if (res.status === 500) {
......
......@@ -323,13 +323,21 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
@Prop() mode: any;
/**
* 当前菜单是否在默认视图上
* 应用起始页面
*
* @type {*}
* @type {boolean}
* @memberof AppIndexViewBase
*/
@Prop({ default: false }) isDefaultPage?: boolean;
/**
* 空白视图模式
*
* @type {boolean}
* @memberof AppIndexViewBase
*/
@Prop({ default: false }) isBlankMode?:boolean;
/**
* 默认打开视图
*
......
......@@ -80,6 +80,7 @@ import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
@Component({
......@@ -754,7 +755,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @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 }){
......@@ -772,6 +773,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);
});;
})
}
/**
......
......@@ -144,6 +144,7 @@ import MainService from './main-form-service';
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import schema from 'async-validator';
@Component({
......@@ -984,7 +985,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @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 }){
......@@ -1009,6 +1010,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);
});;
})
}
/**
......
此差异已折叠。
......@@ -19,6 +19,10 @@ zuul:
path: /v7/login
serviceId: ibzuaa-api
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ibzuaa-api
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ibzuaa-api
......
......@@ -8,6 +8,10 @@ zuul:
path: /v7/login
serviceId: ibzuaa-api
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ibzuaa-api
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ibzuaa-api
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册