|
@@ -9,11 +9,12 @@ import {
|
|
|
onMounted,
|
|
|
onUnmounted,
|
|
|
ref,
|
|
|
+ reactive,
|
|
|
} from 'vue-demi';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'AccidentCard',
|
|
|
- components:{
|
|
|
+ components: {
|
|
|
authImg
|
|
|
},
|
|
|
setup() {
|
|
@@ -25,11 +26,18 @@ export default defineComponent({
|
|
|
|
|
|
const carousel = ref(null);
|
|
|
|
|
|
-
|
|
|
+ var rr = (store.incidentDetail?.baseInfo?.pic?.split(',') ?? []).length +
|
|
|
+ (store.incidentDetail?.baseInfo?.video?.split(',') ?? []).length;
|
|
|
+ const isshow = ref(rr>0);
|
|
|
|
|
|
onMounted(() => {
|
|
|
setTimeout(() => {
|
|
|
- carousel.value.setActiveItem(0);
|
|
|
+ try {
|
|
|
+ carousel.value.setActiveItem(0);
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}, 500);
|
|
|
})
|
|
|
|
|
@@ -41,7 +49,14 @@ export default defineComponent({
|
|
|
return () => (
|
|
|
<Card cardType="accident-scene">
|
|
|
<div>
|
|
|
- <el-carousel ref={carousel} autoplay={false} arrow={"always"}>
|
|
|
+ <div class="dis"
|
|
|
+ v-show={
|
|
|
+ (store.incidentDetail?.baseInfo?.pic?.split(',') ?? []).length +
|
|
|
+ (store.incidentDetail?.baseInfo?.video?.split(',') ?? []).length<1
|
|
|
+ }>
|
|
|
+ 暂无现场图像
|
|
|
+ </div>
|
|
|
+ <el-carousel ref={carousel} autoplay={false} arrow={'always'}>
|
|
|
{(store.incidentDetail?.baseInfo?.pic?.split(',') ?? []).map(
|
|
|
(item) => (
|
|
|
<el-carousel-item>
|