Browse Source

Merge branch 'fix_bug' into dev

feature
mk 2 years ago
parent
commit
d6ca124ebb
  1. 42
      src/views/modules/base/smartImport/cpts/createdTask.vue
  2. 1
      src/views/modules/portrayal/jumin/index.vue

42
src/views/modules/base/smartImport/cpts/createdTask.vue

@ -446,28 +446,40 @@ export default {
data: params,
})
.then((res) => {
if (res.status==200) {
// if (res.status==200) {
// let fileName = window.decodeURI(
// res.headers["content-disposition"]
// .split(";")[1]
// .split("=")[1]
// );
let fileName = `${
// let fileName = `${
// this.$store.state.user.agencyName + this.categoryName
// }`;
// 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("");
let fileName = `${
this.$store.state.user.agencyName + this.categoryName
}导入模板`;
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("下载失败");
const url = res.data.data;
const aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download",`${fileName}.xlsx`);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink);
window.URL.revokeObjectURL(url);
})
.catch((err) => {
console.log(err);

1
src/views/modules/portrayal/jumin/index.vue

@ -1206,7 +1206,6 @@ export default {
if(keysWithValueOneName[i] === this.originalExpandList[k].title){
for(let c in this.menuList){
if(this.menuList[c].name === keysWithValueOneName[i] || this.menuList[c].name === '基本信息' || this.menuList[c].name === '拓展信息' || this.menuList[c].name === '居住信息' ){
console.log(this.menuList[c]);
if(this.menuList.findIndex(item=>item.name === keysWithValueOneName[i]) === -1){
this.menuList.push(this.menuList[c])
}

Loading…
Cancel
Save