diff --git a/src/assets/scss/modules/management/epidemic.scss b/src/assets/scss/modules/management/epidemic.scss index d20be0a2..5d00bb1e 100644 --- a/src/assets/scss/modules/management/epidemic.scss +++ b/src/assets/scss/modules/management/epidemic.scss @@ -1,20 +1,22 @@ -.item_width_1 { - width: 560px; -} -.item_width_2 { - width: 220px; -} -.item_width_3 { - width: 180px; -} +.epidemic-form { + .item_width_1 { + width: 560px; + } + .item_width_2 { + width: 220px; + } + .item_width_3 { + width: 180px; + } -.btn-selperson { - margin-left: 20px; -} + .btn-selperson { + margin-left: 20px; + } -.form_div_btn { - margin-top: 20px; - text-align: center; + .form_div_btn { + margin-top: 20px; + text-align: center; + } } .main_tab { diff --git a/src/views/modules/base/epidemic/natInfo/natForm.vue b/src/views/modules/base/epidemic/natInfo/natForm.vue index d9a21d5f..f332062a 100644 --- a/src/views/modules/base/epidemic/natInfo/natForm.vue +++ b/src/views/modules/base/epidemic/natInfo/natForm.vue @@ -1,14 +1,15 @@ @@ -207,6 +220,8 @@ export default { data () { return { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 + hideUploadEdit: false, // 隐藏'上传按钮' + limitNum: 1, enterType: '1',//录入方式1 手动输入 2 选择居民 isFromResi: false,//是否从已有居民信息中选择 @@ -215,46 +230,54 @@ export default { btnDisable: false, - natId: '', + icNatId: '', formData: { + icNatId: '', + agencyId: '',//当前网格所属组织Id + userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 + userType: 'icresi',//居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro name: '', idCard: '', - phone: '', - checkTime: '', - address: '', - result: '', - noticeWay: [], - noticeContent: '', - attachmentList: [] + mobile: '', + natTime: '', + natAddress: '', + natResult: '', + channel: [], + content: '', + + fileName: '',//附件名 + attachmentType: '',//附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + attachmentUrl: '',//附件地址 }, - fileList: [], uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadvariedfile', dialogImageUrl: '', dialogVisible: false, - } }, components: {}, async mounted () { const { user } = this.$store.state this.agencyId = user.agencyId + this.formData.agencyId = user.agencyId //获取网格下拉框数据 await this.loadGrid() }, methods: { - async initForm (type, natId) { + async initForm (type, icNatId) { this.startLoading() this.$refs['ref_form'].resetFields(); this.formType = type - if (natId) { - this.natId = natId - this.formData.id = natId + + if (icNatId) { + this.icNatId = icNatId + this.formData.icNatId = icNatId + this.isFromResi = false await this.loadFormData() } this.endLoading() @@ -263,10 +286,10 @@ export default { handleChangeEnterType (value) { this.formData.name = '' - this.formData.phone = '' + this.formData.mobile = '' this.formData.idCard = '' this.formData.gridId = '' - this.formData.personId = '' + this.formData.userId = '' if (value === '2') { this.isFromResi = true } else { @@ -312,72 +335,52 @@ export default { }, async handleSelPerson (personItem) { + this.formData.userId = personItem.demandUserId this.formData.name = personItem.demandUserName - this.formData.phone = personItem.demandUserMobile + this.formData.mobile = personItem.demandUserMobile this.formData.idCard = personItem.idCard - - }, - - handleTime () { - if (!this.formData.remindTime) return - var startAt = new Date(this.formData.remindTime) * 1000 / 1000; - if (startAt < Date.now()) { - this.formData.remindTime = dateFormats('YYYY-mm-dd HH:MM', new Date()); - } - }, - - async loadFormData () { - // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern' - const url = '/gov/project/memoConcern' + // const url = 'http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/detail' + const url = '/epmetuser/icNat/detail' let params = { - id: this.natId, - readFlag: '0', + icNatId: this.icNatId, } const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.formData = data - - if (data.attachmentList) { - data.attachmentList.forEach(element => { - element.name = element.fileName - element.type = element.attachmentType - element.size = element.attachmentSize - }); - this.fileList = data.attachmentList + this.formData.icNatId = this.icNatId + this.fileList = [] + if (data.fileName) { + let obj = { + name: data.fileName, + type: data.attachmentType, + url: data.attachmentUrl, + } + // data.attachmentList.forEach(element => { + // element.name = element.fileName + // element.type = element.attachmentType + // element.size = element.attachmentSize + // }); + this.fileList.push(obj) } + this.hideUploadEdit = this.fileList.length >= this.limitNum; + } else { this.$message.error(msg) } }, - async handleComfirm () { - + async handleComfirm () { this.btnDisable = true setTimeout(() => { this.btnDisable = false }, 5000) - this.$refs['ref_form'].validate(async (valid, messageObj) => { - if (!valid) { - app.util.validateRule(messageObj) - this.btnDisable = false - } else { - - await this.addNat() - } - - }) - - }, - async addNat () { - console.log(this.formData) - return false const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 // if (regPhone.test(this.formData.mobile) === false) { @@ -387,21 +390,26 @@ export default { // message: '请输入正确的手机号码' // }) // return false; - // } - - if (this.fileList.length > 0) { - this.formData.attachmentList = this.fileList - } + // } + const regCard = /(^\d{15}$)|(^\d{17}(\d|X)$)/; //身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X + // if (regCard.test(this.formData.idCard) === false) { + // this.btnDisable = false + // this.$message({ + // type: 'warning', + // message: '请输入正确的身份证号码' + // }) + // return false; + // } let url = '' if (this.formType === 'add') { - url = '/gov/project/memoConcern/save' - // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/save" - this.formData.id = '' + url = '/epmetuser/icNat/add' + // url = "http://yapi.elinkservice.cn/mock/102/epmetuser/icNat/add" + this.formData.icNatId = '' } else { - url = '/gov/project/memoConcern/update' - // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update" + url = '/epmetuser/icNat/edit' + // url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/edit" } @@ -415,8 +423,7 @@ export default { this.resetData() this.$emit('dialogOk') this.btnDisable = false - this.$store.dispatch('setTipsList') - this.$store.dispatch('setTipsTime') + } else { this.btnDisable = false this.$message.error(msg) @@ -425,81 +432,85 @@ export default { }, handleCancle () { - this.resetData() this.$emit('dialogCancle') }, + handleRemove (file, fileList) { + this.hideUploadEdit = fileList.length >= this.limitNum; + this.formData.fileName = '' + this.formData.attachmentUrl = '' + this.formData.attachmentType = '' + this.fileList = [] + + }, + handlePictureCardPreview (file) { + this.dialogImageUrl = file.url; + this.dialogVisible = true; + }, + + handleEditChange (file, fileList) { + this.hideUploadEdit = fileList.length >= this.limitNum; + + }, + beforeUpload (file) { const array = file.name.split('.') const extension = array[array.length - 1] - const isLt1M = (file.size / 1024 / 1024) < 5 - if (extension !== 'xls' - && extension !== 'xlsx' - && extension !== 'doc' - && extension !== 'docx' - && extension !== 'pdf') { - this.$message.error('只能上传word、excel、pdf文件!') + // const isLt1M = (file.size / 1024 / 1024) < 5 + if (extension !== 'jpg' + && extension !== 'png' + && extension !== 'gif' + ) { + this.$message.error('只能上传jpg、png、gif文件!') return false } - if (!isLt1M) { - this.$message.error('上传文件大小不能超过 5MB!') - } + // if (!isLt1M) { + // this.$message.error('上传文件大小不能超过 5MB!') + // } return isLt1M }, - handleFileRemove (file) { - - if (file && file.status === "success") { - this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1) - } - }, - handleFileSuccess (res, file) { if (res.code === 0 && res.msg === 'success') { const array = file.name.split('.') const fileType = array[array.length - 1] - file.fileName = file.name - file.attachmentUrl = res.data.url - file.attachmentSize = file.size - file.attachmentType = 'doc' + this.formData.fileName = file.name + this.formData.attachmentUrl = res.data.url + this.formData.attachmentType = 'image' + file.attachmentFormat = fileType + file.attachmentSize = file.size - this.fileList.push(file) - console.log(this.fileList) } else this.$message.error(res.msg) }, - //下载 - handleFileDownload (file) { - - var a = document.createElement('a'); - var event = new MouseEvent('click'); - a.download = file.fileName; - console.log(a) - a.href = file.attachmentUrl; - a.dispatchEvent(event); - - - }, - resetData () { - this.natId = '' + this.icNatId = '' + this.fileList = [] + this.hideUploadEdit = false this.formData = { + icNatId: '', + agencyId: '',//当前网格所属组织Id + userId: '',//居民端小程序的用户id、数字社区的icResiUserId、其他情况无值 + userType: 'icresi',//居民端小程序的人:resi;数字社区的居民:icresi;导入的:import;同步的:synchro name: '', idCard: '', - phone: '', - checkTime: '', - address: '', - result: '', - noticeWay: [], - noticeContent: '', - attachmentList: [] + mobile: '', + natTime: '', + natAddress: '', + natResult: '', + channel: [], + content: '', + + fileName: '',//附件名 + attachmentType: '',//附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + attachmentUrl: '',//附件地址 } }, @@ -528,26 +539,26 @@ export default { idCard: [ { required: true, message: '身份证号不能为空', trigger: 'blur' } ], - phone: [ + mobile: [ { required: true, message: '手机号不能为空', trigger: 'blur' }, ], - checkTime: [ + natTime: [ { required: true, message: '检测时间不能为空', trigger: 'blur' }, ], - address: [ + natAddress: [ { required: false }, ], - result: [ + natResult: [ { required: true }, ], - address: [ + natAddress: [ { required: false }, ], - noticeWay: [ + channel: [ { required: false }, ], - noticeContent: [ + content: [ { required: false }, ], @@ -572,4 +583,16 @@ export default { @import "@/assets/scss/modules/management/epidemic.scss"; + + + diff --git a/src/views/modules/base/epidemic/natInfo/natList.vue b/src/views/modules/base/epidemic/natInfo/natList.vue index bca48bb5..5057e6a4 100644 --- a/src/views/modules/base/epidemic/natInfo/natList.vue +++ b/src/views/modules/base/epidemic/natInfo/natList.vue @@ -6,10 +6,22 @@ ref="ref_searchform" :label-width="'90px'">
+ + + + + + - + - + placeholder="请输入手机号"> - - - - + + + - - 查询 - 重置 +
+ + + + + + + + 查询 + 重置 +
@@ -97,11 +122,11 @@ type="index" width="50"> - + width="100"> - + width="170"> - + width="170"> - - + width="100"> 查看 - 修改 + + 删除 + + 关注 + + 取消关注 + @@ -183,7 +241,7 @@ class="dialog-h" @closed="diaClose"> @@ -204,19 +262,31 @@ export default { return { loading: false, total: 0, - pageSize: 10, + pageSize: 20, pageNo: 0, tableLoading: false, agencyId: '', + orgTypeList: [ + { + value: 'current', + label: '本辖区居民检测记录' + }, + { + value: 'all', + label: '全部检测记录' + }, + ], timeRange: [], formData: { - personInCharge: '',//负责人 - mobile: '',//联系电话 - gridId: '',//负责区域【网格Id】 - ninePlaceVal: '',//场所类型【九小场所Value值】 - isPage: true,//是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + orgType: 'current',//当前组织:current 根组织:all + name: '',//姓名 + mobile: '',//手机号 + idCard: '',//身份证号码 + startTime: '',//检测开始时间yyyy-MM-dd HH:mm + endTime: '',//检测结束时间yyyy-MM-dd HH:mm + }, tableData: [], @@ -249,14 +319,11 @@ export default { this.loadTable() }, - - - async loadTable () { this.tableLoading = true - const url = "/gov/org/placepatrolteam/getlist" - // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist" + const url = "/epmetuser/icNat/natlist" + // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/natlist" let params = { pageSize: this.pageSize, pageNo: this.pageNo, @@ -270,10 +337,7 @@ export default { this.tableData = data.list this.tableData.forEach(item => { - if (item.time) { - let timeArray = item.time.split(' ') - item.time = timeArray[0] - } + item.natResultShow = item.natResult === '1' ? '阳性' : '阴性' }); } else { @@ -282,14 +346,14 @@ export default { this.tableLoading = false }, - handleScheduledTimeChange (time) { + handleTimeChange (time) { if (time) { - this.formData.scheduledStartTime = time[0] - this.formData.scheduledEndTime = time[1] + this.formData.startTime = time[0] + this.formData.endTime = time[1] } else { - this.formData.scheduledStartTime = '' - this.formData.scheduledEndTime = '' + this.formData.startTime = '' + this.formData.endTime = '' } @@ -298,13 +362,14 @@ export default { diaClose () { this.$refs.ref_form.resetData() this.formShow = false + }, handleDetail (row) { this.formTitle = '详情' this.formShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('detail', row.natId, this.agencyId) + this.$refs.ref_form.initForm('detail', row.icNatId) }) }, @@ -312,7 +377,7 @@ export default { this.formTitle = '新增' this.formShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('add', null, this.agencyId) + this.$refs.ref_form.initForm('add', null) }) }, @@ -320,22 +385,20 @@ export default { this.formTitle = '修改' this.formShow = true this.$nextTick(() => { - this.$refs.ref_form.initForm('edit', row.natId, this.agencyId) + this.$refs.ref_form.initForm('edit', row.icNatId) }) }, - addFormCancle () { - this.formShow = false - }, addFormOk () { this.formShow = false this.loadTable() }, - async handleDelete (row) { + async handleDelete (row, type) { + let message = type === 'delete' ? '确认删除?' : '确认取消关注?' - this.$confirm("确认删除?", "提示", { + this.$confirm(message, "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" @@ -343,6 +406,43 @@ export default { .then(() => { this.deleteNat(row) }) + .catch(err => { + + }); + }, + + async deleteNat (row) { + const url = "/epmetuser/icNat/del" + // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/del" + + let params = { + icNatId: row.icNatId + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.$message({ + type: "success", + message: "操作成功" + }); + + this.loadTable() + } else { + this.$message.error(msg) + } + }, + + async handleAttention (row) { + + this.$confirm("确认同步该条信息?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning" + }) + .then(() => { + this.attentionNat(row) + }) .catch(err => { if (err == "cancel") { @@ -351,12 +451,12 @@ export default { }); }, - async deleteNat (row) { - const url = "/gov/org/placepatrolteam/del" - // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteam/del" + async attentionNat (row) { + const url = "/epmetuser/icNat/synchro" + // const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/synchro" let params = { - natId: row.natId + icNatId: row.icNatId } const { data, code, msg } = await requestPost(url, params) @@ -364,7 +464,7 @@ export default { if (code === 0) { this.$message({ type: "success", - message: "删除成功" + message: "操作成功" }); this.loadTable() @@ -373,18 +473,21 @@ export default { } }, + //重置搜索条件 resetSearch () { this.formData = { - personInCharge: '',//负责人 - mobile: '',//联系电话 - gridId: '',//负责区域【网格Id】 - ninePlaceVal: '',//场所类型【九小场所Value值】 - isPage: true,//是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + orgType: 'current',//当前组织:current 根组织:all + name: '',//姓名 + mobile: '',//手机号 + idCard: '',//身份证号码 + startTime: '',//检测开始时间yyyy-MM-dd HH:mm + endTime: '',//检测结束时间yyyy-MM-dd HH:mm } - this.pageSize = 10 + this.timeRange = [] + this.pageNo = 0 - this.loadTable() + // this.loadTable() }, @@ -400,19 +503,13 @@ export default { //导出表格 async handleExport () { - let title = this.agencyObj.label - title = title + '—房屋列表' + let title = '核酸检测信息' - const url = "/gov/org/house/exporthouseinfo" - let params = { - ownerName: this.ownerName, - ownerPhone: this.ownerPhone, - buildingId: this.agencyObj.id - } + const url = "/epmetuser/icNat/export" app.ajax.exportFilePost( url, - params, + this.formData, (data, rspMsg) => { this.download(data, title + '.xls') @@ -451,10 +548,9 @@ export default { }, handleExportModule () { - let title = '' - title = '房屋模板' + let title = '核酸检测信息导入模板' - const url = "/gov/org/house/exporttemplate" + const url = "/epmetuser/icNat/import-template-download" let params = {} app.ajax.exportFilePost( @@ -506,12 +602,11 @@ export default { //清空上传列表 this.$refs['upload'].clearFiles() - var url = '/gov/org/house/houseimport' + var url = '/epmetuser/icNat/import' let fileFormData = new FormData(); fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - fileFormData.append('orgId', this.agencyObj.id);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - fileFormData.append('orgType', this.agencyObj.level);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 + this.importRoomLoading = true window.app.ajax.post2(url, fileFormData, @@ -559,7 +654,7 @@ export default { computed: { tableHeight () { - return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeight : this.clientHeight - 360 + return this.$store.state.inIframe ? this.clientHeight - 420 + this.iframeHeight : this.clientHeight - 420 }, diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue index c06d1e35..16a55529 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue @@ -18,8 +18,8 @@ - + + prop="vaccinationCount"> 发送通知 + 取消关注 - - - + label="接种针次" + width="100"> - - + label="最后一次通知时间" + min-width="120"> 通知记录 + @click="handleNoticeList(scope.row)">通知记录
随访记录 -
-
- 取消关注 + @click="handleVisiteList(scope.row) ">随访记录
+ @dialogCancle="diaClose"> + @dialogCancle="diaClose"> { this.$refs.ref_form_add.initForm(null, this.agencyId) @@ -478,7 +474,6 @@ export default { }, handleEdit (row) { - this.editFormShow = true this.$nextTick(() => { this.$refs.ref_form_edit.initForm('edit', row.veroFocusId) @@ -492,7 +487,6 @@ export default { }) }, - handleSendNotice () { if (this.selectionAll.length === 0) { this.$message.info('请选择要通知的人员') @@ -505,9 +499,26 @@ export default { }, + handleNoticeList (row) { + this.noticeListFormShow = true + this.$nextTick(() => { + this.$refs.ref_visitelist.initForm(row) + }) + + }, + handleVisiteList (row) { + + this.visiteListFormShow = true + this.$nextTick(() => { + this.$refs.ref_noticelist.initForm(row) + }) + + }, + addFormOk () { - this.formShow = false + this.addFormShow = false + this.editFormShow = false this.loadTable() }, @@ -555,13 +566,13 @@ export default { //重置搜索条件 resetSearch () { this.formData = { - personInCharge: '',//负责人 - mobile: '',//联系电话 - gridId: '',//负责区域【网格Id】 - ninePlaceVal: '',//场所类型【九小场所Value值】 - isPage: true,//是否分页(是:true 否:false) 有这个参数是给新增巡查记录时用的,默认是 + attentionType: 1,//关注类型,核酸检测:2,疫苗接种:1 + name: '', + mobile: '', + idCard: '', + vaccinationCount: '', } - this.pageSize = 10 + this.pageNo = 0 this.loadTable() }, diff --git a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue index 1825e7f1..ade54058 100644 --- a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue +++ b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue @@ -75,6 +75,7 @@ export default { noticeContent: '', }, + selectionAll: [] @@ -88,13 +89,11 @@ export default { methods: { - async initForm () { - this.startLoading() - this.$refs['ref_form1'].resetFields(); - + async initForm (selectionAll) { + this.$refs['ref_form1'].resetFields(); + this.selectionAll = selectionAll - this.endLoading() }, @@ -112,27 +111,10 @@ export default { console.log(this.formData) return false - const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 - // if (regPhone.test(this.formData.mobile) === false) { - // this.btnDisable = false - // this.$message({ - // type: 'warning', - // message: '请输入正确的手机号码' - // }) - // return false; - // } - - let url = '' - if (this.formType === 'add') { - url = '/gov/project/memoConcern/save' - // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/save" - this.formData.id = '' - } else { - url = '/gov/project/memoConcern/update' - // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update" - } + url = '/gov/project/memoConcern/update' + // url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern/update" const { data, code, msg } = await requestPost(url, this.formData) @@ -143,10 +125,9 @@ export default { message: '操作成功' }) this.resetData() - this.$emit('dialogOk') + this.$emit('dialogCancle') this.btnDisable = false - this.$store.dispatch('setTipsList') - this.$store.dispatch('setTipsTime') + } else { this.btnDisable = false this.$message.error(msg)