Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
29ce5f6c
提交
29ce5f6c
编写于
8月 24, 2020
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新统一待办组件
上级
3683f48c
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
116 行增加
和
40 行删除
+116
-40
app-message-popover.less
src/components/app-message-popover/app-message-popover.less
+21
-2
app-message-popover.vue
src/components/app-message-popover/app-message-popover.vue
+95
-38
未找到文件。
src/components/app-message-popover/app-message-popover.less
浏览文件 @
29ce5f6c
...
@@ -3,14 +3,26 @@
...
@@ -3,14 +3,26 @@
line-height: 24px;
line-height: 24px;
}
}
.show-more {
text-align: center;
margin-top: 10px;
height: 20px;
color: #409eff;
label {
cursor: pointer;
}
}
#bellBtn {
#bellBtn {
height: 24px;
height: 24px;
font-size: 1
6
px;
font-size: 1
9
px;
padding-top: 2px;
padding-top: 2px;
padding-right: 2px;
color: #aaa;
}
}
.Row {
.Row {
height:
6
0px;
height:
7
0px;
border-bottom: 1px solid lightgray;
border-bottom: 1px solid lightgray;
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -23,12 +35,19 @@
...
@@ -23,12 +35,19 @@
.column2 {
.column2 {
border: 0px red solid;
border: 0px red solid;
.process-definition-name {
font-size: 14px;
}
.el-row {
.el-row {
display: flex;
display: flex;
.el-col {
.el-col {
flex-grow: 1;
flex-grow: 1;
div {
margin-bottom: 5px;
}
div:first-child {
div:first-child {
font-weight: 500;
font-weight: 500;
overflow: hidden;
overflow: hidden;
...
...
src/components/app-message-popover/app-message-popover.vue
浏览文件 @
29ce5f6c
...
@@ -4,22 +4,26 @@
...
@@ -4,22 +4,26 @@
<el-popover
<el-popover
placement=
"bottom"
placement=
"bottom"
trigger=
"click"
trigger=
"click"
width=
"400"
>
width=
"400"
@
show=
"initTabCnt"
@
hide=
"initTabCnt"
>
<el-tabs
:value=
"default_tab_pane"
:stretch=
"true"
>
<el-tabs
:value=
"default_tab_pane"
:stretch=
"true"
>
<!-- 待办 -->
<!-- 待办 -->
<el-tab-pane
:label=
"myTasks.length==0?myTasksLabel:(myTasksLabel+'('+myTasks.length+')')"
name=
"first"
style=
"height: 300px; overflow: auto"
:draggable=
"false"
>
<el-tab-pane
:label=
"myTasks.length==0?myTasksLabel:(myTasksLabel+'('+myTasks.length+')')"
name=
"first"
style=
"height: 300px; overflow: auto"
:draggable=
"false"
>
<el-row
v-for=
"(myTask,index) in myTasks"
class=
"Row"
:key=
"index"
:draggable=
"false"
>
<template
v-for=
"(myTask,index) in myTasks"
>
<el-col
:span=
"6"
class=
"column1"
:draggable=
"false"
>
<template
v-if=
"index
<
taskShowCnt
"
>
<el-row
class=
"Row"
:key=
"index"
:draggable=
"false"
>
<el-col
:span=
"3"
class=
"column1"
:draggable=
"false"
>
<el-avatar
icon=
"el-icon-s-check"
size=
"small"
:draggable=
"false"
style=
"color: white;background-color: #409eff;"
></el-avatar>
<el-avatar
icon=
"el-icon-s-check"
size=
"small"
:draggable=
"false"
style=
"color: white;background-color: #409eff;"
></el-avatar>
</el-col>
</el-col>
<el-col
:span=
"18
"
class=
"column2"
:draggable=
"false"
>
<el-col
:span=
"21
"
class=
"column2"
:draggable=
"false"
>
<el-row
:draggable=
"false"
>
<el-row
:draggable=
"false"
>
<el-col
:span=
"12
"
:draggable=
"false"
>
<el-col
:span=
"16
"
:draggable=
"false"
>
<div
:draggable=
"false"
>
{{
myTask
.
processDefinitionName
}}
</div>
<div
class=
"process-definition-name"
:draggable=
"false"
><strong>
{{
myTask
.
processDefinitionName
}}
</strong>
</div>
<div
:draggable=
"false"
>
{{
myTask
.
description
}}
</div>
<div
:draggable=
"false"
>
{{
myTask
.
description
}}
</div>
<div
:draggable=
"false"
>
{{
myTask
.
createTime
}}
</div>
<div
:draggable=
"false"
>
{{
formatDate
(
myTask
.
createTime
,
'MM-DD hh:mm'
)
}}
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
:draggable=
"false"
>
<el-col
:span=
"5"
:draggable=
"false"
style=
'display: flex; align-items: center'
>
<el-tag
:type=
"myTask.name.indexOf('驳回')!=-1?'danger':(myTask.name.indexOf('成功')!=-1?'success':(myTask.name.indexOf('取消')!=-1?'info':'-'))"
<el-tag
:type=
"myTask.name.indexOf('驳回')!=-1?'danger':(myTask.name.indexOf('成功')!=-1?'success':(myTask.name.indexOf('取消')!=-1?'info':'-'))"
size=
"small"
@
click=
"handleTag(myTask)"
size=
"small"
@
click=
"handleTag(myTask)"
style=
"cursor: pointer;"
:draggable=
"false"
>
style=
"cursor: pointer;"
:draggable=
"false"
>
...
@@ -29,21 +33,31 @@
...
@@ -29,21 +33,31 @@
</el-row>
</el-row>
</el-col>
</el-col>
</el-row>
</el-row>
</
template
>
</template>
<
template
>
<div
class=
'show-more'
@
click=
"showMore('taskShowCnt')"
>
<label
v-if=
"taskShowCnt
<
myTasks
.
length
"
>
{{
this
.
$t
(
'components.appMessagePopover.loadMore'
)
}}
</label>
<label
v-else
>
{{
this
.
$t
(
'components.appMessagePopover.noMore'
)
}}
</label>
</div>
</
template
>
</el-tab-pane>
</el-tab-pane>
<!-- 消息 -->
<!-- 消息 -->
<el-tab-pane
:label=
"myMsgs.length==0?myMsgsLabel:(myMsgsLabel+'('+myMsgs.length+')')"
name=
"second"
:style=
"{height: '300px',overflow: 'auto'}"
:draggable=
"false"
>
<el-tab-pane
:label=
"myMsgs.length==0?myMsgsLabel:(myMsgsLabel+'('+myMsgs.length+')')"
name=
"second"
:style=
"{height: '300px',overflow: 'auto'}"
:draggable=
"false"
>
<el-row
v-for=
"(myMsg,index) in myMsgs"
class=
"Row"
:key=
"index"
:draggable=
"false"
>
<
template
v-for=
"(myMsg,index) in myMsgs"
>
<el-col
:span=
"6"
class=
"column1"
:draggable=
"false"
>
<template
v-if=
"index
<
msgShowCnt
"
>
<el-row
class=
"Row"
:key=
"index"
:draggable=
"false"
>
<el-col
:span=
"3"
class=
"column1"
:draggable=
"false"
>
<el-avatar
icon=
"el-icon-chat-dot-square"
size=
"small"
:draggable=
"false"
style=
"color: white;background-color: orange;"
></el-avatar>
<el-avatar
icon=
"el-icon-chat-dot-square"
size=
"small"
:draggable=
"false"
style=
"color: white;background-color: orange;"
></el-avatar>
</el-col>
</el-col>
<el-col
:span=
"18
"
class=
"column2"
:draggable=
"false"
>
<el-col
:span=
"21
"
class=
"column2"
:draggable=
"false"
>
<el-row
:draggable=
"false"
>
<el-row
:draggable=
"false"
>
<el-col
:span=
"12
"
:draggable=
"false"
>
<el-col
:span=
"16
"
:draggable=
"false"
>
<div
:draggable=
"false"
>
{{
myMsg
.
processDefinitionName
}}
</div>
<div
class=
"process-definition-name"
:draggable=
"false"
><strong>
{{
myMsg
.
processDefinitionName
}}
</strong>
</div>
<div
:draggable=
"false"
>
{{
myMsg
.
description
}}
</div>
<div
:draggable=
"false"
>
{{
myMsg
.
description
}}
</div>
<div
:draggable=
"false"
>
{{
myMsg
.
createTime
}}
</div>
<div
:draggable=
"false"
>
{{
formatDate
(
myMsg
.
createTime
,
'MM-DD hh:mm'
)
}}
</div>
</el-col>
</el-col>
<el-col
:span=
"6"
:draggable=
"false"
>
<el-col
:span=
"5"
:draggable=
"false"
style=
'display: flex; align-items: center'
>
<el-tag
:type=
"myMsg.name.indexOf('驳回')!=-1?'danger':(myMsg.name.indexOf('成功')!=-1?'success':(myMsg.name.indexOf('取消')!=-1?'info':'-'))"
<el-tag
:type=
"myMsg.name.indexOf('驳回')!=-1?'danger':(myMsg.name.indexOf('成功')!=-1?'success':(myMsg.name.indexOf('取消')!=-1?'info':'-'))"
size=
"small"
@
click=
"handleTag(myMsg)"
size=
"small"
@
click=
"handleTag(myMsg)"
style=
"cursor: pointer;"
:draggable=
"false"
>
style=
"cursor: pointer;"
:draggable=
"false"
>
...
@@ -53,9 +67,17 @@
...
@@ -53,9 +67,17 @@
</el-row>
</el-row>
</el-col>
</el-col>
</el-row>
</el-row>
</
template
>
</template>
<
template
>
<div
class=
'show-more'
@
click=
"showMore('msgShowCnt')"
>
<label
v-if=
"msgShowCnt
<
myTasks
.
length
"
>
{{
this
.
$t
(
'components.appMessagePopover.loadMore'
)
}}
</label>
<label
v-else
>
{{
this
.
$t
(
'components.appMessagePopover.noMore'
)
}}
</label>
</div>
</
template
>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<
el-button
id=
"bellBtn"
icon=
"el-icon-bell"
size=
"mini"
slot=
"reference"
></el-button
>
<
i
id=
"bellBtn"
size=
"20"
slot=
"reference"
class=
'el-icon-bell'
></i
>
</el-popover>
</el-popover>
</el-badge>
</el-badge>
<!-- 消息弹出框绘制结束 -->
<!-- 消息弹出框绘制结束 -->
...
@@ -65,6 +87,7 @@
...
@@ -65,6 +87,7 @@
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Subject
}
from
"rxjs"
;
import
{
Subject
}
from
"rxjs"
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
moment
from
'moment'
;
@
Component
({})
@
Component
({})
export
default
class
AppMessagePopover
extends
Vue
{
export
default
class
AppMessagePopover
extends
Vue
{
...
@@ -77,10 +100,14 @@
...
@@ -77,10 +100,14 @@
public
myTasks
:
any
=
[];
public
myTasks
:
any
=
[];
// 待办面板标签
// 待办面板标签
public
myTasksLabel
:
any
=
"待办"
;
public
myTasksLabel
:
any
=
"待办"
;
// 待办面板显示条数
public
taskShowCnt
:
number
=
0
;
// 消息列表
// 消息列表
public
myMsgs
:
any
=
[];
public
myMsgs
:
any
=
[];
// 消息面板标签
// 消息面板标签
public
myMsgsLabel
:
any
=
"消息"
;
public
myMsgsLabel
:
any
=
"消息"
;
// 信息面板显示条数
public
msgShowCnt
:
number
=
0
;
/**
/**
* vue创建
* vue创建
...
@@ -160,6 +187,36 @@
...
@@ -160,6 +187,36 @@
this
.
myMsgs
=
[];
this
.
myMsgs
=
[];
}
}
/**
* 时间格式转换
*/
public
formatDate
(
date
:
string
,
format
:
string
)
{
if
(
date
&&
format
)
{
return
moment
(
date
).
format
(
format
);
}
return
date
;
}
/**
* 加载更多
*/
public
showMore
(
cnt
:
string
)
{
if
(
Object
.
is
(
'taskShowCnt'
,
cnt
))
{
this
.
taskShowCnt
+
10
<
this
.
myTasks
.
length
?
this
.
taskShowCnt
+=
10
:
this
.
taskShowCnt
+=
this
.
myTasks
.
length
-
this
.
taskShowCnt
;
}
if
(
Object
.
is
(
'msgShowCnt'
,
cnt
))
{
this
.
msgShowCnt
+
10
<
this
.
myMsgs
.
length
?
this
.
msgShowCnt
+=
10
:
this
.
msgShowCnt
+=
this
.
myMsgs
.
length
-
this
.
msgShowCnt
;
}
}
/**
* 弹出框 显示/隐藏 时显示条数初始化
*/
public
initTabCnt
()
{
this
.
taskShowCnt
=
this
.
myTasks
.
length
>=
10
?
10
:
this
.
myTasks
.
length
;
this
.
msgShowCnt
=
this
.
myMsgs
.
length
>=
10
?
10
:
this
.
myMsgs
.
length
;
}
}
}
</
script
>
</
script
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录