|
|
@ -7,7 +7,7 @@ |
|
|
|
@keyup.enter.native="beforeGetDataList()"> |
|
|
|
<el-form-item label="所属组织" label-width="90px"> |
|
|
|
<el-cascader v-model="deptIdList" |
|
|
|
ref="deptTree" |
|
|
|
ref="deptTreeOld" |
|
|
|
:options="options" |
|
|
|
:props="{ checkStrictly: true }" |
|
|
|
clearable> |
|
|
@ -281,11 +281,21 @@ |
|
|
|
@click="exports()">{{ $t('export') }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button type="primary" @click="beforeImportUser">导入</el-button> |
|
|
|
<el-button v-if="$hasPermission('epidemicreportuserinfo:reset')" type="primary" @click="resetState">重置核酸检测状态</el-button> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="导入网格" label-width="90px"> |
|
|
|
<el-cascader v-model="deptIdListUpload" |
|
|
|
ref="deptTree" |
|
|
|
:options="options" |
|
|
|
:props="{ checkStrictly: false }" |
|
|
|
clearable> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button v-if="$hasPermission('epidemicreportuserinfo:reset')" type="primary" @click="resetState">重置核酸检测状态</el-button> |
|
|
|
<el-button type="primary" @click="beforeImportUser">导入</el-button> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
<el-upload ref="upload" v-if="$hasPermission('epidemic:person:export')" |
|
|
|
:action="uploadUrl" |
|
|
@ -613,6 +623,7 @@ export default { |
|
|
|
{dictValue: '1', dictName: '未检测'}, |
|
|
|
], |
|
|
|
deptIdList: [], |
|
|
|
deptIdListUpload: [], |
|
|
|
companyArr: [], |
|
|
|
politicsStatusList: [], |
|
|
|
specialCrowdList: [], |
|
|
@ -662,7 +673,8 @@ export default { |
|
|
|
checkMobile: '', |
|
|
|
isDisabled: false, |
|
|
|
buttonName: "发送验证码", |
|
|
|
buttonTime: 60 |
|
|
|
buttonTime: 60, |
|
|
|
gridIdImport: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
created: function () { |
|
|
@ -697,7 +709,16 @@ export default { |
|
|
|
this.dataForm.streetId = this.deptIdList[0] |
|
|
|
this.dataForm.communityId = this.deptIdList[1] |
|
|
|
this.dataForm.gridId = this.deptIdList[2] |
|
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/custom/epidemicuserinfo/importExcel?token=${Cookies.get('token')}&gridId=` + this.deptIdList[2] |
|
|
|
// this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/custom/epidemicuserinfo/importExcel?token=${Cookies.get('token')}&gridId=` + this.deptIdList[2] |
|
|
|
} |
|
|
|
}, |
|
|
|
'deptIdListUpload': function (val) { |
|
|
|
if (val.length > 0){ |
|
|
|
this.gridIdImport = val[val.length - 1] |
|
|
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/custom/epidemicuserinfo/importExcel?token= |
|
|
|
${Cookies.get('token')}&gridId=` + val[val.length - 1] |
|
|
|
}else{ |
|
|
|
this.gridIdImport = '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -741,18 +762,16 @@ export default { |
|
|
|
}, |
|
|
|
beforeImportUser () { |
|
|
|
//所属组织全都不选,直接上传 |
|
|
|
if ((this.dataForm.streetId === undefined || this.dataForm.streetId === '') && |
|
|
|
(this.dataForm.communityId === undefined || this.dataForm.communityId === '') && |
|
|
|
(this.dataForm.gridId === undefined || this.dataForm.gridId === '') ){ |
|
|
|
if (this.gridIdImport === ''){ |
|
|
|
document.getElementById('importBut').click() |
|
|
|
return |
|
|
|
} |
|
|
|
//选中社区或者及街道提示请选中网格 |
|
|
|
if ((this.dataForm.streetId != undefined || this.dataForm.streetId != '') && |
|
|
|
(this.dataForm.gridId === undefined || this.dataForm.gridId === '') ){ |
|
|
|
this.$message.error('请选择到网格层级后导入') |
|
|
|
return false |
|
|
|
} |
|
|
|
// if ((this.dataForm.streetId != undefined && this.dataForm.streetId != '') && |
|
|
|
// (this.dataForm.gridId === undefined || this.dataForm.gridId === '') ){ |
|
|
|
// this.$message.error('请选择到网格层级后导入') |
|
|
|
// return false |
|
|
|
// } |
|
|
|
//选中网格 |
|
|
|
let selectGird = this.$refs['deptTree'].getCheckedNodes()[0].label |
|
|
|
|
|
|
|