|
|
|
@ -21,7 +21,7 @@ |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="8"> |
|
|
|
<!-- <el-col :span="8"> |
|
|
|
<div class="resi-cell"> |
|
|
|
<div class="resi-cell-label">负责人</div> |
|
|
|
<div class="resi-cell-value" |
|
|
|
@ -34,11 +34,11 @@ |
|
|
|
</el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-col>--> |
|
|
|
|
|
|
|
<el-col :span="8"> |
|
|
|
<div class="resi-cell"> |
|
|
|
<div class="resi-cell-label">联系电话</div> |
|
|
|
<div class="resi-cell-label">服务电话</div> |
|
|
|
<div class="resi-cell-value" |
|
|
|
:class="'resi-cell-value-radio'"> |
|
|
|
<el-input v-model="fmData.mobile" |
|
|
|
@ -90,6 +90,10 @@ |
|
|
|
<el-button type="success" |
|
|
|
size="small" |
|
|
|
@click="handleAdd">新增</el-button> |
|
|
|
<el-button class="diy-button--search" |
|
|
|
style="margin-left:10px" |
|
|
|
size="small" |
|
|
|
@click="handleExportModule('room')">下载模板</el-button> |
|
|
|
<el-upload ref="upload" |
|
|
|
class="upload-btn" |
|
|
|
action="uploadUlr" |
|
|
|
@ -127,9 +131,9 @@ |
|
|
|
<el-table-column prop="serviceMatters" |
|
|
|
label="服务内容"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="personInCharge" |
|
|
|
<!-- <el-table-column prop="personInCharge" |
|
|
|
label="负责人"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column>--> |
|
|
|
<el-table-column prop="mobile" |
|
|
|
label="服务电话"> </el-table-column> |
|
|
|
<el-table-column prop="serviceTimeStr" |
|
|
|
@ -302,7 +306,7 @@ export default { |
|
|
|
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 |
|
|
|
formData.append("file", file.file); //添加文件对象 |
|
|
|
axios({ |
|
|
|
url: window.SITE_CONFIG["apiURL"] + "/heart/societyorg/import", |
|
|
|
url: window.SITE_CONFIG["apiURL"] + "/heart/societyorg/importV2", |
|
|
|
method: "post", |
|
|
|
data: formData, |
|
|
|
// responseType: "blob", |
|
|
|
@ -455,6 +459,43 @@ export default { |
|
|
|
|
|
|
|
this.scoreDiaShow = false |
|
|
|
}, |
|
|
|
async handleExportModule () { |
|
|
|
let url = "/heart/societyorg/import-template-download"; |
|
|
|
|
|
|
|
let params = {}; |
|
|
|
await this.$http({ |
|
|
|
method: "POST", |
|
|
|
url, |
|
|
|
responseType: "blob", |
|
|
|
data: params, |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
// this.download(res.data, title + '.xls') |
|
|
|
if (res.headers["content-disposition"]) { |
|
|
|
let fileName = window.decodeURI( |
|
|
|
res.headers["content-disposition"].split(";")[1].split("=")[1] |
|
|
|
); |
|
|
|
console.log("filename", fileName); |
|
|
|
let blob = new Blob([res.data], { |
|
|
|
type: "application/vnd.ms-excel", |
|
|
|
}); |
|
|
|
var url = window.URL.createObjectURL(blob); |
|
|
|
var aLink = document.createElement("a"); |
|
|
|
aLink.style.display = "none"; |
|
|
|
aLink.href = url; |
|
|
|
aLink.setAttribute("download", fileName); |
|
|
|
document.body.appendChild(aLink); |
|
|
|
aLink.click(); |
|
|
|
document.body.removeChild(aLink); //下载完成移除元素 |
|
|
|
window.URL.revokeObjectURL(url); //释放掉blob对象 |
|
|
|
} else this.$message.error("下载失败"); |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
console.log("err", err); |
|
|
|
return this.$message.error("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|