Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
88d122d0
提交
88d122d0
authored
1月 20, 2022
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
9097b180
57d948b6
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
182 行增加
和
96 行删除
+182
-96
DynamicMenuServiceImpl.java
...io/dataease/auth/service/impl/DynamicMenuServiceImpl.java
+0
-4
CronUtils.java
...nd/src/main/java/io/dataease/commons/utils/CronUtils.java
+54
-0
TaskHandler.java
.../java/io/dataease/job/sechedule/strategy/TaskHandler.java
+6
-51
EmailTaskHandler.java
...ataease/job/sechedule/strategy/impl/EmailTaskHandler.java
+2
-1
DirService.java
.../src/main/java/io/dataease/mobile/service/DirService.java
+0
-12
XEmailTaskServer.java
...ain/java/io/dataease/plugins/server/XEmailTaskServer.java
+30
-2
ShareService.java
...src/main/java/io/dataease/service/panel/ShareService.java
+3
-1
index.vue
frontend/src/components/DeDrag/index.vue
+22
-6
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+4
-0
layer.js
frontend/src/components/canvas/store/layer.js
+0
-2
en.js
frontend/src/lang/en.js
+5
-1
tw.js
frontend/src/lang/tw.js
+5
-1
zh.js
frontend/src/lang/zh.js
+5
-1
index.js
frontend/src/store/index.js
+5
-1
index.vue
frontend/src/views/panel/edit/index.vue
+31
-2
en.json
mobile/src/locale/en.json
+10
-11
没有找到文件。
backend/src/main/java/io/dataease/auth/service/impl/DynamicMenuServiceImpl.java
浏览文件 @
88d122d0
...
...
@@ -36,10 +36,6 @@ public class DynamicMenuServiceImpl implements DynamicMenuService {
@Override
public
List
<
DynamicMenuDto
>
load
(
String
userId
)
{
// SysMenuExample sysMenuExample = new SysMenuExample();
// sysMenuExample.createCriteria().andTypeLessThanOrEqualTo(1);
// sysMenuExample.setOrderByClause(" menu_sort ");
// List<SysMenu> sysMenus = sysMenuMapper.selectByExample(sysMenuExample);
List
<
SysMenu
>
sysMenus
=
extSysMenuMapper
.
querySysMenu
();
List
<
DynamicMenuDto
>
dynamicMenuDtos
=
sysMenus
.
stream
().
map
(
this
::
convert
).
collect
(
Collectors
.
toList
());
//增加插件中的菜单
...
...
backend/src/main/java/io/dataease/commons/utils/CronUtils.java
浏览文件 @
88d122d0
package
io
.
dataease
.
commons
.
utils
;
import
io.dataease.plugins.common.entity.GlobalTaskEntity
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.quartz.CronExpression
;
import
org.quartz.CronScheduleBuilder
;
import
org.quartz.CronTrigger
;
import
org.quartz.TriggerBuilder
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
/**
...
...
@@ -58,5 +63,54 @@ public class CronUtils {
return
date
;
}
public
static
String
cron
(
GlobalTaskEntity
taskEntity
)
{
if
(
taskEntity
.
getRateType
()
==
-
1
)
{
return
taskEntity
.
getRateVal
();
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Date
date
=
null
;
try
{
date
=
sdf
.
parse
(
taskEntity
.
getRateVal
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
setTime
(
date
);
if
(
taskEntity
.
getRateType
()
==
0
)
{
return
instance
.
get
(
Calendar
.
SECOND
)
+
" "
+
instance
.
get
(
Calendar
.
MINUTE
)
+
" "
+
instance
.
get
(
Calendar
.
HOUR_OF_DAY
)
+
" * * ?"
;
}
if
(
taskEntity
.
getRateType
()
==
1
)
{
return
instance
.
get
(
Calendar
.
SECOND
)
+
" "
+
instance
.
get
(
Calendar
.
MINUTE
)
+
" "
+
instance
.
get
(
Calendar
.
HOUR_OF_DAY
)
+
" ? * "
+
getDayOfWeek
(
instance
);
}
if
(
taskEntity
.
getRateType
()
==
2
)
{
return
instance
.
get
(
Calendar
.
SECOND
)
+
" "
+
instance
.
get
(
Calendar
.
MINUTE
)
+
" "
+
instance
.
get
(
Calendar
.
HOUR_OF_DAY
)
+
" "
+
instance
.
get
(
Calendar
.
DATE
)
+
" * ?"
;
}
return
null
;
}
private
static
String
getDayOfWeek
(
Calendar
instance
)
{
int
index
=
instance
.
get
(
Calendar
.
DAY_OF_WEEK
);
index
=
(
index
+
1
)
%
7
;
return
String
.
valueOf
(
index
);
}
// 判断任务是否过期
public
static
Boolean
taskExpire
(
Long
endTime
)
{
if
(
ObjectUtils
.
isEmpty
(
endTime
))
return
false
;
Long
now
=
System
.
currentTimeMillis
();
return
now
>
endTime
;
}
}
backend/src/main/java/io/dataease/job/sechedule/strategy/TaskHandler.java
浏览文件 @
88d122d0
package
io
.
dataease
.
job
.
sechedule
.
strategy
;
import
io.dataease.commons.utils.CronUtils
;
import
io.dataease.job.sechedule.ScheduleManager
;
import
io.dataease.plugins.common.entity.GlobalTaskEntity
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.quartz.*
;
import
org.springframework.beans.factory.InitializingBean
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
public
abstract
class
TaskHandler
implements
InitializingBean
{
...
...
@@ -17,7 +16,7 @@ public abstract class TaskHandler implements InitializingBean {
// 1。首先看看是否过期
Long
endTime
=
taskEntity
.
getEndTime
();
removeTask
(
scheduleManager
,
taskEntity
);
if
(
taskExpire
(
endTime
))
{
// 过期了就删除任务
if
(
CronUtils
.
taskExpire
(
endTime
))
{
// 过期了就删除任务
return
;
}
JobKey
jobKey
=
new
JobKey
(
taskEntity
.
getTaskId
().
toString
());
...
...
@@ -28,55 +27,17 @@ public abstract class TaskHandler implements InitializingBean {
new
Date
(
taskEntity
.
getEndTime
());
}
Class
<?
extends
TaskHandler
>
executor
=
this
.
getClass
();
String
cron
=
cron
(
taskEntity
);
String
cron
=
CronUtils
.
cron
(
taskEntity
);
scheduleManager
.
addOrUpdateCronJob
(
jobKey
,
triggerKey
,
executor
,
cron
,
start
,
end
,
jobDataMap
(
taskEntity
));
}
protected
abstract
JobDataMap
jobDataMap
(
GlobalTaskEntity
taskEntity
);
private
String
cron
(
GlobalTaskEntity
taskEntity
)
{
if
(
taskEntity
.
getRateType
()
==
-
1
)
{
return
taskEntity
.
getRateVal
();
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Date
date
=
null
;
try
{
date
=
sdf
.
parse
(
taskEntity
.
getRateVal
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
setTime
(
date
);
if
(
taskEntity
.
getRateType
()
==
0
)
{
return
instance
.
get
(
Calendar
.
SECOND
)
+
" "
+
instance
.
get
(
Calendar
.
MINUTE
)
+
" "
+
instance
.
get
(
Calendar
.
HOUR_OF_DAY
)
+
" * * ?"
;
}
if
(
taskEntity
.
getRateType
()
==
1
)
{
return
instance
.
get
(
Calendar
.
SECOND
)
+
" "
+
instance
.
get
(
Calendar
.
MINUTE
)
+
" "
+
instance
.
get
(
Calendar
.
HOUR_OF_DAY
)
+
" ? * "
+
getDayOfWeek
(
instance
);
}
if
(
taskEntity
.
getRateType
()
==
2
)
{
return
instance
.
get
(
Calendar
.
SECOND
)
+
" "
+
instance
.
get
(
Calendar
.
MINUTE
)
+
" "
+
instance
.
get
(
Calendar
.
HOUR_OF_DAY
)
+
" "
+
instance
.
get
(
Calendar
.
DATE
)
+
" * ?"
;
}
return
null
;
}
public
abstract
void
resetRunningInstance
(
Long
taskId
);
private
String
getDayOfWeek
(
Calendar
instance
)
{
int
index
=
instance
.
get
(
Calendar
.
DAY_OF_WEEK
);
index
=
(
index
+
1
)
%
7
;
return
String
.
valueOf
(
index
);
}
public
void
removeTask
(
ScheduleManager
scheduleManager
,
GlobalTaskEntity
taskEntity
)
{
JobKey
jobKey
=
new
JobKey
(
taskEntity
.
getTaskId
().
toString
());
...
...
@@ -89,13 +50,7 @@ public abstract class TaskHandler implements InitializingBean {
scheduleManager
.
fireNow
(
jobKey
);
}
// 判断任务是否过期
public
Boolean
taskExpire
(
Long
endTime
)
{
if
(
ObjectUtils
.
isEmpty
(
endTime
))
return
false
;
Long
now
=
System
.
currentTimeMillis
();
return
now
>
endTime
;
}
protected
abstract
Boolean
taskIsRunning
(
Long
taskId
);
...
...
backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java
浏览文件 @
88d122d0
...
...
@@ -7,6 +7,7 @@ import io.dataease.auth.service.impl.AuthUserServiceImpl;
import
io.dataease.auth.util.JWTUtils
;
import
io.dataease.base.mapper.ext.ExtTaskMapper
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.commons.utils.CronUtils
;
import
io.dataease.commons.utils.LogUtil
;
import
io.dataease.commons.utils.ServletUtils
;
import
io.dataease.job.sechedule.ScheduleManager
;
...
...
@@ -67,7 +68,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
JobDataMap
jobDataMap
=
context
.
getJobDetail
().
getJobDataMap
();
GlobalTaskEntity
taskEntity
=
(
GlobalTaskEntity
)
jobDataMap
.
get
(
"taskEntity"
);
ScheduleManager
scheduleManager
=
SpringContextUtil
.
getBean
(
ScheduleManager
.
class
);
if
(
taskExpire
(
taskEntity
.
getEndTime
()))
{
if
(
CronUtils
.
taskExpire
(
taskEntity
.
getEndTime
()))
{
removeTask
(
scheduleManager
,
taskEntity
);
return
;
}
...
...
backend/src/main/java/io/dataease/mobile/service/DirService.java
浏览文件 @
88d122d0
...
...
@@ -40,7 +40,6 @@ public class DirService {
}
public
List
<
DirItemDTO
>
query
(
DirRequest
request
)
{
// CurrentUserDto user = AuthUtils.getUser();
String
userId
=
String
.
valueOf
(
AuthUtils
.
getUser
().
getUserId
());
List
<
PanelEntity
>
panelEntities
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
request
.
getName
()))
{
...
...
@@ -58,17 +57,6 @@ public class DirService {
return
dirItemDTO
;
}).
collect
(
Collectors
.
toList
());
return
dtos
;
// if (user.getUserId() == 1 && StringUtils.equals("admin", user.getUsername())) {
// return dtos;
// }
// List<String> permissions = proxy().permissions();
// return dtos.stream().filter(
// dto -> permissions.stream().anyMatch(
// permission -> StringUtils.equals(permission, dto.getId())
// )
// ).collect(Collectors.toList());
}
public
DirService
proxy
()
{
...
...
backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java
浏览文件 @
88d122d0
...
...
@@ -17,7 +17,7 @@ import io.dataease.plugins.xpack.email.dto.response.XpackTaskGridDTO;
import
io.dataease.plugins.xpack.email.dto.response.XpackTaskInstanceDTO
;
import
io.dataease.plugins.xpack.email.service.EmailXpackService
;
import
io.dataease.service.ScheduleService
;
import
io.swagger.annotations.Api
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -28,7 +28,7 @@ import java.util.concurrent.Future;
import
javax.annotation.Resource
;
@Api
(
tags
=
"xpack:定时报告"
)
@RequestMapping
(
"/plugin/task"
)
@RestController
public
class
XEmailTaskServer
{
...
...
@@ -45,6 +45,28 @@ public class XEmailTaskServer {
EmailXpackService
emailXpackService
=
SpringContextUtil
.
getBean
(
EmailXpackService
.
class
);
Page
<
Object
>
page
=
PageHelper
.
startPage
(
goPage
,
pageSize
,
true
);
List
<
XpackTaskGridDTO
>
tasks
=
emailXpackService
.
taskGrid
(
request
);
if
(
CollectionUtils
.
isNotEmpty
(
tasks
))
{
tasks
.
forEach
(
item
->
{
if
(
CronUtils
.
taskExpire
(
item
.
getEndTime
()))
{
item
.
setNextExecTime
(
null
);
}
else
{
GlobalTaskEntity
globalTaskEntity
=
new
GlobalTaskEntity
();
globalTaskEntity
.
setRateType
(
item
.
getRateType
());
globalTaskEntity
.
setRateVal
(
item
.
getRateVal
());
try
{
String
cron
=
CronUtils
.
cron
(
globalTaskEntity
);
if
(
StringUtils
.
isNotBlank
(
cron
))
{
Long
nextTime
=
CronUtils
.
getNextTriggerTime
(
cron
).
getTime
();
item
.
setNextExecTime
(
nextTime
);
}
}
catch
(
Exception
e
)
{
item
.
setNextExecTime
(
null
);
}
}
});
}
Pager
<
List
<
XpackTaskGridDTO
>>
listPager
=
PageUtils
.
setPageInfo
(
page
,
tasks
);
return
listPager
;
}
...
...
@@ -133,6 +155,12 @@ public class XEmailTaskServer {
}
}
@PostMapping
(
"/stop/{taskId}"
)
public
void
stop
(
@PathVariable
Long
taskId
)
throws
Exception
{
EmailXpackService
emailXpackService
=
SpringContextUtil
.
getBean
(
EmailXpackService
.
class
);
emailXpackService
.
stop
(
taskId
);
}
@PostMapping
(
"/queryInstancies/{goPage}/{pageSize}"
)
public
Pager
<
List
<
XpackTaskInstanceDTO
>>
instancesGrid
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
XpackGridRequest
request
)
{
...
...
backend/src/main/java/io/dataease/service/panel/ShareService.java
浏览文件 @
88d122d0
...
...
@@ -315,7 +315,9 @@ public class ShareService {
}
public
List
<
PanelShareOutDTO
>
queryTargets
(
String
panelId
)
{
return
extPanelShareMapper
.
queryTargets
(
panelId
);
List
<
PanelShareOutDTO
>
targets
=
extPanelShareMapper
.
queryTargets
(
panelId
);
if
(
CollectionUtils
.
isEmpty
(
targets
))
return
new
ArrayList
<>();
return
targets
.
stream
().
filter
(
item
->
StringUtils
.
isNotEmpty
(
item
.
getTargetName
())).
collect
(
Collectors
.
toList
());
}
public
void
removeShares
(
PanelShareRemoveRequest
removeRequest
)
{
...
...
frontend/src/components/DeDrag/index.vue
浏览文件 @
88d122d0
...
...
@@ -370,7 +370,9 @@ export default {
// 鼠标移入事件
mouseOn
:
false
,
// 是否移动 (如果没有移动 不需要记录snapshot)
hasMove
:
false
hasMove
:
false
,
// 上次的鼠标指针纵向位置,用来判断指针是上移还是下移
latestMoveY
:
0
}
},
computed
:
{
...
...
@@ -543,7 +545,8 @@ export default {
'canvasStyleData'
,
'linkageSettingStatus'
,
'mobileLayoutStatus'
,
'componentGap'
'componentGap'
,
'scrollAutoMove'
])
},
watch
:
{
...
...
@@ -646,12 +649,14 @@ export default {
dragging
(
val
)
{
if
(
this
.
enabled
)
{
this
.
curComponent
.
optStatus
.
dragging
=
val
this
.
$store
.
commit
(
'setScrollAutoMove'
,
0
)
}
},
// private 监控dragging resizing
resizing
(
val
)
{
if
(
this
.
enabled
)
{
this
.
curComponent
.
optStatus
.
resizing
=
val
this
.
$store
.
commit
(
'setScrollAutoMove'
,
0
)
}
}
},
...
...
@@ -724,6 +729,8 @@ export default {
// 此处阻止冒泡 但是外层需要获取pageX pageY
this
.
element
.
auxiliaryMatrix
&&
this
.
$emit
(
'elementMouseDown'
,
e
)
this
.
$store
.
commit
(
'setCurComponent'
,
{
component
:
this
.
element
,
index
:
this
.
index
})
// 移动端组件点击自动置顶
this
.
mobileLayoutStatus
&&
this
.
$store
.
commit
(
'topComponent'
)
eventsFor
=
events
.
mouse
this
.
elementDown
(
e
)
},
...
...
@@ -763,6 +770,8 @@ export default {
this
.
mouseClickPosition
.
bottom
=
this
.
bottom
this
.
mouseClickPosition
.
width
=
this
.
width
this
.
mouseClickPosition
.
height
=
this
.
height
// 鼠标按下 重置上次鼠标指针位置
this
.
latestMoveY
=
this
.
mouseClickPosition
.
mouseY
if
(
this
.
parent
)
{
this
.
bounds
=
this
.
calcDragLimits
()
}
...
...
@@ -997,7 +1006,13 @@ export default {
// 水平移动
const
tmpDeltaX
=
axis
&&
axis
!==
'y'
?
mouseClickPosition
.
mouseX
-
(
e
.
touches
?
e
.
touches
[
0
].
pageX
:
e
.
pageX
)
:
0
// 垂直移动
const
tmpDeltaY
=
axis
&&
axis
!==
'x'
?
mouseClickPosition
.
mouseY
-
(
e
.
touches
?
e
.
touches
[
0
].
pageY
:
e
.
pageY
)
:
0
const
mY
=
e
.
touches
?
e
.
touches
[
0
].
pageY
:
e
.
pageY
const
tmpDeltaY
=
axis
&&
axis
!==
'x'
?
mouseClickPosition
.
mouseY
-
mY
:
0
// mY 鼠标指针移动的点 mY - this.latestMoveY 是计算向下移动还是向上移动
const
offsetY
=
mY
-
this
.
latestMoveY
// console.log('mY:' + mY + ';latestMoveY=' + this.latestMoveY + ';offsetY=' + offsetY)
this
.
$emit
(
'canvasDragging'
,
mY
,
offsetY
)
this
.
latestMoveY
=
mY
const
[
deltaX
,
deltaY
]
=
snapToGrid
(
grid
,
tmpDeltaX
,
tmpDeltaY
,
this
.
scaleRatio
)
const
left
=
restrictToBounds
(
mouseClickPosition
.
left
-
deltaX
,
bounds
.
minLeft
,
bounds
.
maxLeft
)
const
top
=
restrictToBounds
(
mouseClickPosition
.
top
-
deltaY
,
bounds
.
minTop
,
bounds
.
maxTop
)
...
...
@@ -1007,7 +1022,7 @@ export default {
const
right
=
restrictToBounds
(
mouseClickPosition
.
right
+
deltaX
,
bounds
.
minRight
,
bounds
.
maxRight
)
const
bottom
=
restrictToBounds
(
mouseClickPosition
.
bottom
+
deltaY
,
bounds
.
minBottom
,
bounds
.
maxBottom
)
this
.
left
=
left
this
.
top
=
top
this
.
top
=
top
+
this
.
scrollAutoMove
this
.
right
=
right
this
.
bottom
=
bottom
await
this
.
snapCheck
()
...
...
@@ -1221,8 +1236,9 @@ export default {
// eslint-disable-next-line no-unused-vars
const
[
_
,
newHeight
]
=
snapToGrid
(
this
.
grid
,
0
,
val
,
this
.
scale
)
// const bottom = restrictToBounds(this.parentHeight - newHeight - this.top, this.bounds.minBottom, this.bounds.maxBottom)
// private 将 this.bounds.minBottom 设置为0
const
bottom
=
restrictToBounds
(
this
.
parentHeight
-
newHeight
-
this
.
top
,
0
,
this
.
bounds
.
maxBottom
)
// private 将 this.bounds.minBottom parentHeight理论不设上限 所以这里不再检验bottom底部距离
// const bottom = restrictToBounds(this.parentHeight - newHeight - this.top, 0, this.bounds.maxBottom)
const
bottom
=
this
.
parentHeight
-
newHeight
-
this
.
top
let
right
=
this
.
right
if
(
this
.
lockAspectRatio
)
{
right
=
this
.
right
-
(
this
.
bottom
-
bottom
)
*
this
.
aspectFactor
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
88d122d0
...
...
@@ -55,6 +55,7 @@
@amRemoveItem="removeItem(item._dragId)"
@amAddItem="addItemBox(item)"
@linkJumpSet="linkJumpSet(item)"
@canvasDragging="canvasDragging"
>
<component
:is=
"item.component"
...
...
@@ -1533,6 +1534,9 @@ export default {
_this
.
componentData
.
forEach
(
function
(
data
,
index
)
{
_this
.
$refs
.
deDragRef
&&
_this
.
$refs
.
deDragRef
[
index
]
&&
_this
.
$refs
.
deDragRef
[
index
].
checkParentSize
()
})
},
canvasDragging
(
mY
,
offsetY
)
{
this
.
$emit
(
'canvasDragging'
,
mY
,
offsetY
)
}
}
}
...
...
frontend/src/components/canvas/store/layer.js
浏览文件 @
88d122d0
...
...
@@ -25,8 +25,6 @@ export default {
// 置顶
if
(
curComponentIndex
<
componentData
.
length
-
1
)
{
toTop
(
componentData
,
curComponentIndex
)
}
else
{
toast
(
'已经到顶了'
)
}
},
...
...
frontend/src/lang/en.js
浏览文件 @
88d122d0
...
...
@@ -131,6 +131,7 @@ export default {
default_login
:
'Normal'
},
commons
:
{
stop
:
'Stop'
,
first_login_tips
:
'Please change the initial password'
,
roger_that
:
'Roger That'
,
apply
:
'Apply'
,
...
...
@@ -347,6 +348,8 @@ export default {
ukey_title
:
'API Keys'
,
thumbnail
:
'thumbnail'
,
confirm_delete
:
'Confirm delete'
,
confirm_stop
:
'Confirm stop'
,
stop_success
:
'Stop success'
,
treeselect
:
{
no_children_text
:
'No sub-options.'
,
no_options_text
:
'No options available.'
,
...
...
@@ -1739,7 +1742,8 @@ export default {
search_by_name
:
'Search by name'
,
exec_time
:
'Execute time'
,
status
:
'Execute status'
,
pixel_error
:
'Pixel only support {800 - 10000} * {500 - 6250}'
pixel_error
:
'Pixel only support {800 - 10000} * {500 - 6250}'
,
next_exec_time
:
'Next execute time'
},
emailtask
:
{
...
...
frontend/src/lang/tw.js
浏览文件 @
88d122d0
...
...
@@ -131,6 +131,7 @@ export default {
default_login
:
'普通登錄'
},
commons
:
{
stop
:
'停止'
,
first_login_tips
:
'您使用的是初始密碼,記得修改密碼哦'
,
roger_that
:
'知道了'
,
apply
:
'應用'
,
...
...
@@ -347,6 +348,8 @@ export default {
ukey_title
:
'API Keys'
,
thumbnail
:
'縮略圖'
,
confirm_delete
:
'確認刪除'
,
confirm_stop
:
'確認停止'
,
stop_success
:
'停止成功'
,
treeselect
:
{
no_children_text
:
'沒有子節點'
,
no_options_text
:
'沒有可用選項'
,
...
...
@@ -1749,7 +1752,8 @@ export default {
search_by_name
:
'根據名稱搜索'
,
exec_time
:
'執行時間'
,
status
:
'執行狀態'
,
pixel_error
:
'分辨率支持{800 - 10000} * {500 - 6250}'
pixel_error
:
'分辨率支持{800 - 10000} * {500 - 6250}'
,
next_exec_time
:
'下次執行時間'
},
emailtask
:
{
...
...
frontend/src/lang/zh.js
浏览文件 @
88d122d0
...
...
@@ -131,6 +131,7 @@ export default {
default_login
:
'普通登录'
},
commons
:
{
stop
:
'停止'
,
first_login_tips
:
'您使用的是初始密码,记得修改密码哦'
,
roger_that
:
'知道了'
,
apply
:
'应用'
,
...
...
@@ -348,6 +349,8 @@ export default {
ukey_title
:
'API Keys'
,
thumbnail
:
'缩略图'
,
confirm_delete
:
'确认删除'
,
confirm_stop
:
'确认停止'
,
stop_success
:
'停止成功'
,
treeselect
:
{
no_children_text
:
'没有子节点'
,
no_options_text
:
'没有可用选项'
,
...
...
@@ -1759,7 +1762,8 @@ export default {
search_by_name
:
'根据名称搜索'
,
exec_time
:
'执行时间'
,
status
:
'执行状态'
,
pixel_error
:
'分辨率支持{800 - 10000} * {500 - 6250}'
pixel_error
:
'分辨率支持{800 - 10000} * {500 - 6250}'
,
next_exec_time
:
'下次执行时间'
},
emailtask
:
{
...
...
frontend/src/store/index.js
浏览文件 @
88d122d0
...
...
@@ -98,7 +98,8 @@ const data = {
mobileLayoutStyle
:
{
x
:
300
,
y
:
600
}
},
scrollAutoMove
:
0
},
mutations
:
{
...
animation
.
mutations
,
...
...
@@ -371,6 +372,9 @@ const data = {
})
state
.
componentData
=
mainComponentData
state
.
mobileLayoutStatus
=
!
state
.
mobileLayoutStatus
},
setScrollAutoMove
(
state
,
offset
)
{
state
.
scrollAutoMove
=
offset
}
},
modules
:
{
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
88d122d0
...
...
@@ -126,7 +126,7 @@
class=
"this_mobile_canvas_main"
:style=
"mobileCanvasStyle"
>
<Editor
v-if=
"mobileEditorShow"
ref=
"editorMobile"
:matrix-count=
"mobileMatrixCount"
:out-style=
"outStyle"
:scroll-top=
"scrollTop
"
/>
<Editor
v-if=
"mobileEditorShow"
id=
"editorMobile"
ref=
"editorMobile"
:matrix-count=
"mobileMatrixCount"
:out-style=
"outStyle"
:scroll-top=
"scrollTop"
@
canvasDragging=
"canvasDragging
"
/>
</el-row>
<el-row
class=
"this_mobile_canvas_inner_bottom"
>
<el-col
:span=
"12"
>
...
...
@@ -265,6 +265,7 @@ export default {
},
data
()
{
return
{
autoMoveOffSet
:
15
,
mobileEditorShow
:
true
,
hasStar
:
false
,
drawerSize
:
'300px'
,
...
...
@@ -397,7 +398,8 @@ export default {
'mobileLayoutStatus'
,
'pcMatrixCount'
,
'mobileMatrixCount'
,
'mobileLayoutStyle'
'mobileLayoutStyle'
,
'scrollAutoMove'
])
},
...
...
@@ -881,6 +883,33 @@ export default {
},
sureStatusChange
(
status
)
{
this
.
enableSureButton
=
status
},
canvasDragging
(
mY
,
offsetY
)
{
if
(
this
.
curComponent
&&
this
.
curComponent
.
optStatus
.
dragging
)
{
// 触发滚动的区域偏移量
const
touchOffset
=
100
const
canvasInfoMobile
=
document
.
getElementById
(
'canvasInfoMobile'
)
// 获取子盒子(高度肯定比父盒子大)
// const editorMobile = document.getElementById('editorMobile')
// 画布区顶部到浏览器顶部距离
const
canvasTop
=
canvasInfoMobile
.
offsetTop
+
75
// 画布区有高度
const
canvasHeight
=
canvasInfoMobile
.
offsetHeight
// 画布区域底部距离浏览器顶部距离
const
canvasBottom
=
canvasTop
+
canvasHeight
if
(
mY
>
(
canvasBottom
-
touchOffset
)
&&
offsetY
>
0
)
{
// 触发底部滚动
this
.
scrollMove
(
this
.
autoMoveOffSet
)
}
else
if
(
mY
<
(
canvasTop
+
touchOffset
)
&&
offsetY
<
0
)
{
// 触发顶部滚动
this
.
scrollMove
(
-
this
.
autoMoveOffSet
)
}
}
},
scrollMove
(
offset
)
{
const
canvasInfoMobile
=
document
.
getElementById
(
'canvasInfoMobile'
)
canvasInfoMobile
.
scrollTop
=
canvasInfoMobile
.
scrollTop
+
offset
this
.
$store
.
commit
(
'setScrollAutoMove'
,
this
.
scrollAutoMove
+
offset
)
}
}
}
...
...
mobile/src/locale/en.json
浏览文件 @
88d122d0
{
"app.name"
:
"DataEase"
,
"navigate.menuHome"
:
"Home"
,
"navigate.menuDir"
:
"
Di
r"
,
"navigate.menuDir"
:
"
Folde
r"
,
"navigate.menuMe"
:
"Me"
,
"navigate.search"
:
"Search"
,
"navigate.personInfo"
:
"
Person Info
"
,
"navigate.personInfo"
:
"
My Profile
"
,
"navigate.language"
:
"Language"
,
"navigate.about"
:
"About"
,
"navigate.login"
:
"Login"
,
"searchPlaceholder"
:
"Please
Code
Panel Name"
,
"searchPlaceholder"
:
"Please
Input
Panel Name"
,
"commons"
:
{
"cancel"
:
"Cancel"
,
...
...
@@ -24,11 +24,11 @@
"login"
:
{
"title"
:
"User Login"
,
"account"
:
"Account:"
,
"accountPlaceholder"
:
"Please
Code
Account"
,
"accountPlaceholder"
:
"Please
Input
Account"
,
"password"
:
"Password:"
,
"passwordPlaceholder"
:
"Please
Code
Password:"
,
"passwordPlaceholder"
:
"Please
Input
Password:"
,
"loginbtn"
:
"Login"
,
"pwdFmtError"
:
"Password Must More Than 6 Character"
,
"pwdFmtError"
:
"Password Must More Than 6 Character
s
"
,
"uOrpwdError"
:
"Invalid Account Or Password"
},
"home"
:
{
...
...
@@ -38,13 +38,13 @@
},
"dir"
:
{
"searchHistory"
:
"Search History"
,
"clearConfirm"
:
"
Sure
Clean All History ?"
,
"clearConfirm"
:
"
Are You Sure To
Clean All History ?"
,
"noHistory"
:
"There Are No Any History"
,
"contentPrefix"
:
"The Content
You Code Are
"
,
"contentPrefix"
:
"The Content
Is
"
,
"contentSuffix"
:
"Will Be Marked As History When You Confirm"
},
"me"
:
{
"moreInfo"
:
"More
Info
"
,
"moreInfo"
:
"More"
,
"logout"
:
"Logout"
,
"systemInfo"
:
"System Info"
,
...
...
@@ -61,4 +61,4 @@
}
}
\ No newline at end of file
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论