Commit 12d937e3 by liangzhen

截图回显暂存

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