提交 5605928a 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码

上级 efaed01f
*volumes
*target *target
.settings .settings
*node_modules *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修复
数值代码表多语言
树右键菜单滚动条样式bug
列表面板界面行为bug
多选视图界面逻辑修复
图表刷新bug修复
日历部件选中抛出数据逻辑调整
编辑视图,app-span显示0时不显示
树视图右键界面行为刷新bug
快捷菜单控制台报错bug
门户加载自定义模型错误时,正常显示默认看板
修复雷达图显示异常问题
修复编辑类、分页导航视图带数据标题问题
修复饼图、漏斗图 获取序列参数错误问题
### 功能新增及优化
#### 模板
看板和门户布局模板调整,支持门户部件标题栏界面行为组
支持数据选择、地址框、自动完成、下拉列表、标签、选项框列表、单选列表等编辑器导航参数调整
支持树导航栏、表格导航栏、列表导航栏、卡片导航栏、日历导航栏、表单关系界面、数据选择面板、分页导航面板、数据关系栏、界面行为、新建逻辑、编辑逻辑导航参数调整
支持图表无数据时显示暂无数据
支持表格新建默认值
支持日历部件右键菜单
支持表格列触发界面行为
面板布局调整
#### 基础文件
门户部件视图的样式
数据选择,地址框,自动完成,下拉列表,标签,选项框列表,单选列表等编辑器导航参数调整
表单项label位置
调整登录页面
穿梭框编辑器支持
## v7.0.0-alpha.8 [2020-6-4] ## v7.0.0-alpha.8 [2020-6-4]
### Bug修复 ### Bug修复
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"element-ui": "^2.13.0", "element-ui": "^2.13.0",
"file-saver": "^2.0.2", "file-saver": "^2.0.2",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.16", "ibiz-gantt-elastic": "^1.0.17",
"ibiz-vue-lib": "^0.1.10", "ibiz-vue-lib": "^0.1.10",
"interactjs": "^1.9.4", "interactjs": "^1.9.4",
"moment": "^2.24.0", "moment": "^2.24.0",
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M511.999 1024a512 512 0 1 0-512-512 512 512 0 0 0 512 512z" fill="#23A0F0" /><path d="M735.765 604.422c-3.55-49.47-36.192-90.932-55.09-112.47a70.383 70.383 0 0 0-15.577-67.003v-1.718c0-97.235-68.028-167.254-153.35-167.55-85.333 0.342-153.35 70.315-153.35 167.55v1.718a70.383 70.383 0 0 0-15.576 67.003c-18.898 21.413-51.54 62.874-55.09 112.47a75.39 75.39 0 0 0 7.554 40.425c7.555 10.308 28.513-2.06 43.406-34.93a210.33 210.33 0 0 0 35.499 67.914c-36.307 8.477-46.729 44.897-34.475 64.853 8.59 14.086 28.445 25.657 62.419 25.657 60.473 0 87.267-16.611 99.18-28.057a16.259 16.259 0 0 1 20.844 0c11.913 11.57 38.684 28.057 99.18 28.057 34.02 0 53.715-11.57 62.419-25.657 12.253-19.922 1.831-56.342-34.475-64.853a211.627 211.627 0 0 0 35.499-67.914c14.893 32.87 35.85 45.124 43.406 34.93a76.493 76.493 0 0 0 7.577-40.425z" fill="#FFFFFF" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#36ab60" d="M352.814545 385.396364m-33.512727 0a33.512727 33.512727 0 1 0 67.025455 0 33.512727 33.512727 0 1 0-67.025455 0Z" /><path fill="#36ab60" d="M502.690909 384.465455m-33.512727 0a33.512727 33.512727 0 1 0 67.025454 0 33.512727 33.512727 0 1 0-67.025454 0Z" /><path fill="#36ab60" d="M576.232727 534.341818m-23.272727 0a23.272727 23.272727 0 1 0 46.545455 0 23.272727 23.272727 0 1 0-46.545455 0Z" /><path fill="#36ab60" d="M694.458182 536.203636m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z" /><path fill="#36ab60" d="M512 0C229.003636 0 0 229.003636 0 512s229.003636 512 512 512 512-229.003636 512-512S794.996364 0 512 0z m-87.505455 630.225455c-26.996364 0-48.407273-5.585455-75.403636-11.17091l-75.403636 37.236364 21.410909-64.232727c-53.992727-37.236364-85.643636-85.643636-85.643637-145.221818 0-102.4 96.814545-182.458182 215.04-182.458182 105.192727 0 198.283636 64.232727 216.901819 150.807273-6.516364-0.930909-13.963636-0.930909-20.48-0.93091-102.4 0-182.458182 76.334545-182.458182 170.356364 0 15.825455 2.792727 30.72 6.516363 44.683636-7.447273 0-13.963636 0.930909-20.48 0.93091z m314.647273 75.403636l15.825455 53.992727-58.647273-32.581818c-21.410909 5.585455-42.821818 11.170909-64.232727 11.170909-102.4 0-182.458182-69.818182-182.458182-155.461818s80.058182-155.461818 182.458182-155.461818c96.814545 0 182.458182 69.818182 182.458182 155.461818 0 47.476364-31.650909 90.298182-75.403637 122.88z" /></svg>
\ No newline at end of file
[ [
{
"srfkey": "YesNo",
"emptytext": "未定义",
"codelisttype":"static",
"items": [
{
"id": "1",
"label": "是",
"text": "是",
"data":"",
"codename":"Item_1",
"value": "1",
"disabled": false
}
, {
"id": "0",
"label": "否",
"text": "否",
"data":"",
"codename":"Item_0",
"value": "0",
"disabled": false
}
] ]
}
]
\ No newline at end of file
{ {
"ibzdictitemgridview": { "dictoptiongridview": {
"title": "字典项表格视图", "title": "字典项表格视图",
"caption": "字典项", "caption": "字典项",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictItemGridView", "viewname": "DictOptionGridView",
"viewtag": "47b7df6b047fe705eed95fd2fd500d1f" "viewtag": "56893daa82632caa84a6edeeb0acabaf"
}, },
"ibzdictitemeditview": { "dictcatalogpickupgridview": {
"title": "字典项目编辑视图", "title": "字典选择表格视图",
"caption": "字典项目", "caption": "字典",
"viewtype": "DEEDITVIEW", "viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictItemEditView", "viewname": "DictCatalogPickupGridView",
"viewtag": "8e2a3a0c6f621484640b51b1408635c4" "viewtag": "66f9c86e5a56857f977ef91461338255"
}, },
"ibzdictgridview": { "dictcataloggridview": {
"title": "实体表格视图", "title": "字典表格视图",
"caption": "数据字典", "caption": "字典",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictGridView", "viewname": "DictCatalogGridView",
"viewtag": "a4f6d040cdb6781cb505ec6b644617d9" "viewtag": "7395bd2cc14d34a67b772f13a50b2587"
}, },
"ibzdicteditview": { "dictoptioneditview": {
"title": "实体编辑视图", "title": "字典项编辑视图",
"caption": "数据字典", "caption": "字典项",
"viewtype": "DEEDITVIEW", "viewtype": "DEEDITVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictEditView", "viewname": "DictOptionEditView",
"viewtag": "b5f1416271b6cae0b21902468b267c5e" "viewtag": "8ad70084b5f98a26370b74da612d3f49"
}, },
"appindexview": { "appindexview": {
"title": "ibizlab-dict", "title": "ibizlab-dict",
...@@ -38,5 +38,21 @@ ...@@ -38,5 +38,21 @@
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "AppIndexView", "viewname": "AppIndexView",
"viewtag": "D394F269-6F97-4ED7-AFE8-F4A2E09BA602" "viewtag": "D394F269-6F97-4ED7-AFE8-F4A2E09BA602"
},
"dictcatalogeditview": {
"title": "字典编辑视图",
"caption": "字典",
"viewtype": "DEEDITVIEW",
"viewmodule": "dict",
"viewname": "DictCatalogEditView",
"viewtag": "e294ce8c6557ca26a032efa08eeb5508"
},
"dictcatalogpickupview": {
"title": "字典数据选择视图",
"caption": "字典",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "dict",
"viewname": "DictCatalogPickupView",
"viewtag": "eb4772f75066d6c9eb26d8b01d4e16b7"
} }
} }
...@@ -28,7 +28,6 @@ import AppCheckboxList from './components/app-checkbox-list/app-checkbox-list.vu ...@@ -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 AppRadioGroup from './components/app-radio-group/app-radio-group.vue'
import AppEmbedPicker from './components/app-embed-picker/app-embed-picker.vue' import AppEmbedPicker from './components/app-embed-picker/app-embed-picker.vue'
import AppTreePicker from './components/app-tree-picker/app-tree-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 AppFileUpload from './components/app-file-upload/app-file-upload.vue'
import AppImageUpload from './components/app-image-upload/app-image-upload.vue' import AppImageUpload from './components/app-image-upload/app-image-upload.vue'
import PropertyLayout from './components/property-layout/property-layout.vue' import PropertyLayout from './components/property-layout/property-layout.vue'
...@@ -53,7 +52,6 @@ import AppRate from './components/app-rate/app-rate.vue' ...@@ -53,7 +52,6 @@ import AppRate from './components/app-rate/app-rate.vue'
import AppSwitch from './components/app-switch/app-switch.vue' import AppSwitch from './components/app-switch/app-switch.vue'
import AppSlider from './components/app-slider/app-slider.vue' import AppSlider from './components/app-slider/app-slider.vue'
import AppStepper from './components/app-stepper/app-stepper.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 DatePickerRange from './components/date-picker-range/date-picker-range.vue'
import AppRangeDate from './components/app-range-date/app-range-date.vue' import AppRangeDate from './components/app-range-date/app-range-date.vue'
import AppActionBar from './components/app-actionbar/app-actionbar.vue' import AppActionBar from './components/app-actionbar/app-actionbar.vue'
...@@ -63,7 +61,6 @@ import AppStudioAction from './components/app-studioaction/app-studioaction.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 AppDebugActions from './components/app-debug-actions/app-debug-actions.vue'
import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue' import AppHeaderMenus from './components/app-header-menus/app-header-menus.vue'
import AppColumnLink from './components/app-column-link/app-column-link.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 DropDownListDynamic from './components/dropdown-list-dynamic/dropdown-list-dynamic.vue'
import AppImagePreview from './components/app-image-preview/app-image-preview.vue' import AppImagePreview from './components/app-image-preview/app-image-preview.vue'
import AppFormatData from './components/app-format-data/app-format-data.vue' import AppFormatData from './components/app-format-data/app-format-data.vue'
...@@ -76,8 +73,9 @@ import AppDepartmentSelect from './components/app-department-select/app-departme ...@@ -76,8 +73,9 @@ import AppDepartmentSelect from './components/app-department-select/app-departme
import IBizGroupSelect from './components/ibiz-group-select/ibiz-group-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 IBizGroupPicker from './components/ibiz-group-picker/ibiz-group-picker.vue'
import AppWFApproval from './components/app-wf-approval/app-wf-approval.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 AppTransfer from './components/app-transfer/app-transfer.vue'
import ContextMenuDrag from './components/context-menu-drag/context-menu-drag.vue'
// 全局挂载UI实体服务注册中心 // 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister; window['uiServiceRegister'] = uiServiceRegister;
...@@ -115,7 +113,7 @@ export const AppComponents = { ...@@ -115,7 +113,7 @@ export const AppComponents = {
v.component('app-radio-group',AppRadioGroup); v.component('app-radio-group',AppRadioGroup);
v.component('app-embed-picker', AppEmbedPicker); v.component('app-embed-picker', AppEmbedPicker);
v.component('app-tree-picker', AppTreePicker); 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-file-upload',AppFileUpload);
v.component('app-image-upload',AppImageUpload); v.component('app-image-upload',AppImageUpload);
v.component('property-layout',PropertyLayout); v.component('property-layout',PropertyLayout);
...@@ -140,7 +138,7 @@ export const AppComponents = { ...@@ -140,7 +138,7 @@ export const AppComponents = {
v.component('app-switch', AppSwitch); v.component('app-switch', AppSwitch);
v.component('app-slider', AppSlider); v.component('app-slider', AppSlider);
v.component('app-stepper', AppStepper); 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('date-picker-range',DatePickerRange);
v.component('app-range-date', AppRangeDate); v.component('app-range-date', AppRangeDate);
v.component('app-actionbar', AppActionBar); v.component('app-actionbar', AppActionBar);
...@@ -150,7 +148,7 @@ export const AppComponents = { ...@@ -150,7 +148,7 @@ export const AppComponents = {
v.component('app-debug-actions', AppDebugActions); v.component('app-debug-actions', AppDebugActions);
v.component('app-header-menus', AppHeaderMenus); v.component('app-header-menus', AppHeaderMenus);
v.component('app-column-link', AppColumnLink); 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('dropdown-list-dynamic', DropDownListDynamic);
v.component('app-image-preview', AppImagePreview); v.component('app-image-preview', AppImagePreview);
v.component('app-format-data', AppFormatData); v.component('app-format-data', AppFormatData);
...@@ -165,5 +163,6 @@ export const AppComponents = { ...@@ -165,5 +163,6 @@ export const AppComponents = {
v.component('app-wf-approval',AppWFApproval); v.component('app-wf-approval',AppWFApproval);
v.component('app-breadcrumb',Breadcrumb); v.component('app-breadcrumb',Breadcrumb);
v.component('app-transfer',AppTransfer); v.component('app-transfer',AppTransfer);
v.component('context-menu-drag',ContextMenuDrag);
}, },
}; };
\ No newline at end of file
...@@ -13,5 +13,12 @@ ...@@ -13,5 +13,12 @@
.no-redirect { .no-redirect {
color: #97a8be; color: #97a8be;
cursor: text; cursor: text;
.curselected{
color: #2196F3;
font-weight: bold;
}
.app-breadcrumb-selected{
cursor: pointer;
}
} }
} }
\ No newline at end of file
<template> <template>
<el-breadcrumb <el-breadcrumb class="app-breadcrumb" separator="/">
class="app-breadcrumb"
separator="/"
>
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item <template v-if="Object.is(this.navModel,'route')">
v-for="(item, index) in breadcrumbs" <el-breadcrumb-item v-for="(item, index) in breadcrumbs" :key="item.id">
:key="item.path" <span v-if="index === breadcrumbs.length-1" class="no-redirect">{{ item.title }}
> <span v-if="item.isselected === true">
<span <dropdown trigger='click' @on-click="selectNavData($event,item)">
v-if="index === breadcrumbs.length-1" <span class="app-breadcrumb-selected">
class="no-redirect" <i class="el-icon-caret-bottom"></i>
>{{ $t(item.meta.caption) }}</span> </span>
<a <dropdown-menu slot='list'>
v-else <dropdown-item v-for="(dataitem) in getPreNavData(item)" :name="dataitem.srfkey" :key="dataitem.srfkey">
@click.prevent="handleLink(item)" <span :class="{'curselected':isCurSelected(item,dataitem)}">{{dataitem.srfmajortext}}</span>
>{{ $t(item.meta.caption) }}</a> </dropdown-item>
</dropdown-menu>
</dropdown>
</span>
</span>
<a v-else @click.prevent="handleLink(item)">{{ item.title }}</a>
</el-breadcrumb-item> </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> </transition-group>
</el-breadcrumb> </el-breadcrumb>
</template> </template>
...@@ -24,14 +33,41 @@ ...@@ -24,14 +33,41 @@
<script lang="ts"> <script lang="ts">
import { Component, Vue, Watch, Prop } from 'vue-property-decorator' import { Component, Vue, Watch, Prop } from 'vue-property-decorator'
import { RouteRecord, Route } from 'vue-router' import { RouteRecord, Route } from 'vue-router'
import { Environment } from "@/environments/environment";
import NavDataService from '@/service/app/navdata-service';
import {Subscription } from 'rxjs';
@Component({ @Component({
}) })
export default class Breadcrumb extends Vue { export default class Breadcrumb extends Vue {
private breadcrumbs: RouteRecord[] = []; //面包屑列表 /**
* 面包屑列表
*
* @memberof Breadcrumb
*/
private breadcrumbs: Array<any> = [];
/**
* 导航服务
*
* @memberof Breadcrumb
*/
private navDataService = NavDataService.getInstance(this.$store);
/**
* 默认视图标识
*
* @memberof Breadcrumb
*/
@Prop() public indexViewTag!: string;
@Prop() public defPSAppView: any; //默认视图 /**
* 导航模式
*
* @memberof Breadcrumb
*/
@Prop({default:'tab'}) public navModel?:string;
/** /**
* 监听路由 * 监听路由
...@@ -43,13 +79,30 @@ export default class Breadcrumb extends Vue { ...@@ -43,13 +79,30 @@ export default class Breadcrumb extends Vue {
this.getBreadcrumb() this.getBreadcrumb()
} }
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof Dev
*/
public serviceStateEvent: Subscription | undefined;
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof Breadcrumb * @memberof Breadcrumb
*/ */
created() { 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,90 @@ export default class Breadcrumb extends Vue { ...@@ -58,24 +111,90 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb * @memberof Breadcrumb
*/ */
private getBreadcrumb() { private getBreadcrumb() {
if(Object.is(this.navModel,"route")){
this.breadcrumbs = this.navDataService.getNavData();
this.$forceUpdate();
}else{
this.breadcrumbs = this.$route.matched.filter((item) => { this.breadcrumbs = this.$route.matched.filter((item) => {
return item.meta && item.meta.caption 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 * @memberof Breadcrumb
*/ */
private handleLink(item: any) { private handleLink(item: any) {
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 => { this.$router.push(item).catch(err => {
console.warn(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();
}
}
} }
</script> </script>
......
...@@ -100,6 +100,22 @@ export default class AppFileUpload extends Vue { ...@@ -100,6 +100,22 @@ export default class AppFileUpload extends Vue {
*/ */
@Prop() public data!: string; @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 { ...@@ -146,7 +162,7 @@ export default class AppFileUpload extends Vue {
* @type {string} * @type {string}
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
@Prop() public uploadparams?: string; @Prop() public uploadparams?: any;
/** /**
* 下载参数 * 下载参数
...@@ -154,15 +170,7 @@ export default class AppFileUpload extends Vue { ...@@ -154,15 +170,7 @@ export default class AppFileUpload extends Vue {
* @type {string} * @type {string}
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
@Prop() public exportparams?: string; @Prop() public exportparams?: any;
/**
* 自定义参数
*
* @type {*}
* @memberof AppFileUpload
*/
@Prop() public customparams?: any;
/** /**
* 上传文件路径 * 上传文件路径
...@@ -186,20 +194,20 @@ export default class AppFileUpload extends Vue { ...@@ -186,20 +194,20 @@ export default class AppFileUpload extends Vue {
public files = []; public files = [];
/** /**
* 上传keys * 上传params
* *
* @type {Array<any>} * @type {Array<any>}
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
public upload_keys: Array<any> = []; public upload_params: Array<any> = [];
/** /**
* 导出keys * 导出params
* *
* @type {Array<any>} * @type {Array<any>}
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
public export_keys: Array<any> = []; public export_params: Array<any> = [];
/** /**
* 自定义数组 * 自定义数组
...@@ -239,31 +247,37 @@ export default class AppFileUpload extends Vue { ...@@ -239,31 +247,37 @@ export default class AppFileUpload extends Vue {
* @memberof AppFileUpload * @memberof AppFileUpload
*/ */
private dataProcess(): void { 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}`; let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) { if (this.upload_params.length > 0 ) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`; _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.uploadUrl = _url;
this.files.forEach((file: any) => { this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`; let url = `${this.downloadUrl}/${file.id}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) { if (this.export_params.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`; 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; file.url = url;
}); });
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
...@@ -290,28 +304,37 @@ export default class AppFileUpload extends Vue { ...@@ -290,28 +304,37 @@ export default class AppFileUpload extends Vue {
public mounted() { public mounted() {
this.appData = this.$store.getters.getAppData(); this.appData = this.$store.getters.getAppData();
let uploadparams: string = ''; let uploadparams: any = {};
let exportparams: string = ''; let exportparams: any = {};
let upload_keys: Array<string> = []; let upload_params: Array<string> = [];
let export_keys: Array<string> = []; let export_params: Array<string> = [];
let custom_arr: 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, '')) { if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = 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, '')) { if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = 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) => { for (const item in upload_params) {
custom_arr.push(`${name}=${this.customparams[name]}`); 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.setFiles(this.value);
this.dataProcess(); this.dataProcess();
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:is="viewname" :is="viewname"
class="viewcontainer2" class="viewcontainer2"
:viewdata ="viewdata" :viewdata ="viewdata"
:viewparam="viewparam"
:viewDefaultUsage="false" :viewDefaultUsage="false"
:formDruipart="formDruipart" :formDruipart="formDruipart"
:isformDruipart="true" :isformDruipart="true"
...@@ -119,6 +120,22 @@ export default class AppFormDRUIPart extends Vue { ...@@ -119,6 +120,22 @@ export default class AppFormDRUIPart extends Vue {
*/ */
@Prop() public viewparams!: any; @Prop() public viewparams!: any;
/**
* 局部上下文
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localContext!:any;
/**
* 局部参数
*
* @type {*}
* @memberof AppFormDRUIPart
*/
@Prop() public localParam!:any;
/** /**
* 应用实体参数名称 * 应用实体参数名称
* *
...@@ -240,21 +257,32 @@ export default class AppFormDRUIPart extends Vue { ...@@ -240,21 +257,32 @@ export default class AppFormDRUIPart extends Vue {
} }
const formData: any = data?data:JSON.parse(this.data); const formData: any = data?data:JSON.parse(this.data);
const _paramitem = formData[this.paramItem]; const _paramitem = formData[this.paramItem];
let viewdata = {}; let tempContext:any = {};
Object.assign(viewdata, this.$viewTool.getIndexViewParam()); let tempParam:any = {};
Object.assign(tempContext, this.$viewTool.getIndexViewParam());
const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters]; const _parameters: any[] = [...this.$viewTool.getIndexParameters(), ...this.parameters];
_parameters.forEach((parameter: any) => { _parameters.forEach((parameter: any) => {
const { pathName, parameterName }: { pathName: string, parameterName: string } = parameter; const { pathName, parameterName }: { pathName: string, parameterName: string } = parameter;
if (formData[parameterName] && !Object.is(formData[parameterName], '')) { if (formData[parameterName] && !Object.is(formData[parameterName], '')) {
Object.assign(viewdata, { [parameterName]: formData[parameterName] }); Object.assign(tempContext, { [parameterName]: formData[parameterName] });
} }
}); });
Object.assign(viewdata, { [this.paramItem]: _paramitem }); Object.assign(tempContext, { [this.paramItem]: _paramitem });
//设置顶层视图唯一标识 //设置顶层视图唯一标识
Object.assign(viewdata,this.context); Object.assign(tempContext,this.context);
Object.assign(viewdata,{srfparentdename:this.parentName,srfparentkey:_paramitem}); Object.assign(tempContext,{srfparentdename:this.parentName,srfparentkey:_paramitem});
this.viewdata = JSON.stringify(viewdata); // 设置局部上下文
this.viewparam = JSON.stringify(this.viewparams); if(this.localContext && Object.keys(this.localContext).length >0){
let _context:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localContext);
Object.assign(tempContext,_context);
}
this.viewdata = JSON.stringify(tempContext);
// 设置局部参数
if(this.localParam && Object.keys(this.localParam).length >0){
let _param:any = this.$util.computedNavData(formData,tempContext,this.viewparams,this.localParam);
Object.assign(tempParam,_param);
}
this.viewparam = JSON.stringify(tempParam);
if (this.isRelationalData) { if (this.isRelationalData) {
if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) { if (!_paramitem || _paramitem == null || Object.is(_paramitem, '')) {
this.blockUIStart(); this.blockUIStart();
......
.app-form-group { .app-form-group {
>.ivu-card-head { >.ivu-card-head {
>p { >p {
>i { >i {
...@@ -7,9 +8,12 @@ ...@@ -7,9 +8,12 @@
} }
} }
} }
>.ivu-card-extra { >.ivu-card-extra {
.item-extract-mode { .item-extract-mode {
display: flex; display: flex;
.item { .item {
margin-left: 12px; margin-left: 12px;
} }
...@@ -18,6 +22,7 @@ ...@@ -18,6 +22,7 @@
} }
.app-form-group.app-group-collapse-contant { .app-form-group.app-group-collapse-contant {
.ivu-card-body { .ivu-card-body {
display: none; display: none;
} }
...@@ -25,9 +30,12 @@ ...@@ -25,9 +30,12 @@
.app-group-flex { .app-group-flex {
height: 100%; height: 100%;
overflow: auto; overflow-y: auto;
> .ivu-card-body { overflow-x: hidden;
>.ivu-card-body {
height: calc(100% - 51px); height: calc(100% - 51px);
overflow: auto; overflow-y: auto;
overflow-x: hidden;
} }
} }
\ No newline at end of file
<template> <template>
<div class="app-form-group"> <div :class="classes">
<div v-if="uiStyle=='STYLE2'"> <template v-if="uiStyle=='STYLE2'">
<app-form-group2 <app-form-group2
:caption="caption" :caption="caption"
:uiStyle="uiStyle" :uiStyle="uiStyle"
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
:titleBarCloseMode="titleBarCloseMode"> :titleBarCloseMode="titleBarCloseMode">
<slot></slot> <slot></slot>
</app-form-group2> </app-form-group2>
</div> </template>
<div v-else> <template v-else>
<card v-if="isShowCaption === true" :bordered="false" :dis-hover="true" :class="classes"> <card v-if="isShowCaption === true" :bordered="false" :dis-hover="true" :class="classes">
<p class='' slot='title'> <p class='' slot='title'>
<icon v-if="titleBarCloseMode !== 0" :type="collapseContant ? 'ios-arrow-dropright-circle' : 'ios-arrow-dropdown-circle'" <icon v-if="titleBarCloseMode !== 0" :type="collapseContant ? 'ios-arrow-dropright-circle' : 'ios-arrow-dropdown-circle'"
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<dropdown-menu slot='list' v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)"> <dropdown-menu slot='list' v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)">
<dropdown-item v-for="(detail,index) in (uiActionGroup.details)" :key="index" :name="detail.name"> <dropdown-item v-for="(detail,index) in (uiActionGroup.details)" :key="index" :name="detail.name">
<span class='item' @click="doUIAction($event, detail)"> <span class='item' @click="doUIAction($event, detail)">
<template v-if="detail.isShowIcon">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.icon && !Object.is(detail.icon, '')">
<i :class="detail.icon" ></i> <i :class="detail.icon" ></i>
</template> </template>
...@@ -36,14 +37,17 @@ ...@@ -36,14 +37,17 @@
<img :src="detail.img" /> <img :src="detail.img" />
</div> </div>
</template> </template>
</template>
&nbsp; &nbsp;
<span> <span>
<template v-if="detail.isShowCaption">
<template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')"> <template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')">
{{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}} {{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}}
</template> </template>
<template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))"> <template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))">
{{detail.caption}} {{detail.caption}}
</template> </template>
</template>
</span> </span>
</span> </span>
</dropdown-item> </dropdown-item>
...@@ -55,6 +59,7 @@ ...@@ -55,6 +59,7 @@
<template v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)"> <template v-if="uiActionGroup.details && Array.isArray(uiActionGroup.details)">
<div v-for="(detail,index) in uiActionGroup.details" :key="index"> <div v-for="(detail,index) in uiActionGroup.details" :key="index">
<span class='item' @click="doUIAction($event, detail)"> <span class='item' @click="doUIAction($event, detail)">
<template v-if="detail.isShowIcon">
<template v-if="detail.icon && !Object.is(detail.icon, '')"> <template v-if="detail.icon && !Object.is(detail.icon, '')">
<i :class="detail.icon" ></i> <i :class="detail.icon" ></i>
</template> </template>
...@@ -63,14 +68,17 @@ ...@@ -63,14 +68,17 @@
<img :src="detail.img" /> <img :src="detail.img" />
</div> </div>
</template> </template>
</template>
&nbsp; &nbsp;
<span> <span>
<template v-if="detail.isShowCaption">
<template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')"> <template v-if="uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, '')">
{{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}} {{$t(`${uiActionGroup.langbase}.uiactions.${detail.uiactiontag}`)}}
</template> </template>
<template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))"> <template v-if="!(uiActionGroup.langbase && !Object.is(uiActionGroup.langbase, '') && detail.uiactiontag && !Object.is(detail.uiactiontag, ''))">
{{detail.caption}} {{detail.caption}}
</template> </template>
</template>
</span> </span>
</span> </span>
</div> </div>
...@@ -79,17 +87,17 @@ ...@@ -79,17 +87,17 @@
</template> </template>
</a > </a >
</template> </template>
<div v-if="Object.is(layoutType, 'FLEX')"> <template v-if="Object.is(layoutType, 'FLEX')">
<slot></slot> <slot></slot>
</div> </template>
<div v-if="!Object.is(layoutType, 'FLEX')"> <template v-if="!Object.is(layoutType, 'FLEX')">
<row :gutter="10"><slot></slot></row> <row :gutter="10"><slot></slot></row>
</div> </template>
</card> </card>
<row v-if="isShowCaption === false" :class="classes"> <template v-if="isShowCaption === false">
<slot></slot> <slot></slot>
</row> </template>
</div> </template>
</div> </div>
</template> </template>
......
.app-form-item { .app-form-item {
// margin-bottom: 16px; height: 100%;
>.ivu-form-item-label { .editor {
text-decoration: none; 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, .app-form-item.label-bottom {
.app-form-item-label {
display: block; display: block;
overflow: hidden;
white-space: nowrap;
} }
>.ivu-form-item-content { }
min-height: 36px;
.app-form-item.label-left, .app-form-item.label-right {
.app-form-item-label, .editor {
height: 100%;
}
}
.app-form-item.label-left {
.app-form-item-label {
float: left;
text-align: right;
}
}
.app-form-item.label-right {
.app-form-item-label {
float: right;
padding: 6px 0px 6px 10px;
} }
} }
.app-form-item-label-top {
>.ivu-form-item-label { .app-form-item.label-none {
float: none; .app-form-item-label {
display: inline-block; display: none !important;
padding: 0 0 10px;
} }
} }
\ No newline at end of file
<template> <template>
<div> <div :class="classes">
<div v-if="this.uiStyle === 'STYLE2'"> <template v-if="this.uiStyle === 'STYLE2'">
<app-form-item2 <app-form-item2
:caption="caption" :caption="caption"
:labelStyle="labelStyle" :labelStyle="labelStyle"
...@@ -14,29 +14,42 @@ ...@@ -14,29 +14,42 @@
:itemRules="itemRules"> :itemRules="itemRules">
<slot></slot> <slot></slot>
</app-form-item2> </app-form-item2>
</template>
<template v-if="this.uiStyle !== 'STYLE2'">
<div
v-if="Object.is(this.labelPos,'BOTTOM') || Object.is(this.labelPos,'NONE') || !this.labelPos"
class="editor"
:style="slotstyle"
>
<form-item :prop="name" :error="error" :required="required" :rules="rules">
<slot></slot>
</form-item>
</div> </div>
<div v-if="this.uiStyle !== 'STYLE2'"> <span
<form-item v-if="!Object.is(this.labelPos,'NONE') && this.isShowCaption && this.labelWidth > 0"
:prop="name" :style="labelstyle"
:error="error" :class="labelclasses"
:required="required" >
:rules="rules" <span v-if="required" style="color:red;">* </span>
:class="classes"
:label-width="this.isShowCaption ? !Object.is(this.labelPos, 'TOP') ? this.labelWidth : null : 0">
<span slot='label' v-if="this.isShowCaption && this.labelWidth > 0" :class="labelclasses">
{{this.isEmptyCaption ? '' : this.caption}} {{this.isEmptyCaption ? '' : this.caption}}
</span> </span>
<div
v-if="Object.is(this.labelPos,'TOP') || Object.is(this.labelPos,'LEFT') || Object.is(this.labelPos,'RIGHT')"
class="editor"
:style="slotstyle"
>
<form-item :prop="name" :error="error" :required="required" :rules="rules">
<slot></slot> <slot></slot>
</form-item> </form-item>
</div> </div>
</template>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Vue, Component, Prop, Watch } from 'vue-property-decorator'; import { Vue, Component, Prop, Watch } from "vue-property-decorator";
@Component({}) @Component({})
export default class AppFormItem extends Vue { export default class AppFormItem extends Vue {
/** /**
* 名称 * 名称
* *
...@@ -67,7 +80,13 @@ export default class AppFormItem extends Vue { ...@@ -67,7 +80,13 @@ export default class AppFormItem extends Vue {
* @type {(string | 'BOTTOM' | 'LEFT' | 'NONE' | 'RIGHT' | 'TOP')} * @type {(string | 'BOTTOM' | 'LEFT' | 'NONE' | 'RIGHT' | 'TOP')}
* @memberof AppFormItem * @memberof AppFormItem
*/ */
@Prop() public labelPos?: string | 'BOTTOM' | 'LEFT' | 'NONE' | 'RIGHT' | 'TOP'; @Prop() public labelPos?:
| string
| "BOTTOM"
| "LEFT"
| "NONE"
| "RIGHT"
| "TOP";
/** /**
* 标签宽度 * 标签宽度
...@@ -140,7 +159,7 @@ export default class AppFormItem extends Vue { ...@@ -140,7 +159,7 @@ export default class AppFormItem extends Vue {
* @param {*} oldVal * @param {*} oldVal
* @memberof AppFormItem * @memberof AppFormItem
*/ */
@Watch('itemRules',{deep:true}) @Watch("itemRules", { deep: true })
onItemRulesChange(newVal: any, oldVal: any) { onItemRulesChange(newVal: any, oldVal: any) {
if (newVal) { if (newVal) {
try { try {
...@@ -148,14 +167,13 @@ export default class AppFormItem extends Vue { ...@@ -148,14 +167,13 @@ export default class AppFormItem extends Vue {
const _rules: any[] = newVal; const _rules: any[] = newVal;
this.rules = [..._rules]; this.rules = [..._rules];
this.rules.some((rule: any) => { this.rules.some((rule: any) => {
if (rule.hasOwnProperty('required')) { if (rule.hasOwnProperty("required")) {
this.required = rule.required; this.required = rule.required;
return true; return true;
} }
return false; return false;
}); });
} catch (error) { } catch (error) {}
}
} }
} }
...@@ -167,10 +185,25 @@ export default class AppFormItem extends Vue { ...@@ -167,10 +185,25 @@ export default class AppFormItem extends Vue {
* @memberof AppFormItem * @memberof AppFormItem
*/ */
get classes(): string[] { get classes(): string[] {
return [ let posClass = "";
'app-form-item', switch (this.labelPos) {
Object.is(this.labelPos, 'TOP') ? 'app-form-item-label-top' : '' 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-form-item", posClass ];
} }
/** /**
...@@ -180,8 +213,38 @@ export default class AppFormItem extends Vue { ...@@ -180,8 +213,38 @@ export default class AppFormItem extends Vue {
* @type {string} * @type {string}
* @memberof AppFormItem * @memberof AppFormItem
*/ */
get labelclasses():string{ get labelclasses(): string {
return this.labelStyle?this.labelStyle:''; return this.labelStyle
? this.labelStyle + " app-form-item-label"
: "app-form-item-label";
}
/**
* label行内样式
*
* @readonly
* @type {string}
* @memberof AppFormItem
*/
get labelstyle(): any {
if (Object.is(this.labelPos, 'LEFT') || Object.is(this.labelPos, 'RIGHT')) {
return { width: this.labelWidth + "px" };
}
}
/**
* slot行内样式
*
* @readonly
* @type {string}
* @memberof AppFormItem
*/
get slotstyle(): any {
if (Object.is(this.labelPos, "LEFT")) {
return { marginLeft: this.labelWidth + "px" };
} else if (Object.is(this.labelPos, "RIGHT")) {
return { marginRight: this.labelWidth + "px" };
}
} }
/** /**
...@@ -195,19 +258,17 @@ export default class AppFormItem extends Vue { ...@@ -195,19 +258,17 @@ export default class AppFormItem extends Vue {
const _rules: any[] = this.itemRules; const _rules: any[] = this.itemRules;
this.rules = [..._rules]; this.rules = [..._rules];
this.rules.some((rule: any) => { this.rules.some((rule: any) => {
if (rule.hasOwnProperty('required')) { if (rule.hasOwnProperty("required")) {
this.required = rule.required; this.required = rule.required;
return true; return true;
} }
return false; return false;
}); });
} catch (error) { } catch (error) {}
}
} }
} }
} }
</script> </script>
<style lang='less'> <style lang='less'>
@import './app-form-item.less'; @import "./app-form-item.less";
</style> </style>
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
overflow: auto; overflow: auto;
> .ivu-tabs-tabpane { > .ivu-tabs-tabpane {
height: 100%; height: 100%;
overflow: auto; overflow: initial;
} }
} }
} }
......
...@@ -98,6 +98,22 @@ export default class AppImageUpload extends Vue { ...@@ -98,6 +98,22 @@ export default class AppImageUpload extends Vue {
*/ */
@Prop() public data!: string; @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 { ...@@ -185,20 +201,20 @@ export default class AppImageUpload extends Vue {
@Provide() public files = []; @Provide() public files = [];
/** /**
* 上传keys * 上传params
* *
* @type {Array<any>} * @type {Array<any>}
* @memberof AppImageUpload * @memberof AppImageUpload
*/ */
public upload_keys: Array<any> = []; public upload_params: Array<any> = [];
/** /**
* 导出keys * 导出params
* *
* @type {Array<any>} * @type {Array<any>}
* @memberof AppImageUpload * @memberof AppImageUpload
*/ */
public export_keys: Array<any> = []; public export_params: Array<any> = [];
/** /**
* 自定义数组 * 自定义数组
...@@ -238,26 +254,31 @@ export default class AppImageUpload extends Vue { ...@@ -238,26 +254,31 @@ export default class AppImageUpload extends Vue {
* @memberof AppImageUpload * @memberof AppImageUpload
*/ */
private dataProcess(): void { 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}`; let _url = `${Environment.BaseUrl}${Environment.UploadFile}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) { if (this.upload_params.length > 0 ) {
_url = `${_url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`; _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.uploadUrl = _url;
this.files.forEach((file: any) => { this.files.forEach((file: any) => {
let url = `${this.downloadUrl}/${file.id}`; let url = `${this.downloadUrl}/${file.id}`;
if (upload_arr.length > 0 || this.custom_arr.length > 0) { if (this.export_params.length > 0) {
url = `${url}?${upload_arr.join('&')}${upload_arr.length > 0 ? '&' : ''}${this.custom_arr.join('&')}`; 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; file.url = url;
}); });
...@@ -288,28 +309,35 @@ export default class AppImageUpload extends Vue { ...@@ -288,28 +309,35 @@ export default class AppImageUpload extends Vue {
public mounted() { public mounted() {
this.appData = this.$store.getters.getAppData(); this.appData = this.$store.getters.getAppData();
let uploadparams: string = ''; let uploadparams: any = {};
let exportparams: string = ''; let exportparams: any = {};
let upload_keys: Array<string> = []; let upload_params: Array<string> = [];
let export_keys: Array<string> = []; let export_params: Array<string> = [];
let custom_arr: 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, '')) { if (this.uploadparams && !Object.is(this.uploadparams, '')) {
uploadparams = 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, '')) { if (this.exportparams && !Object.is(this.exportparams, '')) {
exportparams = 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) => { for (const item in upload_params) {
custom_arr.push(`${name}=${this.customparams[name]}`); 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.setFiles(this.value);
this.dataProcess(); this.dataProcess();
......
<template> <template>
<div class="app-picker-select-view"> <div class="app-picker-select-view">
<Dropdown :visible="visible" trigger="custom" style="left:0px;width: 100%" @on-clickoutside="() => {triggerMenu(false);}" > <Dropdown :visible="visible" trigger="custom" style="left:0px;width: 100%" @on-clickoutside="() => {triggerMenu(false);}" >
<Input v-if="isSingleSelect" v-model="queryValue" class="tree-input" type="text" :placeholder="placeholder ? placeholder : $t('components.AppPickerSelectViewSelectView.placeholder')" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" > <Input v-if="isSingleSelect" v-model="queryValue" class="tree-input" type="text" :placeholder="placeholder ? placeholder : $t('components.appPickerSelectView.placeholder')" :disabled="disabled" @on-change="OnInputChange" @on-focus="()=>{triggerMenu(true);}" >
<template v-slot:suffix> <template v-slot:suffix>
<i v-if="queryValue && !disabled" class='el-icon-circle-close' @click="onClear"></i> <i v-if="queryValue && !disabled" class='el-icon-circle-close' @click="onClear"></i>
<Icon :type="visible ? 'ios-arrow-up' : 'ios-arrow-down'" class="icon-arrow" @click="() => {triggerMenu();}"></Icon> <Icon :type="visible ? 'ios-arrow-up' : 'ios-arrow-down'" class="icon-arrow" @click="() => {triggerMenu();}"></Icon>
...@@ -34,7 +34,7 @@ import { ViewTool } from '@/utils/view-tool/view-tool'; ...@@ -34,7 +34,7 @@ import { ViewTool } from '@/utils/view-tool/view-tool';
@Component({ @Component({
}) })
export default class AppPickerSelectViewSelectView extends Vue { export default class AppPickerSelectView extends Vue {
/** /**
* 视图上下文 * 视图上下文
* *
...@@ -256,7 +256,7 @@ export default class AppPickerSelectViewSelectView extends Vue { ...@@ -256,7 +256,7 @@ export default class AppPickerSelectViewSelectView extends Vue {
*/ */
public handlePublicParams(arg: any): boolean { public handlePublicParams(arg: any): boolean {
if (!this.data) { if (!this.data) {
this.$Notice.error({ title: (this.$t('components.AppPickerSelectViewSelectView.error') as any), desc: (this.$t('components.AppPickerSelectViewSelectView.formdataException') as any) }); this.$Notice.error({ title: (this.$t('components.appPickerSelectView.error') as any), desc: (this.$t('components.appPickerSelectView.formdataException') as any) });
return false; return false;
} }
// 合并表单参数 // 合并表单参数
...@@ -306,7 +306,7 @@ export default class AppPickerSelectViewSelectView extends Vue { ...@@ -306,7 +306,7 @@ export default class AppPickerSelectViewSelectView extends Vue {
if(this.isSingleSelect){ if(this.isSingleSelect){
this.queryValue = newVal; this.queryValue = newVal;
if (!this.data || !this.valueitem || !this.data[this.valueitem]) { if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
this.$Notice.error({ title: (this.$t('components.AppPickerSelectViewSelectView.error') as any), desc: (this.$t('components.AppPickerSelectViewSelectView.editor') as any)+this.name+(this.$t('components.AppPickerSelectViewSelectView.valueitemException') as any) }); this.$Notice.error({ title: (this.$t('components.appPickerSelectView.error') as any), desc: (this.$t('components.appPickerSelectView.editor') as any)+this.name+(this.$t('components.appPickerSelectView.valueitemException') as any) });
}else{ }else{
let _viewparam = JSON.parse(this.viewparam); let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.value }]; _viewparam.selectedData = [{srfkey: this.data[this.valueitem], srfmajortext: this.value }];
...@@ -324,11 +324,11 @@ export default class AppPickerSelectViewSelectView extends Vue { ...@@ -324,11 +324,11 @@ export default class AppPickerSelectViewSelectView extends Vue {
this.items.push({ srfmajortext : item.srfmajortext, srfkey: item.srfkey }); this.items.push({ srfmajortext : item.srfmajortext, srfkey: item.srfkey });
} }
}); });
}
let _viewparam = JSON.parse(this.viewparam); let _viewparam = JSON.parse(this.viewparam);
_viewparam.selectedData = this.selectItems; _viewparam.selectedData = this.selectItems;
this.viewparam = JSON.stringify(_viewparam); this.viewparam = JSON.stringify(_viewparam);
} }
}
this.$forceUpdate(); this.$forceUpdate();
} }
...@@ -418,7 +418,7 @@ export default class AppPickerSelectViewSelectView extends Vue { ...@@ -418,7 +418,7 @@ export default class AppPickerSelectViewSelectView extends Vue {
*/ */
public openLinkView($event: any): void { public openLinkView($event: any): void {
if (!this.data || !this.valueitem || !this.data[this.valueitem]) { if (!this.data || !this.valueitem || !this.data[this.valueitem]) {
console.error({ title: (this.$t('components.AppPickerSelectViewSelectView.error') as any), desc: (this.$t('components.AppPickerSelectViewSelectView.editor') as any)+this.name+(this.$t('components.AppPickerSelectViewSelectView.valueitemException') as any) }); console.error({ title: (this.$t('components.appPickerSelectView.error') as any), desc: (this.$t('components.appPickerSelectView.editor') as any)+this.name+(this.$t('components.appPickerSelectView.valueitemException') as any) });
return; return;
} }
// 公共参数处理 // 公共参数处理
......
...@@ -242,7 +242,7 @@ export default class AppPicker extends Vue { ...@@ -242,7 +242,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal * @param {*} oldVal
* @memberof AppPicker * @memberof AppPicker
*/ */
@Watch('value') @Watch('value',{immediate: true})
public onValueChange(newVal: any, oldVal: any) { public onValueChange(newVal: any, oldVal: any) {
this.curvalue = newVal; this.curvalue = newVal;
if (Object.is(this.editortype, 'dropdown') && this.valueitem) { if (Object.is(this.editortype, 'dropdown') && this.valueitem) {
......
<template> <template>
<codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator" :data="data" :itemParam="itemParam" :context="context" :viewparams="viewparams"></codelist> <codelist v-if="tag" :tag="tag" :value="value" :codelistType="codelistType" :renderMode="renderMode" :valueSeparator="valueSeparator" :textSeparator="textSeparator" :data="data" :localContext="localContext" :localParam="localParam" :context="context" :viewparams="viewparams"></codelist>
<app-upload-file-info v-else-if="Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')" :value="value" :name="name"></app-upload-file-info> <app-upload-file-info v-else-if="Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')" :value="value" :name="name"></app-upload-file-info>
<span class="app-span" v-else >{{text}}</span> <span class="app-span" v-else >{{text}}</span>
</template> </template>
...@@ -145,17 +145,24 @@ export default class AppSpan extends Vue { ...@@ -145,17 +145,24 @@ export default class AppSpan extends Vue {
* @memberof AppSpan * @memberof AppSpan
*/ */
public load(){ public load(){
if(!this.value || this.tag){ if(this.tag){
return; //代码表走codelist组件 return; //代码表走codelist组件
}else if(this.editorType === "ADDRESSPICKUP"){ }else if(this.editorType === "ADDRESSPICKUP"){
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{
JSON.parse(this.value).forEach((item:any,index:number) => { JSON.parse(this.value).forEach((item:any,index:number) => {
this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext; this.text += index === 0 ? item.srfmajortext : ","+item.srfmajortext;
}); });
}
}else{
if(this.$util.isEmpty(this.value)){
this.text = '';
}else{ }else{
this.text = this.value; this.text = this.value;
} }
} }
}
} }
</script> </script>
......
.ivu-select-dropdown { .transfer-select{
.ivu-select-dropdown {
padding: 0px; padding: 0px;
.hidden { .hidden {
display: none; display: none;
} }
.el-transfer{
min-width: 100% !important;
display: flex;
justify-content: space-between;
.el-transfer-panel{
min-width: 25%;
} }
.el-transfer__buttons{
align-self: center;
}
}
}
}
...@@ -86,6 +86,9 @@ export default class AppUser extends Vue { ...@@ -86,6 +86,9 @@ export default class AppUser extends Vue {
if (response && response.status === 200) { if (response && response.status === 200) {
localStorage.removeItem('user'); localStorage.removeItem('user');
localStorage.removeItem('token'); localStorage.removeItem('token');
let leftTime = new Date();
leftTime.setTime(leftTime.getSeconds() - 1);
document.cookie = "ibzuaa-token=;expires=" + leftTime.toUTCString();
this.$router.push({ name: 'login' }); this.$router.push({ name: 'login' });
} }
}).catch((error: any) =>{ }).catch((error: any) =>{
......
.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" @mouseover="showMenuDrawer" @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 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="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 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="outStar(item)">
<Icon type="ios-star" />
</span>
<span v-else class="star" @click="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 {
/**
* 抽屉菜单状态
*
* @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 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 @@ ...@@ -5,4 +5,7 @@
top: 0; top: 0;
right: 20px; right: 20px;
} }
.ivu-input-number-input{
text-align: right;
}
} }
\ No newline at end of file
<template> <template>
<div class="input-unit"> <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" :placeholder="placeholder"
:size="size" :size="size"
:type="type" :type="type"
v-model="CurrentVal" v-model="CurrentVal"
:disabled="disabled ? true : false" :disabled="disabled ? true : false"
:autosize="autoSize"
@on-enter="enter" @on-enter="enter"
></i-input> ></i-input>
<div class="unit-text">{{unit}}</div> <div class="unit-text">{{unit}}</div>
...@@ -62,14 +70,34 @@ export default class InputBox extends Vue { ...@@ -62,14 +70,34 @@ export default class InputBox extends Vue {
*/ */
@Prop() public type?: string; @Prop() public type?: string;
/**
* 精度
*
* @type {number}
* @memberof InputBox
*/
@Prop({default: 0}) public precision?: number;
/**
* 多行文本行数
*
* @type {string}
* @memberof InputBox
*/
@Prop() public autoSize?: any;
/** /**
* 当前值 * 当前值
* *
* @memberof InputBox * @memberof InputBox
*/ */
get CurrentVal() { get CurrentVal() {
if(Object.is(this.type, 'number') && this.itemValue && !isNaN(this.itemValue)){
return Number(Number(this.itemValue).toFixed(this.precision));
}else{
return this.itemValue; return this.itemValue;
} }
}
/** /**
* 值变化 * 值变化
......
.login{ .login{
width: 100vh; display: -webkit-box;
height: 100vh; display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
min-height: 100%;
background: #108cee;
> img{ > img{
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
} }
.login-logo{
position: fixed;
left: 80px;
top: 80px;
}
.login-content{
position: fixed;
left: 10%;
top: 30%;
width: 60%;
>span{
color: #fff;
font-size: 84px;
}
}
&-con{ &-con{
position: fixed; position: absolute;
right: 160px; left: 0;
top: 50%; right: 0;
transform: translateY(-60%); top: 20%;
width: 300px; margin: auto;
.ivu-card{ width: 450px;
border-radius: 15px;
.ivu-card-head { .ivu-card-head {
padding: 14px 6px; padding: 30px 0px 20px 0px;
border-bottom: 0px;
>p{ >p{
line-height: 20px; height: 30px;
line-height: 30px;
font-size: 20px; font-size: 20px;
color: #17233d; color: #666666;
font-weight: 700; font-weight: 600;
text-align:center;
} }
} }
&-header{ &-header{
...@@ -45,26 +38,81 @@ ...@@ -45,26 +38,81 @@
padding: 30px 0; padding: 30px 0;
} }
.form-con{ .form-con{
padding: 10px 0 0; padding: 0px 20px 0px 20px;
.ivu-form-item{ >i-button{
margin-bottom: 20px; width: 170px;
} height: 40px;
p{
font-size: 14px;
font-weight: bold;
height: 21px;
line-height: 21px;
}
button{
background-image: linear-gradient(to bottom,#8bbcf1 0%,#2d8cf0 100%);
border-color:#8bbcf1;
} }
} }
.login-tip{ .login-tip{
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
color: #5f4949; color: red;
} height: 30px;
} }
} }
} }
.login_btn{
width: 175px;
height: 40px;
font-size: 18px;
font-family: MicrosoftYaHei;
}
.login_reset {
width: 175px;
height: 40px;
font-size: 18px;
font-family: MicrosoftYaHei;
float: right;
}
.form_tipinfo {
font-family: MicrosoftYaHei-Bold;
font-size: 14px;
font-weight: bold;
font-stretch: normal;
line-height: 24px;
letter-spacing: 0px;
color: #666666;
}
form_tipinfo_more {
font-family: MicrosoftYaHei;
font-size: 14px;
font-weight: normal;
letter-spacing: 0px;
color: #666666;
}
.log_footer {
display: block;
padding: 0 16px;
margin: 48px 0 24px;
text-align: center;
color: #212529;
}
.log_footer a {
color: white;
text-decoration: none;
}
.sign-btn {
display: inline-block;
cursor: pointer;
margin-left: 10px;
}
.wx-svg-container,
.qq-svg-container {
display: inline-block;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
padding-top: 1px;
border-radius: 4px;
margin-bottom: -20px;
margin-top: 10px;
}
\ No newline at end of file
...@@ -227,7 +227,7 @@ export default class TabPageExp extends Vue { ...@@ -227,7 +227,7 @@ export default class TabPageExp extends Vue {
* @memberof TabPageExp * @memberof TabPageExp
*/ */
public setCurPageCaption(caption: string, title: any, info: string) { 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; return;
} }
this.$store.commit("setCurPageCaption", { this.$store.commit("setCurPageCaption", {
......
...@@ -247,10 +247,19 @@ export default class EditViewEngine extends ViewEngine { ...@@ -247,10 +247,19 @@ export default class EditViewEngine extends ViewEngine {
*/ */
public setTabCaption(info: string): void { public setTabCaption(info: string): void {
let viewdata: any = this.view.model; let viewdata: any = this.view.model;
if (viewdata && info && !Object.is(info, '') && this.view.$tabPageExp && (viewdata.srfTitle.indexOf(" - ") === -1)) { let index:number = viewdata.srfTitle.indexOf("-");
this.view.$tabPageExp.setCurPageCaption(viewdata.srfTitle, viewdata.srfTitle, info); 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.$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();
} }
} }
......
...@@ -89,6 +89,7 @@ export default class EditView2Engine extends EditViewEngine { ...@@ -89,6 +89,7 @@ export default class EditView2Engine extends EditViewEngine {
*/ */
public onFormLoad(arg: any = {}): void { public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg); super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDRBar()) { if (this.getDRBar()) {
const tag = this.getDRBar().name; const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.vieparams }); this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.vieparams });
...@@ -103,6 +104,7 @@ export default class EditView2Engine extends EditViewEngine { ...@@ -103,6 +104,7 @@ export default class EditView2Engine extends EditViewEngine {
*/ */
public onFormSave(arg: any = {}): void { public onFormSave(arg: any = {}): void {
super.onFormSave(arg); super.onFormSave(arg);
this.view.formData = arg;
if (this.getDRBar()) { if (this.getDRBar()) {
const tag = this.getDRBar().name; const tag = this.getDRBar().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams }); this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......
...@@ -89,6 +89,7 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -89,6 +89,7 @@ export default class EditView3Engine extends EditViewEngine {
*/ */
public onFormLoad(arg: any = {}): void { public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg); super.onFormLoad(arg);
this.view.formData = arg;
if (this.getDrTab()) { if (this.getDrTab()) {
const tag = this.getDrTab().name; const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams }); this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
...@@ -103,6 +104,7 @@ export default class EditView3Engine extends EditViewEngine { ...@@ -103,6 +104,7 @@ export default class EditView3Engine extends EditViewEngine {
*/ */
public onFormSave(arg: any = {}): void { public onFormSave(arg: any = {}): void {
super.onFormSave(arg); super.onFormSave(arg);
this.view.formData = arg;
if (this.getDrTab()) { if (this.getDrTab()) {
const tag = this.getDrTab().name; const tag = this.getDrTab().name;
this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams }); this.setViewState2({ tag: tag, action: 'state', viewdata: this.view.viewparams });
......
import DataViewEngine from './data-view-engine';
/**
* 视图引擎基础
*
* @export
* @class DataViewEngine
* @extends {MDViewEngine}
*/
export default class KanBanViewEngine extends DataViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof DataViewEngine
*/
protected kanban: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof DataViewEngine
*/
public init(options: any = {}): void {
this.kanban = options.kanban;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'kanban')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof DataViewEngine
*/
public getMDCtrl(): any {
return this.kanban;
}
}
\ No newline at end of file
...@@ -367,6 +367,15 @@ export default class MDViewEngine extends ViewEngine { ...@@ -367,6 +367,15 @@ export default class MDViewEngine extends ViewEngine {
* @memberof MDViewEngine * @memberof MDViewEngine
*/ */
public MDCtrlLoad(args: any[]) { 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) { if (this.view) {
this.view.$emit('viewload', args); this.view.$emit('viewload', args);
} }
...@@ -391,11 +400,11 @@ export default class MDViewEngine extends ViewEngine { ...@@ -391,11 +400,11 @@ export default class MDViewEngine extends ViewEngine {
} }
// 快速分组和快速搜索栏 // 快速分组和快速搜索栏
let otherQueryParam:any = {}; let otherQueryParam:any = {};
if(this.view && this.view.qucikGroupData){ if(this.view && this.view.quickGroupData){
Object.assign(otherQueryParam,this.view.qucikGroupData); Object.assign(otherQueryParam,this.view.quickGroupData);
} }
if(this.view && this.view.qucikFormData){ if(this.view && this.view.quickFormData){
Object.assign(otherQueryParam,this.view.qucikFormData); Object.assign(otherQueryParam,this.view.quickFormData);
} }
Object.assign(arg,{viewparams:otherQueryParam}); Object.assign(arg,{viewparams:otherQueryParam});
} }
......
import ibzdictitem_en_US from '@locale/lanres/entities/ibzdict-item/ibzdict-item_en_US'; import dictcatalog_en_US from '@locale/lanres/entities/dict-catalog/dict-catalog_en_US';
import ibzdict_en_US from '@locale/lanres/entities/ibzdict/ibzdict_en_US'; import dictoption_en_US from '@locale/lanres/entities/dict-option/dict-option_en_US';
import components_en_US from '@locale/lanres/components/components_en_US'; import components_en_US from '@locale/lanres/components/components_en_US';
import codelist_en_US from '@locale/lanres/codelist/codelist_en_US'; import codelist_en_US from '@locale/lanres/codelist/codelist_en_US';
import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US'; import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
...@@ -7,50 +7,50 @@ import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US'; ...@@ -7,50 +7,50 @@ import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
export default { export default {
app: { app: {
commonWords:{ commonWords:{
error: 'Error', error: "Error",
success: 'Success', success: "Success",
ok: 'OK', ok: "OK",
cancel: 'Cancel', cancel: "Cancel",
}, },
local:{ local:{
new: 'New' new: "New"
}, },
gridpage: { gridpage: {
choicecolumns: 'Choice columns', choicecolumns: "Choice columns",
refresh: 'refresh', refresh: "refresh",
show: 'Show', show: "Show",
records: 'records', records: "records",
totle: 'totle', totle: "totle",
}, },
tabpage: { tabpage: {
sureclosetip: { sureclosetip: {
title: 'Close warning', title: "Close warning",
content: 'Form data Changed, are sure close?', content: "Form data Changed, are sure close?",
}, },
closeall: 'Close all', closeall: "Close all",
closeother: 'Close other', closeother: "Close other",
}, },
fileUpload: { fileUpload: {
caption: 'Upload', caption: "Upload",
}, },
searchButton: { searchButton: {
search: 'Search', search: "Search",
reset: 'Reset', reset: "Reset",
}, },
calendar:{ calendar:{
today: 'today', today: "today",
month: 'month', month: "month",
week: 'week', week: "week",
day: 'day', day: "day",
list: 'list', list: "list",
dateSelectModalTitle: 'select the time you wanted', dateSelectModalTitle: "select the time you wanted",
gotoDate: 'goto', gotoDate: "goto",
}, },
// 非实体视图 // 非实体视图
views: { views: {
appindexview: { appindexview: {
caption: 'ibizlab-dict', caption: "ibizlab-dict",
title: 'ibizlab-dict', title: "ibizlab-dict",
}, },
}, },
utilview:{ utilview:{
...@@ -60,13 +60,14 @@ export default { ...@@ -60,13 +60,14 @@ export default {
}, },
menus: { menus: {
appindexview: { appindexview: {
menuitem1: '数据字典', menuitem1: "目录",
menuitem2: "栏目",
}, },
}, },
}, },
entities: { entities: {
ibzdictitem: ibzdictitem_en_US, dictcatalog: dictcatalog_en_US,
ibzdict: ibzdict_en_US, dictoption: dictoption_en_US,
}, },
components: components_en_US, components: components_en_US,
codelist: codelist_en_US, codelist: codelist_en_US,
......
import ibzdictitem_zh_CN from '@locale/lanres/entities/ibzdict-item/ibzdict-item_zh_CN'; import dictcatalog_zh_CN from '@locale/lanres/entities/dict-catalog/dict-catalog_zh_CN';
import ibzdict_zh_CN from '@locale/lanres/entities/ibzdict/ibzdict_zh_CN'; import dictoption_zh_CN from '@locale/lanres/entities/dict-option/dict-option_zh_CN';
import components_zh_CN from '@locale/lanres/components/components_zh_CN'; import components_zh_CN from '@locale/lanres/components/components_zh_CN';
import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN'; import codelist_zh_CN from '@locale/lanres/codelist/codelist_zh_CN';
import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN'; import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
...@@ -7,50 +7,50 @@ import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN'; ...@@ -7,50 +7,50 @@ import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
export default { export default {
app: { app: {
commonWords:{ commonWords:{
error: '失败', error: "失败",
success: '成功', success: "成功",
ok: '确认', ok: "确认",
cancel: '取消', cancel: "取消",
}, },
local:{ local:{
new: '新建' new: "新建"
}, },
gridpage: { gridpage: {
choicecolumns: '选择列', choicecolumns: "选择列",
refresh: '刷新', refresh: "刷新",
show: '显示', show: "显示",
records: '条', records: "条",
totle: '共', totle: "共",
}, },
tabpage: { tabpage: {
sureclosetip: { sureclosetip: {
title: '关闭提醒', title: "关闭提醒",
content: '表单数据已经修改,确定要关闭?', content: "表单数据已经修改,确定要关闭?",
}, },
closeall: '关闭所有', closeall: "关闭所有",
closeother: '关闭其他', closeother: "关闭其他",
}, },
fileUpload: { fileUpload: {
caption: '上传', caption: "上传",
}, },
searchButton: { searchButton: {
search: '搜索', search: "搜索",
reset: '重置', reset: "重置",
}, },
calendar:{ calendar:{
today: '今天', today: "今天",
month: '月', month: "月",
week: '周', week: "周",
day: '天', day: "天",
list: '列', list: "列",
dateSelectModalTitle: '选择要跳转的时间', dateSelectModalTitle: "选择要跳转的时间",
gotoDate: '跳转', gotoDate: "跳转",
}, },
// 非实体视图 // 非实体视图
views: { views: {
appindexview: { appindexview: {
caption: 'ibizlab-dict', caption: "ibizlab-dict",
title: 'ibizlab-dict', title: "ibizlab-dict",
}, },
}, },
utilview:{ utilview:{
...@@ -60,13 +60,14 @@ export default { ...@@ -60,13 +60,14 @@ export default {
}, },
menus: { menus: {
appindexview: { appindexview: {
menuitem1: '数据字典', menuitem1: "目录",
menuitem2: "栏目",
}, },
}, },
}, },
entities: { entities: {
ibzdictitem: ibzdictitem_zh_CN, dictcatalog: dictcatalog_zh_CN,
ibzdict: ibzdict_zh_CN, dictoption: dictoption_zh_CN,
}, },
components: components_zh_CN, components: components_zh_CN,
codelist: codelist_zh_CN, codelist: codelist_zh_CN,
......
export default { export default {
YesNo: {
"1": "是",
"0": "否",
"empty": ""
},
}; };
\ No newline at end of file
export default { export default {
YesNo: {
"1": "是",
"0": "否",
"empty": "",
},
}; };
\ No newline at end of file
export default {
fields: {
id: "标识",
name: "名称",
group: "分组",
memo: "备注",
enable: "是否有效",
updatedate: "最后修改时间",
},
views: {
pickupgridview: {
caption: "字典",
title: "字典选择表格视图",
},
gridview: {
caption: "字典",
title: "字典表格视图",
},
editview: {
caption: "字典",
title: "字典编辑视图",
},
pickupview: {
caption: "字典",
title: "字典数据选择视图",
},
},
main_form: {
details: {
group1: "字典基本信息",
druipart1: "字典项",
formpage1: "基本信息",
srfupdatedate: "最后修改时间",
srforikey: "",
srfkey: "标识",
srfmajortext: "名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
cid: "标识",
cname: "名称",
cgroup: "分组",
memo: "备注",
},
uiactions: {
},
},
main_grid: {
columns: {
cid: "标识",
cname: "名称",
cgroup: "分组",
memo: "备注",
updatedate: "最后修改时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
n_cid_like: "标识(文本包含(%))",
n_cname_like: "名称(文本包含(%))",
n_cgroup_like: "分组(文本包含(%))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
export default {
fields: {
id: "标识",
name: "名称",
group: "分组",
memo: "备注",
enable: "是否有效",
updatedate: "最后修改时间",
},
views: {
pickupgridview: {
caption: "字典",
title: "字典选择表格视图",
},
gridview: {
caption: "字典",
title: "字典表格视图",
},
editview: {
caption: "字典",
title: "字典编辑视图",
},
pickupview: {
caption: "字典",
title: "字典数据选择视图",
},
},
main_form: {
details: {
group1: "字典基本信息",
druipart1: "字典项",
formpage1: "基本信息",
srfupdatedate: "最后修改时间",
srforikey: "",
srfkey: "标识",
srfmajortext: "名称",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
cid: "标识",
cname: "名称",
cgroup: "分组",
memo: "备注",
},
uiactions: {
},
},
main_grid: {
columns: {
cid: "标识",
cname: "名称",
cgroup: "分组",
memo: "备注",
updatedate: "最后修改时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
n_cid_like: "标识(文本包含(%))",
n_cname_like: "名称(文本包含(%))",
n_cgroup_like: "分组(文本包含(%))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
export default {
fields: {
value_key: "标识",
catalog_id: "目录代码",
catalog_name: "目录",
value: "代码值",
label: "名称",
parent: "父代码值",
filter: "过滤项",
cls: "栏目样式",
icon_class: "图标",
disabled: "是否禁用",
expired: "过期/失效",
showorder: "排序",
extension: "扩展",
updatedate: "最后修改时间",
},
views: {
gridview: {
caption: "字典项",
title: "字典项表格视图",
},
editview: {
caption: "字典项",
title: "字典项编辑视图",
},
},
main_form: {
details: {
group1: "字典项基本信息",
formpage1: "基本信息",
srfupdatedate: "最后修改时间",
srforikey: "",
srfkey: "标识",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
cname: "目录",
val: "代码值",
label: "名称",
pval: "父代码值",
showorder: "排序",
disabled: "是否禁用",
expired: "过期/失效",
vfilter: "过滤项",
iconcls: "图标",
cls: "栏目样式",
extension: "扩展",
cid: "目录代码",
vkey: "标识",
},
uiactions: {
},
},
main_grid: {
columns: {
cid: "目录代码",
cname: "目录",
val: "代码值",
label: "名称",
pval: "父代码值",
cls: "栏目样式",
iconcls: "图标",
vfilter: "过滤项",
disabled: "是否禁用",
expired: "过期/失效",
showorder: "排序",
extension: "扩展",
updatedate: "最后修改时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
n_cname_like: "目录(文本包含(%))",
n_val_like: "代码值(文本包含(%))",
n_label_like: "名称(文本包含(%))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "New",
tip: "New",
},
tbitem4: {
caption: "Edit",
tip: "Edit {0}",
},
tbitem6: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "Remove",
tip: "Remove {0}",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "Export",
tip: "Export {0} Data To Excel",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "Export Data Model",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "Filter",
tip: "Filter",
},
tbitem18: {
caption: "Help",
tip: "Help",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "Save",
tip: "Save",
},
tbitem4: {
caption: "Save And New",
tip: "Save And New",
},
tbitem5: {
caption: "Save And Close",
tip: "Save And Close Window",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "Remove And Close",
tip: "Remove And Close Window",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "New",
tip: "New",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "Copy",
tip: "Copy {0}",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "Help",
tip: "Help",
},
},
};
\ No newline at end of file
export default {
fields: {
value_key: "标识",
catalog_id: "目录代码",
catalog_name: "目录",
value: "代码值",
label: "名称",
parent: "父代码值",
filter: "过滤项",
cls: "栏目样式",
icon_class: "图标",
disabled: "是否禁用",
expired: "过期/失效",
showorder: "排序",
extension: "扩展",
updatedate: "最后修改时间",
},
views: {
gridview: {
caption: "字典项",
title: "字典项表格视图",
},
editview: {
caption: "字典项",
title: "字典项编辑视图",
},
},
main_form: {
details: {
group1: "字典项基本信息",
formpage1: "基本信息",
srfupdatedate: "最后修改时间",
srforikey: "",
srfkey: "标识",
srftempmode: "",
srfuf: "",
srfdeid: "",
srfsourcekey: "",
cname: "目录",
val: "代码值",
label: "名称",
pval: "父代码值",
showorder: "排序",
disabled: "是否禁用",
expired: "过期/失效",
vfilter: "过滤项",
iconcls: "图标",
cls: "栏目样式",
extension: "扩展",
cid: "目录代码",
vkey: "标识",
},
uiactions: {
},
},
main_grid: {
columns: {
cid: "目录代码",
cname: "目录",
val: "代码值",
label: "名称",
pval: "父代码值",
cls: "栏目样式",
iconcls: "图标",
vfilter: "过滤项",
disabled: "是否禁用",
expired: "过期/失效",
showorder: "排序",
extension: "扩展",
updatedate: "最后修改时间",
},
uiactions: {
},
},
default_searchform: {
details: {
formpage1: "常规条件",
n_cname_like: "目录(文本包含(%))",
n_val_like: "代码值(文本包含(%))",
n_label_like: "名称(文本包含(%))",
},
uiactions: {
},
},
gridviewtoolbar_toolbar: {
tbitem3: {
caption: "新建",
tip: "新建",
},
tbitem4: {
caption: "编辑",
tip: "编辑",
},
tbitem6: {
caption: "拷贝",
tip: "拷贝",
},
tbitem7: {
caption: "-",
tip: "",
},
tbitem8: {
caption: "删除",
tip: "删除",
},
tbitem9: {
caption: "-",
tip: "",
},
tbitem13: {
caption: "导出",
tip: "导出",
},
tbitem10: {
caption: "-",
tip: "",
},
tbitem16: {
caption: "其它",
tip: "其它",
},
tbitem21: {
caption: "导出数据模型",
tip: "导出数据模型",
},
tbitem23: {
caption: "数据导入",
tip: "数据导入",
},
tbitem17: {
caption: "-",
tip: "",
},
tbitem19: {
caption: "过滤",
tip: "过滤",
},
tbitem18: {
caption: "帮助",
tip: "帮助",
},
},
editviewtoolbar_toolbar: {
tbitem3: {
caption: "保存",
tip: "保存",
},
tbitem4: {
caption: "保存并新建",
tip: "保存并新建",
},
tbitem5: {
caption: "保存并关闭",
tip: "保存并关闭",
},
tbitem6: {
caption: "-",
tip: "",
},
tbitem7: {
caption: "删除并关闭",
tip: "删除并关闭",
},
tbitem8: {
caption: "-",
tip: "",
},
tbitem12: {
caption: "新建",
tip: "新建",
},
tbitem13: {
caption: "-",
tip: "",
},
tbitem14: {
caption: "拷贝",
tip: "拷贝",
},
tbitem16: {
caption: "-",
tip: "",
},
tbitem23: {
caption: "第一个记录",
tip: "第一个记录",
},
tbitem24: {
caption: "上一个记录",
tip: "上一个记录",
},
tbitem25: {
caption: "下一个记录",
tip: "下一个记录",
},
tbitem26: {
caption: "最后一个记录",
tip: "最后一个记录",
},
tbitem21: {
caption: "-",
tip: "",
},
tbitem22: {
caption: "帮助",
tip: "帮助",
},
},
};
\ No newline at end of file
...@@ -11,21 +11,39 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => { ...@@ -11,21 +11,39 @@ mock.onGet('v7/app-index-viewappmenu').reply((config: any) => {
name: 'appmenu', name: 'appmenu',
items: [ items: [
{ {
id: 'A0C481D9-C202-4856-822C-8BA28C83A47B', id: '3F92DBA9-3532-49CD-A482-E9048A132684',
name: 'menuitem1', name: 'menuitem1',
text: '数据字典', text: '目录',
type: 'MENUITEM', type: 'MENUITEM',
counterid: '', counterid: '',
tooltip: '数据字典', tooltip: '目录',
expanded: false, expanded: false,
separator: false, separator: false,
hidden: false, hidden: false,
hidesidebar: false, hidesidebar: false,
opendefault: false, opendefault: false,
iconcls: '', iconcls: 'fa fa-folder-open-o',
icon: '', icon: '',
textcls: '', textcls: '',
appfunctag: 'Auto1', appfunctag: '_2',
resourcetag: '',
},
{
id: '73B8AFA0-9EDB-4224-93B8-F8B7C4D01AE3',
name: 'menuitem2',
text: '栏目',
type: 'MENUITEM',
counterid: '',
tooltip: '栏目',
expanded: false,
separator: false,
hidden: false,
hidesidebar: false,
opendefault: false,
iconcls: 'fa fa-stack-exchange',
icon: '',
textcls: '',
appfunctag: '_3',
resourcetag: '', resourcetag: '',
}, },
], ],
......
...@@ -7,6 +7,33 @@ import Mock from 'mockjs' ...@@ -7,6 +7,33 @@ import Mock from 'mockjs'
mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => { mock.onGet('./assets/json/data-dictionary.json').reply((config: any) => {
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
return [status, [ return [status, [
{
srfkey: "YesNo",
emptytext: "未定义",
"codelisttype":"static",
items: [
{
id: "1",
label: "是",
text: "是",
"data":"",
"codename":"Item_1",
value: "1",
disabled: false,
},
{
id: "0",
label: "否",
text: "否",
"data":"",
"codename":"Item_0",
value: "0",
disabled: false,
},
]
}
]]; ]];
}); });
此差异已折叠。
此差异已折叠。
...@@ -7,5 +7,5 @@ import './login/login'; ...@@ -7,5 +7,5 @@ import './login/login';
import './upload/upload'; import './upload/upload';
// 实体级接口对象 // 实体级接口对象
import './entity/ibzdict-items/ibzdict-items'; import './entity/dict-catalogs/dict-catalogs';
import './entity/ibzdicts/ibzdicts'; import './entity/dict-options/dict-options';
...@@ -7,37 +7,37 @@ import Mock from 'mockjs' ...@@ -7,37 +7,37 @@ import Mock from 'mockjs'
mock.onGet('./assets/json/view-config.json').reply((config: any) => { mock.onGet('./assets/json/view-config.json').reply((config: any) => {
let status = MockAdapter.mockStatus(config); let status = MockAdapter.mockStatus(config);
return [status,{ return [status,{
"ibzdictitemgridview": { "dictoptiongridview": {
"title": "字典项表格视图", "title": "字典项表格视图",
"caption": "字典项", "caption": "字典项",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictItemGridView", "viewname": "DictOptionGridView",
"viewtag": "47b7df6b047fe705eed95fd2fd500d1f" "viewtag": "56893daa82632caa84a6edeeb0acabaf"
}, },
"ibzdictitemeditview": { "dictcatalogpickupgridview": {
"title": "字典项目编辑视图", "title": "字典选择表格视图",
"caption": "字典项目", "caption": "字典",
"viewtype": "DEEDITVIEW", "viewtype": "DEPICKUPGRIDVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictItemEditView", "viewname": "DictCatalogPickupGridView",
"viewtag": "8e2a3a0c6f621484640b51b1408635c4" "viewtag": "66f9c86e5a56857f977ef91461338255"
}, },
"ibzdictgridview": { "dictcataloggridview": {
"title": "实体表格视图", "title": "字典表格视图",
"caption": "数据字典", "caption": "字典",
"viewtype": "DEGRIDVIEW", "viewtype": "DEGRIDVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictGridView", "viewname": "DictCatalogGridView",
"viewtag": "a4f6d040cdb6781cb505ec6b644617d9" "viewtag": "7395bd2cc14d34a67b772f13a50b2587"
}, },
"ibzdicteditview": { "dictoptioneditview": {
"title": "实体编辑视图", "title": "字典项编辑视图",
"caption": "数据字典", "caption": "字典项",
"viewtype": "DEEDITVIEW", "viewtype": "DEEDITVIEW",
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "IBZDictEditView", "viewname": "DictOptionEditView",
"viewtag": "b5f1416271b6cae0b21902468b267c5e" "viewtag": "8ad70084b5f98a26370b74da612d3f49"
}, },
"appindexview": { "appindexview": {
"title": "ibizlab-dict", "title": "ibizlab-dict",
...@@ -46,6 +46,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => { ...@@ -46,6 +46,22 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewmodule": "dict", "viewmodule": "dict",
"viewname": "AppIndexView", "viewname": "AppIndexView",
"viewtag": "D394F269-6F97-4ED7-AFE8-F4A2E09BA602" "viewtag": "D394F269-6F97-4ED7-AFE8-F4A2E09BA602"
},
"dictcatalogeditview": {
"title": "字典编辑视图",
"caption": "字典",
"viewtype": "DEEDITVIEW",
"viewmodule": "dict",
"viewname": "DictCatalogEditView",
"viewtag": "e294ce8c6557ca26a032efa08eeb5508"
},
"dictcatalogpickupview": {
"title": "字典数据选择视图",
"caption": "字典",
"viewtype": "DEPICKUPVIEW",
"viewmodule": "dict",
"viewname": "DictCatalogPickupView",
"viewtag": "eb4772f75066d6c9eb26d8b01d4e16b7"
} }
}]; }];
}); });
\ No newline at end of file
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<sider :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange"> <sider :width="collapseChange ? 64 : 200" hide-trigger v-model="collapseChange">
<div class="sider-top"> <div class="sider-top">
<div class="page-logo"> <div class="page-logo">
<img v-show="collapseChange" src="../../../assets/img/logo.png" height="16" /> <span class="menuicon" @click="contextMenuDragVisiable=!contextMenuDragVisiable"><Icon type="md-menu" /></span>
<span v-show="!collapseChange" style="display: block;text-align: center;font-weight: 300;font-size: 20px;">{{$t(model.srfCaption)}}</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>
</div> </div>
<view_appmenu <view_appmenu
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
:showBusyIndicator="true" :showBusyIndicator="true"
v-model="collapseChange" v-model="collapseChange"
:mode="mode" :mode="mode"
:navModel="navModel"
viewtag="app-index-view"
:selectTheme="selectTheme" :selectTheme="selectTheme"
:isDefaultPage="isDefaultPage" :isDefaultPage="isDefaultPage"
:defPSAppView="defPSAppView" :defPSAppView="defPSAppView"
...@@ -24,6 +26,7 @@ ...@@ -24,6 +26,7 @@
ref='appmenu' ref='appmenu'
@closeview="closeView($event)"> @closeview="closeView($event)">
</view_appmenu> </view_appmenu>
<context-menu-drag :contextMenuDragVisiable="contextMenuDragVisiable"></context-menu-drag>
</sider> </sider>
<layout> <layout>
<header class="index_header"> <header class="index_header">
...@@ -31,7 +34,7 @@ ...@@ -31,7 +34,7 @@
<div class="page-logo"> <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-fold" @click="handleClick"></i>
<i v-show="collapseChange" class="ivu-icon el-icon-s-unfold" @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="app-index-view"></app-breadcrumb>
</div> </div>
</div> </div>
<div class="header-right" style="display: flex;align-items: center;justify-content: space-between;"> <div class="header-right" style="display: flex;align-items: center;justify-content: space-between;">
...@@ -42,8 +45,8 @@ ...@@ -42,8 +45,8 @@
<app-theme style="width:45px;display: flex;justify-content: center;"></app-theme> <app-theme style="width:45px;display: flex;justify-content: center;"></app-theme>
</div> </div>
</header> </header>
<content class="index_content" :style="{'width':this.collapseChange ? 'calc(100vw - 64px)' : 'calc(100vw - 200px)' }"> <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)' }">
<tab-page-exp></tab-page-exp> <tab-page-exp v-if="Object.is(navModel,'tab')"></tab-page-exp>
<app-keep-alive :routerList="getRouterList"> <app-keep-alive :routerList="getRouterList">
<router-view :key="getRouterViewKey"></router-view> <router-view :key="getRouterViewKey"></router-view>
</app-keep-alive> </app-keep-alive>
...@@ -56,9 +59,10 @@ ...@@ -56,9 +59,10 @@
</template> </template>
<script lang='tsx'> <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 { 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 AppIndexViewBase extends Vue { ...@@ -114,6 +118,7 @@ export default class AppIndexViewBase extends Vue {
*/ */
@Prop({ default: true }) public viewDefaultUsage!: boolean; @Prop({ default: true }) public viewDefaultUsage!: boolean;
/** /**
* 视图标识 * 视图标识
* *
...@@ -237,6 +242,23 @@ export default class AppIndexViewBase extends Vue { ...@@ -237,6 +242,23 @@ export default class AppIndexViewBase extends Vue {
public engineInit(): void { public engineInit(): void {
} }
/**
* 应用导航服务
*
* @type {*}
* @memberof AppIndexViewBase
*/
public navDataService = NavDataService.getInstance(this.$store);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof AppIndexViewBase
*/
public serviceStateEvent: Subscription | undefined;
/** /**
* 应用上下文 * 应用上下文
* *
...@@ -253,13 +275,21 @@ export default class AppIndexViewBase extends Vue { ...@@ -253,13 +275,21 @@ export default class AppIndexViewBase extends Vue {
*/ */
public viewparams:any = {}; public viewparams:any = {};
/**
* 视图缓存数据
*
* @type {*}
* @memberof AppIndexViewBase
*/
public viewCacheData:any;
/** /**
* 解析视图参数 * 解析视图参数
* *
* @public * @public
* @memberof AppIndexViewBase * @memberof AppIndexViewBase
*/ */
public parseViewParam(): void { public parseViewParam(inputvalue:any = null): void {
for(let key in this.context){ for(let key in this.context){
delete this.context[key]; delete this.context[key];
} }
...@@ -293,6 +323,8 @@ export default class AppIndexViewBase extends Vue { ...@@ -293,6 +323,8 @@ export default class AppIndexViewBase extends Vue {
Object.assign(this.context,this.$store.getters.getAppData().context); Object.assign(this.context,this.$store.getters.getAppData().context);
} }
this.handleCustomViewData(); this.handleCustomViewData();
//初始化导航数据
this.initNavDataWithRoute();
} }
/** /**
...@@ -371,6 +403,28 @@ export default class AppIndexViewBase extends Vue { ...@@ -371,6 +403,28 @@ export default class AppIndexViewBase extends Vue {
} }
} }
/**
* 初始化导航数据(路由模式)
*
* @memberof AppIndexViewBase
*/
public initNavDataWithRoute(data:any = null){
if(this.viewDefaultUsage && Object.is(this.navModel,"route")){
this.navDataService.addNavData({id:'app-index-view',tag:this.viewtag,srfkey:null,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof AppIndexViewBase
*/
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true){
if(this.viewDefaultUsage && !Object.is(this.navModel,"route")){
this.navDataService.addNavDataByOnly({id:'app-index-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);
}
}
/** /**
* Vue声明周期 * Vue声明周期
...@@ -387,10 +441,24 @@ export default class AppIndexViewBase extends Vue { ...@@ -387,10 +441,24 @@ export default class AppIndexViewBase extends Vue {
* @memberof AppIndexViewBase * @memberof AppIndexViewBase
*/ */
public afterCreated(){ public afterCreated(){
const secondtag = this.$util.createUUID(); let _this:any = this;
this.$store.commit('viewaction/createdView', { viewtag: this.viewtag, secondtag: secondtag }); const secondtag = _this.$util.createUUID();
this.viewtag = secondtag; _this.$store.commit('viewaction/createdView', { viewtag: _this.viewtag, secondtag: secondtag });
this.parseViewParam(); _this.viewtag = secondtag;
_this.parseViewParam();
_this.serviceStateEvent = _this.navDataService.serviceState.subscribe(({ action,name, data }:{ action:string,name:any,data:any }) => {
if(!Object.is(name,'app-index-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 AppIndexViewBase extends Vue { ...@@ -457,6 +525,33 @@ export default class AppIndexViewBase extends Vue {
*/ */
public mode: string ='vertical'; public mode: string ='vertical';
/**
* 导航模式(route:面包屑模式、tab:分页导航模式)
*
* @type {string}
* @memberof AppIndexViewBase
*/
@Provide()
public navModel:string = "tab";
/**
* 抽屉状态
*
* @type {boolean}
* @memberof AppIndexViewBase
*/
public contextMenuDragVisiable: boolean = false;
/**
* 初始化之前
*
* @memberof AppIndexViewBase
*/
public beforeCreate(){
let navDataService = NavDataService.getInstance(this.$store)
navDataService.removeAllNavData();
}
/** /**
* 当前主题 * 当前主题
* *
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
} }
.app-index-view{
position: relative;
}
.index_view{ .index_view{
margin-bottom: 1px; margin-bottom: 1px;
width: 100%; width: 100%;
...@@ -19,6 +21,7 @@ ...@@ -19,6 +21,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background-color: #fff;
.page-logo{ .page-logo{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -73,7 +76,6 @@ ...@@ -73,7 +76,6 @@
} }
} }
.ivu-layout .ivu-layout-sider .ivu-layout-sider-children .sider-top{ .ivu-layout .ivu-layout-sider .ivu-layout-sider-children .sider-top{
padding: 4px;
margin-top: -2px; margin-top: -2px;
line-height: 58px; line-height: 58px;
text-align: center; text-align: center;
...@@ -81,11 +83,22 @@ ...@@ -81,11 +83,22 @@
cursor: pointer; cursor: pointer;
} }
.sider-top{ .sider-top{
padding: 0px;
margin-bottom: 1px; margin-bottom: 1px;
height:65px; height:65px;
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15); box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
> .page-logo{ > .page-logo{
display: flex;
align-items: center;
height: 100%;
>.menuicon{
display: block;
text-align: center; text-align: center;
font-weight: 300;
font-size: 28px;
width:64px;
height:100%;
}
} }
} }
} }
......
...@@ -9,6 +9,9 @@ import view_appmenu from '@widgets/app/app-index-view-appmenu/app-index-view-app ...@@ -9,6 +9,9 @@ import view_appmenu from '@widgets/app/app-index-view-appmenu/app-index-view-app
}, },
beforeRouteEnter: (to: any, from: any, next: any) => { beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => { next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag }); vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
}); });
}, },
......
export const PageComponents = { export const PageComponents = {
install(Vue: any, opt: any) { install(Vue: any, opt: any) {
Vue.component('ibzdict-grid-view', () => import('@pages/dict/ibzdict-grid-view/ibzdict-grid-view.vue')); Vue.component('dict-option-edit-view', () => import('@pages/dict/dict-option-edit-view/dict-option-edit-view.vue'));
Vue.component('ibzdict-item-edit-view', () => import('@pages/dict/ibzdict-item-edit-view/ibzdict-item-edit-view.vue')); Vue.component('dict-catalog-pickup-grid-view', () => import('@pages/dict/dict-catalog-pickup-grid-view/dict-catalog-pickup-grid-view.vue'));
Vue.component('ibzdict-edit-view', () => import('@pages/dict/ibzdict-edit-view/ibzdict-edit-view.vue')); Vue.component('dict-option-grid-view', () => import('@pages/dict/dict-option-grid-view/dict-option-grid-view.vue'));
Vue.component('ibzdict-item-grid-view', () => import('@pages/dict/ibzdict-item-grid-view/ibzdict-item-grid-view.vue')); Vue.component('dict-catalog-pickup-view', () => import('@pages/dict/dict-catalog-pickup-view/dict-catalog-pickup-view.vue'));
Vue.component('dict-catalog-edit-view', () => import('@pages/dict/dict-catalog-edit-view/dict-catalog-edit-view.vue'));
Vue.component('dict-catalog-grid-view', () => import('@pages/dict/dict-catalog-grid-view/dict-catalog-grid-view.vue'));
} }
}; };
\ No newline at end of file
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
.dict-catalog-edit-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import DictCatalogEditViewBase from './dict-catalog-edit-view-base.vue';
import view_form from '@widgets/dict-catalog/main-form/main-form.vue';
@Component({
components: {
view_form,
},
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 });
});
},
})
export default class DictCatalogEditView extends DictCatalogEditViewBase {
}
</script>
\ No newline at end of file
.dict-catalog-grid-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import DictCatalogGridViewBase from './dict-catalog-grid-view-base.vue';
import view_grid from '@widgets/dict-catalog/main-grid/main-grid.vue';
import view_searchform from '@widgets/dict-catalog/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
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 });
});
},
})
export default class DictCatalogGridView extends DictCatalogGridViewBase {
}
</script>
\ No newline at end of file
.dict-catalog-pickup-grid-view{
position: relative;
}
.dict-catalog-pickup-grid-view{
display: block;
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import DictCatalogPickupGridViewBase from './dict-catalog-pickup-grid-view-base.vue';
import view_grid from '@widgets/dict-catalog/main-grid/main-grid.vue';
import view_searchform from '@widgets/dict-catalog/default-searchform/default-searchform.vue';
@Component({
components: {
view_grid,
view_searchform,
},
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 });
});
},
})
export default class DictCatalogPickupGridView extends DictCatalogPickupGridViewBase {
}
</script>
\ No newline at end of file
.dict-catalog-pickup-view{
position: relative;
}
.pickup-view {
>.pickupviewpanel {
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
<script lang='tsx'>
import { Component } from 'vue-property-decorator';
import DictCatalogPickupViewBase from './dict-catalog-pickup-view-base.vue';
import view_pickupviewpanel from '@widgets/dict-catalog/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel.vue';
@Component({
components: {
view_pickupviewpanel,
},
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 });
});
},
})
export default class DictCatalogPickupView extends DictCatalogPickupViewBase {
}
</script>
\ No newline at end of file
.view-card {
>.ivu-card-extra {
top: 5px;
right: 0px;
}
}
.dict-option-edit-view{
position: relative;
}
.toolbar-container {
button {
margin: 6px 0px 4px 4px;
.caption {
margin-left: 4px;
}
}
.seperator {
color: #dcdee2;
margin: 0 0px 0 4px;
}
}
// this is less
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册