From 5628ba2bec9b1558faf5d18231b53407ab52b5d0 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 25 Mar 2022 17:50:12 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=96=AB=E8=8B=97=E6=8E=A5=E7=A7=8D?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/buttonstyle.scss | 7 + .../scss/modules/management/epidemic.scss | 29 ++ .../modules/base/epidemic/natInfo/natList.vue | 9 +- .../{veroFocusForm.vue => veroFocusAdd.vue} | 492 ++++++++++-------- .../base/epidemic/veroFocus/veroFocusEdit.vue | 338 ++++++++++++ .../base/epidemic/veroFocus/veroFocusList.vue | 243 ++++++--- .../base/epidemic/veroFocus/vfNoticeList.vue | 447 ++++++++++++++++ .../base/epidemic/veroFocus/vfSendNotice.vue | 266 ++++++++++ .../base/epidemic/veroFocus/vfVisiteList.vue | 450 ++++++++++++++++ .../ninePlaces/inspect/inspectReview.vue | 4 +- 10 files changed, 1987 insertions(+), 298 deletions(-) rename src/views/modules/base/epidemic/veroFocus/{veroFocusForm.vue => veroFocusAdd.vue} (51%) create mode 100644 src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue create mode 100644 src/views/modules/base/epidemic/veroFocus/vfNoticeList.vue create mode 100644 src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue create mode 100644 src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue diff --git a/src/assets/scss/buttonstyle.scss b/src/assets/scss/buttonstyle.scss index 1e683d95a..7a60a21be 100644 --- a/src/assets/scss/buttonstyle.scss +++ b/src/assets/scss/buttonstyle.scss @@ -86,6 +86,13 @@ background-color: #4ec591 !important; border-color: #4ec591 !important; } +//列表上方操作按钮,其他按钮 +.diy-button--more { + color: #fff !important; + background-color: #23c1c4 !important; + border-color: #23c1c4 !important; +} + //table按钮样式 //查看 diff --git a/src/assets/scss/modules/management/epidemic.scss b/src/assets/scss/modules/management/epidemic.scss index 2164e4206..d20be0a20 100644 --- a/src/assets/scss/modules/management/epidemic.scss +++ b/src/assets/scss/modules/management/epidemic.scss @@ -70,3 +70,32 @@ flex-direction: column; justify-content: center; } +.div-mult-form { + margin-top: 20px; + + .div_person { + display: flex; + font-size: 14px; + padding-bottom: 20px; + + .person_title { + text-align: right; + flex: 0 0 100px; + + line-height: 36px; + padding: 0 12px 0 0; + } + + .tag_item { + margin-right: 10px; + margin-top: 10px; + } + .tag_tip { + margin-top: 10px; + color: #9c9c9c; + } + } +} +.div-mult-table { + padding: 0 20px; +} diff --git a/src/views/modules/base/epidemic/natInfo/natList.vue b/src/views/modules/base/epidemic/natInfo/natList.vue index 9d38bdb99..bca48bb52 100644 --- a/src/views/modules/base/epidemic/natInfo/natList.vue +++ b/src/views/modules/base/epidemic/natInfo/natList.vue @@ -559,13 +559,12 @@ export default { computed: { tableHeight () { - return (this.clientHeight - 360) + return this.$store.state.inIframe ? this.clientHeight - 360 + this.iframeHeight : this.clientHeight - 360 + }, - rowHeight () { - return (this.clientHeight - 200) + 'px' - }, - ...mapGetters(['clientHeight']) + + ...mapGetters(['clientHeight', 'iframeHeight']) }, watch: { diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusForm.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue similarity index 51% rename from src/views/modules/base/epidemic/veroFocus/veroFocusForm.vue rename to src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue index 846c26b4b..8fdcfb3e6 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusForm.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue @@ -8,11 +8,10 @@ @tab-click="handleClick"> - @@ -35,7 +33,6 @@ @@ -46,7 +43,6 @@ @@ -95,42 +91,44 @@ - - - - - - - - - - - 查询 - 重置 +
+ + + + + + + + + + + 查询 + 重置 + @@ -150,24 +149,30 @@ type="index" width="50"> - - - + +
@@ -181,48 +186,75 @@
- - - - - - - 小程序通知 - 短信通知 - - - - - - - - - +
+
+ + + + + {{selectionAll.length}} + + + + + + + + 小程序通知 + 短信通知 + + + + + + + + +
@@ -231,8 +263,7 @@
取 消 - 确 定 @@ -245,24 +276,25 @@ import { Loading } from 'element-ui' // 引入Loading服务 import { requestPost } from '@/js/dai/request' -import { dateFormats } from '@/utils/index' +import { mapGetters } from 'vuex' let loading // 加载动画 export default { data () { return { - formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 - activeName: "second", + activeName: "first", gridList: [], - selGridId: '', - veroNum: null, - btnDisable: false, + formDataSearch: { + selGridId: '', + veroNum: undefined, + }, + formData1: { name: '', idCard: '', @@ -280,9 +312,12 @@ export default { noticeContent: '', }, tableData: [], + total: 0, + pageSize: 20, + pageNo: 0, tableLoading: false, - selection: [],//选中的人员 + selectionAll: [],//选中的人员 } @@ -297,17 +332,12 @@ export default { methods: { - async initForm (type, natId) { - this.startLoading() - this.$refs['ref_form'].resetFields(); + async initForm () { - this.formType = type - if (natId) { - this.natId = natId - this.formData.id = natId - await this.loadFormData() - } - this.endLoading() + this.$refs['ref_form1'].resetFields(); + this.$refs['ref_form2'].resetFields(); + + await this.loadTable() }, @@ -318,141 +348,184 @@ export default { async loadTable () { this.tableLoading = true - const url = "/gov/org/placepatrolteam/getlist" + const url = "/epmetuser/icresiuser/listresi" // const url = "http://yapi.elinkservice.cn/mock/245/gov/org/placeorg/getlist" let params = { pageSize: this.pageSize, pageNo: this.pageNo, - ...this.formData + formCode: 'resi_base_info', + ...this.formDataSearch } const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.total = data.total + data.list.forEach(element => { + element.isSel = false + }); this.tableData = data.list - this.tableData.forEach(item => { - if (item.time) { - let timeArray = item.time.split(' ') - item.time = timeArray[0] - } + this.analysisTableSelection() + - }); } else { this.$message.error(msg) } this.tableLoading = false }, - handleSelectAll (selectAllFlag) { - this.$refs.ref_table.clearSelection(); - if (selectAllFlag) { - this.tableData.forEach(row => { - if (row.showBtn) { - this.$refs.ref_table.toggleRowSelection(row); + handleSelectTable (selection, row) { + + row.isSel = !row.isSel + + if (row.isSel) { + this.selectionAll.push(row) + } else { + for (let i = 0; i < this.selectionAll.length; i++) { + let item = this.selectionAll[i] + if (item.ID_CARD === row.ID_CARD) { + this.selectionAll.splice(i, 1) + break } - }); + + } } + }, - selectAll (selection) { - this.selection = selection + handleSelAll (selection) { + let selFlag = selection.length > 0//全选选中 还是 全选不选中 + for (let i = 0; i < this.tableData.length; i++) { + let tableItem = this.tableData[i] + tableItem.isSel = selFlag + let isHasItem = false + for (let j = 0; j < this.selectionAll.length; j++) { + let selectionItem = this.selectionAll[j] + if (selectionItem.ID_CARD === tableItem.ID_CARD) { + isHasItem = true + if (!selFlag) { + this.selectionAll.splice(j, 1) + break + } + } + + } + + if (!isHasItem && selFlag) { + this.selectionAll.push(tableItem) + } - if (selection.length === this.validTableDataNum) { - this.selAllFlag = true - } else { - this.selAllFlag = false } }, + //删除标签 + handleCloseTag (tag, index) { + for (let i = 0; i < this.tableData.length; i++) { - handleClick () { + let tableItem = this.tableData[i] + if (tag.ID_CARD === tableItem.ID_CARD) {//如果表中存在这个数据 + tableItem.isSel = false + this.$refs.ref_table.toggleRowSelection(tableItem); + break + } - }, + } - async loadGrid () { - const url = "/gov/org/customergrid/gridoption" + for (let i = 0; i < this.selectionAll.length; i++) { + let item = this.selectionAll[i] + if (item.ID_CARD === tag.ID_CARD) { + this.selectionAll.splice(i, 1) + break + } - let params = { - agencyId: this.agencyId } + }, - const { data, code, msg } = await requestPost(url, params) + //回显列表选中的行 + analysisTableSelection () { + this.$nextTick(() => { + this.tableData.forEach(tableItem => { - if (code === 0) { - this.gridList = data - } else { - this.$message.error(msg) - } + for (let j = 0; j < this.selectionAll.length; j++) { + let selectionItem = this.selectionAll[j] + + if (selectionItem.ID_CARD === tableItem.ID_CARD) { + tableItem.isSel = true + break + + } + } + if (tableItem.isSel) { + this.$refs.ref_table.toggleRowSelection(tableItem); + } + }); + }) + }, + handleClick () { + }, - async loadFormData () { + async loadGrid () { + const url = "/gov/org/customergrid/gridoption" - // const url = 'http://yapi.elinkservice.cn/mock/245/gov/project/memoConcern' - const url = '/gov/project/memoConcern' let params = { - id: this.natId, - readFlag: '0', + agencyId: this.agencyId } - 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 + const { data, code, msg } = await requestPost(url, params) - } + if (code === 0) { + this.gridList = data } else { this.$message.error(msg) } + }, + 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() - } - }) + await this.addVero() + }, - async addNat () { - console.log(this.formData) - return false + async addVero () { + let formData = {} + if (this.activeName === 'first') { + formData = this.formData1 + 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; + // } + } else { + if (this.selectionAll.length === 0) { + this.$message.info('请选择批量添加的人员') + 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; - // } - - if (this.fileList.length > 0) { - this.formData.attachmentList = this.fileList + formData = this.formData2 + formData.personList = this.selectionAll } + console.log(formData) + return false + let url = '' if (this.formType === 'add') { @@ -492,23 +565,41 @@ export default { }, + resetSearch () { + this.formDataSearch = { + selGridId: '', + veroNum: undefined, + } + }, + resetData () { - this.natId = '' - this.formData = { + this.formData1 = { name: '', idCard: '', phone: '', - checkTime: '', - address: '', - result: '', + remark: '', noticeWay: [], noticeContent: '', - attachmentList: [] } + + this.formData2 = { + personList: [], + remark: '', + noticeWay: [], + noticeContent: '', + } + this.formDataSearch = { + selGridId: '', + veroNum: undefined, + } + + this.selectionAll = []//选中的人员 + + }, handleSizeChange (val) { @@ -539,7 +630,14 @@ export default { } }, computed: { - dataRule () { + tableHeight () { + return 300 + + }, + ...mapGetters(['clientHeight', 'iframeHeight']), + + dataRule1 () { + return { name: [ { required: true, message: '姓名不能为空', trigger: 'blur' } @@ -550,25 +648,9 @@ export default { phone: [ { required: true, message: '手机号不能为空', trigger: 'blur' }, ], - checkTime: [ - { required: true, message: '检测时间不能为空', trigger: 'blur' }, - ], - address: [ - { required: false }, - ], - result: [ - { required: true }, - ], - address: [ - { required: false }, - ], - noticeWay: [ - { required: false }, - ], - noticeContent: [ - { required: false }, - ], + + } }, diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue new file mode 100644 index 000000000..87b5f1540 --- /dev/null +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusEdit.vue @@ -0,0 +1,338 @@ + + + + + + + + diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue index abf5c1535..c06d1e35d 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusList.vue @@ -69,7 +69,7 @@
新增 + @click="addFormShow=true">新增 导出 + + 发送通知
-
- 全选 - 发送通知 -
+ + + + - + + + + - + + + + + + + + + @@ -247,7 +292,11 @@ + + + diff --git a/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue new file mode 100644 index 000000000..1825e7f1d --- /dev/null +++ b/src/views/modules/base/epidemic/veroFocus/vfSendNotice.vue @@ -0,0 +1,266 @@ + + + + + + + + diff --git a/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue b/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue new file mode 100644 index 000000000..ec45e380c --- /dev/null +++ b/src/views/modules/base/epidemic/veroFocus/vfVisiteList.vue @@ -0,0 +1,450 @@ + + + + + + diff --git a/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue b/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue index a556aedc8..ec45e380c 100644 --- a/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue +++ b/src/views/modules/communityService/ninePlaces/inspect/inspectReview.vue @@ -1,8 +1,8 @@ @@ -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 c06d1e35d..16a555294 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 1825e7f1d..ade540583 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) From 6769be9bc24d950c6f8739bf7adab69a5e54f9db Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 29 Mar 2022 10:39:40 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=A0=B8=E9=85=B8=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/epidemic/natInfo/natForm.vue | 15 +++-- .../modules/base/epidemic/natInfo/natList.vue | 30 +++++---- .../base/epidemic/veroFocus/veroFocusAdd.vue | 41 ++++++------- .../base/epidemic/veroFocus/veroFocusEdit.vue | 2 +- .../base/epidemic/veroFocus/veroFocusList.vue | 61 +++++++++++-------- .../base/epidemic/veroFocus/vfNoticeList.vue | 2 +- .../base/epidemic/veroFocus/vfSendNotice.vue | 2 +- 7 files changed, 81 insertions(+), 72 deletions(-) diff --git a/src/views/modules/base/epidemic/natInfo/natForm.vue b/src/views/modules/base/epidemic/natInfo/natForm.vue index f332062a6..3f381f9eb 100644 --- a/src/views/modules/base/epidemic/natInfo/natForm.vue +++ b/src/views/modules/base/epidemic/natInfo/natForm.vue @@ -149,8 +149,10 @@ :before-upload="beforeUpload" :on-change="handleEditChange" :file-list="fileList"> - -
+
请选择1张图片,只能上传jpg、png、gif格式
@@ -261,7 +263,6 @@ export default { async mounted () { const { user } = this.$store.state this.agencyId = user.agencyId - this.formData.agencyId = user.agencyId //获取网格下拉框数据 await this.loadGrid() }, @@ -269,7 +270,9 @@ export default { methods: { async initForm (type, icNatId) { - this.startLoading() + + this.formData.agencyId = this.agencyId + this.$refs['ref_form'].resetFields(); this.formType = type @@ -280,7 +283,7 @@ export default { this.isFromResi = false await this.loadFormData() } - this.endLoading() + }, @@ -469,7 +472,7 @@ export default { // if (!isLt1M) { // this.$message.error('上传文件大小不能超过 5MB!') // } - return isLt1M + // return isLt1M }, diff --git a/src/views/modules/base/epidemic/natInfo/natList.vue b/src/views/modules/base/epidemic/natInfo/natList.vue index 5057e6a42..f81b23058 100644 --- a/src/views/modules/base/epidemic/natInfo/natList.vue +++ b/src/views/modules/base/epidemic/natInfo/natList.vue @@ -94,7 +94,7 @@ :show-file-list='false' :before-upload="beforeUpload" action="" - accept=".xls,.xlsx" + accept=".xlsx" :limit="1" :on-exceed="handleExceed" :http-request="uploadFile"> @@ -512,7 +512,8 @@ export default { this.formData, (data, rspMsg) => { - this.download(data, title + '.xls') + + this.download(data, title + '.xlsx') }, (rspMsg, data) => { this.$message.error(rspMsg); @@ -558,7 +559,7 @@ export default { params, (data, rspMsg) => { - this.download(data, title + '.xls') + this.download(data, title + '.xlsx') }, (rspMsg, data) => { this.$message.error(rspMsg); @@ -568,15 +569,15 @@ export default { // 上传文件之前的钩子 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('请选择正确格式的文件') + const array = file.name.split('.') + const extension = array[array.length - 1] + // const isLt1M = (file.size / 1024 / 1024) < 5 + if (extension !== 'xlsx') { + this.$message.error('只能上传xlsx文件!') return false } else { + this.files = file; this.fileName = file.name; return true } @@ -607,8 +608,6 @@ export default { let fileFormData = new FormData(); fileFormData.append('file', this.files);//filename是键,file是值,就是要传的文件,test.zip是要传的文件名 - - this.importRoomLoading = true window.app.ajax.post2(url, fileFormData, (data, rspMsg) => { @@ -623,18 +622,17 @@ export default { // }) // this.$message.error(rspMsg) } - this.$emit('refreshTree') - this.loadTable() - this.importRoomLoading = false + + // this.loadTable() + }, (rspMsg, data) => { - this.importRoomLoading = false + }, { headers: { 'Content-Type': 'multipart/form-data' } }) }, - // 开启加载动画 startLoading () { loading = Loading.service({ diff --git a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue index 8fdcfb3e6..33c3e4171 100644 --- a/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue +++ b/src/views/modules/base/epidemic/veroFocus/veroFocusAdd.vue @@ -1,5 +1,5 @@