Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-Mob-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-Mob-R7-Res
提交
eb89f9dd
提交
eb89f9dd
编写于
9月 01, 2020
作者:
zhujiamin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除历史记录插件
上级
cfb88ca7
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
0 行增加
和
286 行删除
+0
-286
app-register.ts
src/app-register.ts
+0
-2
app-history-list.less
src/components/app-history-list/app-history-list.less
+0
-35
app-history-list.vue
src/components/app-history-list/app-history-list.vue
+0
-249
未找到文件。
src/app-register.ts
浏览文件 @
eb89f9dd
...
...
@@ -103,8 +103,6 @@ export const AppComponents = {
// 主题切换组件
v
.
component
(
'app-mob-select-changeTheme'
,()
=>
import
(
'@/components/app-mob-select-changeTheme/app-mob-select-changeTheme.vue'
));
v
.
component
(
'app-list-index'
,()
=>
import
(
'@/components/app-list-index/app-list-index.vue'
));
// 下拉列表组件
v
.
component
(
'app-history-list'
,()
=>
import
(
'@/components/app-history-list/app-history-list.vue'
));
// 富文本项
v
.
component
(
'app-mob-rich-text-editor'
,()
=>
import
(
'@/components/app-mob-rich-text-editor/app-mob-rich-text-editor.vue'
));
// 列表项插件
...
...
src/components/app-history-list/app-history-list.less
已删除
100644 → 0
浏览文件 @
cfb88ca7
.container{
.onecontent{
.oneitem{
min-height: 30px;
width: 100%;
.header{
font-size: 14px;
color: rgb(192, 186, 186);
margin-bottom: 5px;
span:nth-child(2){
margin-left: 30px;
}
}
.footer{
font-size: 15px;
font-family:Helvetica;
color:#323538;
}
padding:0 15px;
margin-bottom: 20px;
}
margin: 0 auto;
overflow: hidden;
transition:height 1s ease;
}
.button{
background-color: white;
color: #8CB4E2;
margin: 0 auto;
text-align: center;
font-size: 13px;
padding-top: 5px;
border-top: 1px solid rgb(248, 242, 242);
}
}
src/components/app-history-list/app-history-list.vue
已删除
100644 → 0
浏览文件 @
cfb88ca7
<
template
>
<div
class=
"container"
>
<div
class=
"onecontent"
ref=
"onecontent"
>
<div
v-for=
"item in items"
:key=
"item.id"
class=
"oneitem"
ref=
"oneitem"
>
<div
class=
"header"
><span>
{{
item
.
date
}}
</span>
<span>
{{
item
.
method
}}
</span></div>
<div
class=
"footer"
v-for=
"i in item.items"
:key=
"i"
>
{{
i
}}
</div>
</div>
</div>
<div
class=
"button"
>
<div
@
click=
"loadMore"
><span>
{{
text
}}
</span></div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
CodeListService
}
from
"@/ibiz-core"
;
@
Component
({
components
:
{}
})
export
default
class
APPHistoryList
extends
Vue
{
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof APPHistoryList
*/
public
codeListService
:
CodeListService
=
new
CodeListService
();
/**
* 传入数据items
*
* @type {Array}
* @memberof APPHistoryList
*/
@
Prop
()
public
items
?:
Array
<
any
>
;
/**
* 传入数据itemNameDetail
*
* @type {any}
* @memberof APPHistoryList
*/
@
Prop
()
public
itemNameDetail
?:
any
;
/**
* 监听itemNameDetail
*
* @returns {void}
* @memberof APPHistoryList
*/
@
Watch
(
'itemNameDetail'
)
itemNameDetailChange
(){
this
.
handler
();
}
/**
* 监听items
*
* @returns {void}
* @memberof APPHistoryList
*/
@
Watch
(
'items'
,{
immediate
:
true
,
deep
:
true
})
itemsChange
(){
if
(
this
.
items
!=
undefined
&&
this
.
items
.
length
!==
0
)
{
this
.
text
=
'查看更多记录'
;
}
else
{
this
.
text
=
'暂无更多记录'
;
}
this
.
handler
();
this
.
setHeight
();
}
/**
* 获取代码表
*
* @returns {void}
* @memberof APPHistoryList
*/
public
getCodeList
(
tag
:
string
,
type
:
string
,
value
:
any
){
if
(
type
==
'STATIC'
)
{
let
infos
:
any
=
this
.
$store
.
getters
.
getCodeListItems
(
tag
);
let
info
:
any
=
infos
.
find
((
v
:
any
)
=>
v
.
value
==
value
);
return
info
;
}
}
/**
* 解析代码表获取数据
*
* @returns {void}
* @memberof APPHistoryList
*/
public
handler
(){
if
(
this
.
items
!=
undefined
)
{
this
.
items
.
forEach
((
v
:
any
)
=>
{
let
file
:
string
=
""
;
let
method
:
string
=
""
;
if
(
v
.
objecttype
){
}
if
(
v
.
actions
){
let
info
:
any
=
this
.
getCodeList
(
this
.
codeListAAA
.
actions
.
tag
,
'STATIC'
,
v
.
actions
);
v
.
method
=
info
.
text
;
method
=
info
.
text
;
}
if
(
v
.
item
){
v
.
items
=
[];
v
.
item
.
forEach
((
i
:
any
)
=>
{
file
=
(
this
.
$t
(
v
.
objecttype
+
'.fields.'
+
i
.
field
)
as
string
);
v
.
items
.
push
(
method
+
file
+
'旧值为'
+
'"'
+
i
.
old
+
'"'
+
'新值为'
+
'"'
+
i
.
ibiznew
+
'"'
);
});
}
})
}
}
/**
* 按钮文本
*
* @type {String}
* @memberof APPHistoryList
*/
public
text
:
string
=
'查看更多记录'
;
/**
* 文本切换
*
* @type {Boolean}
* @memberof APPHistoryList
*/
public
isShow
:
boolean
=
false
;
/**
* 代码表规范
*
* @memberof APPHistoryList
*/
public
codeListAAA
:
any
=
{
"actions"
:{
type
:
"static"
,
tag
:
"Action__type"
},
"old"
:{
type
:
"static"
,
tag
:
"Product__status"
}
}
/**
* 初始个数
*
* @type {Number}
* @memberof APPHistoryList
*/
public
num
:
number
=
3
;
/**
* 初始高度
*
* @type {Number}
* @memberof APPHistoryList
*/
public
startHeig
:
number
=
0
;
/**
* 终止高度
*
* @type {Number}
* @memberof APPHistoryList
*/
public
endHeig
:
number
=
0
;
/**
* 点击展开
*
* @returns {void}
* @memberof APPHistoryList
*/
public
loadMore
():
void
{
this
.
isShow
=
!
this
.
isShow
;
this
.
text
=
this
.
isShow
?
'收起'
:
'查看更多记录'
;
let
ele
:
any
=
document
.
querySelector
(
'.onecontent'
);
let
ite
:
any
=
document
.
querySelectorAll
(
'.oneitem'
);
this
.
startHeig
=
0
;
this
.
endHeig
=
0
;
for
(
let
i
=
0
;
i
<=
this
.
num
;
i
++
){
if
(
ite
[
i
]
!=
undefined
)
{
this
.
startHeig
+=
ite
[
i
].
offsetHeight
;
}
}
for
(
let
i
=
0
;
i
<
ite
.
length
;
i
++
){
if
(
ite
[
i
]
!=
undefined
)
{
this
.
endHeig
+=
ite
[
i
].
offsetHeight
+
20
;
}
}
ele
.
style
.
height
=
this
.
isShow
?
this
.
endHeig
+
'px'
:
+
this
.
startHeig
+
'px'
;
}
/**
* 生命周期created
*
* @returns {void}
* @memberof APPHistoryList
*/
public
created
(){
this
.
handler
();
}
/**
* 设置初始高度
*
* @returns {void}
* @memberof APPHistoryList
*/
public
setHeight
(){
let
ele
:
any
=
document
.
querySelector
(
'.onecontent'
);
let
ite
:
any
=
this
.
$refs
.
oneitem
;
if
(
ite
!==
undefined
)
{
for
(
let
i
:
any
=
0
;
i
<=
this
.
num
;
i
++
){
if
(
ite
[
i
]
!==
undefined
)
{
this
.
startHeig
+=
ite
[
i
].
offsetHeight
;
}
}
}
if
(
ele
&&
ele
.
style
){
ele
.
style
.
height
=
this
.
startHeig
+
'px'
;
}
}
/**
* 生命周期mounted
*
* @returns {void}
* @memberof APPHistoryList
*/
public
mounted
(){}
}
</
script
>
<
style
lang=
"less"
>
@import "./app-history-list.less";
</
style
>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录