Commit 12d937e3 by liangzhen

截图回显暂存

1 parent d53bf7b8
<template>
<div class="main">
<div class="close"><i class="el-icon-circle-close" @click="cancel()"></i></div>
<div class="close">
<i class="el-icon-circle-close" @click="cancel()"></i>
</div>
<p class="title">国网辽宁电力-桌面终端管理系统合规性检查评估</p>
<div class="continer">
......@@ -23,51 +25,60 @@
<el-table-column label="问题检查项" prop="quesCheckItem" width="auto">
</el-table-column>
<el-table-column label="检查说明" prop="checkDesc" show-overflow-tooltip width="auto"> </el-table-column>
<el-table-column label="评估问题" width="auto" >
<el-table-column
label="检查说明"
prop="checkDesc"
show-overflow-tooltip
width="auto"
>
</el-table-column>
<el-table-column label="评估问题" width="auto">
<template slot-scope="scope">
<el-input v-model="scope.row.evalQues" :disabled="ishow"></el-input>
</template>
<el-input v-model="scope.row.evalQues" :disabled="ishow"></el-input>
</template>
</el-table-column>
<el-table-column label="问题截图" width="auto">
<template slot-scope="scope">
<el-image
class="imgList"
v-for="(img, index) in scope.row.images"
:key="index"
:src="img"
:preview-src-list="scope.row.images"
@click="handleImageClick(scope.row.images)"
></el-image>
</template>
</el-table-column>
<template slot-scope="scope">
<el-image
class="imgList"
v-for="(img, index) in scope.row.images"
:key="index"
:src="img"
:preview-src-list="scope.row.images"
@click="handleImageClick(scope.row.images)"
></el-image>
</template>
</el-table-column>
</el-table>
</div>
<p class="Btn" v-if="!ishow">
<span @click="cancel()">取消</span
><span @click="save('add')">确定</span>
<span @click="cancel()">取消</span><span @click="save('add')">确定</span>
<span @click="save('upLoad')">提交</span>
</p>
</p>
</div>
</template>
<script>
import { selWtqdpostEvalQuesInfo ,bcpostEvalQuesInfo,tjpostEvalQuesInfo,presignedUrl} from "@/api/index";
import {
selWtqdpostEvalQuesInfo,
bcpostEvalQuesInfo,
tjpostEvalQuesInfo,
presignedUrl,
} from "@/api/index";
export default {
data() {
return {
tableData: [],
mergingRows: [],
mergingPos: 0,
clqparams:{},
ishow:true
clqparams: {},
ishow: true,
};
},
mounted() {
this.clqparams=JSON.parse(this.$route.query.clqparams)
this.ishow=this.$route.query.ishow
this.clqparams = JSON.parse(this.$route.query.clqparams);
this.ishow = this.$route.query.ishow;
this.init(this.clqparams);
},
methods: {
......@@ -101,40 +112,30 @@ export default {
break;
}
let urlStr=item.url
let urlStr = item.url;
let arrUrl = [];
let showUrlList=[]
let showUrlList = [];
// 有url拆分调接口换预览
if(urlStr){
console.log(urlStr,'urlStr')
if(urlStr.includes(',')){
arrUrl = item.url.split(',')
}else{
arrUrl.push(urlStr)
if (urlStr) {
console.log(urlStr, "urlStr");
if (urlStr.includes(",")) {
arrUrl = item.url.split(",");
} else {
arrUrl.push(urlStr);
}
console.log(arrUrl,'arrUrlarrUrl')
arrUrl.forEach(async showUrl=>{
let paramsUrl = {
console.log(arrUrl, "arrUrlarrUrl");
arrUrl.forEach(async (showUrl) => {
let paramsUrl = {
url: showUrl,
};
let resUrl = await presignedUrl(paramsUrl);
showUrlList.push(resUrl.msg)
})
console.log(showUrlList,'showUrlList')
// showUrlList=['/nopdf.png','/nopdf.png','/nopdf.png','/nopdf.png']
this.$set(item,'images',showUrlList)
let resUrl = await presignedUrl(paramsUrl);
showUrlList.push(resUrl.msg);
});
console.log(showUrlList, "showUrlList");
this.$set(item, "images", showUrlList);
}
});
this.total = res.data.total * 1;
this.dataPretreatment();
......@@ -179,40 +180,36 @@ export default {
}
}
},
cancel(){
this.$router.go(-1)
},
handleImageClick(){
cancel() {
this.$router.go(-1);
},
handleImageClick() {},
//保存
async save(type){
console.log(this.clqparams,'this.clqparams')
let params={
projectId:this.clqparams.projectId,
batchId:this.clqparams.batchId,
list:this.tableData
}
async save(type) {
console.log(this.clqparams, "this.clqparams");
let params = {
projectId: this.clqparams.projectId,
batchId: this.clqparams.batchId,
list: this.tableData,
};
if(type=='add'){
console.log(params,'this.zjtableDatathis.zjtableData')
let res= await bcpostEvalQuesInfo(params)
if(res.code=='200'){
this.$router.go(-1)
}else{
this.$message("保存失败");
}
}else {
let res= await tjpostEvalQuesInfo(params)
if(res.code=='200'){
this.$router.go(-1)
}else{
this.$message("上传失败");
}
if (type == "add") {
console.log(params, "this.zjtableDatathis.zjtableData");
let res = await bcpostEvalQuesInfo(params);
if (res.code == "200") {
this.$router.go(-1);
} else {
this.$message("保存失败");
}
} else {
let res = await tjpostEvalQuesInfo(params);
if (res.code == "200") {
this.$router.go(-1);
} else {
this.$message("上传失败");
}
}
},
},
};
</script>
......@@ -226,33 +223,32 @@ export default {
box-sizing: border-box;
overflow-x: hidden;
.Btn {
width:calc(100% - 246px);
position:fixed;
width: calc(100% - 246px);
position: fixed;
height: 80px;
bottom: -15px;
right: 0;
z-index: 100;
background-color: #f5f5f6;
line-height: 80px;
span {
display: inline-block;
width: 89px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 5px;
margin-right: 32px;
background-color: #0d867f;
border: 1px solid #0d867f;
color: #fff;
}
span:first-of-type {
border: 1px solid grey;
color: #000;
background-color: #fff;
span {
display: inline-block;
width: 89px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 5px;
margin-right: 32px;
background-color: #0d867f;
border: 1px solid #0d867f;
color: #fff;
}
span:first-of-type {
border: 1px solid grey;
color: #000;
background-color: #fff;
}
}
}
}
.close {
position: absolute;
......@@ -278,7 +274,7 @@ export default {
height: 800px;
overflow-y: auto;
background-color: #f5f5f6;
padding: 10px ;
padding: 10px;
padding-top: 0;
// display: flex;
// padding: 0 20px;
......@@ -357,11 +353,10 @@ export default {
vertical-align: middle;
}
}
.imgList{
/deep/ .el-image__inner{
width:60px;
height:60px;
.imgList {
/deep/ .el-image__inner {
width: 60px;
height: 60px;
}
}
</style>
\ No newline at end of file
......@@ -31,6 +31,18 @@
<el-input v-model="scope.row.evalQues"></el-input>
</template> -->
</el-table-column>
<el-table-column label="问题截图" width="auto">
<template slot-scope="scope">
<el-image
class="imgList"
v-for="(img, index) in scope.row.images"
:key="index"
:src="img"
:preview-src-list="scope.row.images"
@click="handleImageClick(scope.row.images)"
></el-image>
</template>
</el-table-column>
</el-table>
</div>
<div class="bottom">
......@@ -58,6 +70,7 @@ import {
selWtqdpostEvalQuesInfo,
qrzgqrbgSelQuesInfo,
qrwzgqrbgSelQuesInfo,
presignedUrl
} from "@/api/index";
export default {
data() {
......@@ -105,6 +118,30 @@ export default {
this.$set(item, "projectStagetext", "6.结决算及转资");
break;
}
let urlStr = item.url;
let arrUrl = [];
let showUrlList = [];
// 有url拆分调接口换预览
if (urlStr) {
console.log(urlStr, "urlStr");
if (urlStr.includes(",")) {
arrUrl = item.url.split(",");
} else {
arrUrl.push(urlStr);
}
console.log(arrUrl, "arrUrlarrUrl");
arrUrl.forEach(async (showUrl) => {
let paramsUrl = {
url: showUrl,
};
let resUrl = await presignedUrl(paramsUrl);
showUrlList.push(resUrl.msg);
});
console.log(showUrlList, "showUrlList");
this.$set(item, "images", showUrlList);
}
});
this.total = res.data.total * 1;
this.dataPretreatment();
......@@ -337,4 +374,10 @@ export default {
vertical-align: middle;
}
}
.imgList {
/deep/ .el-image__inner {
width: 60px;
height: 60px;
}
}
</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!