Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-SDT
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-SDT
Commits
8998b725
Commit
8998b725
authored
Mar 15, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情-添加
parent
c28219ee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
24 deletions
+38
-24
common.js
js/common.js
+1
-1
yh-list-detail.html
views/yh-list-detail.html
+1
-1
yh-list-detail.js
views/yh-list-detail.js
+34
-20
yh-list.js
views/yh-list.js
+2
-2
No files found.
js/common.js
View file @
8998b725
...
...
@@ -48,7 +48,7 @@ var userInfo = {
}
var
token
=
"
Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOi
JjNDdlMTA3MGZjZDc0MDdmOTBlNWViN2Y0M2ZkNmQ2MSIsInVzZXIiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.ABEEx0r9KFg2aZNk9IwdV37z4wy7PyLK8l0lpoAMiaA_ct3bCUMVqu9TPBOXY5Dmzv3C2UxC3oXF9w9Vc_DHRA
"
;
"
Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOi
I5OGI1OGIwYjRlYmY0Nzg4YjQyM2VmMjVmYzkwYWE4NCIsInVzZXIiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.c-gsRfSGfkQuaLr2BTVfJuAhE-i8imzawovC56O3UEUVYsZW8XJ9RYgIE65M8n77z6YNmrXGysqdP8vCgRVyag
"
;
localStorage
.
setItem
(
'
Authorization
'
,
token
)
localStorage
.
setItem
(
'
appCounty
'
,
userInfo
.
user
.
county
)
...
...
views/yh-list-detail.html
View file @
8998b725
...
...
@@ -110,7 +110,7 @@
<van-cell-group>
<van-cell>
隐患照片:
<div
style=
"width: 2.5rem;"
>
<van-uploader
v-model=
"fileList"
:max-count=
"1"
:deletable=
"editAble"
>
<van-uploader
v-model=
"fileList"
:max-count=
"1"
:deletable=
"editAble"
:preview-full-image=
"false"
>
<!-- <van-button icon="plus" type="info" size="small">上传文件</van-button> -->
</van-uploader>
</div></van-cell>
...
...
views/yh-list-detail.js
View file @
8998b725
...
...
@@ -9,29 +9,29 @@ window.addEventListener("load", function() {
return
{
form
:
{
// 检查日期
hdInspectDate
:
'
2024-03-08 00:00:00
'
,
hdInspectDate
:
'
'
,
//
2024-03-08 00:00:00',
// 检查人员
hdInspectExpert
:
'
发发发
'
,
hdInspectExpert
:
'
'
,
//'
发发发',
// 隐患类型
hdLevel
:
'
1
'
,
// 安全类别
curSelectSecType
:
'
安全资料类
'
,
curSelectSecType
:
'
'
,
//'
安全资料类',
// 安全检查类别
curSelectSecCheckTypeReplace
:
'
测试资料
'
,
curSelectSecCheckTypeReplace
:
'
'
,
//'
测试资料',
// 当前选择的安全检查内容
curSelectCheckContent
:
'
测试内容
'
,
curSelectCheckContent
:
'
'
,
//'
测试内容',
// 发现问题
hdName
:
'
测试问题
'
,
hdName
:
'
'
,
//'
测试问题',
// 隐患描述
hdDesc
:
"
水电费双方都
"
,
hdDesc
:
''
,
//
"水电费双方都",
// 检查依据
basis
:
'
测试依据
'
,
basis
:
'
'
,
//'
测试依据',
// 隐患整改建议
suggestion
:
'
测试建议
'
,
suggestion
:
'
'
,
//'
测试建议',
// 隐患图片
// hdPic: null,
// 隐患整改日期
hdRectificationDate
:
'
2024-03-08
'
,
hdRectificationDate
:
'
'
,
//'
2024-03-08',
// 隐患整改图片
// hdRectificationPic: null,
// 整改图片文件路径
...
...
@@ -81,10 +81,23 @@ window.addEventListener("load", function() {
}
},
mounted
()
{
if
(
getParameter
(
'
type
'
)
===
'
detail
'
){
this
.
editAble
=
false
this
.
detail
()
}
else
if
(
getParameter
(
'
type
'
)
===
'
edit
'
){
this
.
editAble
=
true
this
.
detail
()
}
else
{
// 新增
this
.
editAble
=
true
this
.
resetData
()
}
},
methods
:
{
resetData
()
{
// 使用 Object.assign 来重写 this.$data,以达到重置 data 的目的
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
.
call
(
this
));
},
showPopup
(
popupType
){
if
(
this
.
editAble
){
this
[
popupType
]
=
true
...
...
@@ -183,16 +196,17 @@ window.addEventListener("load", function() {
vant
.
Toast
({
message
:
'
操作成功
'
,
})
// this.secCheckTypeReplace = res.content || []
if
(
!
this
.
form
.
hdId
){
// 添加时则
location
.
reload
()
}
})
},
formatDate
(
date
)
{
console
.
log
(((
date
.
getMonth
()
+
1
)
>
9
?
''
:
'
0
'
))
return
`
${
date
.
getFullYear
()
+
1
}
-
${((
date
.
getMonth
()
+
1
)
>
9
?
''
:
'
0
'
)
+
(
date
.
getMonth
()
+
1
)}
-
${(
date
.
getDate
()
>
9
?
''
:
'
0
'
)
+
date
.
getDate
()}
00:00:00`
;
formatDate
(
date
,
type
)
{
var
ymd
=
`
${
date
.
getFullYear
()
+
1
}
-
${((
date
.
getMonth
()
+
1
)
>
9
?
''
:
'
0
'
)
+
(
date
.
getMonth
()
+
1
)}
-
${(
date
.
getDate
()
>
9
?
''
:
'
0
'
)
+
date
.
getDate
()}
`
;
if
(
type
===
'
YYYY-MM-DD HH:MM:SS
'
){
return
ymd
+
'
00:00:00
'
;
}
return
ymd
},
onConfirm4secType
(
value
,
index
)
{
console
.
log
(
'
value
'
,
value
)
...
...
@@ -287,7 +301,7 @@ window.addEventListener("load", function() {
confirm4hdInspectDate
(
value
)
{
console
.
log
(
'
value
'
,
value
)
this
.
form
.
hdInspectDate
=
this
.
formatDate
(
new
Date
(
value
))
this
.
form
.
hdInspectDate
=
this
.
formatDate
(
new
Date
(
value
)
,
'
YYYY-MM-DD HH:MM:SS
'
)
this
.
showPopup4hdInspectDate
=
false
},
...
...
views/yh-list.js
View file @
8998b725
...
...
@@ -24,10 +24,10 @@ window.addEventListener("load", function() {
// location.href='./yh-list.html'
},
add
(){
location
.
href
=
'
./yh-list-detail.html?companyId=
'
+
getParameter
(
'
companyId
'
)
location
.
href
=
'
./yh-list-detail.html?companyId=
'
+
getParameter
(
'
companyId
'
)
+
'
&type=add
'
},
detail
(
item
){
location
.
href
=
'
./yh-list-detail.html?companyId=
'
+
getParameter
(
'
companyId
'
)
+
'
&hdId=
'
+
item
.
hdId
location
.
href
=
'
./yh-list-detail.html?companyId=
'
+
getParameter
(
'
companyId
'
)
+
'
&hdId=
'
+
item
.
hdId
+
'
&type=detail
'
},
edit
(
item
){
location
.
href
=
'
./yh-list-detail.html?companyId=
'
+
getParameter
(
'
companyId
'
)
+
'
&hdId=
'
+
item
.
hdId
+
'
&type=edit
'
...
...
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