|
|
@ -6,8 +6,35 @@ |
|
|
|
:model="dataForm" |
|
|
|
@keyup.enter.native="getDataList()" |
|
|
|
> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="dataForm.id" placeholder="id" clearable></el-input> |
|
|
|
<!--<el-form-item label="所属组织名称" prop="orgName">--> |
|
|
|
<!--<el-select v-model="dataForm.orgName" placeholder="所属组织名称">--> |
|
|
|
<!--<el-option--> |
|
|
|
<!--ref="org"--> |
|
|
|
<!--v-for="item in organizationList"--> |
|
|
|
<!--:key="item.orgId"--> |
|
|
|
<!--:label="item.orgName"--> |
|
|
|
<!--:value="item.orgId"--> |
|
|
|
<!-->--> |
|
|
|
<!--</el-option>--> |
|
|
|
<!--</el-select>--> |
|
|
|
<!--</el-form-item>--> |
|
|
|
<el-form-item label="所属组织名称" prop="orgName" label-width="130px"> |
|
|
|
<el-cascader |
|
|
|
ref="org" |
|
|
|
v-model="orgIds" |
|
|
|
:options="organizationList" |
|
|
|
:props="{ checkStrictly: false, multiple: false, emitPath: true }" |
|
|
|
style="width:200px" |
|
|
|
clearable |
|
|
|
@change="orgChangeHandle" |
|
|
|
> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="核酸检测点名称" prop="name"> |
|
|
|
<el-input v-model="dataForm.name" 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> |
|
|
|
<el-button class="diy-button--search" @click="getDataList()">{{ $t("query") }}</el-button> |
|
|
@ -169,14 +196,52 @@ export default { |
|
|
|
deleteIsBatch: true, |
|
|
|
}, |
|
|
|
dataForm: { |
|
|
|
id: "", |
|
|
|
name: "", |
|
|
|
mobile: "", |
|
|
|
orgId: "" |
|
|
|
}, |
|
|
|
organizationList: [], |
|
|
|
orgIds:[] |
|
|
|
}; |
|
|
|
}, |
|
|
|
components: { |
|
|
|
AddOrUpdate, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
this.getFormInfo() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取所属组织列表 |
|
|
|
getFormInfo() { |
|
|
|
this.$http |
|
|
|
.post(`/gov/org/agency/getOrgTreeListByCustomerId`) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg); |
|
|
|
} |
|
|
|
this.organizationList = res.data; |
|
|
|
this.deleteChildren(this.organizationList) |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
}, |
|
|
|
deleteChildren(arr) { |
|
|
|
let childs = arr |
|
|
|
for (let i = childs.length; i--; i > 0) { |
|
|
|
if (childs[i].children) { |
|
|
|
if (childs[i].children.length) { |
|
|
|
this.deleteChildren(childs[i].children) |
|
|
|
} else { |
|
|
|
delete childs[i].children |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return arr |
|
|
|
}, |
|
|
|
orgChangeHandle () { |
|
|
|
this.dataForm.orgId = this.orgIds[this.orgIds.length-1] |
|
|
|
console.log(this.dataForm) |
|
|
|
|
|
|
|
}, |
|
|
|
handleExportModule() { |
|
|
|
let title = "核酸检测点模板"; |
|
|
|
let url = "/epmetuser/icPointNucleicMonitoring/exporttemplate"; |
|
|
@ -257,7 +322,7 @@ export default { |
|
|
|
let fileFormData = new FormData(); |
|
|
|
fileFormData.append("file", this.files); //filename是键,file是值,就是要传的文件,test.zip是要传的文件名 |
|
|
|
|
|
|
|
url = "/epmetuser/icPointNucleicMonitoring/pointNucleicMonitoringImport"; |
|
|
|
url = "/epmetuser/icPointNucleicMonitoring/pointImport"; |
|
|
|
|
|
|
|
window.app.ajax.post2(url,fileFormData,(data, rspMsg) => { |
|
|
|
if (data.code === 0 && data.msg == "success") { |
|
|
|