Commit 23faf233 authored by ytbdmhy's avatar ytbdmhy

新增导出待审核的PDF及展示办理人和所属

parent e157cb1e
......@@ -397,6 +397,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -404,6 +410,7 @@
a.href = URL.createObjectURL(blob); //生成一个url
a.download = archive.number + "-" + archive.title + ".rar";
a.click();
}
this.loading = false;
})
.catch(err => {
......
......@@ -86,6 +86,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -95,6 +101,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -104,13 +104,20 @@ export default {
responseType:'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data],{
type:'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "西充县城乡居民社会养老保险参保登记表.pdf";
a.click();
}
this.loading = false;
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
......@@ -149,13 +156,20 @@ export default {
responseType:'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data],{
type:'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "居民养老保险表.xlsx";
a.click();
}
this.loading = false;
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
......
......@@ -96,6 +96,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -105,6 +111,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -76,6 +76,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -85,6 +91,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......@@ -121,6 +128,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -130,6 +143,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -71,6 +71,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -80,6 +86,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
})
.catch(err => {
console.log(err);
......
......@@ -79,6 +79,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -88,6 +94,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -97,6 +97,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -106,6 +112,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......@@ -142,6 +149,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -151,6 +164,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -76,6 +76,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -85,6 +91,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......@@ -121,6 +128,12 @@
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
......@@ -130,6 +143,7 @@
a.click();
// let objectUrl = URL.createObjectURL(blob); //生成一个url
// window.location.href = objectUrl; //浏览器打开这个url
}
this.loading = false;
})
.catch(err => {
......
......@@ -12,7 +12,7 @@
<el-button
type="primary"
size="mini"
style="background:#148A9B;margin-left:10px"
style="margin-left:10px"
icon="el-icon-search"
@click="paramSearch">搜索
</el-button>
......@@ -39,7 +39,7 @@
<el-form-item
label="当前档案案卷号"
label-width="110px"
style="width: 10%;float: left">
style="width: 11%;float: left">
<div class="masks"></div>
<el-input
size="small"
......
......@@ -34,16 +34,24 @@
</el-table-column>
<el-table-column
prop="name"
label="姓名"
width="180">
label="姓名">
</el-table-column>
<el-table-column
prop="recordtype"
label="业务类型">
</el-table-column>
<el-table-column
prop="transactor"
label="办理人">
</el-table-column>
<el-table-column
prop="transactorDivision"
label="办理人所属">
</el-table-column>
<el-table-column
prop="createtime"
label="创建时间">
label="创建时间"
width="180">
</el-table-column>
<el-table-column
prop="townname"
......@@ -59,7 +67,7 @@
</el-table-column>
<el-table-column
width="180"
width="240"
label="操作">
<template slot-scope="scope">
<el-button
......@@ -93,6 +101,11 @@
type="success"
>流程</el-button>
</el-popover>
<el-button
v-if="scope.row.recordtype !== '升档改办' && scope.row.recordtype !== '关系转移'"
@click="exportPdf(scope.$index, scope.row)"
size="mini"
type="primary">导出</el-button>
</template>
</el-table-column>
</el-table>
......@@ -153,7 +166,10 @@
import { Loading } from 'element-ui';
import Candode from "../Core/candode"
import KtButton from "@/views/Core/KtButton"
// import baseUrl from "../../globe/globeUrl"
import {baseUrl} from "../../utils/global"
import axios from "axios"
import Cookies from "js-cookie";
// import baseUrl from "../../globe/globeUrl"
export default {
components:{
KtButton,
......@@ -437,6 +453,47 @@
padding: CryptoJS.pad.Pkcs7
});
return decrypted.toString(CryptoJS.enc.Utf8);
},
exportPdf(index, row) {
if (row.recordtype === "关系转移" || row.recordtype === "升档改办") {
this.$message({
type: 'warning',
message: "[关系转移]或[升档改办]无法导出"
});
return;
}
this.loading = true;
axios.get(baseUrl + '/exportPdf/unaudited', {
headers: {
"token": Cookies.get("token")
},
params: {
"recordDataId": row.id,
"recordType": row.recordtype
},
responseType: 'blob' //告诉服务器我们需要的响应格式
})
.then(res => {
if (res.data === null || res.data.size === 0) {
this.$message({
type: 'success',
message: "该表格没有内容"
});
} else {
let a = document.createElement("a");
let blob = new Blob([res.data], {
type: 'application/vnd.ms-excel' //将会被放入到blob中的数组内容的MIME类型
});
a.href = URL.createObjectURL(blob); //生成一个url
a.download = "未审核" + row.recordtype + "表" + Date.now() + ".pdf";
a.click();
}
this.loading = false;
})
.catch(err => {
console.log(err);
this.loading = false;
});
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment