提交 0b0f56b7 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

## v7.0.0-alpha.19 [2020-9-13]
### Bug修复
修复表单动态隐藏和权限控制冲突问题
修复向导面板上一步去除表单校验逻辑
修复行为逻辑和附加后逻辑共同使用异常问题
修复树导航数据变化刷新当前节点问题
### 功能新增及优化
#### 模板
新增首页统一待办组件
新增实体工作流动态导航表格视图批量提交流程数据
新增菜单、工具栏、表单分组按钮、表单按钮、表格操作列单机模式支持
新增挂载外部配置文件
新增支持静态代码表样式表
新增增加树视图节点、日历项上下文菜单权限支持
新增支持表格导航、列表导航、卡片导航支持快速分组
新增部门人员选择器组件、文件上传(磁盘)组件、图片上传(磁盘)组件、动态表单组件
新增列表、数据视图回到顶部功能
新增表格分组、列表分组、数据视图分组功能
新增数据选择编辑器自填模式文本属性、值属性支持
新增附加逻辑外部逻辑支持
新增应用主题配置
优化项布局面板功能
优化列表样式
优化计数器支持
优化表格行编辑新建行追加在第一行
#### 基础文件
修复表单动态隐藏和权限控制冲突问题
修复嵌入视图组件初始化导航数据和抛值问题
修复app-format-data组件时间格式化转化异常
优化工作流审批组件
优化穿梭框组件样式
优化app-span精度逻辑
优化计数器处理逻辑
优化快速分组代码表抛值逻辑
优化debug组件和头部菜单增加开发环境配置
新增统一待办组件
新增实体工作流动态导航表格视图批量提交数据
新增菜单、工具栏、表单分组按钮、表单按钮、表格操作列单机模式支持
新增挂载外部配置文件
新增支持静态代码表样式表
新增部门人员选择器组件、文件上传(磁盘)组件、图片上传(磁盘)组件、动态表单组件
新增应用主题配置
## v7.0.0-alpha.18 [2020-8-23]
### Bug修复
......
......@@ -86,6 +86,12 @@ import AppLockScren from './components/app-lock-scren/app-lock-scren.vue'
import ActionTimeline from './components/action-timeline/action-timeline.vue'
import CronEditor from './components/cron-editor/cron-editor.vue'
import AppMessagePopover from './components/app-message-popover/app-message-popover.vue'
import AppPanelField from './components/app-panel-field/app-panel-field.vue'
import AppPanelItem from './components/app-panel-item/app-panel-item.vue'
import AppDepartmentPersonnel from './components/app-department-personnel/app-department-personnel.vue'
import DiskFileUpload from './components/disk-file-upload/disk-file-upload.vue'
import AvueCustomForm from './components/avue-custom-form/avue-custom-form.vue'
import DiskImageUpload from './components/disk-image-upload/disk-image-upload.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -111,6 +117,9 @@ export const AppComponents = {
v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool;
v.component('app-department-personnel',AppDepartmentPersonnel);
v.component('app-panel-item',AppPanelItem);
v.component('app-panel-field',AppPanelField);
v.component('app-full-scren',AppFullScren);
v.component('app-lock-scren',AppLockScren);
v.component('input-box', InputBox);
......@@ -186,5 +195,8 @@ export const AppComponents = {
v.component('action-timeline', ActionTimeline);
v.component('cron-editor', CronEditor);
v.component('app-message-popover', AppMessagePopover);
v.component('disk-file-upload', DiskFileUpload);
v.component('avue-custom-form', AvueCustomForm);
v.component('disk-image-upload', DiskImageUpload);
},
};
\ No newline at end of file
......@@ -100,39 +100,37 @@ export default class AppActionBar extends Vue {
* @memberof AppActionBar
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(Environment.enablePermissionValid){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
......
......@@ -18,4 +18,7 @@
font-family: '微软雅黑','黑体','宋体';
font-size: 16px;
}
.progress {
margin-top: -15px;
}
}
\ No newline at end of file
<template>
<div class="app-data-upload-view">
<div class="app-data-upload-view" v-loading.fullscreen="isUploading" element-loading-background="rgba(57, 57, 57, 0.2)">
<el-row style="margin-top:24px" :gutter="20">
<el-col :span="4">
<el-button type="primary" @click="handleUpLoad">{{$t('components.appDataUploadView.selectfile')}}</el-button>
......@@ -13,6 +13,7 @@
</el-col>
</el-row>
<el-divider></el-divider>
<el-progress class="progress" v-show="isUploading" :text-inside="true" :stroke-width="14" :percentage="uploadProgress"></el-progress>
<el-row style="height:480px;padding: 0px 12px;">
<div class="data-info-content" >
<template v-if="importDataArray.length >0 && isUploading === false">
......@@ -50,6 +51,7 @@ import XLSX from 'xlsx';
import CodeListService from "@service/app/codelist-service";
import EntityService from '@/service/entity-service';
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
@Component({
})
......@@ -191,6 +193,22 @@ export default class AppDataUploadView extends Vue {
* @memberof AppDataUploadView
*/
public allFieldMap:Map<string,any> = new Map();
/**
* 上传服务器数据切片数
*
* @type {number}
* @memberof AppDataUploadView
*/
public sliceUploadCnt: number = Environment.sliceUploadCnt;
/**
* 上传服务器进度条百分比
*
* @type {number}
* @memberof AppDataUploadView
*/
public uploadProgress: number = 0;
/**
* 视图参数变化
......@@ -282,10 +300,29 @@ export default class AppDataUploadView extends Vue {
this.transformData(this.importDataArray,tempDataArray);
this.hasImported = true;
this.isUploading = true;
this.uploadProgress = 0;
this.importDataArray = [];
this.sliceUploadService(tempDataArray, 0);
}
/**
* 数据切片上传
*
* @memberof AppDataUploadView
*/
public sliceUploadService(dataArray: Array<any>, cnt: number) {
if(cnt > dataArray.length) {
this.isUploading = false;
this.uploadProgress = 100;
return;
}
let sliceArray: Array<any> = [];
if(dataArray) {
sliceArray = dataArray.slice(cnt, cnt+this.sliceUploadCnt);
}
try{
this.entityService.getService(this.viewparams.serviceName).then((service:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:tempDataArray}).then((res:any) =>{
service.ImportData(this.viewdata,{name:this.importId,importData:sliceArray}).then((res:any) =>{
const result:any = res.data;
if(result && result.rst !== 0){
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -294,7 +331,8 @@ export default class AppDataUploadView extends Vue {
}
this.importSuccessData = result.data;
this.promptInfo = (this.$t('components.appDataUploadView.completed') as string);
this.isUploading = false;
this.uploadProgress = Number((cnt / dataArray.length * 100).toFixed(2));
this.sliceUploadService(dataArray, cnt + this.sliceUploadCnt);
}).catch((error:any) =>{
this.isUploading = false;
this.promptInfo = (this.$t('components.appDataUploadView.importfailed') as string);
......@@ -311,7 +349,6 @@ export default class AppDataUploadView extends Vue {
console.error(error);
};
}
/**
* 导出excel
*
......
<template>
<div class="app-debug-actions">
<div class="app-debug-actions" v-if="isShow">
<div class="actions">
<button-group vertical>
<i-button :title="$t('components.appDebugActions.button')" :type="sdc.isShowTool ? 'warning' : 'info'" ghost @click="() => sdc.showToolChange()" :icon="sdc.isShowTool ? 'ios-bug' : 'ios-bug-outline'" ></i-button>
......@@ -25,6 +25,14 @@ import { Environment } from '@/environments/environment';
})
export default class AppDebugActions extends Vue {
/**
* 是否显示
*
* @type {boolean}
* @memberof AppDebugActions
*/
public isShow:boolean = Environment.devMode;
/**
* 配置平台操作控制器
*
......
.app-department-personnel{
position: relative;
.ivu-select-selection{
position: relative;
padding: 0;
.ivu-select-selected-value{
padding-left: 15px;
font-size: 13px;
}
.ivu-tag.ivu-tag-checked{
top: 1px;
font-size: 12px;
height: 24px;
line-height: 22px;
margin: 2px 0px 2px 6px;
padding: 0 3px 0 8px;
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
.ivu-tag-text{
padding: 0 8px 0 0;
}
}
.ivu-icon.ivu-icon-ios-close{
position: absolute;
width: 10px;
line-height: 10px;
height: 10px;
top: 6px;
margin-left: 8px;
font-size: 4px;
color: #909399;
background-color: #c0c4cc;
border-radius: 50%;
}
.ivu-icon.ivu-icon-ios-close:hover{
color: #fff;
background-color: #909399;
}
.ivu-icon-ios-close:before {
position: absolute;
left: -1px;
}
}
.el-icon-search{
position: absolute;
top: 10px;
right: 27px;
color: #c0c4cc;
}
}
\ No newline at end of file
......@@ -158,38 +158,36 @@ export default class AppFormGroup extends Vue {
* @memberof AppFormGroup
*/
public calcActionItemAuthState(data:any,ActionModel:any,UIService:any){
if(Environment.enablePermissionValid){
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
for (const key in ActionModel) {
if (!ActionModel.hasOwnProperty(key)) {
return;
}
const _item = ActionModel[key];
if(_item && _item['dataaccaction'] && UIService){
let dataActionResult:any;
if(Object.is(_item['actiontarget'],"NONE")){
dataActionResult = UIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult = UIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_item.disabled = true;
}
if(dataActionResult === 1){
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_item.visabled = false;
}else{
_item.visabled = true;
_item.disabled = false;
}
}
if(dataActionResult === 1){
_item.visabled = true;
_item.disabled = false;
}
}
}
}
......
......@@ -72,10 +72,14 @@ export default class AppFormatData extends Vue {
return result;
}
} else if (this.format){
let date: any = moment(this.data);
if(!date._isValid) {
return this.data;
}
if(this.format.indexOf('%1$t') !== -1){
return moment(this.data).format("YYYY-MM-DD HH:mm:ss");
return date.format("YYYY-MM-DD HH:mm:ss");
}else{
return moment(this.data).format(this.format);
return date.format(this.format);
}
}else{
return this.data;
......
......@@ -176,7 +176,12 @@ export default class AppGroupPicker extends Vue {
*/
public loadTree() {
let orgid = this.viewParam.filtervalue;
let tempTreeUrl:string = this.treeurl.replace('${orgid}',orgid);
let tempTreeUrl: string = '';
if(this.viewParam.selectType && Object.is(this.viewParam.selectType,"dept")){
tempTreeUrl = this.treeurl.replace('{deptId}',orgid);
}else{
tempTreeUrl = this.treeurl.replace('${orgid}',orgid);
}
let get = Http.getInstance().get(tempTreeUrl, true);
get.then((response: any) => {
if(response.status === 200) {
......@@ -194,7 +199,12 @@ export default class AppGroupPicker extends Vue {
* @memberof AppGroupPicker
*/
public loadGroupData(key: string) {
let tempUrl = this.url.replace('${selected-orgid}',key);
let tempUrl: string = '';
if(this.viewParam.selectType && Object.is(this.viewParam.selectType,"dept")){
tempUrl = this.url.replace('{deptId}',key);
}else{
tempUrl = this.url.replace('${selected-orgid}',key);
}
let get = Http.getInstance().get(tempUrl, true);
get.then((response: any) => {
if(response.status === 200) {
......
.ibiz-group-select {
width: 100%;
display: flex;
border: 1px solid #DCDFE6;
height: 32px;
border-radius: 4px;
.ibiz-group-content {
flex-grow: 1;
height: 32px;
.group-item-text{
padding-left: 15px;
font-size: 13px;
}
.ibiz-group-item {
display: inline-block;
border: 1px solid #bbb;
border-radius: 5px;
font-size: 12px;
height: 24px;
line-height: 22px;
margin: 2px 0px 2px 6px;
padding: 1px 3px 0 8px;
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
.group-item-multiple{
margin: 0 8px 0 0;
}
.el-icon-close{
color: #909399;
background-color: #c0c4cc;
border-radius: 50%;
top: 0;
}
.el-icon-close:hover{
color: #fff;
background-color: #909399;
}
}
}
.ibiz-group-open {
display: flex;
text-align: center;
align-items: center;
padding: 0 5px;
}
}
.ibiz-group-select:hover {
border-color: #108cee;
}
\ No newline at end of file
<template>
<div class="ibiz-group-select">
<div class="ibiz-group-content">
<span v-if="!multiple">
<span class="group-item-text" v-if="!multiple">
{{ selectName }}
</span>
<template v-else v-for="(select, index) of selects">
<div :key="index" class="ibiz-group-item">
{{ select.label }}
<span class="group-item-multiple">{{ select.label }}</span>
<i v-if="!disabled" class="el-icon-close" @click="remove(select)"></i>
</div>
</template>
</div>
<div v-if="!disabled" class="ibiz-group-open">
<i v-if="!disabled && !multiple && selects.length > 0" class="el-icon-close" @click="remove(selects[0])"></i>
<i class="el-icon-search" @click="openView"></i>
<i class="el-icon-search" @click="openView" style="color: #c0c4cc;"></i>
</div>
</div>
</template>
......@@ -147,9 +147,7 @@ export default class AppGroupSelect extends Vue {
if (newVal) {
let item: any = {};
item.label = this.data[this.name]?this.data[this.name].split(','):[];
if(this.valueitem) {
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
}
item.id = this.data[this.valueitem] ? this.data[this.valueitem].split(',') : [];
if(this.fillmap) {
for(let key in this.fillmap) {
item[this.fillmap[key]] = this.data[key] ? this.data[key].split(',') : [];
......@@ -219,7 +217,7 @@ export default class AppGroupSelect extends Vue {
treeurl:this.treeurl,
filtervalue: filtervalue,
multiple: this.multiple,
selects: this.selects
selects: this.selects,
});
let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => {
......@@ -330,32 +328,5 @@ export default class AppGroupSelect extends Vue {
</script>
<style lang="less">
.ibiz-group-select {
width: 100%;
display: flex;
border: 1px solid #DCDFE6;
min-height: 32px;
border-radius: 4px;
.ibiz-group-content {
flex-grow: 1;
padding: 0 16px;
.ibiz-group-item {
display: inline-block;
border: 1px solid #bbb;
line-height: 24px;
border-radius: 5px;
margin-right: 5px;
padding: 0 5px;
}
}
.ibiz-group-open {
display: flex;
text-align: center;
align-items: center;
padding: 0 5px;
}
}
.ibiz-group-select:hover {
border-color: #108cee;
}
@import './app-group-select.less';
</style>
\ No newline at end of file
<template>
<div class="app-header-menus">
<div class="app-header-menus" v-if="isShow">
<div v-for="(menu,index) in menus" :key="index" class="app-header-menu-item text" @click="openWindow(menu)">
<div class="app-header-menu-item-icon">
<i :class="menu.iconcls" :aria-hidden="true" />
......@@ -19,6 +19,14 @@ import { Environment } from '@/environments/environment';
})
export default class AppHeaderMenus extends Vue {
/**
* 是否显示
*
* @type {boolean}
* @memberof AppHeaderMenus
*/
public isShow:boolean = Environment.devMode;
/**
* 菜单数据
*
......@@ -41,7 +49,7 @@ export default class AppHeaderMenus extends Vue {
{
name: "ibizstudio",
title: "components.appHeaderMenus.ibizstudio.title",
url: `${Environment.StudioUrl}?#/common_slnindex/srfkeys=${Environment.SlnId}/sysdesign_psdevslnsysmodeltreeexpview`,
url: `${Environment.StudioUrl}?#/common_mosindex/srfkeys=${Environment.SysId}`,
iconcls: 'fa fa-wrench',
},
{
......
.item {
height: 24px;
line-height: 24px;
padding: 0 5px 0 0;
}
.show-more {
......
......@@ -18,7 +18,7 @@
</el-col>
<el-col :span="21" class="column2" :draggable="false">
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<el-col :span="16" :draggable="false" style="width: 65%;">
<div class="process-definition-name" :draggable="false"><strong>{{myTask.processDefinitionName}}</strong></div>
<div class="description" :draggable="false">{{myTask.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myTask.createTime, 'MM-DD hh:mm') }}</div>
......@@ -26,7 +26,7 @@
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myTask.name.indexOf('驳回')!=-1?'danger':(myTask.name.indexOf('成功')!=-1?'success':(myTask.name.indexOf('取消')!=-1?'info':'-'))"
size="small" @click="handleTag(myTask)"
style="cursor: pointer;" :draggable="false">
style="cursor: pointer;overflow: hidden;text-overflow: ellipsis;" :draggable="false">
{{myTask.name}}
</el-tag>
</el-col>
......@@ -52,7 +52,7 @@
</el-col>
<el-col :span="21" class="column2" :draggable="false">
<el-row :draggable="false">
<el-col :span="16" :draggable="false">
<el-col :span="16" :draggable="false" style="width: 65%;">
<div class="process-definition-name" :draggable="false"><strong>{{myMsg.processDefinitionName}}</strong></div>
<div class="description" :draggable="false">{{myMsg.description}}</div>
<div class="createtime" :draggable="false">{{ formatDate(myMsg.createTime, 'MM-DD hh:mm') }}</div>
......@@ -60,7 +60,7 @@
<el-col :span="5" :draggable="false" style='display: flex; align-items: center'>
<el-tag :type="myMsg.name.indexOf('驳回')!=-1?'danger':(myMsg.name.indexOf('成功')!=-1?'success':(myMsg.name.indexOf('取消')!=-1?'info':'-'))"
size="small" @click="handleTag(myMsg)"
style="cursor: pointer;" :draggable="false">
style="cursor: pointer;overflow: hidden;text-overflow: ellipsis;" :draggable="false">
{{myMsg.name}}
</el-tag>
</el-col>
......@@ -149,7 +149,7 @@
this.getMyMsgs();
}
}).catch((error: any) => {
this.$Notice.error({title: '错误', desc: error});
console.warn("加载数据错误");
})
}
......
.app-panel-field {
height: 100%;
width: 100%;
display: flex;
padding: 0 6px;
.editor{
flex-grow: 1;
.editorstyle{
.ivu-input.ivu-input-default{
border-color: red;
}
}
.errorstyle{
color:red !important;
}
}
.app-panel-field-label {
height: 34px !important;
line-height: 25px;
flex-shrink: 0;
padding: 6px 10px 6px 0px;
}
}
.app-panel-field.label-top {
flex-flow: column;
}
.app-panel-field.label-bottom{
flex-flow: column-reverse;
}
.app-panel-field.label-left {
.app-panel-field-label {
text-align: right;
}
}
.app-panel-field.label-right {
flex-flow: row-reverse;
.app-panel-field-label {
padding: 6px 0px 6px 10px;
}
}
.app-panel-field.label-none {
.app-panel-field-label {
display: none !important;
}
}
<template>
<div :class="classes">
<div v-if="Object.is(labelPos,'NONE') || !labelPos" class="editor">
<div :class="valueCheck == true ?'':'editorstyle'">
<slot ></slot>
<span :class="error ? 'errorstyle':''">{{error}}</span>
</div>
</div>
<div v-if="!Object.is(labelPos,'NONE')" class="app-panel-field-label">
<span v-if="required" style="color:red;">* </span>
{{isEmptyCaption ? '' : caption}}
</div>
<div v-if="Object.is(labelPos,'BOTTOM') || Object.is(labelPos,'TOP') || Object.is(labelPos,'LEFT') || Object.is(labelPos,'RIGHT')" class="editor">
<div :class="valueCheck == true ?'':'editorstyle'">
<slot ></slot>
<span :class="error ? 'errorstyle':''">{{error}}</span>
</div>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
@Component({})
export default class AppPanelField extends Vue {
/**
* 名称
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public caption!: string;
/**
* 错误信息
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public error?: string;
/**
* 标签位置
*
* @type {(string | 'BOTTOM' | 'LEFT' | 'NONE' | 'RIGHT' | 'TOP')}
* @memberof AppPanelField
*/
@Prop() public labelPos?:
| string
| "BOTTOM"
| "LEFT"
| "NONE"
| "RIGHT"
| "TOP";
/**
* 标签是否空白
*
* @type {boolean}
* @memberof AppPanelField
*/
@Prop() public isEmptyCaption?: boolean;
/**
* 列表项名称
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public name!: string;
/**
* 面板数据
*
* @type {any}
* @memberof AppPanelField
*/
@Prop() public data!: any;
/**
* 编辑器值
*
* @type {any}
* @memberof AppPanelField
*/
@Prop() public value !: any;
/**
* 值规则
*
* @type {string}
* @memberof AppPanelField
*/
@Prop() public itemRules!: any;
/**
* 是否必填
*
* @type {boolean}
* @memberof AppPanelField
*/
public required: boolean = false;
/**
* 值规则数组
*
* @type {any[]}
* @memberof AppPanelField
*/
public rules: any[] = [];
/**
* 值规则监控
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPanelField
*/
@Watch("itemRules", { deep: true })
onItemRulesChange(newVal: any, oldVal: any) {
if (newVal) {
try {
this.rules = [];
const _rules: any[] = newVal;
this.rules = [..._rules];
this.rules.some((rule: any) => {
if (rule.hasOwnProperty("required")) {
this.required = rule.required;
return true;
}
return false;
});
} catch (error) {}
}
}
/**
* 编辑器样式
*
* @type {boolean}
* @memberof AppPanelField
*/
public valueCheck: boolean = true;
/**
* 编辑器值监控
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AppPanelField
*/
@Watch("value")
ItemValueRules(newVal: any, oldVal: any) {
if(this.required && !newVal) {
this.valueCheck = false;
}else{
this.valueCheck = true;
}
}
/**
* 计算样式
*
* @readonly
* @type {string []}
* @memberof AppPanelField
*/
get classes(): string[] {
let posClass = "";
switch (this.labelPos) {
case "TOP":
posClass = "label-top";
break;
case "LEFT":
posClass = "label-left";
break;
case "BOTTOM":
posClass = "label-bottom";
break;
case "RIGHT":
posClass = "label-right";
break;
case "NONE":
posClass = "label-none";
break;
}
return [ "app-panel-field", posClass ];
}
/**
* vue 生命周期
*
* @memberof AppPanelField
*/
public mounted() {
if (this.itemRules) {
try {
const _rules: any[] = this.itemRules;
this.rules = [..._rules];
this.rules.some((rule: any) => {
if (rule.hasOwnProperty("required")) {
this.required = rule.required;
return true;
}
return false;
});
} catch (error) {}
}
}
}
</script>
<style lang='less'>
@import "./app-panel-field.less";
</style>
\ No newline at end of file
.app-panel-item{
.app-panel-item-rawitem{
padding-right: 10px;
}
}
\ No newline at end of file
<template>
<div class="app-panel-item">
<div v-if="Object.is(itemType,'BUTTON')" >
<Button type="primary" long @click="onClick">
<i v-if="icon" :class="icon"></i>
<span v-if="showCaption" :class="lableStyle">{{caption ? caption : ''}}</span>
</Button>
</div>
<div v-if="Object.is(itemType,'RAWITEM')">
<i v-if="icon" :class="icon"></i>
<span v-if="caption" class="app-panel-item-rawitem">{{caption}}</span>
<div :class="contentStyle">
<slot></slot>
</div>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
@Component({})
export default class AppPanelItem extends Vue {
/**
* 面板成员类型
*
* @type {string}
* @memberof AppPanelItem
*/
@Prop() public itemType!: string;
/**
* 图标
*
* @type {string}
* @memberof AppPanelItem
*/
@Prop() public icon?: string;
/**
* 标题
*
* @type {string}
* @memberof AppPanelItem
*/
@Prop() public caption?: string;
/**
* 显示标题
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public showCaption?: boolean;
/**
* 标题样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public lableStyle?: string;
/**
* 内容样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public contentStyle?: string;
/**
* 部件样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@Prop() public partsStyle?: string;
/**
* 点击按钮
*
* @param {*} $event
* @memberof AppPanelItem
*/
public onClick($event: any){
this.$emit('onClick',$event);
}
}
</script>
<style lang='less'>
@import "./app-panel-item.less";
</style>
\ No newline at end of file
......@@ -5,14 +5,14 @@
<i v-if=" item.iconcls && !Object.is(item.iconcls, '')" :class="item.iconcls"></i>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]" class="app-quick-item-counter">{{itemTag(item)}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename.toLowerCase()]" class="app-quick-item-counter">{{itemTag(item)}}</span>
</span>
<el-dropdown v-if="item.children" style="outline: none !important;" trigger="click" @command="handleCommand($event,item)">
<span :style="{color:item.color}" :class="{'app-seleted-item':isSelectedItem(item)}">
<i v-if=" item.iconcls && !Object.is(item.iconcls, '')" :class="item.iconcls"></i>
<img v-else-if="item.icon && !Object.is(item.icon, '')" :src="item.icon" />
<span class="app-quick-item-label">{{item.label}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename]" class="app-quick-item-counter">{{itemTag(item)}}</span>
<span v-show="isSelectedItem(item) && counterService && counterService.counterData && counterService.counterData[item.codename.toLowerCase()]" class="app-quick-item-counter">{{itemTag(item)}}</span>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="childitem in item.children" :command="childitem" :key="childitem.id">
......@@ -65,7 +65,6 @@ export default class AppQuickGroup extends Vue {
*/
get renderArray(){
if(this.items && this.items.length >0){
this.selectedUiItem = this.items[0];
this.handleClick(this.items[0]);
return this.handleDataSet(this.items)
}else{
......@@ -75,7 +74,7 @@ export default class AppQuickGroup extends Vue {
public itemTag(item:any){
if(this.counterService && this.counterService.counterData && item.codename){
return this.counterService.counterData[item.codename];
return this.counterService.counterData[item.codename.toLowerCase()];
}else{
return "";
}
......@@ -145,6 +144,9 @@ export default class AppQuickGroup extends Vue {
* @memberof AppQuickGroup
*/
public handleClick($event:any,isswitch:boolean = true){
if(this.selectedUiItem && (this.selectedUiItem.id === $event.id)){
return;
}
this.$emit('valuechange',$event);
if(isswitch){
this.selectedUiItem = $event;
......
......@@ -214,7 +214,8 @@ export default class AppSpan extends Vue {
this.text = Number(number.toFixed(this.precision)).toLocaleString('en-US')+ ' '+ this.unitName;
}else if(Object.is(this.dataType,"FLOAT") || Object.is(this.dataType,"DECIMAL")){
let number:any = Number(this.value);
this.text = number.toFixed(this.precision);
const decimalCnt:number = this.value.toString().split('.').length > 1 ? this.value.toString().split('.')[1].length : 0;
this.text = (Number(this.precision) === 0 && decimalCnt !== 0) ? number.toFixed(decimalCnt) : number.toFixed(this.precision);
}else {
this.text = this.value;
}
......
.app-theme{
width: auto !important;
padding: 0 5px;
/*** BRGIN:主题选择框样式 ***/
.app-app-theme {
.app-theme-color {
......
......@@ -48,6 +48,7 @@
<script lang = 'ts'>
import { Component, Vue } from 'vue-property-decorator';
import { appConfig } from '@/config/appConfig';
@Component({
})
......@@ -75,23 +76,7 @@ export default class AppTheme extends Vue {
* @type {Array<any>}
* @memberof AppTheme
*/
defaultThemes: Array<any> = [
{
tag: 'app-default-theme',
title: 'light',
color: '#f6f6f6',
},
{
title: 'Blue',
tag: 'app_theme_blue',
color: '#6ba1d1'
},
{
title: 'Dark Blue',
tag: 'app_theme_darkblue',
color: '#606d80'
}
];
defaultThemes: Array<any> = appConfig.themes;
/**
* 所选择的字体
......@@ -106,20 +91,7 @@ export default class AppTheme extends Vue {
*
* @memberof AppTheme
*/
public fontFamilys = [
{
label: 'MicrosoftYaHei',
value: 'Microsoft YaHei',
},
{
label: 'SimHei',
value: 'SimHei',
},
{
label: 'YouYuan',
value: 'YouYuan',
},
];
public fontFamilys = appConfig.fonts;
/**
* 挂载元素事件
......@@ -130,12 +102,12 @@ export default class AppTheme extends Vue {
if (localStorage.getItem('theme-class')) {
this.selectTheme = localStorage.getItem('theme-class');
} else {
this.selectTheme = 'app-default-theme';
this.selectTheme = appConfig.defaultTheme;
}
if (localStorage.getItem('font-family')) {
this.selectFont = localStorage.getItem('font-family');
} else {
this.selectFont = 'Microsoft YaHei';
this.selectFont = appConfig.defaultFont;
}
}
......@@ -146,7 +118,7 @@ export default class AppTheme extends Vue {
* @memberof AppTheme
*/
public themeChange(val: any) {
if (!Object.is(this.activeTheme, val)) {
if (!Object.is(this.selectTheme, val)) {
this.selectTheme = val;
localStorage.setItem('theme-class', val);
this.$router.app.$store.commit('setCurrentSelectTheme', val);
......
<template>
<div v-if="formOption!=null" class="app-custom-form">
<avue-form :option="formOption" v-model="formvalue"></avue-form>
</div>
</template>
<script lang="ts">
import {Vue,Component,Prop,Model,Emit,Watch,} from "vue-property-decorator";
import { Subject, Subscription } from "rxjs";
@Component({})
export default class AvueCustomForm extends Vue {
/**
* 编辑器参数传入组件配置
*
* @type {any}
* @memberof AvueCustomForm
*/
@Prop()
public options?: any;
/**
* 是否需要转换为string类型
*
* @type {boolean}
* @memberof AvueCustomForm
*/
@Prop()
public isParseString?: boolean;
/**
* 远端地址
*
* @type {string}
* @memberof AvueCustomForm
*/
@Prop() public url?: string;
/**
* 表单项值
*
* @type {any}
* @memberof AvueCustomForm
*/
@Prop() public value: any;
/**
* 是否将表单数据通过组件配置带入组件中
*
* @type {boolean}
* @memberof AvueCustomForm
*/
@Prop() public isFormData?: boolean;
/**
* 监听事件
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AvueCustomForm
*/
@Watch("value")
public onValueChange(newVal: any, oldVal: any) {
if (newVal) {
let obj: any = {};
if (newVal && newVal != null) {
if (this.isParseString) obj = JSON.parse(newVal);
else obj = newVal;
}
if (obj) this.formvalue = JSON.parse(JSON.stringify(obj));
}
}
/**
* 表单数据
*
* @type {any}
* @memberof AvueCustomForm
*/
@Prop()
public formData: any;
/**
* 表单状态
*
* @type {Subject<any>}
* @memberof AvueCustomForm
*/
@Prop() public formState!: Subject<any>;
/**
* 视图状态事件
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AvueCustomForm
*/
protected formStateEvent: Subscription | undefined;
/**
* 当前组件配置设置属性
*
* @type {any}
* @memberof AvueCustomForm
*/
public formOption: any = null;
/**
* avue-form绑定值
*
* @type {any}
* @memberof AvueCustomForm
*/
public formvalue: any = {};
/**
* avue-form默认配置
*
* @type {any}
* @memberof AvueCustomForm
*/
public defaultOptions: any = {
column: [
{
type: "dynamic",
label: "子表单",
span: 24,
display: true,
children: {
align: "center",
headerAlign: "center",
index: false,
addBtn: true,
delBtn: true,
column: [
{
type: "input",
label: "属性",
span: 24,
display: true,
prop: "property",
},
{
type: "input",
label: "值",
span: 24,
display: true,
prop: "value",
},
],
},
prop: "1599476281048_17916",
},
],
labelPosition: "left",
labelSuffix: ":",
labelWidth: 120,
gutter: 0,
menuBtn: false,
submitBtn: false,
submitText: "提交",
emptyBtn: false,
emptyText: "清空",
menuPosition: "center",
};
/**
* vue生命周期
*
* @memberof AvueCustomForm
*/
public mounted() {
let that: any = this;
if (this.formState) {
this.formStateEvent = this.formState.subscribe(({ type, data }) => {
if (Object.is("load", type)) that.load();
});
}
}
/**
* 加载表单配置,配置优先级,依次按优先级加载(表单项值 > 远端请求 > 默认值)
*
* @memberof AvueCustomForm
*/
public load() {
let that: any = this;
if (!this.options && this.options == null) {
if (this.url && this.options == null) {
const get: Promise<any> = this.$http.get(this.url);
get.then((response: any) => {
if (response && response.data && response.data.view_config) {
that.formOption = JSON.parse(response.data.view_config)[
"formConfig"
];
if (this.isFormData) that.getFormData();
}
});
} else {
this.formOption = this.defaultOptions;
if (this.isFormData) that.getFormData();
}
} else {
this.formOption = this.options;
if (this.isFormData) that.getFormData();
}
}
/**
* 当组件配置中的属性与表单属性重复时,表单值塞入组件中
*
* @memberof AvueCustomForm
*/
public getFormData() {
let that: any = this;
let obj: any;
if (this.value) obj = JSON.parse(JSON.stringify(this.value));
else obj = {};
let recursionOption: any = function (group: any) {
group.column.forEach((gItem: any) => {
if (group.column && group.column.length > 0) {
if (that.formData[gItem.prop])
obj[gItem.prop] = that.formData[gItem.prop];
}
});
if (group.group && group.group.length > 0)
group.group.forEach((gItem: any) => {
recursionOption(gItem);
});
};
recursionOption(this.formOption);
this.setValue(obj);
}
/**
* 设置表单值
*
* @param {*} value
* @memberof AvueCustomForm
*/
public setValue(value: any) {
if (this.isParseString) this.$emit("change", JSON.stringify(value));
else this.$emit("change", value);
}
}
</script>
\ No newline at end of file
......@@ -293,12 +293,13 @@ export default class ContextMenuDrag extends Vue {
mounted() {
let that: any = this;
const get: Promise<any> = this.entityService.getAllApp(null,{});
get
.then((response: any) => {
get.then((response: any) => {
if (response) {
that.list = response.data.model;
that.listFilter();
}
}).catch((error:any) =>{
console.warn("加载数据错误")
});
}
}
......
......@@ -92,6 +92,14 @@ export default class ContextMenu extends Vue {
*/
@Prop()
public menus?: any[]
/**
* 是否阻止默认绘制上下文菜单
*
* @type {any}
* @memberof ContextMenu
*/
@Prop({default:false})
public isBlocked?:any;
/**
* 显示右键菜单
......@@ -195,7 +203,10 @@ export default class ContextMenu extends Vue {
if (contextRef) {
contextRef.oncontextmenu = (event: MouseEvent) => {
event.preventDefault();
this.showContextMenu(event.clientX, event.clientY);
if(!this.isBlocked){
this.showContextMenu(event.clientX, event.clientY);
}
this.$emit("showContext",event);
};
}
}
......
此差异已折叠。
此差异已折叠。
......@@ -7,7 +7,7 @@
:clearable="true"
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListDynamic.placeholder')">
:placeholder="placeholder?placeholder:$t('components.dropDownListDynamic.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('userCustom.'+tag+'.'+item.value)!== ('userCustom.'+tag+'.'+item.value))?$t('userCustom.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
</template>
......
......@@ -11,7 +11,7 @@
:clearable="true"
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownListMpicker.placeholder')">
:placeholder="placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value.toString()" :label="item.text">
<Checkbox :value = "(currentVal.indexOf(item.value.toString()))==-1?false:true">
{{Object.is(codelistType,'STATIC') ? $t('codelist.'+tag+'.'+item.value) : item.text}}
......
......@@ -8,7 +8,7 @@
:clearable="true"
:filterable="filterable"
@on-open-change="onClick"
:placeholder="$t('components.dropDownList.placeholder')">
:placeholder="placeholder?placeholder:$t('components.dropDownList.placeholder')">
<i-option v-for="(item, index) in items" :key="index" :class="item.class" :value="item.value">{{($t('codelist.'+tag+'.'+item.value)!== ('codelist.'+tag+'.'+item.value))?$t('codelist.'+tag+'.'+item.value) : item.text}}</i-option>
</i-select>
<ibiz-select-tree v-if="hasChildren" class="tree-dropdown-list" :disabled="disabled" :NodesData="items" v-model="currentVal" :multiple="false"></ibiz-select-tree>
......
export const appConfig = {
//默认主题
defaultTheme: 'app-default-theme',
//默认字体
defaultFont: 'Microsoft YaHei',
//主题集合
themes: [
{
tag: 'app-default-theme',
title: 'light',
color: '#f6f6f6',
},
{
tag: 'app_theme_blue',
title: 'Blue',
color: '#6ba1d1'
},
{
tag: 'app_theme_darkblue',
title: 'Dark Blue',
color: '#606d80'
},
],
//字体集合
fonts: [
{
label: 'MicrosoftYaHei',
value: 'Microsoft YaHei',
},
{
label: 'SimHei',
value: 'SimHei',
},
{
label: 'YouYuan',
value: 'YouYuan',
},
]
}
\ No newline at end of file
import { Store } from 'vuex';
import EntityService from '@/service/entity-service';
/**
* 计数器服务基类
......@@ -16,6 +18,51 @@ export default class CounterService {
* @memberof CounterService
*/
private $store: Store<any> | null = null;
/**
* 当前计数器数据
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected counterData:any ={};
/**
* 应用实体数据服务
*
* @protected
* @type {EntityService}
* @memberof CounterService
*/
protected appEntityService:EntityService = new EntityService();
/**
* 当前计数器导航上下文
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected context:any ={};
/**
* 当前计数器导航参数
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected viewparams:any ={};
/**
* 当前计数器定时器对象
*
* @protected
* @type {*}
* @memberof CounterService
*/
protected timer:any;
/**
* Creates an instance of CounterService.
......@@ -25,6 +72,8 @@ export default class CounterService {
*/
constructor(opts: any = {}) {
this.$store = opts.$store;
this.context = opts.context?opts.context:{};
this.viewparams = opts.viewparams?opts.viewparams:{};
}
/**
......@@ -49,5 +98,13 @@ export default class CounterService {
return (window as any)['counterServiceRegister'].getService(name);
}
/**
* 销毁计数器
*
* @memberof ActionCounterCounterServiceBase
*/
public destroyCounter(){
if(this.timer) clearInterval(this.timer);
}
}
\ No newline at end of file
......@@ -144,6 +144,9 @@ export default class MDViewEngine extends ViewEngine {
if (Object.is(eventName, 'beforeload')) {
this.MDCtrlBeforeLoad(args)
}
if (Object.is(eventName, 'remove')) {
this.MDCtrlRemove(args)
}
}
/**
......@@ -454,5 +457,13 @@ export default class MDViewEngine extends ViewEngine {
return this.getMDCtrl().transformData(arg);
}
/**
* 多数据部件删除后
*
* @param {*} [arg={}]
* @memberof MDViewEngine
*/
public MDCtrlRemove(arg: any = {}): void {
this.view.$emit('drdatasremove', arg);
}
}
\ No newline at end of file
......@@ -186,39 +186,37 @@ export default class ViewEngine {
* @memberof ViewEngine
*/
public calcToolbarItemAuthState(data:any){
if(Environment.enablePermissionValid){
const _this: any = this;
for (const key in _this.view.toolBarModels) {
if (!_this.view.toolBarModels.hasOwnProperty(key)) {
return;
}
const _item = _this.view.toolBarModels[key];
if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
const _this: any = this;
for (const key in _this.view.toolBarModels) {
if (!_this.view.toolBarModels.hasOwnProperty(key)) {
return;
}
const _item = _this.view.toolBarModels[key];
if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
}else{
if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_this.view.toolBarModels[key].disabled = true;
}
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_this.view.toolBarModels[key].visabled = false;
}else{
_this.view.toolBarModels[key].visabled = true;
}
}
// 无权限:0;有权限:1
if(dataActionResult === 0){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if(_item.noprivdisplaymode === 1){
_this.view.toolBarModels[key].disabled = true;
}
if(dataActionResult === 1){
if((_item.noprivdisplaymode === 2) || (_item.noprivdisplaymode === 6)){
_this.view.toolBarModels[key].visabled = false;
}else{
_this.view.toolBarModels[key].visabled = true;
_this.view.toolBarModels[key].disabled = false;
}
}
if(dataActionResult === 1){
_this.view.toolBarModels[key].visabled = true;
_this.view.toolBarModels[key].disabled = false;
}
}
}
}
......
......@@ -49,6 +49,7 @@ export default class WFDynaExpGridViewEngine extends GridViewEngine {
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'grid')) {
this.GridEvent(eventName, args);
return;
}
super.onCtrlEvent(ctrlName, eventName, args);
}
......
......@@ -328,5 +328,48 @@ export default {
appMessagePopover: {
loadMore: 'Load more',
noMore: 'No more'
},
diskFileUpload:{
fileDrag: 'Drag the file here, or',
clickUpload: 'Click on the upload',
load: 'Load',
preview: 'preview',
edit: 'Edit',
delete: 'Delete',
clues: 'Individual file sizes do not exceed',
clues1: 'Documents not exceeding',
getFileFailure: 'Failed to get file list',
loadFailure: 'Upload file failed',
loadFailure1: 'Upload failed, individual file cannot exceed',
downloadFile: 'Download file failed',
downloadFile1: 'Download file failed, not get file!',
deleteFile: 'This action will permanently delete the file. Do you want to continue?',
deleteFilePrompt: 'Prompt',
true: 'True',
false: 'False',
deleteFileFailure: 'File deletion failed',
updateFailure: 'Batch update file failed',
},
diskImageUpload:{
preview: 'Preview',
OCRdiscern: 'OCRdiscern',
load: 'Load',
delete: 'Delete',
getImageFailure: 'Failed to get list of images',
loadImageFailure: 'Failed to download thumbnails',
loadImageFailure1: 'Failed to download thumbnail, failed to get file!',
loadImageFailure2:'Download image failed',
loadImageFailure3:'Download picture failed, no picture found!',
ImageIdNone: 'Picture ID does not exist!',
uploadImageFailure: 'Failed to upload image',
uploadImageFailure1: "Upload failed, only support 'GIF, JPG, PNG, BMP' format images!",
uploadFailure: 'Upload failed, individual image must not exceed',
notImageUrl: 'The image URL does not exist',
deleteFile: 'This action will permanently delete the file. Do you want to continue?',
deleteFilePrompt: 'Prompt',
true: 'True',
false: 'False',
deleteImageFailure:'Image deletion failed',
updateFailure: 'Batch update file failed',
}
};
\ No newline at end of file
......@@ -329,5 +329,48 @@ export default {
appMessagePopover: {
loadMore: '加载更多',
noMore: '没有更多了'
},
diskFileUpload:{
fileDrag: '将文件拖到此处,或',
clickUpload: '点击上传',
load: '下载',
preview: '预览',
edit: '编辑',
delete: '删除',
clues: '单个文件大小不超过',
clues1: '文件不超过',
getFileFailure: '获取文件列表失败',
loadFailure: '上传文件失败',
loadFailure1: '上传失败,单个文件不得超过',
downloadFile: '下载文件失败',
downloadFile1: '下载文件失败,未获取到文件!',
deleteFile: '此操作将永久删除该文件, 是否继续?',
deleteFilePrompt: '提示',
true: '确定',
false: '取消',
deleteFileFailure: '删除文件失败',
updateFailure: '批量更新文件失败',
},
diskImageUpload:{
preview: '预览',
OCRdiscern: 'ORC识别',
load: '下载',
delete: '删除',
getImageFailure: '获取图片列表失败',
loadImageFailure: '下载缩略图失败',
loadImageFailure1: '下载缩略图失败,未获取到文件!',
loadImageFailure2:'下载图片失败',
loadImageFailure3:'下载图片失败,未找到图片!',
ImageIdNone: '图片id不存在!',
uploadImageFailure: '上传图片失败',
uploadImageFailure1: '上传失败,仅支持'gif,jpg,png,bmp'格式的图片!',
uploadFailure: '上传失败,单个图片不得超过',
notImageUrl: '图片url不存在',
deleteFile: '此操作将永久删除该文件, 是否继续?',
deleteFilePrompt: '提示',
true: '确定',
false: '取消',
deleteImageFailure:'删除图片失败',
updateFailure: '批量更新文件失败',
}
};
\ No newline at end of file
......@@ -33,6 +33,7 @@ mock.onGet('/appdata').reply((config: any) => {
// 当前用户条线代码
srfsectorbc:""
},
enablepermissionvalid:false,
unires:["RESOURCE1","RESOURCE2"],
//当前用户所有组织部门标识
srforgsections:[{"srforgsectorid":"5bd1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目一部"},{"srforgsectorid":"2ad1ecf4d3c31e31cb66373df56b852f","srforgsectorname":"项目二部"}]
......
export { PanelDetailModel } from './panel-detail';
export { PanelRawitemModel } from './panel-row-item';
export { PanelTabPanelModel } from './panel-tab-panel';
export { PanelTabPageModel } from './panel-tab-page';
export { PanelFieldModel } from './panel-field';
export { PanelContainerModel } from './panel-container';
export { PanelControlModel } from './panel-control';
export { PanelUserControlModel } from './panel-user-control';
export { PanelButtonModel } from './panel-button';
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 按钮模型
*
* @export
* @class PanelButtonModel
* @extends {PanelDetailModel}
*/
export class PanelButtonModel extends PanelDetailModel {
constructor(opts: any = {}) {
super(opts);
this.$disabled = opts.disabled;
this.uiaction = opts.uiaction;
}
/**
* 是否禁用
*
* @type {boolean}
* @memberof PanelButtonModel
*/
private $disabled:boolean = false;
/**
* 按钮对应的界面行为
*
* @type {*}
* @memberof PanelButtonModel
*/
public uiaction:any;
/**
* 是否启用
*
* @type {boolean}
* @memberof PanelButtonModel
*/
public get disabled(): boolean {
return this.$disabled;
}
/**
* 设置是否启用
*
* @memberof PanelButtonModel
*/
public set disabled(val: boolean) {
if(this.isPower) {
this.$disabled = val;
}
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 面板容器模型
*
* @export
* @class PanelContainerModel
* @extends {PanelDetailModel}
*/
export class PanelContainerModel extends PanelDetailModel {
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 用户控件模型
*
* @export
* @class PanelControlModel
* @extends {PanelDetailModel}
*/
export class PanelControlModel extends PanelDetailModel {
constructor(otps:any = {}) {
super(otps);
}
}
\ No newline at end of file
/**
* 表单成员模型
*
* @export
* @class PanelDetailModel
*/
export class PanelDetailModel {
/**
* 是否有权限
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public isPower: boolean = true;
/**
* 成员标题
*
* @type {string}
* @memberof PanelDetailModel
*/
public caption: string = '';
/**
* 成员类型
*
* @type {string}
* @memberof PanelDetailModel
*/
public itemType: string = '';
/**
* 面板对象
*
* @type {*}
* @memberof PanelDetailModel
*/
public panel: any = null;
/**
* 成员名称
*
* @type {string}
* @memberof PanelDetailModel
*/
public name: string = '';
/**
* 成员是否显示
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public $visible: boolean = true;
/**
* 成员是否显示(旧)
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public oldVisible: boolean = true;
/**
* 成员是否显示标题
*
* @type {boolean}
* @memberof PanelDetailModel
*/
public isShowCaption: boolean = true;
/**
* Creates an instance of PanelDetailModel.
* PanelDetailModel 实例
*
* @param {*} [opts={}]
* @memberof PanelDetailModel
*/
constructor(opts: any = {}) {
this.caption = !Object.is(opts.caption, '') ? opts.caption : '';
this.itemType = !Object.is(opts.itemType, '') ? opts.itemType : '';
this.panel = opts.panel ? opts.panel : {};
this.name = !Object.is(opts.name, '') ? opts.name : '';
this.$visible = opts.visible ? true : false;
this.oldVisible = opts.visible ? true : false;
this.isShowCaption = opts.isShowCaption ? true : false;
}
/**
* 设置成员是否隐藏
*
* @memberof PanelDetailModel
*/
public set visible(val: boolean) {
if(this.isPower) {
this.$visible = val;
}
}
/**
* 获取成员是否隐藏
*
* @memberof PanelDetailModel
*/
public get visible() {
return this.$visible;
}
/**
* 设置显示与隐藏
*
* @param {boolean} state
* @memberof PanelDetailModel
*/
public setVisible(state: boolean): void {
if(this.isPower) {
this.visible = state;
}
}
/**
* 设置显示标题栏
*
* @param {boolean} state
* @memberof PanelDetailModel
*/
public setShowCaption(state: boolean): void {
this.isShowCaption = state;
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 面板属性项模型
*
* @export
* @class PanelFieldModel
* @extends {PanelDetailModel}
*/
export class PanelFieldModel extends PanelDetailModel {
/**
* 是否启用
*
* @type {boolean}
* @memberof PanelFieldModel
*/
public disabled: boolean = false;
/**
* 错误信息
*
* @type {string}
* @memberof PanelFieldModel
*/
public error: string = '';
/**
* 表单项启用条件
*
* 0 不启用
* 1 新建
* 2 更新
* 3 全部启用
*
* @type {(number | 0 | 1 | 2 | 3)}
* @memberof PanelFieldModel
*/
public enableCond: number | 0 | 1 | 2 | 3 = 3;
/**
* Creates an instance of PanelFieldModel.
* PanelFieldModel 实例
*
* @param {*} [opts={}]
* @memberof PanelFieldModel
*/
constructor(opts: any = {}) {
super(opts);
this.disabled = opts.disabled ? true : false;
this.enableCond = opts.enableCond;
}
/**
* 设置是否启用
*
* @param {boolean} state
* @memberof PanelFieldModel
*/
public setDisabled(state: boolean): void {
this.disabled = state;
}
/**
* 设置信息内容
*
* @param {string} error
* @memberof PanelFieldModel
*/
public setError(error: string): void {
this.error = error;
}
/**
* 设置是否启用
*
* @param {string} srfuf
* @memberof PanelFieldModel
*/
public setEnableCond(srfuf: string): void {
// 是否有权限
const isReadOk: boolean = true;
const _srfuf: number = parseInt(srfuf, 10);
let state: boolean = true;
if (isReadOk) {
if (_srfuf === 1) {
if ((this.enableCond & 2) === 2) {
state = false;
}
} else {
if ((this.enableCond & 1) === 1) {
state = false;
}
}
}
this.setDisabled(state);
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 直接内容模型
*
* @export
* @class PanelRawitemModel
* @extends {PanelDetailModel}
*/
export class PanelRawitemModel extends PanelDetailModel {
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
import { PanelTabPanelModel } from './panel-tab-panel';
/**
* 分页面板模型
*
* @export
* @class PanelTabPageModel
* @extends {PanelDetailModel}
*/
export class PanelTabPageModel extends PanelDetailModel {
/**
* Creates an instance of PanelTabPageModel.
* PanelTabPageModel 实例
*
* @param {*} [opts={}]
* @memberof PanelTabPageModel
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 设置分页是否启用
*
* @param {boolean} state
* @memberof PanelTabPageModel
*/
public setVisible(state: boolean): void {
this.visible = state;
const tabPanel = this.getTabPanelModel();
if (tabPanel) {
tabPanel.setActiviePage();
}
}
/**
* 获取分页面板
*
* @returns {(PanelTabPanelModel | null)}
* @memberof PanelTabPageModel
*/
public getTabPanelModel(): PanelTabPanelModel | null {
if (!this.panel) {
return null;
}
const tabPanels: any[] = Object.values(this.panel.detailsModel).filter((model: any) => Object.is(model.itemType, 'TABPANEL'));
let index = tabPanels.findIndex((tabPanel: any) => {
return tabPanel.tabPages.some((tabPag: any) => Object.is(tabPag.name, this.name));
});
if (index === -1) {
return null;
}
const tabPanel: PanelTabPanelModel = tabPanels[index];
return tabPanel;
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 分页部件模型
*
* @export
* @class PanelTabPanelModel
* @extends {PanelDetailModel}
*/
export class PanelTabPanelModel extends PanelDetailModel {
/**
* 被激活分页
*
* @type {string}
* @memberof PanelTabPanelModel
*/
public activiedPage: string = '';
/**
* 选中激活状态
*
* @type {string}
* @memberof PanelTabPanelModel
*/
public clickActiviePage: string = '';
/**
* 分页子成员
*
* @type {any[]}
* @memberof PanelTabPanelModel
*/
public tabPages: any[] = [];
/**
* Creates an instance of PanelTabPanelModel.
* PanelTabPanelModel 实例
*
* @param {*} [opts={}]
* @memberof PanelTabPanelModel
*/
constructor(opts: any = {}) {
super(opts);
this.tabPages = [...opts.tabPages];
if (this.tabPages.length > 0) {
this.activiedPage = this.tabPages[0].name;
}
}
/**
* 设置激活分页
*
* @memberof PanelTabPanelModel
*/
public setActiviePage(): void {
if (!this.panel) {
return;
}
const detailsModel: any = this.panel.detailsModel;
const index = this.tabPages.findIndex((tabpage: any) => Object.is(tabpage.name, this.clickActiviePage) && Object.is(tabpage.name, this.activiedPage) && detailsModel[tabpage.name].visible);
if (index !== - 1) {
return;
}
this.tabPages.some((tabpage: any) => {
if (detailsModel[tabpage.name].visible) {
this.activiedPage = tabpage.name;
return true;
}
return false;
});
}
/**
* 选中页面
*
* @param {*} $event
* @returns {void}
* @memberof PanelTabPanelModel
*/
public clickPage($event: any): void {
if (!$event) {
return;
}
this.clickActiviePage = $event;
this.activiedPage = $event;
}
}
\ No newline at end of file
import { PanelDetailModel } from './panel-detail';
/**
* 用户控件模型
*
* @export
* @class PanelUserControlModel
* @extends {PanelDetailModel}
*/
export class PanelUserControlModel extends PanelDetailModel {
constructor(otps:any = {}) {
super(otps);
}
}
\ No newline at end of file
/**
* 获取部门成员
*
* @param state
*/
export const getDepartmentPersonnel = (state: any) => () => {
return state.departmentPersonnel;
}
/**
* 获取代码表对象
*
......
import { Environment } from '@/environments/environment';
/**
* 添加部门成员
*
* @param state
* @param codelists
*/
export const addDepartmentPersonnel = (state: any, departmentPersonnel: Array<any>) => {
state.departmentPersonnel = [];
state.departmentPersonnel = [...departmentPersonnel];
}
/**
* 添加代码表
*
......@@ -101,7 +112,7 @@ export const addPage = (state: any, arg: any) => {
// 视图类型为REDIRECTVIEW和NOTAB的视图不添加缓存
if(Object.is(arg.meta.viewType, 'REDIRECTVIEW') || Object.is(arg.meta.viewType, 'NOTAB')){
return;
}else if(Object.is(arg.meta.viewType, 'APPINDEX')) {
}else if (Object.is(arg.meta.viewType, 'APPINDEX')) {
window.sessionStorage.setItem(Environment.AppName, arg.fullPath);
} else {
const page: any = {};
......
......@@ -7,6 +7,7 @@ export const rootstate: any = {
pageMetas: [],
historyPathList: [],
codelists: [],
departmentPersonnel:[],
selectTheme: '',
selectFont: '',
appdata: '',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册