3 changed files with 1140 additions and 0 deletions
@ -0,0 +1,278 @@ |
|||
<template> |
|||
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
|||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
|||
<el-form-item label="客户Id customer.id" prop="customerId"> |
|||
<el-input v-model="dataForm.customerId" placeholder="客户Id customer.id"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="网格ID" prop="gridId"> |
|||
<el-input v-model="dataForm.gridId" placeholder="网格ID"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="网格名称" prop="gridName"> |
|||
<el-input v-model="dataForm.gridName" placeholder="网格名称"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="组织Id" prop="agencyId"> |
|||
<el-input v-model="dataForm.agencyId" placeholder="组织Id"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="组织的pids" prop="pids"> |
|||
<el-input v-model="dataForm.pids" placeholder="组织的pids"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属小区ID;" prop="villageId"> |
|||
<el-input v-model="dataForm.villageId" placeholder="所属小区ID;"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属小区名称" prop="villageName"> |
|||
<el-input v-model="dataForm.villageName" placeholder="所属小区名称"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属楼宇Id" prop="buildId"> |
|||
<el-input v-model="dataForm.buildId" placeholder="所属楼宇Id"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属楼宇名称" prop="buildName"> |
|||
<el-input v-model="dataForm.buildName" placeholder="所属楼宇名称"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="单元id" prop="unitId"> |
|||
<el-input v-model="dataForm.unitId" placeholder="单元id"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="单元名" prop="unitName"> |
|||
<el-input v-model="dataForm.unitName" placeholder="单元名"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属家庭Id" prop="homeId"> |
|||
<el-input v-model="dataForm.homeId" placeholder="所属家庭Id"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="房间名" prop="homeName"> |
|||
<el-input v-model="dataForm.homeName" placeholder="房间名"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="户口性质:0户籍 1外来" prop="householdType"> |
|||
<el-input v-model="dataForm.householdType" placeholder="户口性质:0户籍 1外来"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input v-model="dataForm.name" placeholder="姓名"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="联系电话" prop="mobile"> |
|||
<el-input v-model="dataForm.mobile" placeholder="联系电话"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="身份证号" prop="idCard"> |
|||
<el-input v-model="dataForm.idCard" placeholder="身份证号"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="是否接种:0否1是" prop="isVaccination"> |
|||
<el-input v-model="dataForm.isVaccination" placeholder="是否接种:0否1是"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第一次接种时间" prop="firstVacTime"> |
|||
<el-input v-model="dataForm.firstVacTime" placeholder="第一次接种时间"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第一次接种地点" prop="firstVacSite"> |
|||
<el-input v-model="dataForm.firstVacSite" placeholder="第一次接种地点"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第二次接种时间" prop="secondVacTime"> |
|||
<el-input v-model="dataForm.secondVacTime" placeholder="第二次接种时间"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第二次接种地点" prop="secondVacSite"> |
|||
<el-input v-model="dataForm.secondVacSite" placeholder="第二次接种地点"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第三次接种时间" prop="thirdVacTime"> |
|||
<el-input v-model="dataForm.thirdVacTime" placeholder="第三次接种时间"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第三次接种地点" prop="thirdVacSite"> |
|||
<el-input v-model="dataForm.thirdVacSite" placeholder="第三次接种地点"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="原因:禁忌症/拒绝接种/其他原因" prop="reason"> |
|||
<el-input v-model="dataForm.reason" placeholder="原因:禁忌症/拒绝接种/其他原因"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="dataForm.note" placeholder="备注"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="删除标识 0.未删除 1.已删除" prop="delFlag"> |
|||
<el-input v-model="dataForm.delFlag" placeholder="删除标识 0.未删除 1.已删除"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="乐观锁" prop="revision"> |
|||
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="创建人" prop="createdBy"> |
|||
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="创建时间" prop="createdTime"> |
|||
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="更新人" prop="updatedBy"> |
|||
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="更新时间" prop="updatedTime"> |
|||
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<template slot="footer"> |
|||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|||
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import debounce from 'lodash/debounce' |
|||
|
|||
export default { |
|||
data () { |
|||
return { |
|||
visible: false, |
|||
dataForm: { |
|||
id: '', |
|||
customerId: '', |
|||
gridId: '', |
|||
gridName: '', |
|||
agencyId: '', |
|||
pids: '', |
|||
villageId: '', |
|||
villageName: '', |
|||
buildId: '', |
|||
buildName: '', |
|||
unitId: '', |
|||
unitName: '', |
|||
homeId: '', |
|||
homeName: '', |
|||
householdType: '', |
|||
name: '', |
|||
mobile: '', |
|||
idCard: '', |
|||
isVaccination: '', |
|||
firstVacTime: '', |
|||
firstVacSite: '', |
|||
secondVacTime: '', |
|||
secondVacSite: '', |
|||
thirdVacTime: '', |
|||
thirdVacSite: '', |
|||
reason: '', |
|||
note: '', |
|||
checkState: '0', |
|||
checkReason: '' |
|||
} |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return { |
|||
customerId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
gridId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
gridName: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
agencyId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
pids: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
villageId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
villageName: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
buildId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
buildName: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
unitId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
unitName: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
homeId: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
homeName: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
householdType: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
name: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
mobile: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
idCard: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
isVaccination: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
firstVacTime: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
firstVacSite: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
secondVacTime: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
secondVacSite: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
thirdVacTime: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
thirdVacSite: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
reason: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
], |
|||
note: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
init () { |
|||
this.visible = true; |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].resetFields() |
|||
if (this.dataForm.id); { |
|||
this.getInfo() |
|||
} |
|||
}) |
|||
}, |
|||
// 获取信息 |
|||
getInfo () { |
|||
this.$http.get(`/epmetuser/icVaccinePrarmeter/${this.dataForm.id}`).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
;return this.$message.error(res.msg); |
|||
} |
|||
this.dataForm = { |
|||
...this.dataForm, |
|||
...res.data |
|||
} |
|||
}).catch(() => {}) |
|||
}, |
|||
// 表单提交 |
|||
dataFormSubmitHandle: debounce(function () { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (!valid); { |
|||
return false |
|||
} |
|||
this.$http[!this.dataForm.id ? 'post' : 'put']('/epmetuser/icVaccinePrarmeter/', this.dataForm).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg); |
|||
} |
|||
this.$message({ |
|||
message: this.$t('prompt.success'), |
|||
type: 'success', |
|||
duration: 500, |
|||
onClose: () => { |
|||
this.visible = false; |
|||
this.$emit('refreshDataList') |
|||
} |
|||
}) |
|||
}).catch(() => {}) |
|||
}) |
|||
}, 1000, { 'leading': true, 'trailing': false }) |
|||
} |
|||
} |
|||
</script> |
|||
@ -0,0 +1,192 @@ |
|||
<template> |
|||
<el-dialog :visible.sync="visible" title="审核" :close-on-click-modal="false" :close-on-press-escape="false"> |
|||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
|||
<el-form-item label="网格名称" prop="gridName"> |
|||
<el-input v-model="dataForm.gridName" placeholder="网格名称" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属小区名称" prop="villageName"> |
|||
<el-input v-model="dataForm.villageName" placeholder="所属小区名称" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="所属楼宇名称" prop="buildName"> |
|||
<el-input v-model="dataForm.buildName" placeholder="所属楼宇名称" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="单元名" prop="unitName"> |
|||
<el-input v-model="dataForm.unitName" placeholder="单元名" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="房间名" prop="homeName"> |
|||
<el-input v-model="dataForm.homeName" placeholder="房间名" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="户口性质:0户籍 1外来" prop="householdType"> |
|||
<el-input v-model="dataForm.householdType" placeholder="户口性质:0户籍 1外来" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input v-model="dataForm.name" placeholder="姓名" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="联系电话" prop="mobile"> |
|||
<el-input v-model="dataForm.mobile" placeholder="联系电话" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="身份证号" prop="idCard"> |
|||
<el-input v-model="dataForm.idCard" placeholder="身份证号" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="是否接种:0否1是" prop="isVaccination"> |
|||
<el-input v-model="dataForm.isVaccination" placeholder="是否接种:0否1是" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第一次接种时间" prop="firstVacTime"> |
|||
<el-input v-model="dataForm.firstVacTime" placeholder="第一次接种时间" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第一次接种地点" prop="firstVacSite"> |
|||
<el-input v-model="dataForm.firstVacSite" placeholder="第一次接种地点" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第二次接种时间" prop="secondVacTime"> |
|||
<el-input v-model="dataForm.secondVacTime" placeholder="第二次接种时间" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第二次接种地点" prop="secondVacSite"> |
|||
<el-input v-model="dataForm.secondVacSite" placeholder="第二次接种地点" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第三次接种时间" prop="thirdVacTime"> |
|||
<el-input v-model="dataForm.thirdVacTime" placeholder="第三次接种时间" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="第三次接种地点" prop="thirdVacSite"> |
|||
<el-input v-model="dataForm.thirdVacSite" placeholder="第三次接种地点" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="原因" prop="reason"> |
|||
<el-input v-model="dataForm.reason" placeholder="原因" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="dataForm.note" placeholder="备注" disabled></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="审核状态" prop="checkState"> |
|||
<el-input v-model="dataForm.checkState" placeholder="审核状态"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="审核理由" prop="checkReason"> |
|||
<el-input v-model="dataForm.checkReason" placeholder="审核理由"></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<template slot="footer"> |
|||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|||
<el-button type="danger" @click="checkHandle('1')">{{ $t('checkBTGBtn') }}</el-button> |
|||
<el-button type="danger" @click="showAddHouse">{{ $t('checkTGBtn') }}</el-button> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import debounce from 'lodash/debounce' |
|||
|
|||
export default { |
|||
data () { |
|||
return { |
|||
visible: false, |
|||
dataForm: { |
|||
id: '', |
|||
isAdd: '', |
|||
customerId: '', |
|||
gridId: '', |
|||
gridName: '', |
|||
agencyId: '', |
|||
pids: '', |
|||
villageId: '', |
|||
villageName: '', |
|||
buildId: '', |
|||
buildName: '', |
|||
unitId: '', |
|||
unitName: '', |
|||
homeId: '', |
|||
homeName: '', |
|||
householdType: '', |
|||
name: '', |
|||
mobile: '', |
|||
idCard: '', |
|||
isVaccination: '', |
|||
firstVacTime: '', |
|||
firstVacSite: '', |
|||
secondVacTime: '', |
|||
secondVacSite: '', |
|||
thirdVacTime: '', |
|||
thirdVacSite: '', |
|||
reason: '', |
|||
note: '', |
|||
checkState: '', |
|||
checkReason: '' |
|||
}, |
|||
isAdd: '', |
|||
unitId: '' |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule () { |
|||
return {} |
|||
} |
|||
}, |
|||
methods: { |
|||
init () { |
|||
this.visible = true; |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].resetFields() |
|||
if (this.dataForm.id); { |
|||
this.getInfo() |
|||
} |
|||
}) |
|||
}, |
|||
// 获取信息 |
|||
getInfo () { |
|||
this.$http.get(`/epmetuser/icVaccinePrarmeter/${this.dataForm.id}`).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
;return this.$message.error(res.msg); |
|||
} |
|||
this.dataForm = { |
|||
...this.dataForm, |
|||
...res.data |
|||
} |
|||
}).catch(() => {}) |
|||
}, |
|||
showAddHouse () { |
|||
if (this.isAdd === '1') { |
|||
// 打开房屋新增页面 |
|||
// todo |
|||
// this.addHouseShow = true |
|||
// this.$nextTick(() => { |
|||
// this.$refs.ref_form.initForm('add', null, this.dataForm.id) |
|||
// }) |
|||
} else { |
|||
this.checkHandle('2') |
|||
} |
|||
}, |
|||
// 审核提交方法 |
|||
checkHandle (type) { |
|||
const params = { |
|||
id: this.dataForm.id, |
|||
checkState: type, // 0-未审核 1-未通过 2-已通过 |
|||
checkReason: '', |
|||
buildingUnitId: this.unitId || '', |
|||
doorName: this.dataForm.homeName || '' |
|||
} |
|||
if (type == '1') { |
|||
this.$prompt('请输入不通过的原因', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(({ value }) => { |
|||
params.checkReason = value |
|||
this.$http.post('/epmetuser/icresicollect/collectCheck', params).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} |
|||
this.visible = false; |
|||
this.$emit('refreshDataList') |
|||
}).catch(() => {}) |
|||
}).catch(() => { |
|||
// 取消输入原因 |
|||
}) |
|||
} else { |
|||
this.$http.post('/epmetuser/icresicollect/collectCheck', params).then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} |
|||
this.visible = false; |
|||
this.$emit('refreshDataList') |
|||
}).catch(() => {}) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
@ -0,0 +1,670 @@ |
|||
<template> |
|||
<div class="resi-container"> |
|||
<el-card ref="searchCard" class="search-card"> |
|||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
|||
<div> |
|||
<el-form-item prop="gridId" label="所属网格" label-width="70px"> |
|||
<div class="resi-cell-value"> |
|||
<el-select |
|||
v-model.trim="dataForm.gridId" |
|||
placeholder="请选择网格" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@change="handleChangeGrid" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsG" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</div> |
|||
</el-form-item> |
|||
<el-form-item label="所属房屋"> |
|||
<div class="resi-cell-value"> |
|||
<div class="resi-cell-col"> |
|||
<el-form-item prop="villageId"> |
|||
<el-select |
|||
v-model.trim="dataForm.villageId" |
|||
placeholder="请选择小区" |
|||
size="small" |
|||
clearable |
|||
class="resi-cell-select" |
|||
@change="handleChangeV" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsV" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="buildId"> |
|||
<el-select |
|||
v-model.trim="dataForm.buildId" |
|||
placeholder="楼号" |
|||
size="small" |
|||
clearable |
|||
:disabled="changeVDisabled" |
|||
class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeB" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsB" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="unitId"> |
|||
<el-select |
|||
v-model.trim="dataForm.unitId" |
|||
placeholder="单元" |
|||
size="small" |
|||
clearable |
|||
:disabled="changeBDisabled" |
|||
class="resi-cell-select resi-cell-select-middle" |
|||
@change="handleChangeD" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsD" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item prop="homeId"> |
|||
<el-select |
|||
v-model.trim="dataForm.homeId" |
|||
placeholder="房号" |
|||
size="small" |
|||
clearable |
|||
:disabled="changeDDisabled" |
|||
class="resi-cell-select resi-cell-select-middle" |
|||
> |
|||
<el-option |
|||
v-for="item in optionsH" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</div> |
|||
</div> |
|||
</el-form-item> |
|||
</div> |
|||
<div> |
|||
<el-form-item label="姓名" prop="name" label-width="70px"> |
|||
<el-input |
|||
v-model="dataForm.name" |
|||
placeholder="姓名" |
|||
clearable |
|||
></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="身份证号" prop="idCard"> |
|||
<el-input |
|||
v-model="dataForm.idCard" |
|||
placeholder="身份证号" |
|||
clearable |
|||
></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="联系电话" prop="mobile"> |
|||
<el-input |
|||
v-model="dataForm.mobile" |
|||
placeholder="联系电话" |
|||
clearable |
|||
></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="是否接种" prop="isVaccination"> |
|||
<el-select v-model="dataForm.isVaccination" placeholder="是否接种" clearable> |
|||
<el-option v-for="item in isVaccinationArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button class="diy-button--search" size="small" @click="getDataList()">{{ $t('query') }}</el-button> |
|||
<el-button class="diy-button--reset" size="small" @click="resetForm()">重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</div> |
|||
</el-form> |
|||
</el-card> |
|||
<el-card class="resi-card-table"> |
|||
<div class="resi-row-btn"> |
|||
|
|||
<el-button class="diy-button--add" type="primary" size="small" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> |
|||
<el-button class="diy-button--export" size="small" @click="handleExportModule()">下载模板</el-button> |
|||
<el-upload |
|||
ref="upload" |
|||
class="upload-btn" |
|||
:multiple="false" |
|||
:show-file-list="false" |
|||
:before-upload=" |
|||
(file) => { |
|||
beforeUpload(file); |
|||
} |
|||
" |
|||
action="" |
|||
accept=".xls,.xlsx" |
|||
:http-request=" |
|||
() => { |
|||
uploadFile(); |
|||
} |
|||
" |
|||
> |
|||
<el-button |
|||
size="small" |
|||
class="diy-button--delete">导入</el-button> |
|||
</el-upload> |
|||
<el-button class="diy-button--reset" size="small" @click="handleExport">导出</el-button> |
|||
</div> |
|||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" |
|||
style="width: 100%;" class="resi-table"> |
|||
<el-table-column label="序号" header-align="center" align="center" width="50px"> |
|||
<template slot-scope="scope"> |
|||
{{scope.$index+1}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="gridName" label="网格名称" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="villageName" label="所属小区名称" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="buildName" label="所属楼宇名称" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="unitName" label="单元名" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="homeName" label="房间名" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="householdTypeName" label="户口性质" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="name" label="姓名" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="idCard" label="身份证号" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="isVaccinationName" label="是否接种" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="firstVacTime" label="第一次接种时间" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="firstVacSite" label="第一次接种地点" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="secondVacTime" label="第二次接种时间" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="secondVacSite" label="第二次接种地点" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="thirdVacTime" label="第三次接种时间" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="thirdVacSite" label="第三次接种地点" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="reason" label="原因" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="note" label="备注" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="checkStateName" label="审核状态" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="checkReason" label="审核理由" header-align="center" align="center" width="80" show-overflow-tooltip></el-table-column> |
|||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
|||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
|||
<el-button v-if="scope.row.checkState === '0'" type="text" class="div-table-button--detail" size="small" |
|||
@click="handleWatch(scope.row)">审核</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination |
|||
:current-page="page" |
|||
:page-sizes="[10, 20, 50, 100]" |
|||
:page-size="limit" |
|||
:total="total" |
|||
layout="total, sizes, prev, pager, next, jumper" |
|||
@size-change="pageSizeChangeHandle" |
|||
@current-change="pageCurrentChangeHandle"> |
|||
</el-pagination> |
|||
<!-- 弹窗, 新增 / 修改 --> |
|||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
|||
<icvaccineprarmeter-check v-if="checkVisible" ref="checkPage" @refreshDataList="getDataList"></icvaccineprarmeter-check> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import mixinViewModule from '@/mixins/view-module' |
|||
import AddOrUpdate from './icvaccineprarmeter-add-or-update' |
|||
import nextTick from "dai-js/tools/nextTick"; |
|||
import { requestPost } from "@/js/dai/request"; |
|||
import IcvaccineprarmeterCheck from './icvaccineprarmeter-check' |
|||
export default { |
|||
mixins: [mixinViewModule], |
|||
data () { |
|||
return { |
|||
mixinViewModuleOptions: { |
|||
getDataListURL: '/epmetuser/icVaccinePrarmeter/page', |
|||
getDataListIsPage: true, |
|||
deleteURL: '/epmetuser/icVaccinePrarmeter', |
|||
deleteIsBatch: true |
|||
}, |
|||
dataForm: { |
|||
id: '', |
|||
gridId: '', |
|||
villageId: '', |
|||
buildId: '', |
|||
unitId: '', |
|||
homeId: '', |
|||
name: '', |
|||
idCard: '', |
|||
mobile: '', |
|||
isVaccination: '' |
|||
}, |
|||
isVaccinationArr: [ |
|||
{ dictValue: '0', dictName: '否' }, |
|||
{ dictValue: '1', dictName: '是' } |
|||
], |
|||
optionsV: [], |
|||
optionsB: [], |
|||
optionsH: [], |
|||
optionsD: [], |
|||
optionsG: [], |
|||
checkVisible: false |
|||
} |
|||
}, |
|||
components: { |
|||
AddOrUpdate, |
|||
IcvaccineprarmeterCheck |
|||
}, |
|||
computed:{ |
|||
changeVDisabled() { |
|||
return !this.dataForm.villageId |
|||
}, |
|||
changeBDisabled() { |
|||
return !this.dataForm.buildId |
|||
}, |
|||
changeDDisabled() { |
|||
return !this.dataForm.unitId |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.getGridList() |
|||
this.getValiheList() |
|||
}, |
|||
methods:{ |
|||
// 审核 |
|||
async handleWatch(row) { |
|||
await nextTick(); |
|||
const url = "/gov/org/ichouse/checkHomeInfo"; |
|||
|
|||
const { data, code, msg } = await requestPost(url, { |
|||
gridId: row.gridId, |
|||
gridName: row.gridName, |
|||
villageName: row.villageName, |
|||
buildName: row.buildName, |
|||
unitName: row.unitName, |
|||
homeName: row.homeName, |
|||
}); |
|||
|
|||
if (code === 0) { |
|||
console.log("data----de", data); |
|||
if(data.code === '1'){ |
|||
this.$message.success(data.msg); |
|||
}else{ |
|||
// 打开审核页面 |
|||
this.checkVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs.checkPage.dataForm.id = row.id |
|||
// 是否新增房屋:0:否;1:是 |
|||
this.$refs.checkPage.isAdd = data.isAdd |
|||
// 单元ID |
|||
this.$refs.checkPage.unitId = data.unitId |
|||
this.$refs.checkPage.init() |
|||
}) |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} else { |
|||
this.$message.success("操作失败!"); |
|||
} |
|||
}, |
|||
handleClearVillage() { |
|||
this.dataForm.buildId = '' |
|||
this.dataForm.homeId = '' |
|||
}, |
|||
handleClearBuild() { |
|||
this.dataForm.buildId = '' |
|||
this.dataForm.unitId = '' |
|||
this.dataForm.homeId = '' |
|||
}, |
|||
handleClearDan() { |
|||
this.dataForm.unitId = '' |
|||
this.dataForm.homeId = '' |
|||
}, |
|||
handleChangeGrid(val) { |
|||
console.log('val', val) |
|||
this.dataForm.villageId = '' |
|||
this.dataForm.buildId = '' |
|||
this.dataForm.unitId = '' |
|||
this.dataForm.homeId = '' |
|||
this.getValiheList() |
|||
}, |
|||
handleChangeV(val) { |
|||
console.log('val', val) |
|||
this.dataForm.buildId = '' |
|||
this.dataForm.unitId = '' |
|||
this.dataForm.homeId = '' |
|||
this.getBuildList() |
|||
}, |
|||
handleChangeB(val) { |
|||
console.log('val', val) |
|||
this.dataForm.unitId = '' |
|||
this.dataForm.homeId = '' |
|||
this.getUniList() |
|||
}, |
|||
handleChangeD(val) { |
|||
console.log('val', val) |
|||
this.dataForm.homeId = '' |
|||
this.getHouseList() |
|||
}, |
|||
|
|||
getGridList() { |
|||
const { user } = this.$store.state |
|||
this.$http |
|||
.post('/gov/org/customergrid/gridoption', { |
|||
agencyId: user.agencyId, |
|||
purpose: 'query' |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.optionsG = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
getValiheList() { |
|||
const { user } = this.$store.state |
|||
this.$http |
|||
.post('/gov/org/icneighborhood/neighborhoodoption', { |
|||
gridId: this.dataForm.gridId, |
|||
agencyId: '' |
|||
// agencyId: user.agencyId |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.optionsV = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
getBuildList() { |
|||
this.$http |
|||
.post('/gov/org/icbuilding/buildingoption', { |
|||
neighborHoodId: this.dataForm.villageId |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.optionsB = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
getUniList() { |
|||
this.$http |
|||
.post('/gov/org/icbuildingunit/unitoption', { |
|||
buildingId: this.dataForm.buildId |
|||
}) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.optionsD = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
getHouseList() { |
|||
this.$http |
|||
.post('/gov/org/ichouse/houseoption', { unitId: this.dataForm.unitId }) |
|||
.then(({ data: res }) => { |
|||
if (res.code !== 0) { |
|||
return this.$message.error(res.msg) |
|||
} else { |
|||
console.log('获取查询详情成功', res.data) |
|||
this.optionsH = res.data |
|||
} |
|||
}) |
|||
.catch(() => { |
|||
return this.$message.error('网络错误') |
|||
}) |
|||
}, |
|||
//重置搜索条件 |
|||
resetForm() { |
|||
this.dataForm = { |
|||
gridId: '', |
|||
villageId: '', |
|||
buildId: '', |
|||
unitId: '', |
|||
homeId: '', |
|||
name: '', |
|||
idCard: '', |
|||
mobile: '', |
|||
isVaccination: '' |
|||
}; |
|||
this.pageNo = 1 |
|||
}, |
|||
// 上传文件之前的钩子 |
|||
beforeUpload(file) { |
|||
this.files = file; |
|||
|
|||
const isText = file.type === "application/vnd.ms-excel"; |
|||
const isTextComputer = |
|||
file.type === |
|||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; |
|||
|
|||
if (!isText && !isTextComputer) { |
|||
this.$message.error("请选择正确格式的文件"); |
|||
this.files = null; |
|||
this.fileName = ""; |
|||
return false; |
|||
} else { |
|||
this.fileName = file.name; |
|||
return true; |
|||
} |
|||
}, |
|||
async uploadFile() { |
|||
if (this.fileName == "") { |
|||
this.$message.warning("请选择要上传的文件!"); |
|||
return false; |
|||
} |
|||
|
|||
this.$message({ |
|||
showClose: true, |
|||
message: "导入中,请到系统管理-导入记录中查看进度", |
|||
duration: 0, |
|||
}); |
|||
|
|||
//清空上传列表 |
|||
this.$refs["upload"].clearFiles(); |
|||
let url = ""; |
|||
|
|||
let fileFormData = new FormData(); |
|||
fileFormData.append("file", this.files); //filename是键,file是值,就是要传的文件,test.zip是要传的文件名 |
|||
|
|||
url = "/epmetuser/icVaccinePrarmeter/importFile"; |
|||
|
|||
window.app.ajax.post2( |
|||
url, |
|||
fileFormData, |
|||
(data, rspMsg) => { |
|||
if (data.code === 0 && data.msg == "success") { |
|||
// this.$message.success('导入成功') |
|||
} else { |
|||
// this.$message({ |
|||
// showClose: true, |
|||
// message: rspMsg, |
|||
// duration: 0, |
|||
// type: "error" |
|||
// }) |
|||
// this.$message.error(rspMsg) |
|||
} |
|||
this.loadTable(); |
|||
}, |
|||
(rspMsg, data) => {}, |
|||
{ headers: { "Content-Type": "multipart/form-data" } } |
|||
); |
|||
}, |
|||
//导出表格 |
|||
async handleExport() { |
|||
let title = "新冠病毒疫苗接种人员信息台账"; |
|||
|
|||
const url = "/epmetuser/icVaccinePrarmeter/vaccine-export"; |
|||
|
|||
app.ajax.exportFilePost( |
|||
url, |
|||
this.dataForm, |
|||
(data, rspMsg) => { |
|||
this.download(data, title + ".xlsx"); |
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg); |
|||
} |
|||
); |
|||
}, |
|||
// 下载文件 |
|||
download(data, fileName) { |
|||
if (!data) { |
|||
return; |
|||
} |
|||
|
|||
var csvData = new Blob([data]); |
|||
|
|||
if (window.navigator && window.navigator.msSaveOrOpenBlob) { |
|||
window.navigator.msSaveOrOpenBlob(csvData, fileName); |
|||
} |
|||
else { |
|||
var a = document.createElement("a"); |
|||
document.body.appendChild(a); |
|||
a.style = "display: none"; |
|||
var url = window.URL.createObjectURL(csvData); |
|||
a.href = url; |
|||
a.download = fileName; |
|||
a.click(); |
|||
a.remove(); |
|||
window.URL.revokeObjectURL(url); |
|||
} |
|||
}, |
|||
handleExportModule() { |
|||
let title = "新冠病毒疫苗接种人员信息台账模板"; |
|||
let url = "/epmetuser/icVaccinePrarmeter/exporttemplate"; |
|||
|
|||
let params = {}; |
|||
|
|||
app.ajax.exportFilePost( |
|||
url, |
|||
params, |
|||
(data, rspMsg) => { |
|||
this.download(data, title + ".xls"); |
|||
}, |
|||
(rspMsg, data) => { |
|||
this.$message.error(rspMsg); |
|||
} |
|||
); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import '@/assets/scss/buttonstyle.scss'; |
|||
|
|||
.resi-container .resi-card-table { |
|||
::v-deep .el-table th { |
|||
color: #fff; |
|||
background-color: rgba(33, 149, 254, 1); |
|||
// border-right: 1px solid rgba(33, 149, 254, 1); |
|||
} |
|||
} |
|||
.resi-table { |
|||
::v-deep .el-button--text { |
|||
text-decoration: underline; |
|||
} |
|||
} |
|||
.resi-card-table { |
|||
margin-top: 20px; |
|||
} |
|||
.resi-row-btn { |
|||
margin-bottom: 13px; |
|||
.upload-btn { |
|||
display: inline-block; |
|||
margin: 0 10px; |
|||
} |
|||
} |
|||
|
|||
.resi-btns { |
|||
margin-top: 20px; |
|||
text-align: center; |
|||
} |
|||
|
|||
.resi-container .resi-card { |
|||
position: relative; |
|||
overflow: visible; |
|||
} |
|||
|
|||
.demo-form-inline { |
|||
// display: flex; |
|||
// align-items: center; |
|||
// margin-bottom: 20px; |
|||
|
|||
.resi-cell-label { |
|||
flex-shrink: 0; |
|||
min-width: 0; |
|||
box-sizing: border-box; |
|||
margin-right: 15px; |
|||
// text-align: right; |
|||
// line-height: 32; |
|||
} |
|||
.resi-cell-label1 { |
|||
width: max-content; |
|||
} |
|||
.resi-cell-value-radio { |
|||
display: flex; |
|||
align-items: center; |
|||
min-height: 32px; |
|||
} |
|||
.resi-cell-input { |
|||
width: 200px; |
|||
} |
|||
.resi-cell--daterange { |
|||
max-width: 260px; |
|||
} |
|||
.resi-cell-select { |
|||
width: 200px; |
|||
box-sizing: border-box; |
|||
margin-right: 10px; |
|||
&-middle { |
|||
width: 120px; |
|||
} |
|||
&-small { |
|||
width: 88px; |
|||
} |
|||
} |
|||
.resi-cell-select:last-child { |
|||
margin-right: 0; |
|||
} |
|||
} |
|||
|
|||
.mt10 { |
|||
margin-top: 10px; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue