Commit 193b142a by liangzhen

暂下

1 parent 76270b17
Showing with 182 additions and 36 deletions
<template> <template>
<div class="main flex-column"> <div class="main flex-column">
<div class="close"><i class="el-icon-circle-close" @click="cancel()"></i></div> <div class="close">
<p class="title" :class="dialogFullScreen ? 'noShow' : ''">{{ projectName }}</p> <i class="el-icon-circle-close" @click="cancel()"></i>
</div>
<p class="title" :class="dialogFullScreen ? 'noShow' : ''">
{{ projectName }}
</p>
<div class="continer flex-column"> <div class="continer flex-column">
<div class="top" :class="dialogFullScreen ? 'noShow' : ''"> <div class="top" :class="dialogFullScreen ? 'noShow' : ''">
<el-button
type="primary"
class="working"
@click="working('work')"
>智能分析</el-button>
<el-steps :active="active" align-center finish-status="success"> <el-steps :active="active" align-center finish-status="success">
<el-step <el-step
v-for="item in tabList" v-for="item in tabList"
...@@ -75,12 +84,35 @@ ...@@ -75,12 +84,35 @@
</p> </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 class="tips">智能分析:</p>
<div
v-for="(itemzn, index) in item.znfxList" <!-- <p>{{ item.znfxList[0].projectStage }}</p> -->
:key="index" <img
class="inputDiv" class="resimg"
v-html="itemzn.checkDesc" :src="resimg"
></div> 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>
<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> <p class="tips">辅助分析:</p>
...@@ -143,7 +175,7 @@ ...@@ -143,7 +175,7 @@
<!-- 图片放大 --> <!-- 图片放大 -->
<span <span
class="el-upload-list__item-preview" class="el-upload-list__item-preview"
@click="handlePictureCardPreview(file)" @click="handlePictureCardPreview(file.url)"
> >
<i class="el-icon-zoom-in"></i> <i class="el-icon-zoom-in"></i>
</span> </span>
...@@ -177,7 +209,6 @@ ...@@ -177,7 +209,6 @@
@change="changeChecked(item)" @change="changeChecked(item)"
>未发现问题</el-checkbox >未发现问题</el-checkbox
> --> > -->
<i class="el-icon-circle-plus" @click="addInput(item)"></i> <i class="el-icon-circle-plus" @click="addInput(item)"></i>
</p> </p>
</div> </div>
...@@ -216,9 +247,11 @@ import { ...@@ -216,9 +247,11 @@ import {
presignedUrl, presignedUrl,
selFileList, selFileList,
} from '@/api/index' } from '@/api/index'
import { MaterialsListKY } from '@/utils/cache'
export default { export default {
data() { data() {
return { return {
resimg: '',
dialogFullScreen: false, dialogFullScreen: false,
valuesel: '', valuesel: '',
options: [], options: [],
...@@ -257,6 +290,7 @@ export default { ...@@ -257,6 +290,7 @@ export default {
valuesel: '', valuesel: '',
dialogzhanshi: false, dialogzhanshi: false,
wtmx: '', wtmx: '',
hgx:"",
docxOptions: { docxOptions: {
className: 'kaimo-docx-666', // string:默认和文档样式类的类名/前缀 className: 'kaimo-docx-666', // string:默认和文档样式类的类名/前缀
...@@ -300,7 +334,7 @@ export default { ...@@ -300,7 +334,7 @@ export default {
// 放大图片 // 放大图片
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
console.log('点击放大') console.log('点击放大')
this.dialogImageUrl = file.url this.dialogImageUrl = file
this.dialogVisible = true this.dialogVisible = true
}, },
// 删除图片 // 删除图片
...@@ -365,7 +399,6 @@ export default { ...@@ -365,7 +399,6 @@ export default {
async init(type) { async init(type) {
let params = { let params = {
projectStage: this.active * 1 + 1, projectStage: this.active * 1 + 1,
hgx: 'hgx',
...type, ...type,
} }
Promise.all([selFile(params), selWtqdFZ(params)]).then(async (res) => { Promise.all([selFile(params), selWtqdFZ(params)]).then(async (res) => {
...@@ -373,10 +406,100 @@ export default { ...@@ -373,10 +406,100 @@ export default {
this.urlList = res[0].data this.urlList = res[0].data
if (this.urlList.length > 0) { if (this.urlList.length > 0) {
this.urlList.forEach((item) => { this.urlList.forEach((item) => {
this.tabListKY.push({ typeText: item.materialName, typeCode: item.mid }) 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'
}
}
if (res[1].data) {
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)
}
let respon = await selWtmx({ qid: item.qid })
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', [
{
url: resUrl.msg,
},
])
itemImg.hideUploadEdit = true
} else {
itemImg.hideUploadEdit = false
}
})
this.$set(item, 'evalList', [...respon.data.records])
} else {
this.$set(item, 'evalList', [
{
evalQues: '',
hideUploadEdit: false,
},
])
}
if (counterNum == this.questionList.length) {
setTimeout(() => {
this.oldQuestionList = JSON.parse(JSON.stringify(this.questionList))
}, 300)
}
})
}
})
},
working(type){
let params = {
projectStage: this.active * 1 + 1,
// hgx: 'hgx',
...this.clqparams,
}
if(type=='work'){
this.hgx='hgx'
}
if( this.hgx='hgx'){
params.hgx='hgx'
}
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.activeName = this.tabListKY[0].typeCode this.activeName = this.tabListKY[0].typeCode
let resList = await selFileList({ ...params, typeCode: 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) { if (this.options.length > 0) {
this.valuesel = this.options[0].name this.valuesel = this.options[0].name
...@@ -434,7 +557,16 @@ export default { ...@@ -434,7 +557,16 @@ export default {
} }
if (responfx.data.records && responfx.data.records.length > 0) { if (responfx.data.records && responfx.data.records.length > 0) {
let znfxList = responfx.data.records.filter((item) => { 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) { if (item.checkDesc && item.type == 0) {
item.checkDesc = item.checkDesc.replace(/\n/g, '<br>') item.checkDesc = item.checkDesc.replace(/\n/g, '<br>')
} }
...@@ -491,7 +623,10 @@ export default { ...@@ -491,7 +623,10 @@ export default {
this.valuesel = '' this.valuesel = ''
this.iframeUrl = '' this.iframeUrl = ''
console.log('切换', tab.index) console.log('切换', tab.index)
let resList = await selFileList({ ...params, typeCode: this.tabListKY[tab.index].typeCode }) let resList = await selFileList({
...params,
typeCode: this.tabListKY[tab.index].typeCode,
})
this.options = resList.data || [] this.options = resList.data || []
if (this.options.length > 0) { if (this.options.length > 0) {
this.valuesel = this.options[0].name this.valuesel = this.options[0].name
...@@ -502,15 +637,17 @@ export default { ...@@ -502,15 +637,17 @@ export default {
} }
}, },
change(id) { change(id) {
console.log( console.log(this.hgx,'2222')
JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList),
'完全相同么',
)
if (JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList)) { if (JSON.stringify(this.questionList) == JSON.stringify(this.oldQuestionList)) {
this.active = id * 1 this.active = id * 1
// this.tabListKY = MaterialsListKY(id * 1 + 1); // this.tabListKY = MaterialsListKY(id * 1 + 1);
this.init(this.clqparams) if(this.hgx=='hgx'){
this.working(this.clqparams)
}else{
this.init(this.clqparams)
}
return return
} }
this.$confirm('是否保存?', '提示', { this.$confirm('是否保存?', '提示', {
...@@ -521,22 +658,20 @@ export default { ...@@ -521,22 +658,20 @@ export default {
}) })
.then(() => { .then(() => {
this.save('3', id) this.save('3', id)
// this.active = id * 1;
// this.init(this.clqparams);
}) })
.catch((action) => { .catch((action) => {
console.log(action, 'actionaction') console.log(action, 'actionaction')
if (action === 'cancel') { if (action === 'cancel') {
this.active = id * 1 this.active = id * 1
// this.tabListKY = MaterialsListKY(id * 1 + 1); // this.tabListKY = MaterialsListKY(id * 1 + 1);
this.init(this.clqparams) if(this.hgx=='hgx'){
this.working(this.clqparams)
}else{
this.init(this.clqparams)
}
} else { } else {
} }
}) })
// this.save()
// this.active = id * 1;
// this.tabListKY = MaterialsListKY(id * 1 + 1);
// this.init(this.clqparams);
}, },
delInput(item, index) { delInput(item, index) {
if (item.evalList.length <= 1) { if (item.evalList.length <= 1) {
...@@ -599,7 +734,7 @@ export default { ...@@ -599,7 +734,7 @@ export default {
evals = evals.slice(0, -1) evals = evals.slice(0, -1)
item.evalQues = evals item.evalQues = evals
// if (item.evalList.length >= 1 && item.evalList[0].evalQues) { // if (item.evalList.length >= 1 && item.evalList[0].evalQues) {
// item.isProblem = 1 // item.isProblem = 1;
// } // }
const isProblem = item.evalList.filter((v) => v.evalQues).length const isProblem = item.evalList.filter((v) => v.evalQues).length
item.isProblem = isProblem > 0 ? 1 : 0 item.isProblem = isProblem > 0 ? 1 : 0
...@@ -607,14 +742,14 @@ export default { ...@@ -607,14 +742,14 @@ export default {
// this.questionList.forEach((item) => { // this.questionList.forEach((item) => {
// if (!item.evalQues && item.isProblem != 0) { // if (!item.evalQues && item.isProblem != 0) {
// console.log(item.evalQues, item.isProblem, '2222') // console.log(item.evalQues, item.isProblem, "2222");
// this.$message({ // this.$message({
// message: '请完成录入全部问题或选择未发现问题', // message: "请完成录入全部问题或选择未发现问题",
// type: 'warning', // type: "warning",
// }) // });
// throw new Error() // throw new Error();
// } // }
// }) // });
console.log(this.questionList, 'questionList') console.log(this.questionList, 'questionList')
let params = { let params = {
...@@ -637,8 +772,12 @@ export default { ...@@ -637,8 +772,12 @@ export default {
}) })
} else { } else {
this.active = id * 1 this.active = id * 1
if(this.hgx=='hgx'){
this.working(this.clqparams)
}else{
this.init(this.clqparams) this.init(this.clqparams)
} }
}
} else { } else {
this.$message('保存失败') this.$message('保存失败')
} }
...@@ -733,7 +872,6 @@ export default { ...@@ -733,7 +872,6 @@ export default {
width: 49%; width: 49%;
min-height: 100px; min-height: 100px;
background: #fff; background: #fff;
// margin-bottom: 50px; // margin-bottom: 50px;
// color: #fff; // color: #fff;
...@@ -1004,4 +1142,12 @@ export default { ...@@ -1004,4 +1142,12 @@ export default {
.noShow { .noShow {
display: none; display: none;
} }
.resimg {
display: inline-block;
width: 100px;
}
.working{
position: absolute;
left: -100px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!