Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
1a736de6
提交
1a736de6
编写于
11月 01, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
ebd48b5b
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
90 行增加
和
69 行删除
+90
-69
app-scroll-container.vue
...t-container/app-scroll-container/app-scroll-container.vue
+20
-35
panel-detail.ts
src/model/panel-detail/panel-detail.ts
+15
-15
default.less
src/styles/default.less
+11
-0
util.ts
src/utils/util/util.ts
+44
-19
未找到文件。
src/components/layout-container/app-scroll-container/app-scroll-container.vue
浏览文件 @
1a736de6
<
template
>
<
template
>
<div
class=
"app-scroll-container"
>
<div
class=
"app-scroll-container"
>
<div
<div
v-if=
"containerModel.NORTH"
:style=
"containerModel.NORTH.style"
v-if=
"containerModel.NORTH"
class=
"no-style overflow-auto app-scroll-container__header"
>
:style=
"containerModel.NORTH.style"
class=
"no-style overflow-auto app-scroll-container__header"
>
<template
v-for=
"name of containerModel.NORTH.name"
>
<template
v-for=
"name of containerModel.NORTH.name"
>
<slot
:name=
"name"
></slot>
<slot
:name=
"name"
></slot>
</
template
>
</
template
>
</div>
</div>
<div
class=
"app-scroll-container__middle"
:style=
"middleContainerStyle"
>
<div
class=
"app-scroll-container__middle"
:style=
"middleContainerStyle"
>
<div
<div
v-if=
"containerModel.WEST"
:style=
"containerModel.WEST.style"
v-if=
"containerModel.WEST"
class=
"no-style overflow-auto app-scroll-container__left"
>
:style=
"containerModel.WEST.style"
class=
"no-style overflow-auto app-scroll-container__left"
>
<
template
v-for=
"name of containerModel.WEST.name"
>
<
template
v-for=
"name of containerModel.WEST.name"
>
<slot
:name=
"name"
></slot>
<slot
:name=
"name"
></slot>
</
template
>
</
template
>
</div>
</div>
<div
<div
v-if=
"containerModel.CENTER"
:style=
"containerModel.CENTER.style"
v-if=
"containerModel.CENTER"
class=
"no-style overflow-auto app-scroll-container__center"
>
:style=
"containerModel.CENTER.style"
class=
"no-style overflow-auto app-scroll-container__center"
>
<
template
v-for=
"name of containerModel.CENTER.name"
>
<
template
v-for=
"name of containerModel.CENTER.name"
>
<slot
:name=
"name"
></slot>
<slot
:name=
"name"
></slot>
</
template
>
</
template
>
</div>
</div>
<div
<div
v-if=
"containerModel.EAST"
:style=
"containerModel.EAST.style"
v-if=
"containerModel.EAST"
class=
"no-style overflow-auto app-scroll-container__right"
>
:style=
"containerModel.EAST.style"
class=
"no-style overflow-auto app-scroll-container__right"
>
<
template
v-for=
"name of containerModel.EAST.name"
>
<
template
v-for=
"name of containerModel.EAST.name"
>
<slot
:name=
"name"
></slot>
<slot
:name=
"name"
></slot>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
<div
<div
v-if=
"containerModel.SOUTH"
:style=
"containerModel.SOUTH.style"
v-if=
"containerModel.SOUTH"
class=
"no-style overflow-auto app-scroll-container__bottom"
>
:style=
"containerModel.SOUTH.style"
class=
"no-style overflow-auto app-scroll-container__bottom"
>
<
template
v-for=
"name of containerModel.SOUTH.name"
>
<
template
v-for=
"name of containerModel.SOUTH.name"
>
<slot
:name=
"name"
></slot>
<slot
:name=
"name"
></slot>
</
template
>
</
template
>
...
@@ -51,6 +36,7 @@
...
@@ -51,6 +36,7 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Util
}
from
'@/utils'
;
import
{
Component
,
Prop
,
Vue
}
from
'vue-property-decorator'
;
import
{
Component
,
Prop
,
Vue
}
from
'vue-property-decorator'
;
@
Component
({})
@
Component
({})
...
@@ -100,23 +86,23 @@ export default class AppScrollContainer extends Vue {
...
@@ -100,23 +86,23 @@ export default class AppScrollContainer extends Vue {
* @memberof AppScrollContainer
* @memberof AppScrollContainer
*/
*/
public
initScrollContainer
()
{
public
initScrollContainer
()
{
let
minusHeight
=
0
;
let
minusHeight
=
''
;
let
minusWidth
=
0
;
let
minusWidth
:
string
=
''
;
const
curLayoutModelDetails
=
this
.
layoutModelDetails
[
this
.
name
];
const
curLayoutModelDetails
=
this
.
layoutModelDetails
[
this
.
name
];
if
(
curLayoutModelDetails
&&
curLayoutModelDetails
.
details
&&
curLayoutModelDetails
.
details
.
length
>
0
)
{
if
(
curLayoutModelDetails
&&
curLayoutModelDetails
.
details
&&
curLayoutModelDetails
.
details
.
length
>
0
)
{
curLayoutModelDetails
.
details
.
forEach
((
key
:
string
)
=>
{
curLayoutModelDetails
.
details
.
forEach
((
key
:
string
)
=>
{
const
{
name
,
layoutWidth
,
layoutHeight
,
layoutPos
}
=
this
.
layoutModelDetails
[
key
];
const
{
name
,
layoutWidth
,
widthMode
,
layoutHeight
,
heightMode
,
layoutPos
}
=
this
.
layoutModelDetails
[
key
];
const
style
=
{};
const
style
=
{};
if
(
layoutWidth
)
{
if
(
layoutWidth
)
{
Object
.
assign
(
style
,
{
width
:
`
${
layoutWidth
}
px`
});
Object
.
assign
(
style
,
{
width
:
Util
.
getBoxSize
(
'WIDTH'
,
widthMode
,
layoutWidth
).
width
});
if
(
layoutPos
&&
(
Object
.
is
(
layoutPos
,
'WEST'
)
||
Object
.
is
(
layoutPos
,
'EAST'
)))
{
if
(
layoutPos
&&
(
Object
.
is
(
layoutPos
,
'WEST'
)
||
Object
.
is
(
layoutPos
,
'EAST'
)))
{
minusWidth
+=
layoutWidth
;
minusWidth
+=
` -
${
Util
.
getBoxSize
(
'WIDTH'
,
widthMode
,
layoutWidth
).
width
}
`
;
}
}
}
}
if
(
layoutHeight
)
{
if
(
layoutHeight
)
{
Object
.
assign
(
style
,
{
height
:
`
${
layoutHeight
}
px`
});
Object
.
assign
(
style
,
{
height
:
Util
.
getBoxSize
(
'HEIGHT'
,
heightMode
,
layoutHeight
).
height
});
if
(
layoutPos
&&
(
Object
.
is
(
layoutPos
,
'NORTH'
)
||
Object
.
is
(
layoutPos
,
'SOUTH'
)))
{
if
(
layoutPos
&&
(
Object
.
is
(
layoutPos
,
'NORTH'
)
||
Object
.
is
(
layoutPos
,
'SOUTH'
)))
{
minusHeight
+=
layoutHeight
;
minusHeight
+=
` -
${
Util
.
getBoxSize
(
'HEIGHT'
,
heightMode
,
layoutHeight
).
height
}
`
;
}
}
}
}
if
(
this
.
containerModel
.
hasOwnProperty
(
layoutPos
))
{
if
(
this
.
containerModel
.
hasOwnProperty
(
layoutPos
))
{
...
@@ -127,11 +113,10 @@ export default class AppScrollContainer extends Vue {
...
@@ -127,11 +113,10 @@ export default class AppScrollContainer extends Vue {
}
}
});
});
}
}
this
.
middleContainerStyle
.
height
=
minusHeight
?
`calc(100%
-
${
minusHeight
}
px
)`
:
'100%'
;
this
.
middleContainerStyle
.
height
=
minusHeight
?
`calc(100%
${
minusHeight
}
)`
:
'100%'
;
if
(
this
.
containerModel
.
CENTER
)
{
if
(
this
.
containerModel
.
CENTER
)
{
this
.
containerModel
.
CENTER
.
style
.
width
=
minusWidth
?
`calc(100%
-
${
minusWidth
}
px
)`
:
'100%'
;
this
.
containerModel
.
CENTER
.
style
.
width
=
minusWidth
?
`calc(100%
${
minusWidth
}
)`
:
'100%'
;
}
}
console
.
log
(
this
.
containerModel
);
}
}
}
}
</
script
>
</
script
>
...
...
src/model/panel-detail/panel-detail.ts
浏览文件 @
1a736de6
...
@@ -52,31 +52,31 @@
...
@@ -52,31 +52,31 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
layout
:
string
=
''
;
public
layout
:
string
=
''
;
/**
/**
* 布局占位(边缘布局使用)
* 布局占位(边缘布局使用)
*
*
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
layoutPos
:
string
=
''
;
public
layoutPos
:
string
=
''
;
/**
/**
* 布局高度
* 布局高度
*
*
* @type {number}
* @type {number}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
layoutHeight
:
number
=
0
;
public
layoutHeight
:
number
=
0
;
/**
/**
* 高度模式
* 高度模式
*
*
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
heightMode
:
string
=
''
;
public
heightMode
:
string
=
''
;
/**
/**
* 布局宽度
* 布局宽度
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
* @type {number}
* @type {number}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
layoutWidth
:
number
=
0
;
public
layoutWidth
:
number
=
0
;
/**
/**
* 宽度模式
* 宽度模式
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
widthMode
:
string
=
''
;
public
widthMode
:
string
=
''
;
/**
/**
* 下档间隔
* 下档间隔
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
spacingBottom
:
string
=
''
;
public
spacingBottom
:
string
=
''
;
/**
/**
* 左侧间隔
* 左侧间隔
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
spacingLeft
:
string
=
''
;
public
spacingLeft
:
string
=
''
;
/**
/**
* 右侧间隔
* 右侧间隔
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
spacingRight
:
string
=
''
;
public
spacingRight
:
string
=
''
;
/**
/**
* 顶部间隔
* 顶部间隔
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
spacingTop
:
string
=
''
;
public
spacingTop
:
string
=
''
;
/**
/**
* 自身水平对齐模式
* 自身水平对齐模式
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
hAlignSelf
:
string
=
''
;
public
hAlignSelf
:
string
=
''
;
/**
/**
* 自身垂直对齐模式
* 自身垂直对齐模式
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
* @type {string}
* @type {string}
* @memberof PanelDetailModel
* @memberof PanelDetailModel
*/
*/
public
vAlignSelf
:
string
=
''
;
public
vAlignSelf
:
string
=
''
;
/**
/**
* Creates an instance of PanelDetailModel.
* Creates an instance of PanelDetailModel.
...
...
src/styles/default.less
浏览文件 @
1a736de6
...
@@ -6,6 +6,11 @@
...
@@ -6,6 +6,11 @@
@import './app-code-list.less';
@import './app-code-list.less';
@import './var.css';
@import './var.css';
#app {
height: 100vh;
width: 100vw;
}
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-tag-text {
.ibiz-page-tag .tags-body .tags-container .ivu-tag.tag-is-active .ivu-tag-text {
color: #1890ff;
color: #1890ff;
}
}
...
@@ -284,6 +289,12 @@
...
@@ -284,6 +289,12 @@
/*** END:多数据视图属性布局 ***/
/*** END:多数据视图属性布局 ***/
// 自定义视图布局
.app-view-layout{
width: 100%;
height: 100%;
}
// 看板视图,卡片模式
// 看板视图,卡片模式
// .view-container.appportalview,.view-container.deportalview,.view-container.deportalview9{
// .view-container.appportalview,.view-container.deportalview,.view-container.deportalview9{
// >.view-card>.ivu-card-body>.content-container{
// >.view-card>.ivu-card-body>.content-container{
...
...
src/utils/util/util.ts
浏览文件 @
1a736de6
...
@@ -299,7 +299,7 @@ export class Util {
...
@@ -299,7 +299,7 @@ export class Util {
* @returns {any}
* @returns {any}
* @memberof Util
* @memberof Util
*/
*/
public
static
formatData
(
arg
:
any
,
parent
:
any
,
params
:
any
):
any
{
public
static
formatData
(
arg
:
any
,
parent
:
any
,
params
:
any
):
any
{
let
_data
:
any
=
{};
let
_data
:
any
=
{};
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
if
(
!
name
)
{
if
(
!
name
)
{
...
@@ -309,11 +309,11 @@ export class Util {
...
@@ -309,11 +309,11 @@ export class Util {
if
(
value
&&
value
.
startsWith
(
'%'
)
&&
value
.
endsWith
(
'%'
))
{
if
(
value
&&
value
.
startsWith
(
'%'
)
&&
value
.
endsWith
(
'%'
))
{
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
);
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
);
if
(
arg
&&
arg
.
hasOwnProperty
(
key
))
{
if
(
arg
&&
arg
.
hasOwnProperty
(
key
))
{
if
(
arg
[
key
]
!==
null
&&
arg
[
key
]
!==
undefined
)
{
if
(
arg
[
key
]
!==
null
&&
arg
[
key
]
!==
undefined
)
{
value
=
arg
[
key
];
value
=
arg
[
key
];
}
else
if
(
parent
[
key
]
!==
null
&&
parent
[
key
]
!==
undefined
)
{
}
else
if
(
parent
[
key
]
!==
null
&&
parent
[
key
]
!==
undefined
)
{
value
=
parent
[
key
];
value
=
parent
[
key
];
}
else
{
}
else
{
value
=
null
;
value
=
null
;
}
}
}
else
{
}
else
{
...
@@ -336,10 +336,10 @@ export class Util {
...
@@ -336,10 +336,10 @@ export class Util {
* @param {any} params 附加参数
* @param {any} params 附加参数
* @returns {any}
* @returns {any}
* @memberof Util
* @memberof Util
*/
*/
public
static
computedNavData
(
data
:
any
,
parentContext
:
any
,
parentParam
:
any
,
params
:
any
):
any
{
public
static
computedNavData
(
data
:
any
,
parentContext
:
any
,
parentParam
:
any
,
params
:
any
):
any
{
let
_data
:
any
=
{};
let
_data
:
any
=
{};
if
(
params
&&
Object
.
keys
(
params
).
length
>
0
)
{
if
(
params
&&
Object
.
keys
(
params
).
length
>
0
)
{
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
Object
.
keys
(
params
).
forEach
((
name
:
string
)
=>
{
if
(
!
name
)
{
if
(
!
name
)
{
return
;
return
;
...
@@ -349,9 +349,9 @@ export class Util {
...
@@ -349,9 +349,9 @@ export class Util {
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
).
toLowerCase
();
const
key
=
value
.
substring
(
1
,
value
.
length
-
1
).
toLowerCase
();
if
(
data
&&
data
.
hasOwnProperty
(
key
))
{
if
(
data
&&
data
.
hasOwnProperty
(
key
))
{
value
=
data
[
key
];
value
=
data
[
key
];
}
else
if
(
parentContext
&&
parentContext
[
key
])
{
}
else
if
(
parentContext
&&
parentContext
[
key
])
{
value
=
parentContext
[
key
];
value
=
parentContext
[
key
];
}
else
if
(
parentParam
&&
parentParam
[
key
])
{
}
else
if
(
parentParam
&&
parentParam
[
key
])
{
value
=
parentParam
[
key
];
value
=
parentParam
[
key
];
}
else
{
}
else
{
value
=
null
;
value
=
null
;
...
@@ -372,7 +372,7 @@ export class Util {
...
@@ -372,7 +372,7 @@ export class Util {
* @returns {string}
* @returns {string}
* @memberof Util
* @memberof Util
*/
*/
public
static
dateFormat
(
date
:
any
,
fmt
:
string
=
"YYYY-mm-dd HH:MM:SS"
):
string
{
public
static
dateFormat
(
date
:
any
,
fmt
:
string
=
"YYYY-mm-dd HH:MM:SS"
):
string
{
let
ret
;
let
ret
;
const
opt
:
any
=
{
const
opt
:
any
=
{
"Y+"
:
date
.
getFullYear
().
toString
(),
// 年
"Y+"
:
date
.
getFullYear
().
toString
(),
// 年
...
@@ -401,7 +401,7 @@ export class Util {
...
@@ -401,7 +401,7 @@ export class Util {
* @returns {Object}
* @returns {Object}
* @memberof Util
* @memberof Util
*/
*/
public
static
deepObjectMerge
(
FirstOBJ
:
any
,
SecondOBJ
:
any
)
{
public
static
deepObjectMerge
(
FirstOBJ
:
any
,
SecondOBJ
:
any
)
{
for
(
var
key
in
SecondOBJ
)
{
for
(
var
key
in
SecondOBJ
)
{
FirstOBJ
[
key
]
=
FirstOBJ
[
key
]
&&
FirstOBJ
[
key
].
toString
()
===
"[object Object]"
?
FirstOBJ
[
key
]
=
FirstOBJ
[
key
]
&&
FirstOBJ
[
key
].
toString
()
===
"[object Object]"
?
this
.
deepObjectMerge
(
FirstOBJ
[
key
],
SecondOBJ
[
key
])
:
FirstOBJ
[
key
]
=
SecondOBJ
[
key
];
this
.
deepObjectMerge
(
FirstOBJ
[
key
],
SecondOBJ
[
key
])
:
FirstOBJ
[
key
]
=
SecondOBJ
[
key
];
...
@@ -409,7 +409,7 @@ export class Util {
...
@@ -409,7 +409,7 @@ export class Util {
return
FirstOBJ
;
return
FirstOBJ
;
}
}
/**
/**
* 表单项校验
* 表单项校验
*
*
...
@@ -419,7 +419,7 @@ export class Util {
...
@@ -419,7 +419,7 @@ export class Util {
* @returns {Promise}
* @returns {Promise}
* @memberof Util
* @memberof Util
*/
*/
public
static
validateItem
(
property
:
string
,
data
:
any
,
rules
:
any
)
{
public
static
validateItem
(
property
:
string
,
data
:
any
,
rules
:
any
)
{
// 1.获取数值和规则
// 1.获取数值和规则
const
value
=
data
[
property
];
const
value
=
data
[
property
];
const
rule
=
rules
[
property
];
const
rule
=
rules
[
property
];
...
@@ -456,11 +456,36 @@ export class Util {
...
@@ -456,11 +456,36 @@ export class Util {
* @memberof Util
* @memberof Util
*/
*/
public
static
getCookie
(
name
:
any
):
any
{
public
static
getCookie
(
name
:
any
):
any
{
let
arr
;
let
arr
;
let
reg
=
new
RegExp
(
"(^| )"
+
name
+
"=([^;]*)(;|$)"
);
let
reg
=
new
RegExp
(
"(^| )"
+
name
+
"=([^;]*)(;|$)"
);
if
(
arr
=
document
.
cookie
.
match
(
reg
))
if
(
arr
=
document
.
cookie
.
match
(
reg
))
return
unescape
(
arr
[
2
]);
return
unescape
(
arr
[
2
]);
else
else
return
null
;
return
null
;
}
/**
* 获取盒子大小(宽高模式针对面板项,按钮等项模型是控制的布局内容的宽高)
* @param mode 模式 "WIDTH" | "HEIGHT"
* @param style 样式 "FULL"(全部宽度) | "PX"(像素) | "PERCENTAGE"(百分比)
* @param value
* @returns
*/
public
static
getBoxSize
(
mode
:
"WIDTH"
|
"HEIGHT"
,
style
:
string
,
value
:
number
)
{
if
(
!
mode
||
!
style
)
{
return
{};
}
if
(
style
===
"FULL"
)
{
return
{
[
mode
.
toLowerCase
()]:
"100%"
};
}
else
{
if
(
!
value
)
{
return
{};
}
else
if
(
style
===
"PERCENTAGE"
)
{
return
{
[
mode
.
toLowerCase
()]:
`
${
value
}
%`
};
}
else
{
return
{
[
mode
.
toLowerCase
()]:
`
${
value
}
px`
};
}
}
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录