Commit aae2cd31 by 史敦盼

修改

1 parent 41b1cef9
......@@ -3,23 +3,23 @@ export function trendsRules(type) {
case 1:
return [
{
name: "后评估检查",
url: "",
name: '后评估检查',
url: '',
children: [
{
name: "后评估互查",
url: "",
name: '后评估互查',
url: '',
children: [
{
name: "评估批次发起",
url: "/mainLayout/auxiliarySelection",
name: '评估批次发起',
url: '/mainLayout/auxiliarySelection',
children: [],
},
{
name: "评估结果查看",
url: "/mainLayout/assistedViewing",
name: '评估结果查看',
url: '/mainLayout/assistedViewing',
children: [],
},
],
......@@ -27,118 +27,147 @@ export function trendsRules(type) {
],
},
{
name: "后评估合规性管理",
url: "",
name: '后评估合规性管理',
url: '',
children: [
{
name: "合规性检查规则库构建",
url: "",
name: '合规性检查规则库构建',
url: '',
children: [
{ name: "检查规则编制", url: "/compliance/checkRules", children: [] },
{ name: "自动稽核任务配置", url: "/compliance/taskConfigure", children: [] },
{ name: '检查规则编制', url: '/compliance/checkRules', children: [] },
{ name: '自动稽核任务配置', url: '/compliance/taskConfigure', children: [] },
],
},
{
name: "项目合规检查",
url: "",
name: '项目合规检查',
url: '',
children: [
{ name: "合规检查结果", url: "/projectCheck/checkResault", children: [] },
{ name: '合规检查结果', url: '/projectCheck/checkResault', children: [] },
// { name: "合规检查结果确认", url: "/projectCheck/confirmResault", children: [] },
{ name: "合规问题整改核验", url: "/projectCheck/verificationRectify", children: [] },
{
name: '合规问题整改核验',
url: '/projectCheck/verificationRectify',
children: [],
},
],
},
]
],
},
{
name: "后评估结果管理",
url: "",
name: '后评估结果管理',
url: '',
children: [
{
name: "后评估结果发布",
url: "",
name: '后评估结果发布',
url: '',
children: [
{ name: "检查结果公示及评价", url: "/managementResult/releaseResultpublicity", children: [] },
{
name: '检查结果公示及评价',
url: '/managementResult/releaseResultpublicity',
children: [],
},
],
},
{
name: "后评估结果情况",
url: "",
name: '后评估结果情况',
url: '',
children: [
{ name: "后评估进度情况", url: "/managementResult/situationResaultschedule", children: [] },
{ name: "后评估各环节问题分布", url: "/managementResult/situationResaultissuesLink", children: [] },
{ name: "合规检查问题情况", url: "/managementResult/issuesInspection", children: [] },
{
name: '后评估进度情况',
url: '/managementResult/situationResaultschedule',
children: [],
},
{
name: '后评估各环节问题分布',
url: '/managementResult/situationResaultissuesLink',
children: [],
},
{
name: '合规检查问题情况',
url: '/managementResult/issuesInspection',
children: [],
},
],
},
{
name: "后评估检查报告管理",
url: "",
name: '后评估检查报告管理',
url: '',
children: [
{ name: "后评估检查报告维护", url: "/managementResult/maintenancePg", children: [] },
{ name: "后评估报告模板管理", url: "/managementResult/managementPg", children: [] },
{ name: "合规性检查报告维护", url: "/managementResult/maintenanceHg", children: [] },
{ name: "合规性检查报告模板管理", url: "/managementResult/managementHg", children: [] },
{
name: '后评估检查报告维护',
url: '/managementResult/maintenancePg',
children: [],
},
{ name: '后评估报告模板管理', url: '/managementResult/managementPg', children: [] },
{
name: '合规性检查报告维护',
url: '/managementResult/maintenanceHg',
children: [],
},
{
name: '合规性检查报告模板管理',
url: '/managementResult/managementHg',
children: [],
},
],
},
],
},
];
break;
]
break
case 2:
return [
{
name: "后评估检查",
url: "",
name: '后评估检查',
url: '',
children: [
{
name: "后评估互查",
url: "",
name: '后评估互查',
url: '',
children: [
{
name: "评估项目确认",
url: "/mainLayout/confirmRelease",
name: '评估项目确认',
url: '/mainLayout/confirmRelease',
children: [],
},
{
name: "项目辅助检查",
url: "/mainLayout/auxiliaryInspection",
name: '项目辅助检查',
url: '/mainLayout/auxiliaryInspection',
children: [],
},
],
},
],
},
{
name: "后评估合规性管理",
url: "",
name: '后评估合规性管理',
url: '',
children: [
{
name: "合规性检查规则库构建",
url: "",
name: '合规性检查规则库构建',
url: '',
children: [
{ name: "自动稽核任务配置", url: "/compliance/taskConfigure", children: [] },
{ name: '自动稽核任务配置', url: '/compliance/taskConfigure', children: [] },
],
},
],
},
]
}
];
break
case 3:
return [
{
name: "后评估检查",
url: "",
name: '后评估检查',
url: '',
children: [
{
name: "后评估互查",
url: "",
name: '后评估互查',
url: '',
children: [
{
name: "评估问提整改",
url: "/mainLayout/materialAcquisition",
name: '评估问提整改',
url: '/mainLayout/materialAcquisition',
children: [],
},
// {
......@@ -161,33 +190,33 @@ export function trendsRules(type) {
],
},
{
name: "后评估合规性管理",
url: "",
name: '后评估合规性管理',
url: '',
children: [
{
name: "合规性检查实时提醒",
url: "",
name: '合规性检查实时提醒',
url: '',
children: [
{ name: "合规性检查提醒", url: "/checkCompliance/automaticCheck", children: [] },
{ name: '合规性检查提醒', url: '/checkCompliance/automaticCheck', children: [] },
],
},
{
name: "项目合规检查",
url: "",
name: '项目合规检查',
url: '',
children: [
{ name: "合规问题整改", url: "/projectCheck/problemRectify", children: [] },
{ name: '合规问题整改', url: '/projectCheck/problemRectify', children: [] },
],
},
],
},
]
}
];
break
case 99:
return [
{
name: "项目档案库",
url: "/mainLayout/mianHome",
erji:'二级'
name: '项目档案库',
url: '/mainLayout/mianHome',
erji: '二级',
// children: [
// {
// // name: "首页首页",
......@@ -202,19 +231,18 @@ export function trendsRules(type) {
// }
// ]
},
{
name: "后评估检查",
url: "",
name: '后评估检查',
url: '',
children: [
{
name: "后评估自查",
url: "",
name: '后评估自查',
url: '',
children: [
{
name: "自查评估批次发起",
url: "/assesszc/auxiliarySelection",
name: '自查评估批次发起',
url: '/assesszc/auxiliarySelection',
children: [],
},
// {
......@@ -223,75 +251,74 @@ export function trendsRules(type) {
// url: "/assesszc/projectView",
// children: [],
// },
{
name: "自查评估项目确认",
url: "/assesszc/confirmRelease",
name: '自查评估项目确认',
url: '/assesszc/confirmRelease',
children: [],
},
{
name: "自查问题整改",
url: "/assesszc/materialAcquisition",
name: '自查项目辅助检查',
url: '/assesszc/auxiliaryInspection',
children: [],
},
{
name: "自查项目辅助检查",
url: "/assesszc/auxiliaryInspection",
name: '自查问题整改',
url: '/assesszc/materialAcquisition',
children: [],
},
{
name: "自查评估结果查看",
url: "/assesszc/assistedViewing",
name: '自查评估结果查看',
url: '/assesszc/assistedViewing',
children: [],
},
],
},
{
name: "后评估互查",
url: "",
name: '后评估互查',
url: '',
children: [
{
name: "评估批次发起",
url: "/mainLayout/auxiliarySelection",
name: '评估批次发起',
url: '/mainLayout/auxiliarySelection',
children: [],
},
{
name: "评估项目确认",
url: "/mainLayout/confirmRelease",
name: '评估项目确认',
url: '/mainLayout/confirmRelease',
children: [],
},
{
name: "评估问题整改",
url: "/mainLayout/materialAcquisition",
name: '项目辅助检查',
url: '/mainLayout/auxiliaryInspection',
children: [],
},
{
name: "项目辅助检查",
url: "/mainLayout/auxiliaryInspection",
name: '评估问题整改',
url: '/mainLayout/materialAcquisition',
children: [],
},
{
name: "评估结果查看",
url: "/mainLayout/assistedViewing",
name: '评估结果查看',
url: '/mainLayout/assistedViewing',
children: [],
},
],
},
{
name: "后评估集中检查",
url: "",
name: '后评估集中检查',
url: '',
children: [
{
name: "项目检查问题查询",
url: "/mainLayout/projectCheckQuestionQuery",
name: '项目检查问题查询',
url: '/mainLayout/projectCheckQuestionQuery',
children: [],
},
{
name: "整改反馈查询",
url: "/mainLayout/rectificationFeedbackQuery",
name: '整改反馈查询',
url: '/mainLayout/rectificationFeedbackQuery',
children: [],
},
],
......@@ -299,91 +326,110 @@ export function trendsRules(type) {
],
},
{
name: "后评估合规性管理",
url: "",
name: '后评估合规性管理',
url: '',
children: [
{
name: "合规性检查实时提醒",
url: "",
name: '合规性检查实时提醒',
url: '',
children: [
{ name: "合规性检查提醒", url: "/checkCompliance/automaticCheck", children: [] },
{ name: '合规性检查提醒', url: '/checkCompliance/automaticCheck', children: [] },
],
},
{
name: "合规性检查规则库构建",
url: "",
name: '合规性检查规则库构建',
url: '',
children: [
{ name: "检查规则编制", url: "/compliance/checkRules", children: [] },
{ name: "自动稽核任务配置", url: "/compliance/taskConfigure", children: [] },
{ name: '检查规则编制', url: '/compliance/checkRules', children: [] },
{ name: '自动稽核任务配置', url: '/compliance/taskConfigure', children: [] },
],
},
{
name: "项目合规检查",
url: "",
name: '项目合规检查',
url: '',
children: [
{ name: "合规检查结果", url: "/projectCheck/checkResault", children: [] },
{ name: "合规问题整改", url: "/projectCheck/problemRectify", children: [] },
{ name: "合规问题整改核验", url: "/projectCheck/verificationRectify", children: [] },
{ name: '合规检查结果', url: '/projectCheck/checkResault', children: [] },
{ name: '合规问题整改', url: '/projectCheck/problemRectify', children: [] },
{
name: '合规问题整改核验',
url: '/projectCheck/verificationRectify',
children: [],
},
],
},
],
},
{
name: "后评估结果管理",
url: "",
name: '后评估结果管理',
url: '',
children: [
{
name: "后评估结果发布",
url: "",
name: '后评估结果发布',
url: '',
children: [
{ name: "检查结果公示及评价", url: "/managementResult/releaseResultpublicity", children: [] },
{
name: '检查结果公示及评价',
url: '/managementResult/releaseResultpublicity',
children: [],
},
],
},
{
name: "后评估结果情况",
url: "",
name: '后评估结果情况',
url: '',
children: [
{ name: "后评估进度情况", url: "/managementResult/situationResaultschedule", children: [] },
{ name: "后评估各环节问题分布", url: "/managementResult/situationResaultissuesLink", children: [] },
{ name: "合规检查问题情况", url: "/managementResult/issuesInspection", children: [] },
{
name: '后评估进度情况',
url: '/managementResult/situationResaultschedule',
children: [],
},
{
name: '后评估各环节问题分布',
url: '/managementResult/situationResaultissuesLink',
children: [],
},
{
name: '合规检查问题情况',
url: '/managementResult/issuesInspection',
children: [],
},
],
},
{
name: "后评估检查报告管理",
url: "",
name: '后评估检查报告管理',
url: '',
children: [
{ name: "后评估检查报告维护", url: "/managementResult/maintenancePg", children: [] },
{ name: "后评估报告模板管理", url: "/managementResult/managementPg", children: [] },
{
name: '后评估检查报告维护',
url: '/managementResult/maintenancePg',
children: [],
},
{ name: '后评估报告模板管理', url: '/managementResult/managementPg', children: [] },
// { name: "合规性检查报告维护", url: "/managementResult/maintenanceHg", children: [] },
// { name: "合规性检查报告模板管理", url: "/managementResult/managementHg", children: [] },
],
},
],
},
]
}
}
export function defaultRouter() {
sessionStorage.setItem("author", "weizheng");
sessionStorage.setItem("authorName",99);
let type=sessionStorage.getItem('authorName')
sessionStorage.setItem('author', 'weizheng')
sessionStorage.setItem('authorName', 99)
let type = sessionStorage.getItem('authorName')
switch (type) {
case '1':
return "/mainLayout/auxiliarySelection"
break;
return '/mainLayout/auxiliarySelection'
break
case '2':
return "/mainLayout/confirmRelease"
break;
return '/mainLayout/confirmRelease'
break
case '3':
return "/mainLayout/materialAcquisition"
break;
return '/mainLayout/materialAcquisition'
break
case '99':
return "/assesszc/auxiliarySelection"
break;
return '/assesszc/auxiliarySelection'
break
}
}
<template>
<div class="main">
<div class="close"><i class="el-icon-circle-close" @click="cancel()"></i></div>
<p class="title" :class="dialogFullScreen?'noShow':''">{{projectName}}</p>
<p class="title" :class="dialogFullScreen ? 'noShow' : ''">{{ projectName }}</p>
<div class="continer">
<div class="top" :class="dialogFullScreen?'noShow':''">
<div class="top" :class="dialogFullScreen ? 'noShow' : ''">
<el-steps :active="active" align-center finish-status="success">
<el-step
v-for="item in tabList"
......@@ -15,7 +15,10 @@
</div>
<div class="content">
<div class="left">
<p class="tableTitle">检查内容 <i class="el-icon-full-screen" @click="dialogFullScreen = !dialogFullScreen"></i></p>
<p class="tableTitle">
检查内容
<i class="el-icon-full-screen" @click="dialogFullScreen = !dialogFullScreen"></i>
</p>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in tabListKY"
......@@ -23,48 +26,54 @@
:label="item.typeText"
:name="item.typeCode"
>
<div class="opt" v-show="options.length>0">
<el-select v-model="valuesel" clearable placeholder="请选择" @change="(val)=>changexm(val,item.typeCode)">
<div class="opt" v-show="options.length > 0">
<el-select
v-model="valuesel"
clearable
placeholder="请选择"
@change="(val) => changexm(val, item.typeCode)"
>
<el-option
v-for="(item,index) in options"
v-for="(item, index) in options"
:key="item.name"
:label="item.name"
:value="index">
:value="index"
>
</el-option>
</el-select>
</div>
<iframe
v-if="blobType=='pdf'||blobType=='doc'&&options.length>0"
v-if="blobType == 'pdf' || (blobType == 'doc' && options.length > 0)"
:key="iframeUrl"
:src="iframeUrl"
frameborder="0"
:class="dialogFullScreen?'iframeDivBig':'iframeDiv'"
:class="dialogFullScreen ? 'iframeDivBig' : 'iframeDiv'"
></iframe>
<div v-else-if="blobType=='png'||blobType=='jpg'" class="blobImg">
<img :src="iframeUrl" alt="">
</div>
<div class="docDiv" v-else-if="blobType=='docx'&&options.length>0">
<div :ref="`word`" :id="`word${item.typeCode}`" >
<div v-else-if="blobType == 'png' || blobType == 'jpg'" class="blobImg">
<img :src="iframeUrl" alt="" />
</div>
<div class="docDiv" v-else-if="blobType == 'docx' && options.length > 0">
<div :ref="`word`" :id="`word${item.typeCode}`"></div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="right">
<p class="tableTitle">检查项</p>
<div :class="dialogFullScreen?'rightscollBig':'rightscoll'">
<div
class="rightContent"
v-for="item in questionList"
:key="item.questionId"
>
<div :class="dialogFullScreen ? 'rightscollBig' : 'rightscoll'">
<div class="rightContent" v-for="item in questionList" :key="item.questionId">
<h3>{{ item.questionId }}.{{ item.quesCheckItem }}</h3>
<p class="msg">{{ item.checkDesc }} <el-button type="primary" v-if="item.checkDesc=='可研中的需求内容应与业务需求报告中的需求匹配'&&wtmx" @click="zhanshi()">匹配展示</el-button></p>
<div
class="quesznfx"
v-if="item.znfxList && item.znfxList.length > 0"
<p class="msg">
{{ item.checkDesc }}
<el-button
type="primary"
v-if="item.checkDesc == '可研中的需求内容应与业务需求报告中的需求匹配' && wtmx"
@click="zhanshi()"
>匹配展示</el-button
>
</p>
<div class="quesznfx" v-if="item.znfxList && item.znfxList.length > 0">
<p class="tips">智能分析:</p>
<div
v-for="(itemzn, index) in item.znfxList"
......@@ -73,16 +82,9 @@
v-html="itemzn.checkDesc"
></div>
</div>
<div
class="quesznfx"
v-if="item.fzfxList && item.fzfxList.length > 0"
>
<div class="quesznfx" v-if="item.fzfxList && item.fzfxList.length > 0">
<p class="tips">辅助分析:</p>
<div
v-for="(itemfz, index) in item.fzfxList"
:key="index"
class="inputDiv"
>
<div v-for="(itemfz, index) in item.fzfxList" :key="index" class="inputDiv">
<el-input
type="textarea"
:autosize="{ minRows: 1, maxRows: 4 }"
......@@ -92,7 +94,7 @@
><el-button
@click="adopt(item, index, itemfz)"
type="primary"
v-if="itemfz.type != '1'&&!item.checked"
v-if="itemfz.type != '1' && !item.checked"
>采纳</el-button
>
<el-button type="info" v-else>采纳</el-button>
......@@ -100,11 +102,7 @@
</div>
<div class="question">
<p class="tips">问题描述:</p>
<div
v-for="(items, index) in item.evalList"
:key="index"
class="inputDiv"
>
<div v-for="(items, index) in item.evalList" :key="index" class="inputDiv">
<el-input
type="textarea"
:autosize="{ minRows: 1, maxRows: 4 }"
......@@ -113,9 +111,7 @@
:disabled="items.disabled"
>
</el-input
><el-button @click="delInput(item, index)" type="primary"
>删除</el-button
>
><el-button @click="delInput(item, index)" type="primary">删除</el-button>
<el-upload
class="upload_box"
......@@ -125,7 +121,7 @@
:on-change="handleEditChange"
:http-request="
(res) => {
return fileupdate(res, items);
return fileupdate(res, items)
}
"
:before-upload="beforeAvatarUpload"
......@@ -137,21 +133,12 @@
action=""
>
<!-- 加号标识 -->
<el-button
class="upload_btn"
slot="trigger"
size="small"
type="primary"
>
<el-button class="upload_btn" slot="trigger" size="small" type="primary">
上传截图
</el-button>
<!-- 上传后显示 -->
<div slot="file" slot-scope="{ file }">
<img
class="el-upload-list__item-thumbnail"
:src="file.url"
alt=""
/>
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<!-- 图片放大 -->
<span
......@@ -185,36 +172,35 @@
</el-dialog>
<p class="addBtn">
<el-checkbox
<!-- <el-checkbox
v-model="item.checked"
@change="changeChecked(item)"
>未发现问题</el-checkbox
><i class="el-icon-circle-plus" @click="addInput(item)"></i>
> -->
<i class="el-icon-circle-plus" @click="addInput(item)"></i>
</p>
</div>
</div>
</div>
</div>
<p class="Btn">
<span @click="cancel()">取消</span><span @click="save()">保存</span> <span @click="submitNexts()">提交</span>
<span @click="cancel()">取消</span><span @click="save()">保存</span>
<span @click="submitNexts()">提交</span>
</p>
</div>
</div>
<el-dialog
:visible.sync="dialogzhanshi"
title="匹配展示"
width="90%"
:modal-append-to-body="false"
:append-to-body="false"
>
<div v-html="wtmx" class="dialogscroll"></div>
</el-dialog>
</div>
</div>
</template>
<script>
......@@ -228,56 +214,56 @@ import {
bcevalQuesInfo,
ossupload,
presignedUrl,
selFileList
} from "@/api/index";
selFileList,
} from '@/api/index'
export default {
data() {
return {
dialogFullScreen: false,
valuesel:'',
options:[],
dialogImageUrl: "",
valuesel: '',
options: [],
dialogImageUrl: '',
fileList: [],
evalList: [
{
evalQues: "",
evalQues: '',
hideUploadEdit: false,
},
],
tabList: [
{ label: "可研", id: 0 },
{ label: '可研', id: 0 },
// { label: "计划", id: 1 },
{ label: "采购", id: 2 },
{ label: "合同", id: 3 },
{ label: "执行", id: 4 },
{ label: "结决算及转资", id: 5 },
{ label: '采购', id: 2 },
{ label: '合同', id: 3 },
{ label: '执行', id: 4 },
{ label: '结决算及转资', id: 5 },
],
tabListKY:[],
tabListKY: [],
active: 0,
activeName: "0",
activeName: '0',
clqparams: {},
iframeUrl: "",
iframeUrl: '',
urlList: [],
questionList: [],
file: "",
file: '',
dialogVisible: false,
fullURL: "",
fullURL: '',
hideUploadEdit: false,
limitNum: 1,
disabled: false,
oldQuestionList: [], //对比列表
blobType:'pdf',//bolb类型
projectName:"",
valuesel:"",
dialogzhanshi:false,
wtmx:'',
docxOptions: {
className: "kaimo-docx-666", // string:默认和文档样式类的类名/前缀
blobType: 'pdf', //bolb类型
projectName: '',
valuesel: '',
dialogzhanshi: false,
wtmx: '',
docxOptions: {
className: 'kaimo-docx-666', // string:默认和文档样式类的类名/前缀
inWrapper: false, // boolean:启用围绕文档内容的包装器渲染
ignoreWidth:false, // boolean:禁用页面的渲染宽度
ignoreWidth: false, // boolean:禁用页面的渲染宽度
ignoreHeight: false, // boolean:禁止渲染页面高度
ignoreFonts:false, // boolean:禁用字体渲染
ignoreFonts: false, // boolean:禁用字体渲染
breakPages: false, // boolean:在分页符上启用分页
ignoreLastRenderedPageBreak: true, // boolean:在 lastRenderedPageBreak 元素上禁用分页
experimental: false, // boolean:启用实验功能(制表符停止计算)
......@@ -286,151 +272,138 @@ docxOptions: {
useMathMLPolyfill: false, // boolean:包括用于 chrome、edge 等的 MathML polyfill。
showChanges: false, // boolean:启用文档更改的实验性渲染(插入/删除)
debug: false, // boolean:启用额外的日志记录
},
}
};
},
mounted() {
this.clqparams = JSON.parse(this.$route.query.clqparams);
this.projectName=this.$route.query.projectName
this.init(this.clqparams);
this.clqparams = JSON.parse(this.$route.query.clqparams)
this.projectName = this.$route.query.projectName
this.init(this.clqparams)
},
methods: {
zhanshi(){
this.dialogzhanshi=true
zhanshi() {
this.dialogzhanshi = true
},
//提交问题清单
async submitNexts() {
this.$confirm("您确定检查完所有流程并去提交?", "提示", {
confirmButtonText: "是",
cancelButtonText: "继续检查",
this.$confirm('您确定检查完所有流程并去提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '继续检查',
distinguishCancelAndClose: true,
type: "warning",
type: 'warning',
})
.then(() => {
this.save(2);
this.save(2)
})
.catch((action) => {
});
.catch((action) => {})
},
// 放大图片
handlePictureCardPreview(file) {
console.log("点击放大");
this.dialogImageUrl = file.url;
this.dialogVisible = true;
console.log('点击放大')
this.dialogImageUrl = file.url
this.dialogVisible = true
},
// 删除图片
handleRemove(file, fileList) {
console.log(fileList, "this.fileList");
console.log(fileList, 'this.fileList')
if (this.fileList.length == 0) {
this.fileList = [];
this.fileList = []
} else {
let dl = this.fileList.indexOf(file);
this.fileList.splice(dl, 1);
let dl = this.fileList.indexOf(file)
this.fileList.splice(dl, 1)
}
this.hideUploadEdit = this.fileList.length >= this.limitNum;
this.hideUploadEdit = this.fileList.length >= this.limitNum
},
// on-change添加文件,上传成功和上传失败时都会被调用
handleEditChange(file, fileList) {
this.hideUploadEdit = fileList.length >= this.limitNum;
this.hideUploadEdit = fileList.length >= this.limitNum
},
// http-request自定义上传
ImgUploadSectionFile(param) {
this.param = param;
this.param = param
},
// before-upload上传文件之前的钩子,参数为上传的文件
// 若返回 false 或者返回 Promise 且被 reject,则停止上传
beforeAvatarUpload(file) {
this.file = file;
const isJPG = file.type === "image/jpeg" || file.type === "image/png";
const isLt2M = this.file.size / 1024 < 1000;
console.log(this.file.size / 1024, "this.file.size this.file.size ");
this.file = file
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
const isLt2M = this.file.size / 1024 < 1000
console.log(this.file.size / 1024, 'this.file.size this.file.size ')
if (!isJPG) {
this.$message.error("上传图片只能是 JPG 或 PNG 格式!");
this.hideUploadEdit = false;
this.$message.error('上传图片只能是 JPG 或 PNG 格式!')
this.hideUploadEdit = false
}
if (!isLt2M) {
this.hideUploadEdit = false;
this.$message.error("上传图片大小不能超过 1000k!");
this.hideUploadEdit = false
this.$message.error('上传图片大小不能超过 1000k!')
}
return isJPG && isLt2M;
return isJPG && isLt2M
},
// 文件上传成功时的钩子
handleSuccess(file) {
// console.log(file);
const data = file.data;
const data = file.data
//然后数据、逻辑处理
},
showFullScreen() {
console.log(this.fileList, "4444");
this.fullURL = this.fileList[0].url;
this.dialogVisible = true;
console.log(this.fileList, '4444')
this.fullURL = this.fileList[0].url
this.dialogVisible = true
},
handleExceed() {
this.$message.warning(`只能选择一张图片`);
this.$message.warning(`只能选择一张图片`)
},
changexm(row,typeCode){
this.downloadObject(this.options[row],typeCode)
console.log(row,'换文件')
changexm(row, typeCode) {
this.downloadObject(this.options[row], typeCode)
console.log(row, '换文件')
},
async init(type) {
let params = {
projectStage: this.active * 1 + 1,
hgx:"hgx",
hgx: 'hgx',
...type,
};
}
Promise.all([selFile(params), selWtqdFZ(params)]).then(async (res) => {
this.tabListKY=[]
this.urlList = res[0].data;
if(this.urlList.length>0){
this.urlList.forEach(item=>{
this.tabListKY.push({typeText:item.materialName,typeCode:item.mid})
this.tabListKY = []
this.urlList = res[0].data
if (this.urlList.length > 0) {
this.urlList.forEach((item) => {
this.tabListKY.push({ typeText: item.materialName, typeCode: item.mid })
})
this.activeName=this.tabListKY[0].typeCode
let resList= await selFileList({ ...params,typeCode:this.tabListKY[0].typeCode });
this.options= resList.data
if(this.options.length>0){
this.valuesel=this.options[0].name
this. downloadObject(this.options[0],this.tabListKY[0].typeCode)
}else{
this.blobType='png'
this.iframeUrl = "/nopdf.png";
this.activeName = this.tabListKY[0].typeCode
let resList = await selFileList({ ...params, typeCode: this.tabListKY[0].typeCode })
this.options = resList.data || []
if (this.options.length > 0) {
this.valuesel = this.options[0].name
this.downloadObject(this.options[0], this.tabListKY[0].typeCode)
} else {
this.blobType = 'png'
this.iframeUrl = '/nopdf.png'
}
}else{
} else {
// this.iframeUrl = "/nopdf.png";
}
if (res[1].data) {
this.questionList = res[1].data.records;
this.wtmx= res[1].data.MapkyXqfx
let counterNum = 0;
this.questionList = res[1].data.records
this.wtmx = res[1].data.MapkyXqfx
let counterNum = 0
this.questionList.forEach(async (item) => {
if (item.isProblem == 0) {
this.$set(item, "checked", true);
this.changeChecked(item);
this.$set(item, 'checked', true)
this.changeChecked(item)
}
let respon = await selWtmx({ qid: item.qid });
let respon = await selWtmx({ qid: item.qid })
let paramsFX = {
batchId: this.clqparams.batchId,
projectId: this.clqparams.projectId,
projectStage: item.questionId,
};
let responfx = await selZnfx(paramsFX);
}
let responfx = await selZnfx(paramsFX)
counterNum++
if (respon.data.records && respon.data.records.length > 0) {
respon.data.records.forEach(async (itemImg) => {
......@@ -438,137 +411,128 @@ docxOptions: {
let paramsImg = {
fileId: itemImg.id,
url: itemImg.url,
};
let resUrl = await presignedUrl(paramsImg);
this.$set(itemImg, "fileList", [
}
let resUrl = await presignedUrl(paramsImg)
this.$set(itemImg, 'fileList', [
{
url: resUrl.msg,
},
]);
itemImg.hideUploadEdit = true;
])
itemImg.hideUploadEdit = true
} else {
itemImg.hideUploadEdit = false;
itemImg.hideUploadEdit = false
}
});
this.$set(item, "evalList", [...respon.data.records]);
})
this.$set(item, 'evalList', [...respon.data.records])
} else {
this.$set(item, "evalList", [
this.$set(item, 'evalList', [
{
evalQues: "",
evalQues: '',
hideUploadEdit: false,
},
]);
])
}
if (responfx.data.records && responfx.data.records.length > 0) {
let znfxList = responfx.data.records.filter((item) => {
if (item.checkDesc&&item.type==0) {
item.checkDesc = item.checkDesc.replace(/\n/g, "<br>");
if (item.checkDesc && item.type == 0) {
item.checkDesc = item.checkDesc.replace(/\n/g, '<br>')
}
return item.checkDesc&&item.type==0;
});
this.$set(item, "znfxList", [...znfxList]);
return item.checkDesc && item.type == 0
})
this.$set(item, 'znfxList', [...znfxList])
let resfxList = responfx.data.records.filter((item) => {
return item.type == 1 || item.type == 2;
});
if(resfxList&&resfxList.length>0){
let fzfxList=resfxList[0].checkDesc.split("\n");
this.$set(item, "fzfxList", [...fzfxList]);
return item.type == 1 || item.type == 2
})
if (resfxList && resfxList.length > 0) {
let fzfxList = resfxList[0].checkDesc.split('\n')
this.$set(item, 'fzfxList', [...fzfxList])
}
} else {
this.$set(item, "znfxList", []);
this.$set(item, "fzfxList", []);
this.$set(item, 'znfxList', [])
this.$set(item, 'fzfxList', [])
}
if(counterNum==this.questionList.length){
if (counterNum == this.questionList.length) {
setTimeout(() => {
this.oldQuestionList = JSON.parse(JSON.stringify(this.questionList));
}, 300);
this.oldQuestionList = JSON.parse(JSON.stringify(this.questionList))
}, 300)
}
})
}
});
})
},
async downloadObject(row,code){
this.iframeUrl=""
this.blobType=''
let resUrl = await downloadObject({fileId:row.id});
if( this.blobType==''){
this.blobType=row.suffix
async downloadObject(row, code) {
this.iframeUrl = ''
this.blobType = ''
let resUrl = await downloadObject({ fileId: row.id })
if (this.blobType == '') {
this.blobType = row.suffix
}
const binaryData = []
binaryData.push(resUrl)
let URL = window.URL.createObjectURL(new Blob(binaryData, { type: "application/pdf" }))
if(this.iframeUrl ==''){
this.iframeUrl = URL+'#view=FitH,top' }
if(this.blobType=='docx'){
let docx = require("docx-preview");
this.$nextTick(()=>{
docx.renderAsync(resUrl,document.getElementById(`word${code}`) ,null, this.docxOptions) // 渲染到页面预览
let URL = window.URL.createObjectURL(new Blob(binaryData, { type: 'application/pdf' }))
if (this.iframeUrl == '') {
this.iframeUrl = URL + '#view=FitH,top'
}
if (this.blobType == 'docx') {
let docx = require('docx-preview')
this.$nextTick(() => {
docx.renderAsync(resUrl, document.getElementById(`word${code}`), null, this.docxOptions) // 渲染到页面预览
})
}
},
async handleClick(tab) {
let params = {
projectStage: this.active * 1 + 1,
hgx:"hgx",
hgx: 'hgx',
...this.clqparams,
};
this.options=[]
this.valuesel=''
this.iframeUrl =""
console.log("切换", tab.index,);
let resList= await selFileList({ ...params,typeCode:this.tabListKY[tab.index].typeCode });
this.options= resList.data
if(this.options.length>0){
this.valuesel=this.options[0].name
this.downloadObject(this.options[0],this.tabListKY[tab.index].typeCode )
}else{
this.blobType='png'
this.iframeUrl = "/nopdf.png";
}
this.options = []
this.valuesel = ''
this.iframeUrl = ''
console.log('切换', tab.index)
let resList = await selFileList({ ...params, typeCode: this.tabListKY[tab.index].typeCode })
this.options = resList.data || []
if (this.options.length > 0) {
this.valuesel = this.options[0].name
this.downloadObject(this.options[0], this.tabListKY[tab.index].typeCode)
} else {
this.blobType = 'png'
this.iframeUrl = '/nopdf.png'
}
},
change(id) {
console.log(
JSON.stringify(this.questionList) ==
JSON.stringify(this.oldQuestionList),
"完全相同么"
);
JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList),
'完全相同么',
)
if (
JSON.stringify(this.questionList) ==
JSON.stringify(this.oldQuestionList)
) {
this.active = id * 1;
if (JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList)) {
this.active = id * 1
// this.tabListKY = MaterialsListKY(id * 1 + 1);
this.init(this.clqparams);
return;
this.init(this.clqparams)
return
}
this.$confirm("是否保存?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
this.$confirm('是否保存?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
distinguishCancelAndClose: true,
type: "warning",
type: 'warning',
})
.then(() => {
this.save('3',id);
this.save('3', id)
// this.active = id * 1;
// this.init(this.clqparams);
})
.catch((action) => {
console.log(action, "actionaction");
if (action === "cancel") {
this.active = id * 1;
console.log(action, 'actionaction')
if (action === 'cancel') {
this.active = id * 1
// this.tabListKY = MaterialsListKY(id * 1 + 1);
this.init(this.clqparams);
this.init(this.clqparams)
} else {
}
});
})
// this.save()
// this.active = id * 1;
// this.tabListKY = MaterialsListKY(id * 1 + 1);
......@@ -576,145 +540,141 @@ docxOptions: {
},
delInput(item, index) {
if (item.evalList.length <= 1) {
item.checked = true;
this.$set(item, "checked", true);
this.changeChecked(item);
return false;
item.checked = true
this.$set(item, 'checked', true)
this.changeChecked(item)
return false
}
item.evalList.splice(index, 1);
item.evalList.splice(index, 1)
},
adopt(item, index, items) {
if (item.evalList.length == 1 && !item.evalList[0].evalQues) {
item.evalList[0].evalQues = items;
item.evalList[0].evalQues = items
} else {
item.evalList.push({
evalQues: items,
hideUploadEdit: false,
});
})
}
},
addInput(item) {
if (item.evalList[0].disabled == true) {
console.log("选择了未发现问题");
return;
console.log('选择了未发现问题')
return
}
item.evalList.push({
data: "",
evalQues: "",
});
data: '',
evalQues: '',
})
},
changeChecked(item) {
if (item.checked) {
this.$set(item, "evalList", [
this.$set(item, 'evalList', [
{
ideval: "",
evalQues: "",
ideval: '',
evalQues: '',
hideUploadEdit: false,
disabled: true,
},
]);
this.$set(item, "isProblem", 0);
])
this.$set(item, 'isProblem', 0)
// this.$set(item, "Id", 0);
} else {
item.evalList[0].disabled = false;
this.$set(item, "isProblem", 1);
item.evalList[0].disabled = false
this.$set(item, 'isProblem', 1)
}
},
cancel() {
this.$router.push({
path: "/mainLayout/auxiliaryInspection",
});
path: '/mainLayout/auxiliaryInspection',
})
},
async save(type) {
async save(type, id) {
this.questionList.forEach((item) => {
let evals = "";
let evals = ''
item.evalList.forEach((childItem) => {
evals = evals.concat(childItem.evalQues + ",");
});
evals = evals.slice(0, -1);
item.evalQues = evals;
if(item.evalList.length>=1&&item.evalList[0].evalQues){
item.isProblem=1
}
});
this.questionList.forEach((item) => {
if(!item.evalQues&&item.isProblem!=0){
console.log(item.evalQues,item.isProblem,'2222')
this.$message({
message: '请完成录入全部问题或选择未发现问题',
type: 'warning'
});
throw new Error()
}
});
console.log(this.questionList, "questionList");
evals = evals.concat(childItem.evalQues + ',')
})
evals = evals.slice(0, -1)
item.evalQues = evals
// if (item.evalList.length >= 1 && item.evalList[0].evalQues) {
// item.isProblem = 1
// }
const isProblem = item.evalList.filter((v) => v.evalQues).length
item.isProblem = isProblem > 0 ? 1 : 0
})
// this.questionList.forEach((item) => {
// if (!item.evalQues && item.isProblem != 0) {
// console.log(item.evalQues, item.isProblem, '2222')
// this.$message({
// message: '请完成录入全部问题或选择未发现问题',
// type: 'warning',
// })
// throw new Error()
// }
// })
console.log(this.questionList, 'questionList')
let params = {
list: this.questionList,
...this.clqparams,
};
console.log(params, "保存");
}
console.log(params, '保存')
// return
let res = await bcevalQuesInfo(params);
if (res.code == "200") {
this.$message("保存成功");
if(type&&type==2){
let res = await bcevalQuesInfo(params)
if (res.code == '200') {
this.$message('保存成功')
if (type && type == 2) {
this.$router.push({
path: "/mainLayout/Compliancefz",
path: '/mainLayout/Compliancefz',
query: {
clqparams: JSON.stringify(this.clqparams),
projectName:this.projectName
projectName: this.projectName,
},
});
}else{
this.active = id * 1;
this.init(this.clqparams);
})
} else {
this.active = id * 1
this.init(this.clqparams)
}
} else {
this.$message("保存失败");
this.$message('保存失败')
}
},
fileupdate(res, items) {
console.log(this.file.size / 1024, "222222");
this.file = res.file;
this.submitFile(res, items);
console.log(this.file.size / 1024, '222222')
this.file = res.file
this.submitFile(res, items)
},
submitFile(item, list) {
console.log(list, "list");
console.log(this.file, "多少k");
console.log(list, 'list')
console.log(this.file, '多少k')
if (this.file) {
const formData = new FormData();
formData.append("file", this.file);
const formData = new FormData()
formData.append('file', this.file)
ossupload(formData)
.then((response) => {
console.log(response, "上传图片");
if (response.code == "200") {
console.log(response, '上传图片')
if (response.code == '200') {
// list.url = response.data.downLoadUrl;
// list.fileId= response.data.fileId
this.$set(list, "url", response.data.downLoadUrl);
this.$set(list, "fileId", response.data.fileId);
this.$message("上传成功");
this.$set(list, 'url', response.data.downLoadUrl)
this.$set(list, 'fileId', response.data.fileId)
this.$message('上传成功')
} else {
this.$message("上传失败");
this.$message('上传失败')
}
})
.catch((error) => {
console.error(error);
this.$message("上传失败");
});
console.error(error)
this.$message('上传失败')
})
}
},
},
};
}
</script>
<style lang="scss" scoped>
......@@ -729,7 +689,7 @@ docxOptions: {
.close {
position: absolute;
right: 20px;
top:0px;
top: 0px;
.el-icon-circle-close {
font-size: 30px;
......@@ -891,12 +851,13 @@ docxOptions: {
}
.addBtn {
display: flex;
justify-content: space-between;
justify-content: flex-end;
// justify-content: space-between;
}
.Btn {
// width: calc(100% - 276px) !important;
width: 100%;
position:absolute;
position: absolute;
height: 50px;
bottom: 0px;
right: 0;
......@@ -948,39 +909,37 @@ docxOptions: {
margin-left: 10px;
border: none;
}
.blobImg{
.blobImg {
width: 100%;
img{
img {
text-align: center;
width:80%;
width: 80%;
}
}
.docDiv{
.docDiv {
width: 100%;
height:600px;
height: 600px;
overflow: auto;
}
.iframeDiv{
.iframeDiv {
width: 80%;
height: 50vh;
margin: auto;
display: block
display: block;
}
.iframeDivBig{
.iframeDivBig {
width: 80%;
height: 66vh;
margin: auto;
display: block
display: block;
}
.opt{
.opt {
height: 40px;
width: 100%;
text-align: left;
padding-left: 10px;
/deep/ .el-input__inner{
width:600px;
/deep/ .el-input__inner {
width: 600px;
}
}
/deep/ .docx-wrapper {
......@@ -992,15 +951,15 @@ docxOptions: {
padding: 2em 1em 0 !important;
margin: 0 auto !important;
}
/deep/.kaimo-docx-666{
/deep/.kaimo-docx-666 {
margin: 0 auto !important;
text-align: center;
}
.dialogscroll{
.dialogscroll {
height: 65vh;
overflow-y: auto;
}
.msg{
.msg {
vertical-align: middle;
line-height: 33px;
}
......@@ -1018,7 +977,7 @@ docxOptions: {
// margin-top: 3vh !important;
// margin-left: 3vw !important;
}
.noShow{
.noShow {
display: none;
}
</style>
<!-- 辅助核验 -->
<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
......@@ -18,22 +13,10 @@
</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-form-item label="后评估批次状态:" prop="postEvalState" class="fromItem">
<el-select v-model="ruleForm.postEvalState" placeholder="请选择" clearable>
<el-option label="执行中" value="3"></el-option>
<el-option label="已发起" value="1"></el-option>
<el-option label="已撤回" value="4"></el-option>
......@@ -62,12 +45,8 @@
<el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
<el-button @click="configs()"
><i class="el-icon-position"></i> 确认项目评估
</el-button>
<el-button @click="withdraw()">
<i class="el-icon-folder-delete"></i>撤回
</el-button>
<el-button @click="configs()"><i class="el-icon-position"></i> 确认项目评估 </el-button>
<el-button @click="withdraw()"> <i class="el-icon-folder-delete"></i>撤回 </el-button>
</el-form-item>
</el-form>
<div class="setscrollOne">
......@@ -82,31 +61,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" width="120">
<template slot-scope="scope"> {{ scope.row.batchYear }}</template>
</el-table-column>
<el-table-column prop="batchName" label="后评估批次名称">
</el-table-column>
<el-table-column prop="batchName" label="后评估批次名称"> </el-table-column>
<el-table-column prop="expertName" label="评审专家" width="auto">
</el-table-column>
<el-table-column prop="expertName" label="评审专家" width="auto"> </el-table-column>
<el-table-column
prop="projectName"
label="待评估项目"
width="auto"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="planReviewDate"
label="计划评估日期"
width="auto"
>
<el-table-column prop="projectName" label="待评估项目" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="planReviewDate" label="计划评估日期" width="auto"> </el-table-column>
<!-- <el-table-column
prop="postEvalStateText"
label="后评估批次状态"
......@@ -124,17 +90,13 @@
query: { batchName: scope.row.batchName },
}"
>
<el-button type="text" size="small">{{
scope.row.postEvalStateText
}}</el-button>
<el-button type="text" size="small">{{ scope.row.postEvalStateText }}</el-button>
</router-link>
</template>
</el-table-column>
<el-table-column prop="creator" label="发起人" width="120">
</el-table-column>
<el-table-column prop="createTime" label="发起时间" width="auto">
</el-table-column>
<el-table-column prop="creator" label="发起人" width="120"> </el-table-column>
<el-table-column prop="createTime" label="发起时间" width="auto"> </el-table-column>
<!-- <el-table-column prop="batchName" label="评估项目" width="auto">
</el-table-column> -->
<!-- <el-table-column prop="prjsOfExpert" label="已选择数量" width="auto">
......@@ -171,29 +133,14 @@
<el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchYear" disabled></el-input>
</el-form-item>
<el-form-item
label="后评估批次名称:"
prop="batchName"
class="fromItem"
>
<el-form-item label="后评估批次名称:" prop="batchName" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchName" disabled></el-input>
</el-form-item>
<el-form-item
label="计划评估日期:"
prop="planReviewDate"
class="fromItem"
>
<el-input
v-model="ruleFormdialogBJ.planReviewDate"
disabled
></el-input>
<el-form-item label="计划评估日期:" prop="planReviewDate" class="fromItem">
<el-input v-model="ruleFormdialogBJ.planReviewDate" disabled></el-input>
</el-form-item>
<el-form-item label="工作组织情况:" class="textarea">
<el-input
type="textarea"
v-model="ruleFormdialogBJ.description"
disabled
></el-input>
<el-input type="textarea" v-model="ruleFormdialogBJ.description" disabled></el-input>
</el-form-item>
</el-form>
......@@ -210,64 +157,29 @@
border
>
<el-table-column type="selection"> </el-table-column>
<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 prop="department" label="部门" width="150">
</el-table-column> -->
<el-table-column label="项目编码" width="150" prop="projectCode">
</el-table-column>
<el-table-column label="项目编码" width="150" prop="projectCode"> </el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
width="auto"
show-overflow-tooltip
>
<el-table-column prop="projectName" label="项目名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="100"
>
<el-table-column prop="constructionForm" label="建设形式" width="100">
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="140">
<template slot-scope="scope">
{{ scope.row.issueYear }}
</template>
<template slot-scope="scope"> {{ scope.row.issueYear }}</template>
</el-table-column>
<el-table-column prop="startupStatus" label="启动日期" width="90">
<el-table-column prop="startupStatus" label="启动日期" width="90"> </el-table-column>
<el-table-column prop="accountingStatus" label="入账状态" width="90"> </el-table-column>
<el-table-column prop="accountingProportion" label="累计入账占比" width="90">
<template slot-scope="scope"> {{ scope.row.accountingProportion }}% </template>
</el-table-column>
<el-table-column
prop="accountingStatus"
label="入账状态"
width="90"
>
</el-table-column>
<el-table-column
prop="accountingProportion"
label="累计入账占比"
width="90"
>
<template slot-scope="scope">
{{ scope.row.accountingProportion }}%
</template>
</el-table-column>
<el-table-column
prop="entryAmount"
label="入账金额(万)"
width="120"
>
</el-table-column>
<el-table-column
prop="currentProgress"
label="当前进度"
width="120"
>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220">
<el-table-column prop="entryAmount" label="入账金额(万)" width="120">
</el-table-column>
<el-table-column prop="currentProgress" label="当前进度" width="120"> </el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220"> </el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
......@@ -275,8 +187,7 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110">
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110"> </el-table-column>
</el-table>
</div>
<el-pagination
......@@ -310,44 +221,24 @@
<el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchYear" disabled></el-input>
</el-form-item>
<el-form-item
label="后评估批次名称:"
prop="batchName"
class="fromItem"
>
<el-form-item label="后评估批次名称:" prop="batchName" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchName" disabled></el-input>
</el-form-item>
<el-form-item
label="计划评估日期:"
prop="planReviewDate"
class="fromItem"
>
<el-input
v-model="ruleFormdialogBJ.planReviewDate"
disabled
></el-input>
<el-form-item label="计划评估日期:" prop="planReviewDate" class="fromItem">
<el-input v-model="ruleFormdialogBJ.planReviewDate" disabled></el-input>
</el-form-item>
<el-form-item label="工作组织情况:" class="textarea">
<el-input
type="textarea"
v-model="ruleFormdialogBJ.description"
disabled
></el-input>
<el-input type="textarea" v-model="ruleFormdialogBJ.description" disabled></el-input>
</el-form-item>
</el-form>
<p class="zjBtn">
待评估项目 <span @click="xzExperts()">手动选择待评估项目</span>
</p>
<p class="zjBtn">待评估项目 <span @click="xzExperts()">手动选择待评估项目</span></p>
<div class="setscrolldialogxz">
<el-table
@selection-change="handleSelectionChange"
:data="
addtableData.slice(
(addcurrentPage - 1) * pageSizeAdd,
addcurrentPage * pageSizeAdd
)
addtableData.slice((addcurrentPage - 1) * pageSizeAdd, addcurrentPage * pageSizeAdd)
"
tooltip-effect="dark myTooltips"
style="width: 100%"
......@@ -357,62 +248,27 @@
border
>
<el-table-column type="selection"> </el-table-column>
<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 label="项目编码" width="150" prop="projectCode">
</el-table-column>
<el-table-column label="项目编码" width="150" prop="projectCode"> </el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
width="auto"
show-overflow-tooltip
>
<el-table-column prop="projectName" label="项目名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="100"
>
<el-table-column prop="constructionForm" label="建设形式" width="100">
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="140">
<template slot-scope="scope">
{{ scope.row.issueYear }}
</template>
<template slot-scope="scope"> {{ scope.row.issueYear }}</template>
</el-table-column>
<el-table-column prop="startupStatus" label="启动日期" width="90">
<el-table-column prop="startupStatus" label="启动日期" width="90"> </el-table-column>
<el-table-column prop="accountingStatus" label="入账状态" width="90"> </el-table-column>
<el-table-column prop="accountingProportion" label="累计入账占比" width="90">
<template slot-scope="scope"> {{ scope.row.accountingProportion }}% </template>
</el-table-column>
<el-table-column
prop="accountingStatus"
label="入账状态"
width="90"
>
</el-table-column>
<el-table-column
prop="accountingProportion"
label="累计入账占比"
width="90"
>
<template slot-scope="scope">
{{ scope.row.accountingProportion }}%
</template>
</el-table-column>
<el-table-column
prop="entryAmount"
label="入账金额(万)"
width="120"
>
</el-table-column>
<el-table-column
prop="currentProgress"
label="当前进度"
width="120"
>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220">
<el-table-column prop="entryAmount" label="入账金额(万)" width="120">
</el-table-column>
<el-table-column prop="currentProgress" label="当前进度" width="120"> </el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220"> </el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
......@@ -420,8 +276,7 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110">
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110"> </el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
......@@ -465,25 +320,13 @@
<div class="adzjdialog">
<el-form :model="ruleFormZJ" label-width="100px" class="demo-ruleForm">
<el-form-item label="项目编码:" prop="projectCode" class="fromItem">
<el-input
v-model="ruleFormZJ.projectCode"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="ruleFormZJ.projectCode" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="项目名称:" prop="projectName" class="fromItem">
<el-input
v-model="ruleFormZJ.projectName"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="ruleFormZJ.projectName" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="项目年度:" prop="issueYear" class="fromItem">
<el-select
v-model="ruleFormZJ.issueYear"
placeholder="请选择"
clearable
>
<el-select v-model="ruleFormZJ.issueYear" placeholder="请选择" clearable>
<el-option
v-for="(item, index) in yearsList"
:key="index"
......@@ -492,38 +335,18 @@
/>
</el-select>
</el-form-item>
<el-form-item
label="建设形式:"
prop="constructionForm"
class="fromItem"
>
<el-select
v-model="ruleFormZJ.constructionForm"
placeholder="请选择"
clearable
>
<el-form-item label="建设形式:" prop="constructionForm" class="fromItem">
<el-select v-model="ruleFormZJ.constructionForm" placeholder="请选择" clearable>
<el-option label="独立建设" value="1"></el-option>
<el-option label="统推" value="2"></el-option>
<el-option label="自建" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item
label="合同编码:"
prop="contractNumber"
class="fromItem"
>
<el-input
v-model="ruleFormZJ.contractNumber"
placeholder="请输入"
clearable
></el-input>
<el-form-item label="合同编码:" prop="contractNumber" class="fromItem">
<el-input v-model="ruleFormZJ.contractNumber" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="合同名称:" prop="contractName" class="fromItem">
<el-input
v-model="ruleFormZJ.contractName"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="ruleFormZJ.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item class="cxItem">
<span class="zjquery" @click="xzExperts()"> 查询 </span>
......@@ -544,64 +367,29 @@
border
>
<el-table-column type="selection" :selectable="selectable"> </el-table-column>
<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 prop="department" label="部门" width="150">
</el-table-column> -->
<el-table-column label="项目编码" width="150" prop="projectCode">
</el-table-column>
<el-table-column label="项目编码" width="150" prop="projectCode"> </el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
width="auto"
show-overflow-tooltip
>
<el-table-column prop="projectName" label="项目名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="100"
>
<el-table-column prop="constructionForm" label="建设形式" width="100">
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="140">
<template slot-scope="scope">
{{ scope.row.issueYear }}
</template>
<template slot-scope="scope"> {{ scope.row.issueYear }}</template>
</el-table-column>
<el-table-column prop="startupStatus" label="启动日期" width="90">
</el-table-column>
<el-table-column
prop="accountingStatus"
label="入账状态"
width="90"
>
</el-table-column>
<el-table-column
prop="accountingProportion"
label="累计入账占比"
width="90"
>
<template slot-scope="scope">
{{ scope.row.accountingProportion }}%
</template>
</el-table-column>
<el-table-column
prop="entryAmount"
label="入账金额(万)"
width="120"
>
<el-table-column prop="startupStatus" label="启动日期" width="90"> </el-table-column>
<el-table-column prop="accountingStatus" label="入账状态" width="90"> </el-table-column>
<el-table-column prop="accountingProportion" label="累计入账占比" width="90">
<template slot-scope="scope"> {{ scope.row.accountingProportion }}% </template>
</el-table-column>
<el-table-column
prop="currentProgress"
label="当前进度"
width="120"
>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220">
<el-table-column prop="entryAmount" label="入账金额(万)" width="120">
</el-table-column>
<el-table-column prop="currentProgress" label="当前进度" width="120"> </el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220"> </el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
......@@ -610,12 +398,9 @@
>
</el-table-column>
<el-table-column prop="zcstate" label="审核状态" width="110">
<template slot-scope="scope">
{{ scope.row.zcstate | zcstatefilter }}</template
>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110">
<template slot-scope="scope"> {{ scope.row.zcstate | zcstatefilter }}</template>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110"> </el-table-column>
</el-table>
</div>
......@@ -632,15 +417,14 @@
</el-pagination>
<p class="midBtn">
<span @click="cancelZJ()">取消</span
><span @click="saveZJ()">选择</span>
<span @click="cancelZJ()">取消</span><span @click="saveZJ()">选择</span>
</p>
</div>
</el-dialog>
</div>
</template>
<script>
<script>
import {
projectInfo,
fbProjectInfo,
......@@ -649,43 +433,43 @@ import {
pmProInitiation,
chProjectInfo,
bcProjectInfo,
} from "@/api/index";
import { generateYearOptions, constructionFormText } from "@/utils/cache";
} from '@/api/index'
import { generateYearOptions, constructionFormText } from '@/utils/cache'
export default {
data() {
return {
yearsList: generateYearOptions(),
oldid: "",
oldid: '',
ruleForm: {
batchYear: "",
batchName: "",
postEvalState: "",
batchYear: '',
batchName: '',
postEvalState: '',
dates: [],
},
ruleFormdialog: {
batchYear: "",
batchName: "",
planReviewDate: "",
fullName: "",
batchYear: '',
batchName: '',
planReviewDate: '',
fullName: '',
},
ruleFormZJ: {
fields: "",
expertState: "",
fullName: "",
fields: '',
expertState: '',
fullName: '',
},
ruleFormdialogAdd: {
batchYear: "",
batchName: "",
planReviewDate: "",
description: "",
remark: "",
batchYear: '',
batchName: '',
planReviewDate: '',
description: '',
remark: '',
},
ruleFormdialogBJ: {
batchYear: "",
batchName: "",
planReviewDate: "",
prjsOfExpert: "",
description: "",
batchYear: '',
batchName: '',
planReviewDate: '',
prjsOfExpert: '',
description: '',
},
tableData: [],
tableDataQD: [], //清单列表
......@@ -709,43 +493,43 @@ export default {
pageSizeAdd: 10,
currentedit: 1,
pageSizeedit: 10,
xfParam: "",
xfParam: '',
dialogedit: false,
expertIdList: [],
totalBJ: 0,
addZJList: [],
expertState: "",
fields: "",
zjfullName: "",
expertState: '',
fields: '',
zjfullName: '',
zjtotal: 0,
zjtableData: [],
addcurrentPage: 1,
addtableData: [],
message: {},
};
}
},
filters: {
zcstatefilter(val) {
if (val == 1) {
return "待评估";
return '待评估'
} else if (val == 2) {
return "需整改";
return '需整改'
} else if (val == 3) {
return "已整改";
return '已整改'
} else if (val == 4) {
return "已归档";
return '已归档'
} else {
return " ";
return ' '
}
},
},
watch: {
// 监听路由对象中的参数部分
"$route.params": {
'$route.params': {
immediate: true,
handler(newParams, oldParams) {
//现在配合demo路由变化掉了两次接口等线上去掉这块时候mounted要调用
this.submitForm();
this.submitForm()
},
},
},
......@@ -754,14 +538,14 @@ export default {
},
methods: {
timeChange(time) {
console.log("tttttt", time);
console.log('tttttt', time)
if (time) {
//给后端的参数
this.ruleForm.createStartTime = time[0];
this.ruleForm.createEndTime = time[1];
this.ruleForm.createStartTime = time[0]
this.ruleForm.createEndTime = time[1]
} else {
this.ruleForm.createStartTime = "";
this.ruleForm.createEndTime = "";
this.ruleForm.createStartTime = ''
this.ruleForm.createEndTime = ''
}
},
async submitForm() {
......@@ -769,101 +553,93 @@ export default {
current: this.currentPage,
pageSize: this.pageSize,
module: 0,
};
Object.assign(params, this.ruleForm);
console.log(params);
let res = await projectInfo(params);
if (res.code == "200") {
this.tableData = res.data.records;
}
Object.assign(params, this.ruleForm)
console.log(params)
let res = await projectInfo(params)
if (res.code == '200') {
this.tableData = res.data.records
this.tableData.forEach((item) => {
if (item.postEvalState == "3") {
this.$set(item, "postEvalStateText", "执行中");
} else if (item.postEvalState == "4") {
this.$set(item, "postEvalStateText", "已撤回");
} else if (item.postEvalState == "5") {
this.$set(item, "postEvalStateText", "已完成");
if (item.postEvalState == '3') {
this.$set(item, 'postEvalStateText', '执行中')
} else if (item.postEvalState == '4') {
this.$set(item, 'postEvalStateText', '已撤回')
} else if (item.postEvalState == '5') {
this.$set(item, 'postEvalStateText', '已完成')
} else {
this.$set(item, "postEvalStateText", "已发起");
this.$set(item, 'postEvalStateText', '已发起')
}
});
this.total = res.data.total * 1;
})
this.total = res.data.total * 1
}
},
resetForm() {
this.$refs.formName.resetFields();
this.currentPage = 1;
this.pageSize = 10;
this.ruleForm.createStartTime = "";
this.ruleForm.createEndTime = "";
this.ruleForm.dates = [];
this.submitForm();
this.$refs.formName.resetFields()
this.currentPage = 1
this.pageSize = 10
this.ruleForm.createStartTime = ''
this.ruleForm.createEndTime = ''
this.ruleForm.dates = []
this.submitForm()
},
//详情
async detailsForm() {
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
this.$message('请选择')
return
}
this.ruleFormdialogBJ = this.checkedList[0];
this.ruleFormdialogBJ = this.checkedList[0]
let params = {
current: this.currentPageXQ,
pageSize: this.pageSizeXQ,
batchId: this.checkedList[0].batchId,
};
Object.assign(params, this.ruleFormdialogAdd);
this.addtableData = [];
let res = await joinProjectInfo(params);
if (res.code == "200") {
this.addtableData = res.data.records;
}
Object.assign(params, this.ruleFormdialogAdd)
this.addtableData = []
let res = await joinProjectInfo(params)
if (res.code == '200') {
this.addtableData = res.data.records
this.addtableData.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.addtotal = res.data.total * 1;
console.log(this.addtableData, "this.addtableData");
this.dialogXQ = true;
this.$set(item, 'constructionForm', constructionFormText(item.constructionForm))
})
this.addtotal = res.data.total * 1
console.log(this.addtableData, 'this.addtableData')
this.dialogXQ = true
}
},
//确认评估项目
async configs() {
// 只能选中状态待评估的
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
this.$message('请选择')
return
}
if (this.checkedList[0].postEvalStateText == "执行中") {
this.$message("该项目已在执行中");
return;
if (this.checkedList[0].postEvalStateText == '执行中') {
this.$message('该项目已在执行中')
return
}
this.ruleFormdialogBJ = this.checkedList[0];
this.dialogAdd = true;
this.addtableData = [];
this.ruleFormdialogBJ = this.checkedList[0]
this.dialogAdd = true
this.addtableData = []
let params = {
current: this.addcurrentPage,
pageSize: this.pageSizeAdd,
batchId: this.checkedList[0].batchId,
};
Object.assign(params, this.ruleFormdialogAdd);
let res = await joinProjectInfo(params);
if (res.code == "200") {
this.addtableData = res.data.records;
}
Object.assign(params, this.ruleFormdialogAdd)
let res = await joinProjectInfo(params)
if (res.code == '200') {
this.addtableData = res.data.records
this.addtableData.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.addtotal = res.data.total * 1;
this.oldid = "";
this.$set(item, 'constructionForm', constructionFormText(item.constructionForm))
})
this.addtotal = res.data.total * 1
this.oldid = ''
if (this.addtableData.length > 0) {
this.addtableData.forEach((item) => {
this.oldid = this.oldid.concat(item.projectCode + ",");
});
this.oldid = this.oldid.concat(item.projectCode + ',')
})
}
}
},
......@@ -871,170 +647,165 @@ export default {
//表格颜色
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
}
return "";
return ''
},
//主列表选中行信息
handleSelectionChange(selection) {
if (Array.isArray(selection) && selection.length > 1) {
this.$refs.multipleTable.toggleRowSelection(selection[0], false);
this.$refs.multipleTable.toggleRowSelection(selection[1], true);
this.$refs.multipleTable.toggleRowSelection(selection[0], false)
this.$refs.multipleTable.toggleRowSelection(selection[1], true)
}
this.checkedList = this.$refs.multipleTable.selection;
this.ruleFormdialog = this.checkedList[0];
console.log(this.checkedList, "2222");
this.checkedList = this.$refs.multipleTable.selection
this.ruleFormdialog = this.checkedList[0]
console.log(this.checkedList, '2222')
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize = val;
this.submitForm();
console.log(`每页 ${val} 条`)
this.pageSize = val
this.submitForm()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.submitForm();
console.log(`当前页: ${val}`)
this.currentPage = val
this.submitForm()
},
handleSizeChangeZJ(val) {
console.log(`每页 ${val} 条`);
this.pageSizeZJ = val;
this.xzExperts();
console.log(`每页 ${val} 条`)
this.pageSizeZJ = val
this.xzExperts()
},
handleCurrentChangeZJ(val) {
console.log(`当前页: ${val}`);
this.currentZJ = val;
this.xzExperts();
console.log(`当前页: ${val}`)
this.currentZJ = val
this.xzExperts()
},
handleSizeChangeAdd(val) {
this.pageSizeAdd = val;
this.pageSizeAdd = val
// this.detailsForm();
console.log(val, this.addcurrentPage, "1111");
console.log(val, this.addcurrentPage, '1111')
},
handleCurrentChangeAdd(val) {
console.log(val, this.addcurrentPage, "0000");
this.addcurrentPage = val;
console.log(val, this.addcurrentPage, '0000')
this.addcurrentPage = val
// this.detailsForm();
},
handleSizeChangXQ(val) {
this.pageSizeXQ = val;
this.detailsForm();
console.log(val, this.addcurrentPage, "1111");
this.pageSizeXQ = val
this.detailsForm()
console.log(val, this.addcurrentPage, '1111')
},
handleCurrentChangeXQ(val) {
console.log(val, this.addcurrentPage, "0000");
this.currentPageXQ = val;
this.detailsForm();
console.log(val, this.addcurrentPage, '0000')
this.currentPageXQ = val
this.detailsForm()
},
//选择项目
saveZJ() {
if (this.addZJList.length < 1) {
this.$message("请选择项目");
return;
this.$message('请选择项目')
return
}
console.log(this.addtableData, this.addZJList, "55555");
this.addtableData = [...this.addtableData, ...this.addZJList];
console.log(this.addtableData, this.addZJList, '55555')
this.addtableData = [...this.addtableData, ...this.addZJList]
this.addtableData = this.addtableData.filter((obj, index, self) => {
return index == self.findIndex((t) => t.projectCode == obj.projectCode);
});
this.addtotal = this.addtableData.length;
this.dialogAddzj = false;
return index == self.findIndex((t) => t.projectCode == obj.projectCode)
})
this.addtotal = this.addtableData.length
this.dialogAddzj = false
},
cancelZJ() {
this.dialogAddzj = false;
this.dialogAddzj = false
},
async xzExperts() {
this.dialogAddzj = true;
this.dialogAddzj = true
let params = {
current: this.currentZJ,
pageSize: this.pageSizeZJ,
prjStr: this.oldid,
};
Object.assign(params, this.ruleFormZJ);
let res = await pmProInitiation(params);
console.log(res.data.records, "res.data.recordsres.data.records");
this.zjtableData = res.data.records;
}
Object.assign(params, this.ruleFormZJ)
let res = await pmProInitiation(params)
console.log(res.data.records, 'res.data.recordsres.data.records')
this.zjtableData = res.data.records
this.zjtableData.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.zjtotal = res.data.total * 1;
console.log(res, "xxx");
this.$set(item, 'constructionForm', constructionFormText(item.constructionForm))
})
this.zjtotal = res.data.total * 1
console.log(res, 'xxx')
},
saveXZ() {
if (this.addtableData.length < 1) {
this.$message("请选择待评估项目");
this.$message('请选择待评估项目')
}
console.log(this.addZJList, "this.addZJList");
console.log(this.addZJList, 'this.addZJList')
// 确认发布入参
let expertIdList = "";
let expertIdList = ''
if (this.addtableData.length > 0) {
this.addtableData.forEach((item) => {
expertIdList = expertIdList.concat(item.projectCode + ",");
});
expertIdList = expertIdList.concat(item.projectCode + ',')
})
}
let params = {
expertStr: expertIdList,
};
params.batchId = this.ruleFormdialogBJ.batchId;
}
params.batchId = this.ruleFormdialogBJ.batchId
// params.prjsOfExpert = this.ruleFormdialogBJ.prjsOfExpert;
console.log(params, "222");
console.log(params, '222')
// return
fbProjectInfo(params).then((res) => {
this.dialogAdd = false;
this.expertIdList = expertIdList;
this.$message("提交成功");
this.resetForm();
});
this.dialogAdd = false
this.expertIdList = expertIdList
this.$message('提交成功')
this.resetForm()
})
},
savepro() {
// if (this.addtableData.length < 1) {
// this.$message("没有可保存的项目");
// }
console.log(this.addZJList, "this.addZJList");
console.log(this.addZJList, 'this.addZJList')
// 确认发布入参
let expertIdList = "";
let expertIdList = ''
if (this.addtableData.length > 0) {
this.addtableData.forEach((item) => {
expertIdList = expertIdList.concat(item.projectCode + ",");
});
expertIdList = expertIdList.concat(item.projectCode + ',')
})
}
let params = {
expertStr: expertIdList,
};
params.batchId = this.ruleFormdialogBJ.batchId;
}
params.batchId = this.ruleFormdialogBJ.batchId
// params.prjsOfExpert = this.ruleFormdialogBJ.prjsOfExpert;
console.log(params, "222");
console.log(params, '222')
// return
bcProjectInfo(params).then((res) => {
this.$message("保存成功");
this.$message('保存成功')
// this.dialogAdd = false;
this.expertIdList = expertIdList;
this.expertIdList = expertIdList
// this.resetForm();
});
})
},
cancelXZ() {
this.dialogAdd = false;
this.dialogAdd = false
},
selectable(item,index){
if(item.zcstate == 1 || item.zcstate == 2 || item.zcstate == 3){
selectable(item, index) {
if (item.zcstate == 1 || item.zcstate == 2 || item.zcstate == 3) {
return false
}else{
} else {
return true
}
},
selectAll(selection) {
this.addZJList = this.$refs.multipleTableZJ.selection;
console.log(this.$refs.multipleTableZJ.selection, "2222222");
this.addZJList = this.$refs.multipleTableZJ.selection
console.log(this.$refs.multipleTableZJ.selection, '2222222')
// selection = selection.filter(item=>{
// return item.zcstate!=1&&item.zcstate!=2&&item.zcstate!=3
// });
......@@ -1056,60 +827,57 @@ export default {
//选中的项目
handleSelectionChangeZJ(selection, row) {
console.log("来了么", row);
console.log('来了么', row)
if (selection.length < 1) {
return;
return
}
if (selection.length === this.zjtableData.Length) {
console.log("全选");
console.log('全选')
}
let info = row.zcstate;
let info = row.zcstate
if (info == 1 || info == 2 || info == 3) {
this.$refs.multipleTableZJ.toggleRowSelection(
selection[selection.length - 1],
false
);
this.$message("该项目在流程中,请选择其他项目");
console.log("不让点");
return;
}
this.addZJList = this.$refs.multipleTableZJ.selection;
console.log(this.$refs.multipleTableZJ.selection, "2222222");
this.$refs.multipleTableZJ.toggleRowSelection(selection[selection.length - 1], false)
this.$message('该项目在流程中,请选择其他项目')
console.log('不让点')
return
}
this.addZJList = this.$refs.multipleTableZJ.selection
console.log(this.$refs.multipleTableZJ.selection, '2222222')
},
//点击删除
async handleClick(row, index, rows) {
let params = {
projectId: row.projectCode,
batchId: this.checkedList[0].batchId,
};
this.$confirm("此操作将删除该项目, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
this.$confirm('此操作将删除该项目, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
let res = await delProjectInfo(params);
let res = await delProjectInfo(params)
if (res.code == 200) {
this.$message({
type: "success",
message: "删除成功!",
});
this.addtotal--;
type: 'success',
message: '删除成功!',
})
this.addtotal--
rows.splice(index, 1)
} else {
this.$message({
type: "info",
message: "删除失败!",
});
type: 'info',
message: '删除失败!',
})
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
rows.splice(index, 1);
type: 'info',
message: '已取消删除',
})
})
// let res = await delProjectInfo(params);
// if(res.code=200){
......@@ -1121,38 +889,38 @@ export default {
//点击撤回
async withdraw() {
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
this.$message('请选择')
return
}
if (this.checkedList[0].postEvalStateText == "已撤回") {
this.$message("该项目已撤回");
return;
if (this.checkedList[0].postEvalStateText == '已撤回') {
this.$message('该项目已撤回')
return
}
if (this.checkedList[0].postEvalStateText == "已发起") {
this.$message("该项目还未确认评估");
return;
if (this.checkedList[0].postEvalStateText == '已发起') {
this.$message('该项目还未确认评估')
return
}
this.$confirm("是否撤回?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
this.$confirm('是否撤回?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
distinguishCancelAndClose: true,
type: "warning",
type: 'warning',
})
.then(async () => {
let res = await chProjectInfo({
batchId: this.checkedList[0].batchId,
});
if ((res.code = "200")) {
this.$message("已撤回");
this.resetForm();
})
if ((res.code = '200')) {
this.$message('已撤回')
this.resetForm()
}
})
.catch((action) => {});
.catch((action) => {})
},
},
};
}
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.main {
font-size: 14px;
position: relative;
......@@ -1479,7 +1247,7 @@ export default {
overflow-x: hidden !important;
}
}
.tipred{
.tipred {
color: red;
text-align: left;
font-size: 13px;
......@@ -1498,5 +1266,4 @@ export default {
position: absolute;
right: 0;
}
</style>
......@@ -21,10 +21,7 @@
<div class="left">
<p class="tableTitle">
检查内容
<i
class="el-icon-full-screen"
@click="dialogFullScreen = !dialogFullScreen"
></i>
<i class="el-icon-full-screen" @click="dialogFullScreen = !dialogFullScreen"></i>
</p>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
......@@ -51,24 +48,16 @@
</div>
<iframe
v-if="
blobType == 'pdf' || (blobType == 'doc' && options.length > 0)
"
v-if="blobType == 'pdf' || (blobType == 'doc' && options.length > 0)"
:key="iframeUrl"
:src="iframeUrl"
frameborder="0"
:class="dialogFullScreen ? 'iframeDivBig' : 'iframeDiv'"
></iframe>
<div
v-else-if="blobType == 'png' || blobType == 'jpg'"
class="blobImg"
>
<div v-else-if="blobType == 'png' || blobType == 'jpg'" class="blobImg">
<img :src="iframeUrl" alt="" />
</div>
<div
class="docDiv"
v-else-if="blobType == 'docx' && options.length > 0"
>
<div class="docDiv" v-else-if="blobType == 'docx' && options.length > 0">
<div :ref="`word`" :id="`word${item.typeCode}`"></div>
</div>
</el-tab-pane>
......@@ -77,28 +66,18 @@
<div class="right">
<p class="tableTitle">检查项</p>
<div :class="dialogFullScreen ? 'rightscollBig' : 'rightscoll'">
<div
class="rightContent"
v-for="item in questionList"
:key="item.questionId"
>
<div class="rightContent" v-for="item in questionList" :key="item.questionId">
<h3>{{ item.questionId }}.{{ item.quesCheckItem }}</h3>
<p class="msg">
{{ item.checkDesc }}
<el-button
type="primary"
v-if="
item.checkDesc ==
'可研中的需求内容应与业务需求报告中的需求匹配' && wtmx
"
v-if="item.checkDesc == '可研中的需求内容应与业务需求报告中的需求匹配' && wtmx"
@click="zhanshi()"
>匹配展示</el-button
>
</p>
<div
class="quesznfx"
v-if="item.znfxList && item.znfxList.length > 0"
>
<div class="quesznfx" v-if="item.znfxList && item.znfxList.length > 0">
<p class="tips">智能分析:</p>
<!-- <p>{{ item.znfxList[0].projectStage }}</p> -->
......@@ -106,7 +85,7 @@
class="resimg"
:src="resimg"
alt=""
v-if="item.znfxList[0].projectStage == '14'&&resimg"
v-if="item.znfxList[0].projectStage == '14' && resimg"
/>
<div v-else>
<div
......@@ -117,7 +96,10 @@
></div>
</div>
<span class="el-upload-list__item-actions" v-if="item.znfxList[0].projectStage == '14'&&resimg">
<span
class="el-upload-list__item-actions"
v-if="item.znfxList[0].projectStage == '14' && resimg"
>
<!-- 图片放大 -->
<span
class="el-upload-list__item-preview"
......@@ -126,19 +108,10 @@
<i class="el-icon-zoom-in"></i>
</span>
</span>
</div>
<div
class="quesznfx"
v-if="item.fzfxList && item.fzfxList.length > 0"
>
<div class="quesznfx" v-if="item.fzfxList && item.fzfxList.length > 0">
<p class="tips">辅助分析:</p>
<div
v-for="(itemfz, index) in item.fzfxList"
:key="index"
class="inputDiv"
>
<div v-for="(itemfz, index) in item.fzfxList" :key="index" class="inputDiv">
<el-input
type="textarea"
:autosize="{ minRows: 1, maxRows: 4 }"
......@@ -156,11 +129,7 @@
</div>
<div class="question">
<p class="tips">问题描述:</p>
<div
v-for="(items, index) in item.evalList"
:key="index"
class="inputDiv"
>
<div v-for="(items, index) in item.evalList" :key="index" class="inputDiv">
<el-input
type="textarea"
:autosize="{ minRows: 1, maxRows: 4 }"
......@@ -169,9 +138,7 @@
:disabled="items.disabled"
>
</el-input
><el-button @click="delInput(item, index)" type="primary"
>删除</el-button
>
><el-button @click="delInput(item, index)" type="primary">删除</el-button>
<el-upload
class="upload_box"
......@@ -181,7 +148,7 @@
:on-change="handleEditChange"
:http-request="
(res) => {
return fileupdate(res, items);
return fileupdate(res, items)
}
"
:before-upload="beforeAvatarUpload"
......@@ -193,21 +160,12 @@
action=""
>
<!-- 加号标识 -->
<el-button
class="upload_btn"
slot="trigger"
size="small"
type="primary"
>
<el-button class="upload_btn" slot="trigger" size="small" type="primary">
上传截图
</el-button>
<!-- 上传后显示 -->
<div slot="file" slot-scope="{ file }">
<img
class="el-upload-list__item-thumbnail"
:src="file.url"
alt=""
/>
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<!-- 图片放大 -->
<span
......@@ -241,11 +199,12 @@
</el-dialog>
<p class="addBtn">
<el-checkbox
<!-- <el-checkbox
v-model="item.checked"
@change="changeChecked(item)"
>未发现问题</el-checkbox
><i class="el-icon-circle-plus" @click="addInput(item)"></i>
> -->
<i class="el-icon-circle-plus" @click="addInput(item)"></i>
</p>
</div>
</div>
......@@ -282,53 +241,53 @@ import {
ossupload,
presignedUrl,
selFileList,
} from "@/api/indexzc";
import { MaterialsListKY } from "@/utils/cache";
} from '@/api/indexzc'
import { MaterialsListKY } from '@/utils/cache'
export default {
data() {
return {
resimg: "",
resimg: '',
dialogFullScreen: false,
valuesel: "",
valuesel: '',
options: [],
dialogImageUrl: "",
dialogImageUrl: '',
fileList: [],
evalList: [
{
evalQues: "",
evalQues: '',
hideUploadEdit: false,
},
],
tabList: [
{ label: "可研", id: 0 },
{ label: '可研', id: 0 },
// { label: "计划", id: 1 },
{ label: "采购", id: 2 },
{ label: "合同", id: 3 },
{ label: "执行", id: 4 },
{ label: "结决算及转资", id: 5 },
{ label: '采购', id: 2 },
{ label: '合同', id: 3 },
{ label: '执行', id: 4 },
{ label: '结决算及转资', id: 5 },
],
tabListKY: [],
active: 0,
activeName: "0",
activeName: '0',
clqparams: {},
iframeUrl: "",
iframeUrl: '',
urlList: [],
questionList: [],
file: "",
file: '',
dialogVisible: false,
fullURL: "",
fullURL: '',
hideUploadEdit: false,
limitNum: 1,
disabled: false,
oldQuestionList: [], //对比列表
blobType: "pdf", //bolb类型
projectName: "",
valuesel: "",
blobType: 'pdf', //bolb类型
projectName: '',
valuesel: '',
dialogzhanshi: false,
wtmx: "",
wtmx: '',
docxOptions: {
className: "kaimo-docx-666", // string:默认和文档样式类的类名/前缀
className: 'kaimo-docx-666', // string:默认和文档样式类的类名/前缀
inWrapper: false, // boolean:启用围绕文档内容的包装器渲染
ignoreWidth: false, // boolean:禁用页面的渲染宽度
ignoreHeight: false, // boolean:禁止渲染页面高度
......@@ -342,300 +301,284 @@ export default {
showChanges: false, // boolean:启用文档更改的实验性渲染(插入/删除)
debug: false, // boolean:启用额外的日志记录
},
};
}
},
mounted() {
this.clqparams = JSON.parse(this.$route.query.clqparams);
this.projectName = this.$route.query.projectName;
this.init(this.clqparams);
this.clqparams = JSON.parse(this.$route.query.clqparams)
this.projectName = this.$route.query.projectName
this.init(this.clqparams)
},
methods: {
zhanshi() {
this.dialogzhanshi = true;
this.dialogzhanshi = true
},
//提交问题清单
async submitNexts() {
this.$confirm("您确定检查完所有流程并去提交?", "提示", {
confirmButtonText: "是",
cancelButtonText: "继续检查",
this.$confirm('您确定检查完所有流程并去提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '继续检查',
distinguishCancelAndClose: true,
type: "warning",
type: 'warning',
})
.then(() => {
this.save(2);
this.save(2)
})
.catch((action) => {});
.catch((action) => {})
},
// 放大图片
handlePictureCardPreview(file) {
console.log("点击放大");
this.dialogImageUrl = file;
this.dialogVisible = true;
console.log('点击放大')
this.dialogImageUrl = file
this.dialogVisible = true
},
// 删除图片
handleRemove(file, fileList) {
console.log(fileList, "this.fileList");
console.log(fileList, 'this.fileList')
if (this.fileList.length == 0) {
this.fileList = [];
this.fileList = []
} else {
let dl = this.fileList.indexOf(file);
this.fileList.splice(dl, 1);
let dl = this.fileList.indexOf(file)
this.fileList.splice(dl, 1)
}
this.hideUploadEdit = this.fileList.length >= this.limitNum;
this.hideUploadEdit = this.fileList.length >= this.limitNum
},
// on-change添加文件,上传成功和上传失败时都会被调用
handleEditChange(file, fileList) {
this.hideUploadEdit = fileList.length >= this.limitNum;
this.hideUploadEdit = fileList.length >= this.limitNum
},
// http-request自定义上传
ImgUploadSectionFile(param) {
this.param = param;
this.param = param
},
// before-upload上传文件之前的钩子,参数为上传的文件
// 若返回 false 或者返回 Promise 且被 reject,则停止上传
beforeAvatarUpload(file) {
this.file = file;
const isJPG = file.type === "image/jpeg" || file.type === "image/png";
const isLt2M = this.file.size / 1024 < 1000;
console.log(this.file.size / 1024, "this.file.size this.file.size ");
this.file = file
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png'
const isLt2M = this.file.size / 1024 < 1000
console.log(this.file.size / 1024, 'this.file.size this.file.size ')
if (!isJPG) {
this.$message.error("上传图片只能是 JPG 或 PNG 格式!");
this.hideUploadEdit = false;
this.$message.error('上传图片只能是 JPG 或 PNG 格式!')
this.hideUploadEdit = false
}
if (!isLt2M) {
this.hideUploadEdit = false;
this.$message.error("上传图片大小不能超过 1000k!");
this.hideUploadEdit = false
this.$message.error('上传图片大小不能超过 1000k!')
}
return isJPG && isLt2M;
return isJPG && isLt2M
},
// 文件上传成功时的钩子
handleSuccess(file) {
// console.log(file);
const data = file.data;
const data = file.data
//然后数据、逻辑处理
},
showFullScreen() {
console.log(this.fileList, "4444");
this.fullURL = this.fileList[0].url;
this.dialogVisible = true;
console.log(this.fileList, '4444')
this.fullURL = this.fileList[0].url
this.dialogVisible = true
},
handleExceed() {
this.$message.warning(`只能选择一张图片`);
this.$message.warning(`只能选择一张图片`)
},
changexm(row, typeCode) {
this.downloadObject(this.options[row], typeCode);
console.log(row, "换文件");
this.downloadObject(this.options[row], typeCode)
console.log(row, '换文件')
},
async init(type) {
let params = {
projectStage: this.active * 1 + 1,
hgx: "hgx",
hgx: 'hgx',
...type,
};
}
Promise.all([selFile(params), selWtqdFZ(params)]).then(async (res) => {
this.tabListKY = [];
this.urlList = res[0].data;
this.tabListKY = []
this.urlList = res[0].data
if (this.urlList.length > 0) {
this.urlList.forEach((item) => {
this.tabListKY.push({
typeText: item.materialName,
typeCode: item.mid,
});
});
this.activeName = this.tabListKY[0].typeCode;
})
})
this.activeName = this.tabListKY[0].typeCode
let resList = await selFileList({
...params,
typeCode: this.tabListKY[0].typeCode,
});
this.options = resList.data;
})
this.options = resList.data || []
if (this.options.length > 0) {
this.valuesel = this.options[0].name;
this.downloadObject(this.options[0], this.tabListKY[0].typeCode);
this.valuesel = this.options[0].name
this.downloadObject(this.options[0], this.tabListKY[0].typeCode)
} else {
this.blobType = "png";
this.iframeUrl = "/nopdf.png";
this.blobType = 'png'
this.iframeUrl = '/nopdf.png'
}
} else {
// this.iframeUrl = "/nopdf.png";
}
if (res[1].data) {
this.questionList = res[1].data.records;
this.wtmx = res[1].data.MapkyXqfx;
let counterNum = 0;
this.questionList = res[1].data.records
this.wtmx = res[1].data.MapkyXqfx
let counterNum = 0
this.questionList.forEach(async (item) => {
if (item.isProblem == 0) {
this.$set(item, "checked", true);
this.changeChecked(item);
this.$set(item, 'checked', true)
this.changeChecked(item)
}
let respon = await selWtmx({ qid: item.qid });
let respon = await selWtmx({ qid: item.qid })
let paramsFX = {
batchId: this.clqparams.batchId,
projectId: this.clqparams.projectId,
projectStage: item.questionId,
};
let responfx = await selZnfx(paramsFX);
counterNum++;
}
let responfx = await selZnfx(paramsFX)
counterNum++
if (respon.data.records && respon.data.records.length > 0) {
respon.data.records.forEach(async (itemImg) => {
if (itemImg.url) {
let paramsImg = {
fileId: itemImg.id,
url: itemImg.url,
};
let resUrl = await presignedUrl(paramsImg);
this.$set(itemImg, "fileList", [
}
let resUrl = await presignedUrl(paramsImg)
this.$set(itemImg, 'fileList', [
{
url: resUrl.msg,
},
]);
itemImg.hideUploadEdit = true;
])
itemImg.hideUploadEdit = true
} else {
itemImg.hideUploadEdit = false;
itemImg.hideUploadEdit = false
}
});
this.$set(item, "evalList", [...respon.data.records]);
})
this.$set(item, 'evalList', [...respon.data.records])
} else {
this.$set(item, "evalList", [
this.$set(item, 'evalList', [
{
evalQues: "",
evalQues: '',
hideUploadEdit: false,
},
]);
])
}
if (responfx.data.records && responfx.data.records.length > 0) {
let znfxList = responfx.data.records.filter(async (item) => {
if (item.projectStage == "14") {
if (item.projectStage == '14') {
let paramsImg = {
url: item.checkDesc,
};
let resUrl = await presignedUrl(paramsImg);
}
let resUrl = await presignedUrl(paramsImg)
this.resimg = resUrl.msg;
this.resimg = resUrl.msg
}
if (item.checkDesc && item.type == 0) {
item.checkDesc = item.checkDesc.replace(/\n/g, "<br>");
item.checkDesc = item.checkDesc.replace(/\n/g, '<br>')
}
return item.checkDesc && item.type == 0;
});
this.$set(item, "znfxList", [...znfxList]);
return item.checkDesc && item.type == 0
})
this.$set(item, 'znfxList', [...znfxList])
let resfxList = responfx.data.records.filter((item) => {
return item.type == 1 || item.type == 2;
});
return item.type == 1 || item.type == 2
})
if (resfxList && resfxList.length > 0) {
let fzfxList = resfxList[0].checkDesc.split("\n");
this.$set(item, "fzfxList", [...fzfxList]);
let fzfxList = resfxList[0].checkDesc.split('\n')
this.$set(item, 'fzfxList', [...fzfxList])
}
} else {
this.$set(item, "znfxList", []);
this.$set(item, "fzfxList", []);
this.$set(item, 'znfxList', [])
this.$set(item, 'fzfxList', [])
}
if (counterNum == this.questionList.length) {
setTimeout(() => {
this.oldQuestionList = JSON.parse(
JSON.stringify(this.questionList)
);
}, 300);
this.oldQuestionList = JSON.parse(JSON.stringify(this.questionList))
}, 300)
}
});
})
}
});
})
},
async downloadObject(row, code) {
this.iframeUrl = "";
this.blobType = "";
let resUrl = await downloadObject({ fileId: row.id });
if (this.blobType == "") {
this.blobType = row.suffix;
this.iframeUrl = ''
this.blobType = ''
let resUrl = await downloadObject({ fileId: row.id })
if (this.blobType == '') {
this.blobType = row.suffix
}
const binaryData = [];
binaryData.push(resUrl);
let URL = window.URL.createObjectURL(
new Blob(binaryData, { type: "application/pdf" })
);
if (this.iframeUrl == "") {
this.iframeUrl = URL + "#view=FitH,top";
const binaryData = []
binaryData.push(resUrl)
let URL = window.URL.createObjectURL(new Blob(binaryData, { type: 'application/pdf' }))
if (this.iframeUrl == '') {
this.iframeUrl = URL + '#view=FitH,top'
}
if (this.blobType == "docx") {
let docx = require("docx-preview");
if (this.blobType == 'docx') {
let docx = require('docx-preview')
this.$nextTick(() => {
docx.renderAsync(
resUrl,
document.getElementById(`word${code}`),
null,
this.docxOptions
); // 渲染到页面预览
});
docx.renderAsync(resUrl, document.getElementById(`word${code}`), null, this.docxOptions) // 渲染到页面预览
})
}
},
async handleClick(tab) {
let params = {
projectStage: this.active * 1 + 1,
hgx: "hgx",
hgx: 'hgx',
...this.clqparams,
};
this.options = [];
this.valuesel = "";
this.iframeUrl = "";
console.log("切换", tab.index);
}
this.options = []
this.valuesel = ''
this.iframeUrl = ''
console.log('切换', tab.index)
let resList = await selFileList({
...params,
typeCode: this.tabListKY[tab.index].typeCode,
});
this.options = resList.data;
})
this.options = resList.data || []
if (this.options.length > 0) {
this.valuesel = this.options[0].name;
this.downloadObject(
this.options[0],
this.tabListKY[tab.index].typeCode
);
this.valuesel = this.options[0].name
this.downloadObject(this.options[0], this.tabListKY[tab.index].typeCode)
} else {
this.blobType = "png";
this.iframeUrl = "/nopdf.png";
this.blobType = 'png'
this.iframeUrl = '/nopdf.png'
}
},
change(id) {
console.log(
JSON.stringify(this.questionList) ==
JSON.stringify(this.oldQuestionList),
"完全相同么"
);
JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList),
'完全相同么',
)
if (
JSON.stringify(this.questionList) ==
JSON.stringify(this.oldQuestionList)
) {
this.active = id * 1;
if (JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList)) {
this.active = id * 1
// this.tabListKY = MaterialsListKY(id * 1 + 1);
this.init(this.clqparams);
return;
this.init(this.clqparams)
return
}
this.$confirm("是否保存?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
this.$confirm('是否保存?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
distinguishCancelAndClose: true,
type: "warning",
type: 'warning',
})
.then(() => {
this.save("3", id);
this.save('3', id)
// this.active = id * 1;
// this.init(this.clqparams);
})
.catch((action) => {
console.log(action, "actionaction");
if (action === "cancel") {
this.active = id * 1;
console.log(action, 'actionaction')
if (action === 'cancel') {
this.active = id * 1
// this.tabListKY = MaterialsListKY(id * 1 + 1);
this.init(this.clqparams);
this.init(this.clqparams)
} else {
}
});
})
// this.save()
// this.active = id * 1;
// this.tabListKY = MaterialsListKY(id * 1 + 1);
......@@ -643,139 +586,141 @@ export default {
},
delInput(item, index) {
if (item.evalList.length <= 1) {
item.checked = true;
this.$set(item, "checked", true);
this.changeChecked(item);
return false;
item.checked = true
this.$set(item, 'checked', true)
this.changeChecked(item)
return false
}
item.evalList.splice(index, 1);
item.evalList.splice(index, 1)
},
adopt(item, index, items) {
if (item.evalList.length == 1 && !item.evalList[0].evalQues) {
item.evalList[0].evalQues = items;
item.evalList[0].evalQues = items
} else {
item.evalList.push({
evalQues: items,
hideUploadEdit: false,
});
})
}
},
addInput(item) {
if (item.evalList[0].disabled == true) {
console.log("选择了未发现问题");
return;
console.log('选择了未发现问题')
return
}
item.evalList.push({
data: "",
evalQues: "",
});
data: '',
evalQues: '',
})
},
changeChecked(item) {
if (item.checked) {
this.$set(item, "evalList", [
this.$set(item, 'evalList', [
{
ideval: "",
evalQues: "",
ideval: '',
evalQues: '',
hideUploadEdit: false,
disabled: true,
},
]);
this.$set(item, "isProblem", 0);
])
this.$set(item, 'isProblem', 0)
// this.$set(item, "Id", 0);
} else {
item.evalList[0].disabled = false;
this.$set(item, "isProblem", 1);
item.evalList[0].disabled = false
this.$set(item, 'isProblem', 1)
}
},
cancel() {
this.$router.push({
path: "/assesszc/auxiliaryInspection",
});
path: '/assesszc/auxiliaryInspection',
})
},
async save(type) {
async save(type, id) {
this.questionList.forEach((item) => {
let evals = "";
let evals = ''
item.evalList.forEach((childItem) => {
evals = evals.concat(childItem.evalQues + ",");
});
evals = evals.slice(0, -1);
item.evalQues = evals;
if (item.evalList.length >= 1 && item.evalList[0].evalQues) {
item.isProblem = 1;
}
});
evals = evals.concat(childItem.evalQues + ',')
})
evals = evals.slice(0, -1)
item.evalQues = evals
// if (item.evalList.length >= 1 && item.evalList[0].evalQues) {
// item.isProblem = 1;
// }
const isProblem = item.evalList.filter((v) => v.evalQues).length
item.isProblem = isProblem > 0 ? 1 : 0
})
this.questionList.forEach((item) => {
if (!item.evalQues && item.isProblem != 0) {
console.log(item.evalQues, item.isProblem, "2222");
this.$message({
message: "请完成录入全部问题或选择未发现问题",
type: "warning",
});
throw new Error();
}
});
console.log(this.questionList, "questionList");
// this.questionList.forEach((item) => {
// if (!item.evalQues && item.isProblem != 0) {
// console.log(item.evalQues, item.isProblem, "2222");
// this.$message({
// message: "请完成录入全部问题或选择未发现问题",
// type: "warning",
// });
// throw new Error();
// }
// });
console.log(this.questionList, 'questionList')
let params = {
list: this.questionList,
...this.clqparams,
};
console.log(params, "保存");
}
console.log(params, '保存')
// return
let res = await bcevalQuesInfo(params);
if (res.code == "200") {
this.$message("保存成功");
let res = await bcevalQuesInfo(params)
if (res.code == '200') {
this.$message('保存成功')
if (type && type == 2) {
this.$router.push({
path: "/assesszc/Compliancefz",
path: '/assesszc/Compliancefz',
query: {
clqparams: JSON.stringify(this.clqparams),
projectName: this.projectName,
},
});
})
} else {
this.active = id * 1;
this.init(this.clqparams);
this.active = id * 1
this.init(this.clqparams)
}
} else {
this.$message("保存失败");
this.$message('保存失败')
}
},
fileupdate(res, items) {
console.log(this.file.size / 1024, "222222");
this.file = res.file;
this.submitFile(res, items);
console.log(this.file.size / 1024, '222222')
this.file = res.file
this.submitFile(res, items)
},
submitFile(item, list) {
console.log(list, "list");
console.log(this.file, "多少k");
console.log(list, 'list')
console.log(this.file, '多少k')
if (this.file) {
const formData = new FormData();
formData.append("file", this.file);
const formData = new FormData()
formData.append('file', this.file)
ossupload(formData)
.then((response) => {
console.log(response, "上传图片");
if (response.code == "200") {
console.log(response, '上传图片')
if (response.code == '200') {
// list.url = response.data.downLoadUrl;
// list.fileId= response.data.fileId
this.$set(list, "url", response.data.downLoadUrl);
this.$set(list, "fileId", response.data.fileId);
this.$message("上传成功");
this.$set(list, 'url', response.data.downLoadUrl)
this.$set(list, 'fileId', response.data.fileId)
this.$message('上传成功')
} else {
this.$message("上传失败");
this.$message('上传失败')
}
})
.catch((error) => {
console.error(error);
this.$message("上传失败");
});
console.error(error)
this.$message('上传失败')
})
}
},
},
};
}
</script>
<style lang="scss" scoped>
......@@ -952,7 +897,8 @@ export default {
}
.addBtn {
display: flex;
justify-content: space-between;
justify-content: flex-end;
// justify-content: space-between;
}
.Btn {
// width: calc(100% - 276px) !important;
......
<!-- 辅助核验 -->
<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
......@@ -18,22 +13,10 @@
</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-form-item label="后评估批次状态:" prop="postEvalState" class="fromItem">
<el-select v-model="ruleForm.postEvalState" placeholder="请选择" clearable>
<el-option label="执行中" value="3"></el-option>
<el-option label="已发起" value="1"></el-option>
<el-option label="已撤回" value="4"></el-option>
......@@ -62,12 +45,8 @@
<el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
<el-button @click="configs()"
><i class="el-icon-position"></i> 确认项目评估
</el-button>
<el-button @click="withdraw()">
<i class="el-icon-folder-delete"></i>撤回
</el-button>
<el-button @click="configs()"><i class="el-icon-position"></i> 确认项目评估 </el-button>
<el-button @click="withdraw()"> <i class="el-icon-folder-delete"></i>撤回 </el-button>
</el-form-item>
</el-form>
<div class="setscrollOne">
......@@ -82,31 +61,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" width="120">
<template slot-scope="scope"> {{ scope.row.batchYear }}</template>
</el-table-column>
<el-table-column prop="batchName" label="后评估批次名称">
</el-table-column>
<el-table-column prop="batchName" label="后评估批次名称"> </el-table-column>
<el-table-column prop="expertName" label="评审专家" width="auto">
</el-table-column>
<el-table-column prop="expertName" label="评审专家" width="auto"> </el-table-column>
<el-table-column
prop="projectName"
label="待评估项目"
width="auto"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop="planReviewDate"
label="计划评估日期"
width="auto"
>
<el-table-column prop="projectName" label="待评估项目" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="planReviewDate" label="计划评估日期" width="auto"> </el-table-column>
<!-- <el-table-column
prop="postEvalStateText"
label="后评估批次状态"
......@@ -124,17 +90,13 @@
query: { batchName: scope.row.batchName },
}"
>
<el-button type="text" size="small">{{
scope.row.postEvalStateText
}}</el-button>
<el-button type="text" size="small">{{ scope.row.postEvalStateText }}</el-button>
</router-link>
</template>
</el-table-column>
<el-table-column prop="creator" label="发起人" width="120">
</el-table-column>
<el-table-column prop="createTime" label="发起时间" width="auto">
</el-table-column>
<el-table-column prop="creator" label="发起人" width="120"> </el-table-column>
<el-table-column prop="createTime" label="发起时间" width="auto"> </el-table-column>
<!-- <el-table-column prop="batchName" label="评估项目" width="auto">
</el-table-column> -->
<!-- <el-table-column prop="prjsOfExpert" label="已选择数量" width="auto">
......@@ -171,29 +133,14 @@
<el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchYear" disabled></el-input>
</el-form-item>
<el-form-item
label="后评估批次名称:"
prop="batchName"
class="fromItem"
>
<el-form-item label="后评估批次名称:" prop="batchName" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchName" disabled></el-input>
</el-form-item>
<el-form-item
label="计划评估日期:"
prop="planReviewDate"
class="fromItem"
>
<el-input
v-model="ruleFormdialogBJ.planReviewDate"
disabled
></el-input>
<el-form-item label="计划评估日期:" prop="planReviewDate" class="fromItem">
<el-input v-model="ruleFormdialogBJ.planReviewDate" disabled></el-input>
</el-form-item>
<el-form-item label="工作组织情况:" class="textarea">
<el-input
type="textarea"
v-model="ruleFormdialogBJ.description"
disabled
></el-input>
<el-input type="textarea" v-model="ruleFormdialogBJ.description" disabled></el-input>
</el-form-item>
</el-form>
......@@ -210,64 +157,29 @@
border
>
<el-table-column type="selection"> </el-table-column>
<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 prop="department" label="部门" width="150">
</el-table-column> -->
<el-table-column label="项目编码" width="150" prop="projectCode">
</el-table-column>
<el-table-column label="项目编码" width="150" prop="projectCode"> </el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
width="auto"
show-overflow-tooltip
>
<el-table-column prop="projectName" label="项目名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="100"
>
<el-table-column prop="constructionForm" label="建设形式" width="100">
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="140">
<template slot-scope="scope">
{{ scope.row.issueYear }}
</template>
<template slot-scope="scope"> {{ scope.row.issueYear }}</template>
</el-table-column>
<el-table-column prop="startupStatus" label="启动日期" width="90">
</el-table-column>
<el-table-column
prop="accountingStatus"
label="入账状态"
width="90"
>
<el-table-column prop="startupStatus" label="启动日期" width="90"> </el-table-column>
<el-table-column prop="accountingStatus" label="入账状态" width="90"> </el-table-column>
<el-table-column prop="accountingProportion" label="累计入账占比" width="90">
<template slot-scope="scope"> {{ scope.row.accountingProportion }}% </template>
</el-table-column>
<el-table-column
prop="accountingProportion"
label="累计入账占比"
width="90"
>
<template slot-scope="scope">
{{ scope.row.accountingProportion }}%
</template>
</el-table-column>
<el-table-column
prop="entryAmount"
label="入账金额(万)"
width="120"
>
</el-table-column>
<el-table-column
prop="currentProgress"
label="当前进度"
width="120"
>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220">
<el-table-column prop="entryAmount" label="入账金额(万)" width="120">
</el-table-column>
<el-table-column prop="currentProgress" label="当前进度" width="120"> </el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220"> </el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
......@@ -275,8 +187,7 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110">
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110"> </el-table-column>
</el-table>
</div>
<el-pagination
......@@ -310,44 +221,24 @@
<el-form-item label="批次年度:" prop="batchYear" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchYear" disabled></el-input>
</el-form-item>
<el-form-item
label="后评估批次名称:"
prop="batchName"
class="fromItem"
>
<el-form-item label="后评估批次名称:" prop="batchName" class="fromItem">
<el-input v-model="ruleFormdialogBJ.batchName" disabled></el-input>
</el-form-item>
<el-form-item
label="计划评估日期:"
prop="planReviewDate"
class="fromItem"
>
<el-input
v-model="ruleFormdialogBJ.planReviewDate"
disabled
></el-input>
<el-form-item label="计划评估日期:" prop="planReviewDate" class="fromItem">
<el-input v-model="ruleFormdialogBJ.planReviewDate" disabled></el-input>
</el-form-item>
<el-form-item label="工作组织情况:" class="textarea">
<el-input
type="textarea"
v-model="ruleFormdialogBJ.description"
disabled
></el-input>
<el-input type="textarea" v-model="ruleFormdialogBJ.description" disabled></el-input>
</el-form-item>
</el-form>
<p class="zjBtn">
待评估项目 <span @click="xzExperts()">手动选择待评估项目</span>
</p>
<p class="zjBtn">待评估项目 <span @click="xzExperts()">手动选择待评估项目</span></p>
<div class="setscrolldialogxz">
<el-table
@selection-change="handleSelectionChange"
:data="
addtableData.slice(
(addcurrentPage - 1) * pageSizeAdd,
addcurrentPage * pageSizeAdd
)
addtableData.slice((addcurrentPage - 1) * pageSizeAdd, addcurrentPage * pageSizeAdd)
"
tooltip-effect="dark myTooltips"
style="width: 100%"
......@@ -357,62 +248,27 @@
border
>
<el-table-column type="selection"> </el-table-column>
<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 label="项目编码" width="150" prop="projectCode">
</el-table-column>
<el-table-column label="项目编码" width="150" prop="projectCode"> </el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
width="auto"
show-overflow-tooltip
>
<el-table-column prop="projectName" label="项目名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="100"
>
<el-table-column prop="constructionForm" label="建设形式" width="100">
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="140">
<template slot-scope="scope">
{{ scope.row.issueYear }}
</template>
<template slot-scope="scope"> {{ scope.row.issueYear }}</template>
</el-table-column>
<el-table-column prop="startupStatus" label="启动日期" width="90">
</el-table-column>
<el-table-column
prop="accountingStatus"
label="入账状态"
width="90"
>
</el-table-column>
<el-table-column
prop="accountingProportion"
label="累计入账占比"
width="90"
>
<template slot-scope="scope">
{{ scope.row.accountingProportion }}%
</template>
</el-table-column>
<el-table-column
prop="entryAmount"
label="入账金额(万)"
width="120"
>
</el-table-column>
<el-table-column
prop="currentProgress"
label="当前进度"
width="120"
>
<el-table-column prop="startupStatus" label="启动日期" width="90"> </el-table-column>
<el-table-column prop="accountingStatus" label="入账状态" width="90"> </el-table-column>
<el-table-column prop="accountingProportion" label="累计入账占比" width="90">
<template slot-scope="scope"> {{ scope.row.accountingProportion }}% </template>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220">
<el-table-column prop="entryAmount" label="入账金额(万)" width="120">
</el-table-column>
<el-table-column prop="currentProgress" label="当前进度" width="120"> </el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220"> </el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
......@@ -420,8 +276,7 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110">
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110"> </el-table-column>
<el-table-column label="操作" width="130">
<template slot-scope="scope">
......@@ -464,25 +319,13 @@
<div class="adzjdialog">
<el-form :model="ruleFormZJ" label-width="100px" class="demo-ruleForm">
<el-form-item label="项目编码:" prop="projectCode" class="fromItem">
<el-input
v-model="ruleFormZJ.projectCode"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="ruleFormZJ.projectCode" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="项目名称:" prop="projectName" class="fromItem">
<el-input
v-model="ruleFormZJ.projectName"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="ruleFormZJ.projectName" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="项目年度:" prop="issueYear" class="fromItem">
<el-select
v-model="ruleFormZJ.issueYear"
placeholder="请选择"
clearable
>
<el-select v-model="ruleFormZJ.issueYear" placeholder="请选择" clearable>
<el-option
v-for="(item, index) in yearsList"
:key="index"
......@@ -491,38 +334,18 @@
/>
</el-select>
</el-form-item>
<el-form-item
label="建设形式:"
prop="constructionForm"
class="fromItem"
>
<el-select
v-model="ruleFormZJ.constructionForm"
placeholder="请选择"
clearable
>
<el-form-item label="建设形式:" prop="constructionForm" class="fromItem">
<el-select v-model="ruleFormZJ.constructionForm" placeholder="请选择" clearable>
<el-option label="独立建设" value="1"></el-option>
<el-option label="统推" value="2"></el-option>
<el-option label="自建" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item
label="合同编码:"
prop="contractNumber"
class="fromItem"
>
<el-input
v-model="ruleFormZJ.contractNumber"
placeholder="请输入"
clearable
></el-input>
<el-form-item label="合同编码:" prop="contractNumber" class="fromItem">
<el-input v-model="ruleFormZJ.contractNumber" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item label="合同名称:" prop="contractName" class="fromItem">
<el-input
v-model="ruleFormZJ.contractName"
placeholder="请输入"
clearable
></el-input>
<el-input v-model="ruleFormZJ.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item class="cxItem">
<span class="zjquery" @click="xzExperts()"> 查询 </span>
......@@ -543,64 +366,29 @@
border
>
<el-table-column type="selection" :selectable="selectable"> </el-table-column>
<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 prop="department" label="部门" width="150">
</el-table-column> -->
<el-table-column label="项目编码" width="150" prop="projectCode">
</el-table-column>
<el-table-column label="项目编码" width="150" prop="projectCode"> </el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
width="auto"
show-overflow-tooltip
>
<el-table-column prop="projectName" label="项目名称" width="auto" show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="constructionForm"
label="建设形式"
width="100"
>
<el-table-column prop="constructionForm" label="建设形式" width="100">
</el-table-column>
<el-table-column prop="issueYear" label="项目年度" width="140">
<template slot-scope="scope">
{{ scope.row.issueYear }}
</template>
<template slot-scope="scope"> {{ scope.row.issueYear }}</template>
</el-table-column>
<el-table-column prop="startupStatus" label="启动日期" width="90">
</el-table-column>
<el-table-column
prop="accountingStatus"
label="入账状态"
width="90"
>
</el-table-column>
<el-table-column
prop="accountingProportion"
label="累计入账占比"
width="90"
>
<template slot-scope="scope">
{{ scope.row.accountingProportion }}%
</template>
</el-table-column>
<el-table-column
prop="entryAmount"
label="入账金额(万)"
width="120"
>
</el-table-column>
<el-table-column
prop="currentProgress"
label="当前进度"
width="120"
>
<el-table-column prop="startupStatus" label="启动日期" width="90"> </el-table-column>
<el-table-column prop="accountingStatus" label="入账状态" width="90"> </el-table-column>
<el-table-column prop="accountingProportion" label="累计入账占比" width="90">
<template slot-scope="scope"> {{ scope.row.accountingProportion }}% </template>
</el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220">
<el-table-column prop="entryAmount" label="入账金额(万)" width="120">
</el-table-column>
<el-table-column prop="currentProgress" label="当前进度" width="120"> </el-table-column>
<el-table-column prop="contractNumber" label="合同编号" width="220"> </el-table-column>
<el-table-column
prop="contractName"
label="合同名称"
......@@ -609,12 +397,9 @@
>
</el-table-column>
<el-table-column prop="zcstate" label="审核状态" width="110">
<template slot-scope="scope">
{{ scope.row.zcstate | zcstatefilter }}</template
>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110">
<template slot-scope="scope"> {{ scope.row.zcstate | zcstatefilter }}</template>
</el-table-column>
<el-table-column prop="projectLeader" label="负责人" width="110"> </el-table-column>
</el-table>
</div>
......@@ -631,15 +416,14 @@
</el-pagination>
<p class="midBtn">
<span @click="cancelZJ()">取消</span
><span @click="saveZJ()">选择</span>
<span @click="cancelZJ()">取消</span><span @click="saveZJ()">选择</span>
</p>
</div>
</el-dialog>
</div>
</template>
<script>
<script>
import {
projectInfo,
fbProjectInfo,
......@@ -648,43 +432,43 @@ import {
pmProInitiation,
chProjectInfo,
bcProjectInfo,
} from "@/api/indexzc";
import { generateYearOptions, constructionFormText } from "@/utils/cache";
} from '@/api/indexzc'
import { generateYearOptions, constructionFormText } from '@/utils/cache'
export default {
data() {
return {
yearsList: generateYearOptions(),
oldid: "",
oldid: '',
ruleForm: {
batchYear: "",
batchName: "",
postEvalState: "",
batchYear: '',
batchName: '',
postEvalState: '',
dates: [],
},
ruleFormdialog: {
batchYear: "",
batchName: "",
planReviewDate: "",
fullName: "",
batchYear: '',
batchName: '',
planReviewDate: '',
fullName: '',
},
ruleFormZJ: {
fields: "",
expertState: "",
fullName: "",
fields: '',
expertState: '',
fullName: '',
},
ruleFormdialogAdd: {
batchYear: "",
batchName: "",
planReviewDate: "",
description: "",
remark: "",
batchYear: '',
batchName: '',
planReviewDate: '',
description: '',
remark: '',
},
ruleFormdialogBJ: {
batchYear: "",
batchName: "",
planReviewDate: "",
prjsOfExpert: "",
description: "",
batchYear: '',
batchName: '',
planReviewDate: '',
prjsOfExpert: '',
description: '',
},
tableData: [],
tableDataQD: [], //清单列表
......@@ -708,43 +492,43 @@ export default {
pageSizeAdd: 10,
currentedit: 1,
pageSizeedit: 10,
xfParam: "",
xfParam: '',
dialogedit: false,
expertIdList: [],
totalBJ: 0,
addZJList: [],
expertState: "",
fields: "",
zjfullName: "",
expertState: '',
fields: '',
zjfullName: '',
zjtotal: 0,
zjtableData: [],
addcurrentPage: 1,
addtableData: [],
message: {},
};
}
},
filters: {
zcstatefilter(val) {
if (val == 1) {
return "待评估";
return '待评估'
} else if (val == 2) {
return "需整改";
return '需整改'
} else if (val == 3) {
return "已整改";
return '已整改'
} else if (val == 4) {
return "已归档";
return '已归档'
} else {
return " ";
return ' '
}
},
},
watch: {
// 监听路由对象中的参数部分
"$route.params": {
'$route.params': {
immediate: true,
handler(newParams, oldParams) {
//现在配合demo路由变化掉了两次接口等线上去掉这块时候mounted要调用
this.submitForm();
this.submitForm()
},
},
},
......@@ -753,14 +537,14 @@ export default {
},
methods: {
timeChange(time) {
console.log("tttttt", time);
console.log('tttttt', time)
if (time) {
//给后端的参数
this.ruleForm.createStartTime = time[0];
this.ruleForm.createEndTime = time[1];
this.ruleForm.createStartTime = time[0]
this.ruleForm.createEndTime = time[1]
} else {
this.ruleForm.createStartTime = "";
this.ruleForm.createEndTime = "";
this.ruleForm.createStartTime = ''
this.ruleForm.createEndTime = ''
}
},
async submitForm() {
......@@ -768,101 +552,93 @@ export default {
current: this.currentPage,
pageSize: this.pageSize,
module: 1,
};
Object.assign(params, this.ruleForm);
console.log(params);
let res = await projectInfo(params);
if (res.code == "200") {
this.tableData = res.data.records;
}
Object.assign(params, this.ruleForm)
console.log(params)
let res = await projectInfo(params)
if (res.code == '200') {
this.tableData = res.data.records
this.tableData.forEach((item) => {
if (item.postEvalState == "3") {
this.$set(item, "postEvalStateText", "执行中");
} else if (item.postEvalState == "4") {
this.$set(item, "postEvalStateText", "已撤回");
} else if (item.postEvalState == "5") {
this.$set(item, "postEvalStateText", "已完成");
if (item.postEvalState == '3') {
this.$set(item, 'postEvalStateText', '执行中')
} else if (item.postEvalState == '4') {
this.$set(item, 'postEvalStateText', '已撤回')
} else if (item.postEvalState == '5') {
this.$set(item, 'postEvalStateText', '已完成')
} else {
this.$set(item, "postEvalStateText", "已发起");
this.$set(item, 'postEvalStateText', '已发起')
}
});
this.total = res.data.total * 1;
})
this.total = res.data.total * 1
}
},
resetForm() {
this.$refs.formName.resetFields();
this.currentPage = 1;
this.pageSize = 10;
this.ruleForm.createStartTime = "";
this.ruleForm.createEndTime = "";
this.ruleForm.dates = [];
this.submitForm();
this.$refs.formName.resetFields()
this.currentPage = 1
this.pageSize = 10
this.ruleForm.createStartTime = ''
this.ruleForm.createEndTime = ''
this.ruleForm.dates = []
this.submitForm()
},
//详情
async detailsForm() {
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
this.$message('请选择')
return
}
this.ruleFormdialogBJ = this.checkedList[0];
this.ruleFormdialogBJ = this.checkedList[0]
let params = {
current: this.currentPageXQ,
pageSize: this.pageSizeXQ,
batchId: this.checkedList[0].batchId,
};
Object.assign(params, this.ruleFormdialogAdd);
this.addtableData = [];
let res = await joinProjectInfo(params);
if (res.code == "200") {
this.addtableData = res.data.records;
}
Object.assign(params, this.ruleFormdialogAdd)
this.addtableData = []
let res = await joinProjectInfo(params)
if (res.code == '200') {
this.addtableData = res.data.records
this.addtableData.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.addtotal = res.data.total * 1;
console.log(this.addtableData, "this.addtableData");
this.dialogXQ = true;
this.$set(item, 'constructionForm', constructionFormText(item.constructionForm))
})
this.addtotal = res.data.total * 1
console.log(this.addtableData, 'this.addtableData')
this.dialogXQ = true
}
},
//确认评估项目
async configs() {
// 只能选中状态待评估的
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
this.$message('请选择')
return
}
if (this.checkedList[0].postEvalStateText == "执行中") {
this.$message("该项目已在执行中");
return;
if (this.checkedList[0].postEvalStateText == '执行中') {
this.$message('该项目已在执行中')
return
}
this.ruleFormdialogBJ = this.checkedList[0];
this.dialogAdd = true;
this.addtableData = [];
this.ruleFormdialogBJ = this.checkedList[0]
this.dialogAdd = true
this.addtableData = []
let params = {
current: this.addcurrentPage,
pageSize: this.pageSizeAdd,
batchId: this.checkedList[0].batchId,
};
Object.assign(params, this.ruleFormdialogAdd);
let res = await joinProjectInfo(params);
if (res.code == "200") {
this.addtableData = res.data.records;
}
Object.assign(params, this.ruleFormdialogAdd)
let res = await joinProjectInfo(params)
if (res.code == '200') {
this.addtableData = res.data.records
this.addtableData.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.addtotal = res.data.total * 1;
this.oldid = "";
this.$set(item, 'constructionForm', constructionFormText(item.constructionForm))
})
this.addtotal = res.data.total * 1
this.oldid = ''
if (this.addtableData.length > 0) {
this.addtableData.forEach((item) => {
this.oldid = this.oldid.concat(item.projectCode + ",");
});
this.oldid = this.oldid.concat(item.projectCode + ',')
})
}
}
},
......@@ -870,170 +646,165 @@ export default {
//表格颜色
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
}
return "";
return ''
},
//主列表选中行信息
handleSelectionChange(selection) {
if (Array.isArray(selection) && selection.length > 1) {
this.$refs.multipleTable.toggleRowSelection(selection[0], false);
this.$refs.multipleTable.toggleRowSelection(selection[1], true);
this.$refs.multipleTable.toggleRowSelection(selection[0], false)
this.$refs.multipleTable.toggleRowSelection(selection[1], true)
}
this.checkedList = this.$refs.multipleTable.selection;
this.ruleFormdialog = this.checkedList[0];
console.log(this.checkedList, "2222");
this.checkedList = this.$refs.multipleTable.selection
this.ruleFormdialog = this.checkedList[0]
console.log(this.checkedList, '2222')
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize = val;
this.submitForm();
console.log(`每页 ${val} 条`)
this.pageSize = val
this.submitForm()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.submitForm();
console.log(`当前页: ${val}`)
this.currentPage = val
this.submitForm()
},
handleSizeChangeZJ(val) {
console.log(`每页 ${val} 条`);
this.pageSizeZJ = val;
this.xzExperts();
console.log(`每页 ${val} 条`)
this.pageSizeZJ = val
this.xzExperts()
},
handleCurrentChangeZJ(val) {
console.log(`当前页: ${val}`);
this.currentZJ = val;
this.xzExperts();
console.log(`当前页: ${val}`)
this.currentZJ = val
this.xzExperts()
},
handleSizeChangeAdd(val) {
this.pageSizeAdd = val;
this.pageSizeAdd = val
// this.detailsForm();
console.log(val, this.addcurrentPage, "1111");
console.log(val, this.addcurrentPage, '1111')
},
handleCurrentChangeAdd(val) {
console.log(val, this.addcurrentPage, "0000");
this.addcurrentPage = val;
console.log(val, this.addcurrentPage, '0000')
this.addcurrentPage = val
// this.detailsForm();
},
handleSizeChangXQ(val) {
this.pageSizeXQ = val;
this.detailsForm();
console.log(val, this.addcurrentPage, "1111");
this.pageSizeXQ = val
this.detailsForm()
console.log(val, this.addcurrentPage, '1111')
},
handleCurrentChangeXQ(val) {
console.log(val, this.addcurrentPage, "0000");
this.currentPageXQ = val;
this.detailsForm();
console.log(val, this.addcurrentPage, '0000')
this.currentPageXQ = val
this.detailsForm()
},
//选择项目
saveZJ() {
if (this.addZJList.length < 1) {
this.$message("请选择项目");
return;
this.$message('请选择项目')
return
}
console.log(this.addtableData, this.addZJList, "55555");
this.addtableData = [...this.addtableData, ...this.addZJList];
console.log(this.addtableData, this.addZJList, '55555')
this.addtableData = [...this.addtableData, ...this.addZJList]
this.addtableData = this.addtableData.filter((obj, index, self) => {
return index == self.findIndex((t) => t.projectCode == obj.projectCode);
});
this.addtotal = this.addtableData.length;
this.dialogAddzj = false;
return index == self.findIndex((t) => t.projectCode == obj.projectCode)
})
this.addtotal = this.addtableData.length
this.dialogAddzj = false
},
cancelZJ() {
this.dialogAddzj = false;
this.dialogAddzj = false
},
async xzExperts() {
this.dialogAddzj = true;
this.dialogAddzj = true
let params = {
current: this.currentZJ,
pageSize: this.pageSizeZJ,
prjStr: this.oldid,
};
Object.assign(params, this.ruleFormZJ);
let res = await pmProInitiation(params);
console.log(res.data.records, "res.data.recordsres.data.records");
this.zjtableData = res.data.records;
}
Object.assign(params, this.ruleFormZJ)
let res = await pmProInitiation(params)
console.log(res.data.records, 'res.data.recordsres.data.records')
this.zjtableData = res.data.records
this.zjtableData.forEach((item) => {
this.$set(
item,
"constructionForm",
constructionFormText(item.constructionForm)
);
});
this.zjtotal = res.data.total * 1;
console.log(res, "xxx");
this.$set(item, 'constructionForm', constructionFormText(item.constructionForm))
})
this.zjtotal = res.data.total * 1
console.log(res, 'xxx')
},
saveXZ() {
if (this.addtableData.length < 1) {
this.$message("请选择待评估项目");
this.$message('请选择待评估项目')
}
console.log(this.addZJList, "this.addZJList");
console.log(this.addZJList, 'this.addZJList')
// 确认发布入参
let expertIdList = "";
let expertIdList = ''
if (this.addtableData.length > 0) {
this.addtableData.forEach((item) => {
expertIdList = expertIdList.concat(item.projectCode + ",");
});
expertIdList = expertIdList.concat(item.projectCode + ',')
})
}
let params = {
expertStr: expertIdList,
};
params.batchId = this.ruleFormdialogBJ.batchId;
}
params.batchId = this.ruleFormdialogBJ.batchId
// params.prjsOfExpert = this.ruleFormdialogBJ.prjsOfExpert;
console.log(params, "222");
console.log(params, '222')
// return
fbProjectInfo(params).then((res) => {
this.dialogAdd = false;
this.expertIdList = expertIdList;
this.$message("提交成功");
this.resetForm();
});
this.dialogAdd = false
this.expertIdList = expertIdList
this.$message('提交成功')
this.resetForm()
})
},
savepro() {
// if (this.addtableData.length < 1) {
// this.$message("没有可保存的项目");
// }
console.log(this.addZJList, "this.addZJList");
console.log(this.addZJList, 'this.addZJList')
// 确认发布入参
let expertIdList = "";
let expertIdList = ''
if (this.addtableData.length > 0) {
this.addtableData.forEach((item) => {
expertIdList = expertIdList.concat(item.projectCode + ",");
});
expertIdList = expertIdList.concat(item.projectCode + ',')
})
}
let params = {
expertStr: expertIdList,
};
params.batchId = this.ruleFormdialogBJ.batchId;
}
params.batchId = this.ruleFormdialogBJ.batchId
// params.prjsOfExpert = this.ruleFormdialogBJ.prjsOfExpert;
console.log(params, "222");
console.log(params, '222')
// return
bcProjectInfo(params).then((res) => {
this.$message("保存成功");
this.$message('保存成功')
// this.dialogAdd = false;
this.expertIdList = expertIdList;
this.expertIdList = expertIdList
// this.resetForm();
});
})
},
cancelXZ() {
this.dialogAdd = false;
this.dialogAdd = false
},
selectable(item,index){
if(item.zcstate == 1 || item.zcstate == 2 || item.zcstate == 3){
selectable(item, index) {
if (item.zcstate == 1 || item.zcstate == 2 || item.zcstate == 3) {
return false
}else{
} else {
return true
}
},
selectAll(selection) {
this.addZJList = this.$refs.multipleTableZJ.selection;
console.log(this.$refs.multipleTableZJ.selection, "2222222");
this.addZJList = this.$refs.multipleTableZJ.selection
console.log(this.$refs.multipleTableZJ.selection, '2222222')
// selection = selection.filter(item=>{
// return item.zcstate!=1&&item.zcstate!=2&&item.zcstate!=3
// });
......@@ -1055,60 +826,57 @@ export default {
//选中的项目
handleSelectionChangeZJ(selection, row) {
console.log("来了么", row);
console.log('来了么', row)
if (selection.length < 1) {
return;
return
}
if (selection.length === this.zjtableData.Length) {
console.log("全选");
console.log('全选')
}
let info = row.zcstate;
let info = row.zcstate
if (info == 1 || info == 2 || info == 3) {
this.$refs.multipleTableZJ.toggleRowSelection(
selection[selection.length - 1],
false
);
this.$message("该项目在流程中,请选择其他项目");
console.log("不让点");
return;
}
this.addZJList = this.$refs.multipleTableZJ.selection;
console.log(this.$refs.multipleTableZJ.selection, "2222222");
this.$refs.multipleTableZJ.toggleRowSelection(selection[selection.length - 1], false)
this.$message('该项目在流程中,请选择其他项目')
console.log('不让点')
return
}
this.addZJList = this.$refs.multipleTableZJ.selection
console.log(this.$refs.multipleTableZJ.selection, '2222222')
},
//点击删除
async handleClick(row, index, rows) {
let params = {
projectId: row.projectCode,
batchId: this.checkedList[0].batchId,
};
this.$confirm("此操作将删除该项目, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
this.$confirm('此操作将删除该项目, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
let res = await delProjectInfo(params);
let res = await delProjectInfo(params)
if (res.code == 200) {
this.$message({
type: "success",
message: "删除成功!",
});
this.addtotal--;
type: 'success',
message: '删除成功!',
})
this.addtotal--
rows.splice(index, 1)
} else {
this.$message({
type: "info",
message: "删除失败!",
});
type: 'info',
message: '删除失败!',
})
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
rows.splice(index, 1);
type: 'info',
message: '已取消删除',
})
})
// let res = await delProjectInfo(params);
// if(res.code=200){
......@@ -1120,38 +888,38 @@ export default {
//点击撤回
async withdraw() {
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
this.$message('请选择')
return
}
if (this.checkedList[0].postEvalStateText == "已撤回") {
this.$message("该项目已撤回");
return;
if (this.checkedList[0].postEvalStateText == '已撤回') {
this.$message('该项目已撤回')
return
}
if (this.checkedList[0].postEvalStateText == "已发起") {
this.$message("该项目还未确认评估");
return;
if (this.checkedList[0].postEvalStateText == '已发起') {
this.$message('该项目还未确认评估')
return
}
this.$confirm("是否撤回?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
this.$confirm('是否撤回?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
distinguishCancelAndClose: true,
type: "warning",
type: 'warning',
})
.then(async () => {
let res = await chProjectInfo({
batchId: this.checkedList[0].batchId,
});
if ((res.code = "200")) {
this.$message("已撤回");
this.resetForm();
})
if ((res.code = '200')) {
this.$message('已撤回')
this.resetForm()
}
})
.catch((action) => {});
.catch((action) => {})
},
},
};
}
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.main {
font-size: 14px;
position: relative;
......@@ -1478,7 +1246,7 @@ export default {
overflow-x: hidden !important;
}
}
.tipred{
.tipred {
color: red;
text-align: left;
font-size: 13px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!