Commit db0fe8ee by liangzhen

暂存

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