Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
aaf9f958
提交
aaf9f958
authored
7月 22, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 1.类型拍戏报错
2.分页数据错误 3.全部消息取消默认状态排序 4.数据集同步消息跳转路由修改
上级
e2051479
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
94 行增加
和
30 行删除
+94
-30
ExtSysMsgMapper.xml
...main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.xml
+1
-1
MsgController.java
...in/java/io/dataease/controller/message/MsgController.java
+12
-1
SysMsgService.java
.../main/java/io/dataease/service/message/SysMsgService.java
+5
-2
index.vue
frontend/src/views/dataset/index.vue
+4
-4
all.vue
frontend/src/views/msg/all.vue
+5
-2
readed.vue
frontend/src/views/msg/readed.vue
+4
-1
unread.vue
frontend/src/views/msg/unread.vue
+4
-1
TaskRecord.vue
frontend/src/views/system/task/TaskRecord.vue
+18
-7
dataset.vue
frontend/src/views/system/task/dataset.vue
+41
-11
没有找到文件。
backend/src/main/java/io/dataease/base/mapper/ext/ExtSysMsgMapper.xml
浏览文件 @
aaf9f958
...
...
@@ -52,7 +52,7 @@
order by ${orderByClause}
</if>
<if
test=
"orderByClause == null"
>
order by sm.
status a
sc
order by sm.
create_time de
sc
</if>
</select>
...
...
backend/src/main/java/io/dataease/controller/message/MsgController.java
浏览文件 @
aaf9f958
...
...
@@ -15,9 +15,15 @@ import io.dataease.controller.message.dto.SettingTreeNode;
import
io.dataease.service.message.SysMsgService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
@Api
(
tags
=
"系统:消息管理"
)
@RequestMapping
(
"/api/sys_msg"
)
...
...
@@ -31,8 +37,13 @@ public class MsgController {
@PostMapping
(
"/list/{goPage}/{pageSize}"
)
public
Pager
<
List
<
MsgGridDto
>>
messages
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
MsgRequest
msgRequest
)
{
Long
userId
=
AuthUtils
.
getUser
().
getUserId
();
List
<
Long
>
typeIds
=
null
;
if
(
ObjectUtils
.
isNotEmpty
(
msgRequest
.
getType
())){
List
<
SysMsgType
>
sysMsgTypes
=
sysMsgService
.
queryMsgTypes
();
typeIds
=
sysMsgTypes
.
stream
().
filter
(
sysMsgType
->
msgRequest
.
getType
()
==
sysMsgType
.
getPid
()).
map
(
SysMsgType:
:
getMsgTypeId
).
collect
(
Collectors
.
toList
());
}
Page
<
Object
>
page
=
PageHelper
.
startPage
(
goPage
,
pageSize
,
true
);
Pager
<
List
<
MsgGridDto
>>
listPager
=
PageUtils
.
setPageInfo
(
page
,
sysMsgService
.
queryGrid
(
userId
,
msgRequest
));
Pager
<
List
<
MsgGridDto
>>
listPager
=
PageUtils
.
setPageInfo
(
page
,
sysMsgService
.
queryGrid
(
userId
,
msgRequest
,
typeIds
));
return
listPager
;
}
...
...
backend/src/main/java/io/dataease/service/message/SysMsgService.java
浏览文件 @
aaf9f958
...
...
@@ -67,7 +67,7 @@ public class SysMsgService {
return
sysMsgs
;
}
public
List
<
MsgGridDto
>
queryGrid
(
Long
userId
,
MsgRequest
msgRequest
)
{
public
List
<
MsgGridDto
>
queryGrid
(
Long
userId
,
MsgRequest
msgRequest
,
List
<
Long
>
typeIds
)
{
String
orderClause
=
" create_time desc"
;
SysMsgExample
example
=
new
SysMsgExample
();
SysMsgExample
.
Criteria
criteria
=
example
.
createCriteria
();
...
...
@@ -79,13 +79,16 @@ public class SysMsgService {
orderClause
=
String
.
join
(
", "
,
orders
);
}
if
(
ObjectUtils
.
isNotEmpty
(
msgRequest
.
getType
()))
{
/*
if (ObjectUtils.isNotEmpty(msgRequest.getType())) {
SysMsgTypeExample sysMsgTypeExample = new SysMsgTypeExample();
sysMsgTypeExample.createCriteria().andPidEqualTo(msgRequest.getType());
List<SysMsgType> sysMsgTypes = sysMsgTypeMapper.selectByExample(sysMsgTypeExample);
List<Long> typeIds = sysMsgTypes.stream().map(SysMsgType::getMsgTypeId).collect(Collectors.toList());
criteria.andTypeIdIn(typeIds);
}*/
if
(
CollectionUtils
.
isNotEmpty
(
typeIds
)){
criteria
.
andTypeIdIn
(
typeIds
);
}
if
(
ObjectUtils
.
isNotEmpty
(
msgRequest
.
getStatus
()))
{
...
...
frontend/src/views/dataset/index.vue
浏览文件 @
aaf9f958
...
...
@@ -26,7 +26,7 @@ import AddExcel from './add/AddExcel'
import
AddCustom
from
'./add/AddCustom'
import
FieldEdit
from
'./data/FieldEdit'
import
{
removeClass
}
from
'@/utils'
import
bus
from
'@/utils/bus'
//
import bus from '@/utils/bus'
export
default
{
name
:
'DataSet'
,
components
:
{
DeMainContainer
,
DeContainer
,
DeAsideContainer
,
Group
,
DataHome
,
ViewTable
,
AddDB
,
AddSQL
,
AddExcel
,
AddCustom
},
...
...
@@ -39,9 +39,9 @@ export default {
},
mounted
()
{
removeClass
(
document
.
body
,
'showRightPanel'
)
bus
.
$on
(
'to-msg-dataset'
,
params
=>
{
this
.
toMsgShare
(
params
)
})
//
bus.$on('to-msg-dataset', params => {
//
this.toMsgShare(params)
//
})
},
created
()
{
this
.
$store
.
dispatch
(
'app/toggleSideBarHide'
,
true
)
...
...
frontend/src/views/msg/all.vue
浏览文件 @
aaf9f958
...
...
@@ -36,7 +36,7 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
sortable=
"custom"
:label=
"$t('webmsg.type')"
width=
"140"
>
<el-table-column
prop=
"type
Id
"
sortable=
"custom"
:label=
"$t('webmsg.type')"
width=
"140"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getTypeName
(
scope
.
row
.
typeId
)
}}
</span>
</
template
>
...
...
@@ -101,7 +101,7 @@ export default {
}
if
(
this
.
orderConditions
.
length
===
0
)
{
param
.
orders
=
[
'
status asc '
,
'
create_time desc '
]
param
.
orders
=
[
'create_time desc '
]
}
else
{
param
.
orders
=
formatOrders
(
this
.
orderConditions
)
}
...
...
@@ -139,6 +139,9 @@ export default {
if
(
prop
===
'createTime'
)
{
prop
=
'create_time'
}
if
(
prop
===
'typeId'
)
{
prop
=
'type_id'
}
addOrder
({
field
:
prop
,
value
:
order
},
this
.
orderConditions
)
this
.
search
()
}
...
...
frontend/src/views/msg/readed.vue
浏览文件 @
aaf9f958
...
...
@@ -42,7 +42,7 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
sortable=
"custom"
:label=
"$t('webmsg.type')"
width=
"140"
>
<el-table-column
prop=
"type
Id
"
sortable=
"custom"
:label=
"$t('webmsg.type')"
width=
"140"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getTypeName
(
scope
.
row
.
typeId
)
}}
</span>
</
template
>
...
...
@@ -139,6 +139,9 @@ export default {
if
(
prop
===
'readTime'
)
{
prop
=
'read_time'
}
if
(
prop
===
'typeId'
)
{
prop
=
'type_id'
}
addOrder
({
field
:
prop
,
value
:
order
},
this
.
orderConditions
)
this
.
search
()
}
...
...
frontend/src/views/msg/unread.vue
浏览文件 @
aaf9f958
...
...
@@ -45,7 +45,7 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"type"
sortable=
"custom"
:label=
"$t('webmsg.type')"
width=
"140"
>
<el-table-column
prop=
"type
Id
"
sortable=
"custom"
:label=
"$t('webmsg.type')"
width=
"140"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getTypeName
(
scope
.
row
.
typeId
)
}}
</span>
</
template
>
...
...
@@ -168,6 +168,9 @@ export default {
if
(
prop
===
'createTime'
)
{
prop
=
'create_time'
}
if
(
prop
===
'typeId'
)
{
prop
=
'type_id'
}
addOrder
({
field
:
prop
,
value
:
order
},
this
.
orderConditions
)
this
.
search
()
}
...
...
frontend/src/views/system/task/TaskRecord.vue
浏览文件 @
aaf9f958
...
...
@@ -2,7 +2,7 @@
<el-col>
<el-row
style=
"margin-top: 10px;"
>
<complex-table
:data=
"data"
:columns=
"columns"
local-key=
"datasetTaskRecord"
:search-config=
"searchConfig"
:pagination-config=
"paginationConfig"
@
select=
"select"
@
search=
"search"
@
sort-change=
"sortChange"
>
<el-table-column
prop=
"name"
:label=
"$t('dataset.task_name')"
/>
<el-table-column
prop=
"name"
:label=
"$t('dataset.task_name')"
/>
<el-table-column
prop=
"startTime"
:label=
"$t('dataset.start_time')"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
startTime
|
timestampFormatDate
}}
</span>
...
...
@@ -49,14 +49,13 @@ import LayoutContent from '@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
{
formatCondition
,
formatQuickCondition
,
addOrder
,
formatOrders
}
from
'@/utils/index'
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
import
{
post
}
from
'@/api/dataset/dataset'
import
{
post
}
from
'@/api/dataset/dataset'
import
cron
from
'@/components/cron/cron'
import
TableSelector
from
'@/views/chart/view/TableSelector'
export
default
{
name
:
'TaskRecord'
,
components
:
{
ComplexTable
,
LayoutContent
,
cron
,
TableSelector
},
components
:
{
ComplexTable
,
LayoutContent
,
cron
,
TableSelector
},
data
()
{
return
{
header
:
''
,
...
...
@@ -73,7 +72,7 @@ export default {
quickPlaceholder
:
this
.
$t
(
'dataset.task.search_by_name'
),
components
:
[
{
field
:
'dataset_table_task.name'
,
label
:
this
.
$t
(
'dataset.task.name'
),
component
:
'DeComplexInput'
},
{
field
:
'dataset_table_task_log.status'
,
label
:
this
.
$t
(
'commons.status'
),
component
:
'FuComplexSelect'
,
options
:
[{
label
:
this
.
$t
(
'dataset.completed'
),
value
:
'Completed'
},
{
label
:
this
.
$t
(
'dataset.underway'
),
value
:
'Underway'
},
{
label
:
this
.
$t
(
'dataset.error'
),
value
:
'Error'
}],
multiple
:
false
}
{
field
:
'dataset_table_task_log.status'
,
label
:
this
.
$t
(
'commons.status'
),
component
:
'FuComplexSelect'
,
options
:
[{
label
:
this
.
$t
(
'dataset.completed'
),
value
:
'Completed'
},
{
label
:
this
.
$t
(
'dataset.underway'
),
value
:
'Underway'
},
{
label
:
this
.
$t
(
'dataset.error'
),
value
:
'Error'
}],
multiple
:
false
}
]
},
paginationConfig
:
{
...
...
@@ -103,18 +102,30 @@ export default {
error_massage
:
''
}
},
computed
:
{
},
created
()
{
this
.
search
()
this
.
timer
=
setInterval
(()
=>
{
this
.
search
(
this
.
last_condition
,
false
)
},
5000
)
},
computed
:
{
},
beforeDestroy
()
{
clearInterval
(
this
.
timer
)
},
methods
:
{
msg2Current
(
routerParam
)
{
const
taskId
=
routerParam
.
taskId
// console.log(taskId)
const
current_condition
=
{
'dataset_table_task.id'
:
{
field
:
'dataset_table_task.id'
,
operator
:
'eq'
,
value
:
taskId
}
}
this
.
search
(
current_condition
)
},
sortChange
({
column
,
prop
,
order
})
{
this
.
orderConditions
=
[]
if
(
!
order
)
{
...
...
frontend/src/views/system/task/dataset.vue
浏览文件 @
aaf9f958
...
...
@@ -6,8 +6,8 @@
<el-tab-pane
:label=
"$t('dataset.task.list')"
name=
"DatasetTaskList"
>
<dataset-task-list
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('dataset.task.record')"
name=
"TaskRecord"
>
<task-record
/>
<el-tab-pane
:label=
"$t('dataset.task.record')"
name=
"TaskRecord"
>
<task-record
ref=
"task_record"
/>
</el-tab-pane>
</el-tabs>
</el-row>
...
...
@@ -18,21 +18,51 @@
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
UnionView
from
"@/views/dataset/data/UnionView"
;
import
UpdateInfo
from
"@/views/dataset/data/UpdateInfo"
;
import
DatasetTaskList
from
"@/views/system/task/DatasetTaskList"
;
import
TaskRecord
from
"@/views/system/task/TaskRecord"
;
import
TabDataPreview
from
"@/views/dataset/data/TabDataPreview"
;
import
DatasetTableData
from
"@/views/dataset/common/DatasetTableData"
;
import
UnionView
from
'@/views/dataset/data/UnionView'
import
UpdateInfo
from
'@/views/dataset/data/UpdateInfo'
import
DatasetTaskList
from
'@/views/system/task/DatasetTaskList'
import
TaskRecord
from
'@/views/system/task/TaskRecord'
import
TabDataPreview
from
'@/views/dataset/data/TabDataPreview'
import
DatasetTableData
from
'@/views/dataset/common/DatasetTableData'
import
bus
from
'@/utils/bus'
export
default
{
components
:
{
DatasetTableData
,
LayoutContent
,
ComplexTable
,
UnionView
,
UpdateInfo
,
TabDataPreview
,
DatasetTaskList
,
TaskRecord
},
components
:
{
DatasetTableData
,
LayoutContent
,
ComplexTable
,
UnionView
,
UpdateInfo
,
TabDataPreview
,
DatasetTaskList
,
TaskRecord
},
data
()
{
return
{
tabActive
:
'DatasetTaskList'
,
tabActive
:
'DatasetTaskList'
}
},
mounted
()
{
bus
.
$on
(
'to-msg-dataset'
,
params
=>
{
this
.
toMsgShare
(
params
)
})
},
created
()
{
const
routerParam
=
this
.
$router
.
currentRoute
.
params
this
.
toMsgShare
(
routerParam
)
},
methods
:
{
toMsgShare
(
routerParam
)
{
if
(
routerParam
!==
null
&&
routerParam
.
msgNotification
)
{
const
panelShareTypeIds
=
[
4
,
5
,
6
]
// 说明是从消息通知跳转过来的
if
(
panelShareTypeIds
.
includes
(
routerParam
.
msgType
))
{
// 是数据集同步
if
(
routerParam
.
sourceParam
)
{
try
{
const
msgParam
=
JSON
.
parse
(
routerParam
.
sourceParam
)
this
.
param
=
msgParam
.
tableId
this
.
tabActive
=
'TaskRecord'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
task_record
&&
this
.
$refs
.
task_record
.
msg2Current
&&
this
.
$refs
.
task_record
.
msg2Current
(
routerParam
.
sourceParam
)
})
}
catch
(
error
)
{
console
.
error
(
error
)
}
}
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论