<!-- 专项问题列表 -->
<template>
  <view>
    <video v-if="!!videoUrl"
           :src="videoUrl"
           controls
           style="width: 100%;height: 350rpx;">
    </video>
    <view v-else
          style="  padding: 20rpx 30rpx;">
      暂无视频信息
    </view>
    <view v-if="titleType==1"
          style="display: flex;justify-content: space-around;margin: 20rpx;">
      <tui-button height="60rpx"
                  margin="0 20rpx 0 0"
                  @click="navTo(`/pages/template/bomb/viewComment?id=${taskId}`)">整改评价</tui-button>
    </view>
    <tui-list-cell v-else
                   arrow
                   :size="26"
                   color="#999"
                   @click="navTo(`/pages/template/bomb/addComment?id=${taskId}`)">查看详情</tui-list-cell>
  </view>
</template>
<script>
export default {
  props: {
    videoUrl: {
      type: String,
      default: "",
    },
    taskId: {
      type: Number,
      default: -1,
    },
    //整改完成的 显示整改评价
    titleType: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {};
  },
  methods: {
    navTo(url) {
      if (this.taskId == -1) {
        uni.showToast({
          title: "缺少必要数据,无法查看详情!",
          icon: "error",
        });
        return;
      }
      uni.navigateTo({
        url,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>