diff --git a/src/views/modules/personroom/epidemicbuildingunit.vue b/src/views/modules/personroom/epidemicbuildingunit.vue index e6cae63..76169e2 100644 --- a/src/views/modules/personroom/epidemicbuildingunit.vue +++ b/src/views/modules/personroom/epidemicbuildingunit.vue @@ -438,8 +438,11 @@ export default { }, beforeImportUser () { //所属组织全都不选,直接上传 - if (this.gridIdImport === '') { - document.getElementById('importBut').click() + if (this.gridIdImport === '' || this.gridIdImport === undefined) { + this.$message({ + type: 'warning', + message: '请先选择网格' + }); return false } //选中网格 diff --git a/src/views/modules/personroom/epidemicplotbuilding.vue b/src/views/modules/personroom/epidemicplotbuilding.vue index bc2330d..8284405 100644 --- a/src/views/modules/personroom/epidemicplotbuilding.vue +++ b/src/views/modules/personroom/epidemicplotbuilding.vue @@ -300,10 +300,11 @@ export default { }, beforeImportUser () { //所属组织全都不选,直接上传 - if (this.gridIdImport === '') { + if (this.gridIdImport === '' || this.gridIdImport === undefined) { document.getElementById('importBut').click() - return false + return } + console.log("111") //选中网格 let selectGird = this.$refs['deptTree'].getCheckedNodes()[0].label