Commit e73e024f authored by gengchunlei's avatar gengchunlei

Merge branch 'chronic-dev' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-dev

 Conflicts:
	src/doctor/workbench/tables/Visit.vue
parents d486e2ce 10b33da2
......@@ -27,6 +27,34 @@ body {
opacity: 0;
}
// 下拉框 消失隐藏动画
.viewer-fade-enter-active {
animation: viewer-fade-in .3s;
}
.viewer-fade-leave-active {
animation: viewer-fade-out .2s;
}
@keyframes viewer-fade-in {
0% {
transform: translate3d(0, -20px, 0);
opacity: 0;
}
100% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes viewer-fade-out {
0% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
100% {
transform: translate3d(0, -20px, 0);
opacity: 0;
}
}
*, :after, :before {
box-sizing: border-box;
}
......
<svg width="17" height="15" viewBox="0 0 17 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.6699 2.6466H8.49851C8.49851 1.71832 7.74259 0.962402 6.81432 0.962402H5.69253C4.76426 0.962402 4.00834 1.71832 4.00834 2.6466H2.33019C1.40192 2.6466 0.645996 3.40252 0.645996 4.33079V13.3051C0.645996 14.2334 1.40192 14.9893 2.33019 14.9893H14.6699C15.5981 14.9893 16.354 14.2334 16.354 13.3051V4.33079C16.351 3.40252 15.5951 2.6466 14.6699 2.6466ZM8.49851 12.1833C6.64197 12.1833 5.13315 10.6745 5.13315 8.81794C5.13315 6.9614 6.64197 5.45258 8.49851 5.45258C10.3551 5.45258 11.8639 6.9614 11.8639 8.81794C11.8639 10.6745 10.3551 12.1833 8.49851 12.1833ZM13.8262 6.57436C13.3606 6.57436 12.9857 6.1964 12.9857 5.73378C12.9857 5.27115 13.3636 4.89319 13.8262 4.89319C14.2919 4.89319 14.6668 5.27115 14.6668 5.73378C14.6668 6.1964 14.2919 6.57436 13.8262 6.57436Z" fill="#575B66"/>
</svg>
<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
<path d="M12 0H18V5H16V2H12V0ZM6 0V2H2V5H0V0H6ZM12 18V16H16V13H18V18H12ZM6 18H0V13H2V16H6V18ZM0 8H18V10H0V8Z"/>
</svg>
......@@ -52,7 +52,7 @@ export default {
if (!token) {
token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') {
token = '28015f4f-ce3f-4dee-934b-0a72a7804bc2'
token = '8f7ab9cb-868b-4fa4-b64a-4a1a11521706'
}
}
if (token) {
......@@ -155,4 +155,13 @@ export default {
}
}
// 输入框
.doc-input {
border-radius: 50px;
background-color: #FAFAFA !important;
padding: 5px 0 5px 12px !important;
&::after {
display: none;
}
}
</style>
......@@ -20,9 +20,11 @@ export default {
fieldNames: {
type: Object,
default: () => {
return {text: 'name', value: 'code'}
return {text: 'name', value: 'value'}
}
},
// 点击取消选中 单选
clearable: { default: true },
// 是否多选
multiple: Boolean
},
......@@ -49,14 +51,19 @@ export default {
if (this.isDisabled(item)) {
return
}
const val = item[this.fieldNames.value]
if (this.multiple) {
if (this.innerValue.includes(item[this.fieldNames.value])) {
this.innerValue = this.innerValue.filter(e => e !== item[this.fieldNames.value])
if (this.innerValue.includes(val)) {
this.innerValue = this.innerValue.filter(e => e !== val)
} else {
this.innerValue.push(item[this.fieldNames.value])
this.innerValue.push(val)
}
} else {
this.innerValue = item[this.fieldNames.value]
if (this.clearable && this.innerValue === val) {
this.innerValue = undefined
} else {
this.innerValue = val
}
}
this.$emit('update:value', this.innerValue)
this.$emit('change', this.innerValue, item)
......@@ -86,25 +93,50 @@ export default {
</script>
<style lang="less" scoped>
.check-btn {
row-gap: 10px;
column-gap: 10px;
}
.check-btn-item {
.check-btn-item {
border: 1px solid transparent;
background-color: #FAFAFA;
border-radius: 8px;
transition: all .2s;
}
.check-btn-item-active {
}
.check-btn-item-active {
border: 1px solid var(--van-primary-color);
background-color: #F0F6FF;
color: var(--van-primary-color);
}
.check-btn-item-disabled {
}
.check-btn-item-disabled {
background-color: #F0F6FF;
color: var(--van-primary-color);
// opacity: 0.5;
filter: grayscale(1);
}
}
.check-btn.check-btn-workbench {
.check-btn-item {
border-radius: 30px;
padding-top: 4px;
padding-bottom: 4px;
text-align: center;
color: #595959;
}
.check-btn-item-active {
color: var(--van-primary-color);
}
}
.check-btn[column-3] {
.check-btn-item {
width: calc(33.3% - 6.6px);
}
}
.check-btn[column-2] {
.check-btn-item {
width: calc(50% - 5px)
}
}
</style>
<template>
<van-uploader :max-size="5 * 1024 * 1024" :after-read="afterRead" max-count="1"
class="id-card-scan">
<doc-icon type="doc-scan" class="shrink-0 mr-3" style="color: var(--van-primary-color)"/>
</van-uploader>
</template>
<script>
import { showNotify } from 'vant'
export default {
name: 'IdCardScan',
emits: ['change'],
methods: {
// 证件上传后
afterRead(file) {
console.log(file)
showNotify({ type: 'primary', message: '文件上传' })
this.$emit('change', file)
}
}
}
</script>
<style lang="less" scoped>
</style>
<template>
<div class="h-full flex flex-col patient-detail">
<DocNavBar title="居民详情" class="shrink-0">
<template #right>
<span class="addBtn">新增</span>
</template>
</DocNavBar>
</div>
</template>
<script>
export default {
}
</script>
<style lang="less" scoped>
.addBtn {
color: var(--van-primary-color);
}
</style>
......@@ -6,7 +6,7 @@
@click="toSearch"/>
</template>
</DocNavBar>
<div class="grow flex flex-col" style="min-height: 0">
<div class="grow flex flex-col" style="min-height: 0;position: relative;">
<div class="shrink-0 workbench-tab">
<div class="back"></div>
<div class="flex workbench-tab-inner" ref="tab-inner">
......@@ -155,4 +155,15 @@ export default {
}
}
}
:deep(.workbench-search-box) {
color: #595959;
.bt-group {
border-top: 1px solid #EBEBEC;
color: #262626;
.submit-btn {
color: #fff;
background-color: var(--van-primary-color);
}
}
}
</style>
......@@ -7,7 +7,7 @@
<van-tab v-for="item in tabList" :key="item.value"
:title="item.name"></van-tab>
</van-tabs>
<div class="shrink-0 pl-3" style="border-left: 1px solid #A5AEBE;">
<div class="shrink-0 pl-3" style="border-left: 1px solid #A5AEBE;" @click='openSearch'>
<doc-icon type="doc-menu" style="font-size:.2rem;color:#03053D"/>
</div>
</div>
......@@ -39,7 +39,10 @@
</div>
<div>
<span class="label">逾期天数</span>
<span>{{ item.overdueDay }}</span>
<span>
<span :class="{'text-red': item.overdueDay > 0}">{{ item.overdueDay }}</span>
<span></span>
</span>
</div>
<div class="flex">
<span class="label">慢病标签</span>
......@@ -54,7 +57,7 @@
</div>
<div class="divider my-3"></div>
<div class="bt-group">
<van-button round size="small" class="doc-btn-primary">详情</van-button>
<van-button round size="small" class="doc-btn-primary" @click="toDetail(item)">详情</van-button>
<span class="mr-3"></span>
<van-button round size="small" class="doc-btn-primary" @click='toAddGeneral(item)'>通用随访</van-button>
<span class="mr-3"></span>
......@@ -68,22 +71,74 @@
<p>暂无数据</p>
</div>
</van-pull-refresh>
<van-popup v-model:show="searchVisible" position="top" :style="{ height: '70%' }"
style="position: absolute;transition: none"
:overlay-style="{ position: 'absolute' }"
transition="viewer-fade"
:teleport="listDom">
<div class="h-full flex flex-col workbench-search-box">
<div class="px-4 py-3 grow overflow-y-auto" style="">
<div class="mb-3">身份证号</div>
<van-field v-model="form.idCard" placeholder="请输入身份证号" maxlength="20"
class="doc-input">
<template #right-icon>
<IdCardScan />
</template>
</van-field>
<div class="my-3">居民姓名</div>
<van-field v-model="form.residentName" placeholder="输入居民姓名" maxlength="100"
class="doc-input"/>
<div class="my-3">数据来源</div>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3
class="check-btn-workbench"/>
<div class="my-3">是否逾期</div>
<CheckBtn :options="isValidArray" v-model:value="form.isValid"
class="check-btn-workbench"/>
</div>
<div class="text-16 flex shrink-0 text-center bt-group">
<div class="grow py-3" @click="reset">重置</div>
<div class="grow py-3 submit-btn" @click="search">确定</div>
</div>
</div>
</van-popup>
</div>
</div>
</template>
<script>
import { useStore } from '@/doctor/store'
import { getVisitByPage, delVisit } from '@/api/doctor/workbench.js'
import ChronicTag from '@/doctor/components/chronicTag/ChronicTag.vue'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
import { showToast } from 'vant'
const DefaultForm = {
// 数据来源,[CP00124]
source: undefined,
// 是否逾期
isValid: '',
// 下次随访日期-开始日期
nextVisitDateStart: undefined,
// 下次随访日期-截止日期
nextVisitDateEnd: undefined,
// 姓名
residentName: undefined,
// 身份证号
idCard: undefined
}
export default {
name: 'TableVisit',
components: {
ChronicTag
ChronicTag,
CheckBtn,
IdCardScan
},
data() {
return {
store: useStore(),
list: [],
pagination: {
total: 0,
......@@ -104,12 +159,25 @@ export default {
{ name: '慢性肾病', value: 6 },
{ name: '血脂异常', value: 7 }
],
activeTab: 0
activeTab: 0,
// 搜索弹出框
searchVisible: false,
form: { ...DefaultForm },
rangeDate: [],
}
},
computed: {
activeTabItem() {
return this.tabList[this.activeTab] || {}
},
listDom() {
return this.$refs.list
},
isValidArray() {
return [
{ name: '是', value: 1 },
{ name: '否', value: 2 }
]
}
},
created() {
......@@ -145,6 +213,16 @@ export default {
this.loadingRefresh = false
})
},
search() {
this.pagination.pageIndex = 1
this.load()
this.searchVisible = false
},
reset() {
this.form = { ...DefaultForm }
this.rangeDate = []
this.search()
},
onMore() {
this.pagination.pageIndex++
this.load(false)
......@@ -157,6 +235,9 @@ export default {
this.pagination.pageIndex = 1
this.load()
},
openSearch() {
this.searchVisible = true
},
toDetail(record) {
if (!record) return
// let path = `/residentWX/screening/firstDetail/${record.id}`
......@@ -164,6 +245,9 @@ export default {
// path = `/residentWX/screening/SecondDetail/${record.id}`
// }
// this.$router.push({ path })
},
toVisit(record) {
},
onIgnore(record) {
delVisit({ id: record.id }).then(() => {
......@@ -181,6 +265,16 @@ export default {
query: {...others}
})
},
},
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.nextVisitDateStart = this.rangeDate[0]
this.form.nextVisitDateEnd = this.rangeDate[1]
return
}
this.form.nextVisitDateStart = undefined
this.form.nextVisitDateEnd = undefined
},
}
}
</script>
......
......@@ -4,7 +4,8 @@
<van-tabs shrink type="card" class="grow doc-tab-round" line>
<van-tab title="全部" title-style="padding: 0 .2rem"></van-tab>
</van-tabs>
<doc-icon type="doc-menu" style="font-size:.2rem;color:#03053D"/>
<doc-icon type="doc-menu" style="font-size:.2rem;color:#03053D"
@click='openSearch' />
</div>
<div class='grow pt-1 overflow-y-auto' ref='list'>
<van-pull-refresh v-model='loadingRefresh' @refresh='onRefresh'
......@@ -53,17 +54,71 @@
<p>暂无数据</p>
</div>
</van-pull-refresh>
<van-popup v-model:show="searchVisible" position="top" :style="{ height: '70%' }"
style="position: absolute;transition: none"
:overlay-style="{ position: 'absolute' }"
transition="viewer-fade"
:teleport="listDom">
<div class="h-full flex flex-col workbench-search-box">
<div class="px-4 py-3 grow overflow-y-auto" style="">
<div class="mb-3">身份证号</div>
<van-field v-model="form.idCard" placeholder="请输入身份证号" maxlength="20"
class="doc-input">
<template #right-icon>
<IdCardScan />
</template>
</van-field>
<div class="my-3">居民姓名</div>
<van-field v-model="form.patientName" placeholder="输入居民姓名" maxlength="100"
class="doc-input"/>
<div class="my-3">数据来源</div>
<CheckBtn :options="store.getDict('CP00124')" v-model:value="form.source" column-3
class="check-btn-workbench"/>
<div class="my-3">服务类型</div>
<CheckBtn :options="store.getDict('CP00150')" v-model:value="form.serviceType" column-2
class="check-btn-workbench"/>
</div>
<div class="text-16 flex shrink-0 text-center bt-group">
<div class="grow py-3" @click="reset">重置</div>
<div class="grow py-3 submit-btn" @click="search">确定</div>
</div>
</div>
</van-popup>
</div>
</div>
</template>
<script>
import { getWorkByPage } from '@/api/doctor/workbench.js'
import { useStore } from '@/doctor/store'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn.vue'
import IdCardScan from '@/doctor/components/idCardScan/IdCardScan.vue'
const DefaultForm = {
// 数据来源,[DC00051]
source: undefined,
// 服务类型
serviceType: undefined,
// 服务日期-截止日期
startDate: undefined,
// 服务日期-开始日期
endDate: undefined,
// 姓名
patientName: undefined,
// 身份证号
idCard: undefined
}
export default {
name: 'TableWork',
components: {
CheckBtn,
IdCardScan
},
data() {
return {
store: useStore(),
list: [],
pagination: {
total: 0,
......@@ -73,7 +128,16 @@ export default {
loading: false,
finished: false,
loadingRefresh: false,
isRefreshDisable: false
isRefreshDisable: false,
// 搜索弹出框
searchVisible: false,
form: { ...DefaultForm },
rangeDate: [],
}
},
computed: {
listDom() {
return this.$refs.list
}
},
created() {
......@@ -91,10 +155,12 @@ export default {
},
methods: {
load(loading = true) {
this.dateHandle()
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
searchType: 1
searchType: 1,
...this.form
}
getWorkByPage(query, loading).then(res => {
if (this.pagination.pageIndex === 1) {
......@@ -108,6 +174,16 @@ export default {
this.loadingRefresh = false
})
},
search() {
this.pagination.pageIndex = 1
this.load()
this.searchVisible = false
},
reset() {
this.form = { ...DefaultForm }
this.rangeDate = []
this.search()
},
onMore() {
this.pagination.pageIndex++
this.load(false)
......@@ -116,6 +192,9 @@ export default {
this.pagination.pageIndex = 1
this.load()
},
openSearch() {
this.searchVisible = true
},
toDetail(record) {
if (!record) return
// let path = `/residentWX/screening/firstDetail/${record.id}`
......@@ -123,7 +202,16 @@ export default {
// path = `/residentWX/screening/SecondDetail/${record.id}`
// }
// this.$router.push({ path })
},
dateHandle() {
if (this.rangeDate && this.rangeDate.length) {
this.form.startDate = this.rangeDate[0]
this.form.endDate = this.rangeDate[1]
return
}
this.form.startDate = undefined
this.form.endDate = undefined
},
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment