|
|
@ -1,18 +1,11 @@ |
|
|
|
<template> |
|
|
|
<BorderRadiusImage |
|
|
|
class="RoadStateCard" |
|
|
|
borderRadius="2px" |
|
|
|
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" |
|
|
|
borderWidth="2px" |
|
|
|
> |
|
|
|
<div class="left"> |
|
|
|
<BorderRadiusImage class="RoadStateCard" borderRadius="2px" |
|
|
|
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px"> |
|
|
|
<div class="left" v-if="isShowLeft"> |
|
|
|
<!-- <img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)"> --> |
|
|
|
<!-- <img :src="require(`./test.png`)"> --> |
|
|
|
<ElImage |
|
|
|
style="width: 212px; height: 159px" |
|
|
|
:src="cardData.pictures ? cardData.pictures[0] : null" |
|
|
|
:preview-src-list="cardData.pictures || []" |
|
|
|
> |
|
|
|
<ElImage style="width: 212px; height: 159px" :src="cardData.pictures ? cardData.pictures[0] : null" |
|
|
|
:preview-src-list="cardData.pictures || []"> |
|
|
|
<div slot="error"> |
|
|
|
<i class="el-icon-picture-outline icon"></i> |
|
|
|
</div> |
|
|
@ -26,25 +19,14 @@ |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
<div class="controls"> |
|
|
|
<Button |
|
|
|
:style="{ background: firstBtnColor, width: '50%' }" |
|
|
|
@click.native="$emit('firstBtnClick', cardData.id)" |
|
|
|
>{{ getFirstBtnText(cardData.state) }}</Button |
|
|
|
> |
|
|
|
<Button |
|
|
|
v-if="cardData.state == 4" |
|
|
|
:style="{ background: lastBtnColor, width: '50%' }" |
|
|
|
@click.native="$emit('lastBtnClick', cardData.id)" |
|
|
|
>{{ getLastBtnText(cardData.state) }}</Button |
|
|
|
> |
|
|
|
<Button :style="{ background: firstBtnColor, width: isShowLeft ? '50%' : '25%' }" |
|
|
|
@click.native="$emit('firstBtnClick', cardData.id)">{{ getFirstBtnText(cardData.state) }}</Button> |
|
|
|
<Button v-if="cardData.state == 4" :style="{ background: lastBtnColor, width: isShowLeft ? '50%' : '25%' }" |
|
|
|
@click.native="$emit('lastBtnClick', cardData.id)">{{ getLastBtnText(cardData.state) }}</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<img |
|
|
|
v-if="cardData.state" |
|
|
|
class="status" |
|
|
|
:src="require(`./images/${statusMap[cardData.state]}.svg`)" |
|
|
|
/> |
|
|
|
<img v-if="cardData.state" class="status" :src="require(`./images/${statusMap[cardData.state]}.svg`)" /> |
|
|
|
</BorderRadiusImage> |
|
|
|
</template> |
|
|
|
|
|
|
@ -106,6 +88,10 @@ export default { |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
isShowLeft: { |
|
|
|
type: Boolean, |
|
|
|
default: true |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|