<template>
  <div>
    <div style="background:white;padding:20px;background:#99CCFF;margin-top:20px">
          <p style="margin-top:0">选择对比方案</p>
          <el-divider></el-divider>
          <el-select v-model="ruleForm.type" placeholder="请选择" @change="changeRight" style="padding:20px 0 0 0">
              <el-option v-for="item in rightList.filter(item=>typeArr.includes(item.type))" :key="item.rightId" :value="item.rightId" :label="item.pRightName"></el-option>
          </el-select>
        <el-table
          ref="table"
          :data="tableData2"
          :span-method="objectSpanMethod"
          :row-class-name="tableRowClassName"
          :height="tableHeight"
          border
          style="min-width: 100%; margin-top: 20px;overflow:auto;">
        >
        <el-table-column
          prop="pRightName"
          label="标的权利项"
          align="center"
          width="200px">
          <template slot-scope="scope">  
            <el-tooltip class="item" effect="dark" :content="scope.row.pContent" placement="top">
              <span>{{scope.row.pRightName}}</span>
            </el-tooltip>       
          </template>
        </el-table-column>
        <el-table-column
          prop="content"
          label="标的权利要求特征"
          align="center"
          width="300px">
          <template slot-scope="scope" >       
                  {{scope.row.content}}
          </template>
        </el-table-column>
        <el-table-column
        prop="content"
        label="公识"
        align="center"
        width="100px">
        <template slot-scope="scope" >     
          <el-checkbox-group v-model="checkRecord">  
          <el-checkbox :label="scope.row.id+scope.row.content" @change="getFunInfo(scope.row)">
                  {{''}}
              </el-checkbox>
            </el-checkbox-group>
        </template>
      </el-table-column>
        <el-table-column v-for="(item, index) in tableHeader" :key="index" show-overflow-tooltip align="center" :min-width="item.length > 7 ? '190' : '170'">
          <template slot="header">
            <span>
                <el-link type="primary"  @click="editContrast(item.patentNo)">{{item.patentNo}}(D{{ index+1 }})</el-link>
            </span>
            <el-tag style="font-size:12px;border-radius:50%;" v-if="item.remark">{{item.remark}}</el-tag>
            <i class="el-icon-arrow-down el-icon--right" @click="getVal(item)"></i>
          </template>
          <template slot-scope="scope">
            <el-checkbox-group v-model="checkRecord">
              <div class="innerTable" v-if="scope.row[item.patentNo]" style="width:calc(100% + 20px);margin-left:-10px;word-wrap:break-word;">
                 <p v-for="(inc,index) in scope.row[item.patentNo]">
                  <el-checkbox :label="item.patentNo+scope.row[item.patentNo+'_Id'][index]" @change="getFunInfo(scope.row,item.patentNo,index)" v-if="scope.row[item.patentNo]">
                  <!-- <el-input style="width:calc(100% + 20px);margin-left:-10px;word-wrap:break-word;" v-model="i"></el-input>  -->
                  <span>[{{ inc.fields }}]{{inc.content}}<el-image ref="image" :preview-src-list="imgList" v-if="inc.filePath" :src="inc.filePath"  style="vertical-align:middle;width:100px" @click.prevent="showImage(inc.filePath)"></el-image></span> 
                  </el-checkbox>
                </p>
              </div>
             </el-checkbox-group>
          </template>
        </el-table-column>
        </el-table>
        <div style="display:flex; justify-content: space-between;align-items:center;padding-top:20px">
          <p>对比结论/原因:</p>
          <div style="width:calc(100% - 200px);">
            <myRichText v-model="ruleForm.result" placeholder="请输入对比结论/理由（可粘贴图片）"></myRichText>
          </div>
          <div >
            <el-button type="primary" @click="save">保存</el-button>
          </div>
        </div>
      </div>
  </div>
</template>

<script>
import mixins from './mixins'
export default {
    mixins:[mixins],
  components: {},
  props: {},
  data() {
    return {
        tableData2:[],
        rightList:[],
        ruleForm:{}
    };
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {},
  methods: {},
};
</script>
<style lang="scss" scoped>
</style>