Commit 73b21deb by liangzhen

评估材料自动获取

1 parent 7a9ac276
......@@ -74,6 +74,11 @@ export function updProjectInfo(params) {
export function evaluationMaterials(params) {
return post(`/api/evaluationMaterials/`, params)
}
//上传
export function ossupload(params) {
return post(`/api/oss/upload`, params)
}
//查询材料清单
export function clqdevaluationMaterials(params) {
return post(`/api/evaluationMaterials/clqd`, params)
......
......@@ -44,7 +44,7 @@
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button
>
<el-button @click="submitNexts()"
><i class="el-icon-finished"></i> 确认问题清单</el-button
><i class="el-icon-finished"></i>&nbsp;&nbsp;确认问题清单</el-button
>
</el-form-item>
</el-form>
......
......@@ -15,9 +15,9 @@
</el-form-item>
<el-form-item label="后评估状态:" prop="postEvalState" class="fromItem">
<el-select v-model="ruleForm.postEvalState" placeholder="请选择">
<el-option label="未下发" value="0"></el-option>
<el-option label="已下发" value="1"></el-option>
<el-option label="已撤回" value="2"></el-option>
<el-option label="已确认" value="3"></el-option>
<el-option label="未确认" value="1"></el-option>
<el-option label="已撤回" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item class="button">
......@@ -85,9 +85,10 @@
<el-dialog
title="提交评估材料"
:visible.sync="dialogXQ"
width="90%"
width="90%"
:modal-append-to-body="false"
:append-to-body="false"
close="closeXQ"
>
<div class="dialog">
<el-form
......@@ -265,7 +266,7 @@
</el-table-column>
<el-table-column fixed="right" label="操作" width="auto">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">删除</el-button>
<el-button @click="handleClick(scope.row,scope.$index,addtableData)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
......@@ -325,7 +326,7 @@
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="省公司计划文件号:" prop="字段待确认" class="fromItem">
<!-- <el-form-item label="省公司计划文件号:" prop="字段待确认" class="fromItem">
<el-input
v-model="ruleFormZJ.fullName"
placeholder="请输入"
......@@ -336,7 +337,7 @@
v-model="ruleFormZJ.fullName"
placeholder="请输入"
></el-input>
</el-form-item>
</el-form-item> -->
<el-form-item label="建设形式:" prop="projectCategory" class="fromItem">
<el-select v-model="ruleFormZJ.projectCategory" placeholder="请选择">
<el-option label="2024年" value="2024"></el-option>
......@@ -362,7 +363,7 @@
ref="multipleTableZJ"
:data="zjtableData"
tooltip-effect="dark"
style="width: 100%"
style="width: 100%;height: 100% "
header-cell-class-name="custom-th-background"
class="eltable"
:row-class-name="tableRowClassName"
......@@ -383,16 +384,16 @@
</el-table-column>
<el-table-column prop="projectStatus" label="项目建设阶段" width="200">
</el-table-column>
<el-table-column prop="字段待确认" label="历史核查状态" width="200">
<!-- <el-table-column prop="字段待确认" label="历史核查状态" width="200">
</el-table-column>
<el-table-column prop="字段待确认" label="是否处于正在执行批次" width="200">
</el-table-column>
<el-table-column prop="字段待确认" label="计划文号" width="300">
</el-table-column> -->
<!-- <el-table-column prop="字段待确认" label="计划文号" width="300">
<el-table-column prop="expertLevel" label="省公司" width="auto">
</el-table-column>
<el-table-column prop="expertLevel" label="信通公司" width="auto">
</el-table-column>
</el-table-column>
</el-table-column> -->
<el-table-column label="总投资计划(万元)" width="300">
<el-table-column prop=" costAmountTotal" label="成本金" width="auto">
</el-table-column>
......@@ -408,9 +409,9 @@
<el-table-column prop="department" label="部门" width="200">
</el-table-column>
<el-table-column prop="字段待确认" label="承建单位" width="200">
<el-table-column prop="department" label="承建单位" width="200">
</el-table-column>
<el-table-column prop="字段待确认" label="项目经理" width="200">
<el-table-column prop="personCharge" label="项目经理" width="200">
</el-table-column>
<el-table-column prop="projectInfo" label="项目内容" width="200">
</el-table-column>
......@@ -546,13 +547,12 @@ export default {
this.tableData = res.data.records;
this.tableData.forEach(item=>{
if (item.postEvalState==''||item.postEvalState==null){
// this.$set( item,'postEvalState','')
}else if (item.postEvalState=='0'){
this.$set( item,'postEvalState','未下发')
}else if(item.postEvalState=='2'){
}else if (item.postEvalState=='3'){
this.$set( item,'postEvalState','已确认')
}else if(item.postEvalState=='4'){
this.$set( item,'postEvalState','已撤回')
}else{
this.$set( item,'postEvalState','已下发')
this.$set( item,'postEvalState','未确认')
}
})
this.total = res.data.total * 1;
......@@ -574,14 +574,15 @@ export default {
this.dialogXQ = true;
this.ruleFormdialogBJ=this.checkedList[0]
let params={
// current:1,
// pageSize:10,
current:1,
pageSize:10,
batchId:this.checkedList[0].batchId
}
Object.assign(params, this.ruleFormdialogAdd);
let res=await joinProjectInfo(params)
if (res.code == "200") {
this.tableData = res.data.records;
// this.total = res.data.total * 1;
this.addtableData = res.data.records;
this.addtotal = res.data.total * 1;
}
},
......@@ -592,11 +593,16 @@ export default {
this.$message("请选择");
return;
}
if(this.checkedList[0].postEvalState=='已确认'){
this.$message("该项目已确认");
return;
}
this.ruleFormdialogBJ=this.checkedList[0]
this.dialogAdd=true
let params={
current:this.addcurrentPage,
pageSize:this.pageSizeAdd,
batchId:this.checkedList[0].batchId
}
Object.assign(params, this.ruleFormdialogAdd);
let res=await joinProjectInfo(params)
......@@ -605,6 +611,9 @@ export default {
this.addtotal = res.data.total * 1;
}
},
closeXQ(){
console.log('关闭详情')
},
//表格颜色
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
......@@ -655,7 +664,12 @@ export default {
this.$message("请选择项目");
return;
}
this.addtableData=this.addZJList;
this.addtableData=[...this.addtableData,...this.addZJList]
this.addtableData = this.addtableData.filter((obj, index, self)=>{
return index == self.findIndex(t =>t.projectId == obj.projectId)
})
console.log(this.addtableData, "addtableData");
this.addtotal = this.addtableData.length;
this.dialogAddzj = false;
......@@ -689,23 +703,20 @@ export default {
}
console.log(this.addZJList, "this.addZJList");
// 确认发布入参
let expertIdList = [];
let expertStr='';
this.addtableData.forEach((item) => {
expertIdList.push(item.projectId);
let expertIdList ="";
if(this.addZJList.length>0){
this.addZJList.forEach((item) => {
expertIdList= expertIdList.concat(item.projectId+',')
});
expertStr = JSON.stringify(expertIdList).slice(1, -1);
console.log(expertStr,'expertStexpertSt')
}
let params = {
expertStr: expertStr,
expertStr:expertIdList,
};
params.batchId=this.ruleFormdialogBJ.batchId
params.prjsOfExpert=this.ruleFormdialogBJ.prjsOfExpert
// this.ruleFormdialogBJ.expertStr={...expertIdList}
// Object.assign(this.ruleFormdialogBJ,params,);
console.log(params, "222");
fbProjectInfo(params).then((res) => {
this.dialogAdd = false;
......@@ -730,12 +741,14 @@ export default {
console.log(this.$refs.multipleTableZJ.selection, "2222");
},
//点击删除
async handleClick(index, row) {
console.log("删除",index, row)
async handleClick(row,index,rows) {
console.log("删除",row)
rows.splice(index, 1);
let params={
projectId:row.projectId,
batchId:this.checkedList[0].batchId
}
let res = await delProjectInfo(row);
let res = await delProjectInfo(params);
// this.configs()
},
//点击撤回
......@@ -745,7 +758,14 @@ export default {
this.$message("请选择");
return;
}
let res= await chProjectInfo(this.checkedList[0])
if(this.checkedList[0].postEvalState=='已撤回'){
this.$message("该项目已撤回");
return;
}
let res= await chProjectInfo({batchId:this.checkedList[0].batchId})
if(res.code='200'){
this.resetForm()
}
},
},
......
......@@ -74,13 +74,13 @@
</el-table-column>
<el-table-column prop="projectStatus" label="项目建设阶段">
</el-table-column>
<el-table-column prop="createTime" label="历史审核状态">
</el-table-column>
<el-table-column prop="planReviewDate" label="计划评估提起">
<el-table-column prop="待确认" label="历史审核状态"> </el-table-column>
<el-table-column prop="planReviewDate" label="计划评估日期">
</el-table-column>
<el-table-column prop="expertName" label="评审专家名单">
</el-table-column>
<el-table-column prop="column17" label="提交评估材料"> </el-table-column>
<el-table-column prop="postEvalState" label="提交评估材料">
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
......@@ -131,11 +131,11 @@
disabled
></el-input>
</el-form-item>
<el-form-item label="后评估专家:" prop="fullName" class="fromItem">
<el-form-item label="后评估专家:" prop="expertName" class="fromItem">
<el-input v-model="ruleFormdialog.fullName" disabled></el-input>
</el-form-item>
<el-form-item label="工作组织情况:" class="textarea">
<el-input type="textarea" v-model="ruleFormdialog.desc"></el-input>
<el-input type="textarea" v-model="ruleFormdialog.desc" disabled></el-input>
</el-form-item>
</el-form>
......@@ -154,12 +154,16 @@
<el-table-column label="序号" width="55" type="index">
</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="资料名称">
</el-table-column>
<el-table-column label="材料类别" prop="batchtype"> </el-table-column>
<el-table-column prop="typeCode" label="资料类型"> </el-table-column>
<el-table-column prop="fileName" label="资料名称"> </el-table-column>
<el-table-column prop="projectCategory" label="操作">
<template slot-scope="scope">
<input type="file" @change="handleFileUpload">
<button @click="submitFile(scope.row)">上传</button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChangetjcl"
......@@ -172,12 +176,97 @@
class="elpagination"
>
</el-pagination>
<p class="Btn" v-if="showButton">
<p class="Btn">
<span @click="cancel()">取消</span
><span @click="save('add')">确认上传</span>
><span @click="save()">确认上传</span>
</p>
</div>
</el-dialog>
<el-dialog
title="提交评估材料"
:visible.sync="dialogXQ"
width="90%"
:modal-append-to-body="false"
:append-to-body="false"
@close="closeDialog"
>
<div class="dialog">
<p class="xqtitle"><span></span>批次详情</p>
<el-form
:model="ruleFormdialog"
ref="ruleFormdialog"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-input v-model="ruleFormdialog.batchYear" disabled></el-input>
<!-- <el-select v-model="ruleFormdialog.batchYear" placeholder="请选择">
<el-option label="2024年" value="2024"></el-option>
<el-option label="2023年" value="2023"></el-option>
<el-option label="2022年" value="2022"></el-option>
<el-option label="2021年" value="2021"></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="后评估名称:" prop="batchName" class="fromItem">
<el-input v-model="ruleFormdialog.batchName" disabled></el-input>
</el-form-item>
<el-form-item
label="计划评审日期:"
prop="planReviewDate"
class="fromItem"
>
<el-input
v-model="ruleFormdialog.planReviewDate"
disabled
></el-input>
</el-form-item>
<el-form-item label="后评估专家:" prop="expertName" class="fromItem">
<el-input v-model="ruleFormdialog.fullName" disabled></el-input>
</el-form-item>
<el-form-item label="工作组织情况:" class="textarea">
<el-input type="textarea" v-model="ruleFormdialog.desc" disabled></el-input>
</el-form-item>
</el-form>
<p class="xqtitle"><span></span>本项目材料清单</p>
<el-table
@selection-change="handleSelectionChange"
ref="multipleTable"
:data="tableDataQD"
tooltip-effect="dark"
style="width: 100%"
header-cell-class-name="custom-th-background"
class="eltable"
:row-class-name="tableRowClassName"
border
>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column label="材料类别" prop="batchtype"> </el-table-column>
<el-table-column prop="typeCode" label="资料类型"> </el-table-column>
<el-table-column prop="fileName" label="资料名称"> </el-table-column>
<!-- <el-table-column prop="projectCategory" label="操作">
<template slot-scope="scope">
<input type="file" @change="handleFileUpload">
<button @click="submitFile(scope.row)">上传</button>
</template>
</el-table-column> -->
</el-table>
<el-pagination
@size-change="handleSizeChangetjcl"
@current-change="handleCurrentChangetjcl"
:current-page="currentPagetjcl"
:page-sizes="[10, 15, 20, 50]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
class="elpagination"
>
</el-pagination>
</div>
</el-dialog>
</div>
</template>
......@@ -186,10 +275,13 @@ import {
evaluationMaterials,
clqdevaluationMaterials,
qrscevaluationMaterials,
ossupload
} from "@/api/index";
export default {
data() {
return {
dialogXQ:false,
file:"",
showButton: true,
ruleForm: {
batchYear: "",
......@@ -231,86 +323,27 @@ export default {
this.submitForm();
},
methods: {
submitForm(formName) {
// this.$refs[formName].validate((valid) => {
// if (valid) {
// alert("submit!");
// } else {
// console.log("error submit!!");
// return false;
// }
// });
async submitForm(formName) {
let params = {
current: this.currentPage,
pageSize: this.pageSize,
};
Object.assign(params, this.ruleForm);
console.log(params);
(this.tableData = [
{
expertId: 1,
fullName: "王小明",
gender: 1,
birthday: "2024-04-23",
compId: 10001,
qualification: "硕士",
contact: "13241375678",
email: "115485@qq.com",
fields: "1",
expertLevel: 1,
description: "1",
expertState: 1,
creator: 1,
createTime: "2024-04-23 14:47:07",
lastUpdatedby: 1,
lastUpdateTime: "2024-04-23 14:47:12",
column14: 1,
},
{
expertId: 2,
fullName: "李晓帅",
gender: 0,
birthday: "2024-04-23",
compId: 10001,
qualification: "博士",
contact: "13241375678",
email: "115485@qq.com",
fields: "1",
expertLevel: 1,
description: "1",
expertState: 1,
creator: 1,
createTime: "2024-04-23 14:47:07",
lastUpdatedby: 1,
lastUpdateTime: "2024-04-23 14:47:12",
column14: 1,
},
{
expertId: 3,
fullName: "张晓楠",
gender: 1,
birthday: "2024-04-23",
compId: 10002,
qualification: "博士后",
contact: "13241375678",
email: "115485@qq.com",
fields: "1",
expertLevel: 1,
description: "1",
expertState: 1,
creator: 1,
createTime: "2024-04-23 14:47:07",
lastUpdatedby: 1,
lastUpdateTime: "2024-04-23 14:47:12",
column14: 1,
},
]),
(this.total = 2);
return;
let res = evaluationMaterials(params);
let res = await evaluationMaterials(params);
if (res.code == "200") {
this.tableData = res.data.records;
this.tableData.forEach((item) => {
if (item.postEvalState == "" || item.postEvalState == null) {
this.$set(item, "postEvalState", "未上传");
} else if (item.postEvalState == "0") {
this.$set(item, "postEvalState", "未上传");
} else if (item.postEvalState == "1") {
this.$set(item, "postEvalState", "已上传");
}
});
this.total = res.data.total * 1;
}
},
......@@ -331,18 +364,33 @@ export default {
let params = {
current: this.currentPage,
pageSize: this.pageSize,
projectId: this.checkedList[0].projectId,
};
let res = await clqdevaluationMaterials(params);
this.tableDataQD = res.data.records;
this.tableDataQD.forEach((item) => {
this.$set(item, "batchtype", "开发、实施类");
});
// this.total = res.data.total * 1;
},
//详情
detailsForm() {
async detailsForm() {
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
console.log("222");
this.dialog = true;
this.showButton = false;
this.dialogXQ = true;
let params = {
current: this.currentPage,
pageSize: this.pageSize,
projectId: this.checkedList[0].projectId,
};
let res = await clqdevaluationMaterials(params);
this.tableDataQD = res.data.records;
this.tableDataQD.forEach((item) => {
this.$set(item, "batchtype", "开发、实施类");
});
},
//表格颜色
tableRowClassName({ row, rowIndex }) {
......@@ -387,13 +435,37 @@ export default {
},
async save(type) {
this.dialog = false;
// this.dialogXQ = false;
if (type == "add") {
let params = {};
let params = {
projectId:this.checkedList[0].projectId,
batchId:this.checkedList[0].batchId
};
let res = await qrscevaluationMaterials(params);
}
this.resetForm()
},
},
handleFileUpload(event) {
console.log('来了么')
this.file = event.target.files[0];
},
submitFile(row) {
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);
ossupload(formData).then(response => {
console.log(response);
this.$set(row,'fileName',response.data.fileName)
})
.catch(error => {
console.error(error);
});
}
}
}
};
</script>
<style scoped lang="scss">
......@@ -549,7 +621,11 @@ export default {
/deep/ .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
/deep/.el-table th.el-table__cell.is-leaf, .el-table td.el-table__cell{
text-align: center;
/deep/.el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
text-align: center;
}
/deep/ .el-table__cell {
text-align: center;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!