Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agcs2.0-web
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
liang
agcs2.0-web
Commits
e8cf43a6
Commit
e8cf43a6
authored
Nov 30, 2022
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增加密测试页面
parent
65a074b8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
0 deletions
+183
-0
package.json
package.json
+1
-0
index.js
src/api/encrtpttest/index.js
+8
-0
index.vue
src/views/encrypttest/index.vue
+169
-0
yarn.lock
yarn.lock
+5
-0
No files found.
package.json
View file @
e8cf43a6
...
...
@@ -28,6 +28,7 @@
"
echarts
"
:
"
^5.1.2
"
,
"
element-ui
"
:
"
^2.15.2
"
,
"
js-cookie
"
:
"
^2.2.1
"
,
"
js-md5
"
:
"
^0.7.3
"
,
"
jsbarcode
"
:
"
^3.11.5
"
,
"
jsencrypt
"
:
"
^3.0.0-rc.1
"
,
"
lodash
"
:
"
^4.17.15
"
,
...
...
src/api/encrtpttest/index.js
0 → 100644
View file @
e8cf43a6
import
request
from
"
@/utils/request
"
export
function
getEncryptList
(
params
=
{})
{
return
request
({
url
:
`/disease-data/data/patient/page/encrypted/test`
,
method
:
"
get
"
,
params
,
})
}
src/views/encrypttest/index.vue
0 → 100644
View file @
e8cf43a6
<
template
>
<div
class=
"screeningSearch"
>
<div
class=
"top"
>
<form-components
ref=
"formList"
:forms=
"formList"
></form-components>
</div>
<div
class=
"bot"
>
<customs-table
ref=
"table"
:table-data=
"tableData"
:columns=
"columns"
:header-class=
"'newHeader'"
:list-loading=
"listLoading"
:current-page=
"pageIndex"
:total-count=
"total"
:page-sizes=
"pageSizes"
:page-size=
"pageSize"
@
pageSizeChange=
"handleSizeChange"
@
currentPageChange=
"handleCurrentChange"
/>
</div>
</div>
</
template
>
<
script
>
import
FormComponents
from
"
@/components/FormComponents
"
import
CustomsTable
from
"
@/components/CustomsTable
"
import
paginationMixin
from
"
@/components/TabComponents/mixin
"
import
{
getEncryptList
}
from
"
@/api/encrtpttest
"
// import * as CryptoJS from "crypto-js"
import
getSha256
from
"
crypto-js/sha256
"
import
md5
from
"
js-md5
"
export
default
{
components
:
{
CustomsTable
,
FormComponents
,
},
mixins
:
[
paginationMixin
],
data
()
{
return
{
listLoading
:
false
,
modifiedFlag
:
false
,
encryptIdcard
:
""
,
columns
:
[
{
label
:
"
姓名
"
,
value
:
"
name
"
,
minWidth
:
120
,
},
{
label
:
"
生日
"
,
value
:
"
birthday
"
,
minWidth
:
120
,
},
{
label
:
"
身份证
"
,
value
:
"
encryptedIdCard
"
,
minWidth
:
120
,
},
],
tableData
:
[],
formList
:
[
{
xs
:
24
,
sm
:
12
,
md
:
12
,
lg
:
7
,
xl
:
7
,
type
:
"
input
"
,
label
:
"
身份证
"
,
prop
:
"
idCard
"
,
placeholder
:
"
请输入身份证
"
,
rules
:
[],
},
{
xs
:
1
,
sm
:
2
,
md
:
2
,
lg
:
2
,
xl
:
2
,
type
:
"
btn
"
,
list
:
[
{
btnType
:
"
button
"
,
type
:
""
,
style
:
{
width
:
"
80px
"
,
height
:
"
32px
"
,
borderRadius
:
"
4px
"
,
fontSize
:
"
14px
"
,
marginLeft
:
"
40px
"
,
},
btnText
:
"
查询
"
,
func
:
()
=>
{
this
.
onSearch
()
},
},
],
},
],
}
},
watch
:
{},
mounted
()
{
this
.
handleSearch
()
},
methods
:
{
changeModified
()
{
this
.
modifiedFlag
=
!
this
.
modifiedFlag
},
setSelectedIndex
(
i
)
{
console
.
log
(
this
.
selectedIndex
)
this
.
selectedIndex
=
i
sessionStorage
.
setItem
(
"
homeSelectedIndex
"
,
this
.
selectedIndex
)
},
changePage
(
v
)
{
this
.
page
[
v
.
type
]
=
v
.
value
console
.
log
(
this
.
page
)
this
.
$refs
.
customTable
.
loading
=
false
},
onSearch
()
{
let
idCard
=
this
.
$refs
.
formList
.
form
.
idCard
if
(
idCard
)
{
let
data
=
md5
(
idCard
)
data
=
"
pa
"
+
data
+
"
1+
"
const
sha256Encrypt
=
getSha256
(
data
).
toString
()
// data - 需要加密的数据
//增量计算哈希值,减少内存
// const encryptedHexStr = CryptoJS.enc.Hex.parse(sha256Encrypt)
// const mic = CryptoJS.enc.Base64.stringify(encryptedHexStr) // base64加密
this
.
encryptIdcard
=
sha256Encrypt
this
.
handleSearch
()
}
else
{
this
.
encryptIdcard
=
""
this
.
handleSearch
()
}
},
handleSearch
()
{
let
params
=
{
current
:
this
.
pageIndex
,
size
:
this
.
pageSize
,
}
if
(
this
.
encryptIdcard
)
{
params
.
idCard
=
this
.
encryptIdcard
}
console
.
log
(
params
)
getEncryptList
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
tableData
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
}
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.screeningSearch
{
.top
{
width
:
100%
;
// height: 72px;
padding
:
0
116px
0
44px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.bot
{
padding
:
0
24px
;
}
}
</
style
>
yarn.lock
View file @
e8cf43a6
...
...
@@ -6254,6 +6254,11 @@ js-cookie@^2.2.1:
resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"
integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==
js-md5@^0.7.3:
version "0.7.3"
resolved "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz#b4f2fbb0b327455f598d6727e38ec272cd09c3f2"
integrity sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==
js-message@1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/js-message/-/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47"
...
...
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