Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
map-property-mobile
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
zhangzhaohui
map-property-mobile
Commits
e4e08c94
Commit
e4e08c94
authored
Jan 29, 2024
by
leidahong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
事件处理跳转
parent
a884876e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
67 deletions
+90
-67
Handle.vue
src/views/Handle.vue
+87
-64
Login.vue
src/views/Login.vue
+3
-3
No files found.
src/views/Handle.vue
View file @
e4e08c94
...
@@ -10,13 +10,21 @@
...
@@ -10,13 +10,21 @@
<div
class=
"handle-item"
>
<div
class=
"handle-item"
>
<div
class=
"label"
>
上传处理前图片
</div>
<div
class=
"label"
>
上传处理前图片
</div>
<div
class=
"val"
>
<div
class=
"val"
>
<van-uploader
v-model=
"beforeHandleImgs"
:after-read=
"beforeHandleUpload"
multiple
/>
<van-uploader
v-model=
"beforeHandleImgs"
:after-read=
"beforeHandleUpload"
multiple
/>
</div>
</div>
</div>
</div>
<div
class=
"handle-item"
>
<div
class=
"handle-item"
>
<div
class=
"label"
>
上传处理后图片
</div>
<div
class=
"label"
>
上传处理后图片
</div>
<div
class=
"val"
>
<div
class=
"val"
>
<van-uploader
v-model=
"afterHandleImgs"
:after-read=
"afterHandleUpload"
multiple
/>
<van-uploader
v-model=
"afterHandleImgs"
:after-read=
"afterHandleUpload"
multiple
/>
</div>
</div>
</div>
</div>
<div
class=
"handle-item"
>
<div
class=
"handle-item"
>
...
@@ -26,123 +34,138 @@
...
@@ -26,123 +34,138 @@
</div>
</div>
</div>
</div>
<div
class=
"btn-box"
>
<div
class=
"btn-box"
>
<van-button
type=
"info"
style=
"height: .86rem; background-color: #3978F8;"
round
size=
"large"
@
click=
"submit"
>
提交
</van-button>
<van-button
type=
"info"
style=
"height: 0.86rem; background-color: #3978f8"
round
size=
"large"
@
click=
"submit"
>
提交
</van-button
>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Toast
}
from
'vant'
import
{
Toast
}
from
"vant"
;
import
{
handleEvent
,
uploadImg
}
from
'../api/index'
import
{
handleEvent
,
uploadImg
}
from
"../api/index"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
content
:
''
,
content
:
""
,
beforeHandleImgs
:
[],
beforeHandleImgs
:
[],
afterHandleImgs
:
[],
afterHandleImgs
:
[],
fileList
:
[]
fileList
:
[]
,
}
}
;
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
let
data
=
{
let
data
=
{
beforeProcessImgList
:
this
.
beforeHandleImgs
.
map
(
item
=>
item
.
url
).
join
(
','
),
beforeProcessImgList
:
this
.
beforeHandleImgs
afterProcessImgList
:
this
.
afterHandleImgs
.
map
(
item
=>
item
.
url
).
join
(
','
),
.
map
((
item
)
=>
item
.
url
)
.
join
(
","
),
afterProcessImgList
:
this
.
afterHandleImgs
.
map
((
item
)
=>
item
.
url
)
.
join
(
","
),
eventId
:
this
.
$route
.
query
.
id
,
eventId
:
this
.
$route
.
query
.
id
,
processContent
:
this
.
content
,
processContent
:
this
.
content
,
fileUrlList
:
this
.
fileList
.
map
(
item
=>
item
.
url
).
join
(
','
)
fileUrlList
:
this
.
fileList
.
map
((
item
)
=>
item
.
url
).
join
(
","
),
}
};
handleEvent
(
data
).
then
(
res
=>
{
handleEvent
(
data
).
then
((
res
)
=>
{
if
(
this
.
content
.
trim
()
===
""
)
{
Toast
.
fail
(
"请填写处理内容"
);
return
;
}
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
Toast
.
success
(
'提交成功'
)
Toast
.
success
(
"提交成功"
);
this
.
$router
.
go
(
-
1
)
this
.
$router
.
replace
(
"/home"
);
}
}
})
})
;
},
},
beforeHandleUpload
(
files
)
{
beforeHandleUpload
(
files
)
{
let
fileArr
=
[]
let
fileArr
=
[]
;
if
(
!
Array
.
isArray
(
files
))
{
if
(
!
Array
.
isArray
(
files
))
{
fileArr
.
push
(
files
.
file
)
fileArr
.
push
(
files
.
file
)
;
}
else
{
}
else
{
fileArr
=
files
fileArr
=
files
;
}
}
let
startIndex
=
this
.
beforeHandleImgs
.
length
-
fileArr
.
length
let
startIndex
=
this
.
beforeHandleImgs
.
length
-
fileArr
.
length
;
for
(
let
i
=
startIndex
;
i
<
this
.
beforeHandleImgs
.
length
;
i
++
)
{
for
(
let
i
=
startIndex
;
i
<
this
.
beforeHandleImgs
.
length
;
i
++
)
{
this
.
beforeHandleImgs
[
i
].
status
=
'uploading'
this
.
beforeHandleImgs
[
i
].
status
=
"uploading"
;
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
formData
.
append
(
"file"
,
this
.
beforeHandleImgs
[
i
].
file
);
formData
.
append
(
"file"
,
this
.
beforeHandleImgs
[
i
].
file
);
uploadImg
(
formData
).
then
(
res
=>
{
uploadImg
(
formData
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
beforeHandleImgs
[
i
].
status
=
'done'
this
.
beforeHandleImgs
[
i
].
status
=
"done"
;
this
.
beforeHandleImgs
[
i
].
url
=
res
.
data
.
url
this
.
beforeHandleImgs
[
i
].
url
=
res
.
data
.
url
;
}
else
{
}
else
{
this
.
beforeHandleImgs
[
i
].
status
=
'failed'
this
.
beforeHandleImgs
[
i
].
status
=
"failed"
;
}
}
})
})
;
}
}
},
},
afterHandleUpload
(
files
)
{
afterHandleUpload
(
files
)
{
let
fileArr
=
[]
let
fileArr
=
[]
;
if
(
!
Array
.
isArray
(
files
))
{
if
(
!
Array
.
isArray
(
files
))
{
fileArr
.
push
(
files
.
file
)
fileArr
.
push
(
files
.
file
)
;
}
else
{
}
else
{
fileArr
=
files
fileArr
=
files
;
}
}
let
startIndex
=
this
.
afterHandleImgs
.
length
-
fileArr
.
length
let
startIndex
=
this
.
afterHandleImgs
.
length
-
fileArr
.
length
;
for
(
let
i
=
startIndex
;
i
<
this
.
afterHandleImgs
.
length
;
i
++
)
{
for
(
let
i
=
startIndex
;
i
<
this
.
afterHandleImgs
.
length
;
i
++
)
{
this
.
afterHandleImgs
[
i
].
status
=
'uploading'
this
.
afterHandleImgs
[
i
].
status
=
"uploading"
;
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
formData
.
append
(
"file"
,
this
.
afterHandleImgs
[
i
].
file
);
formData
.
append
(
"file"
,
this
.
afterHandleImgs
[
i
].
file
);
uploadImg
(
formData
).
then
(
res
=>
{
uploadImg
(
formData
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
afterHandleImgs
[
i
].
status
=
'done'
this
.
afterHandleImgs
[
i
].
status
=
"done"
;
this
.
afterHandleImgs
[
i
].
url
=
res
.
data
.
url
this
.
afterHandleImgs
[
i
].
url
=
res
.
data
.
url
;
}
else
{
}
else
{
this
.
afterHandleImgs
[
i
].
status
=
'failed'
this
.
afterHandleImgs
[
i
].
status
=
"failed"
;
}
}
})
})
;
}
}
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.handle-container
{
.handle-container
{
.handle-form
{
.handle-form
{
border-top
:
14px
solid
#
F7F7F
7
;
border-top
:
14px
solid
#
f7f7f
7
;
.handle-item
{
.handle-item
{
padding
:
.24rem
.46rem
.2rem
;
padding
:
0
.24rem
0
.46rem
0
.2rem
;
.label
{
.label
{
font-size
:
.31rem
;
font-size
:
0
.31rem
;
}
}
.val
{
.val
{
margin-top
:
.2rem
;
margin-top
:
0
.2rem
;
textarea
{
textarea
{
width
:
100%
;
width
:
100%
;
height
:
1
.8rem
;
height
:
1
.8rem
;
font-size
:
.3rem
;
font-size
:
0
.3rem
;
}
}
}
}
}
}
.content
{
.content
{
border-bottom
:
14px
solid
#
F7F7F
7
;
border-bottom
:
14px
solid
#
f7f7f
7
;
.label
{
.label
{
position
:
relative
;
position
:
relative
;
&
:
:
before
{
&
:
:
before
{
content
:
'*'
;
content
:
"*"
;
color
:
#
F74C
31
;
color
:
#
f74c
31
;
position
:
absolute
;
position
:
absolute
;
left
:
-.2rem
;
left
:
-
0
.2rem
;
top
:
.05rem
;
top
:
0
.05rem
;
font-size
:
.3rem
;
font-size
:
0
.3rem
;
}
}
}
}
}
}
}
}
.btn-box
{
.btn-box
{
padding
:
.6rem
.62rem
0
;
padding
:
0
.6rem
0
.62rem
0
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/Login.vue
View file @
e4e08c94
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
>
123123123
</a
>
123123123
</a
>
-->
>
-->
<p>
Hello!
</p>
<p>
Hello!
</p>
<p
style=
"margin-top: 0.3rem"
>
欢迎登录
XXXX
物业管理端
</p>
<p
style=
"margin-top: 0.3rem"
>
欢迎登录
望春街道
物业管理端
</p>
</div>
</div>
<div
class=
"form-container"
>
<div
class=
"form-container"
>
<div
class=
"form-item"
>
<div
class=
"form-item"
>
...
@@ -40,8 +40,8 @@ export default {
...
@@ -40,8 +40,8 @@ export default {
return
{
return
{
codeUrl
:
""
,
codeUrl
:
""
,
form
:
{
form
:
{
username
:
"
tyjy
"
,
username
:
""
,
password
:
"
xcsq1234,
"
,
password
:
""
,
code
:
""
,
code
:
""
,
uuid
:
""
,
uuid
:
""
,
},
},
...
...
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