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
bb9e40c3
Commit
bb9e40c3
authored
Aug 27, 2024
by
songrui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件名称修改
parent
eff07d64
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
268 deletions
+1
-268
Chronic.vue
src/chronic/Chronic.vue
+0
-41
base.js
src/chronic/api/base.js
+0
-31
IdCheck.vue
src/chronic/screening/first/form/IdCheck.vue
+0
-78
Index.vue
src/chronic/screening/first/form/Index.vue
+0
-61
index.js
src/chronic/store/index.js
+0
-30
common.less
src/chronic/utils/common.less
+0
-14
index.js
src/router/index.js
+1
-13
No files found.
src/chronic/Chronic.vue
deleted
100644 → 0
View file @
eff07d64
<
template
>
<div
class=
"h-full chronic-home"
>
<router-view
v-slot=
"
{ Component }">
<Transition
name=
"route"
mode=
"out-in"
>
<component
:is=
"Component"
v-if=
"visible"
/>
</Transition>
</router-view>
</div>
</
template
>
<
script
>
import
{
getDict
}
from
'./api/base.js'
import
{
useStore
}
from
'./store/index.js'
export
default
{
data
()
{
return
{
visible
:
false
}
},
setup
()
{
const
store
=
useStore
()
return
{
store
}
},
created
()
{
this
.
init
()
},
methods
:
{
async
init
()
{
console
.
log
(
this
.
visible
)
const
res
=
await
getDict
()
this
.
store
.
$patch
({
dict
:
res
.
data
||
{}
})
this
.
visible
=
true
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/chronic/api/base.js
deleted
100644 → 0
View file @
eff07d64
import
{
fetchBase
}
from
'@/utils/fetch.js'
import
{
setSessionStorage
,
getSessionStorage
}
from
'@/utils/common.js'
// 获取字典
export
function
getDict
()
{
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/dict`
,
loading
:
true
})
}
// 区划编码查询下级
export
function
getAreaChild
(
parentCode
,
loading
=
true
)
{
const
key
=
'chronic-area-cache'
return
new
Promise
((
resolve
,
reject
)
=>
{
const
result
=
getSessionStorage
(
key
)
||
{}
if
(
result
[
parentCode
])
{
resolve
(
result
[
parentCode
])
return
}
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/child-area/
${
parentCode
}
`
,
loading
}).
then
(
res
=>
{
result
[
parentCode
]
=
res
.
data
setSessionStorage
(
key
,
result
)
resolve
(
res
.
data
)
}).
catch
(
err
=>
{
reject
(
err
)
})
})
}
// 居民基本信息查询
export
function
getResidentInfo
(
idCard
)
{
return
fetchBase
({
url
:
`/tumour-admin/v1/h5-app/residents/
${
idCard
}
`
,
loading
:
true
})
}
src/chronic/screening/first/form/IdCheck.vue
deleted
100644 → 0
View file @
eff07d64
<
template
>
<div
class=
"h-full flex flex-col id-check"
>
<div
class=
"flex py-2"
>
<div
class=
"px-4 title"
>
基本信息
</div>
<div
class=
"text-12"
>
请准确填写您的证件信息,标*内容为必填
</div>
</div>
<van-form
label-width=
"5em"
ref=
"form"
>
<van-field
required
v-model=
"form.certificateTypeTrans"
is-link
readonly
name=
"certificateType"
label=
"证件类型"
placeholder=
"请选择"
disabled
/>
<van-field
v-model=
"form.idCard"
required
center
clearable
name=
"idCard"
label=
"证件号码"
placeholder=
"请输入"
:rules=
"rules.idCard"
>
</van-field>
</van-form>
<div
class=
"px-4 pb-4 grow flex flex-col justify-end"
>
<van-button
type=
"primary"
block
@
click=
"submit"
>
下一步
</van-button>
</div>
</div>
</
template
>
<
script
>
import
{
useStore
}
from
'@/chronic/store/index.js'
import
{
idCardRule
}
from
'@/utils/commonReg.js'
export
default
{
data
()
{
return
{
form
:
{
idCard
:
''
,
certificateType
:
1
,
certificateTypeTrans
:
''
},
rules
:
{
idCard
:
[{
required
:
true
,
message
:
'请输入'
},
idCardRule
],
certificateType
:
[{
required
:
true
,
message
:
'请选择'
}]
}
}
},
setup
()
{
const
store
=
useStore
()
return
{
store
}
},
created
()
{
this
.
init
()
},
methods
:
{
init
()
{
console
.
log
(
this
.
store
,
this
.
store
.
getDictValue
(
'DC00004'
,
this
.
form
.
certificateType
))
this
.
form
.
certificateTypeTrans
=
this
.
store
.
getDictValue
(
'DC00004'
,
this
.
form
.
certificateType
)
},
submit
()
{
this
.
$refs
.
form
.
validate
().
then
(
res
=>
{
console
.
log
(
res
,
this
.
form
)
}).
catch
(
err
=>
{
console
.
warn
(
err
)
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
@import '../../../utils/common.less';
</
style
>
src/chronic/screening/first/form/Index.vue
deleted
100644 → 0
View file @
eff07d64
<
template
>
<div
class=
"h-full pb-5 flex flex-col "
>
<div
class=
"p-3 text-16 text-black text-center shrink-0 top-bar"
>
<span
class=
"back-bt"
@
click=
"onBack"
v-if=
"setp >= 2"
>
<doc-icon
type=
"doc-left"
/>
</span>
<span>
慢病自我初筛
</span>
</div>
<div
class=
"grow overflow-y-auto"
>
<IdCheck
v-show=
"setp === 1"
/>
</div>
</div>
</
template
>
<
script
>
import
{
showNotify
}
from
'vant'
import
IdCheck
from
'./IdCheck.vue'
export
default
{
components
:
{
IdCheck
},
data
()
{
return
{
// 操作步骤
setp
:
1
,
}
},
computed
:
{
routeQuery
()
{
return
this
.
$route
.
query
},
doctorId
()
{
return
this
.
routeQuery
.
doctorId
}
},
created
()
{
if
(
!
this
.
doctorId
)
{
showNotify
({
type
:
'warning'
,
message
:
'未获取到医生信息'
,
duration
:
0
})
}
},
methods
:
{
onBack
()
{
if
(
this
.
setp
===
1
)
return
this
.
setp
--
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.top-bar {
position: relative;
border-bottom: 1px solid #0000001A;
.back-bt {
position: absolute;
left: .16rem;
}
}
</
style
>
src/chronic/store/index.js
deleted
100644 → 0
View file @
eff07d64
import
{
defineStore
}
from
'pinia'
export
const
useStore
=
defineStore
(
'chronic'
,
{
state
:
()
=>
{
return
{
// 字典
dict
:
[]
}
},
getters
:
{},
actions
:
{
getDict
(
dict
)
{
if
(
!
dict
)
return
[]
return
this
.
dict
[
dict
]
||
[]
},
getDictValue
(
dict
,
value
)
{
let
array
=
[]
if
(
typeof
dict
===
'string'
)
{
array
=
this
.
dict
[
dict
]
}
else
{
array
=
dict
}
if
(
!
array
||
!
array
.
length
)
{
return
''
}
let
temp
=
array
.
find
(
e
=>
e
.
value
==
value
)
||
{}
return
temp
.
name
||
''
}
}
})
src/chronic/utils/common.less
deleted
100644 → 0
View file @
eff07d64
.title {
font-weight: 600;
display: flex;
align-items: center;
&::before {
content: '';
display: inline-block;
background: var(--van-primary-color);
height: 16px;
width: 4px;
margin-right: 4px;
}
}
\ No newline at end of file
src/router/index.js
View file @
bb9e40c3
...
@@ -12,19 +12,7 @@ const routes = [
...
@@ -12,19 +12,7 @@ const routes = [
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple/form/Index.vue'
)
component
:
()
=>
import
(
/* webpackChunkName: "page-tumour" */
'@/tumour/screening/simple/form/Index.vue'
)
}
}
]
]
},
}
{
path
:
'/chronic'
,
name
:
'chronic'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-chronic" */
'@/chronic/Chronic.vue'
),
children
:
[
{
path
:
'screening/first/form'
,
name
:
'chronic-screening-first-form'
,
component
:
()
=>
import
(
/* webpackChunkName: "page-chronic" */
'@/chronic/screening/first/form/Index.vue'
)
}
]
},
]
]
const
router
=
createRouter
({
const
router
=
createRouter
({
...
...
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