|
|
|
@ -11,7 +11,7 @@ |
|
|
|
:label-width="'105px'"> |
|
|
|
<el-form-item style="margin-bottom: 10px;" class="tableList" label="所属组织"> |
|
|
|
<el-cascader class="u-item-width-normal" size="small" ref="myCascader" v-model="form.agencyId" |
|
|
|
:options="orgOptions" :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency" |
|
|
|
:options="orgOptions" :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency" |
|
|
|
clearable></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-bottom: 10px;" label="小区" class="tableList" > |
|
|
|
@ -813,6 +813,10 @@ specialCategoryList: [ |
|
|
|
val, |
|
|
|
"agencyId" |
|
|
|
); |
|
|
|
if (this.sarr.length == 0) { |
|
|
|
this.form.agencyId='' |
|
|
|
|
|
|
|
} |
|
|
|
console.log(this.sarr,'seee'); |
|
|
|
this.form.level = this.sarr[this.sarr.length - 1].level; |
|
|
|
this.form.agencyId = this.sarr[this.sarr.length - 1].agencyId; |
|
|
|
@ -913,9 +917,11 @@ specialCategoryList: [ |
|
|
|
}, |
|
|
|
//导出数据 |
|
|
|
async exportTemplate() { |
|
|
|
debugger |
|
|
|
if(!this.form.name){ |
|
|
|
return this.$message.error("请输入模板名称") |
|
|
|
} |
|
|
|
debugger |
|
|
|
let url = "/actual/base/residentBaseInfo/exportExcelCustom" |
|
|
|
let params = { |
|
|
|
templateId: this.originId, |
|
|
|
@ -935,9 +941,12 @@ specialCategoryList: [ |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
debugger |
|
|
|
if(this.virtualResi){ |
|
|
|
params.searchForm.gridType = 'virtual' |
|
|
|
} |
|
|
|
debugger |
|
|
|
await this.$http({ |
|
|
|
method: 'POST', |
|
|
|
url, |
|
|
|
@ -945,9 +954,10 @@ specialCategoryList: [ |
|
|
|
data: params |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
|
|
|
|
// this.download(res.data, title + '.xls') |
|
|
|
// this.getTemplateList() |
|
|
|
console.log("dslkfskjfn jsklf "); |
|
|
|
console.log(res,"dslkfskjfn jsklf "); |
|
|
|
this.exportLoading = false |
|
|
|
// if (res.data.code && res.data.code == 9999) { |
|
|
|
// return this.$message.error(res.data.msg) |
|
|
|
@ -1221,19 +1231,26 @@ specialCategoryList: [ |
|
|
|
} |
|
|
|
}, |
|
|
|
formatData(res) { |
|
|
|
debugger |
|
|
|
const fileReader = new FileReader() |
|
|
|
console.log(fileReader.result,); |
|
|
|
debugger |
|
|
|
fileReader.onloadend = () => { |
|
|
|
try { |
|
|
|
const jsonData = JSON.parse(fileReader.result) // 说明是普通对象数据,后台转换失败 |
|
|
|
if (fileReader.result) { |
|
|
|
const jsonData = JSON.parse(fileReader.result) // 说明是普通对象数据,后台转换失败 |
|
|
|
// 后台信息 |
|
|
|
console.log('jsonData---1', jsonData) |
|
|
|
return this.$message.error(jsonData.msg) |
|
|
|
|
|
|
|
} |
|
|
|
return this.$message.error(jsonData.msg) |
|
|
|
} catch (err) { // 解析成对象失败,说明是正常的文件流 |
|
|
|
// 下载文件 |
|
|
|
console.log('errr-----', err, this) |
|
|
|
this.downloadFile(res) |
|
|
|
} |
|
|
|
} |
|
|
|
debugger |
|
|
|
fileReader.readAsText(res.data) |
|
|
|
}, |
|
|
|
downloadFile(res) { |
|
|
|
|