提交 9fcd5830 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

上级 1298f941
## 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>
......
...@@ -93,6 +93,11 @@ ...@@ -93,6 +93,11 @@
<template v-if="!Object.is(layoutType, 'FLEX')"> <template v-if="!Object.is(layoutType, 'FLEX')">
<row :gutter="10"><slot></slot></row> <row :gutter="10"><slot></slot></row>
</template> </template>
<template v-if="isManageContainer">
<i-button type="primary" :icon="manageContainerStatus?'ios-repeat':'ios-more'" @click="doManageContainer">
{{manageContainerStatus?$t('components.appFormGroup.hide'):$t('components.appFormGroup.showMore')}}
</i-button>
</template>
</card> </card>
<template v-if="isShowCaption === false"> <template v-if="isShowCaption === false">
<slot></slot> <slot></slot>
...@@ -115,6 +120,22 @@ export default class AppFormGroup extends Vue { ...@@ -115,6 +120,22 @@ export default class AppFormGroup extends Vue {
*/ */
@Prop() public caption?: string; @Prop() public caption?: string;
/**
* 是否为管理容器
*
* @type {string}
* @memberof AppFormGroup
*/
@Prop({ default: false }) public isManageContainer?: boolean;
/**
* 管理容器状态
*
* @type {string}
* @memberof AppFormGroup
*/
@Prop({ default: false }) public manageContainerStatus?: boolean;
/** /**
* 内置界面样式 * 内置界面样式
* *
...@@ -244,6 +265,16 @@ export default class AppFormGroup extends Vue { ...@@ -244,6 +265,16 @@ export default class AppFormGroup extends Vue {
public doUIAction($event: any, item: any): void { public doUIAction($event: any, item: any): void {
this.$emit('groupuiactionclick', { event: $event, item: item }); this.$emit('groupuiactionclick', { event: $event, item: item });
} }
/**
* 操作管理容器
*
* @param {*} $event
* @memberof AppFormGroup
*/
public doManageContainer(){
this.$emit('managecontainerclick');
}
} }
</script> </script>
<style lang='less'> <style lang='less'>
......
...@@ -44,6 +44,11 @@ export default class AppMpicker extends Vue { ...@@ -44,6 +44,11 @@ export default class AppMpicker extends Vue {
*/ */
@Prop() curvalue?: any; @Prop() curvalue?: any;
/**
* 值项
*/
@Prop() valueitem?: any;
/** /**
* 局部上下文导航参数 * 局部上下文导航参数
* *
...@@ -144,14 +149,34 @@ export default class AppMpicker extends Vue { ...@@ -144,14 +149,34 @@ export default class AppMpicker extends Vue {
this.value = []; this.value = [];
this.selectItems = []; this.selectItems = [];
if (newVal) { if (newVal) {
this.selectItems = this.parseValue(JSON.parse(newVal)); try {
this.selectItems.forEach((item: any) => { this.selectItems = this.parseValue(JSON.parse(newVal));
this.value.push(item[this.deKeyField]); this.selectItems.forEach((item: any) => {
let index = this.items.findIndex((i) => Object.is(i[this.deKeyField], item[this.deKeyField])); this.value.push(item[this.deKeyField]);
if (index < 0) { let index = this.items.findIndex((i) => Object.is(i[this.deKeyField], item[this.deKeyField]));
this.items.push({ [this.deMajorField]: item[this.deMajorField], [this.deKeyField]: item[this.deKeyField] }); if (index < 0) {
this.items.push({ [this.deMajorField]: item[this.deMajorField], [this.deKeyField]: item[this.deKeyField] });
}
});
} catch (error) {
if(error.name === 'SyntaxError'){
let srfkeys:any = newVal.split(',');
let srfmajortexts:any = null;
if(this.valueitem && this.activeData[this.valueitem]){
srfmajortexts = this.activeData[this.valueitem].split(',');
} }
}); if(srfkeys.length && srfkeys.length > 0 && srfmajortexts.length && srfmajortexts.length > 0 && srfkeys.length == srfmajortexts.length){
srfkeys.forEach((id: any, index: number) => {
this.value.push(id);
this.selectItems.push({[this.deKeyField]: id, [this.deMajorField]: srfmajortexts[index]});
let _index = this.items.findIndex((i) => Object.is(i[this.deKeyField],id));
if (_index < 0) {
this.items.push({[this.deKeyField]: id, [this.deMajorField]: srfmajortexts[index]});
}
});
}
}
}
} }
this.$forceUpdate(); this.$forceUpdate();
} }
......
.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;
}
});
} }
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</span> </span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<span>{{ item.label }}</span> <span>{{ item.fullName ? item.fullName:item.label }}</span>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div class="bar"> <div class="bar">
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<Drawer class-name="menu-drawer" width="60" :closable="true" :mask="false" placement="left" v-model="rightDrawerVisiable"> <Drawer class-name="menu-drawer" width="60" :closable="true" :mask="false" placement="left" v-model="rightDrawerVisiable">
<div class="menuItems"> <div class="menuItems">
<div @click="skipTo(item)" class="item" v-for="(item) in list" :key="item.id"> <div @click="skipTo(item)" class="item" v-for="(item) in list" :key="item.id">
<span class="title">{{item.label}}</span> <span class="title">{{ item.fullName ? item.fullName:item.label }}</span>
<span v-if="isStar(item.id)" class="star" @click.stop="outStar(item)"> <span v-if="isStar(item.id)" class="star" @click.stop="outStar(item)">
<Icon type="ios-star" /> <Icon type="ios-star" />
</span> </span>
......
<template>
<el-select size="small" class="filter-mode" placeholder="条件逻辑" v-model="curVal" @change="onChange">
<el-option
v-for="mode in filterMode"
:key="mode.value"
:label="getLabel(mode)"
:value="mode.value"
>
</el-option>
</el-select>
</template>
<script lang="ts">
import { Vue, Component, Model } from "vue-property-decorator";
@Component({})
export default class FilterMode extends Vue {
/**
* 值属性
*
* @type {*}
* @memberof FilterMode
*/
@Model('change') readonly value: any;
get curVal() {
return this.value;
}
set curVal(val: any) {
const type: string = this.$util.typeOf(val);
val = Object.is(type, 'null') || Object.is(type, 'undefined') ? undefined : val;
this.$emit('change', val);
}
/**
* 过滤模式
*
* @type {*}
* @memberof FilterMode
*/
public filterMode: any[] = [
// { name: 'AND', value: '$and' },
// { name: 'OR', value: '$or' },
{ 'zh-CN': '等于(=)', 'en-US': 'EQ', value: '$eq' },
{ 'zh-CN': '不等于(<>)', 'en-US': 'NE', value: '$ne' },
{ 'zh-CN': '大于(>)', 'en-US': 'GT', value: '$gt' },
{ 'zh-CN': '大于等于(>=)', 'en-US': 'GE', value: '$gte' },
{ 'zh-CN': '小于(<)', 'en-US': 'LT', value: '$lt' },
{ 'zh-CN': '小于(<=)', 'en-US': 'LE', value: '$lte' },
{ 'zh-CN': '值为空(Nil)', 'en-US': 'IS_NULL', value: '$null' },
{ 'zh-CN': '值不为空(NotNil)', 'en-US': 'IS_NOT_NULL', value: '$notNull' },
{ 'zh-CN': '值在范围中(In)', 'en-US': 'IN', value: '$in' },
{ 'zh-CN': '值不在范围中(NotIn)', 'en-US': 'NOTIN', value: '$notIn' },
{ 'zh-CN': '文本包含(%)', 'en-US': 'LIKE', value: '$like' },
{ 'zh-CN': '文本左包含(%#)', 'en-US': 'LIFTLIKE', value: '$startsWith' },
{ 'zh-CN': '文本右包含(#%)', 'en-US': 'RIGHTLIKE', value: '$endsWith' },
// { 'zh-CN': '', en: 'EXISTS', value: '$exists' },
// { 'zh-CN': '', en: 'NOTEXISTS', value: '$notExists' }
];
/**
* 获取语言文本
*
* @return {string}
* @memberof FilterMode
*/
getLabel(mode: any): string {
if(this.$i18n.locale) {
return mode[this.$i18n.locale];
}
return mode['zh-CN'];
}
/**
* 值改变
*
* @memberof FilterMode
*/
public onChange() {
this.$emit('mode-change', this.value);
}
}
</script>
\ No newline at end of file
.filter-tree {
.el-tree-node__content {
height: 40px;
.filter-tree-item {
display: flex;
width: 100%;
>div {
margin-right: 10px;
}
>div:nth-last-child(1) {
margin-right: 0;
}
.filter-tree-action {
display: none;
align-items: center;
.ivu-btn {
margin-right: 5px;
}
.ivu-icon-md-close {
color: red;
font-size: 24px;
}
}
}
.filter-tree-item:hover {
.filter-tree-action {
display: flex;
}
}
}
}
\ No newline at end of file
<template>
<el-tree class="filter-tree" :data="treeItems" :expand-on-click-node="false" default-expand-all>
<template slot-scope="{ node, data }">
<template v-if="Object.is(data.label, '$and') || Object.is(data.label, '$or')">
<div class="filter-tree-item">
<el-select size="small" v-model="data.label" :disabled="data.isroot">
<el-option v-for="mode in relationModes" :key="mode.value" :label="getLabel(mode)" :value="mode.value"></el-option>
</el-select>
<div class="filter-tree-action">
<i-button title="添加条件" @click="onAddItem(data)"><i class="fa fa-plus" aria-hidden="true"></i> 添加条件</i-button>
<i-button title="添加组" @click="onAddGroup(data)"><i class="fa fa-plus" aria-hidden="true"></i> 添加组</i-button>
<icon v-if="!data.isroot" type="md-close" @click="onRemoveItem(node, data)"/>
</div>
</div>
</template>
<template v-else>
<div class="filter-tree-item">
<el-select size="small" class="filter-item-field" v-model="data.field" clearable placeholder="属性" @change="onFieldChange(data)">
<el-option
v-for="item in fields"
:key="item.prop"
:label="item.label"
:value="item.name">
</el-option>
</el-select>
<filter-mode class="filter-item-mode" v-model="data.mode"></filter-mode>
<div class="filter-item-value">
<i-input v-if="!data.field"></i-input>
<slot v-else :data="data"></slot>
</div>
<div class="filter-tree-action">
<icon type="md-close" @click="onRemoveItem(node, data)"/>
</div>
</div>
</template>
</template>
</el-tree>
</template>
<script lang="ts">
import {Vue, Component, Prop} from 'vue-property-decorator';
import FilterMode from './filter-mode.vue';
@Component({
components: {
FilterMode
}
})
export default class FilterTree extends Vue {
/**
* 数据集
*
* @type {*}
* @memberof FilterTree
*/
@Prop() datas: any;
/**
* 过滤项集合
*
* @type {*}
* @memberof FilterTree
*/
@Prop() fields: any;
/**
* 组条件集合
*
* @type {*}
* @memberof FilterTree
*/
protected relationModes: any[] = [
{ 'zh-CN': '并且', 'en-US': 'AND', value: '$and' },
{ 'zh-CN': '或', 'en-US': 'OR', value: '$or' }
];
/**
* 树数据集合
*
* @type {*}
* @memberof FilterTree
*/
get treeItems() {
let root: any = {
label: '$and',
isroot: true,
children: this.datas
};
if(this.datas.length == 0) {
this.onAddItem(root);
this.onAddItem(root);
}
return [root];
}
/**
* 获取语言文本
*
* @return {string}
* @memberof FilterTree
*/
getLabel(mode: any): string {
if(this.$i18n.locale) {
return mode[this.$i18n.locale];
}
return mode['zh-CN'];
}
/**
* 属性变化
*
* @return {*}
* @memberof FilterTree
*/
public onFieldChange(data: any) {
if(!data.mode) {
data.mode = '$eq';
}
}
/**
* 添加条件
*
* @return {*}
* @memberof FilterTree
*/
public onAddItem(data: any) {
if(data && data.children) {
data.children.push({
field: null,
mode: null
});
}
}
/**
* 添加组
*
* @return {*}
* @memberof FilterTree
*/
public onAddGroup(data: any) {
if(data && data.children) {
data.children.push({
label: '$and',
children: []
})
}
}
/**
* 删除条件/组
*
* @return {*}
* @memberof FilterTree
*/
public onRemoveItem(node: any, data: any) {
if(node && node.parent) {
let pData: any = node.parent.data;
if(pData.children.indexOf(data) >= 0) {
pData.children.splice(pData.children.indexOf(data), 1)
}
}
}
}
</script>
<style lang="less">
@import './filter-tree.less';
</style>
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:type="type" :type="type"
v-model="CurrentVal" v-model="CurrentVal"
:disabled="disabled ? true : false" :disabled="disabled ? true : false"
:autosize="autoSize" :element-id="textareaId"
@on-enter="enter" @on-enter="enter"
></i-input> ></i-input>
<div class="unit-text">{{unit}}</div> <div class="unit-text">{{unit}}</div>
...@@ -34,6 +34,20 @@ export default class InputBox extends Vue { ...@@ -34,6 +34,20 @@ export default class InputBox extends Vue {
*/ */
@Model("change") readonly itemValue?: any; @Model("change") readonly itemValue?: any;
/**
* 生命周期 (多行文本十行高度问题)
* @type {any}
* @memberof InputBox
*/
public mounted(){
if(this.textareaId){
let textarea :any= document.getElementById(this.textareaId);
if(textarea){
textarea.style=this.textareaStyle;
}
}
}
/** /**
* 单位 * 单位
* @type {String} * @type {String}
...@@ -41,6 +55,20 @@ export default class InputBox extends Vue { ...@@ -41,6 +55,20 @@ export default class InputBox extends Vue {
*/ */
@Prop() public unit?: string; @Prop() public unit?: string;
/**
* 多行文本十行 特殊参数样式(模型高度自带)
* @type {String}
* @memberof InputBoxUnit
*/
@Prop() public textareaStyle?: string;
/**
* 多行文本十行 特殊参数id(模型高度自带)
* @type {String}
* @memberof InputBoxUnit
*/
@Prop() public textareaId?: string;
/** /**
* 大小 * 大小
* @type {String} * @type {String}
......
.ibiz-page-tag { .ibiz-page-tag {
position: relative; position: relative;
margin: 8px 0;
.left{ .left{
.el-tabs__header{ .el-tabs__header{
padding-right:120px; padding-right:120px;
...@@ -60,7 +61,8 @@ ...@@ -60,7 +61,8 @@
border-bottom:2px solid transparent !important; border-bottom:2px solid transparent !important;
} }
.el-tabs__header{ .el-tabs__header{
margin:0 0 1 0; margin:0;
border-bottom: none;
} }
} }
} }
......
...@@ -395,6 +395,9 @@ export default class MDViewEngine extends ViewEngine { ...@@ -395,6 +395,9 @@ export default class MDViewEngine extends ViewEngine {
if (this.getSearchForm() && this.view.isExpandSearchForm) { if (this.getSearchForm() && this.view.isExpandSearchForm) {
Object.assign(arg, this.getSearchForm().getData()); Object.assign(arg, this.getSearchForm().getData());
} }
if (this.view && this.view.searchbar) {
Object.assign(arg, this.view.searchbar.getData());
}
if (this.view && !this.view.isExpandSearchForm) { if (this.view && !this.view.isExpandSearchForm) {
Object.assign(arg, { query: this.view.query }); Object.assign(arg, { query: this.view.query });
} }
......
...@@ -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: {
...@@ -169,4 +170,8 @@ export default { ...@@ -169,4 +170,8 @@ export default {
YouYuan: 'YouYuan', YouYuan: 'YouYuan',
}, },
}, },
appFormGroup: {
hide: 'hide',
showMore: 'show more',
},
}; };
\ No newline at end of file
...@@ -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: {
...@@ -170,4 +171,8 @@ export default { ...@@ -170,4 +171,8 @@ export default {
YouYuan: '幼圆', YouYuan: '幼圆',
}, },
}, },
appFormGroup: {
hide: '隐藏字段',
showMore: '显示更多字段',
},
}; };
\ No newline at end of file
...@@ -46,6 +46,22 @@ export class FormDetailModel { ...@@ -46,6 +46,22 @@ export class FormDetailModel {
*/ */
public visible: boolean = true; public visible: boolean = true;
/**
* 成员是否显示(旧)
*
* @type {boolean}
* @memberof FormDetailModel
*/
public oldVisible: boolean = true;
/**
* 成员是否为受控内容
*
* @type {boolean}
* @memberof FormDetailModel
*/
public isControlledContent: boolean = false;
/** /**
* 成员是否显示标题 * 成员是否显示标题
* *
...@@ -53,6 +69,7 @@ export class FormDetailModel { ...@@ -53,6 +69,7 @@ export class FormDetailModel {
* @memberof FormDetailModel * @memberof FormDetailModel
*/ */
public isShowCaption: boolean = true; public isShowCaption: boolean = true;
/** /**
* Creates an instance of FormDetailModel. * Creates an instance of FormDetailModel.
...@@ -67,7 +84,9 @@ export class FormDetailModel { ...@@ -67,7 +84,9 @@ export class FormDetailModel {
this.form = opts.form ? opts.form : {}; this.form = opts.form ? opts.form : {};
this.name = !Object.is(opts.name, '') ? opts.name : ''; this.name = !Object.is(opts.name, '') ? opts.name : '';
this.visible = opts.visible ? true : false; this.visible = opts.visible ? true : false;
this.oldVisible = opts.visible ? true : false;
this.isShowCaption = opts.isShowCaption ? true : false; this.isShowCaption = opts.isShowCaption ? true : false;
this.isControlledContent = opts.isControlledContent ? true : false;
} }
/** /**
......
...@@ -16,6 +16,30 @@ export class FormGroupPanelModel extends FormDetailModel { ...@@ -16,6 +16,30 @@ export class FormGroupPanelModel extends FormDetailModel {
* @memberof FormGroupPanelModel * @memberof FormGroupPanelModel
*/ */
public uiActionGroup: any = {}; public uiActionGroup: any = {};
/**
* 受控内容组
*
* @type {*}
* @memberof FormGroupPanelModel
*/
public showMoreModeItems: any = [];
/**
* 是否为管理容器
*
* @type {*}
* @memberof FormGroupPanelModel
*/
public isManageContainer: boolean = false;
/**
* 管理容器状态 true显示 false隐藏
*
* @type {*}
* @memberof FormGroupPanelModel
*/
public manageContainerStatus: boolean = true;
/** /**
* Creates an instance of FormGroupPanelModel. * Creates an instance of FormGroupPanelModel.
...@@ -27,5 +51,17 @@ export class FormGroupPanelModel extends FormDetailModel { ...@@ -27,5 +51,17 @@ export class FormGroupPanelModel extends FormDetailModel {
constructor(opts: any = {}) { constructor(opts: any = {}) {
super(opts); super(opts);
Object.assign(this.uiActionGroup, opts.uiActionGroup); Object.assign(this.uiActionGroup, opts.uiActionGroup);
this.showMoreModeItems = opts.showMoreModeItems;
this.isManageContainer = opts.isManageContainer ? true : false;
}
/**
* 设置管理容器状态
*
* @param {boolean} state
* @memberof FormGroupPanelModel
*/
public setManageContainerStatus(state: boolean): void {
this.manageContainerStatus = state;
} }
} }
\ No newline at end of file
import { Subject } from 'rxjs';
export interface Message {
/**
* 名称(通常是应用实体名称)
*
* @memberof Message
*/
name: string;
/**
* 行为(操作数据行为)
*
* @memberof Message
*/
action: string;
/**
* 数据(操作数据)
*
* @memberof Message
*/
data: any;
}
/**
* 应用中心服务类
*
* @export
* @class AppCenterService
*/
export default class AppCenterService {
/**
* Vue 状态管理器
*
* @private
* @type {*}
* @memberof AppCenterService
*/
private static store: any;
/**
* 应用数据状态管理对象
*
* @private
* @type {Subject<any>}
* @memberof AppCenterService
*/
private static subject:Subject<any> = new Subject<any>();
/**
* 单例变量声明
*
* @private
* @static
* @type {AppCenterService}
* @memberof AppCenterService
*/
private static appCenterService: AppCenterService;
/**
* 初始化实例
*
* @memberof AppCenterService
*/
constructor() {}
/**
* 获取 AppCenterService 单例对象
*
* @static
* @returns {AppCenterService}
* @memberof AppCenterService
*/
public static getInstance(store: any): AppCenterService {
if (!AppCenterService.appCenterService) {
AppCenterService.appCenterService = new AppCenterService();
}
this.store = store;
return this.appCenterService;
}
/**
* 通知消息
*
* @static
* @memberof AppCenterService
*/
public static notifyMessage(message:Message){
this.subject.next(message);
}
/**
* 获取消息中心
*
* @static
* @memberof AppCenterService
*/
public static getMessageCenter():Subject<any>{
return this.subject;
}
}
\ No newline at end of file
...@@ -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
...@@ -44,9 +44,11 @@ export const getAuthMenu = (state: any) => (menu:any) =>{ ...@@ -44,9 +44,11 @@ export const getAuthMenu = (state: any) => (menu:any) =>{
resourceIndex= state.resourceData.findIndex((resourcetag: any, objIndex: any, objs: any) => { resourceIndex= state.resourceData.findIndex((resourcetag: any, objIndex: any, objs: any) => {
return Object.is(menu.resourcetag, resourcetag); return Object.is(menu.resourcetag, resourcetag);
}) })
menuIndex= state.menuData.findIndex((menutag: any, objIndex: any, objs: any) => {
return Object.is(menu.authtag, menutag);
})
return (resourceIndex !== -1 || menuIndex !== -1)?true:false;
}else{
return true;
} }
menuIndex= state.menuData.findIndex((menutag: any, objIndex: any, objs: any) => {
return Object.is(menu.authtag, menutag);
})
return (resourceIndex !== -1 || menuIndex !== -1)?true:false;
} }
\ No newline at end of file
...@@ -63,7 +63,7 @@ export class ViewTool { ...@@ -63,7 +63,7 @@ export class ViewTool {
public static buildUpRoutePath(route: Route, viewParam: any = {}, deResParameters: any[], parameters: any[], args: any[], data: any): string { public static buildUpRoutePath(route: Route, viewParam: any = {}, deResParameters: any[], parameters: any[], args: any[], data: any): string {
const indexRoutePath = this.getIndexRoutePath(route); const indexRoutePath = this.getIndexRoutePath(route);
const deResRoutePath = this.getDeResRoutePath(viewParam, deResParameters, args); const deResRoutePath = this.getDeResRoutePath(viewParam, deResParameters, args);
const deRoutePath = this.getActiveRoutePath(parameters, args, data); const deRoutePath = this.getActiveRoutePath(parameters, args, data,viewParam);
return `${indexRoutePath}${deResRoutePath}${deRoutePath}`; return `${indexRoutePath}${deResRoutePath}${deRoutePath}`;
} }
...@@ -123,7 +123,7 @@ export class ViewTool { ...@@ -123,7 +123,7 @@ export class ViewTool {
* @returns {string} * @returns {string}
* @memberof ViewTool * @memberof ViewTool
*/ */
public static getActiveRoutePath(parameters: any[], args: any[], data: any): string { public static getActiveRoutePath(parameters: any[], args: any[], data: any,viewParam: any = {}): string {
let routePath: string = ''; let routePath: string = '';
// 不存在应用实体 // 不存在应用实体
if(parameters && parameters.length >0){ if(parameters && parameters.length >0){
...@@ -137,8 +137,7 @@ export class ViewTool { ...@@ -137,8 +137,7 @@ export class ViewTool {
let [arg] = args; let [arg] = args;
arg = arg ? arg : {}; arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters; const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] && !Object.is(arg[_parameterName], '') ? const _value: any = arg[_parameterName] || viewParam[_parameterName] || null;
arg[_parameterName] : null;
routePath = `/${_pathName}/${_value}/${_pathName2}`; routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) { if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`; routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册