diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index fb8900c..a445534 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -249,8 +249,6 @@ export default { }) }, - - //选择项目 rowClick(row) { this.doctorCheck.checkItem = row; diff --git a/src/components/doctorCheck/CheckPicture.vue b/src/components/doctorCheck/CheckPicture.vue index ffc8d28..90b241c 100644 --- a/src/components/doctorCheck/CheckPicture.vue +++ b/src/components/doctorCheck/CheckPicture.vue @@ -62,11 +62,7 @@ ? item.pictureFilename : apiUrl + item.pictureFilename " - :preview-src-list="[ - item.pictureFilename.indexOf('http') > -1 - ? item.pictureFilename - : apiUrl + item.pictureFilename, - ]" + :preview-src-list="previewSrcList(checkPictures,item)" > @@ -112,7 +108,7 @@ import moment from "moment"; import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; -import { getPagePriv,checkPagePriv, deepCopy } from "../../utlis/proFunc"; +import { getPagePriv,checkPagePriv, deepCopy, arrayExistObj } from "../../utlis/proFunc"; import CheckPictureUpload from "./CheckPictureUpload.vue"; import server from "../../utlis/mm"; @@ -210,6 +206,33 @@ export default { }); }, + // 生成 图片预览列表 + previewSrcList(oriList,curImag){ + let srcList = [] + let image = curImag.pictureFilename.indexOf('http') > -1 + ? curImag.pictureFilename + : this.apiUrl + curImag.pictureFilename; + srcList.push(image) + let lfind = arrayExistObj(oriList,'id',curImag.id) + if(lfind > -1){ + for (let i = lfind + 1; i < oriList.length; i++) { + let e = oriList[i]; + image = e.pictureFilename.indexOf('http') > -1 + ? e.pictureFilename + : this.apiUrl + e.pictureFilename; + srcList.push(image) + } + for (let index = 0; index < lfind; index++) { + let e = oriList[index]; + image = e.pictureFilename.indexOf('http') > -1 + ? e.pictureFilename + : this.apiUrl + e.pictureFilename; + srcList.push(image) + } + } + return srcList + }, + btnGetPic() { if (!this.doctorCheck.RegisterCheckId) { this.$message.warning("未选中组合项目!");