核酸采样,社区管理
This commit is contained in:
@@ -1,63 +1,48 @@
|
||||
<template>
|
||||
<div class="Add">
|
||||
<p class="title">已采样<span class="num">3</span>次</p>
|
||||
<p class="title">已采样<span class="num">{{info.nucleicAcidSamplingCount}}</span>次</p>
|
||||
<div class="item mar-b16">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>管理区域
|
||||
</div>
|
||||
<div class="value">
|
||||
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #666" selectRoot>
|
||||
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
|
||||
<span v-else class="color-999">请选择</span>
|
||||
<u-icon name="arrow-right" color="#999" size="16" style="margin-left: 4px" />
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
<div class="value">{{info.areaName}}</div>
|
||||
</div>
|
||||
<div class="info mar-b16">
|
||||
<div class="item solid">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>管理对象
|
||||
</div>
|
||||
<div class="value">自动获取</div>
|
||||
<div class="value">{{info.name}}</div>
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>身份证号
|
||||
</div>
|
||||
<div class="value">自动获取</div>
|
||||
<div class="value">{{info.idNumber}}</div>
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>手机号码
|
||||
</div>
|
||||
<div class="value">自动获取</div>
|
||||
<div class="value">{{info.phone}}</div>
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>居家状态
|
||||
</div>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<u-icon name="arrow-right" color="#999" size="16" style="margin-left: 4px" />
|
||||
</div>
|
||||
<div class="value">{{ $dict.getLabel('EP_homeStatus2', info.homeStatus)}}</div>
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>隔离时间
|
||||
</div>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<u-icon name="arrow-right" color="#999" size="16" style="margin-left: 4px" />
|
||||
</div>
|
||||
<div class="value">{{info.quarantineBeginTime}}至{{info.quarantineEndTime}}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>隔离策略
|
||||
</div>
|
||||
<div class="value">
|
||||
<span class="color-999">请选择</span>
|
||||
<u-icon name="arrow-right" color="#999" size="16" style="margin-left: 4px" />
|
||||
</div>
|
||||
<div class="value">{{ $dict.getLabel('EP_quarantineStrategy', info.quarantineStrategy)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info mar-b16">
|
||||
@@ -65,25 +50,33 @@
|
||||
<div class="label">
|
||||
<span class="tips">*</span>采样人员
|
||||
</div>
|
||||
<div class="value">自动获取</div>
|
||||
<div class="value">
|
||||
<u-input placeholder="请输入" input-align="right" height="32" maxlength="6" v-model="form.createUserName" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>联系方式
|
||||
</div>
|
||||
<div class="value">自动获取</div>
|
||||
<div class="value">
|
||||
<u-input placeholder="请输入" type="number" input-align="right" height="32" maxlength="11" v-model="form.createUserPhone" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item solid">
|
||||
<div class="item">
|
||||
<div class="label">
|
||||
<span class="tips">*</span>采样时间
|
||||
</div>
|
||||
<div class="value">自动获取</div>
|
||||
<div class="value" @click="selectTime(form.createTime)">
|
||||
<span :class="form.createTime === '' ? 'color-999' : ''">{{form.createTime || '请选择'}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="24"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-height"></div>
|
||||
<div class="footer">
|
||||
<div class="confirm">保存</div>
|
||||
<div class="confirm" @click="submit">保存</div>
|
||||
</div>
|
||||
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2020" @confirm="dateConfirm"></u-picker>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -91,26 +84,72 @@
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
data() {
|
||||
return {
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
files: []
|
||||
id: '',
|
||||
info: {},
|
||||
form: {
|
||||
createUserName: '',
|
||||
createUserPhone: '',
|
||||
createTime: ''
|
||||
},
|
||||
dateShow: false,
|
||||
deteParams: {year: true, month: true, day: true, hour: true, minute: true, second: true},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.areaId = this.user.areaId
|
||||
this.areaName = this.user.areaName
|
||||
onLoad(option) {
|
||||
this.id = option.id
|
||||
this.$dict.load('EP_homeStatus2', 'EP_quarantineStrategy').then(() => {
|
||||
this.id = option.id
|
||||
this.getDetail()
|
||||
})
|
||||
var myDate = new Date();
|
||||
this.form.createTime = `${myDate.getFullYear()}-${myDate.getMonth()+1}-${myDate.getDate()} ${myDate.getHours()}:${myDate.getMinutes()}:${myDate.getSeconds()}`
|
||||
},
|
||||
onShow() {
|
||||
document.title = '核酸采样'
|
||||
},
|
||||
methods: {
|
||||
areaSelect(e) {
|
||||
this.areaId = e
|
||||
submit() {
|
||||
if(!this.form.createUserName) {
|
||||
return this.$u.toast('请输入采样人员')
|
||||
}
|
||||
if(!this.form.createUserPhone) {
|
||||
return this.$u.toast('请输入联系方式')
|
||||
}
|
||||
if(this.form.createUserPhone && !/^1[0-9]{10,10}$/.test(this.form.createUserPhone)) {
|
||||
return this.$u.toast("请输入正确的手机号码");
|
||||
}
|
||||
if(!this.form.createTime) {
|
||||
return this.$u.toast('请输入采样时间')
|
||||
}
|
||||
this.form.cmId = this.id
|
||||
|
||||
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/nucleicAcidSamplin`, this.form).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('updateDetail')
|
||||
uni.$emit('updateList')
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
selectTime() {
|
||||
this.dateShow = true
|
||||
},
|
||||
dateConfirm(e) {
|
||||
this.form.createTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`
|
||||
},
|
||||
getDetail() {
|
||||
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -13,29 +13,32 @@
|
||||
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
<u-search v-model="keyword" :clearabled="true" placeholder="请输入名称、类型或电话" :show-action="false" bg-color="#F5F5F5"
|
||||
search-icon-color="#999" color="#999" height="58" @search="handerSearch" @clear="handerClear">
|
||||
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名/手机号/身份证号" :show-action="false" bg-color="#F5F5F5"
|
||||
search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="getListInit">
|
||||
</u-search>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
<div class="data-list">
|
||||
<div class="item" @click="toDetail()">
|
||||
<div class="data-list" v-if="list && list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item.id)">
|
||||
<div class="top">
|
||||
<div class="title">
|
||||
<div class="name">
|
||||
李主任
|
||||
<span class="type">返乡登记</span>
|
||||
{{item.name}}
|
||||
<span class="type">{{$dict.getLabel('EP_registerInfoType', item.infoType)}}</span>
|
||||
</div>
|
||||
<div class="status" :class="item.nucleicAcidSamplingCount >0 ? 'status1' : 'status0'">
|
||||
<span class="cir"></span>
|
||||
<span v-if="item.nucleicAcidSamplingCount >0">核酸采样{{item.nucleicAcidSamplingCount}}次</span>
|
||||
<span v-else>核酸未采样</span>
|
||||
</div>
|
||||
<div class="status status0"><span></span>核酸待采样</div>
|
||||
</div>
|
||||
<p>429012********2341</p>
|
||||
<p>1834912340</p>
|
||||
<div class="btn" @click="toAdd()">采样</div>
|
||||
<!-- <img src="./components/img/status-img.png" alt="" class="status-img"> -->
|
||||
<p> {{item.idNumberText}}</p>
|
||||
<p> {{item.phone}}</p>
|
||||
<div class="btn" @click="toAdd()" v-if="item.status != 2">采样</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty> -->
|
||||
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -46,6 +49,9 @@ export default {
|
||||
appName: '核酸采样',
|
||||
data() {
|
||||
return {
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
current: 1,
|
||||
keyword: '',
|
||||
currentTabs: 0,
|
||||
tabList: [
|
||||
@@ -64,57 +70,63 @@ export default {
|
||||
},
|
||||
activeStyle: {
|
||||
'font-weight' : '400',
|
||||
}
|
||||
},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
watch: {},
|
||||
onLoad() {
|
||||
this.areaId = this.user.areaId
|
||||
this.areaName = this.user.areaName
|
||||
this.$dict.load('EP_CM_status', 'EP_registerInfoType').then(() => {
|
||||
this.getListInit()
|
||||
})
|
||||
uni.$on('updateList', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '核酸采样'
|
||||
},
|
||||
methods: {
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.list = []
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$http.post('/app/appepidemicreportmember/list', null, {
|
||||
params: { size: this.size, current: this.current, status: this.currentTabs == 1 ? '0' : '', areaId: this.areaId, name: this.keyword },
|
||||
this.$http.post('/app/appepidemicpreventioncommunitymanagement/list', null, {
|
||||
params: { size: 10, current: this.current, queryType: this.currentTabs, areaId: this.areaId, name: this.keyword},
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
|
||||
res.data.records.map((item) => {
|
||||
item.idNumberText = item.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
|
||||
})
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail() {
|
||||
uni.navigateTo({url: './Detail'})
|
||||
toDetail(id) {
|
||||
uni.navigateTo({url: `./Detail?id=${id}`})
|
||||
},
|
||||
toAdd() {
|
||||
uni.navigateTo({url: './Add'})
|
||||
toEdit(id) {
|
||||
uni.navigateTo({url: `./Add?id=${id}`})
|
||||
},
|
||||
change(index) {
|
||||
this.keyword = ''
|
||||
this.currentTabs = index
|
||||
this.getListInit()
|
||||
},
|
||||
areaSelect(e) {
|
||||
this.areaId = e
|
||||
this.getList()
|
||||
},
|
||||
|
||||
handerSearch(e) {
|
||||
this.keyword = e
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
|
||||
handerClear() {
|
||||
this.keyword = ''
|
||||
this.current = 1
|
||||
this.getList()
|
||||
this.getListInit()
|
||||
},
|
||||
typeConfirm(e) {
|
||||
this.infoType = e[0].value
|
||||
this.getListInit()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
@@ -179,7 +191,7 @@ export default {
|
||||
line-height: 20px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
span {
|
||||
.cir {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
@@ -189,13 +201,13 @@ export default {
|
||||
}
|
||||
.status0 {
|
||||
color: #FFA938;
|
||||
span {
|
||||
.cir {
|
||||
background-color: #FFA938;
|
||||
}
|
||||
}
|
||||
.status0 {
|
||||
color: #1CCEB0;
|
||||
span {
|
||||
.cir {
|
||||
background-color: #1CCEB0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<div class="title">基本信息</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">管理区域</div>
|
||||
<div class="value">{{info.name}}</div>
|
||||
<div class="value">{{info.areaName}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">管理对象</div>
|
||||
<div class="value">{{info.idNumber}}</div>
|
||||
<div class="value">{{info.name}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">身份证号</div>
|
||||
<div class="value">{{info.idNumber}}</div>
|
||||
<div class="value">{{info.idNumberText}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">手机号码</div>
|
||||
@@ -22,30 +22,31 @@
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">居家状态</div>
|
||||
<div class="value">{{info.idNumber}}</div>
|
||||
<div class="value">{{$dict.getLabel('EP_homeStatus2', info.homeStatus)}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">隔离时间</div>
|
||||
<div class="value">{{info.idNumber}}</div>
|
||||
<div class="value">{{info.quarantineBeginTime}}至{{info.quarantineEndTime}}</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">隔离策略</div>
|
||||
<div class="value">{{info.idNumber}}</div>
|
||||
<div class="value">{{$dict.getLabel('EP_quarantineStrategy', info.quarantineStrategy)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-bg"></div>
|
||||
<div class="info">
|
||||
<div class="title">核酸采集信息(已采样<span style="color:#f46;">3</span>次)</div>
|
||||
<div class="info" v-if="info.nucleicAcidSamplingCount>0">
|
||||
<div class="title">核酸采集信息(已采样<span style="color:#f46;">{{info.nucleicAcidSamplingCount}}</span>次)</div>
|
||||
<div class="error-list">
|
||||
<div class="item">
|
||||
<div class="item" v-for="(item, index) in info.nucleicAcidSamplingList" :key="index">
|
||||
<div>
|
||||
<span>采样人:张三</span>
|
||||
<span>联系方式:18164065622</span>
|
||||
<span>采样人:{{item.createUserName}}</span>
|
||||
<span>联系方式:{{item.createUserPhone}}</span>
|
||||
</div>
|
||||
<p>采样时间:2022-09-22 16:06:59</p>
|
||||
<p>采样时间:{{item.createTime}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" v-if="info.status != 0" @click="toAdd">采样</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -57,7 +58,6 @@ export default {
|
||||
return {
|
||||
id: '',
|
||||
info: {},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
@@ -65,36 +65,25 @@ export default {
|
||||
document.title = '采样信息'
|
||||
},
|
||||
onLoad(option) {
|
||||
// this.$dict.load('epidemicRecentPersonType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth').then(() => {
|
||||
// this.id = option.id
|
||||
// this.getDetail()
|
||||
// this.getList()
|
||||
// })
|
||||
// uni.$on('updateDetail', () => {
|
||||
// this.getList()
|
||||
// this.getDetail()
|
||||
// })
|
||||
this.$dict.load('EP_homeStatus2', 'EP_quarantineStrategy').then(() => {
|
||||
this.id = option.id
|
||||
this.getDetail()
|
||||
})
|
||||
uni.$on('updateDetail', () => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http.post(`/app/appepidemicunusuallog/list?recordId=${this.id}`).then((res) => {
|
||||
getDetail() {
|
||||
this.$http.post(`/app/appepidemicpreventioncommunitymanagement/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.list = res.data.records
|
||||
this.info = res.data
|
||||
this.info.idNumberText = res.data.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
this.$http.post(`/app/appepidemicbackhomerecord/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
if(res.data.checkTime) {
|
||||
res.data.checkTime = res.data.checkTime.substring(0, 10)
|
||||
}
|
||||
this.info = res.data
|
||||
this.info.checkPhoto = JSON.parse(this.info.checkPhoto)
|
||||
this.info.health = this.info.health.split(',')
|
||||
this.info.idNumber = res.data.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
|
||||
}
|
||||
})
|
||||
toAdd() {
|
||||
uni.navigateTo({ url: `./Add?id=${this.id}` })
|
||||
},
|
||||
callPhone(phone) {
|
||||
uni.makePhoneCall({phoneNumber: phone})
|
||||
@@ -105,8 +94,8 @@ export default {
|
||||
current: img
|
||||
})
|
||||
},
|
||||
toError() {
|
||||
uni.navigateTo({url: `./ErrorInfo?id=${this.id}`})
|
||||
toEdit() {
|
||||
uni.navigateTo({url: `./Add?id=${this.id}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user