Commit 7882de70 by liangzhen

下载功能

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