Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
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
songrui
frontend-h5
Commits
71002ae8
Commit
71002ae8
authored
Jul 15, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
请求修改
parent
9e013cf0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
9 deletions
+54
-9
doc-check-circle.svg
src/assets/icons/doc-check-circle.svg
+3
-0
index.js
src/router/index.js
+5
-0
fetch.js
src/tumour/api/fetch.js
+16
-6
Index.vue
src/tumour/screening/simple/form/Index.vue
+11
-1
Result.vue
src/tumour/screening/simple/form/Result.vue
+18
-0
base.vue
src/tumour/screening/simple/form/base.vue
+1
-2
No files found.
src/assets/icons/doc-check-circle.svg
0 → 100644
View file @
71002ae8
<svg
width=
"15"
height=
"14"
viewBox=
"0 0 15 14"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M7.50001 13.6666C3.81801 13.6666 0.833344 10.682 0.833344 6.99998C0.833344 3.31798 3.81801 0.333313 7.50001 0.333313C11.182 0.333313 14.1667 3.31798 14.1667 6.99998C14.1667 10.682 11.182 13.6666 7.50001 13.6666ZM6.83534 9.66665L11.5487 4.95265L10.606 4.00998L6.83534 7.78131L4.94934 5.89531L4.00668 6.83798L6.83534 9.66665Z"
fill=
"#1890FF"
/>
</svg>
src/router/index.js
View file @
71002ae8
...
...
@@ -10,6 +10,11 @@ const routes = [
path
:
'screening/simple/form'
,
name
:
'tumour-screening-simple-form'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple/form/Index.vue'
)
},
{
path
:
'screening/simple/result'
,
name
:
'tumour-screening-simple-result'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple/form/Result.vue'
)
}
]
},
...
...
src/tumour/api/fetch.js
View file @
71002ae8
import
axios
from
'axios'
import
{
showFailToast
,
showLoadingToast
,
closeToast
}
from
'vant'
import
{
showFailToast
,
showLoadingToast
}
from
'vant'
const
baseAxios
=
axios
.
create
({
baseURL
:
''
,
...
...
@@ -8,6 +8,8 @@ const baseAxios = axios.create({
// 加载标志计数
let
loadingList
=
0
let
loadingToast
=
null
let
errorMark
=
0
export
function
fetchBase
({
url
=
''
,
...
...
@@ -26,7 +28,7 @@ export function fetchBase({
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
loading
)
{
loadingList
++
showLoadingToast
({
message
:
'加载中...
'
,
forbidClick
:
true
,
duration
:
0
})
loadingToast
=
showLoadingToast
({
message
:
'请求中
'
,
forbidClick
:
true
,
duration
:
0
})
}
baseAxios
({
method
:
method
,
...
...
@@ -39,21 +41,29 @@ export function fetchBase({
}).
then
(
function
(
response
)
{
const
data
=
response
.
data
||
{}
if
(
data
.
code
!==
'SUCCESS'
)
{
showFailToast
(
'请求失败'
)
errorMark
++
reject
(
data
)
return
}
resolve
(
data
)
}).
catch
(
function
(
err
)
{
showFailToast
(
'请求失败'
)
errorMark
++
reject
(
err
)
}).
finally
(()
=>
{
console
.
log
(
33
)
if
(
loading
)
{
loadingList
--
if
(
loadingList
<=
0
)
{
closeToast
()
if
(
loadingList
<=
0
&&
loadingToast
)
{
loadingToast
.
close
()
loadingToast
=
null
}
}
if
(
errorMark
)
{
setTimeout
(()
=>
{
showFailToast
(
'请求失败'
)
},
300
)
errorMark
=
0
}
})
})
}
src/tumour/screening/simple/form/Index.vue
View file @
71002ae8
...
...
@@ -25,6 +25,8 @@
import
BaseForm
from
'./base.vue'
import
QuestionForm
from
'./Question.vue'
import
{
showNotify
}
from
'vant'
import
{
addSimpleScreen
}
from
'@/tumour/api/screening.js'
import
{
fetchDataHandle
}
from
'@/utils/common.js'
export
default
{
components
:
{
...
...
@@ -77,7 +79,15 @@ export default {
details
:
res
,
createdUserId
:
this
.
doctorId
}
console
.
log
(
result
)
const
query
=
fetchDataHandle
(
result
,
{
species
:
'arrToStr'
})
console
.
log
(
query
)
addSimpleScreen
(
query
).
then
(()
=>
{
this
.
$router
.
replace
({
name
:
'tumour-screening-simple-result'
})
})
})
}
}
...
...
src/tumour/screening/simple/form/Result.vue
View file @
71002ae8
<
template
>
<div
class=
"form-result"
>
<div
class=
"flex align-center justify-center"
style=
"padding-top: 14vh;"
>
<doc-icon
type=
"doc-check-circle"
class=
"text-16"
/>
<span
class=
"ml-1"
>
提交成功
</span>
</div>
</div>
</
template
>
<
script
>
export
default
{
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/tumour/screening/simple/form/base.vue
View file @
71002ae8
...
...
@@ -82,8 +82,7 @@
/>
</van-popup>
<van-field
required
v-model=
"form.educationTrans"
<van-field
v-model=
"form.educationTrans"
is-link
readonly
name=
"education"
...
...
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