提交 32dc0933 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 626f114c
*volumes
*target
.settings
*node_modules
......
## v7.0.0-alpha.11 [2020-6-21]
### Bug修复
修复标题工具栏样式遮挡bug
修复表格行编辑字段格式对齐
修复日历部件初始化压缩成一行问题
修复下拉多选组件最后一项数据无法删除
### 功能新增及优化
#### 模板
新增支持表单、表格新建默认值(当前时间)
新增行编辑浮点数精度格式化
新增首页面包屑导航模式
新增编辑视图第一条记录、上一条记录、下一条记录、最后一条记录界面行为
优化面板和多数据部件数据流向
优化表单在模态打开模式中padding样式
优化嵌入视图中工具栏消息数量提示样式
优化动态导航视图树样式
#### 基础文件
新增行编辑浮点数精度格式化
## v7.0.0-alpha.10 [2020-6-18]
### Bug修复
分页导航视图页面刷新bug
表单项更新,实体行为调用不到bug
关系界面子界面保存不触发父界面保存
表单样式调整
### 功能新增及优化
#### 模板
表格操作列只显示图标时显示tooltip
门户部件高度为0时自适应
面板和多数据部件数据流向
列表,数据视图保存功能
门户部件标题界面行为tooltip
新增面包屑、应用切换器组件
#### 基础文件
formitem样式调整,label适配位置
表格行编辑切换,app-picker不显示
文件上传下载参数格式处理
## v7.0.0-alpha.9 [2020-6-11]
### Bug修复
......
......@@ -27,7 +27,7 @@
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.17",
"ibiz-vue-lib": "^0.1.10",
"ibiz-vue-lib": "^0.1.13",
"interactjs": "^1.9.4",
"moment": "^2.24.0",
"path-to-regexp": "^6.1.0",
......@@ -58,6 +58,7 @@
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"axios-mock-adapter": "^1.17.0",
"compression-webpack-plugin": "^4.0.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"mockjs": "^1.1.0",
......
......@@ -28,7 +28,6 @@ import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vu
import AppRadioGroup from './components/app-radio-group/app-radio-group.vue'
import AppEmbedPicker from './components/app-embed-picker/app-embed-picker.vue'
import AppTreePicker from './components/app-tree-picker/app-tree-picker.vue'
import AppRichTextEditor from './components/app-rich-text-editor/app-rich-text-editor.vue'
import AppFileUpload from './components/app-file-upload/app-file-upload.vue'
import AppImageUpload from './components/app-image-upload/app-image-upload.vue'
import PropertyLayout from './components/property-layout/property-layout.vue'
......@@ -53,7 +52,6 @@ import AppRate from './components/app-rate/app-rate.vue'
import AppSwitch from './components/app-switch/app-switch.vue'
import AppSlider from './components/app-slider/app-slider.vue'
import AppStepper from './components/app-stepper/app-stepper.vue'
import AppPortalDesign from './components/app-portal-design/app-portal-design.vue'
import DatePickerRange from './components/date-picker-range/date-picker-range.vue'
import AppRangeDate from './components/app-range-date/app-range-date.vue'
import AppActionBar from './components/app-actionbar/app-actionbar.vue'
......@@ -63,7 +61,6 @@ import AppStudioAction from './components/app-studioaction/app-studioaction.vue'
import AppDebugActions from './components/app-debug-actions/app-debug-actions.vue'
import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue'
import AppColumnLink from './components/app-column-link/app-column-link.vue'
import AppDataUploadView from './components/app-data-upload/app-data-upload.vue'
import DropDownListDynamic from './components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import AppImagePreview from './components/app-image-preview/app-image-preview.vue'
import AppFormatData from './components/app-format-data/app-format-data.vue'
......@@ -71,14 +68,14 @@ import AppUploadFileInfo from './components/app-upload-file-info/app-upload-file
import ContextMenu from './components/context-menu/context-menu'
import AppColumnFormat from './components/app-column-format/app-column-format.vue'
import AppQuickGroup from './components/app-quick-group/app-quick-group.vue'
import AppOrgSelect from './components/app-org-select/app-org-select.vue'
import AppDepartmentSelect from './components/app-department-select/app-department-select.vue'
import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-select.vue'
import IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue'
import AppGroupPicker from './components/app-group-picker/app-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.vue'
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue';
import Breadcrumb from './components/app-breadcrumb/app-breadcrumb.vue'
import AppTransfer from './components/app-transfer/app-transfer.vue'
import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vue'
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'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载功能服务注册中心
......@@ -115,7 +112,7 @@ export const AppComponents = {
v.component('app-radio-group',AppRadioGroup);
v.component('app-embed-picker', AppEmbedPicker);
v.component('app-tree-picker', AppTreePicker);
v.component('app-rich-text-editor',AppRichTextEditor);
v.component('app-rich-text-editor', () => import('./components/app-rich-text-editor/app-rich-text-editor.vue'));
v.component('app-file-upload',AppFileUpload);
v.component('app-image-upload',AppImageUpload);
v.component('property-layout',PropertyLayout);
......@@ -140,7 +137,7 @@ export const AppComponents = {
v.component('app-switch', AppSwitch);
v.component('app-slider', AppSlider);
v.component('app-stepper', AppStepper);
v.component('app-portal-design',AppPortalDesign);
v.component('app-portal-design', () => import('./components/app-portal-design/app-portal-design.vue'));
v.component('date-picker-range',DatePickerRange);
v.component('app-range-date', AppRangeDate);
v.component('app-actionbar', AppActionBar);
......@@ -150,7 +147,7 @@ export const AppComponents = {
v.component('app-debug-actions', AppDebugActions);
v.component('app-header-menus', AppHeaderMenus);
v.component('app-column-link', AppColumnLink);
v.component('app-data-upload', AppDataUploadView);
v.component('app-data-upload', () => import('./components/app-data-upload/app-data-upload.vue'));
v.component('dropdown-list-dynamic', DropDownListDynamic);
v.component('app-image-preview', AppImagePreview);
v.component('app-format-data', AppFormatData);
......@@ -160,10 +157,11 @@ export const AppComponents = {
v.component('app-quick-group',AppQuickGroup);
v.component('app-org-select',AppOrgSelect);
v.component('app-department-select',AppDepartmentSelect);
v.component('ibiz-group-select',IBizGroupSelect);
v.component('ibiz-group-picker',IBizGroupPicker);
v.component('app-group-select',AppGroupSelect);
v.component('app-group-picker',AppGroupPicker);
v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag);
},
};
\ No newline at end of file
......@@ -13,5 +13,12 @@
.no-redirect {
color: #97a8be;
cursor: text;
.curselected{
color: #2196F3;
font-weight: bold;
}
.app-breadcrumb-selected{
cursor: pointer;
}
}
}
\ No newline at end of file
<template>
<el-breadcrumb
class="app-breadcrumb"
separator="/"
>
<el-breadcrumb class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item
v-for="(item, index) in breadcrumbs"
:key="item.path"
>
<span
v-if="index === breadcrumbs.length-1"
class="no-redirect"
>{{ $t(item.meta.caption) }}</span>
<a
v-else
@click.prevent="handleLink(item)"
>{{ $t(item.meta.caption) }}</a>
</el-breadcrumb-item>
<template v-if="Object.is(this.navModel,'route')">
<el-breadcrumb-item v-for="(item, index) in breadcrumbs" :key="item.id">
<span v-if="index === breadcrumbs.length-1" class="no-redirect">{{ item.title }}
<span v-if="isShowSelected(item)">
<dropdown trigger='click' @on-click="selectNavData($event,item)">
<span class="app-breadcrumb-selected">
<i class="el-icon-caret-bottom"></i>
</span>
<dropdown-menu slot='list'>
<dropdown-item v-for="(dataitem) in getPreNavData(item)" :name="dataitem.srfkey" :key="dataitem.srfkey">
<span :class="{'curselected':isCurSelected(item,dataitem)}">{{dataitem.srfmajortext}}</span>
</dropdown-item>
</dropdown-menu>
</dropdown>
</span>
</span>
<a v-else @click.prevent="handleLink(item)">{{ item.title }}</a>
</el-breadcrumb-item>
</template>
<template v-if="!Object.is(this.navModel,'route')">
<el-breadcrumb-item v-for="(item, index) in breadcrumbs" :key="item.path">
<span v-if="index === breadcrumbs.length-1" class="no-redirect" >{{ $t(item.meta.caption)}}</span>
<a v-else @click.prevent="handleLink(item)" >{{ $t(item.meta.caption) }}</a>
</el-breadcrumb-item>
</template>
</transition-group>
</el-breadcrumb>
</template>
......@@ -24,14 +33,41 @@
<script lang="ts">
import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
import { RouteRecord, Route } from 'vue-router'
import { Environment } from "@/environments/environment";
import NavDataService from '@/service/app/navdata-service';
import {Subscription } from 'rxjs';
@Component({
})
export default class Breadcrumb extends Vue {
private breadcrumbs: RouteRecord[] = []; //面包屑列表
/**
* 面包屑列表
*
* @memberof Breadcrumb
*/
private breadcrumbs: Array<any> = [];
/**
* 导航服务
*
* @memberof Breadcrumb
*/
private navDataService = NavDataService.getInstance(this.$store);
@Prop() public defPSAppView: any; //默认视图
/**
* 默认视图标识
*
* @memberof Breadcrumb
*/
@Prop() public indexViewTag!: string;
/**
* 导航模式
*
* @memberof Breadcrumb
*/
@Prop({default:'tab'}) public navModel?:string;
/**
* 监听路由
......@@ -43,13 +79,30 @@ export default class Breadcrumb extends Vue {
this.getBreadcrumb()
}
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Dev
*/
public serviceStateEvent: Subscription | undefined;
/**
* vue 生命周期
*
* @memberof Breadcrumb
*/
created() {
this.getBreadcrumb()
this.getBreadcrumb();
if(Object.is(this.navModel,"route")){
this.serviceStateEvent = this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if (Object.is(action, 'datarefresh')) {
this.getBreadcrumb();
}
});
}
}
/**
......@@ -58,24 +111,99 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
private getBreadcrumb() {
this.breadcrumbs = this.$route.matched.filter((item) => {
if(Object.is(this.navModel,"route")){
this.breadcrumbs = this.navDataService.getNavData();
this.$forceUpdate();
}else{
this.breadcrumbs = this.$route.matched.filter((item) => {
return item.meta && item.meta.caption
})
if(this.defPSAppView){
/**如果配置了默认视图,给面包屑第一级赋值默认视图为首页 */
}
}
/**
* 单机面包屑
* 获取面包屑指定元素前一条数据
*
* @memberof Breadcrumb
*/
private getPreNavData(item:any){
let preNavData:any = this.navDataService.getPreNavDataById(item.id);
return preNavData.data;
}
/**
* 判断是否为当前选中项
*
* @memberof Breadcrumb
*/
private isCurSelected(item:any,singleItem:any){
return item.srfkey === singleItem.srfkey;
}
/**
* 面包屑点击行为
*
* @memberof Breadcrumb
*/
private handleLink(item: any) {
this.$router.push(item).catch(err => {
console.warn(err);
});
if(Object.is(this.navModel,"route")){
// 首页
if(Object.is(item.id,this.indexViewTag)){
this.$router.push((window.sessionStorage.getItem(Environment.AppName))as string);
}else{
// 非首页
this.$router.push(item.path).catch(err => {
console.warn(err);
});
}
this.navDataService.removeNavData(item.id);
}else{
if(item && item.meta && item.meta.viewType && Object.is(item.meta.viewType,"APPINDEX")){
let path: string | null = window.sessionStorage.getItem(Environment.AppName);
if (path) {
this.$router.push({ path: path });
} else {
this.$router.push("/");
}
}else{
this.$router.push(item).catch(err => {
console.warn(err);
});
}
}
}
/**
* 切换导航行为
*
* @memberof Breadcrumb
*/
private selectNavData($event:any,item:any){
let preNavData:any = this.getPreNavData(item);
let curSrfkey:any = $event;
this.navDataService.serviceState.next({action:'viewrefresh',name:item.id, data:curSrfkey});
}
/**
* 组件销毁
*
* @memberof Breadcrumb
*/
public destroyed() {
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
}
/**
* 是否显示下拉列表
*
* @memberof Breadcrumb
*/
public isShowSelected(item:any){
return item.isselected && !this.$util.isEmpty(item.srfkey);
}
}
</script>
......
......@@ -6,7 +6,6 @@
<script lang="ts">
import { Vue, Component, Watch, Prop, Model } from 'vue-property-decorator';
@Component({
})
export default class AppDepartmentSelect extends Vue {
......
......@@ -100,6 +100,22 @@ export default class AppFileUpload extends Vue {
*/
@Prop() public data!: string;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 初始化值
*
......@@ -146,7 +162,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@Prop() public uploadparams?: string;
@Prop() public uploadparams?: any;
/**
* 下载参数
......@@ -154,15 +170,7 @@ export default class AppFileUpload extends Vue {
* @type {string}
* @memberof AppFileUpload
*/
@Prop() public exportparams?: string;
/**
* 自定义参数
*
* @type {*}
* @memberof AppFileUpload
*/
@Prop() public customparams?: any;
@Prop() public exportparams?: any;
/**
* 上传文件路径
......@@ -186,20 +194,20 @@ export default class AppFileUpload extends Vue {
public files = [];
/**
* 上传keys
* 上传params
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public upload_keys: Array<any> = [];
public upload_params: Array<any> = [];
/**
* 导出keys
* 导出params
*
* @type {Array<any>}
* @memberof AppFileUpload
*/
public export_keys: Array<any> = [];
public export_params: Array<any> = [];
/**
* 自定义数组
......@@ -239,31 +247,37 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload
*/
private dataProcess(): void {
let upload_arr: Array<string> = [];
let export_arr: Array<string> = [];
const _data: any = JSON.parse(this.data);
this.upload_keys.forEach((key: string) => {
upload_arr.push(`${key}=${_data[key]}`);
});
this.export_keys.forEach((key: string) => {
export_arr.push(`${key}=${_data[key]}`);
});
let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.upload_params.length > 0 ) {
_url +='?';
this.upload_params.forEach((item:any,i:any)=>{
_url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.upload_params.length-1){
_url += '&';
}
})
}
this.uploadUrl = _url;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.export_params.length > 0) {
url +='?';
this.export_params.forEach((item:any,i:any)=>{
url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.export_params.length-1){
url += '&';
}
})
}
file.url = url;
});
}
/**
* vue 生命周期
*
......@@ -290,28 +304,37 @@ export default class AppFileUpload extends Vue {
public mounted() {
this.appData = this.$store.getters.getAppData();
let uploadparams: string = '';
let exportparams: string = '';
let uploadparams: any = {};
let exportparams: any = {};
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let custom_arr: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_keys = exportparams.split(';');
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
});
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
})
}
for (const item in export_params) {
this.export_params.push({
[item]:export_params[item]
})
}
this.upload_keys = upload_keys;
this.export_keys = export_keys;
this.custom_arr = custom_arr;
this.setFiles(this.value);
this.dataProcess();
......
.app-form-group {
>.ivu-card-head {
>p {
>i {
......@@ -7,9 +8,12 @@
}
}
}
>.ivu-card-extra {
.item-extract-mode {
display: flex;
.item {
margin-left: 12px;
}
......@@ -18,6 +22,7 @@
}
.app-form-group.app-group-collapse-contant {
.ivu-card-body {
display: none;
}
......@@ -25,9 +30,12 @@
.app-group-flex {
height: 100%;
overflow: auto;
> .ivu-card-body {
overflow-y: auto;
overflow-x: hidden;
>.ivu-card-body {
height: calc(100% - 51px);
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}
}
\ No newline at end of file
<template>
<div class="app-form-group">
<div v-if="uiStyle=='STYLE2'">
<div :class="classes">
<template v-if="uiStyle=='STYLE2'">
<app-form-group2
:caption="caption"
:uiStyle="uiStyle"
......@@ -10,8 +10,8 @@
:titleBarCloseMode="titleBarCloseMode">
<slot></slot>
</app-form-group2>
</div>
<div v-else>
</template>
<template v-else>
<card v-if="isShowCaption === true" :bordered="false" :dis-hover="true" :class="classes">
<p class='' slot='title'>
<icon v-if="titleBarCloseMode !== 0" :type="collapseContant ? 'ios-arrow-dropright-circle' : 'ios-arrow-dropdown-circle'"
......@@ -87,17 +87,17 @@
</template>
</a >
</template>
<div v-if="Object.is(layoutType, 'FLEX')">
<template v-if="Object.is(layoutType, 'FLEX')">
<slot></slot>
</div>
<div v-if="!Object.is(layoutType, 'FLEX')">
</template>
<template v-if="!Object.is(layoutType, 'FLEX')">
<row :gutter="10"><slot></slot></row>
</div>
</template>
</card>
<row v-if="isShowCaption === false" :class="classes">
<slot></slot>
</row>
</div>
<template v-if="isShowCaption === false">
<slot></slot>
</template>
</template>
</div>
</template>
......
.app-form-item {
// margin-bottom: 16px;
>.ivu-form-item-label {
text-decoration: none;
display: block;
overflow: hidden;
white-space: nowrap;
}
>.ivu-form-item-content {
min-height: 36px;
}
height: 100%;
.editor {
height: 100%;
.ivu-form-item-content {
height: 100%;
min-height: 36px;
}
}
.app-form-item-label {
padding: 6px 10px 6px 0px;
}
}
.app-form-item-label-top {
>.ivu-form-item-label {
float: none;
display: inline-block;
padding: 0 0 10px;
}
.app-form-item.label-top, .app-form-item.label-bottom {
.app-form-item-label {
display: block;
}
}
.app-form-item-label-left{
.app-form-item-label{
float: left;
text-align: right;
padding-right: 12px;
.app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label, .editor {
height: 100%;
}
}
.app-form-item-label-right{
.app-form-item-label{
float: right;
text-align: left;
padding-left: 12px;
.app-form-item.label-left {
.app-form-item-label {
float: left;
text-align: right;
}
}
.app-form-item-label-top{
.app-form-item-label{
display: block;
padding-bottom: 10px;
.app-form-item.label-right {
.app-form-item-label {
float: right;
padding: 6px 0px 6px 10px;
}
}
.app-form-item-label-bottom{
.app-form-item-label{
display: block;
padding-top: 10px;
.app-form-item.label-none {
.app-form-item-label {
display: none !important;
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
overflow: auto;
> .ivu-tabs-tabpane {
height: 100%;
overflow: auto;
overflow: initial;
}
}
}
......
<template>
<div class="ibiz-group-picker">
<div class="ibiz-group-container">
<div v-if="showTree" class="ibiz-group-tree">
<ibiz-select-tree :NodesData="treeItems" v-model="treeSelectVal" :treeOnly="true" :defaultChecked="true" @select="treeSelect"></ibiz-select-tree>
</div>
<div class="ibiz-group-content">
<ibiz-group-card :data="cardItems" text="label" value="id" groupName="group" :multiple="multiple" :defaultSelect="cardSelctVal" @select="groupSelect"></ibiz-group-card>
</div>
</div>
<div class="ibiz-group-footer">
<el-button size="small" type="primary" @click="onOK">确认</el-button>
<el-button size="small" @click="onCancel">取消</el-button>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
import { Http } from '../../utils';
@Component({})
export default class AppGroupPicker extends Vue {
/**
* 视图上下文参数
*
* @type {*}
* @memberof AppGroupPicker
*/
@Prop() viewdata: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppGroupPicker
*/
@Prop() viewparam: any;
/**
* 多选
*
* @type {*}
* @memberof AppGroupPicker
*/
protected multiple: boolean = false;
/**
* 加载树url
*
* @type {*}
* @memberof AppGroupPicker
*/
protected treeurl:any;
/**
* 加载人员url
*
* @type {*}
* @memberof AppGroupPicker
*/
protected url:any;
/**
* 树数据集
*
* @type {*}
* @memberof AppGroupPicker
*/
protected treeItems: any[] = [];
/**
* 分组表数据集
*
* @type {*}
* @memberof AppGroupPicker
*/
protected cardItems: any[] = [];
/**
* 视图上下文参数对象
*
* @type {*}
* @memberof AppGroupPicker
*/
protected viewData: any;
/**
* 视图参数对象
*
* @type {*}
* @memberof AppGroupPicker
*/
protected viewParam: any;
/**
* 树选中值
*
* @type {*}
* @memberof AppGroupPicker
*/
protected treeSelectVal: string = '';
/**
* 分组表选中集合
*
* @type {*}
* @memberof AppGroupPicker
*/
protected cardSelctVal: any = [];
/**
* 数据选中集合
*
* @type {*}
* @memberof AppGroupPicker
*/
protected selects: any[] = [];
/**
* 是否显示树
*
* @type {*}
* @memberof AppGroupPicker
*/
get showTree() {
if(this.viewParam) {
return this.viewParam.showtree;
}
}
/**
* 生命周期
*
* @type {*}
* @memberof AppGroupPicker
*/
public created() {
if(!this.viewdata || !this.viewparam) {
return;
}
this.viewData = JSON.parse(this.viewdata);
this.viewParam = JSON.parse(this.viewparam);
this.multiple = this.viewParam.multiple;
this.treeurl = this.viewParam.treeurl;
this.url = this.viewParam.url;
if (this.viewParam.selects) {
this.viewParam.selects.forEach((select: any) => {
this.selects.push(select);
this.cardSelctVal.push(select.id)
})
}
this.load();
}
/**
* 加载数据
*
* @type {*}
* @memberof AppGroupPicker
*/
public load() {
if(this.showTree) {
this.loadTree();
} else {
this.loadGroupData(this.viewParam.filtervalue);
}
}
/**
* 加载树数据
*
* @type {*}
* @memberof AppGroupPicker
*/
public loadTree() {
let orgid = this.viewParam.filtervalue;
let tempTreeUrl:string = this.treeurl.replace('${orgid}',orgid);
let get = Http.getInstance().get(tempTreeUrl, true);
get.then((response: any) => {
if(response.status === 200) {
this.treeItems = response.data;
}
}).catch((error: any) => {
console.log(error)
})
}
/**
* 加载分组表数据
*
* @type {*}
* @memberof AppGroupPicker
*/
public loadGroupData(key: string) {
let tempUrl = this.url.replace('${selected-orgid}',key);
let get = Http.getInstance().get(tempUrl, true);
get.then((response: any) => {
if(response.status === 200) {
this.cardItems = response.data;
}
}).catch((error: any) => {
console.log(error)
})
}
/**
* 树选中
*
* @type {*}
* @memberof AppGroupPicker
*/
public treeSelect(event: any) {
if(!event || JSON.parse(event).length == 0) {
return;
}
const items: any = JSON.parse(event);
this.loadGroupData(items[0].id);
}
/**
* 分组表选中
*
* @type {*}
* @memberof AppGroupPicker
*/
public groupSelect(event: any) {
if (!event || !event.select) {
return;
}
if(!this.multiple) {
this.selects = [];
}
if(event.rselect) {
let index: number = this.selects.findIndex((item: any) => Object.is(event.rselect, item.id));
if(index >= 0) {
this.selects.splice(index, 1);
}
} else {
event.select.forEach((key: string) => {
let index: number = this.selects.findIndex((item: any) => Object.is(key, item.id));
if(index >= 0) {
return;
}
let item: any = this.cardItems.find((item: any) => Object.is(key, item.id));
if (item) {
this.selects.push(item);
}
});
}
}
/**
* 确认
*
* @type {*}
* @memberof AppGroupPicker
*/
public onOK() {
this.$emit('close', this.selects);
}
/**
* 取消
*
* @type {*}
* @memberof AppGroupPicker
*/
public onCancel() {
this.$emit('close');
}
}
</script>
<style lang="less">
.ibiz-group-picker{
width: 100%;
height: 100%;
.ibiz-group-container {
display: flex;
height: calc(100% - 65px);
.ibiz-group-tree {
min-width: 200px;
border-right: 1px solid #ddd;
padding: 0 34px 0 10px;
overflow: auto;
height: 100%;
}
.ibiz-group-content {
flex-grow: 1;
padding: 0 10px;
overflow: auto;
height: 100%;
}
}
.ibiz-group-footer {
padding: 16px;
text-align: right;
border-top: 1px solid #ddd;
}
}
</style>
\ No newline at end of file
<template>
<div class="ibiz-group-select">
<div class="ibiz-group-content">
<span v-if="!multiple">
{{ selectName }}
</span>
<template v-else v-for="(select, index) of selects">
<div :key="index" class="ibiz-group-item">
{{ select.label }}
<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>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import { Subject } from 'rxjs';
@Component({})
export default class AppGroupSelect extends Vue {
/**
* 名称标识
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() name!: string;
/**
* 树加载地址
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() treeurl?:boolean;
/**
* 数据接口地址
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() url!: string;
/**
* 多选
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop({default: false}) multiple?: boolean;
/**
* 数据对象
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() data: any;
/**
* 过滤属性标识
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() filter?: string;
/**
* 是否启用
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() disabled?: boolean;
/**
* 值
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() value: any;
/**
* 上下文参数
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() context: any;
/**
* 关联属性
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() valueitem: any;
/**
* 填充属性
*
* @type {*}
* @memberof AppGroupSelect
*/
@Prop() fillmap: any;
/**
* 选中项集合
*
* @type {*}
* @memberof AppGroupSelect
*/
protected selects: any[] = [];
/**
* 值变化
*
* @type {*}
* @memberof AppGroupSelect
*/
@Watch('value')
onValueChange(newVal: any) {
this.selects = [];
if (newVal) {
let item: any = {};
item.label = newVal.split(',');
if(this.valueitem) {
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(',') : [];
}
}
item.label.forEach((val: string, index: number) => {
let _item: any = {};
for(let key in item) {
_item[key] = item[key][index] ? item[key][index] : null;
}
this.selects.push(_item)
})
}
}
/**
* 单选时选中名称
*
* @type {*}
* @memberof AppGroupSelect
*/
get selectName() {
if(this.selects.length > 0) {
return this.selects[0].label;
}
}
/**
* 打开选择视图
*
* @type {*}
* @memberof AppGroupSelect
*/
public openView() {
const view: any = {
viewname: 'app-group-picker',
title: '分组选择'
};
const context: any = JSON.parse(JSON.stringify(this.context));
let filtervalue:string = "";
if(this.filter){
if(this.data[this.filter]){
filtervalue = this.data[this.filter];
}else if(context[this.filter]){
filtervalue = context[this.filter];
}else{
filtervalue = context.srforgid;
}
}else{
filtervalue = context.srforgid;
}
const param: any = {};
Object.assign(param, {
showtree: this.treeurl?true:false,
url:this.url,
treeurl:this.treeurl,
filtervalue: filtervalue,
multiple: this.multiple,
selects: this.selects
});
let container: Subject<any> = this.$appmodal.openModal(view, context, param);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.openViewClose(result);
});
}
/**
* 选择视图关闭
*
* @type {*}
* @memberof AppGroupSelect
*/
public openViewClose(result: any) {
this.selects = [];
if (result.datas && result.datas.length > 0) {
this.selects = result.datas
}
this.setValue()
}
/**
* 数据删除
*
* @type {*}
* @memberof AppGroupSelect
*/
public remove(item: any) {
this.selects.splice(this.selects.indexOf(item), 1);
this.setValue()
}
/**
* 设置值
*
* @type {*}
* @memberof AppGroupSelect
*/
public setValue() {
let item: any = {};
item[this.name] = null;
if(this.valueitem) {
item[this.valueitem] = null;
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[key] = null;
}
}
if(this.multiple) {
this.selects.forEach((select: any) => {
item[this.name] = item[this.name] ? `${item[this.name]},${select.label}` : select.label;
if(this.valueitem) {
item[this.valueitem] = item[this.valueitem] ? `${item[this.valueitem]},${select.id}` : select.id;
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[key] = item[key] ? `${item[key]},${select[this.fillmap[key]]}` : select[this.fillmap[key]];
}
}
});
} else {
item = this.selects.length > 0 ? this.selects[0] : {};
item[this.name] = this.selects.length > 0 ? this.selects[0].label : null;
if(this.valueitem) {
item[this.valueitem] = this.selects.length > 0 ? this.selects[0].id : null;
}
if(this.fillmap) {
for(let key in this.fillmap) {
item[key] = this.selects.length > 0 ? this.selects[0][this.fillmap[key]] : null;
}
}
}
for(let key in item) {
this.$emit('formitemvaluechange', { name: key, value: item[key] });
}
}
}
</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;
}
</style>
\ No newline at end of file
......@@ -98,6 +98,22 @@ export default class AppImageUpload extends Vue {
*/
@Prop() public data!: string;
/**
* 视图参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppAutocomplete
*/
@Prop() public context!: any;
/**
* 初始化值
*
......@@ -185,20 +201,20 @@ export default class AppImageUpload extends Vue {
@Provide() public files = [];
/**
* 上传keys
* 上传params
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public upload_keys: Array<any> = [];
public upload_params: Array<any> = [];
/**
* 导出keys
* 导出params
*
* @type {Array<any>}
* @memberof AppImageUpload
*/
public export_keys: Array<any> = [];
public export_params: Array<any> = [];
/**
* 自定义数组
......@@ -238,26 +254,31 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload
*/
private dataProcess(): void {
let upload_arr: Array<string> = [];
let export_arr: Array<string> = [];
const _data: any = JSON.parse(this.data);
this.upload_keys.forEach((key: string) => {
upload_arr.push(`${key}=${_data[key]}`);
});
this.export_keys.forEach((key: string) => {
export_arr.push(`${key}=${_data[key]}`);
});
let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.upload_params.length > 0 ) {
_url +='?';
this.upload_params.forEach((item:any,i:any)=>{
_url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.upload_params.length-1){
_url += '&';
}
})
}
this.uploadUrl = _url;
this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`;
if (this.export_params.length > 0) {
url +='?';
this.export_params.forEach((item:any,i:any)=>{
url += `${Object.keys(item)[0]}=${Object.values(item)[0]}`;
if(i<this.export_params.length-1){
url += '&';
}
})
}
file.url = url;
});
......@@ -288,28 +309,35 @@ export default class AppImageUpload extends Vue {
public mounted() {
this.appData = this.$store.getters.getAppData();
let uploadparams: string = '';
let exportparams: string = '';
let uploadparams: any = {};
let exportparams: any = {};
let upload_keys: Array<string> = [];
let export_keys: Array<string> = [];
let upload_params: Array<string> = [];
let export_params: Array<string> = [];
let custom_arr: Array<string> = [];
let param:any = this.viewparams;
let context:any = this.context;
let _data:any = JSON.parse(this.data);
if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = this.uploadparams;
upload_keys = uploadparams.split(';');
upload_params = this.$util.computedNavData(_data,param,context,uploadparams);
}
if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = this.exportparams;
export_keys = exportparams.split(';');
export_params = this.$util.computedNavData(_data,param,context,exportparams);
}
if (this.customparams && !Object.is(this.customparams, '')) {
Object.keys(this.customparams).forEach((name: string) => {
custom_arr.push(`${name}=${this.customparams[name]}`);
});
for (const item in upload_params) {
this.upload_params.push({
[item]:upload_params[item]
})
}
for (const item in export_params) {
this.export_params.push({
[item]:export_params[item]
})
}
this.upload_keys = upload_keys;
this.export_keys = export_keys;
this.custom_arr = custom_arr;
this.setFiles(this.value);
this.dataProcess();
......
......@@ -324,10 +324,10 @@ export default class AppPickerSelectView extends Vue {
this.items.push({ srfmajortext : item.srfmajortext, srfkey: item.srfkey });
}
});
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam);
}
let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam);
}
this.$forceUpdate();
}
......
......@@ -242,7 +242,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@Watch('value')
@Watch('value',{immediate: true})
public onValueChange(newVal: any, oldVal: any) {
this.curvalue = newVal;
if (Object.is(this.editortype, 'dropdown') && this.valueitem) {
......
......@@ -148,11 +148,19 @@ export default class AppSpan extends Vue {
if(this.tag){
return; //代码表走codelist组件
}else if(this.editorType === "ADDRESSPICKUP"){
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
});
}
}else{
this.text = this.value;
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
this.text = this.value;
}
}
}
......
......@@ -5,4 +5,7 @@
margin-right: 10px;
padding: 0 5px;
}
}
.user-dropdownMenu{
margin-top: 9px;
}
\ No newline at end of file
<template>
<div class='app-header-user'>
<dropdown @on-click="userSelect" :transfer="true">
<dropdown transfer-class-name="user-dropdownMenu" @on-click="userSelect" :transfer="true">
<div class='user'>
<span>{{user.name ? user.name : $t('components.appUser.name')}}</span>
&nbsp;&nbsp;<avatar :src="user.avatar" />
</div>
<dropdown-menu class='menu' slot='list' style='font-size: 15px !important;'>
<dropdown-item name='logout' style='font-size: 15px !important;'>
<span><i aria-hidden='true' class='fa fa-cogs' 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>
</dropdown-item>
</dropdown-menu>
......
.menu-drawer {
.ivu-drawer-left {
left: 201px !important;
}
.ivu-drawer {
top: 64px !important;
}
.ivu-drawer-body {
padding: 32px !important;
.menuItems {
display: flex;
flex-wrap: wrap;
> .item {
margin: 0px 10px;
width: calc(33.333% - 20px);
padding: 0px 15px;
font-size: 13px;
transition: all 0.3s;
display: flex;
justify-content: space-between;
height: 32px;
align-items: center;
.star {
display: flex;
height: 100%;
width: 30px;
font-size: 15px;
align-items: center;
justify-content: center;
.ivu-icon-ios-star-outline{
display: none;
}
}
}
> .item:hover {
background-color: #eaeaea;
cursor: pointer;
.ivu-icon-ios-star-outline{
display: inline;
}
}
}
}
}
.sider-drawer {
.ivu-drawer {
background-color: #ffffff !important;
}
.ivu-drawer-body {
padding: 0px !important;
}
.ivu-drawer {
top: 64px !important;
}
.context-menu-drag {
display: flex;
.flip-list-move {
transition: transform 0.3s;
}
.menu-list {
width: 100%;
height: 100%;
.menu-header {
cursor: pointer;
border-bottom: 1px solid rgb(222, 222, 222);
height: 48px;
line-height: 48px;
display: flex;
align-items: center;
.menuicon {
display: inline-block;
width: 50px;
font-size: 16px;
text-align: center;
font-size: 22px;
}
.content {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1 1 0%;
overflow: hidden;
font-size: 13px;
}
.forward {
margin: 0px 8px 0px 4px;
color: rgb(222, 222, 222);
font-size: 15px;
}
}
.list-group-item {
transition: background 1s;
-webkit-transition: background 1s;
.menuicon {
text-align: center;
}
.el-row {
height: 100%;
display: flex;
align-items: center;
padding: 0px 5px;
}
height: 40px;
cursor: pointer;
position: relative;
display: block;
margin-bottom: -1px;
transition: background-color 0.5s;
transition-timing-function: ease-in-out;
.handle {
cursor: move;
}
.bar {
display: flex;
.ivu-icon-ios-close {
cursor: pointer;
font-size: 25px;
}
}
}
.list-group-item:hover {
background-color: #f5f5f5;
.ivu-icon-ios-star-outline{
display: inline;
}
}
}
}
}
\ No newline at end of file
<template>
<Drawer class-name="sider-drawer" placement="left" :closable="false" :mask="false" width="200" v-model="leftDrawerVisiable">
<div class="context-menu-drag">
<div class="menu-list">
<div class="menu-header" @click="rightDrawerVisiable=!rightDrawerVisiable">
<div class="menuicon">
<Icon type="md-apps" />
</div>
<div class="content">
<span>全部应用</span>
</div>
<div class="forward">
<Icon type="ios-arrow-forward" />
</div>
</div>
<div style="padding:8px 0px;" class="col-6">
<draggable class="list-group" tag="ul" v-model="selectlist" v-bind="dragOptionsVal" @start="drag=true" @end="drag=false" :animation="250" handle=".handle" ghost-class="ghost">
<transition-group type="transition" :name="!drag ? 'flip-list' : null">
<li @click="skipTo(item)" class="list-group-item" v-for="(item,index) in selectlist" :key="item.id">
<el-row>
<el-col class="menuicon" :span="4">
<span>
<Icon v-if="item.icon" :type="item.icon" />
<Icon v-else type="md-menu" />
</span>
</el-col>
<el-col :span="14">
<span>{{ item.label }}</span>
</el-col>
<el-col :span="6">
<div class="bar">
<div>
<Icon type="ios-close" @click.stop="removeAt(index)" />
</div>
<div>
<Icon type="ios-move handle" />
</div>
</div>
</el-col>
</el-row>
</li>
</transition-group>
</draggable>
</div>
</div>
<Drawer class-name="menu-drawer" width="60" :closable="true" :mask="false" placement="left" v-model="rightDrawerVisiable">
<div class="menuItems">
<div @click="skipTo(item)" class="item" v-for="(item) in list" :key="item.id">
<span class="title">{{item.label}}</span>
<span v-if="isStar(item.id)" class="star" @click.stop="outStar(item)">
<Icon type="ios-star" />
</span>
<span v-else class="star" @click.stop="onStar(item)">
<Icon type="ios-star-outline" />
</span>
</div>
</div>
</Drawer>
</div>
</Drawer>
</template>
<script lang="ts">
import draggable from "vuedraggable";
import EntityService from '@/service/entity-service';
import { Vue,Component,Provide,Watch,Prop,Model } from "vue-property-decorator";
// tslint:disable-next-line:max-classes-per-file
@Component({
components: {
draggable
}
})
export default class ContextMenuDrag extends Vue {
public panelShow: boolean = true;
/**
* 抽屉菜单状态
*
* @returns
* @memberof ContextMenuDrag
*/
@Prop() public contextMenuDragVisiable?: boolean;
/**
* 拖拽列表配置对象
*
* @returns
* @memberof ContextMenuDrag
*/
@Model("change") public dragOptions: any;
/**
* 右侧飘窗状态
*
* @returns
* @memberof ContextMenuDrag
*/
public rightDrawerVisiable: boolean = false;
/**
* 左侧飘窗状态
*
* @returns
* @memberof ContextMenuDrag
*/
public leftDrawerVisiable: boolean = false;
/**
* 全部应用数据
*
* @returns
* @memberof ContextMenuDrag
*/
public list: Array<any> = [];
/**
* 已选择的应用数据
*
* @returns
* @memberof ContextMenuDrag
*/
public selectlist: Array<any> = [];
/**
* 拖拽列表
*
* @returns
* @memberof ContextMenuDrag
*/
public drag: boolean = false;
/**
* 拖拽列表配置项
*
* @returns
* @memberof ContextMenuDrag
*/
get dragOptionsVal() {
return {
animation: 200,
group: "description",
disabled: false,
ghostClass: "ghost"
};
}
/**
* 实体服务对象
*
* @protected
* @type {EntityService}
* @memberof ContextMenuDrag
*/
protected entityService: EntityService = new EntityService();
/**
* 监听抽屉菜单状态
*
* @returns
* @memberof ContextMenuDrag
*/
@Watch("contextMenuDragVisiable")
public onVisiableChange(newVal: any, oldVal: any) {
if (newVal) {
this.leftDrawerVisiable = newVal;
} else {
let that: any = this;
let params: any = {};
params.model = this.selectlist;
const put: Promise<any> = this.entityService.updateChooseApp(null,params);
this.rightDrawerVisiable = false;
setTimeout(() => {
that.leftDrawerVisiable = false;
}, 300);
}
}
/**
* 鼠标移入服务时显示右侧飘窗
*
* @returns
* @memberof ContextMenuDrag
*/
public showMenuDrawer() {
let that: any = this;
if(this.contextMenuDragVisiable){
setTimeout(() => {
that.rightDrawerVisiable = true;
}, 300);
}
}
/**
* 判断是否已选择该应用
*
* @returns
* @memberof ContextMenuDrag
*/
public isStar(id: any) {
let istar: boolean = false;
this.selectlist.forEach((item: any) => {
if (Object.is(item.id, id)) {
istar = true;
}
});
return istar;
}
/**
* 跳转到应用
*
* @returns
* @memberof ContextMenuDrag
*/
public skipTo(item: any){
if(item.addr){
let params: any = {};
params.model = this.selectlist;
const put: Promise<any> = this.entityService.updateChooseApp(null,params);
window.location.href = item.addr;
}else{
this.$message.info("未找到该应用");
}
}
/**
* 加入列表
*
* @returns
* @memberof ContextMenuDrag
*/
public onStar(item: any) {
item.visabled = 1;
this.selectlist.push(item);
}
/**
* 从列表中删除
*
* @returns
* @memberof ContextMenuDrag
*/
public outStar(item: any) {
item.visabled = 0;
let index: number = 0;
let that: any = this;
this.selectlist.forEach((select: any, index: number) => {
if (Object.is(item.id, select.id)) {
that.selectlist.splice(index,1);
}
});
}
/**
* 删除已选择应用
*
* @returns
* @memberof ContextMenuDrag
*/
removeAt(index: any) {
this.selectlist.splice(index, 1);
}
/**
* 拖拽列表排序
*/
sort() {
this.selectlist = this.selectlist.sort((a, b) => a.order - b.order);
}
/**
* 过滤已选择的应用
*
* @returns
* @memberof ContextMenuDrag
*/
listFilter() {
let that: any = this;
that.selectlist = [];
this.list.forEach((item: any) => {
if (item.visabled === 1) {
that.selectlist.push(item);
}
});
}
/**
* vue 生命周期
*
* @returns
* @memberof ContextMenuDrag
*/
mounted() {
let that: any = this;
const get: Promise<any> = this.entityService.getAllApp(null,{});
get
.then((response: any) => {
if (response) {
that.list = response.data.model;
that.listFilter();
}
});
}
}
</script>
<style lang='less'>
@import './context-menu-drag.less';
</style>
......@@ -5,4 +5,7 @@
top: 0;
right: 20px;
}
.ivu-input-number-input{
text-align: right;
}
}
\ No newline at end of file
<template>
<div class="input-unit">
<i-input
<InputNumber v-if="type === 'number'"
:placeholder="placeholder"
:size="size"
:precision="precision"
v-model="CurrentVal"
:disabled="disabled ? true : false"
></InputNumber>
<i-input v-else
:placeholder="placeholder"
:size="size"
:type="type"
v-model="CurrentVal"
:disabled="disabled ? true : false"
:autosize="autoSize"
@on-enter="enter"
></i-input>
<div class="unit-text">{{unit}}</div>
......@@ -62,13 +70,33 @@ export default class InputBox extends Vue {
*/
@Prop() public type?: string;
/**
* 精度
*
* @type {number}
* @memberof InputBox
*/
@Prop({default: 0}) public precision?: number;
/**
* 多行文本行数
*
* @type {string}
* @memberof InputBox
*/
@Prop() public autoSize?: any;
/**
* 当前值
*
* @memberof InputBox
*/
get CurrentVal() {
return this.itemValue;
if(Object.is(this.type, 'number') && this.itemValue && !isNaN(this.itemValue)){
return Number(Number(this.itemValue).toFixed(this.precision));
}else{
return this.itemValue;
}
}
/**
......
......@@ -160,6 +160,10 @@ export default class Login extends Vue {
* @memberof Login
*/
public handleSubmit(): void {
// 清除cookie
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1000);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
const form: any = this.$refs.loginForm;
let validatestate: boolean = true;
form.validate((valid: boolean) => {
......
......@@ -227,7 +227,7 @@ export default class TabPageExp extends Vue {
* @memberof TabPageExp
*/
public setCurPageCaption(caption: string, title: any, info: string) {
if (this.$route.meta && !Object.is(this.$route.meta.caption, caption)) {
if (this.$route.meta && !Object.is(this.$t(this.$route.meta.caption), caption)) {
return;
}
this.$store.commit("setCurPageCaption", {
......
......@@ -103,7 +103,7 @@ export default class EditViewEngine extends ViewEngine {
public onFormLoad(arg: any): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1') ? (this.majorPSDEField?arg[this.majorPSDEField]:arg.srfmajortext) : this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo);
this.setTabCaption(this.view.model.dataInfo,Object.is(arg.srfuf, '0'));
const newdata: boolean = !Object.is(arg.srfuf, '1');
this.calcToolbarItemState(newdata);
}
......@@ -117,7 +117,7 @@ export default class EditViewEngine extends ViewEngine {
public onFormSave(arg: any): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1') ? (this.majorPSDEField?arg[this.majorPSDEField]:arg.srfmajortext) : this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo);
this.setTabCaption(this.view.model.dataInfo,Object.is(arg.srfuf, '0'));
const newdata: boolean = !Object.is(arg.srfuf, '1');
this.calcToolbarItemState(newdata);
this.view.$emit('save',arg);
......@@ -245,14 +245,21 @@ export default class EditViewEngine extends ViewEngine {
*
* @memberof EditViewEngine
*/
public setTabCaption(info: string): void {
public setTabCaption(info: string,isNew:boolean): void {
let viewdata: any = this.view.model;
if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) {
this.view.$tabPageExp.setCurPageCaption(viewdata.srfTitle, viewdata.srfTitle, info);
let index:number = viewdata.srfTitle.indexOf("-");
if (viewdata && info && !Object.is(info, '')) {
if(index !== -1){
viewdata.srfTitle = viewdata.srfTitle.substr(0,index);
}
if(this.view.$tabPageExp){
this.view.$tabPageExp.setCurPageCaption(this.view.$t(viewdata.srfTitle), this.view.$t(viewdata.srfTitle), info);
}
if(this.view.$route){
this.view.$route.meta.info = info;
}
this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)} - ${viewdata.dataInfo}`;
this.view.model.srfTitle = `${this.view.$t(viewdata.srfTitle)}-${viewdata.dataInfo}`;
this.view.initNavDataWithRoute(null,isNew);
}
}
......
......@@ -367,6 +367,15 @@ export default class MDViewEngine extends ViewEngine {
* @memberof MDViewEngine
*/
public MDCtrlLoad(args: any[]) {
let cacheArray:Array<any> = [];
if(args.length >0){
args.forEach((item:any) =>{
cacheArray.push({srfkey:item.srfkey,srfmajortext:item.srfmajortext});
})
}
this.view.viewCacheData = cacheArray;
this.view.initNavDataWithRoute(cacheArray);
this.view.initNavDataWithTab(cacheArray,false);
if (this.view) {
this.view.$emit('viewload', args);
}
......@@ -391,11 +400,11 @@ export default class MDViewEngine extends ViewEngine {
}
// 快速分组和快速搜索栏
let otherQueryParam:any = {};
if(this.view && this.view.qucikGroupData){
Object.assign(otherQueryParam,this.view.qucikGroupData);
if(this.view && this.view.quickGroupData){
Object.assign(otherQueryParam,this.view.quickGroupData);
}
if(this.view && this.view.qucikFormData){
Object.assign(otherQueryParam,this.view.qucikFormData);
if(this.view && this.view.quickFormData){
Object.assign(otherQueryParam,this.view.quickFormData);
}
Object.assign(arg,{viewparams:otherQueryParam});
}
......
......@@ -6,50 +6,50 @@ import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
export default {
app: {
commonWords:{
error: 'Error',
success: 'Success',
ok: 'OK',
cancel: 'Cancel',
error: "Error",
success: "Success",
ok: "OK",
cancel: "Cancel",
},
local:{
new: 'New'
new: "New"
},
gridpage: {
choicecolumns: 'Choice columns',
refresh: 'refresh',
show: 'Show',
records: 'records',
totle: 'totle',
choicecolumns: "Choice columns",
refresh: "refresh",
show: "Show",
records: "records",
totle: "totle",
},
tabpage: {
sureclosetip: {
title: 'Close warning',
content: 'Form data Changed, are sure close?',
title: "Close warning",
content: "Form data Changed, are sure close?",
},
closeall: 'Close all',
closeother: 'Close other',
closeall: "Close all",
closeother: "Close other",
},
fileUpload: {
caption: 'Upload',
caption: "Upload",
},
searchButton: {
search: 'Search',
reset: 'Reset',
search: "Search",
reset: "Reset",
},
calendar:{
today: 'today',
month: 'month',
week: 'week',
day: 'day',
list: 'list',
dateSelectModalTitle: 'select the time you wanted',
gotoDate: 'goto',
today: "today",
month: "month",
week: "week",
day: "day",
list: "list",
dateSelectModalTitle: "select the time you wanted",
gotoDate: "goto",
},
// 非实体视图
views: {
sdindexview: {
caption: 'ibizlab-disk',
title: 'ibizlab-disk',
caption: "ibizlab-disk",
title: "ibizlab-disk",
},
},
utilview:{
......@@ -59,7 +59,7 @@ export default {
},
menus: {
sdindexview: {
menuitem1: '文件',
menuitem1: "文件",
},
},
},
......
......@@ -6,50 +6,50 @@ import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
export default {
app: {
commonWords:{
error: '失败',
success: '成功',
ok: '确认',
cancel: '取消',
error: "失败",
success: "成功",
ok: "确认",
cancel: "取消",
},
local:{
new: '新建'
new: "新建"
},
gridpage: {
choicecolumns: '选择列',
refresh: '刷新',
show: '显示',
records: '条',
totle: '共',
choicecolumns: "选择列",
refresh: "刷新",
show: "显示",
records: "条",
totle: "共",
},
tabpage: {
sureclosetip: {
title: '关闭提醒',
content: '表单数据已经修改,确定要关闭?',
title: "关闭提醒",
content: "表单数据已经修改,确定要关闭?",
},
closeall: '关闭所有',
closeother: '关闭其他',
closeall: "关闭所有",
closeother: "关闭其他",
},
fileUpload: {
caption: '上传',
caption: "上传",
},
searchButton: {
search: '搜索',
reset: '重置',
search: "搜索",
reset: "重置",
},
calendar:{
today: '今天',
month: '月',
week: '周',
day: '天',
list: '列',
dateSelectModalTitle: '选择要跳转的时间',
gotoDate: '跳转',
today: "今天",
month: "月",
week: "周",
day: "天",
list: "列",
dateSelectModalTitle: "选择要跳转的时间",
gotoDate: "跳转",
},
// 非实体视图
views: {
sdindexview: {
caption: 'ibizlab-disk',
title: 'ibizlab-disk',
caption: "ibizlab-disk",
title: "ibizlab-disk",
},
},
utilview:{
......@@ -59,7 +59,7 @@ export default {
},
menus: {
sdindexview: {
menuitem1: '文件',
menuitem1: "文件",
},
},
},
......
export default {
SysOperator: {
empty: '',
"empty": "",
},
};
\ No newline at end of file
export default {
SysOperator: {
empty: '',
"empty": "",
},
};
\ No newline at end of file
......@@ -3,11 +3,11 @@ export default {
views: {
gridview: {
caption: "文件",
title: '文件表格视图',
title: "文件表格视图",
},
editview: {
caption: "文件",
title: '文件编辑视图',
title: "文件编辑视图",
},
},
main_form: {
......
export default {
views: {
gridview: {
caption: '文件',
title: '文件表格视图',
caption: "文件",
title: "文件表格视图",
},
editview: {
caption: '文件',
title: '文件编辑视图',
caption: "文件",
title: "文件编辑视图",
},
},
main_form: {
details: {
group1: '文件基本信息',
formpage1: '基本信息',
srfupdatedate: '更新时间',
srforikey: '',
srfkey: '标识',
srfmajortext: '名称',
srftempmode: '',
srfuf: '',
srfdeid: '',
srfsourcekey: '',
filename: '名称',
filepath: '路径',
filesize: '文件大小',
fileext: '扩展名',
folder: '特定目录',
digestcode: '签名',
ownerid: '所属主体',
ownertype: '所属类型',
memo: '备注',
createman: '创建人',
createdate: '创建日期',
updateman: '更新人',
updatedate: '更新时间',
fileid: '标识',
group1: "文件基本信息",
formpage1: "基本信息",
srfupdatedate: "更新时间",
srforikey: "",
srfkey: "标识",
srfmajortext: "名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
filename: "名称",
filepath: "路径",
filesize: "文件大小",
fileext: "扩展名",
folder: "特定目录",
digestcode: "签名",
ownerid: "所属主体",
ownertype: "所属类型",
memo: "备注",
createman: "创建人",
createdate: "创建日期",
updateman: "更新人",
updatedate: "更新时间",
fileid: "标识",
},
uiactions: {
},
},
main_grid: {
columns: {
fileid: '标识',
filename: '名称',
filepath: '路径',
filesize: '文件大小',
fileext: '扩展名',
folder: '特定目录',
ownertype: '所属类型',
ownerid: '所属主体',
createdate: '创建日期',
updatedate: '更新时间',
fileid: "标识",
filename: "名称",
filepath: "路径",
filesize: "文件大小",
fileext: "扩展名",
folder: "特定目录",
ownertype: "所属类型",
ownerid: "所属主体",
createdate: "创建日期",
updatedate: "更新时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: '常规条件',
n_filename_like: '名称(文本包含(%))',
formpage1: "常规条件",
n_filename_like: "名称(文本包含(%))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: '新建',
tip: '新建',
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: '编辑',
tip: '编辑',
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: '拷贝',
tip: '拷贝',
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem8: {
caption: '删除',
tip: '删除',
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem13: {
caption: '导出',
tip: '导出',
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem16: {
caption: '其它',
tip: '其它',
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: '导出数据模型',
tip: '导出数据模型',
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: '数据导入',
tip: '数据导入',
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem19: {
caption: '过滤',
tip: '过滤',
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: '帮助',
tip: '帮助',
caption: "帮助",
tip: "帮助",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: '保存',
tip: '保存',
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: '保存并新建',
tip: '保存并新建',
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: '保存并关闭',
tip: '保存并关闭',
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem7: {
caption: '删除并关闭',
tip: '删除并关闭',
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem12: {
caption: '新建',
tip: '新建',
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem14: {
caption: '拷贝',
tip: '拷贝',
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem23: {
caption: '第一个记录',
tip: '第一个记录',
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: '上一个记录',
tip: '上一个记录',
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: '下一个记录',
tip: '下一个记录',
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: '最后一个记录',
tip: '最后一个记录',
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: '-',
tip: '',
caption: "-",
tip: "",
},
tbitem22: {
caption: '帮助',
tip: '帮助',
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
......@@ -25,7 +25,7 @@ mock.onGet('v7/sdindex-viewappmenu').reply((config: any) => {
iconcls: '',
icon: '',
textcls: '',
appfunctag: '_2',
appfunctag: 'Auto1',
resourcetag: '',
},
],
......
......@@ -9,6 +9,9 @@ import view_form from '@widgets/sdfile/main-form/main-form.vue';
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
......
......@@ -2,9 +2,9 @@
<div class='view-container degridview sdfile-grid-view'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="sdfilegridview"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<p slot='title'>
<div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfTitle)}}</span>
</p>
</div>
<div class='content-container'>
<div class='view-top-messages'>
</div>
......@@ -146,9 +146,10 @@
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs';
import NavDataService from '@/service/app/navdata-service';
import { Subject,Subscription } from 'rxjs';
import SDFileService from '@/service/sdfile/sdfile-service';
import GridViewEngine from '@engine/view/grid-view-engine';
......@@ -216,6 +217,15 @@ export default class SDFileGridViewBase extends Vue {
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图默认使用
*
* @type {string}
* @memberof SDFileGridViewBase
*/
@Inject({from:'navModel',default: 'tab'})
public navModel!:string;
/**
* 视图标识
*
......@@ -396,6 +406,23 @@ export default class SDFileGridViewBase extends Vue {
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof SDFileGridViewBase
*/
public navDataService = NavDataService.getInstance(this.$store);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SDFileGridViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 应用上下文
*
......@@ -412,13 +439,21 @@ export default class SDFileGridViewBase extends Vue {
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof SDFileGridViewBase
*/
public viewCacheData:any;
/**
* 解析视图参数
*
* @public
* @memberof SDFileGridViewBase
*/
public parseViewParam(): void {
public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){
delete this.context[key];
}
......@@ -448,12 +483,17 @@ export default class SDFileGridViewBase extends Vue {
});
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
if(inputvalue){
Object.assign(this.context,{'sdfile':inputvalue});
}
if(this.$store.getters.getAppData() && this.$store.getters.getAppData().context){
Object.assign(this.context,this.$store.getters.getAppData().context);
}
//初始化视图唯一标识
Object.assign(this.context,{srfsessionid:this.$util.createUUID()});
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
......@@ -531,6 +571,28 @@ export default class SDFileGridViewBase extends Vue {
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof SDFileGridViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false){
if(this.viewDefaultUsage && Object.is(this.navModel,"route")){
this.navDataService.addNavData({id:'sdfile-grid-view',tag:this.viewtag,srfkey:isNew ? null : this.context.sdfile,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof SDFileGridViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true){
if(this.viewDefaultUsage && !Object.is(this.navModel,"route")){
this.navDataService.addNavDataByOnly({id:'sdfile-grid-view',tag:this.viewtag,srfkey:this.context.sdfile,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
......@@ -548,10 +610,24 @@ export default class SDFileGridViewBase extends Vue {
* @memberof SDFileGridViewBase
*/
public afterCreated(){
const secondtag = this.$util.createUUID();
this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag });
this.viewtag = secondtag;
this.parseViewParam();
let _this:any = this;
const secondtag = _this.$util.createUUID();
_this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
_this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'sdfile-grid-view')){
return;
}
if (Object.is(action, 'viewrefresh')) {
_this.$nextTick(()=>{
_this.parseViewParam(data);
if(_this.engine){
_this.engine.load();
}
});
}
});
if(this.formDruipart){
this.formDruipart.subscribe((res:any) =>{
if(Object.is(res.action,'save')){
......@@ -1506,6 +1582,12 @@ export default class SDFileGridViewBase extends Vue {
}
})
}
if(Object.is(this.navModel,"tab")){
this.navDataService.removeNavDataByTag(this.viewtag);
}
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
}
}
......
......@@ -11,6 +11,9 @@ import view_searchform from '@widgets/sdfile/default-searchform/default-searchfo
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
......
......@@ -12,7 +12,6 @@ import i18n from '@/locale'
import 'element-ui/lib/theme-chalk/index.css';
import 'view-design/dist/styles/iview.css';
import 'ibiz-vue-lib/lib/ibiz-vue-lib.css';
import '@/styles/default.less';
// 模拟数据
......
......@@ -6,8 +6,8 @@
<sider :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange">
<div class="sider-top">
<div class="page-logo">
<img v-show="collapseChange" src="../../../assets/img/logo.png" height="16" />
<span v-show="!collapseChange" style="display: block;text-align: center;font-weight: 300;font-size: 20px;">{{$t(model.srfCaption)}}</span>
<span class="menuicon" @click="contextMenuDragVisiable=!contextMenuDragVisiable"><Icon type="md-menu" /></span>
<span v-show="!collapseChange" style="overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap;display: block;text-align: center;font-weight: 300;font-size: 20px;">{{$t(model.srfCaption)}}</span>
</div>
</div>
<view_appmenu
......@@ -16,7 +16,9 @@
:context="context"
:showBusyIndicator="true"
v-model="collapseChange"
:mode="mode"
:mode="mode"
:navModel="navModel"
viewtag="sdindex-view"
:selectTheme="selectTheme"
:isDefaultPage="isDefaultPage"
:defPSAppView="defPSAppView"
......@@ -24,6 +26,7 @@
ref='appmenu'
@closeview="closeView($event)">
</view_appmenu>
<context-menu-drag :contextMenuDragVisiable="contextMenuDragVisiable"></context-menu-drag>
</sider>
<layout>
<header class="index_header">
......@@ -31,7 +34,7 @@
<div class="page-logo">
<i v-show="!collapseChange" class="ivu-icon el-icon-s-fold" @click="handleClick"></i>
<i v-show="collapseChange" class="ivu-icon el-icon-s-unfold" @click="handleClick"></i>
<app-breadcrumb :defPSAppView="defPSAppView"></app-breadcrumb>
<app-breadcrumb :navModel="navModel" indexViewTag="sdindex-view"></app-breadcrumb>
</div>
</div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
......@@ -42,8 +45,8 @@
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div>
</header>
<content class="index_content" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }">
<tab-page-exp></tab-page-exp>
<content :class="{'index_content':true,'index_tab_content':Object.is(navModel,'tab')?true:false,'index_route_content':Object.is(navModel,'route')?true:false}" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }" @click="contextMenuDragVisiable=false">
<tab-page-exp v-if="Object.is(navModel,'tab')"></tab-page-exp>
<app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view>
</app-keep-alive>
......@@ -56,9 +59,10 @@
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';
import { Vue, Component, Prop, Provide, Emit, Watch,Inject } from 'vue-property-decorator';
import { UIActionTool,Util } from '@/utils';
import { Subject } from 'rxjs';
import NavDataService from '@/service/app/navdata-service';
import { Subject,Subscription } from 'rxjs';
......@@ -114,6 +118,7 @@ export default class SDIndexViewBase extends Vue {
*/
@Prop({ default: true }) public viewDefaultUsage!: boolean;
/**
* 视图标识
*
......@@ -237,6 +242,23 @@ export default class SDIndexViewBase extends Vue {
public engineInit(): void {
}
/**
* 应用导航服务
*
* @type {*}
* @memberof SDIndexViewBase
*/
public navDataService = NavDataService.getInstance(this.$store);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SDIndexViewBase
*/
public serviceStateEvent: Subscription | undefined;
/**
* 应用上下文
*
......@@ -253,13 +275,21 @@ export default class SDIndexViewBase extends Vue {
*/
public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof SDIndexViewBase
*/
public viewCacheData:any;
/**
* 解析视图参数
*
* @public
* @memberof SDIndexViewBase
*/
public parseViewParam(): void {
public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){
delete this.context[key];
}
......@@ -293,6 +323,8 @@ export default class SDIndexViewBase extends Vue {
Object.assign(this.context,this.$store.getters.getAppData().context);
}
this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
}
/**
......@@ -370,6 +402,28 @@ export default class SDIndexViewBase extends Vue {
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof SDIndexViewBase
*/
public initNavDataWithRoute(data:any = null, isNew:boolean = false){
if(this.viewDefaultUsage && Object.is(this.navModel,"route")){
this.navDataService.addNavData({id:'sdindex-view',tag:this.viewtag,srfkey:isNew ? null : null,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof SDIndexViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true){
if(this.viewDefaultUsage && !Object.is(this.navModel,"route")){
this.navDataService.addNavDataByOnly({id:'sdindex-view',tag:this.viewtag,srfkey:null,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
}
}
/**
......@@ -387,10 +441,24 @@ export default class SDIndexViewBase extends Vue {
* @memberof SDIndexViewBase
*/
public afterCreated(){
const secondtag = this.$util.createUUID();
this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag });
this.viewtag = secondtag;
this.parseViewParam();
let _this:any = this;
const secondtag = _this.$util.createUUID();
_this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
_this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'sdindex-view')){
return;
}
if (Object.is(action, 'viewrefresh')) {
_this.$nextTick(()=>{
_this.parseViewParam(data);
if(_this.engine){
_this.engine.load();
}
});
}
});
}
......@@ -457,6 +525,33 @@ export default class SDIndexViewBase extends Vue {
*/
public mode: string ='vertical';
/**
* 导航模式(route:面包屑模式、tab:分页导航模式)
*
* @type {string}
* @memberof SDIndexViewBase
*/
@Provide()
public navModel:string = "tab";
/**
* 抽屉状态
*
* @type {boolean}
* @memberof SDIndexViewBase
*/
public contextMenuDragVisiable: boolean = false;
/**
* 初始化之前
*
* @memberof SDIndexViewBase
*/
public beforeCreate(){
let navDataService = NavDataService.getInstance(this.$store)
navDataService.removeAllNavData();
}
/**
* 当前主题
*
......
......@@ -3,7 +3,9 @@
}
.sdindex-view{
position: relative;
}
.index_view{
margin-bottom: 1px;
width: 100%;
......@@ -19,6 +21,7 @@
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
.page-logo{
display: flex;
align-items: center;
......@@ -73,7 +76,6 @@
}
}
.ivu-layout .ivu-layout-sider .ivu-layout-sider-children .sider-top{
padding: 4px;
margin-top: -2px;
line-height: 58px;
text-align: center;
......@@ -81,11 +83,22 @@
cursor: pointer;
}
.sider-top{
padding: 0px;
margin-bottom: 1px;
height:65px;
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
> .page-logo{
display: flex;
align-items: center;
height: 100%;
>.menuicon{
display: block;
text-align: center;
font-weight: 300;
font-size: 28px;
width:64px;
height:100%;
}
}
}
}
......
......@@ -9,6 +9,9 @@ import view_appmenu from '@widgets/app/sdindex-view-appmenu/sdindex-view-appmenu
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
......
此差异已折叠。
......@@ -909,4 +909,26 @@ export default class EntityService {
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/testuserexistworklist`,requestData,isloading);
}
/**
* 获取所有应用数据
*
* @param context
* @param data
* @param isloading
*/
public async getAllApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`uaa/access-center/app-switcher/default`,data,isloading);
}
/**
* 更新已选择的应用
*
* @param context
* @param data
* @param isloading
*/
public async updateChooseApp(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().put(`uaa/access-center/app-switcher/default`,data,isloading);
}
}
\ No newline at end of file
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${item.getKeyPSAppDEField().getCodeNa... [in template "TEMPLCODE_zh_CN" at line 435, column 26]
- Failed at: ${item.getKeyPSAppDEField().getCodeNa... [in template "TEMPLCODE_zh_CN" at line 467, column 26]
----
\ No newline at end of file
......@@ -62,10 +62,23 @@
border-top-color: #909399;
}
// tab分页模式首页布局
.index_tab_content{
>.view-container {
height: calc(100% - 65px);
margin: 0px 12px;
}
}
// 面包屑模式首页布局
.index_route_content{
>.view-container {
height: calc(100% - 36px);
margin: 12px;
}
}
.view-container {
height: calc(100% - 65px);
padding: 0 12px;
margin: 0px 12px;
background: white;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04);
// flex-direction: column;
......@@ -74,18 +87,29 @@
// display: flex;
// flex-direction: column;
> .ivu-card-head{
height: 50px;
min-height: 42px;
border-color: rgb(221, 221, 221);
border-style: solid;
border-width: 0px 0px 1px;
margin: 0px 0px 11px;
padding: 6px 0px;
> p{
height: 50px;
padding: 6px 0px 2px;
> .header-container{
min-height: 42px;
display: flex;
flex-wrap: nowrap;
align-items: flex-start;
justify-content: space-between;
> .caption-info{
line-height: 50px;
line-height: 42px;
font-size: 18px;
color: #1890ff;
flex-shrink: 0;
}
> .toolbar-container{
margin-left: auto;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
}
......@@ -237,12 +261,6 @@
}
}
// 清除看板里视图的阴影
.dashboard .portlet .view-container{
-webkit-box-shadow: none ;
box-shadow: none;
}
/*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式
......
......@@ -4,29 +4,6 @@
.app-theme-icon {
color: #6ba1d1;
}
/* .el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #2d5f8b;
color: #6ba1d1;
i {
color: #6ba1d1;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #4276a4;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3c6c95;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
} */
}
> .ivu-layout {
......@@ -34,7 +11,12 @@
background-color: #4276a4;
.sider-top {
color: hsla(0,0%,100%,.8);
background: #2d5f8b;
background-color: #4276a4;
>.page-logo{
>.menuicon:hover{
background-color: #2d5f8b;
}
}
}
}
}
......
......@@ -3,30 +3,7 @@
> .ivu-layout-has-sider > .ivu-layout > header{
.app-theme-icon {
color: #606d80;
}/*
.el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #20222A;
color: #606d80;
i {
color: #606d80;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #20222A;
color: #f1f1f1;
i {
color: #f1f1f1;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #3e4b5c;
color: #f1f1f1 !important;
i {
color: #f1f1f1;
}
}
} */
}
}
> .ivu-layout {
> .ivu-layout-sider {
......@@ -34,6 +11,11 @@
.sider-top {
color: hsla(0,0%,100%,.8);
background-color: #20222A;
>.page-logo{
>.menuicon:hover{
background-color:#060708;
}
}
}
}
}
......
......@@ -4,38 +4,18 @@
.app-theme-icon {
color: #aaaaaa;
}
/* .el-menu.el-menu--horizontal {
> .el-menu-item, > .el-submenu > .el-submenu__title {
background: #e1e1e1;
color: #aaaaaa;
i {
color: #aaaaaa;
}
}
> .el-menu-item.is-active, > .el-submenu.is-active > .el-submenu__title {
background-color: #f6f6f6;
color: #666666;
i {
color: #666666;
}
}
> .el-menu-item:hover, > .el-submenu:hover > .el-submenu__title {
background-color: #e9e9e9;
color: #666666 !important;
i {
color: #666666;
}
}
} */
}
> .ivu-layout {
> .ivu-layout-sider {
background-color: #f6f6f6;
.sider-top {
background-color: #e8eaec;
.ivu-icon {
color: #aaaaaa;
}
background-color: #f6f6f6;
>.page-logo{
>.menuicon:hover{
background-color: #fff;
color:#000;
}
}
}
}
}
......
......@@ -132,13 +132,16 @@ export class Interceptors {
* @memberof Interceptors
*/
private doNoLogin(data: any = {}): void {
// 清除user和token
// 清除user、token和cookie
if(localStorage.getItem('user')){
localStorage.removeItem('user');
}
if(localStorage.getItem('token')){
localStorage.removeItem('token');
}
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
if (data.loginurl && !Object.is(data.loginurl, '') && data.originurl && !Object.is(data.originurl, '')) {
let _url = encodeURIComponent(encodeURIComponent(window.location.href));
let loginurl: string = data.loginurl;
......
......@@ -99,15 +99,17 @@ export class ViewTool {
let routePath: string = '';
let [arg] = args;
arg = arg ? arg : {};
deResParameters.forEach(({ pathName, parameterName }: { pathName: string, parameterName: string }) => {
let value:any = null;
if (viewParam[parameterName] && !Object.is(viewParam[parameterName], '') && !Object.is(viewParam[parameterName], 'null')) {
value = viewParam[parameterName];
} else if (arg[parameterName] && !Object.is(arg[parameterName], '') && !Object.is(arg[parameterName], 'null')) {
value = arg[parameterName];
}
routePath = `${routePath}/${pathName}/${value}`;
});
if(deResParameters && deResParameters.length >0){
deResParameters.forEach(({ pathName, parameterName }: { pathName: string, parameterName: string }) => {
let value:any = null;
if (viewParam[parameterName] && !Object.is(viewParam[parameterName], '') && !Object.is(viewParam[parameterName], 'null')) {
value = viewParam[parameterName];
} else if (arg[parameterName] && !Object.is(arg[parameterName], '') && !Object.is(arg[parameterName], 'null')) {
value = arg[parameterName];
}
routePath = `${routePath}/${pathName}/${value}`;
});
}
return routePath;
}
......@@ -124,21 +126,23 @@ export class ViewTool {
public static getActiveRoutePath(parameters: any[], args: any[], data: any): string {
let routePath: string = '';
// 不存在应用实体
if (parameters.length === 1) {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
} else if (parameters.length === 2) {
let [arg] = args;
arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] && !Object.is(arg[_parameterName], '') ?
arg[_parameterName] : null;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
if(parameters && parameters.length >0){
if (parameters.length === 1) {
const [{ pathName, parameterName }] = parameters;
routePath = `/${pathName}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
} else if (parameters.length === 2) {
let [arg] = args;
arg = arg ? arg : {};
const [{ pathName: _pathName, parameterName: _parameterName }, { pathName: _pathName2, parameterName: _parameterName2 }] = parameters;
const _value: any = arg[_parameterName] && !Object.is(arg[_parameterName], '') ?
arg[_parameterName] : null;
routePath = `/${_pathName}/${_value}/${_pathName2}`;
if (Object.keys(data).length > 0) {
routePath = `${routePath}?${qs.stringify(data, { delimiter: ';' })}`;
}
}
}
return routePath;
......
......@@ -29,7 +29,7 @@ export default class SDIndexViewModel {
iconcls: '',
icon: '',
textcls: '',
appfunctag: '_2',
appfunctag: 'Auto1',
resourcetag: '',
authtag:'web-SDIndexView-menuitem1',
},
......@@ -44,7 +44,7 @@ export default class SDIndexViewModel {
*/
public funcs: any[] = [
{
appfunctag: '_2',
appfunctag: 'Auto1',
appfuncyype: 'APPVIEW',
openmode: '',
codename: 'sdfilegridview',
......
......@@ -99,6 +99,9 @@ export default class ControlService {
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
......@@ -110,9 +113,6 @@ export default class ControlService {
}
}
});
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
......
......@@ -22,11 +22,12 @@
</i-form>
</template>
<script lang='tsx'>
import { Vue, Component, Prop, Provide, Emit, Watch, Model } from 'vue-property-decorator';
import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-property-decorator';
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import SDFileService from '@/service/sdfile/sdfile-service';
import DefaultService from './default-searchform-service';
......@@ -45,7 +46,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 名称
*
* @type {string}
* @memberof Default
* @memberof DefaultBase
*/
@Prop() public name?: string;
......@@ -53,7 +54,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof Default
* @memberof DefaultBase
*/
@Prop() public viewState!: Subject<ViewState>;
......@@ -61,7 +62,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 应用上下文
*
* @type {*}
* @memberof Default
* @memberof DefaultBase
*/
@Prop() public context: any;
......@@ -69,7 +70,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 视图参数
*
* @type {*}
* @memberof Default
* @memberof DefaultBase
*/
@Prop() public viewparams: any;
......@@ -78,7 +79,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
*
* @public
* @type {(Subscription | undefined)}
* @memberof Default
* @memberof DefaultBase
*/
public viewStateEvent: Subscription | undefined;
......@@ -86,7 +87,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 获取部件类型
*
* @returns {string}
* @memberof Default
* @memberof DefaultBase
*/
public getControlType(): string {
return 'SEARCHFORM'
......@@ -98,7 +99,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof Default
* @memberof DefaultBase
*/
public counterServiceArray:Array<any> = [];
......@@ -106,7 +107,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 建构部件服务对象
*
* @type {DefaultService}
* @memberof Default
* @memberof DefaultBase
*/
public service: DefaultService = new DefaultService({ $store: this.$store });
......@@ -114,7 +115,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 实体服务对象
*
* @type {SDFileService}
* @memberof Default
* @memberof DefaultBase
*/
public appEntityService: SDFileService = new SDFileService({ $store: this.$store });
......@@ -124,7 +125,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 关闭视图
*
* @param {any} args
* @memberof Default
* @memberof DefaultBase
*/
public closeView(args: any): void {
let _this: any = this;
......@@ -134,7 +135,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
/**
* 计数器刷新
*
* @memberof Default
* @memberof DefaultBase
*/
public counterRefresh(){
const _this:any =this;
......
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 1028, column 18]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 1038, column 18]
----
\ No newline at end of file
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 349, column 14]
- Failed at: ${appde.getKeyPSAppDEField().getCodeN... [in template "TEMPLCODE_zh_CN" at line 350, column 14]
----
\ No newline at end of file
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: ${ctrl.getPSAppDataEntity().getMajorP... [in template "TEMPLCODE_zh_CN" at line 884, column 39]
- Failed at: ${ctrl.getPSAppDataEntity().getMajorP... [in template "TEMPLCODE_zh_CN" at line 886, column 39]
----
\ No newline at end of file
......@@ -46,6 +46,13 @@
margin-bottom: unset !important;
}
}
.el-table__body .edit-cell{
padding:0;
.app-form-item{
margin-top: 20px;
margin-bottom: 20px;
}
}
}
.grid-pagination {
height: 50px;
......
const path = require('path');
const os = require('os');
function resolve(dir) {
return path.join(__dirname, dir)
}
......
......@@ -4,5 +4,5 @@ Tip: If the failing expression is known to be legally refer to something that's
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign sysApi = appDataEntity.getPSD... [in template "CODETEMPL_zh_CN" at line 31, column 9]
- Failed at: #assign sysApi = appDataEntity.getPSD... [in template "CODETEMPL_zh_CN" at line 35, column 9]
----
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<property name="LOG_PATH" value="logs" />
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5level] %-40.40logger{39} : %msg%n" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="LOG_PATTERN2" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([${LOG_LEVEL_PATTERN:-%5p}]) %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
<!-- 控制台输出 -->
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 按照每天生成日志文件 -->
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_PATH}/ibzdisk-web.%d{yyyy-MM-dd}.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>100MB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="Console" />
<appender-ref ref="file" />
</root>
</configuration>
version: "3.2"
services:
ibzdisk-mongodb:
image: mongo:4.2.3
ports:
- 27017:27017
volumes:
- $PWD/../../../../volumes/mongodb/:/data/db/
networks:
- agent_network
networks:
agent_network:
attachable: true
version: "3.2"
services:
ibzdisk-nacos:
image: nacos/nacos-server:latest
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
ports:
- "8848:8848"
networks:
- agent_network
networks:
agent_network:
attachable: true
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -174,3 +174,4 @@ public class SDFileServiceImpl implements ISDFileService {
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册