Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
aefaf0d7
提交
aefaf0d7
authored
12月 29, 2021
作者:
yaoxinguo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
签约派遣批量审批修改
上级
9582926b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
171 行增加
和
111 行删除
+171
-111
QnMZstuSigning.js
FormInsertDiy/AffairPage/AuditPage/QnMZstuSigning.js
+171
-111
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/QnMZstuSigning.js
浏览文件 @
aefaf0d7
const
initSignFunc
=
()
=>
{
window
.
stuSigningAuditXueShengChu
=
(
props
)
=>
{
// 在这里搞事情
//console.log(props);
const
{
selectRows
,
setSubmitLoading
,
uaaRequest
,
examineMap
,
message
,
setVisible
,
callback
}
=
props
;
window
.
stuSigningAuditXueShengChu
=
(
props
)
=>
{
// 在这里搞事情
//console.log(props);
const
{
selectRows
,
setSubmitLoading
,
uaaRequest
,
examineMap
,
message
,
setVisible
,
callback
}
=
props
;
let
total
=
selectRows
.
length
;
let
selectTotal
=
0
;
let
success
=
0
;
let
fail
=
0
;
/**
*
* 第一步 获取选择的每一条审核数据需要盖章的图片
* 一旦开始调接口 就需要 setSubmitLoading(true) 转圈圈
*/
const
selectList
=
selectRows
.
map
((
g
)
=>
{
let
json
=
{};
json
.
signaturePicture
=
g
[
'LLMbGiXIkvE'
];
json
.
setUp
=
g
[
'LLtAdXHnnVM'
]
?
JSON
.
parse
(
g
[
'LLtAdXHnnVM'
])
:
{};
json
.
enclosure
=
g
[
'LHfENWqbwZs'
];
json
.
code
=
g
[
'code'
];
json
.
taskId
=
g
[
'taskId'
];
json
.
appId
=
g
[
'appId'
];
return
json
;
})
||
[];
//console.log("selectList",selectList);
setSubmitLoading
(
true
);
// 显示为加载中
uaaRequest
(
'/DataColumnApi/getSqlColumn'
,
{
token
:
1
,
json
:
'LLyJBlByfFM'
,
param
:
'{}'
,
type
:
1
,
}).
then
((
result
,
com
)
=>
{
let
{
XAxisOffset
,
YAxisOffset
}
=
result
;
/**
*
* 第一步 获取选择的每一条审核数据需要盖章的图片
* 一旦开始调接口 就需要 setSubmitLoading(true) 转圈圈
*/
const
selectList
=
selectRows
.
map
((
g
)
=>
{
let
json
=
{};
json
.
isSealOrNot
=
g
[
'LLzXaxdAYHU'
]
||
"0"
;
json
.
signaturePicture
=
g
[
'LLMbGiXIkvE'
];
json
.
setUp
=
g
[
'LLtAdXHnnVM'
]
?
JSON
.
parse
(
g
[
'LLtAdXHnnVM'
])
:
{
setUp
:
[]
};
json
.
enclosure
=
g
[
'LHfENWqbwZs'
];
json
.
code
=
g
[
'code'
];
json
.
taskId
=
g
[
'taskId'
];
json
.
appId
=
g
[
'appId'
];
return
json
;
})
||
[];
//console.log("selectList", selectList);
setSubmitLoading
(
true
);
// 显示为加载中
selectList
.
map
((
v
,
i
)
=>
{
if
(
v
.
isSealOrNot
===
"1"
)
{
selectTotal
++
;
}
});
uaaRequest
(
'/DataColumnApi/getSqlColumn'
,
{
token
:
1
,
json
:
'LLyJBlByfFM'
,
param
:
'{}'
,
type
:
1
,
}).
then
((
result
,
com
)
=>
{
let
{
XAxisOffset
,
YAxisOffset
}
=
result
;
let
promiseArray
=
[];
// 姚
for
(
var
selectI
in
selectList
)
{
let
selectData
=
selectList
[
selectI
];
let
{
setUp
,
enclosure
,
signaturePicture
,
taskId
,
code
,
appId
,
isSealOrNot
}
=
selectData
;
if
(
enclosure
.
files
==
[]
&&
enclosure
.
files
.
length
==
0
)
{
console
.
log
(
'->>>>>>>>>'
,
'没有签章图片'
);
continue
;
}
let
background
=
enclosure
.
files
[
enclosure
.
files
.
length
-
1
].
path
;
// 这里还要加判断 如果没得图片能签章. 直接跳过这条数据
let
promiseArray
=
[];
// 姚
for
(
var
selectI
in
selectList
)
{
let
selectData
=
selectList
[
selectI
];
let
{
setUp
,
enclosure
,
signaturePicture
,
taskId
,
code
,
appId
}
=
selectData
;
let
background
=
enclosure
.
files
[
enclosure
.
files
.
length
-
1
].
path
;
// 这里还要加判断 如果没得图片能签章. 直接跳过这条数据
setUp
.
objs
.
forEach
((
sv
,
si
)
=>
{
sv
.
x
+=
XAxisOffset
;
sv
.
y
+=
YAxisOffset
;
if
(
sv
.
key
===
'photo'
)
{
sv
.
path
=
signaturePicture
.
obtainEmploymentSeal
;
}
});
const
oneStudentTask
=
async
()
=>
{
let
resOneStudentRes
=
await
uaaRequest
(
'/ImageLibApi/merge'
,
{
background
:
background
,
content
:
JSON
.
stringify
(
setUp
),
}).
then
((
merge
)
=>
{
if
(
!
merge
)
{
console
.
log
(
'->>>>>>>>>'
,
'印章失败'
);
return
false
;
}
if
(
enclosure
.
files
==
[]
&&
enclosure
.
files
.
length
==
0
)
{
console
.
log
(
'->>>>>>>>>'
,
'没有签章图片'
);
return
false
;
}
enclosure
.
files
[
enclosure
.
files
.
length
-
1
].
originPath
=
background
;
enclosure
.
files
[
enclosure
.
files
.
length
-
1
].
path
=
merge
.
path
;
let
taskForm
=
{
LLIZZkKNsdc
:
enclosure
};
//就业处审核表单
let
examineMaps
=
{
reason
:
''
,
...
JSON
.
parse
(
examineMap
),
code
};
//审核意见
let
examineJson
=
{
level
:
''
,
code
:
code
,
taskIds
:
taskId
,
examineMap
:
JSON
.
stringify
(
examineMaps
),
taskForm
:
JSON
.
stringify
(
taskForm
),
};
console
.
log
(
'examineJson'
,
examineJson
);
return
uaaRequest
(
'/UnifiedAppFormApi/examineProcess'
,
examineJson
).
then
((
resProcess
)
=>
{
if
(
!
resProcess
)
{
console
.
log
(
'->>>>>>>>>'
,
'审核失败'
);
return
false
;
}
return
true
;
console
.
log
(
'->>>>>>>>>'
,
'审核成功'
);
});
});
if
(
resOneStudentRes
){
const
oneStudentTask
=
async
()
=>
{
let
resOneStudentRes
;
if
(
isSealOrNot
===
"1"
)
{
//盖章流程
setUp
.
objs
.
forEach
((
sv
,
si
)
=>
{
sv
.
x
+=
XAxisOffset
;
sv
.
y
+=
YAxisOffset
;
if
(
sv
.
key
===
'photo'
)
{
sv
.
path
=
signaturePicture
.
obtainEmploymentSeal
;
}
});
resOneStudentRes
=
await
uaaRequest
(
'/ImageLibApi/merge'
,
{
background
:
background
,
content
:
JSON
.
stringify
(
setUp
),
}).
then
((
merge
)
=>
{
if
(
!
merge
)
{
console
.
log
(
'->>>>>>>>>'
,
'印章失败'
);
return
false
;
}
enclosure
.
files
[
enclosure
.
files
.
length
-
1
].
originPath
=
background
;
enclosure
.
files
[
enclosure
.
files
.
length
-
1
].
path
=
merge
.
path
;
let
taskForm
=
{
LLIZZkKNsdc
:
enclosure
};
//就业处审核表单
let
examineMaps
=
{
reason
:
''
,
...
JSON
.
parse
(
examineMap
),
code
};
//审核意见
let
examineJson
=
{
level
:
''
,
code
:
code
,
taskIds
:
taskId
,
examineMap
:
JSON
.
stringify
(
examineMaps
),
taskForm
:
JSON
.
stringify
(
taskForm
),
};
//console.log('examineJson', examineJson);
return
uaaRequest
(
'/UnifiedAppFormApi/examineProcess'
,
examineJson
).
then
((
resProcess
)
=>
{
if
(
!
resProcess
)
{
console
.
log
(
'->>>>>>>>>'
,
'审核失败'
);
return
false
;
}
console
.
log
(
'->>>>>>>>>'
,
'审核成功'
);
return
true
;
});
});
}
else
{
//无需盖章流程跳过
let
examineMaps
=
{
reason
:
''
,
...
JSON
.
parse
(
examineMap
),
code
};
//审核意见
let
examineJson
=
{
level
:
''
,
code
:
code
,
taskIds
:
taskId
,
examineMap
:
JSON
.
stringify
(
examineMaps
),
taskForm
:
JSON
.
stringify
({}),
};
//console.log('examineJson', examineJson);
resOneStudentRes
=
await
uaaRequest
(
'/UnifiedAppFormApi/examineProcess'
,
examineJson
).
then
((
resProcess
)
=>
{
if
(
!
resProcess
)
{
console
.
log
(
'->>>>>>>>>'
,
'审核失败'
);
return
false
;
}
//console.log('->>>>>>>>>', '审核成功');
return
true
;
});
}
if
(
resOneStudentRes
)
{
success
++
;
}
else
{
}
else
{
fail
++
;
}
message
.
destroy
();
message
.
info
(
`正在进行批量签章审核,请耐心等待, 当前共审核成功
${
success
}
条, 失败
${
fail
}
条
.共需审核
${
t
otal
}
条`
,
2
);
message
.
info
(
`正在进行批量签章审核,请耐心等待, 当前共审核成功
${
success
}
条, 失败
${
fail
}
条
。共需审核
${
total
}
条,其中盖章
${
selectTotal
}
条,无需盖章
${
total
-
selectT
otal
}
条`
,
2
);
return
true
;
};
promiseArray
.
push
(
oneStudentTask
);
}
};
promiseArray
.
push
(
oneStudentTask
);
}
// 钟
let
taskFunc
=
async
()
=>
{
for
(
let
i
=
0
;
i
<
promiseArray
.
length
;
i
++
)
{
let
res1
=
await
promiseArray
[
i
]();
console
.
log
(
res1
);
// 钟
let
taskFunc
=
async
()
=>
{
for
(
let
i
=
0
;
i
<
promiseArray
.
length
;
i
++
)
{
let
res1
=
await
promiseArray
[
i
]();
console
.
log
(
res1
);
}
return
true
;
return
true
;
}
taskFunc
().
then
((
g
)
=>
{
if
(
g
)
{
taskFunc
().
then
((
g
)
=>
{
if
(
g
)
{
message
.
success
(
'审核完成'
);
setSubmitLoading
(
false
);
setVisible
(
false
);
...
...
@@ -116,27 +176,27 @@ const initSignFunc = () => {
})
});
/**
* 第二步 (执行签章 + 审批接口) * 审核条数.
* 每成功执行一个学生 就应该 使用 message.info 提示用户
*
* */
// http://xg.qnzy.net:51352/produce/v1/api/onestop/ImageLibApi/merge
});
/**
* 第二步 (执行签章 + 审批接口) * 审核条数.
* 每成功执行一个学生 就应该 使用 message.info 提示用户
*
* */
// http://xg.qnzy.net:51352/produce/v1/api/onestop/ImageLibApi/merge
// background: /u/202112/29104212h6vg_m.png
// content: {"objs":[{"key":"photo","type":"image","path":"/u/202112/231612134ror.png","x":1282,"y":844,"w":149,"h":149,"index":3},{"key":"title","type":"image","index":2,"path":"/u/202112/2321581951ot.png","x":1200,"y":850,"w":94,"h":38},{"key":"time","type":"text","word":"2021 12 29","fontSize":15,"x":1290,"y":957,"fontStyle":"bold","color":"#000000","index":1}]}
// token: 62d75935-6a06-4cd4-82aa-ee9cf9a22790
// background: /u/202112/29104212h6vg_m.png
// content: {"objs":[{"key":"photo","type":"image","path":"/u/202112/231612134ror.png","x":1282,"y":844,"w":149,"h":149,"index":3},{"key":"title","type":"image","index":2,"path":"/u/202112/2321581951ot.png","x":1200,"y":850,"w":94,"h":38},{"key":"time","type":"text","word":"2021 12 29","fontSize":15,"x":1290,"y":957,"fontStyle":"bold","color":"#000000","index":1}]}
// token: 62d75935-6a06-4cd4-82aa-ee9cf9a22790
// http://xg.qnzy.net:51352/produce/v1/api/onestop/UnifiedAppFormApi/examineProcess
// http://xg.qnzy.net:51352/produce/v1/api/onestop/UnifiedAppFormApi/examineProcess
// taskIds: efd8bbca-6791-11ec-8172-de0a2bde8c17
// level:
// code: 1474735810300354560
// examineMap: {"examine":"0","reason":"","code":"1474735810300354560","sign":""}
// taskForm: {"LLIZZkKNsdc":{"files":[{"path":"/u/202112/25213627whnv.jpg","name":"1.jpg","originPath":"/u/202112/25213627whnv.jpg"},{"path":"/u/202112/2811544509gm_m.png","name":"2.jpg","originPath":"/u/202112/2811544509gm_m.png"}]}}
// token: 62d75935-6a06-4cd4-82aa-ee9cf9a22790
};
// taskIds: efd8bbca-6791-11ec-8172-de0a2bde8c17
// level:
// code: 1474735810300354560
// examineMap: {"examine":"0","reason":"","code":"1474735810300354560","sign":""}
// taskForm: {"LLIZZkKNsdc":{"files":[{"path":"/u/202112/25213627whnv.jpg","name":"1.jpg","originPath":"/u/202112/25213627whnv.jpg"},{"path":"/u/202112/2811544509gm_m.png","name":"2.jpg","originPath":"/u/202112/2811544509gm_m.png"}]}}
// token: 62d75935-6a06-4cd4-82aa-ee9cf9a22790
};
};
export
default
initSignFunc
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论