Commit f27b9f04 by henry

添加问查询界面

1 parent ae4021fc
<!-- 问题清单查询 -->
<!-- 问题清单 -->
<template>
<div class="main">
<el-form :model="ruleForm" label-width="100px" class="demo-ruleForm" ref="formName">
......@@ -25,11 +25,13 @@
</el-form-item>
<el-form-item label="项目环节:" prop="projectLink" class="fromItem" >
<el-select v-model="ruleForm.projectLink" placeholder="请选择">
<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="4"></el-option>
<el-option label="计划" value="5"></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="4"></el-option>
<el-option label="执行" value="5"></el-option>
<el-option label="结决算" value="6"></el-option>
<el-option label="转资" value="7"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否申诉:" prop="appealFlag" class="fromItem" >
......@@ -161,14 +163,7 @@
<script>
import {
expertInfo,
expert,
sendEvalBatchInfo,
adEvalBatchInfo,
updEvalBatchInfo,
evalBatchInfo,
delEvalBatchInfo,
chEvalBatchInfo,
} from "@/api/index";
export default {
data() {
......@@ -191,18 +186,6 @@
planReviewDate: "",
fullName: "",
},
ruleFormZJ: {
fields: "",
expertState: "",
fullName: "",
},
ruleFormdialogAdd: {
batchYear: "",
batchName: "",
planReviewDate: "",
description: "",
remark: "",
},
ruleFormdialogBJ: {
batchYear: "",
batchName: "",
......@@ -210,25 +193,6 @@
description: "",
remark: "",
},
rules: {
batchYear: [
{ required: true, message: "请选择批次年度", trigger: "change" },
],
batchName: [
{
required: true,
message: "请选择后评估批次名称",
trigger: "change",
},
],
planReviewDate: [
{
required: true,
message: "请选择计划评审日期",
trigger: "change",
},
],
},
xfParams: "", //下发入参
tableData: [],
tableDataQD: [], //清单列表
......@@ -240,13 +204,10 @@
dialogXQ: false,
currentPageBJ:1,
pageSizeBJ:10,
dialogAdd: false,
dialogAddzj: false,
pageSize: 10,
current: 1,
pageSizeZJ: 10,
currentZJ: 1,
addtotal: 0,
currentAdd: 1,
pageSizeAdd: 10,
......@@ -259,9 +220,6 @@
addZJList: [],
expertState: "",
fields: "",
zjfullName: "",
zjtotal: 0,
zjtableData: [],
addcurrentPage: 1,
addtableData: [],
message: {},
......@@ -284,14 +242,31 @@
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=='2'){
this.$set( item,'postEvalState','已撤回')
if (item.projectPhase==''||item.projectPhase==null){
}else if (item.projectPhase=='1'){
this.$set( item,'projectPhase','项目验收')
}else if(item.projectPhase=='2'){
this.$set( item,'projectPhase','项目建设')
}else{
this.$set( item,'projectPhase','项目前期')
}
}),
this.tableData.forEach(item=>{
if (item.projectLink==''||item.projectLink==null){
}else if (item.projectLink=='1'){
this.$set( item,'projectLink','可研')
}else if(item.projectLink=='2'){
this.$set( item,'projectLink','计划')
}else if(item.projectLink=='3'){
this.$set( item,'projectLink','采购')
}else if(item.projectLink=='4'){
this.$set( item,'projectLink','合同')
}else if(item.projectLink=='5'){
this.$set( item,'projectLink','执行')
}else if(item.projectLink=='6'){
this.$set( item,'projectLink','结决算')
}else{
this.$set( item,'postEvalState','已下发')
this.$set( item,'projectLink','转资')
}
})
this.total = res.data.total * 1;
......@@ -303,11 +278,6 @@
this.pageSize = 10;
this.submitForm();
},
//点击新增
async add() {
this.dialogAdd = true;
this.addtableData=[];//每次新增清空不然点了还是这几个人
},
//详情
async detailsForm() {
if (this.checkedList.length != 1) {
......@@ -386,210 +356,6 @@
cancel() {
this.dialog = false;
},
async save(type) {
this.dialog = false;
if (type == "add") {
let params = {};
let res = await qrscevaluationMaterials(params);
}
},
//保存专家
saveZJ() {
if (this.addZJList.length < 1) {
this.$message("请选择专家");
return;
}
this.addtableData=this.addZJList;
console.log(this.addtableData, "addtableData");
this.addtotal = this.addtableData.length;
this.dialogAddzj = false;
},
cancelZJ() {
this.dialogAddzj = false;
},
cancelBJ() {
this.dialogedit = false;
},
async xzExperts() {
this.dialogAddzj = true;
let params = {
current: this.currentZJ,
pageSize: this.pageSizeZJ,
};
Object.assign(params, this.ruleFormZJ);
console.log("查询专家", params);
let res = await expertInfo(params);
this.zjtableData = res.data.records;
this.zjtotal = res.data.total * 1;
console.log(res, "xxx");
},
cancelBJ() {
this.dialogedit = false;
},
saveXZ() {
console.log("保存验证", this.$refs);
this.$refs.formName.validate((valid) => {
if (!valid) {
console.log("error submit!!");
return false;
} else {
if (this.addtableData.length < 1) {
this.$message("请选择专家");
}
console.log(this.addZJList, "this.addZJList");
let expertIdList = [];
let expertStr='';
this.addtableData.forEach((item) => {
expertIdList.push(item.expertId);
expertStr = JSON.stringify(expertIdList).slice(1, -1);
});
let params = {
expertStr: expertStr,
};
Object.assign(params, this.ruleFormdialogAdd);
this.xfParams = JSON.parse(JSON.stringify(params));
console.log(params, "222");
adEvalBatchInfo(params).then((res) => {
this.dialogAdd = false;
this.expertIdList=expertIdList
this.resetForm();
});
}
});
// this.$emit("listenToChildEvent", "reset");
// }
},
cancelXZ() {
this.dialogAdd = false;
},
saveBJ() {
console.log("保存编辑验证", this.$refs.formNameBJ);
this.$refs.formNameBJ.validate((valid) => {
if (!valid) {
console.log("error submit!!");
return false;
} else {
if (this.addtableData.length < 1) {
this.$message("请选择专家");
}
console.log(this.addtableData,'addtableData')
let expertIdList = [];
let expertStr='';
this.addtableData.forEach((item) => {
expertIdList.push(item.expertId);
expertStr = JSON.stringify(expertIdList).slice(1, -1);
});
console.log(expertStr,'expertStr')
let params = {
expertStr: expertStr,
};
Object.assign( this.ruleFormdialogBJ,params);
// this.xfParams = JSON.parse(JSON.stringify(params));
console.log(this.ruleFormdialogBJ, "222");
updEvalBatchInfo(this.ruleFormdialogBJ).then((res) => {
this.dialogedit = false;
this.resetForm();
});
}
});
},
//选中的专家
handleSelectionChangeZJ() {
this.addZJList = this.$refs.multipleTableZJ.selection;
console.log(this.$refs.multipleTableZJ.selection, "2222");
},
//点击编辑
async edit() {
//只能选择编辑未下发 待增加
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
if(this.checkedList[0].postEvalState=='已下发'){
this.$message("不能编辑已下发的项目");
return;
}
this.ruleFormdialogBJ=this.checkedList[0]
this.dialogedit=true
let params = {
current: this.currentedit,
pageSize: this.pageSizeedit,
batchId:this.checkedList[0].batchId
};
console.log(params,'params')
let res = await expert(params);
this.addtableData=res.data.records
this.totalBJ=res.data.total * 1;
this.addtableData.forEach(item=>{
this.expertIdList.push(item.expertId)
})
},
//点击删除
async deletes() {
console.log("删除")
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
let res = await delEvalBatchInfo(this.checkedList[0]);
this.resetForm()
},
//点击下发
async sendMsg(){
//只能选择未下发的 这块需要加一下
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
if(this.checkedList[0].postEvalState=='已下发'){
this.$message("该项目已下发");
return;
}
// if(this.checkedList[0].postEvalState=='已撤回'){
// this.$message("该项目已撤回");
// return;
// }
if(this.checkedList[0].postEvalState=='已撤回'){
this.$set(this.checkedList[0],'postEvalState','2')
}else{
this.$set(this.checkedList[0],'postEvalState','0')
}
let res= await sendEvalBatchInfo(this.checkedList[0])
if(res.code=='200'){
this.resetForm()
}
},
//点击撤回
async withdraw(){
//只能选择已下发未确认的 这块需要加一下
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
if(this.checkedList[0].postEvalState=='未下发'){
this.$message("该项目未下发");
return;
}
if(this.checkedList[0].postEvalState=='已撤回'){
this.$message("该项目已撤回");
return;
}
this.$set(this.checkedList[0],'postEvalState','2')
let res= await chEvalBatchInfo(this.checkedList[0])
if(res.code=='200'){
this.resetForm()
}
},
},
};
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!