Commit e99e4d1a by liangzhen

暂存

1 parent 75be11c6
...@@ -30,6 +30,9 @@ axios.interceptors.request.use(config => { ...@@ -30,6 +30,9 @@ axios.interceptors.request.use(config => {
if(config.url.indexOf('oss/downloadObject')!='-1'){ if(config.url.indexOf('oss/downloadObject')!='-1'){
config.headers["Content-Type"] ='application/x-www-form-urlencoded' config.headers["Content-Type"] ='application/x-www-form-urlencoded'
} }
// else if(config.url.indexOf('oss/upload')!='-1'){
// config.headers["Content-Type"] ='application/form-data'
// }
// config.headers.token = JSON.parse(localStorage.getItem('token')).token; // config.headers.token = JSON.parse(localStorage.getItem('token')).token;
......
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
</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" v-if="scope.row.confirmStatus == '1'&&scope.row.fileId">
{{ {{
scope.row.fileName scope.row.fileName
}} <el-button @click="handleClickXZ(scope.row)">下载</el-button> }} <el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template> </template>
...@@ -611,19 +611,19 @@ export default { ...@@ -611,19 +611,19 @@ export default {
this.file = event.target.files[0]; this.file = event.target.files[0];
}, },
submitFile(row) { submitFile(row) {
this.$message("上传还没做");
return; // return;
console.log(row); console.log(row);
if (this.file) { if (this.file) {
const formData = new FormData(); const formData = new FormData();
formData.append("file", this.file); formData.append("file", this.file);
formData.append("prjId", this.checkedList[0].projectId); // formData.append("prjId", this.checkedList[0].projectId);
formData.append("typeCode", row.typeCode); // formData.append("typeCode", row.typeCode);
ossupload(formData) ossupload(formData)
.then((response) => { .then((response) => {
console.log(response); console.log(response);
this.$set(row, "fileName", response.data.fileName); this.$set(row, "fileId", response.data.fileId);
}) })
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);
......
...@@ -16,10 +16,18 @@ ...@@ -16,10 +16,18 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="后评估批次名称:" prop="batchName" class="fromItem"> <el-form-item label="后评估批次名称:" prop="batchName" class="fromItem">
<el-input v-model="ruleForm.batchName" placeholder="请输入" clearable></el-input> <el-input
v-model="ruleForm.batchName"
placeholder="请输入"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="后评估状态:" prop="postEvalState" class="fromItem"> <el-form-item label="后评估状态:" prop="postEvalState" class="fromItem">
<el-select v-model="ruleForm.postEvalState" placeholder="请选择" clearable> <el-select
v-model="ruleForm.postEvalState"
placeholder="请选择"
clearable
>
<el-option label="未下发" value="0"></el-option> <el-option label="未下发" value="0"></el-option>
<el-option label="已下发" value="1"></el-option> <el-option label="已下发" value="1"></el-option>
<el-option label="已撤回" value="2"></el-option> <el-option label="已撤回" value="2"></el-option>
...@@ -60,7 +68,11 @@ ...@@ -60,7 +68,11 @@
<el-table-column prop="batchName" label="后评估批次名称"> <el-table-column prop="batchName" label="后评估批次名称">
</el-table-column> </el-table-column>
<el-table-column prop="projectName" label="评估项目名称" show-overflow-tooltip> <el-table-column
prop="projectName"
label="评估项目名称"
show-overflow-tooltip
>
</el-table-column> </el-table-column>
<el-table-column prop="projectCategory" label="建设形式"> <el-table-column prop="projectCategory" label="建设形式">
</el-table-column> </el-table-column>
...@@ -127,11 +139,23 @@ ...@@ -127,11 +139,23 @@
<el-table-column label="序号" width="100" prop="questionId"> <el-table-column label="序号" width="100" prop="questionId">
</el-table-column> </el-table-column>
<el-table-column label="问题检查项" prop="quesCheckItem" width="200"> <el-table-column
label="问题检查项"
prop="quesCheckItem"
width="200"
>
</el-table-column> </el-table-column>
<el-table-column label="检查说明" prop="checkDesc" show-overflow-tooltip> <el-table-column
label="检查说明"
prop="checkDesc"
show-overflow-tooltip
>
</el-table-column> </el-table-column>
<el-table-column label="评估问题" prop="evalQues" width="300"> <el-table-column
label="评估问题"
prop="evalQues"
show-overflow-tooltip
>
</el-table-column> </el-table-column>
<el-table-column label="问题确认" width="auto"> <el-table-column label="问题确认" width="auto">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -144,6 +168,7 @@ ...@@ -144,6 +168,7 @@
active-text="无异议" active-text="无异议"
inactive-text="有异议" inactive-text="有异议"
@change="controlSwitch($event, scope.row)" @change="controlSwitch($event, scope.row)"
disabled
> >
<template v-slot:active> <template v-slot:active>
<span>开启</span> <span>开启</span>
...@@ -155,14 +180,17 @@ ...@@ -155,14 +180,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="解释批注" width="200"> <el-table-column label="解释批注" width="200">
<template slot-scope="scope"> <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="附加解释材料" prop="fileId" width="400"> <el-table-column label="附加解释材料" prop="fileId" width="400">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<input type="file" @change="handleFileUpload" /> <input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row, 'fileId')">上传</button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -170,10 +198,14 @@ ...@@ -170,10 +198,14 @@
prop="rectificationStatus" prop="rectificationStatus"
width="200" width="200"
> >
<template slot-scope="scope"> <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="请选择"
disabled
> >
<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>
...@@ -183,20 +215,20 @@ ...@@ -183,20 +215,20 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="上传整改材料" prop="zgFileId" width="400">
label="上传整改材料" <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
prop="rectificationStatus"
width="400"
>
<template slot-scope="scope">
<input type="file" @change="handleFileUpload" /> <input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row, 'zgFileId')">
上传
</button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="情况说明" prop="zgqkFileId" width="400"> <el-table-column label="情况说明" prop="zgqkFileId" width="400">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<input type="file" @change="handleFileUpload" /> <input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row, 'zgqkFileId')">
上传
</button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -221,100 +253,126 @@ ...@@ -221,100 +253,126 @@
</h3> </h3>
<div class="continer"> <div class="continer">
<p class="xqtitle"><span></span>问题清单</p> <p class="xqtitle"><span></span>问题清单</p>
<div class="setTable"> <div class="setTable">
<el-table <el-table
:data="tableDataSS" :data="tableDataSS"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
header-cell-class-name="custom-th-background" header-cell-class-name="custom-th-background"
class="eltable" class="eltable"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
:span-method="arraySpanMethodss" :span-method="arraySpanMethodss"
border border
>
<el-table-column
label="项目环节"
prop="projectStagetext"
width="150"
> >
</el-table-column> <el-table-column
<el-table-column label="序号" width="100" prop="questionId"> label="项目环节"
</el-table-column> prop="projectStagetext"
width="150"
>
</el-table-column>
<el-table-column label="序号" width="100" prop="questionId">
</el-table-column>
<el-table-column
label="问题检查项"
prop="quesCheckItem"
width="200"
>
</el-table-column>
<el-table-column
label="检查说明"
prop="checkDesc"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label="评估问题"
prop="evalQues"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="问题确认" width="auto">
<template slot-scope="scope">
<el-switch
v-model="scope.row.confirmStatus"
active-color="#C0C0C0"
inactive-color="#13ce66"
active-value="2"
inactive-value="1"
active-text="无异议"
inactive-text="有异议"
disabled
@change="controlSwitch($event, scope.row)"
>
<template v-slot:active>
<span>开启</span>
</template>
<template v-slot:inactive>
<span>关闭</span>
</template>
</el-switch>
</template>
</el-table-column>
<el-table-column label="解释批注" width="200">
<template
slot-scope="scope"
v-if="scope.row.confirmStatus == '1'"
>
<el-input v-model="scope.row.feedback" disabled></el-input>
</template>
</el-table-column>
<el-table-column label="问题检查项" prop="quesCheckItem" width="200"> <el-table-column label="附加解释材料" prop="fileId" width="400">
</el-table-column> <template
<el-table-column label="检查说明" prop="checkDesc" show-overflow-tooltip> slot-scope="scope"
</el-table-column> v-if="scope.row.confirmStatus == '1' && scope.row.fileId"
<el-table-column label="评估问题" prop="evalQues" width="300">
</el-table-column>
<el-table-column label="问题确认" width="auto">
<template slot-scope="scope">
<el-switch
v-model="scope.row.confirmStatus"
active-color="#C0C0C0"
inactive-color="#13ce66"
active-value="2"
inactive-value="1"
active-text="无异议"
inactive-text="有异议"
@change="controlSwitch($event, scope.row)"
> >
<template v-slot:active> {{ scope.row.fileName }}
<span>开启</span> <el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template> </template>
<template v-slot:inactive> </el-table-column>
<span>关闭</span> <el-table-column
</template> label="复核情况"
</el-switch> prop="rectificationStatus"
</template> width="200"
</el-table-column> >
<el-table-column label="解释批注" width="200"> <template
<template slot-scope="scope"> slot-scope="scope"
<el-input v-model="scope.row.feedback"></el-input> v-if="scope.row.confirmStatus == '1'"
</template>
</el-table-column>
<el-table-column label="附加解释材料" prop="fileId" width="400">
<template slot-scope="scope">
<input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button>
</template>
</el-table-column>
<el-table-column
label="复核情况"
prop="rectificationStatus"
width="200"
>
<template slot-scope="scope">
<el-select
v-model="scope.row.appealStatus"
placeholder="请选择"
> >
<el-option label="请选择" value=""></el-option> <el-select
<el-option label="未申诉" :value="0"></el-option> v-model="scope.row.appealStatus"
<el-option label="已申诉" :value="1"></el-option> placeholder="请选择"
<el-option label="申诉驳回" :value="2"></el-option> disabled
<el-option label="申诉通过" :value="3"></el-option> >
</el-select> <el-option label="请选择" value=""></el-option>
</template> <el-option label="未申诉" :value="0"></el-option>
</el-table-column> <el-option label="已申诉" :value="1"></el-option>
<el-table-column <el-option label="申诉驳回" :value="2"></el-option>
label="上传整改材料" <el-option label="申诉通过" :value="3"></el-option>
prop="rectificationStatus" </el-select>
width="400" </template>
> </el-table-column>
<template slot-scope="scope"> <el-table-column label="上传整改材料" prop="zgFileId" width="400">
<input type="file" @change="handleFileUpload" /> <template
<button @click="submitFile(scope.row)">上传</button> slot-scope="scope"
</template> v-if="scope.row.confirmStatus == '1' && scope.row.fileId"
</el-table-column> >
<el-table-column label="情况说明" prop="zgqkFileId" width="400"> {{ scope.row.fileName }}
<template slot-scope="scope"> <el-button @click="handleClickXZ(scope.row)">下载</el-button>
<input type="file" @change="handleFileUpload" /> </template>
<button @click="submitFile(scope.row)">上传</button> </el-table-column>
</template> <el-table-column label="情况说明" prop="zgqkFileId" width="400">
</el-table-column> <template
</el-table> slot-scope="scope"
</div> 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>
</div>
</div> </div>
</div> </div>
<p class="midBtn"> <p class="midBtn">
...@@ -330,7 +388,8 @@ import { ...@@ -330,7 +388,8 @@ import {
wtssSelProblemRectification, wtssSelProblemRectification,
wtzgProblemRectification, wtzgProblemRectification,
wtzgxfProblemRectification, wtzgxfProblemRectification,
ossupload ossupload,
downloadObject,
} from "@/api/index"; } from "@/api/index";
export default { export default {
data() { data() {
...@@ -373,9 +432,9 @@ export default { ...@@ -373,9 +432,9 @@ export default {
this.tableData.forEach((item) => { this.tableData.forEach((item) => {
if (item.reviewStatus == "6") { if (item.reviewStatus == "6") {
this.$set(item, "postEvalState", "整改未完成"); this.$set(item, "postEvalState", "整改未完成");
}else if (item.reviewStatus == "7") { } else if (item.reviewStatus == "7") {
this.$set(item, "postEvalState", "整改已完成"); this.$set(item, "postEvalState", "整改已完成");
}else { } else {
this.$set(item, "postEvalState", "整改提交"); this.$set(item, "postEvalState", "整改提交");
} }
}); });
...@@ -576,11 +635,11 @@ export default { ...@@ -576,11 +635,11 @@ export default {
if (res.code == "200") { if (res.code == "200") {
this.tableDataSS = res.data.records; this.tableDataSS = res.data.records;
this.tableDataSS.forEach((item) => { this.tableDataSS.forEach((item) => {
if(!item.confirmStatus){ if (!item.confirmStatus) {
this.$set(item, "confirmStatus", "2") this.$set(item, "confirmStatus", "2");
} }
switch (item.projectStage) { switch (item.projectStage) {
case "1": case "1":
this.$set(item, "projectStagetext", "1.可研"); this.$set(item, "projectStagetext", "1.可研");
break; break;
case "2": case "2":
...@@ -608,30 +667,47 @@ export default { ...@@ -608,30 +667,47 @@ export default {
console.log("来了么"); console.log("来了么");
this.file = event.target.files[0]; this.file = event.target.files[0];
}, },
submitFile(row) { submitFile(row, type) {
this.$message("上传还没做");
return; // return;
console.log(row); console.log(row);
if (this.file) { if (this.file) {
const formData = new FormData(); const formData = new FormData();
formData.append("file", this.file); formData.append("file", this.file);
formData.append("prjId", this.checkedList[0].projectId);
formData.append("typeCode", row.typeCode);
ossupload(formData) ossupload(formData)
.then((response) => { .then((response) => {
console.log(response); console.log(response);
this.$set(row, "fileName", response.data.fileName); this.file =[]
this.$set(row, type, response.data.fileId);
}) })
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);
}); });
}else{
this.$message('请先选择文件')
} }
}, },
closed() { closed() {
console.log("关闭"); console.log("关闭");
this.handleSelectionChange(); this.handleSelectionChange();
}, },
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> </script>
......
...@@ -242,7 +242,8 @@ export default { ...@@ -242,7 +242,8 @@ export default {
data() { data() {
return { return {
listData: {}, listData: {},
qdtableData: [], qdtableData: JSON.parse(JSON.stringify(MaterialsList())),
tableDataNew:MaterialsList(),
xxtableData:[], xxtableData:[],
showButton: true, showButton: true,
ruleForm: { ruleForm: {
...@@ -312,9 +313,28 @@ export default { ...@@ -312,9 +313,28 @@ export default {
console.log(res[0], res[1], "2222222"); console.log(res[0], res[1], "2222222");
this.listData = res[0].data.records[0]; this.listData = res[0].data.records[0];
this.qdtableData = res[1].data.records; this.qdtableData = res[1].data.records;
this.qdtableData.forEach((item) => { this.qdtableData=this.tableDataNew
this.$set(item, "batchtype", "开发、实施类"); if (res[1].data.records.length > 0) {
}); this.qdtableData = this.qdtableData
.concat(res.data.records)
.reduce((accumulator, currentObj) => {
const existingObj = accumulator.find(
(obj) => obj.typeCode == currentObj.typeCode
);
if (existingObj) {
Object.assign(existingObj, currentObj);
} else {
accumulator.push(currentObj);
}
return accumulator;
}, []);
console.log( this.tableDataQD,' mergedArray mergedArray mergedArray')
// this.tableDataQD.forEach((item) => {
// // this.$set(item, "batchtype", "开发、实施类");
// });
}
}); });
}, },
......
...@@ -205,6 +205,7 @@ ...@@ -205,6 +205,7 @@
active-text="无异议" active-text="无异议"
inactive-text="有异议" inactive-text="有异议"
@change="controlSwitch($event, scope.row)" @change="controlSwitch($event, scope.row)"
disabled
> >
<template v-slot:active> <template v-slot:active>
<span>开启</span> <span>开启</span>
...@@ -216,14 +217,14 @@ ...@@ -216,14 +217,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="解释批注" width="200"> <el-table-column label="解释批注" width="200">
<template slot-scope="scope"> <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="附加解释材料" prop="fileId" width="400"> <el-table-column label="附加解释材料" prop="fileId" width="400">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus=='1'">
<input type="file" @change="handleFileUpload" /> <input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row,'fileId')">上传</button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -231,10 +232,11 @@ ...@@ -231,10 +232,11 @@
prop="rectificationStatus" prop="rectificationStatus"
width="200" width="200"
> >
<template slot-scope="scope"> <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="请选择"
disabled
> >
<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>
...@@ -246,18 +248,18 @@ ...@@ -246,18 +248,18 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="上传整改材料" label="上传整改材料"
prop="rectificationStatus" prop="zgFileId"
width="400" width="400"
> >
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus=='1'">
<input type="file" @change="handleFileUpload" /> <input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row,'zgFileId')">上传</button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="情况说明" prop="zgqkFileId" width="400"> <el-table-column label="情况说明" prop="zgqkFileId" width="400">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus=='1'">
<input type="file" @change="handleFileUpload" /> <input type="file" @change="handleFileUpload" />
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row,'zgqkFileId')">上传</button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -265,7 +267,7 @@ ...@@ -265,7 +267,7 @@
prop="rectificationStatus" prop="rectificationStatus"
width="200" width="200"
> >
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus=='1'">
<el-select <el-select
v-model="scope.row.rectificationStatus" v-model="scope.row.rectificationStatus"
placeholder="请选择" placeholder="请选择"
...@@ -340,6 +342,7 @@ ...@@ -340,6 +342,7 @@
active-text="无异议" active-text="无异议"
inactive-text="有异议" inactive-text="有异议"
@change="controlSwitch($event, scope.row)" @change="controlSwitch($event, scope.row)"
disabled
> >
<template v-slot:active> <template v-slot:active>
<span>开启</span> <span>开启</span>
...@@ -352,24 +355,26 @@ ...@@ -352,24 +355,26 @@
</el-table-column> </el-table-column>
<el-table-column label="解释批注" width="200"> <el-table-column label="解释批注" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.feedback"></el-input> <el-input v-model="scope.row.feedback" disabled></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="附加解释材料" prop="fileId" width="400"> <el-table-column label="附加解释材料" prop="fileId" width="400">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'&&scope.row.fileId">
<input type="file" @change="handleFileUpload" /> {{
<button @click="submitFile(scope.row)">上传</button> scope.row.fileName
</template> }} <el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="复核情况" label="复核情况"
prop="rectificationStatus" prop="rectificationStatus"
width="200" width="200"
> >
<template slot-scope="scope"> <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="请选择"
disabled
> >
<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>
...@@ -381,19 +386,21 @@ ...@@ -381,19 +386,21 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="上传整改材料" label="上传整改材料"
prop="rectificationStatus" prop="zgFileId"
width="400" width="400"
> >
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'&&scope.row.fileId">
<input type="file" @change="handleFileUpload" /> {{
<button @click="submitFile(scope.row)">上传</button> scope.row.fileName
</template> }} <el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template>
</el-table-column> </el-table-column>
<el-table-column label="情况说明" prop="zgqkFileId" width="400"> <el-table-column label="情况说明" prop="zgqkFileId" width="400">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'&&scope.row.fileId">
<input type="file" @change="handleFileUpload" /> {{
<button @click="submitFile(scope.row)">上传</button> scope.row.fileName
</template> }} <el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -412,7 +419,8 @@ import { ...@@ -412,7 +419,8 @@ import {
wtssSelectificationVerification, wtssSelectificationVerification,
bcrectificationVerification, bcrectificationVerification,
tjrectificationVerification, tjrectificationVerification,
ossupload ossupload,
downloadObject
} from "@/api/index"; } from "@/api/index";
export default { export default {
data() { data() {
...@@ -690,30 +698,50 @@ export default { ...@@ -690,30 +698,50 @@ export default {
console.log("来了么"); console.log("来了么");
this.file = event.target.files[0]; this.file = event.target.files[0];
}, },
submitFile(row) { submitFile(row,type) {
this.$message("上传还没做");
return; // return;
console.log(row); console.log(row);
if (this.file) { if (this.file) {
const formData = new FormData(); const formData = new FormData();
formData.append("file", this.file); formData.append("file", this.file);
formData.append("prjId", this.checkedList[0].projectId); // formData.append("prjId", this.checkedList[0].projectId);
formData.append("typeCode", row.typeCode); // formData.append("typeCode", row.typeCode);
ossupload(formData) ossupload(formData)
.then((response) => { .then((response) => {
console.log(response); console.log(response);
this.$set(row, "fileName", response.data.fileName); this.file =[]
this.$set(row, type, response.data.fileId );
}) })
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);
}); });
}else{
this.$message('请先选择文件')
} }
}, },
closed() { closed() {
console.log("关闭"); console.log("关闭");
this.handleSelectionChange(); this.handleSelectionChange();
}, },
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> </script>
......
...@@ -242,8 +242,8 @@ ...@@ -242,8 +242,8 @@
<el-table-column label="材料类别" prop="batchtype"> </el-table-column> <el-table-column label="材料类别" prop="batchtype"> </el-table-column>
<el-table-column prop="typeText" label="资料类型"> </el-table-column> <el-table-column prop="typeText" label="资料类型"> </el-table-column>
<el-table-column prop="fileName" label="资料名称"> <el-table-column prop="fileName" label="资料名称">
<template slot-scope="scope"> <template slot-scope="scope" v-if="scope.row.fileName">
<el-button @click="handleClickXZ(scope.row)">{{scope.row.fileName}}</el-button> {{scope.row.fileName}}&nbsp;&nbsp;<el-button @click="handleClickXZ(scope.row)">下载</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -435,10 +435,6 @@ export default { ...@@ -435,10 +435,6 @@ export default {
// }); // });
} }
// this.tableDataQD.forEach((item) => {
// this.$set(item, "batchtype", "开发、实施类");
// });
// this.total = res.data.total * 1;
}, },
//详情 //详情
async detailsForm() { async detailsForm() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!