Commit 7882de70 by liangzhen

下载功能

1 parent e603c8d3
// 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')
import { get, post, download } from '@/utils/http' import { get, post, download } from '@/utils/http'
...@@ -251,3 +252,8 @@ export function tjrectificationVerification(params) { ...@@ -251,3 +252,8 @@ export function tjrectificationVerification(params) {
export function materialSync(params) { export function materialSync(params) {
return post(`/arch-evaluation/materialSync/`, params) return post(`/arch-evaluation/materialSync/`, params)
} }
//下载
export function downloadObject(params) {
return post(`/arch-evaluation/oss/downloadObject`, qs.stringify(params))
}
...@@ -26,6 +26,10 @@ function decryptStringBySM4_CBC(str) {//使用sm4-cbc算法给字符串解密 ...@@ -26,6 +26,10 @@ function decryptStringBySM4_CBC(str) {//使用sm4-cbc算法给字符串解密
axios.interceptors.request.use(config => { axios.interceptors.request.use(config => {
config.headers['X-USER'] =sessionStorage.getItem('author'); config.headers['X-USER'] =sessionStorage.getItem('author');
config.headers['X-USER-NAME']=sessionStorage.getItem('authorName') config.headers['X-USER-NAME']=sessionStorage.getItem('authorName')
console.log(config.url.indexOf('oss/downloadObject')!='-1','config.url')
if(config.url.indexOf('oss/downloadObject')!='-1'){
config.headers["Content-Type"] ='application/x-www-form-urlencoded'
}
// config.headers.token = JSON.parse(localStorage.getItem('token')).token; // config.headers.token = JSON.parse(localStorage.getItem('token')).token;
......
<template> <template>
<div class="main"> <div class="main">
<el-form :model="ruleForm" label-width="100px" class="demo-ruleForm" ref="formName"> <el-form
<el-form-item label="批次年度:" prop="batchYear" class="fromItem" > :model="ruleForm"
label-width="100px"
class="demo-ruleForm"
ref="formName"
>
<el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-select v-model="ruleForm.batchYear" placeholder="请选择" clearable> <el-select v-model="ruleForm.batchYear" placeholder="请选择" clearable>
<el-option label="2024年" value="2024"></el-option> <el-option label="2024年" value="2024"></el-option>
<el-option label="2023年" value="2023"></el-option> <el-option label="2023年" value="2023"></el-option>
...@@ -11,10 +16,18 @@ ...@@ -11,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>
...@@ -48,7 +61,8 @@ ...@@ -48,7 +61,8 @@
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
border border
> >
<el-table-column label="序号" width="55" type="index"> </el-table-column> <el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column> <el-table-column type="selection"> </el-table-column>
<el-table-column label="批次年度" prop="batchYear"> </el-table-column> <el-table-column label="批次年度" prop="batchYear"> </el-table-column>
<el-table-column prop="batchName" label="后评估批次名称"> <el-table-column prop="batchName" label="后评估批次名称">
...@@ -69,7 +83,8 @@ ...@@ -69,7 +83,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="rectificationDeadline" label="问题整改截止时间"> <el-table-column prop="rectificationDeadline" label="问题整改截止时间">
</el-table-column> </el-table-column>
<el-table-column prop="postEvalStateText" label="复核状态"> </el-table-column> <el-table-column prop="postEvalStateText" label="复核状态">
</el-table-column>
<!-- <el-table-column prop="reviewStatus" label="后评估状态"> </el-table-column> --> <!-- <el-table-column prop="reviewStatus" label="后评估状态"> </el-table-column> -->
<el-table-column prop="reviewDate" label="评估日期"> </el-table-column> <el-table-column prop="reviewDate" label="评估日期"> </el-table-column>
</el-table> </el-table>
...@@ -121,7 +136,11 @@ ...@@ -121,7 +136,11 @@
<el-table-column label="问题检查项" prop="quesCheckItem"> <el-table-column label="问题检查项" prop="quesCheckItem">
</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"> <el-table-column label="评估问题" prop="evalQues">
</el-table-column> </el-table-column>
...@@ -146,20 +165,32 @@ ...@@ -146,20 +165,32 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="解释批注" > <el-table-column label="解释批注">
<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="附加解释材料" width="400">
<template slot-scope="scope"> <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"> <input type="file" @change="handleFileUpload">
<button @click="submitFile(scope.row)">上传</button> <button @click="submitFile(scope.row)">上传</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"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<el-select v-model="scope.row.appealStatus" placeholder="请选择"> <el-select
v-model="scope.row.appealStatus"
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>
<el-option label="已申诉" :value="1"></el-option> <el-option label="已申诉" :value="1"></el-option>
...@@ -170,11 +201,9 @@ ...@@ -170,11 +201,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<p class="midBtn"> <p class="midBtn">
<span @click="cancelSS()">取消</span <span @click="cancelSS()">取消</span><span @click="saveSS()">保存</span>
><span @click="saveSS()">保存</span>
</p> </p>
</el-dialog> </el-dialog>
<!-- 复核下发 --> <!-- 复核下发 -->
...@@ -212,7 +241,11 @@ ...@@ -212,7 +241,11 @@
<el-table-column label="问题检查项" prop="quesCheckItem"> <el-table-column label="问题检查项" prop="quesCheckItem">
</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"> <el-table-column label="评估问题" prop="evalQues">
</el-table-column> </el-table-column>
...@@ -237,20 +270,24 @@ ...@@ -237,20 +270,24 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="解释批注" > <el-table-column label="解释批注">
<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="附加解释材料" 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
}} <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"> <template slot-scope="scope" v-if="scope.row.confirmStatus == '1'">
<el-select v-model="scope.row.appealStatus" placeholder="请选择"> <el-select
v-model="scope.row.appealStatus"
placeholder="请选择"
>
<el-option label="请选择" :value="null"></el-option> <el-option label="请选择" :value="null"></el-option>
<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>
...@@ -261,23 +298,27 @@ ...@@ -261,23 +298,27 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<p class="midBtn"> <p class="midBtn">
<span @click="cancel()">取消</span <span @click="cancel()">取消</span><span @click="save()">问题下发</span>
><span @click="save()">问题下发</span>
</p> </p>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { appealAssistanceConfirmatio,ossupload, wtfhappealAssistanceConfirmatio,xfappealAssistanceConfirmatio,wtssSelAssistanceConfirmatio} from "@/api/index"; import {
export default { appealAssistanceConfirmatio,
ossupload,
wtfhappealAssistanceConfirmatio,
xfappealAssistanceConfirmatio,
wtssSelAssistanceConfirmatio,
downloadObject
} from "@/api/index";
export default {
data() { data() {
return { return {
dialogSS:false, dialogSS: false,
ruleForm: { ruleForm: {
batchYear: "", batchYear: "",
batchName: "", batchName: "",
...@@ -305,7 +346,7 @@ ...@@ -305,7 +346,7 @@
}, },
tableData: [], tableData: [],
tableDataQR: [], tableDataQR: [],
tableDataSS:[], tableDataSS: [],
checkedList: [], checkedList: [],
currentPage: 1, currentPage: 1,
pageSizetjcl: 10, pageSizetjcl: 10,
...@@ -350,8 +391,8 @@ ...@@ -350,8 +391,8 @@
}, },
//问题复核 //问题复核
async confirm() { async confirm() {
this.mergingPos=0; this.mergingPos = 0;
this.mergingRows=[] this.mergingRows = [];
if (this.checkedList.length != 1) { if (this.checkedList.length != 1) {
this.$message("请选择一条数据进行复核"); this.$message("请选择一条数据进行复核");
return; return;
...@@ -366,7 +407,6 @@ ...@@ -366,7 +407,6 @@
if (res.code == "200") { if (res.code == "200") {
this.tableDataQR = res.data.records; this.tableDataQR = res.data.records;
this.tableDataQR.forEach((item) => { this.tableDataQR.forEach((item) => {
switch (item.projectStage) { switch (item.projectStage) {
case "1": case "1":
this.$set(item, "projectStagetext", "1.可研"); this.$set(item, "projectStagetext", "1.可研");
...@@ -387,9 +427,8 @@ ...@@ -387,9 +427,8 @@
this.$set(item, "projectStagetext", "6.结决算及转资"); this.$set(item, "projectStagetext", "6.结决算及转资");
break; break;
} }
}); });
console.log(this.tableDataQR,'加不进去?') console.log(this.tableDataQR, "加不进去?");
this.dataPretreatment(); this.dataPretreatment();
} }
}, },
...@@ -436,7 +475,6 @@ ...@@ -436,7 +475,6 @@
} }
}, },
//表格颜色 //表格颜色
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
...@@ -446,10 +484,10 @@ ...@@ -446,10 +484,10 @@
}, },
//主列表选中行信息 //主列表选中行信息
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log('222222') console.log("222222");
if (Array.isArray(selection) && selection.length > 1) { if (Array.isArray(selection) && selection.length > 1) {
console.log('222222333',this.checkedList) console.log("222222333", this.checkedList);
this.$refs.multipleTable.toggleRowSelection(selection[0], false); this.$refs.multipleTable.toggleRowSelection(selection[0], false);
this.$refs.multipleTable.toggleRowSelection(selection[1], true); this.$refs.multipleTable.toggleRowSelection(selection[1], true);
} }
...@@ -491,40 +529,39 @@ ...@@ -491,40 +529,39 @@
controlSwitch(val, row) { controlSwitch(val, row) {
console.log("333", val, row); console.log("333", val, row);
}, },
cancelSS(){ cancelSS() {
this.dialogQR=false this.dialogQR = false;
}, },
async save(){ async save() {
let res= await xfappealAssistanceConfirmatio(this.tableDataSS) let res = await xfappealAssistanceConfirmatio(this.tableDataSS);
if(res.code=='200'){ if (res.code == "200") {
this.dialogSS=false this.dialogSS = false;
this.resetForm() this.resetForm();
}else{ } else {
this.$message('复核下发失败') this.$message("复核下发失败");
} }
}, },
cancel(){ cancel() {
this.dialogSS=false this.dialogSS = false;
}, },
async saveSS(){ async saveSS() {
let res= await wtfhappealAssistanceConfirmatio(this.tableDataQR) let res = await wtfhappealAssistanceConfirmatio(this.tableDataQR);
if(res.code=='200'){ if (res.code == "200") {
this.dialogQR=false this.dialogQR = false;
this.resetForm() this.resetForm();
} }
}, },
//问题下发 //问题下发
async appeal(){ async appeal() {
this.mergingPosss=0; this.mergingPosss = 0;
this.mergingRowsss=[]; this.mergingRowsss = [];
if (this.checkedList.length != 1) { if (this.checkedList.length != 1) {
this.$message("请选择一条数据进行下发"); this.$message("请选择一条数据进行下发");
return; return;
} }
if(this.checkedList[0].postEvalStateText=='复核已下发'){ if (this.checkedList[0].postEvalStateText == "复核已下发") {
this.$message("请选择未下发的数据"); this.$message("请选择未下发的数据");
return return;
} }
this.dialogSS = true; this.dialogSS = true;
let params = { let params = {
...@@ -536,8 +573,8 @@ ...@@ -536,8 +573,8 @@
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":
...@@ -559,55 +596,79 @@ ...@@ -559,55 +596,79 @@
this.$set(item, "projectStagetext", "6.结决算及转资"); this.$set(item, "projectStagetext", "6.结决算及转资");
break; break;
} }
}); });
console.log(this.tableDataSS) console.log(this.tableDataSS);
this.dataPretreatmentSS(); this.dataPretreatmentSS();
} }
}, },
handleFileUpload(event) { handleFileUpload(event) {
console.log('来了么') console.log("来了么");
this.file = event.target.files[0]; this.file = event.target.files[0];
}, },
submitFile(row) { submitFile(row) {
this.$message('上传还没做') 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).then(response => { ossupload(formData)
.then((response) => {
console.log(response); console.log(response);
this.$set(row,'fileName',response.data.fileName) this.$set(row, "fileName", response.data.fileName);
}) })
.catch(error => { .catch((error) => {
console.error(error); console.error(error);
}); });
} }
}, },
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
})
// 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 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>
<style scoped lang="scss"> <style scoped lang="scss">
.main { .main {
font-size: 14px; font-size: 14px;
position: relative; position: relative;
height: 100%; height: 100%;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
overflow-x: hidden; overflow-x: hidden;
} }
.el-form { .el-form {
display: flex; display: flex;
width: 99%; width: 99%;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -658,40 +719,39 @@ ...@@ -658,40 +719,39 @@
color: #fff; color: #fff;
} }
} }
} }
.eltable { .eltable {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
width: 150%; width: 150%;
min-width: 150%; min-width: 150%;
// margin-right: 210px; // margin-right: 210px;
// margin-top: 3vh; // margin-top: 3vh;
} }
/deep/ .el-table .warning-row { /deep/ .el-table .warning-row {
background: #f0ffff; background: #f0ffff;
// color: #2785e6; // color: #2785e6;
} }
.elpagination { .elpagination {
text-align: right; text-align: right;
margin-right: 100px; margin-right: 100px;
} }
/deep/ .el-dialog { /deep/ .el-dialog {
border-radius: 10px; border-radius: 10px;
margin-top: 3vh !important; margin-top: 3vh !important;
margin-left: 3vw !important; margin-left: 3vw !important;
}
} /deep/.el-table th.el-table__cell.is-leaf,
/deep/.el-table th.el-table__cell.is-leaf, .el-table td.el-table__cell {
.el-table td.el-table__cell {
text-align: center; text-align: center;
} }
/deep/ .el-dialog__wrapper { /deep/ .el-dialog__wrapper {
position: absolute; position: absolute;
} }
/deep/ .v-modal { /deep/ .v-modal {
position: absolute; position: absolute;
} }
/deep/ .el-dialog__header { /deep/ .el-dialog__header {
background-color: #0d867f; background-color: #0d867f;
padding-bottom: 20px; padding-bottom: 20px;
text-align: left; text-align: left;
...@@ -699,16 +759,16 @@ ...@@ -699,16 +759,16 @@
.el-dialog__title { .el-dialog__title {
color: #fff; color: #fff;
} }
} }
/deep/ .el-table__header th { /deep/ .el-table__header th {
background-color: #eeeeee; background-color: #eeeeee;
font-weight: bold; font-weight: bold;
.cell { .cell {
color: #333; color: #333;
} }
} }
/deep/.el-table { /deep/.el-table {
// width: 100%; // width: 100%;
.el-table__header-wrapper table, .el-table__header-wrapper table,
.el-table__body-wrapper table { .el-table__body-wrapper table {
...@@ -719,15 +779,15 @@ ...@@ -719,15 +779,15 @@
.el-table__header { .el-table__header {
table-layout: auto; table-layout: auto;
} }
} }
.textarea { .textarea {
width: 100%; width: 100%;
.el-textarea { .el-textarea {
width: 60%; width: 60%;
} }
} }
.Btn { .Btn {
width: 200px; width: 200px;
margin: 0 auto; margin: 0 auto;
height: 30px; height: 30px;
...@@ -749,11 +809,11 @@ ...@@ -749,11 +809,11 @@
border: 1px solid #0d867f; border: 1px solid #0d867f;
color: #fff; color: #fff;
} }
} }
/deep/ .el-dialog__headerbtn .el-dialog__close { /deep/ .el-dialog__headerbtn .el-dialog__close {
color: #fff; color: #fff;
} }
.zjBtn { .zjBtn {
width: 400px; width: 400px;
text-align: left; text-align: left;
vertical-align: middle; vertical-align: middle;
...@@ -772,14 +832,14 @@ ...@@ -772,14 +832,14 @@
padding: 5px 10px; padding: 5px 10px;
margin-left: 10px; margin-left: 10px;
} }
} }
/deep/ .el-icon-position { /deep/ .el-icon-position {
margin-right: 10px; margin-right: 10px;
} }
/deep/ .el-icon-folder-delete { /deep/ .el-icon-folder-delete {
margin-right: 10px; margin-right: 10px;
} }
.cxItem { .cxItem {
text-align: right; text-align: right;
width: 20%; width: 20%;
.zjquery { .zjquery {
...@@ -792,8 +852,8 @@ ...@@ -792,8 +852,8 @@
line-height: 40px; line-height: 40px;
border-radius: 5px; border-radius: 5px;
} }
} }
.midBtn { .midBtn {
margin: 0 auto; margin: 0 auto;
margin-top: 20px; margin-top: 20px;
span { span {
...@@ -814,8 +874,8 @@ ...@@ -814,8 +874,8 @@
color: #fff; color: #fff;
border: 1px solid #4ca6a7; border: 1px solid #4ca6a7;
} }
} }
.dialog { .dialog {
height: 680px; height: 680px;
overflow-y: auto; overflow-y: auto;
.xqtitle { .xqtitle {
...@@ -861,85 +921,84 @@ ...@@ -861,85 +921,84 @@
width: 160px !important; width: 160px !important;
} }
} }
} }
/deep/.el-table th.el-table__cell.is-leaf, /deep/.el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell { .el-table td.el-table__cell {
text-align: center; text-align: center;
} }
/deep/ .el-table__cell { /deep/ .el-table__cell {
text-align: center; text-align: center;
} }
h3 { h3 {
text-align: left; text-align: left;
} }
/deep/.el-switch__core { /deep/.el-switch__core {
height: 30px; height: 30px;
width: 79px !important; width: 79px !important;
border-radius: 20px; border-radius: 20px;
} }
/deep/.el-switch.is-checked .el-switch__core::after { /deep/.el-switch.is-checked .el-switch__core::after {
margin-left: -28px; margin-left: -28px;
} }
/deep/ .el-switch_label { /deep/ .el-switch_label {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
/deep/.el-switch { /deep/.el-switch {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
border-radius: 20px; border-radius: 20px;
} }
/deep/ .el-switch__label * { /deep/ .el-switch__label * {
font-size: 12px; font-size: 12px;
} }
/deep/.el-switch__core:after { /deep/.el-switch__core:after {
width: 26px; width: 26px;
height: 26px; height: 26px;
} }
/deep/.el-switch__label--left { /deep/.el-switch__label--left {
position: absolute; position: absolute;
left: 30px; left: 30px;
color: #fff; color: #fff;
z-index: -1111; z-index: -1111;
cursor: default; cursor: default;
user-select: none; user-select: none;
} }
/deep/.el-switch__label--right { /deep/.el-switch__label--right {
position: absolute; position: absolute;
right: 30px; right: 30px;
color: #fff; color: #fff;
z-index: -1111; z-index: -1111;
cursor: default; cursor: default;
user-select: none; user-select: none;
} }
/deep/.el-switch__label--right.is-active { /deep/.el-switch__label--right.is-active {
z-index: 1111; z-index: 1111;
color: grey !important; color: grey !important;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
}
} /deep/.el-switch__label--left.is-active {
/deep/.el-switch__label--left.is-active {
z-index: 1111; z-index: 1111;
color: #fff !important; color: #fff !important;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
/deep/ .el-dialog__body{ /deep/ .el-dialog__body {
padding-bottom: 5px; padding-bottom: 5px;
} }
.setscroll{ .setscroll {
width: 100%; width: 100%;
height: 650px; height: 650px;
overflow: auto; overflow: auto;
padding-right: 500px; padding-right: 500px;
} }
.dialog{ .dialog {
.eltable { .eltable {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
...@@ -948,7 +1007,7 @@ ...@@ -948,7 +1007,7 @@
// margin-right: 210px; // margin-right: 210px;
// margin-top: 3vh; // margin-top: 3vh;
} }
} }
// ::-webkit-scrollbar { // ::-webkit-scrollbar {
// width: 6px; // 横向滚动条 // width: 6px; // 横向滚动条
...@@ -956,5 +1015,4 @@ ...@@ -956,5 +1015,4 @@
// height: 6px; // 纵向滚动条必写 // height: 6px; // 纵向滚动条必写
// } // }
</style>
</style> \ No newline at end of file
\ No newline at end of file
<template> <template>
<div class="main"> <div class="main">
<el-form :model="ruleForm" label-width="100px" class="demo-ruleForm" ref="formName"> <el-form
:model="ruleForm"
label-width="100px"
class="demo-ruleForm"
ref="formName"
>
<el-form-item label="批次年度:" prop="batchYear" class="fromItem"> <el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-select v-model="ruleForm.batchYear" placeholder="请选择" clearable> <el-select v-model="ruleForm.batchYear" placeholder="请选择" clearable>
<el-option label="2024年" value="2024"></el-option> <el-option label="2024年" value="2024"></el-option>
...@@ -11,10 +16,18 @@ ...@@ -11,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>
...@@ -49,13 +62,18 @@ ...@@ -49,13 +62,18 @@
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
border border
> >
<el-table-column label="序号" width="55" type="index"> </el-table-column> <el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column> <el-table-column type="selection"> </el-table-column>
<el-table-column label="批次年度" prop="batchYear"> </el-table-column> <el-table-column label="批次年度" prop="batchYear"> </el-table-column>
<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>
...@@ -70,7 +88,8 @@ ...@@ -70,7 +88,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="rectificationDeadline" label="问题整改截止时间"> <el-table-column prop="rectificationDeadline" label="问题整改截止时间">
</el-table-column> </el-table-column>
<el-table-column prop="postEvalStateText" label="申诉状态"> </el-table-column> <el-table-column prop="postEvalStateText" label="申诉状态">
</el-table-column>
<!-- <el-table-column prop="reviewStatus" label="后评估状态"> </el-table-column> --> <!-- <el-table-column prop="reviewStatus" label="后评估状态"> </el-table-column> -->
<el-table-column prop="reviewDate" label="评估日期"> </el-table-column> <el-table-column prop="reviewDate" label="评估日期"> </el-table-column>
</el-table> </el-table>
...@@ -122,7 +141,11 @@ ...@@ -122,7 +141,11 @@
<el-table-column label="问题检查项" prop="quesCheckItem"> <el-table-column label="问题检查项" prop="quesCheckItem">
</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"> <el-table-column label="评估问题" prop="evalQues">
</el-table-column> </el-table-column>
...@@ -150,11 +173,9 @@ ...@@ -150,11 +173,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<p class="midBtn"> <p class="midBtn">
<span @click="cancelSS()">取消</span <span @click="cancelSS()">取消</span><span @click="saveSS()">确认</span>
><span @click="saveSS()">确认</span>
</p> </p>
</el-dialog> </el-dialog>
<!-- 申诉 --> <!-- 申诉 -->
...@@ -192,7 +213,11 @@ ...@@ -192,7 +213,11 @@
<el-table-column label="问题检查项" prop="quesCheckItem"> <el-table-column label="问题检查项" prop="quesCheckItem">
</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"> <el-table-column label="评估问题" prop="evalQues">
</el-table-column> </el-table-column>
...@@ -218,36 +243,51 @@ ...@@ -218,36 +243,51 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="解释批注" > <el-table-column label="解释批注">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.feedback" v-if="scope.row.confirmStatus=='1'"></el-input> <el-input
v-model="scope.row.feedback"
v-if="scope.row.confirmStatus == '1'"
></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">
<input type="file" @change="handleFileUpload" v-if="scope.row.confirmStatus=='1'"> <input
<button @click="submitFile(scope.row)" v-if="scope.row.confirmStatus=='1'">上传</button> type="file"
@change="handleFileUpload"
v-if="scope.row.confirmStatus == '1'"
/>
<button
@click="submitFile(scope.row)"
v-if="scope.row.confirmStatus == '1'"
>
上传
</button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<p class="midBtn"> <p class="midBtn">
<span @click="cancel()">取消</span <span @click="cancel()">取消</span><span @click="save()">申诉</span>
><span @click="save()">申诉</span>
</p> </p>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { ProblemAssistedFeedback,ossupload,qrProblemAssistedFeedback,wtssSelProblemAssistedFeedback,ssProblemAssistedFeedback } from "@/api/index"; import {
ProblemAssistedFeedback,
ossupload,
qrProblemAssistedFeedback,
wtssSelProblemAssistedFeedback,
ssProblemAssistedFeedback,
} from "@/api/index";
export default { export default {
data() { data() {
return { return {
dialogSS:false, dialogSS: false,
ruleForm: { ruleForm: {
batchYear: "", batchYear: "",
batchName: "", batchName: "",
...@@ -275,7 +315,7 @@ export default { ...@@ -275,7 +315,7 @@ export default {
}, },
tableData: [], tableData: [],
tableDataQR: [], tableDataQR: [],
tableDataSS:[], tableDataSS: [],
checkedList: [], checkedList: [],
currentPage: 1, currentPage: 1,
pageSizetjcl: 10, pageSizetjcl: 10,
...@@ -324,8 +364,8 @@ export default { ...@@ -324,8 +364,8 @@ export default {
}, },
//确认问题 //确认问题
async confirm() { async confirm() {
this.mergingPos=0; this.mergingPos = 0;
this.mergingRows=[] this.mergingRows = [];
if (this.checkedList.length != 1) { if (this.checkedList.length != 1) {
this.$message("请选择一条数据进行确认"); this.$message("请选择一条数据进行确认");
return; return;
...@@ -340,8 +380,8 @@ export default { ...@@ -340,8 +380,8 @@ export default {
if (res.code == "200") { if (res.code == "200") {
this.tableDataQR = res.data.records; this.tableDataQR = res.data.records;
this.tableDataQR.forEach((item) => { this.tableDataQR.forEach((item) => {
if(!item.confirmStatus){ if (!item.confirmStatus) {
this.$set(item, "confirmStatus", "2") this.$set(item, "confirmStatus", "2");
} }
switch (item.projectStage) { switch (item.projectStage) {
...@@ -364,9 +404,8 @@ export default { ...@@ -364,9 +404,8 @@ export default {
this.$set(item, "projectStagetext", "6.结决算及转资"); this.$set(item, "projectStagetext", "6.结决算及转资");
break; break;
} }
}); });
console.log(this.tableDataQR) console.log(this.tableDataQR);
this.dataPretreatment(); this.dataPretreatment();
} }
}, },
...@@ -413,7 +452,6 @@ export default { ...@@ -413,7 +452,6 @@ export default {
} }
}, },
//表格颜色 //表格颜色
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
...@@ -423,10 +461,10 @@ export default { ...@@ -423,10 +461,10 @@ export default {
}, },
//主列表选中行信息 //主列表选中行信息
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log('222222') console.log("222222");
if (Array.isArray(selection) && selection.length > 1) { if (Array.isArray(selection) && selection.length > 1) {
console.log('222222333',this.checkedList) console.log("222222333", this.checkedList);
this.$refs.multipleTable.toggleRowSelection(selection[0], false); this.$refs.multipleTable.toggleRowSelection(selection[0], false);
this.$refs.multipleTable.toggleRowSelection(selection[1], true); this.$refs.multipleTable.toggleRowSelection(selection[1], true);
} }
...@@ -437,12 +475,12 @@ export default { ...@@ -437,12 +475,12 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.pageSize = val; this.pageSize = val;
this.submitForm() this.submitForm();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.currentPage = val; this.currentPage = val;
this.submitForm() this.submitForm();
}, },
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { if (columnIndex === 0) {
...@@ -470,33 +508,40 @@ export default { ...@@ -470,33 +508,40 @@ export default {
controlSwitch(val, row) { controlSwitch(val, row) {
console.log("333", val, row); console.log("333", val, row);
}, },
cancelSS(){ cancelSS() {
this.dialogQR=false this.dialogQR = false;
}, },
async save(){ async save() {
console.log(this.tableDataSS,'this.tableDataSS') console.log(this.tableDataSS, "this.tableDataSS");
this.tableDataSS.forEach((item) => {
if (item.confirmStatus == "1") {
if (!item.feedback) {
this.$message("有未填写的的解释批注");
throw new Error("主动跳出循环");
}
}
});
// return // return
let res= await ssProblemAssistedFeedback(this.tableDataSS) let res = await ssProblemAssistedFeedback(this.tableDataSS);
if(res.code=='200'){ if (res.code == "200") {
this.dialogSS=false this.dialogSS = false;
this.resetForm() this.resetForm();
} }
}, },
cancel(){ cancel() {
this.dialogSS=false this.dialogSS = false;
}, },
async saveSS(){ async saveSS() {
let res= await qrProblemAssistedFeedback(this.tableDataQR) let res = await qrProblemAssistedFeedback(this.tableDataQR);
if(res.code=='200'){ if (res.code == "200") {
this.dialogQR=false this.dialogQR = false;
this.resetForm() this.resetForm();
} }
}, },
//申诉 //申诉
async appeal(){ async appeal() {
this.mergingPosss=0; this.mergingPosss = 0;
this.mergingRowsss=[]; this.mergingRowsss = [];
if (this.checkedList.length != 1) { if (this.checkedList.length != 1) {
this.$message("请选择一条数据进行申诉"); this.$message("请选择一条数据进行申诉");
return; return;
...@@ -516,8 +561,8 @@ export default { ...@@ -516,8 +561,8 @@ 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":
...@@ -539,42 +584,42 @@ export default { ...@@ -539,42 +584,42 @@ export default {
this.$set(item, "projectStagetext", "6.结决算及转资"); this.$set(item, "projectStagetext", "6.结决算及转资");
break; break;
} }
}); });
console.log(this.tableDataSS) console.log(this.tableDataSS);
this.dataPretreatmentSS(); this.dataPretreatmentSS();
} }
}, },
handleFileUpload(event) { handleFileUpload(event) {
console.log('来了么') console.log("来了么");
this.file = event.target.files[0]; this.file = event.target.files[0];
}, },
submitFile(row) { submitFile(row) {
// this.$message('上传还没做') // 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);
ossupload(formData).then(response => { ossupload(formData)
.then((response) => {
console.log(response); console.log(response);
this.$set(row,'file_id',response.data.file_id) if (response.code == "200") {
// this.tableDataSS.forEach(item=>{ this.$set(row, "fileId", response.data.fileId);
this.$message("上传成功");
// }) } else {
// this.$set(row,'fileName',response.data.fileName) this.$message("上传失败");
}
}) })
.catch(error => { .catch((error) => {
console.error(error); console.error(error);
this.$message("上传失败");
}); });
} }
}, },
closed(){ closed() {
console.log("关闭") console.log("关闭");
this.handleSelectionChange() this.handleSelectionChange();
} },
}, },
}; };
</script> </script>
...@@ -655,7 +700,6 @@ export default { ...@@ -655,7 +700,6 @@ export default {
/deep/ .el-dialog { /deep/ .el-dialog {
border-radius: 10px; border-radius: 10px;
margin-top: 3vh !important; margin-top: 3vh !important;
} }
/deep/.el-table th.el-table__cell.is-leaf, /deep/.el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell { .el-table td.el-table__cell {
...@@ -792,7 +836,7 @@ export default { ...@@ -792,7 +836,7 @@ export default {
} }
} }
.dialog { .dialog {
height:680px; height: 680px;
overflow-y: auto; overflow-y: auto;
.xqtitle { .xqtitle {
text-align: left; text-align: left;
...@@ -897,7 +941,6 @@ h3 { ...@@ -897,7 +941,6 @@ h3 {
color: grey !important; color: grey !important;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
/deep/.el-switch__label--left.is-active { /deep/.el-switch__label--left.is-active {
...@@ -906,7 +949,7 @@ h3 { ...@@ -906,7 +949,7 @@ h3 {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
/deep/ .el-dialog__body{ /deep/ .el-dialog__body {
padding-bottom: 15px; padding-bottom: 15px;
} }
.setscroll { .setscroll {
...@@ -916,10 +959,10 @@ h3 { ...@@ -916,10 +959,10 @@ h3 {
overflow: auto; overflow: auto;
} }
/deep/.el-table th.el-table__cell.is-leaf, /deep/.el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell { .el-table td.el-table__cell {
text-align: center; text-align: center;
} }
/deep/ .el-table__cell { /deep/ .el-table__cell {
text-align: center; text-align: center;
} }
</style> </style>
\ No newline at end of file
...@@ -546,7 +546,9 @@ export default { ...@@ -546,7 +546,9 @@ export default {
//_blank表示在新窗口打开链接 //_blank表示在新窗口打开链接
// link.target = '_blank' // link.target = '_blank'
// link.href =scope.url // link.href =scope.url
window.open(scope.url, '_blank'); if(scope.url){
window.open(scope.url, "_blank");
}
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!