Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
34b14090
提交
34b14090
编写于
6月 21, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
2c76e221
f4084b7c
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
266 行增加
和
49 行删除
+266
-49
CHANGELOG.md
CHANGELOG.md
+36
-0
app-breadcrumb.vue
src/components/app-breadcrumb/app-breadcrumb.vue
+80
-31
input-box.less
src/components/input-box/input-box.less
+3
-0
input-box.vue
src/components/input-box/input-box.vue
+21
-2
tab-page-exp.vue
src/components/tab-page-exp/tab-page-exp.vue
+1
-1
edit-view-engine.ts
src/engine/view/edit-view-engine.ts
+2
-2
md-view-engine.ts
src/engine/view/md-view-engine.ts
+7
-5
navdata-service.ts
src/service/app/navdata-service.ts
+97
-0
default.less
src/styles/default.less
+16
-5
control-service.ts
src/widgets/control-service.ts
+3
-3
未找到文件。
CHANGELOG.md
浏览文件 @
34b14090
## v7.0.0-alpha.11 [2020-6-21]
### Bug修复
修复标题工具栏样式遮挡bug
修复表格行编辑字段格式对齐
修复日历部件初始化压缩成一行问题
修复下拉多选组件最后一项数据无法删除
### 功能新增及优化
#### 模板
新增支持表单、表格新建默认值(当前时间)
新增行编辑浮点数精度格式化
新增首页面包屑导航模式
新增编辑视图第一条记录、上一条记录、下一条记录、最后一条记录界面行为
优化面板和多数据部件数据流向
优化表单在模态打开模式中padding样式
优化嵌入视图中工具栏消息数量提示样式
优化动态导航视图树样式
#### 基础文件
新增行编辑浮点数精度格式化
## v7.0.0-alpha.10 [2020-6-18]
### Bug修复
...
...
src/components/app-breadcrumb/app-breadcrumb.vue
浏览文件 @
34b14090
<
template
>
<el-breadcrumb
class=
"app-breadcrumb"
separator=
"/"
>
<transition-group
name=
"breadcrumb"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadcrumbs"
:key=
"item.id"
>
<span
v-if=
"index === breadcrumbs.length-1"
class=
"no-redirect"
>
{{
item
.
title
}}
<span
v-if=
"item.isselected === true"
>
<dropdown
trigger=
'click'
@
on-click=
"selectNavData($event,item)"
>
<span
class=
"app-breadcrumb-selected"
>
<i
class=
"el-icon-caret-bottom"
></i>
</span>
<dropdown-menu
slot=
'list'
>
<dropdown-item
v-for=
"(dataitem) in getPreNavData(item)"
:name=
"dataitem.srfkey"
:key=
"dataitem.srfkey"
>
<span
:class=
"
{'curselected':isCurSelected(item,dataitem)}">
{{
dataitem
.
srfmajortext
}}
</span>
</dropdown-item>
</dropdown-menu>
</dropdown>
<template
v-if=
"Object.is(this.navModel,'route')"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadcrumbs"
:key=
"item.id"
>
<span
v-if=
"index === breadcrumbs.length-1"
class=
"no-redirect"
>
{{
item
.
title
}}
<span
v-if=
"item.isselected === true"
>
<dropdown
trigger=
'click'
@
on-click=
"selectNavData($event,item)"
>
<span
class=
"app-breadcrumb-selected"
>
<i
class=
"el-icon-caret-bottom"
></i>
</span>
<dropdown-menu
slot=
'list'
>
<dropdown-item
v-for=
"(dataitem) in getPreNavData(item)"
:name=
"dataitem.srfkey"
:key=
"dataitem.srfkey"
>
<span
:class=
"
{'curselected':isCurSelected(item,dataitem)}">
{{
dataitem
.
srfmajortext
}}
</span>
</dropdown-item>
</dropdown-menu>
</dropdown>
</span>
</span>
</span>
<a
v-else
@
click
.
prevent=
"handleLink(item)"
>
{{
item
.
title
}}
</a>
</el-breadcrumb-item>
<a
v-else
@
click
.
prevent=
"handleLink(item)"
>
{{
item
.
title
}}
</a>
</el-breadcrumb-item>
</
template
>
<
template
v-if=
"!Object.is(this.navModel,'route')"
>
<el-breadcrumb-item
v-for=
"(item, index) in breadcrumbs"
:key=
"item.path"
>
<span
v-if=
"index === breadcrumbs.length-1"
class=
"no-redirect"
>
{{
$t
(
item
.
meta
.
caption
)
}}
</span>
<a
v-else
@
click
.
prevent=
"handleLink(item)"
>
{{
$t
(
item
.
meta
.
caption
)
}}
</a>
</el-breadcrumb-item>
</
template
>
</transition-group>
</el-breadcrumb>
</template>
...
...
@@ -54,6 +62,24 @@ export default class Breadcrumb extends Vue {
*/
@
Prop
()
public
indexViewTag
!
:
string
;
/**
* 导航模式
*
* @memberof Breadcrumb
*/
@
Prop
({
default
:
'tab'
})
public
navModel
?:
string
;
/**
* 监听路由
*
* @memberof Breadcrumb
*/
@
Watch
(
'$route'
)
private
onRouteChange
(
route
:
Route
)
{
this
.
getBreadcrumb
()
}
/**
* 导航服务事件
*
...
...
@@ -70,11 +96,13 @@ export default class Breadcrumb extends Vue {
*/
created
()
{
this
.
getBreadcrumb
();
this
.
serviceStateEvent
=
this
.
navDataService
.
serviceState
.
subscribe
(({
action
,
name
,
data
}:{
action
:
string
,
name
:
any
,
data
:
any
})
=>
{
if
(
Object
.
is
(
action
,
'datarefresh'
))
{
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
();
}
});
}
}
/**
...
...
@@ -83,8 +111,14 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
private
getBreadcrumb
()
{
this
.
breadcrumbs
=
this
.
navDataService
.
getNavData
();
this
.
$forceUpdate
();
if
(
Object
.
is
(
this
.
navModel
,
"route"
)){
this
.
breadcrumbs
=
this
.
navDataService
.
getNavData
();
this
.
$forceUpdate
();
}
else
{
this
.
breadcrumbs
=
this
.
$route
.
matched
.
filter
((
item
)
=>
{
return
item
.
meta
&&
item
.
meta
.
caption
})
}
}
/**
...
...
@@ -112,16 +146,31 @@ export default class Breadcrumb extends Vue {
* @memberof Breadcrumb
*/
private
handleLink
(
item
:
any
)
{
// 首页
if
(
Object
.
is
(
item
.
id
,
this
.
indexViewTag
)){
this
.
$router
.
push
((
window
.
sessionStorage
.
getItem
(
Environment
.
AppName
))
as
string
);
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
{
// 非首页
this
.
$router
.
push
(
item
.
path
).
catch
(
err
=>
{
console
.
warn
(
err
);
});
if
(
item
&&
item
.
meta
&&
item
.
meta
.
viewType
&&
Object
.
is
(
item
.
meta
.
viewType
,
"APPINDEX"
)){
let
path
:
string
|
null
=
window
.
sessionStorage
.
getItem
(
Environment
.
AppName
);
if
(
path
)
{
this
.
$router
.
push
({
path
:
path
});
}
else
{
this
.
$router
.
push
(
"/"
);
}
}
else
{
this
.
$router
.
push
(
item
).
catch
(
err
=>
{
console
.
warn
(
err
);
});
}
}
this
.
navDataService
.
removeNavData
(
item
.
id
);
}
/**
...
...
src/components/input-box/input-box.less
浏览文件 @
34b14090
...
...
@@ -5,4 +5,7 @@
top: 0;
right: 20px;
}
.ivu-input-number-input{
text-align: right;
}
}
\ No newline at end of file
src/components/input-box/input-box.vue
浏览文件 @
34b14090
<
template
>
<div
class=
"input-unit"
>
<i-input
<InputNumber
v-if=
"type === 'number'"
:placeholder=
"placeholder"
:size=
"size"
:precision=
"precision"
v-model=
"CurrentVal"
:disabled=
"disabled ? true : false"
></InputNumber>
<i-input
v-else
:placeholder=
"placeholder"
:size=
"size"
:type=
"type"
...
...
@@ -63,6 +70,14 @@ export default class InputBox extends Vue {
*/
@
Prop
()
public
type
?:
string
;
/**
* 精度
*
* @type {number}
* @memberof InputBox
*/
@
Prop
({
default
:
0
})
public
precision
?:
number
;
/**
* 多行文本行数
*
...
...
@@ -77,7 +92,11 @@ export default class InputBox extends Vue {
* @memberof InputBox
*/
get
CurrentVal
()
{
return
this
.
itemValue
;
if
(
Object
.
is
(
this
.
type
,
'number'
)
&&
this
.
itemValue
&&
!
isNaN
(
this
.
itemValue
)){
return
Number
(
Number
(
this
.
itemValue
).
toFixed
(
this
.
precision
));
}
else
{
return
this
.
itemValue
;
}
}
/**
...
...
src/components/tab-page-exp/tab-page-exp.vue
浏览文件 @
34b14090
...
...
@@ -227,7 +227,7 @@ export default class TabPageExp extends Vue {
* @memberof TabPageExp
*/
public
setCurPageCaption
(
caption
:
string
,
title
:
any
,
info
:
string
)
{
if
(
this
.
$route
.
meta
&&
!
Object
.
is
(
this
.
$
route
.
meta
.
caption
,
caption
))
{
if
(
this
.
$route
.
meta
&&
!
Object
.
is
(
this
.
$
t
(
this
.
$route
.
meta
.
caption
)
,
caption
))
{
return
;
}
this
.
$store
.
commit
(
"setCurPageCaption"
,
{
...
...
src/engine/view/edit-view-engine.ts
浏览文件 @
34b14090
...
...
@@ -253,13 +253,13 @@ export default class EditViewEngine extends ViewEngine {
viewdata
.
srfTitle
=
viewdata
.
srfTitle
.
substr
(
0
,
index
);
}
if
(
this
.
view
.
$tabPageExp
){
this
.
view
.
$tabPageExp
.
setCurPageCaption
(
viewdata
.
srfTitle
,
viewdata
.
srfTitle
,
info
);
this
.
view
.
$tabPageExp
.
setCurPageCaption
(
this
.
view
.
$t
(
viewdata
.
srfTitle
),
this
.
view
.
$t
(
viewdata
.
srfTitle
)
,
info
);
}
if
(
this
.
view
.
$route
){
this
.
view
.
$route
.
meta
.
info
=
info
;
}
this
.
view
.
model
.
srfTitle
=
`
${
this
.
view
.
$t
(
viewdata
.
srfTitle
)}
-
${
viewdata
.
dataInfo
}
`
;
this
.
view
.
initNavData
();
this
.
view
.
initNavData
WithRoute
();
}
}
...
...
src/engine/view/md-view-engine.ts
浏览文件 @
34b14090
...
...
@@ -373,7 +373,9 @@ export default class MDViewEngine extends ViewEngine {
cacheArray
.
push
({
srfkey
:
item
.
srfkey
,
srfmajortext
:
item
.
srfmajortext
});
})
}
this
.
view
.
initNavData
(
cacheArray
);
this
.
view
.
viewCacheData
=
cacheArray
;
this
.
view
.
initNavDataWithRoute
(
cacheArray
);
this
.
view
.
initNavDataWithTab
(
cacheArray
,
false
);
if
(
this
.
view
)
{
this
.
view
.
$emit
(
'viewload'
,
args
);
}
...
...
@@ -398,11 +400,11 @@ export default class MDViewEngine extends ViewEngine {
}
// 快速分组和快速搜索栏
let
otherQueryParam
:
any
=
{};
if
(
this
.
view
&&
this
.
view
.
qu
ci
kGroupData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qu
ci
kGroupData
);
if
(
this
.
view
&&
this
.
view
.
qu
ic
kGroupData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qu
ic
kGroupData
);
}
if
(
this
.
view
&&
this
.
view
.
qu
ci
kFormData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qu
ci
kFormData
);
if
(
this
.
view
&&
this
.
view
.
qu
ic
kFormData
){
Object
.
assign
(
otherQueryParam
,
this
.
view
.
qu
ic
kFormData
);
}
Object
.
assign
(
arg
,{
viewparams
:
otherQueryParam
});
}
...
...
src/service/app/navdata-service.ts
浏览文件 @
34b14090
...
...
@@ -49,6 +49,13 @@ export interface NavDataElement {
*/
srfkey
:
string
|
null
;
/**
* 视图标识
*
* @memberof NavDataElement
*/
tag
:
string
|
null
;
}
export
interface
ServiceState
{
...
...
@@ -228,6 +235,24 @@ export default class NavDataService {
}
}
/**
* 从导航数据栈中删除指定数据上层数据(不清除页面缓存)
*
* @memberof NavDataService
*/
public
removeNavDataWithoutCache
(
id
:
string
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
id
,
id
);
})
let
removeNavData
=
this
.
navDataStack
.
splice
(
tempIndex
+
1
);
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
removeNavData
;
}
else
{
return
null
;
}
}
/**
* 从导航数据栈中获取指定数据
*
...
...
@@ -287,4 +312,76 @@ export default class NavDataService {
return
[];
}
}
/**
* 从导航数据栈中直接添加数据
*
* @memberof NavDataService
*/
public
addNavDataByOnly
(
curNavData
:
NavDataElement
,
isOnlyAdd
:
boolean
){
if
(
isOnlyAdd
){
this
.
navDataStack
.
push
(
curNavData
);
}
else
{
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
tag
,
curNavData
.
tag
);
})
if
(
tempIndex
===
-
1
){
this
.
navDataStack
.
push
(
curNavData
);
}
else
{
this
.
navDataStack
[
tempIndex
]
=
curNavData
;
}
}
else
{
this
.
navDataStack
.
push
(
curNavData
);
}
}
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
curNavData
;
}
/**
* 从导航数据栈中直接删除数据
*
* @memberof NavDataService
*/
public
removeNavDataByTag
(
viewtag
:
string
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
tag
,
viewtag
);
})
let
removeNavData
=
this
.
navDataStack
.
splice
(
tempIndex
,
1
);
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
return
removeNavData
;
}
else
{
return
null
;
}
}
/**
* 从导航数据栈中获取指定元素前一个元素
*
* @memberof NavDataService
*/
public
getPreNavDataByTag
(
viewtag
:
string
){
if
(
this
.
navDataStack
.
length
>
0
){
let
tempIndex
:
number
=
this
.
navDataStack
.
findIndex
((
element
:
NavDataElement
)
=>
{
return
Object
.
is
(
element
.
tag
,
viewtag
);
})
return
this
.
navDataStack
[
tempIndex
-
1
]?
this
.
navDataStack
[
tempIndex
-
1
]:
null
;
}
else
{
return
null
;
}
}
/**
* 从导航数据栈中删除所有数据
*
* @memberof NavDataService
*/
public
removeAllNavData
(){
if
(
this
.
navDataStack
.
length
>
0
){
this
.
navDataStack
=
[];
this
.
sessionStore
.
setItem
(
'srfnavdata'
,
JSON
.
stringify
(
this
.
navDataStack
));
}
}
}
\ No newline at end of file
src/styles/default.less
浏览文件 @
34b14090
...
...
@@ -87,18 +87,29 @@
// display: flex;
// flex-direction: column;
> .ivu-card-head{
height: 50
px;
min-height: 42
px;
border-color: rgb(221, 221, 221);
border-style: solid;
border-width: 0px 0px 1px;
margin: 0px 0px 11px;
padding: 6px 0px;
> p{
height: 50px;
padding: 6px 0px 2px;
> .header-container{
min-height: 42px;
display: flex;
flex-wrap: nowrap;
align-items: flex-start;
justify-content: space-between;
> .caption-info{
line-height:
50
px;
line-height:
42
px;
font-size: 18px;
color: #1890ff;
flex-shrink: 0;
}
> .toolbar-container{
display: inline-block;
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
}
...
...
src/widgets/control-service.ts
浏览文件 @
34b14090
...
...
@@ -99,6 +99,9 @@ export default class ControlService {
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
...
...
@@ -110,9 +113,6 @@ export default class ControlService {
}
}
});
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录