<template>
    <div id="category">
      <!--头部-->
      <!-- <Header/> -->
      <div class="header-title">
        <span class="header-title-return-back" @click="returnClick"><van-icon name="arrow-left" /></span>
        <span class="header-title-name">{{ copyRightType == 'ruanjian'?'软件著作权详情':'作品著作权详情' }}</span>
      </div>
  
      <div class="manage-body" v-if="copyRightType == 'zuopin'">
        <van-cell-group>
          <van-cell title="著作权类别" :label="copyRightData.category" />
          <van-cell title="作品名称" :label="copyRightData.name" />
          <van-cell title="作品著作权人" :label="copyRightData.owner" />
          <van-cell style="width: 100%;">
                <template #title>
                    <span class="custom-title cl-gray">登记号</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.registerNo }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 50%;float: left;">
                <template #title>
                    <span class="custom-title cl-gray">登记日期</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.registerDate }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 50%;">
                <template #title>
                    <span class="custom-title cl-gray">创作完成日期</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.finishDate }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 100%;">
                <template #title>
                    <span class="custom-title cl-gray">首次发布日期</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.publishDate }}</span>
                </template>
            </van-cell>
        </van-cell-group>
      </div>

      <div v-if="copyRightType == 'ruanjian'" class="manage-body">
        <van-cell-group>
          <van-cell title="著作权类别" :label="copyRightData.category" />
          <van-cell title="软件全称" :label="copyRightData.name" />
          <van-cell title="软件简称" :label="copyRightData.shortName" />
          <van-cell title="软件著作权人" :label="copyRightData.owner" />
          <van-cell style="width: 50%;float: left;">
                <template #title>
                    <span class="custom-title cl-gray">登记号</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.registerNo }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 50%;">
                <template #title>
                    <span class="custom-title cl-gray">版本号</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.versionNo }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 50%;float: left;">
                <template #title>
                    <span class="custom-title cl-gray">首次发布日期</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.publishDate }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 50%;">
                <template #title>
                    <span class="custom-title cl-gray">登记批准日期</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.registerAperDate }}</span>
                </template>
            </van-cell>
            <van-cell style="width: 100%;">
                <template #title>
                    <span class="custom-title cl-gray">开发完成日期</span>
                </template>
                <template #label>
                    <span class="custom-title cl-black">{{ copyRightData.publishDate }}</span>
                </template>
            </van-cell>
<!--            <van-cell style="width: 50%;">-->
<!--                <template #title>-->
<!--                    <span class="custom-title cl-gray">权力取得方式</span>-->
<!--                </template>-->
<!--                <template #label>-->
<!--                    <span class="custom-title cl-black">{{ copyRightData.owner }}</span>-->
<!--                </template>-->
<!--            </van-cell>-->
        </van-cell-group>
      </div>
    </div>

  </template>
  
  <script>
  // 2. 引入滚动组件
  import BScroll from 'better-scroll'
  import { Button, Col, Row, Icon, Field } from 'vant';
  
  // 3. 引入接口
  import {getCategories, getCategoriesDetail} from "./../../service/api/index"

  
  export default {
    name: "CopyrightDetail",

    data() {
      return {
        copyRightData: {},
        copyRightType: '',
      }
    },
    components: {
      VanButton: Button,
      VanRow: Row,
      VanCol: Col,
      VanIcon: Icon,
      VanField: Field,
    },
    created() {
      this.copyRightType = sessionStorage.getItem('copyRightType')
      this.copyRightData = JSON.parse(sessionStorage.getItem('copyRightData'))
    },
    methods: {
      returnClick() {
        sessionStorage.removeItem('copyRightData')
        this.$router.push({path: 'Copyright'})
      },


    },
  }
  </script>
  
  <style lang="less" scoped>
  
  .header-title {
    height: 46px;
    width: 100%;
    background-color: #fff;
    text-align: center;
  }
  .header-title-name {
    font-weight: bold;
    line-height: 46px;
    align-items: center;
    justify-content: center;
    display: inline-flex;
  }
  .header-title-return {
    position: absolute;
    top: 13px;
    left: 20px;
    font-size: 15px;
  }
  .manage-body {
    margin-top: 10px;
    background-color: #fff;
    padding: 20px 10px 0px 10px;
  }
  /deep/ .van-nav-bar__text {
    color: gray !important;
    font-weight: bold;
  }
  .icon-mg {
    margin-left: 3px;
  }
  /deep/ .van-card__thumb {
    width: 60px;
  }
  /deep/ .van-cell__value {
    bottom: 5px;
  }
  </style>../../service/api/index