优化暂无图片

ds1.0
fanluyan 2 years ago
parent fced40f5f6
commit 7088e1f3ec

@ -27,7 +27,12 @@
:style="'backgroundImage:url(' + bigPicPath + ')'"
></div>
<div class="bigimgView" @click="handleBigPicbox(bigPicPath)">
<img ref="picJpg" class="animImg" :src="bigPicPath" />
<img
ref="picJpg"
class="animImg"
:src="bigPicPath"
@error="setDefaultImage"
/>
</div>
<canvas id="myCanvas" class="myCanvas" ref="myCanvas"></canvas>
<!-- <img ref="picJpg" class="animImg" :src="bigPicPath + '!1366x768'" /> -->
@ -74,7 +79,7 @@
item.path.indexOf('videos') == -1
"
>
<img :src="item.path + '!260x160'" />
<img :src="item.path + '!260x160'" @error="setDefaultImage" />
<p class="timeInfo">
<el-tooltip
class="item"
@ -198,6 +203,7 @@
<script>
import { getCoordinate, updateMarkEnableStatus } from "@/utils/api/index";
import defaultImage from "../../assets/img/nodatapic2.jpg";
export default {
components: {},
props: {
@ -282,6 +288,10 @@ export default {
},
created() {},
methods: {
setDefaultImage(e) {
e.target.src = defaultImage;
this.bigPicPath = defaultImage;
},
downLoadPic(url, name) {
const image = new Image();
image.setAttribute("crossOrigin", "anonymous");

@ -815,6 +815,11 @@ export default {
});
this.sampLoading = false;
this.sampSetLoading = false;
this.upperLoading = false;
this.upperSetLoading = false;
this.idLoading = false;
this.idSetLoading = false;
this.statusLoading = false;
} else if (this.i > 9) {
window.clearInterval(this.timer);
this.timer = null;

@ -56,7 +56,7 @@
: ''
"
>
<img :src="item.path + '!1366x768'" />
<img :src="item.path + '!1366x768'" @error="setDefaultImage" />
</div>
<div
class="bigpic"
@ -176,7 +176,7 @@
<script>
import { getPictureList, getTerminalPhotoListJoggle } from "@/utils/api/index";
import carouselChart from "../components/carouselChart.vue";
import defaultImage from "../../assets/img/nodatapic2.jpg";
export default {
components: {
carouselChart,
@ -257,6 +257,9 @@ export default {
};
},
methods: {
setDefaultImage(e) {
e.target.src = defaultImage;
},
//
handleShowHistory(item) {
console.log(item);

@ -478,6 +478,8 @@ export default {
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.selectData.id); //

@ -19,6 +19,7 @@
<img
:src="item.path + '!1366x768'"
v-if="item.mediatype == 0 && item.path !== null"
@error="setDefaultImage"
/>
<!-- 判断是否是视频mediatype=1,并且path不为空 展示图片 -->
<img
@ -62,7 +63,7 @@
</template>
<script>
import { getTowerAndPhotoList } from "@/utils/api/index";
import defaultImage from "../../assets/img/nodatapic2.jpg";
export default {
props: ["previewData"],
data() {
@ -81,6 +82,9 @@ export default {
},
mounted: function () {},
methods: {
setDefaultImage(e) {
e.target.src = defaultImage;
},
//
getPicList(id, type, page) {
this.id = id;

@ -123,6 +123,7 @@
:src="item.path + '!1366x768'"
:class="'bigpath' + index"
@click="showbigpicPath(item, index)"
@error="setDefaultImage"
/>
<!-- <el-image :src="item.path" lazy></el-image> -->
@ -206,6 +207,7 @@
<script>
import { getSearchInfo, getRealtimePhoto } from "@/utils/api/index";
import defaultImage from "../../assets/img/nodatapic2.jpg";
export default {
data() {
return {
@ -286,6 +288,9 @@ export default {
}
},
methods: {
setDefaultImage(e) {
e.target.src = defaultImage;
},
showbigpicPath(item, index) {
console.log(item, index);
var personBox = document.querySelector(".bigpath" + index);

Loading…
Cancel
Save