Commit 41b1cef9 by liangzhen

提交修改

1 parent 6940c0c3
Showing with 249 additions and 186 deletions
<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>
<div class="close">
<i class="el-icon-circle-close" @click="cancel()"></i>
</div>
<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 +19,13 @@
</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,55 +33,101 @@
: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)">
<el-option
v-for="(item,index) in options"
:key="item.name"
:label="item.name"
:value="index">
</el-option>
</el-select>
<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"
:key="item.name"
:label="item.name"
:value="index"
>
</el-option>
</el-select>
</div>
<iframe
v-if="blobType=='pdf'||blobType=='doc'&&options.length>0"
:key="iframeUrl"
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
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
class="docDiv"
v-else-if="blobType == 'docx' && options.length > 0"
>
<div :ref="`word`" :id="`word${item.typeCode}`"></div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="right">
<p class="tableTitle">检查项</p>
<div :class="dialogFullScreen?'rightscollBig':'rightscoll'">
<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>
<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
<!-- <p>{{ item.znfxList[0].projectStage }}</p> -->
<img
class="resimg"
:src="resimg"
alt=""
v-if="item.znfxList[0].projectStage == '14'&&resimg"
/>
<div v-else>
<div
v-for="(itemzn, index) in item.znfxList"
:key="index"
class="inputDiv"
v-html="itemzn.checkDesc"
></div>
</div>
<span class="el-upload-list__item-actions" v-if="item.znfxList[0].projectStage == '14'&&resimg">
<!-- 图片放大 -->
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(resimg)"
>
<i class="el-icon-zoom-in"></i>
</span>
</span>
</div>
<div
class="quesznfx"
......@@ -92,7 +148,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>
......@@ -156,7 +212,7 @@
<!-- 图片放大 -->
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)"
@click="handlePictureCardPreview(file.url)"
>
<i class="el-icon-zoom-in"></i>
</span>
......@@ -196,25 +252,22 @@
</div>
</div>
<p class="Btn">
<span @click="cancel()">取消</span><span @click="save()">保存</span> <span @click="submitNexts()">提交</span>
</p>
<span @click="cancel()">取消</span><span @click="save()">保存</span>
<span @click="submitNexts()">提交</span>
</p>
</div>
</div>
<el-dialog
:visible.sync="dialogzhanshi"
title="匹配展示"
: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 v-html="wtmx" class="dialogscroll"></div>
</el-dialog>
</div>
</template>
<script>
......@@ -228,15 +281,16 @@ import {
bcevalQuesInfo,
ossupload,
presignedUrl,
selFileList
selFileList,
} from "@/api/indexzc";
import { MaterialsListKY } from "@/utils/cache";
export default {
data() {
return {
resimg: "",
dialogFullScreen: false,
valuesel:'',
options:[],
valuesel: "",
options: [],
dialogImageUrl: "",
fileList: [],
evalList: [
......@@ -253,7 +307,7 @@ export default {
{ label: "执行", id: 4 },
{ label: "结决算及转资", id: 5 },
],
tabListKY:[],
tabListKY: [],
active: 0,
activeName: "0",
clqparams: {},
......@@ -267,18 +321,18 @@ export default {
limitNum: 1,
disabled: false,
oldQuestionList: [], //对比列表
blobType:'pdf',//bolb类型
projectName:"",
valuesel:"",
dialogzhanshi:false,
wtmx:'',
blobType: "pdf", //bolb类型
projectName: "",
valuesel: "",
dialogzhanshi: false,
wtmx: "",
docxOptions: {
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:启用实验功能(制表符停止计算)
......@@ -287,21 +341,20 @@ 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.projectName = this.$route.query.projectName;
this.init(this.clqparams);
},
methods: {
zhanshi(){
this.dialogzhanshi=true
zhanshi() {
this.dialogzhanshi = true;
},
//提交问题清单
async submitNexts() {
//提交问题清单
async submitNexts() {
this.$confirm("您确定检查完所有流程并去提交?", "提示", {
confirmButtonText: "是",
cancelButtonText: "继续检查",
......@@ -310,24 +363,13 @@ docxOptions: {
})
.then(() => {
this.save(2);
})
.catch((action) => {
});
.catch((action) => {});
},
// 放大图片
handlePictureCardPreview(file) {
console.log("点击放大");
this.dialogImageUrl = file.url;
this.dialogImageUrl = file;
this.dialogVisible = true;
},
// 删除图片
......@@ -385,43 +427,48 @@ docxOptions: {
handleExceed() {
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.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";
}
}else{
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";
}
} else {
// this.iframeUrl = "/nopdf.png";
}
if (res[1].data) {
this.questionList = res[1].data.records;
this.wtmx= res[1].data.MapkyXqfx
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);
}
......@@ -432,7 +479,7 @@ docxOptions: {
projectStage: item.questionId,
};
let responfx = await selZnfx(paramsFX);
counterNum++
counterNum++;
if (respon.data.records && respon.data.records.length > 0) {
respon.data.records.forEach(async (itemImg) => {
if (itemImg.url) {
......@@ -462,77 +509,96 @@ docxOptions: {
}
if (responfx.data.records && responfx.data.records.length > 0) {
let znfxList = responfx.data.records.filter((item) => {
if (item.checkDesc&&item.type==0) {
let znfxList = responfx.data.records.filter(async (item) => {
if (item.projectStage == "14") {
let paramsImg = {
url: item.checkDesc,
};
let resUrl = await presignedUrl(paramsImg);
this.resimg = resUrl.msg;
}
if (item.checkDesc && item.type == 0) {
item.checkDesc = item.checkDesc.replace(/\n/g, "<br>");
}
return item.checkDesc&&item.type==0;
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");
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", []);
}
if(counterNum==this.questionList.length){
setTimeout(() => {
this.oldQuestionList = JSON.parse(JSON.stringify(this.questionList));
if (counterNum == this.questionList.length) {
setTimeout(() => {
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
}
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) // 渲染到页面预览
})
}
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
); // 渲染到页面预览
});
}
},
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(
......@@ -557,7 +623,7 @@ docxOptions: {
type: "warning",
})
.then(() => {
this.save('3',id);
this.save("3", id);
// this.active = id * 1;
// this.init(this.clqparams);
})
......@@ -606,7 +672,6 @@ docxOptions: {
});
},
changeChecked(item) {
if (item.checked) {
this.$set(item, "evalList", [
{
......@@ -636,25 +701,23 @@ docxOptions: {
});
evals = evals.slice(0, -1);
item.evalQues = evals;
if(item.evalList.length>=1&&item.evalList[0].evalQues){
item.isProblem=1
}
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')
if (!item.evalQues && item.isProblem != 0) {
console.log(item.evalQues, item.isProblem, "2222");
this.$message({
message: '请完成录入全部问题或选择未发现问题',
type: 'warning'
});
throw new Error()
message: "请完成录入全部问题或选择未发现问题",
type: "warning",
});
throw new Error();
}
});
console.log(this.questionList, "questionList");
let params = {
list: this.questionList,
...this.clqparams,
......@@ -665,19 +728,18 @@ docxOptions: {
let res = await bcevalQuesInfo(params);
if (res.code == "200") {
this.$message("保存成功");
if(type&&type==2){
if (type && type == 2) {
this.$router.push({
path: "/assesszc/Compliancefz",
query: {
clqparams: JSON.stringify(this.clqparams),
projectName:this.projectName
projectName: this.projectName,
},
});
}else{
} else {
this.active = id * 1;
this.init(this.clqparams);
}
} else {
this.$message("保存失败");
}
......@@ -712,9 +774,7 @@ docxOptions: {
});
}
},
},
};
</script>
......@@ -730,7 +790,7 @@ docxOptions: {
.close {
position: absolute;
right: 20px;
top:0px;
top: 0px;
.el-icon-circle-close {
font-size: 30px;
......@@ -897,7 +957,7 @@ docxOptions: {
.Btn {
// width: calc(100% - 276px) !important;
width: 100%;
position:absolute;
position: absolute;
height: 50px;
bottom: 0px;
right: 0;
......@@ -949,39 +1009,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{
width: 80%;
height: 50vh;
margin: auto;
display: block
.iframeDiv {
width: 80%;
height: 50vh;
margin: auto;
display: block;
}
.iframeDivBig{
width: 80%;
height: 66vh;
margin: auto;
display: block
.iframeDivBig {
width: 80%;
height: 66vh;
margin: auto;
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 {
......@@ -993,15 +1051,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;
}
......@@ -1019,7 +1077,11 @@ docxOptions: {
// margin-top: 3vh !important;
// margin-left: 3vw !important;
}
.noShow{
.noShow {
display: none;
}
.resimg {
display: inline-block;
width: 100px;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!