Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
ec203827
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1188
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看板
提交
ec203827
编写于
7月 20, 2024
作者:
L
LAPTOP-NDCM9L6Q\王丽雅
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:甘特图
上级
5ba8dae6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
80 deletion
+64
-80
erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js
...emplate/js/departmentMachining/departmentMachiningList.js
+1
-1
erp-produce/src/main/resources/template/js/departmentMachining/machiningGantt.js
...sources/template/js/departmentMachining/machiningGantt.js
+63
-77
pro/src/main/resources/template/js/proTask/taskGantt.js
pro/src/main/resources/template/js/proTask/taskGantt.js
+0
-2
未找到文件。
erp-produce/src/main/resources/template/js/departmentMachining/departmentMachiningList.js
浏览文件 @
ec203827
...
...
@@ -106,7 +106,7 @@ layui.config({
// 甘特图
function
gantt
(
data
)
{
_openNewWindows
({
url
:
"
../../tpl/departmentMachining/machiningGantt.html?
objectId=
"
+
data
.
id
+
'
&objectKey=
'
+
data
.
serviceClassName
,
url
:
"
../../tpl/departmentMachining/machiningGantt.html?
id=
"
+
data
.
id
,
title
:
"
车间任务安排甘特图
"
,
pageId
:
"
machiningGantt
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
...
...
erp-produce/src/main/resources/template/js/departmentMachining/machiningGantt.js
浏览文件 @
ec203827
var
objectKey
=
""
;
var
objectId
=
""
;
layui
.
config
({
base
:
basePath
,
...
...
@@ -9,48 +7,37 @@ layui.config({
}).
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
;
}
form
=
layui
.
form
;
var
id
=
GetUrlParam
(
"
id
"
);
// 根据供应商id获取所有审批通过之后的里程碑列表
let
milestoneList
=
[];
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
queryMachinById
"
,
params
:
{
id
:
objectId
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
$
(
"
#milestoneId
"
).
html
(
getDataUseHandlebars
(
getFileContent
(
'
tpl/template/select-option-must.tpl
'
),
json
));
milestoneList
=
json
.
bean
.
machinChildList
;
console
.
log
(
1
,
json
)
console
.
log
(
2
,
milestoneList
)
// 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);
// 根据id查询加工单信息
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
queryMachinForGanttById
"
,
params
:
{
id
:
id
},
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
console
.
log
(
json
)
matchingLanguage
();
form
.
render
();
renderPanel
();
render
();
// render();
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
});
}});
function
renderPanel
()
{
...
...
@@ -140,44 +127,43 @@ layui.config({
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
=
{
id
:
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
);
console
.
log
(
999
)
AjaxPostUtil
.
request
({
url
:
sysMainMation
.
erpBasePath
+
"
queryMachinForGanttById
"
,
params
:
params
,
type
:
'
json
'
,
method
:
'
GET
'
,
callback
:
function
(
json
)
{
console
.
log
(
88
,
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
});
}});
}
// function render() {
// let milestoneId = $("#milestoneId").val();
// if (isNull(milestoneId)) {
// winui.window.msg("请选择产品", {icon: 2, time: 2000});
// return false;
// }
// let params = {
// id: 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);
// console.log(999)
// AjaxPostUtil.request({url: sysMainMation.erpBasePath + "queryMachinForGanttById", params: params, type: 'json', method: 'GET', 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
"
);
...
...
pro/src/main/resources/template/js/proTask/taskGantt.js
浏览文件 @
ec203827
...
...
@@ -24,8 +24,6 @@ layui.config({
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
;
console
.
log
(
123
,
json
.
rows
)
console
.
log
(
456
,
milestoneList
)
var
authPermission
=
teamObjectPermissionUtil
.
checkTeamBusinessAuthPermission
(
objectId
,
'
taskAuthEnum
'
);
var
btnStr
=
`<div style="" class="type-group" id="type">`
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录