改个名字
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="AddGetway">
|
||||
<div class="getewayAdd">
|
||||
<div class="tips">请确保以下信息全部由本人填写,本人对所填写内容的真实性和完整性负责</div>
|
||||
<!-- 基本信息 -->
|
||||
<div class="title">基本信息</div>
|
||||
@@ -11,7 +11,18 @@
|
||||
<h2>卡口选择</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiSelect v-model="form.gatewayId" :list="getwayData" class="select"></AiSelect>
|
||||
<AiSelect v-model="form.gatewayId" :list="getewayData" class="select"></AiSelect>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>身份证号</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<input placeholder="请输入" type="idcard" v-model="form.idNumber" :maxlength="18" @blur="idNumberChange"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,17 +48,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>身份证号</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<input placeholder="请输入" type="idcard" v-model="form.idNumber" :maxlength="20"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
@@ -121,18 +121,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-item">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
<i>*</i>
|
||||
<h2>出行方式</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiSelect dict="EP_travelType" v-model="form.travelType" class="select"></AiSelect>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-item form-item__imgs">
|
||||
<div class="form-item__wrapper">
|
||||
<div class="form-item__title">
|
||||
@@ -140,7 +128,10 @@
|
||||
<h2>出行方式</h2>
|
||||
</div>
|
||||
<div class="form-item__right">
|
||||
<AiCheckbox style="width: 100%;" v-model="travelType" dict="EP_travelType"/>
|
||||
<!-- <AiCheckbox style="width: 100%;" v-model="travelType" dict="EP_travelType"/> -->
|
||||
<div class="travelType">
|
||||
<div class="travelItem" v-for="(v,index) in travelTypeDict" :key="index" :class="[travelType.includes(v.dictValue)? 'active':'']" @click="travelTypeSelect(v.dictValue)">{{ v.dictName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -347,7 +338,7 @@ export default {
|
||||
contactPatients: '',
|
||||
abnormalHealth: '',
|
||||
abnormalType: '',
|
||||
companionCount: '0', // 同行人数量
|
||||
companionCount: '', // 同行人数量
|
||||
companionList: [], // 同行人集合
|
||||
riskLevel: '1',
|
||||
},
|
||||
@@ -372,26 +363,13 @@ export default {
|
||||
phone: '',
|
||||
}],
|
||||
current: 1,
|
||||
getwayData: [],
|
||||
getewayData: [],
|
||||
flag: false,
|
||||
travelType: [], // 出行方式
|
||||
travelTypeDict: [],
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
startAreaId: {
|
||||
handler(v){
|
||||
if(v?.length) {
|
||||
console.log(v);
|
||||
this.getReskLevel(v)
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
components: {
|
||||
NamePhone,
|
||||
},
|
||||
@@ -401,9 +379,15 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
onLoad() {
|
||||
onLoad(o) {
|
||||
if(o) {
|
||||
this.form.id = o?.id;
|
||||
this.form.gatewayId = o?.gatewayId
|
||||
this.getInfo(o.id)
|
||||
}
|
||||
this.$areaId = this.user.$areaId
|
||||
this.getwayList()
|
||||
this.travelTypeDict = this.$dict.getDict('EP_travelType')
|
||||
this.getewayList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -426,14 +410,36 @@ export default {
|
||||
this.form.arriveTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
|
||||
},
|
||||
|
||||
travelTypeSelect(value) {
|
||||
const index = this.travelType.indexOf(value)
|
||||
if (index === -1) {
|
||||
this.travelType.push(value)
|
||||
} else {
|
||||
this.travelType.splice(index, 1)
|
||||
}
|
||||
},
|
||||
|
||||
getInfo(id) {
|
||||
this.$instance.post(`/app/appepidemicpreventionregisterinfo/queryDetailById?id=${id}`).then(res => {
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
this.people = res.data.companionList
|
||||
this.travelType = res.data.travelType?.split(',')
|
||||
this.form.startTime = res.data.startTime.substr(0, res.data.startTime.length - 3)
|
||||
this.form.arriveTime = res.data.arriveTime.substr(0, res.data.arriveTime.length - 3)
|
||||
}
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
// 获取卡口列表
|
||||
getwayList() {
|
||||
getewayList() {
|
||||
this.$instance.post(`/app/appepidemicpreventiongateway/list`, null, {
|
||||
current: this.current,
|
||||
size: 300,
|
||||
}).then(res => {
|
||||
if(res?.data) {
|
||||
this.getwayData = res.data.records.map(item=> {
|
||||
this.getewayData = res.data.records.map(item=> {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id
|
||||
@@ -443,12 +449,25 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 获取风险等级
|
||||
getReskLevel(id) {
|
||||
this.$instance.post(`/app/appepidemicpreventionriskarea/queryAreaRiskLevel`,null, {
|
||||
areaId: id,
|
||||
idNumberChange(e) {
|
||||
if(e.detail) {
|
||||
this.getOwnerInfo(e.detail.value)
|
||||
}
|
||||
},
|
||||
|
||||
// 获取个人信息
|
||||
getOwnerInfo(idNumber) {
|
||||
this.$instance.post(`/app/appepidemicpreventionregisterinfo/list`, null, {
|
||||
params: {
|
||||
idNumber: idNumber,
|
||||
current: this.current,
|
||||
size: 10,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if(res?.data) {
|
||||
this.form.name = res.data.records?.[0].name
|
||||
this.form.phone = res.data.records?.[0].phone
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -550,6 +569,17 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.form.companionCount) {
|
||||
this.form.companionCount = 0
|
||||
this.form.companionList = []
|
||||
} else {
|
||||
if(this.people.length != this.form.companionCount) {
|
||||
this.$u.toast('请输入完整的同行人信息')
|
||||
} else {
|
||||
this.form.companionList = this.people
|
||||
}
|
||||
}
|
||||
|
||||
if (this.flag) return
|
||||
this.flag = true
|
||||
|
||||
@@ -557,7 +587,6 @@ export default {
|
||||
this.$instance.post(`/app/appepidemicpreventionregisterinfo/addOrUpdate`, {
|
||||
...this.form,
|
||||
travelType: this.travelType.toString(),
|
||||
companionList: this.people,
|
||||
startTime: this.form.startTime + ':00',
|
||||
arriveTime: this.form.arriveTime + ':00',
|
||||
}).then(res => {
|
||||
@@ -567,7 +596,7 @@ export default {
|
||||
uni.$emit('update')
|
||||
this.$toast('提交成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
uni.reLaunch({url:'./AppgetewayRegister'})
|
||||
}, 400)
|
||||
}
|
||||
})
|
||||
@@ -577,7 +606,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.AddGetway {
|
||||
.getewayAdd {
|
||||
padding-bottom: 140px;
|
||||
|
||||
.tips {
|
||||
@@ -728,6 +757,28 @@ export default {
|
||||
margin-right: 8px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.travelType {
|
||||
width: 100%;
|
||||
.travelItem {
|
||||
width: 100%;
|
||||
line-height: 1.3;
|
||||
padding: 20px 32px;
|
||||
margin-bottom: 16px;
|
||||
text-align: center;
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16px;
|
||||
color: #333333;
|
||||
font-size: 28px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.active {
|
||||
background: #4181FF;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="DetailGetway" v-if="pageShow">
|
||||
<div class="getewayDetail" v-if="pageShow">
|
||||
<div class="detail-header">
|
||||
<h2>{{ info.name }}的返乡登记信息</h2>
|
||||
<div class="item-info">
|
||||
@@ -186,7 +186,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-wrapper" v-if="info.handleType == 0">
|
||||
<div class="btn" @click="toEdit" hover-class="text-hover">编辑</div>
|
||||
<div class="btn" @click="$linkTo(`./AddGetway?id=${info.id}`)" hover-class="text-hover">编辑</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -226,15 +226,10 @@ export default {
|
||||
this.travelType = res.data.travelType?.split(',')
|
||||
this.pageShow = true
|
||||
}
|
||||
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
toEdit() {
|
||||
console.log('编辑');
|
||||
},
|
||||
|
||||
call(phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
@@ -245,7 +240,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.DetailGetway {
|
||||
.getewayDetail {
|
||||
padding-bottom: 150px;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -357,7 +352,7 @@ export default {
|
||||
}
|
||||
|
||||
.companionList {
|
||||
padding: 16px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
u-table {
|
||||
Reference in New Issue
Block a user