Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
GaoQuYingJiH5-ASD
Commits
b97ded09
Commit
b97ded09
authored
Jun 21, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知公告
parent
d2f6a7ce
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
69 deletions
+83
-69
http2.js
js/http2.js
+8
-1
apiKeyMap.js
js/jssdk2/apiKeyMap.js
+1
-17
notice-list-detail.html
src/notice-list-detail.html
+2
-24
notice-list-detail.js
src/notice-list-detail.js
+21
-7
notice-list.js
src/notice-list.js
+43
-12
yh-list-detail.html
src/yh-list-detail.html
+8
-8
No files found.
js/http2.js
View file @
b97ded09
...
...
@@ -60,11 +60,18 @@ var http2 = {
msg: "请求成功"
success: true
*/
if
(
!
value
){
vant
.
Dialog
.
alert
({
title
:
'
信息提示
'
,
message
:
'
请求异常
'
//'网络错误',
})
return
}
let
sm2_encrypt_result
=
value
let
sm2_decrypt_result
=
sm2_Decrypt
(
sm2_encrypt_result
,
params
.
interfacePrivateKey
)
console
.
log
(
'
vaildInterfacefn响应解密
'
,
sm2_decrypt_result
)
fn
&&
fn
(
sm2_decrypt_result
)
})
},
...
...
js/jssdk2/apiKeyMap.js
View file @
b97ded09
...
...
@@ -22,7 +22,7 @@ const API_KEY_MAP = {
'
notice-list
'
:
{
// 通知公告-列表
id
:
'
gqyjglptfindOwnTag
'
,
publicKey
:
'
049ba9d80cb4284f6cc9f55935b3cd57cec034b5f242c390bf70d2a62ee917cf525b83d524eb700c68af330c9e5bcb82bd1101370318cdce19418a342fa31217ed
'
,
privateKey
:
'
2152ba9b1a9c6526fab2e6f5985da1c36ecc9476fd4ab4b19a43206836d8e496
'
privateKey
:
'
00d97af0c76917729cec802a38d061f1f08aa4310c9a5642374aa18945b3dd412b
'
},
'
notice-list-detail
'
:
{
// 通知公告-详情
id
:
'
gqyjglptfindOwn
'
,
...
...
@@ -46,19 +46,3 @@ const API_KEY_MAP = {
},
}
// aes解密
function
aes_Decrypt
(
word
,
key
)
{
var
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
key
)
//转为128bit
var
srcs
=
CryptoJS
.
enc
.
Hex
.
parse
(
word
)
//转为16进制
var
str
=
CryptoJS
.
enc
.
Base64
.
stringify
(
srcs
)
//变为Base64编码的字符串
var
decrypt
=
CryptoJS
.
AES
.
decrypt
(
str
,
key
,
{
mode
:
CryptoJS
.
mode
.
ECB
,
spadding
:
CryptoJS
.
pad
.
Pkcs7
})
return
decrypt
.
toString
(
CryptoJS
.
enc
.
Utf8
)
}
// sm2解密,需要创建加密应用时的私钥
function
sm2_Decrypt
(
word
,
key
)
{
return
SM
.
decrypt
(
word
,
key
)
}
\ No newline at end of file
src/notice-list-detail.html
View file @
b97ded09
...
...
@@ -4,35 +4,13 @@
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover"
>
<title>
危险作业备案-详情
</title>
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/pdf.js/2.0.193/pdf.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/pdf.js/2.0.193/pdf.worker.min.js"></script> -->
<!-- <script src="../js/pdfjs-4.2.67-dist/build/pdf.mjs"></script>
<script src="../js/pdfjs-4.2.67-dist/build/pdf.worker.mjs"></script> -->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js"
></script>
content=
"width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover"
>
<title>
通知公告-详情
</title>
<script
type=
"text/javascript"
src=
"../js/includeHead.js"
></script>
<style>
html
,
body
{
background-color
:
#fff
;
}
.pd-01rem
{
padding-bottom
:
0.1rem
;
}
/* 表单相关 */
.formValue
{
float
:
right
;
}
.formSubmitBtnWrapper
{
display
:
flex
;
justify-content
:
center
;
margin-top
:
0.2rem
;
margin-bottom
:
0.2rem
;
}
.formSubmitBtnWrapper
.van-button
{
width
:
4rem
;
}
/**
* 框架样式覆盖修改
*/
...
...
src/notice-list-detail.js
View file @
b97ded09
...
...
@@ -8,8 +8,6 @@ window.addEventListener("load", function() {
data
()
{
return
{
noticeContent
:
''
,
// 企业id
companyId
:
localStorage
.
getItem
(
'
companyId
'
),
disabled
:
false
,
}
},
...
...
@@ -19,12 +17,28 @@ window.addEventListener("load", function() {
methods
:
{
detail
()
{
http
.
get
(
'
/api/notice/findOwn
'
,
{
noticeId
:
gemhoUtil
.
getParameter
(
'
noticeId
'
)
}).
then
((
res
)
=>
{
console
.
log
(
'
响应结果
'
,
res
.
content
)
this
.
noticeContent
=
res
.
noticeContent
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
notice-list-detail
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
notice-list-detail
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
notice-list-detail
"
][
"
privateKey
"
],
reqParams
:
{
noticeId
:
gemhoUtil
.
getParameter
(
'
noticeId
'
)
}
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
this
.
noticeContent
=
result
.
noticeContent
}
})
// http.get('/api/notice/findOwn', {
// noticeId: gemhoUtil.getParameter('noticeId')
// }).then((res) => {
// console.log('响应结果', res.content)
// this.noticeContent = res.noticeContent
// })
},
},
...
...
src/notice-list.js
View file @
b97ded09
...
...
@@ -25,20 +25,51 @@ window.addEventListener("load", function() {
location
.
href
=
'
./notice-list-detail.html?noticeId=
'
+
this
.
list
[
index
].
noticeId
},
getList
(){
http
.
get
(
'
/api/notice/findOwnTag
'
,{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
county
:
localStorage
.
getItem
(
'
appCounty
'
),
}).
then
((
res
)
=>
{
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
res
.
content
);
this
.
total
=
res
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
if
(
this
.
loading
){
return
}
this
.
loading
=
true
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
notice-list
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
notice-list
"
][
"
privateKey
"
],
reqParams
:
{
page
:
this
.
page
++
,
// 每次请求增加下一页
size
:
this
.
size
,
// sort: 'createTime,desc',
}
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
this
.
list
.
push
(...
result
.
content
);
this
.
total
=
result
.
totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
// http.get('/api/notice/findOwnTag',{
// page: this.page++,// 每次请求增加下一页
// size: this.size,
// county: localStorage.getItem('appCounty'),
// }).then((res)=>{
// this.loading = false; // 加载状态结束
// this.list.push(...res.content);
// this.total = res.totalElements
// if(this.page*this.size >= this.total){
// this.finished = true; // 下滑不在刷新数据
// }
// })
}
},
...
...
src/yh-list-detail.html
View file @
b97ded09
...
...
@@ -50,11 +50,11 @@
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.hdInspectExpert"
:disabled=
"
fals
e"
label=
"检查人员"
placeholder=
""
/>
<van-field
v-model=
"form.hdInspectExpert"
:disabled=
"
tru
e"
label=
"检查人员"
placeholder=
""
/>
</van-cell-group>
<van-cell-group
:class=
"{'disable-van-cell': true}"
>
<van-cell>
隐患类型:
<van-radio-group
v-model=
"form.hdLevel"
:disabled=
"
fals
e"
direction=
"horizontal"
>
<van-radio-group
v-model=
"form.hdLevel"
:disabled=
"
tru
e"
direction=
"horizontal"
>
<van-radio
name=
"1"
>
一般隐患
</van-radio>
<van-radio
name=
"2"
>
重大隐患
</van-radio>
</van-radio-group>
...
...
@@ -86,13 +86,13 @@
</van-popup>
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.comment"
:disabled=
"
fals
e"
label=
"隐患描述"
placeholder=
""
/>
<van-field
v-model=
"form.comment"
:disabled=
"
tru
e"
label=
"隐患描述"
placeholder=
""
/>
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.basis"
:disabled=
"
fals
e"
label=
"检查依据"
placeholder=
""
/>
<van-field
v-model=
"form.basis"
:disabled=
"
tru
e"
label=
"检查依据"
placeholder=
""
/>
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.suggestion"
:disabled=
"
fals
e"
label=
"整改建议"
placeholder=
""
/>
<van-field
v-model=
"form.suggestion"
:disabled=
"
tru
e"
label=
"整改建议"
placeholder=
""
/>
</van-cell-group>
<van-cell-group
:class=
"{'disable-van-cell': true}"
>
<van-cell
is-link
@
click=
"showPopup('showPopup4hdRectificationDate')"
>
整改期限
<span
class=
"formValue"
>
{{form.hdRectificationDate}}
</span></van-cell>
...
...
@@ -123,13 +123,13 @@
</van-cell-group>
<div
v-if=
"form.hdStatus===1||form.hdStatus===3"
>
<van-cell-group>
<van-field
v-model=
"form.hdInspectDate"
:disabled=
"
fals
e"
label=
"审核日期"
placeholder=
""
/>
<van-field
v-model=
"form.hdInspectDate"
:disabled=
"
tru
e"
label=
"审核日期"
placeholder=
""
/>
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.hdAcceptancePerson"
:disabled=
"
fals
e"
label=
"审核人员"
placeholder=
""
/>
<van-field
v-model=
"form.hdAcceptancePerson"
:disabled=
"
tru
e"
label=
"审核人员"
placeholder=
""
/>
</van-cell-group>
<van-cell-group>
<van-field
v-model=
"form.hdRectificationRecord"
:disabled=
"
fals
e"
type=
"textarea"
label=
"审核记录"
autosize
placeholder=
""
/>
<van-field
v-model=
"form.hdRectificationRecord"
:disabled=
"
tru
e"
type=
"textarea"
label=
"审核记录"
autosize
placeholder=
""
/>
</van-cell-group>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment