Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
Videodiagnosis
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
苗家乐
Videodiagnosis
Commits
6ea0c244
Commit
6ea0c244
authored
1 year ago
by
miaojiale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交问卷
parent
7c7b542a
wenrenmin
No related merge requests found
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
888 additions
and
11 deletions
+888
-11
index.js
src/axios/api/index.js
+20
-0
http.js
src/axios/request/http.js
+28
-10
index.vue
src/components/FormComponents/index.vue
+702
-0
questionnaire.vue
src/pages/questionnaire.vue
+131
-0
index.js
src/router/index.js
+7
-1
No files found.
src/axios/api/index.js
View file @
6ea0c244
...
...
@@ -22,5 +22,25 @@ export const API = {
},
putFeedback
:
(
data
)
=>
{
return
post
(
`/disease-data/follow-up/feedback`
,
data
)
},
////////////
// 获取问卷调查
getQuestionnaireList
:
(
data
)
=>
{
return
get
(
`/disease-data/questionnaire/list`
,
data
)
},
// 获取问卷记录
getQuestionnaireRecords
:
(
data
)
=>
{
return
get
(
`/disease-data/questionnaire/records`
,
data
)
},
// 获取用户信息
getPatientInfo
:
(
data
)
=>
{
return
get
(
`/disease-data/patient/info`
,
data
)
},
// 提交问卷
setQuestionnaire
:
(
data
)
=>
{
return
post
(
`/disease-data/questionnaire`
,
data
)
}
}
This diff is collapsed.
Click to expand it.
src/axios/request/http.js
View file @
6ea0c244
...
...
@@ -5,7 +5,7 @@ import qs from "qs"
import
{
MessageBox
,
Toast
}
from
"
mint-ui
"
//接口报错弹出
let
CommonAlert
=
function
(
msg
)
{
if
(
msg
.
length
>
0
)
{
if
(
msg
&&
msg
.
length
>
0
)
{
return
Toast
({
message
:
msg
,
duration
:
1500
...
...
@@ -49,7 +49,7 @@ const toLogin = () => {
axios
.
interceptors
.
response
.
use
(
(
response
)
=>
{
if
(
response
.
data
.
code
===
0
||
response
.
data
.
code
===
-
1
)
{
CommonAlert
(
response
.
data
.
message
)
CommonAlert
(
response
.
data
.
message
||
response
.
data
.
msg
)
}
else
if
(
response
.
data
.
code
===
-
100
)
{
localStorage
.
removeItem
(
"
vd_token
"
)
// window.location.hash = "/login";
...
...
@@ -128,7 +128,17 @@ axios.interceptors.response.use(
*/
export
function
get
(
url
,
params
=
{})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
get
(
url
,
{
params
}).
then
(
axios
.
get
(
url
,
{
params
})
.
then
(
(
response
)
=>
{
resolve
(
response
.
data
)
},
(
err
)
=>
{
reject
(
err
)
}
)
.
catch
(
(
response
)
=>
{
resolve
(
response
.
data
)
},
...
...
@@ -160,6 +170,14 @@ export function post(url, data = {}, params = {}) {
reject
(
err
)
}
)
.
catch
(
(
response
)
=>
{
resolve
(
response
.
data
)
},
(
err
)
=>
{
reject
(
err
)
}
)
})
}
export
function
postForm
(
url
,
data
=
{})
{
...
...
This diff is collapsed.
Click to expand it.
src/components/FormComponents/index.vue
0 → 100644
View file @
6ea0c244
This diff is collapsed.
Click to expand it.
src/pages/questionnaire.vue
0 → 100644
View file @
6ea0c244
<
template
>
<div>
<x-header
:left-options=
"
{ backText: '', showBack: false }">
调查表
</x-header>
<v-content
:has-header=
"true"
:has-footer=
"true"
>
<v-form
:form-data=
"forms"
:formEdit=
"formEdit"
:isPart=
"true"
@
handleConfirm=
"submit"
ref=
"form"
:loading=
"btnLoading"
></v-form>
</v-content>
</div>
</
template
>
<
script
>
import
VForm
from
"
@/components/FormComponents
"
export
default
{
components
:
{
VForm
},
data
()
{
return
{
forms
:
[
{
// type: "input",
// label: "身高(厘米)",
// dot: "48",
// prop: "height",
// unit: "cm",
// isp: true,
// inputType: "number",
}
],
formEdit
:
{},
btnLoading
:
false
}
},
methods
:
{
getPatientInfo
()
{
let
params
=
{
idCard
:
111111111
,
patientName
:
"
张三
"
,
phone
:
18888888888
}
this
.
$API
.
getPatientInfo
(
params
)
.
then
((
res
)
=>
{
this
.
baseInfo
=
{
...
res
.
data
}
})
.
catch
(()
=>
{
this
.
baseInfo
=
{}
})
},
getQuestionList
()
{
this
.
$API
.
getQuestionnaireList
().
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
forms
=
[...
res
.
data
]
this
.
forms
.
map
((
e
)
=>
{
e
.
rules
=
[{
required
:
true
,
trigger
:
"
blur
"
,
message
:
"
该项必传
"
}]
})
this
.
forms
.
push
({
type
:
"
button
"
,
buttonType
:
"
info
"
,
size
:
"
large
"
,
buttonMargin
:
"
10px
"
,
borderRadius
:
"
50px
"
,
buttonWidth
:
"
95%
"
,
buttonText
:
"
保存
"
,
nativeType
:
"
submit
"
})
}
})
},
getQuestionnaireRecords
()
{
this
.
$API
.
getQuestionnaireRecords
({
patientId
:
1
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
data
)
{
this
.
records
=
res
.
data
.
map
((
e
)
=>
e
.
records
)
this
.
formEdit
=
{
...
this
.
records
[
0
]
}
}
}
})
},
submit
()
{
this
.
btnLoading
=
true
let
form
=
this
.
$refs
.
form
.
form
const
data
=
{
params
:
form
,
patientId
:
this
.
baseInfo
.
id
}
this
.
$API
.
setQuestionnaire
(
data
)
.
then
((
res
)
=>
{
this
.
btnLoading
=
false
if
(
res
.
code
==
1
)
{
this
.
$toast
.
success
({
type
:
"
success
"
,
forbidClick
:
true
,
message
:
"
提交成功
"
,
onClose
:
()
=>
{
// this.$router.push("/peopleList")
},
duration
:
1500
})
}
})
.
catch
((
error
)
=>
{
console
.
log
(
error
)
this
.
btnLoading
=
false
})
}
},
created
()
{
this
.
getPatientInfo
()
this
.
getQuestionList
()
},
mounted
()
{
this
.
getQuestionnaireRecords
()
},
watch
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
This diff is collapsed.
Click to expand it.
src/router/index.js
View file @
6ea0c244
...
...
@@ -5,7 +5,7 @@ Vue.use(Router);
const
page
=
[
{
path
:
"
/
"
,
redirect
:
"
/feedback
"
//调试
//
redirect: "/feedback" //调试
},
{
path
:
"
/login
"
,
...
...
@@ -18,6 +18,12 @@ const page = [
meta
:
{
index
:
2
,
keepAlive
:
false
},
name
:
"
feedback
"
,
component
:
()
=>
import
(
"
@/pages/feedback
"
)
},
{
path
:
`/questionnaire/:dataId`
,
meta
:
{
index
:
2
,
keepAlive
:
false
},
name
:
"
questionnaire
"
,
component
:
()
=>
import
(
"
@/pages/questionnaire
"
)
}
];
...
...
This diff is collapsed.
Click to expand it.
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