Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
9d4992df
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1194
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9d4992df
编写于
7月 03, 2024
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增项目任务列表甘特图展示
上级
c1ac3081
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
40492 addition
and
0 deletion
+40492
-0
pro/src/main/resources/template/js/proTask/proTaskList.js
pro/src/main/resources/template/js/proTask/proTaskList.js
+11
-0
pro/src/main/resources/template/js/proTask/taskGantt.js
pro/src/main/resources/template/js/proTask/taskGantt.js
+192
-0
pro/src/main/resources/template/tpl/proTask/proTaskList.html
pro/src/main/resources/template/tpl/proTask/proTaskList.html
+1
-0
pro/src/main/resources/template/tpl/proTask/taskGantt.html
pro/src/main/resources/template/tpl/proTask/taskGantt.html
+68
-0
web/src/main/resources/template/assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.css
.../assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.css
+2155
-0
web/src/main/resources/template/assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.js
...e/assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.js
+38065
-0
未找到文件。
pro/src/main/resources/template/js/proTask/proTaskList.js
浏览文件 @
9d4992df
...
...
@@ -197,6 +197,17 @@ layui.config({
}});
});
// 甘特图
$
(
"
body
"
).
on
(
"
click
"
,
"
#ganttPage
"
,
function
()
{
_openNewWindows
({
url
:
"
../../tpl/proTask/taskGantt.html?objectId=
"
+
objectId
+
'
&objectKey=
'
+
objectKey
,
title
:
"
任务甘特图
"
,
pageId
:
"
taskGantt
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
)
{
}});
});
// 新增子任务
function
addNew
(
data
)
{
parentId
=
data
.
id
;
...
...
pro/src/main/resources/template/js/proTask/taskGantt.js
0 → 100644
浏览文件 @
9d4992df
var
objectKey
=
""
;
var
objectId
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
,
'
laydate
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
layer
=
layui
.
layer
,
laydate
=
layui
.
laydate
;
objectKey
=
GetUrlParam
(
"
objectKey
"
);
objectId
=
GetUrlParam
(
"
objectId
"
);
if
(
isNull
(
objectKey
)
||
isNull
(
objectId
))
{
winui
.
window
.
msg
(
"
请传入适用对象信息
"
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
// 根据供应商id获取所有审批通过之后的里程碑列表
let
milestoneList
=
[];
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
projectBasePath
+
"
queryAllApprovalMilestoneList
"
,
params
:
{
objectId
:
objectId
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
$
(
"
#milestoneId
"
).
html
(
getDataUseHandlebars
(
getFileContent
(
'
tpl/template/select-option-must.tpl
'
),
json
));
milestoneList
=
json
.
rows
;
var
authPermission
=
teamObjectPermissionUtil
.
checkTeamBusinessAuthPermission
(
objectId
,
'
taskAuthEnum
'
);
var
btnStr
=
`<div style="" class="type-group" id="type">`
;
var
firstBtn
=
true
;
if
(
authPermission
[
'
list
'
])
{
var
defaultClassName
=
firstBtn
?
'
plan-select
'
:
''
;
firstBtn
=
false
;
btnStr
+=
`<button type="button" class="layui-btn layui-btn-primary type-btn
${
defaultClassName
}
" data-type="list" table-id="messageTable"><i class="layui-icon"></i>所有任务</button>`
}
if
(
authPermission
[
'
myExecute
'
])
{
var
defaultClassName
=
firstBtn
?
'
plan-select
'
:
''
;
firstBtn
=
false
;
btnStr
+=
`<button type="button" class="layui-btn layui-btn-primary type-btn
${
defaultClassName
}
" data-type="myExecute" table-id="messageTable"><i class="layui-icon"></i>我执行的任务</button>`
}
if
(
authPermission
[
'
myCreate
'
])
{
var
defaultClassName
=
firstBtn
?
'
plan-select
'
:
''
;
btnStr
+=
`<button type="button" class="layui-btn layui-btn-primary type-btn
${
defaultClassName
}
" data-type="myCreate" table-id="messageTable"><i class="layui-icon"></i>我创建的任务</button>`
}
btnStr
+=
`</div>`
;
$
(
"
.txtcenter
"
).
before
(
btnStr
);
matchingLanguage
();
form
.
render
();
renderPanel
();
render
();
}});
function
renderPanel
()
{
document
.
getElementById
(
'
device_load
'
).
style
.
cssText
=
'
height:
'
+
(
$
(
window
).
height
()
-
140
)
+
'
px
'
;
}
$
(
window
).
resize
(
function
()
{
renderPanel
();
});
// 时间格式
gantt
.
config
.
date_format
=
"
%Y-%m-%d
"
;
gantt
.
config
.
scales
=
[
{
unit
:
"
year
"
,
step
:
1
,
format
:
"
%Y
"
},
{
unit
:
"
day
"
,
step
:
1
,
date
:
"
%m-%d
"
}
];
gantt
.
config
.
reorder_grid_columns
=
true
;
gantt
.
config
.
columns
=
[{
name
:
"
text
"
,
label
:
"
任务名
"
,
width
:
200
,
align
:
"
center
"
,
tree
:
true
,
resize
:
true
},
{
name
:
"
start_date
"
,
label
:
"
开始日期
"
,
width
:
100
,
align
:
"
center
"
,
resize
:
true
},
{
name
:
"
duration
"
,
label
:
"
持续时间
"
,
width
:
100
,
align
:
"
center
"
,
resize
:
true
}];
gantt
.
config
.
readonly
=
true
;
gantt
.
config
.
row_height
=
40
;
gantt
.
config
.
scale_height
=
50
;
gantt
.
config
.
drag_move
=
false
;
gantt
.
config
.
drag_resize
=
false
;
gantt
.
config
.
sort
=
true
;
gantt
.
config
.
show_quick_info
=
false
;
// 关闭点击事件
gantt
.
attachEvent
(
"
onTaskDblClick
"
,
function
(
id
,
e
)
{
return
false
;
});
gantt
.
config
.
show_tasks_outside_timescale
=
true
;
gantt
.
plugins
({
auto_scheduling
:
true
,
//自动排程
tooltip
:
true
//提示信息
});
// 样式
gantt
.
config
.
layout
=
{
css
:
"
gantt_container
"
,
cols
:
[{
width
:
400
,
min_width
:
300
,
rows
:
[
{
view
:
"
grid
"
,
scrollX
:
"
gridScroll
"
,
scrollable
:
true
,
scrollY
:
"
scrollVer
"
},
{
view
:
"
scrollbar
"
,
id
:
"
gridScroll
"
,
group
:
"
horizontal
"
}
]
},
{
resizer
:
true
,
width
:
1
},
{
rows
:
[
{
view
:
"
timeline
"
,
scrollX
:
"
scrollHor
"
,
scrollY
:
"
scrollVer
"
},
{
view
:
"
scrollbar
"
,
id
:
"
scrollHor
"
,
group
:
"
horizontal
"
}
]
},
{
view
:
"
scrollbar
"
,
id
:
"
scrollVer
"
}]
};
gantt
.
init
(
"
device_load
"
);
gantt
.
i18n
.
setLocale
(
"
cn
"
);
//使用中文
function
render
()
{
let
milestoneId
=
$
(
"
#milestoneId
"
).
val
();
if
(
isNull
(
milestoneId
))
{
winui
.
window
.
msg
(
"
请选择里程碑
"
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
let
params
=
{
objectId
:
objectId
,
objectKey
:
objectKey
,
holderId
:
milestoneId
,
type
:
$
(
"
#type .plan-select
"
).
attr
(
"
data-type
"
)
};
var
tem
=
getInPoingArr
(
milestoneList
,
"
id
"
,
milestoneId
,
null
);
gantt
.
config
.
start_date
=
new
Date
(
tem
.
startTime
);
gantt
.
config
.
end_date
=
new
Date
(
tem
.
endTime
);
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
projectBasePath
+
"
queryProTaskListForGantt
"
,
params
:
params
,
type
:
'
json
'
,
method
:
'
POST
'
,
callback
:
function
(
json
)
{
gantt
.
clearAll
();
//清空缓存
let
nodeList
=
json
.
bean
.
node
;
if
(
isNull
(
nodeList
)
||
nodeList
.
length
==
0
)
{
return
;
}
$
.
each
(
nodeList
,
function
(
i
,
item
)
{
item
.
start_date
=
new
Date
(
item
.
start_date
);
item
.
end_date
=
new
Date
(
item
.
end_date
);
});
let
linkList
=
json
.
bean
.
link
;
if
(
isNull
(
linkList
)
||
linkList
.
length
==
0
)
{
linkList
=
[];
}
// 解析
gantt
.
parse
({
data
:
nodeList
,
links
:
linkList
});
}});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
.type-btn
"
,
function
(
e
)
{
$
(
this
).
parent
().
find
(
'
.type-btn
'
).
removeClass
(
"
plan-select
"
);
$
(
this
).
addClass
(
"
plan-select
"
);
render
();
});
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
render
();
}
return
false
;
});
exports
(
'
taskGantt
'
,
{});
});
\ No newline at end of file
pro/src/main/resources/template/tpl/proTask/proTaskList.html
浏览文件 @
9d4992df
...
...
@@ -12,6 +12,7 @@
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn search-table-btn-right"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"ganttPage"
class=
"winui-toolbtn search-table-btn-right"
><i
class=
"fa fa-sliders"
aria-hidden=
"true"
></i>
甘特图
</button>
<button
id=
"addBean"
class=
"winui-toolbtn search-table-btn-right"
auth=
"add"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
...
...
pro/src/main/resources/template/tpl/proTask/taskGantt.html
0 → 100644
浏览文件 @
9d4992df
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title></title>
<meta
name=
"renderer"
content=
"webkit"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"
>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
<link
rel=
"stylesheet"
href=
"../../assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.css"
type=
"text/css"
>
<style>
html
,
body
{
height
:
100%
;
padding
:
0px
;
margin
:
0px
;
overflow
:
hidden
;
}
.weekend
{
background
:
#f4f7f4
!important
;
}
.gantt_grid_head_cell
{
font-size
:
14px
;
font-weight
:
600
;
color
:
#000
!important
;
}
.gantt_scale_cell
{
font-size
:
14px
;
font-weight
:
600
;
color
:
#000
!important
;
}
</style>
</head>
<body>
<div
class=
"txtcenter"
style=
"margin: 0 auto; padding-top: 10px;"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
里程碑
</label>
<div
class=
"layui-input-inline"
>
<select
lay-filter=
"milestoneId"
lay-search=
""
id=
"milestoneId"
>
</select>
</div>
<button
type=
"reset"
class=
"layui-btn layui-btn-primary list-form-search"
><language
showName=
"com.skyeye.reset"
></language></button>
<button
class=
"layui-btn list-form-search"
lay-submit
lay-filter=
"formSearch"
><language
showName=
"com.skyeye.search2"
></language></button>
</div>
</div>
</form>
</div>
<div
style=
"margin: auto 10px;"
>
<div
id=
"device_load"
style=
"width: 100%;"
></div>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
src=
"../../assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/proTask/
'
}).
use
(
'
taskGantt
'
);
</script>
</body>
</html>
\ No newline at end of file
web/src/main/resources/template/assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.css
0 → 100644
浏览文件 @
9d4992df
此差异已折叠。
点击以展开。
web/src/main/resources/template/assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.js
0 → 100644
浏览文件 @
9d4992df
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录