Commit db0fe8ee by liangzhen

暂存

1 parent 7882de70
// import request from '@/utils/request'
// let mainURL="192.168.8.248:18101"
var qs = require('qs')
// var qs = require('qs')
import { get, post, download } from '@/utils/http'
......@@ -255,5 +255,5 @@ export function materialSync(params) {
//下载
export function downloadObject(params) {
return post(`/arch-evaluation/oss/downloadObject`, qs.stringify(params))
return post(`/arch-evaluation/oss/downloadObject`, params)
}
......@@ -166,18 +166,20 @@
</template>
</el-table-column>
<el-table-column label="解释批注">
<template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<el-input
v-model="scope.row.feedback"
></el-input>
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1'"
>
<el-input v-model="scope.row.feedback"></el-input>
</template>
</el-table-column>
<el-table-column label="附加解释材料" width="400">
<template slot-scope="scope" v-if="scope.row.confirmStatus == '1'&&scope.row.fileId">
{{
scope.row.fileName
}} <el-button @click="handleClickXZ(scope.row)">下载</el-button>
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1' && scope.row.fileId"
>
{{ scope.row.fileName }}
<el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template>
<!-- <template slot-scope="scope">
<input type="file" @change="handleFileUpload">
......@@ -185,11 +187,13 @@
</template> -->
</el-table-column>
<el-table-column label="复核情况" prop="rectificationStatus">
<template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1'"
>
<el-select
v-model="scope.row.appealStatus"
placeholder="请选择"
>
<el-option label="请选择" value=""></el-option>
<el-option label="未申诉" :value="0"></el-option>
......@@ -271,19 +275,27 @@
</template>
</el-table-column>
<el-table-column label="解释批注">
<template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1'"
>
<el-input v-model="scope.row.feedback"></el-input>
</template>
</el-table-column>
<el-table-column label="附加解释材料" width="400">
<template slot-scope="scope" v-if="scope.row.confirmStatus == '1'&&scope.row.fileId">
{{
scope.row.fileName
}} <el-button @click="handleClickXZ(scope.row)">下载</el-button>
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1' && scope.row.fileId"
>
{{ scope.row.fileName }}
<el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template>
</el-table-column>
<el-table-column label="复核情况" prop="rectificationStatus">
<template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1'"
>
<el-select
v-model="scope.row.appealStatus"
placeholder="请选择"
......@@ -313,7 +325,7 @@ import {
wtfhappealAssistanceConfirmatio,
xfappealAssistanceConfirmatio,
wtssSelAssistanceConfirmatio,
downloadObject
downloadObject,
} from "@/api/index";
export default {
data() {
......@@ -631,30 +643,20 @@ export default {
},
async handleClickXZ(scope) {
console.log(scope.fileId);
let response=await downloadObject({
fileId:scope.fileId*1
})
// const url = window.URL.createObjectURL(new Blob([response]));
// const link = document.createElement('a');
// link.href = url;
// link.setAttribute('download', 'file.pdf');
// document.body.appendChild(link);
// link.click();
let response = await downloadObject({
fileId: scope.fileId * 1,
});
let blob = new Blob([response]);
if ('download' in document.createElement('a')) {
let elink = document.createElement('a');
if ("download" in document.createElement("a")) {
let elink = document.createElement("a");
elink.download = scope.fileName;
elink.style.display = 'none';
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
}
},
},
};
......
......@@ -276,6 +276,7 @@ import {
clqdevaluationMaterials,
qrscevaluationMaterials,
ossupload,
downloadObject
} from "@/api/index";
export default {
data() {
......@@ -540,18 +541,24 @@ export default {
});
}
},
handleClickXZ(scope){
console.log(scope.url)
// const link = document.createElement('a')
//_blank表示在新窗口打开链接
// link.target = '_blank'
// link.href =scope.url
if(scope.url){
window.open(scope.url, "_blank");
}
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.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
}
},
},
};
</script>
<style scoped lang="scss">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!