Commit 20f6d6de by liangzhen

后评估修改

1 parent 07f0ad44
......@@ -275,6 +275,11 @@ export function gdrectificationVerification(params) {
export function downloadObject(params) {
return download(`${ARCH_EVALUATION}/oss/downloadObject`, params)
}
//下载归档
export function downloadObjectAll(params) {
return download(`${ARCH_EVALUATION}/oss/downloadObjectAll`, params)
}
//后评估集中检查
//项目检查问题查询
......
......@@ -23,7 +23,7 @@ export const routes = [
path: '/',
name: 'main',
component: () => import('@/views/layout/index.vue'),
redirect: defaultRouter(),
redirect: '/layout/main',
children: [
{
path: '/mainLayout',
......@@ -31,6 +31,14 @@ export const routes = [
redirect: defaultRouter(),
component: () => import('@/views/layout/mainLayout.vue'),
children: [
{
path: '/layout/main',
name: 'main',
component: () => import('@/views/layout/main.vue'),
meta: {
title: "首页",
},
},
//后评估自查
{
path: '/assesszc/auxiliarySelection',
......
......@@ -98,6 +98,9 @@
<el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
<el-button @click="downFiles()">
<i class="el-icon-download"></i> &nbsp;&nbsp;归档材料下载</el-button
>
</el-form-item>
</el-form>
<div class="setscroll">
......@@ -341,6 +344,7 @@ import {
selLcb,
presignedUrl,
downloadObject,
downloadObjectAll
} from "@/api/index";
import { generateYearOptions, projectCategoryText } from "@/utils/cache";
export default {
......@@ -611,14 +615,14 @@ export default {
},
handleImageClick() {},
async handleClickXZ(scope) {
console.log(scope.fileId);
let response = await downloadObject({
fileId: scope.fileId * 1,
});
let blob = new Blob([response]);
if ("download" in document.createElement("a")) {
let elink = document.createElement("a");
elink.download = scope.fileName;
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
......@@ -627,6 +631,27 @@ export default {
document.body.removeChild(elink);
}
},
async downFiles(){
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
if(this.checkedList[0].postEvalStateText!='已归档'){
this.$message("该项目还未归档,请重新选择");
return;
}
let response = await downloadObjectAll({
prjId:this.checkedList[0].projectId,
bathId: this.checkedList[0].batchId,
});
let blob = new Blob([response], { type: 'application/zip' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '归档' // 重命名文件
link.click()
URL.revokeObjectURL(url) // 释放内存
}
},
};
</script>
......
......@@ -98,6 +98,9 @@
<el-button @click="detailsForm('ruleForm')">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
<el-button @click="downFiles()">
<i class="el-icon-download"></i> &nbsp;&nbsp;归档材料下载</el-button
>
</el-form-item>
</el-form>
<div class="setscroll">
......@@ -341,6 +344,7 @@ import {
selLcb,
presignedUrl,
downloadObject,
downloadObjectAll
} from "@/api/index";
import { generateYearOptions, projectCategoryText } from "@/utils/cache";
export default {
......@@ -401,10 +405,9 @@ export default {
let params = {
current: this.currentPage,
pageSize: this.pageSize,
module:1
module:1,
};
Object.assign(params, this.ruleForm);
console.log(params);
let res = await fzcxselect(params);
if (res.code == "200") {
......@@ -517,7 +520,6 @@ export default {
}
},
async handleClick() {
console.log(this.activeName, "this.activeName");
if (this.activeName == "second") {
let params = {
batchId: this.checkedList[0].batchId,
......@@ -557,13 +559,13 @@ export default {
// 有url拆分调接口换预览
if (urlStr) {
console.log(urlStr, "urlStr");
if (urlStr.includes(",")) {
arrUrl = item.url.split(",");
} else {
arrUrl.push(urlStr);
}
console.log(arrUrl, "arrUrlarrUrl");
arrUrl.forEach(async (showUrl) => {
let paramsUrl = {
url: showUrl,
......@@ -571,7 +573,7 @@ export default {
let resUrl = await presignedUrl(paramsUrl);
showUrlList.push(resUrl.msg);
});
console.log(showUrlList, "showUrlList");
this.$set(item, "images", showUrlList);
}
......@@ -613,14 +615,14 @@ export default {
},
handleImageClick() {},
async handleClickXZ(scope) {
console.log(scope.fileId);
let response = await downloadObject({
fileId: scope.fileId * 1,
});
let blob = new Blob([response]);
if ("download" in document.createElement("a")) {
let elink = document.createElement("a");
elink.download = scope.fileName;
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
......@@ -629,6 +631,27 @@ export default {
document.body.removeChild(elink);
}
},
async downFiles(){
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
if(this.checkedList[0].postEvalStateText!='已归档'){
this.$message("该项目还未归档,请重新选择");
return;
}
let response = await downloadObjectAll({
prjId:this.checkedList[0].projectId,
bathId: this.checkedList[0].batchId,
});
let blob = new Blob([response], { type: 'application/zip' })
let url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '归档' // 重命名文件
link.click()
URL.revokeObjectURL(url) // 释放内存
}
},
};
</script>
......@@ -643,7 +666,7 @@ export default {
}
.el-form {
display: flex;
width: 100%;
width: 99%;
flex-wrap: wrap;
border-top: 2px solid #23c6c8;
border-left: 1px solid #dee5e7;
......
<template>
<div class="main">
<h2>后评估工作流程图</h2>
<div class="mainpng">
<img src="../../assets/main.png" alt="">
</div>
</div>
</template>
<script>
export default {
}
</script>
<style>
.main {
font-size: 14px;
position: relative;
height: 100%;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
h2{
margin-top: 60px;
}
.mainpng{
margin-top: 50px;
width: 100%;
img{
width: 100%;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!