<!--pages/patentDetails/patentDetails.wxml-->
<navBar></navBar>
<van-notify id="van-notify" />
<view class="patentDetail">
<!-- <view class="translate" bind:tap="translate">{{istranslate?'原文':'译文'}}</view> -->
  <view class="patentNo">
    <text user-select="false">{{patent.patentNo}}</text>
  </view>
  <view class="title">
    <text user-select="false">标题：{{istranslate?translateField.title:patent.title[0].text_content}}</text> 
  </view>
  <block wx:if="{{patent.appDate || patent.grantDate || patent.publicDate}}">
    <wux-divider wux-class="line" position="left" text="日期" />
    <view class="form">
      <my-form-item wx:if="{{patent.appDate}}" label="申请日：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item"><text user-select="false">{{patent.appDate}}</text></view>
      </my-form-item>
      <my-form-item wx:if="{{patent.grantDate || patent.publicDate}}" label="公开/授权日：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item"><text user-select="false">{{patent.grantDate || patent.publicDate}}</text></view>
      </my-form-item>
    </view>
  </block>
 
  <wux-divider wux-class="line" position="left" text="号码" />
  <view class="form">
    <my-form-item wx:if="{{patent.appNo}}" label="申请号：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item"><text user-select="false">{{patent.appNo}}</text></view>
      </my-form-item>
      <my-form-item wx:if="{{patent.grantNo || patent.publicNo}}" label="公开/授权号：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item"><text user-select="false">{{patent.grantNo || patent.publicNo}}</text></view>
      </my-form-item>
      <my-form-item wx:if="{{patent.classification}}" label="分类号：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item"><text user-select="false">{{patent.classification}}</text></view>
      </my-form-item>
  </view>
 
  <wux-divider wux-class="line" position="left" text="申请（权利）人/设计人" />
  <view class="form">
    <view >
      <my-form-item label="申请（权利）人：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="200" labelPosition="{{labelPosition}}">
        <view class="form_item" wx:if="{{isSame}}"><text user-select="false">{{patent.rightHolder}}</text></view>
        <view class="form_item" wx:elif="{{patent.rightHolder&&patent.rightHolder.length>0}}"><text user-select="false">{{patent.rightHolder}}</text></view>
        <view class="form_item" wx:else><text user-select="false">{{patent.applicant}}</text></view>
      </my-form-item>
    </view>
    <!-- <view wx:else>
      <my-form-item label="申请人：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item">{{patent.applicant}}</view>
      </my-form-item>
      <my-form-item label="权利人：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item">{{patent.rightHolder}}</view>
      </my-form-item>
    </view> -->
    <my-form-item wx:if="{{patent.inventor && patent.inventor.length>0}}" label="设计人：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{isSame?350:labelWidth}}" labelPosition="{{labelPosition}}">
        <view class="form_item"><text user-select="false">{{patent.inventor}}</text></view>
      </my-form-item>
  </view>
  
  <block wx:if="{{(patent.agency && patent.agency.length>0) ||(patent.agent && patent.agent.length>0) }}">
     <wux-divider wux-class="line" position="left" text="代理人" />
      <view class="form">
        <my-form-item wx:if="{{patent.agency && patent.agency.length>0}}" label="代理机构：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
          <view class="form_item"><text user-select="false">{{patent.agency}}</text></view>
        </my-form-item>
        <my-form-item wx:if="{{patent.agent && patent.agent.length>0}}" label="代理人：" border="{{false}}" customStyle="{{customStyle}}" labelWidth="{{labelWidth}}" labelPosition="{{labelPosition}}">
          <view class="form_item"><text user-select="false">{{patent.agent}}</text></view>
        </my-form-item>
      </view>
  </block>
   
    <block wx:if="{{patent.abstractStr && patent.abstractStr.length>0}}">
      <wux-divider wux-class="line" position="left" text="简要说明" />
      <view class="form_item form">
        <rich-text user-select="false" nodes="{{istranslate?translateField.abstractStr:patent.abstractStr[0].text_content}}"></rich-text>
      </view>
    </block>
    

    <wux-divider wux-class="line" position="left" text="附图" />
    <swiper indicator-dots="{{true}}"  autoplay="{{false}}" interval="{{2000}}" duration="{{500}}">
      <block wx:if="{{patent.imageList && patent.imageList.length>0}}" wx:for="{{patent.imageList}}" wx:for-item="img" wx:key="index">
        <swiper-item>
          <!-- <view style="background-image: url('{{imgHttp+img.guid}}')" class="slide-image" data-current="{{patent}}" data-imgList="{{patent.imageList}}" bind:tap="previewImage"></view>   -->
          <image src="{{imgHttp+img.guid}}" data-current="{{img}}" data-imgList="{{patent.imageList}}" bindtap="previewImage" class="slide-image" 	show-menu-by-longpress mode="aspectFit"/>  
        </swiper-item>
      </block>
    </swiper>
</view>