d7b91eb4 by jiaozeping@pashanhoo.com

登记薄查询

1 parent 6d377d9d
......@@ -32,6 +32,27 @@ export function getJdcxBysearch (data) {
})
}
// 导出数据-进度查询
export function exportJdcxExcel (params) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/exportJdcxExcel',
method: 'post',
params,
responseType: 'blob'
})
}
// 导出数据-登记簿查询
export function exportdjbcxExcel (params) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/search/exportdjbcxExcel',
method: 'post',
params,
responseType: 'blob'
})
}
/**
* @description: 证书领取查询
* @param {*} data
......
......@@ -96,13 +96,16 @@
width: 300px;
}
.el-button--small{
font-size: 14px;
}
.slxx_title {
border-bottom: 1px solid $borderColor;
padding-left: 10px;
padding-bottom: 5px;
margin-bottom: 5px;
margin-top: 5px;
margin-top: 10px;
font-size: 16px;
font-weight: 500;
color: #4a4a4a;
......
......@@ -49,7 +49,7 @@
padding-left: 10px;
padding-bottom: 5px;
margin-bottom: 5px;
margin-top: 5px;
margin-top: 10px;
font-size: 16px;
font-weight: 500;
color: #4a4a4a;
......
......@@ -79,6 +79,8 @@
<el-form-item>
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button>
<el-button @click="export_fun">导出</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -97,7 +99,7 @@
import { mapGetters } from "vuex";
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./djbcxdata";
import { getDjbBysearch } from "@/api/search.js";
import { getDjbBysearch,exportdjbcxExcel } from "@/api/search.js";
import { getZrzListByBsmSlsq } from "@/api/workflow/zjgcdyFlow.js";
export default {
......@@ -202,7 +204,46 @@
zdbsm: item.zrzbsm,
onlyShow: true
}, '90%', true)
}
},
// 导出
export_fun() {
this.$confirm(
`确认导出数据吗,是否继续?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
// 导出函数
this.dataExport({ ...this.queryForm });
})
.catch((err) => {
this.$message({
type: "info",
message: "已取消导出",
});
});
},
// 导出选中项
dataExport(arr) {
exportdjbcxExcel({ ...this.queryForm }).then((res) => {
// 下载后台传过来的流文件(excel)后解决乱码问题
const _a = document.createElement("a");
let blob = new Blob([res], { type: "application/vnd.ms-excel" });
_a.style.display = "none";
_a.href = URL.createObjectURL(blob);
// _a.download = res.headers['content-disposition'] // 下载后文件名
_a.download = "登记薄查询" + new Date().toLocaleString(); // 下载的文件名
document.body.appendChild(_a);
_a.click();
document.body.removeChild(_a);
});
},
}
}
</script>
......
......@@ -40,7 +40,7 @@
</el-form-item>
</el-col>
<el-col :span="3" class="btnColRight">
<el-button @click="handleReset">重置</el-button>
<!-- <el-button @click="handleReset">重置</el-button> -->
</el-col>
</el-row>
<el-row>
......@@ -72,7 +72,7 @@
<el-form-item>
<el-button @click="handleReset">重置</el-button>
<el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button>
<!-- <el-button @click="moreQueryClick">高级查询</el-button> -->
<el-button @click="export_fun">导出</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -91,7 +91,7 @@
import { mapGetters } from 'vuex'
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./jdcxdata";
import { getJdcxBysearch } from "@/api/search.js"
import { getJdcxBysearch,exportJdcxExcel } from "@/api/search.js"
export default {
name: "jdcx",
components: {},
......@@ -170,7 +170,46 @@
);
window.open(href, `workFrameView${item.bsmSlsq}`)
}
}
},
// 导出
export_fun() {
this.$confirm(
`确认导出数据吗,是否继续?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
// 导出函数
this.dataExport({ ...this.queryForm });
})
.catch((err) => {
this.$message({
type: "info",
message: "已取消导出",
});
});
},
// 导出选中项
dataExport(arr) {
exportJdcxExcel({ ...this.queryForm }).then((res) => {
// 下载后台传过来的流文件(excel)后解决乱码问题
const _a = document.createElement("a");
let blob = new Blob([res], { type: "application/vnd.ms-excel" });
_a.style.display = "none";
_a.href = URL.createObjectURL(blob);
// _a.download = res.headers['content-disposition'] // 下载后文件名
_a.download = "进度查询" + new Date().toLocaleString(); // 下载的文件名
document.body.appendChild(_a);
_a.click();
document.body.removeChild(_a);
});
},
}
}
</script>
......