zero 9 mesi fa
parent
commit
eee9c03b4f

+ 8 - 2
file-contrast/src/api/index.js

@@ -1,8 +1,14 @@
 
 
-import permission from "./permission";
+import axios from '@/utils/axios'
 
 export default {
 
-  ...permission
+  selectCaseInfoList(data){
+    return axios.post('/xiaoshi/wordDiffCompare/selectCaseInfoList',data)
+  },
+
+  selectDiscrepancy(data){
+    return axios.post('/xiaoshi/wordDiffCompare/selectDiscrepancy',data)
+  }
 }

+ 0 - 5
file-contrast/src/api/permission.js

@@ -1,5 +0,0 @@
-import axios from '@/utils/axios'
-
-export default {
-
-}

+ 11 - 1
file-contrast/src/router/index.js

@@ -37,10 +37,20 @@ const routes = [
         path:'/differenceDetails',
         name:'DifferenceDetails',
         meta: {
-          title: '案件列表'
+          title: '差异度详情'
         },
         component: () => import("@/views/differenceDetails/index.vue")
       },
+      //查看文件
+      {
+        path: '/checkFile',
+        name: '/checkFile',
+        meta: {
+          aside: true,
+          sign: 'checkFile',
+        },
+        component: () => import('@/views/components/view/checkFile.vue'),
+      },
     ]
   },
   

+ 4 - 3
file-contrast/src/utils/index.js

@@ -1,4 +1,5 @@
 import moment from 'moment'
+import commonJS from './common'
 
 export const formatDate = (date, format = 'YYYY-MM-DD') => {
   return moment(date).format(format)
@@ -49,10 +50,10 @@ export const downLoadBase64 = (content, fileName) => {
   aLink.click();
 }
 
-export const downLoad2 = (url) => {
-  const href = `/api/v2/common/download?url=${encodeURIComponent(url)}`
+export const downLoad2 = (guid,fileName="download") => {
+  const href = commonJS.checkViewer(guid)
   const anchor = document.createElement('a');
-  const fileName = 'download';
+  // const fileName = 'download';
   if ('download' in anchor) {
     anchor.href = href;
     anchor.setAttribute("download", fileName);

+ 291 - 71
file-contrast/src/views/caseList/index.vue

@@ -8,31 +8,96 @@
         <el-container>
           <el-header>
             <div class="searchHeader">
-              <el-select v-model="searchOption.label" size="small" @change="getObject">
+              <el-select :value="searchOption.value" size="small" @change="getObject">
                 <el-option v-for="item in SearchFields" :key="item.value" :label="item.label" :value="item.value" placeholder="请选择"></el-option>
               </el-select>
-              <el-input size="small" style="width: 100%" v-model="searchOption.value" placeholder="请输入"></el-input>
-              <el-button size="small">查询</el-button>
+              <template v-if="searchOption.fields && searchOption.fields.length">
+                <div v-for="field in searchOption.fields" :key="field.value">
+                  <template v-if="searchOption.component == 'date'">
+                    <el-date-picker
+                      v-model="field.result"
+                      type="date"
+                      value-format="yyyy-MM-dd"
+                      size="small"
+                      clearable
+                      placeholder="选择日期">
+                    </el-date-picker>
+                  </template>
+                  <template v-else-if="searchOption.component == 'number'">
+                    <el-input-number controls-position="right" size="small" v-model="field.result" placeholder="请输入" :precision="2" :step="0.1" :min="0"></el-input-number>
+                  </template>
+                  <template v-else>
+                    <el-input type="text" size="small" v-model="field.result" placeholder="请输入"></el-input>
+                  </template>
+                </div>
+                
+              </template>
+              <template v-else>
+                <template v-if="searchOption.component == 'date'">
+                    <el-date-picker
+                      v-model="searchOption.result"
+                      type="date"
+                       value-format="yyyy-MM-dd"
+                      size="small"
+                      clearable
+                      placeholder="选择日期">
+                    </el-date-picker>
+                  </template>
+                  <template v-else-if="searchOption.component == 'number'">
+                    <el-input-number controls-position="right" size="small" v-model="searchOption.result" placeholder="请输入" :precision="2" :step="0.1" :min="0"></el-input-number>
+                  </template>
+                  <template v-else>
+                    <el-input type="text" size="small" v-model="searchOption.result" placeholder="请输入"></el-input>
+                  </template>
+              </template>
+              
+              <el-button size="small" @click="search">查询</el-button>
+              <div class="option" v-if="Object.keys(searchValue).length > 0">
+                <el-popover placement="bottom" title="" width="300" trigger="hover" class="margin-left_10">
+                  <div class="main">
+                    <div v-for="(item, key) in SearchFields.filter(i=>{return i.result || (i.results && i.results.length)})" :key="key" class="box">
+                      <el-alert type="success" :closable="false">
+                        <div class="content">
+                          <span class="color-black">{{ item.label }}</span>
+                          <b class="padding_0_5">=</b>
+                          <span class="color-black">
+                            <span v-if="item.results">
+                              <span class="query-data-label" @click="handleCancelQueryParams(item)">{{ item.results.join(' ~ ') }}<i
+                                class="el-icon-close"></i></span>
+                            </span>
+                            <span v-else>
+                              <span class="query-data-label" @click="handleCancelQueryParams(item)">{{ item.result}}<i class="el-icon-close"></i></span>
+                            </span>
+                          </span>
+                        </div>
+                      </el-alert>
+                    </div>
+                  </div>
+                  <el-button slot="reference" size="small" type="primary" style="width:100%">
+                    检索条件<i class="el-icon-arrow-down el-icon--right"></i>
+                  </el-button>
+                </el-popover>
+              </div>
             </div>
           </el-header>
           <el-main style="padding:15px 5px !important">
-            <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header" height="calc(100% - 0px)" >
+            <el-table :data="tableData" border style="width: 100%" header-row-class-name="custom-table-header" :loading="loading" height="calc(100% - 0px)" >
               <el-table-column label="#" width="60" type="index" align="center">
                 <template slot-scope="scope">
                   <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
                 </template>
               </el-table-column>
-              <el-table-column v-for="item in column" :key="item.value" :prop="item.value" :render-header=" $commonJS.renderHeaderMethods" :label="item.name" :sortable="item.ifSort?'custom':false" align="center">
+              <el-table-column v-for="item in column" :key="item.value" :prop="item.value" :render-header=" $commonJS.renderHeaderMethods" :label="item.name" :sortable="item.ifSort?'custom':false" align="center" :width="item.width||'auto'">
                 <template slot-scope="scope">
                   <div>
                     <!-- 差异度 -->
-                    <div v-if="['a','b'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row,item)" class="cursor" @click="checkDifferenceDetails(scope.row,item)"></div>
+                    <div v-if="['firstDiffRate','secondDiffRate'].includes(item.value)" v-html="$commonJS.getColumnData(scope.row,item)" class="cursor" @click="checkDifferenceDetails(scope.row,item)"></div>
                     <!-- 文件 -->
-                    <div v-else-if="['files'].includes(item.value)">
-                      <p v-for="(file,ind) in scope.row.files" :key="ind" class="cursor">{{ file.type }}:{{ file.file.name }} 
-                        <span style="display:none"> 
-                          <el-button type="text">预览</el-button>
-                          <el-button type="text">下载</el-button>
+                    <div v-else-if="['assoCaseFileVOList'].includes(item.value)">
+                      <p v-for="(file,ind) in scope.row.assoCaseFileVOList" :key="ind" class="cursor1">{{ fileType[file.fileType] }}:{{ file.fileName }} 
+                        <span style="display:inline-block" > 
+                          <el-button type="text" style="margin-left: 20px;" @click="review(file)">预览</el-button>
+                          <el-button type="text" @click='downLoad(file)'>下载</el-button>
                         </span>
                       </p>
                     </div>
@@ -54,59 +119,74 @@
 </template>
 
 <script>
+import { downLoad2 } from '@/utils'
+
 const tableColumn = [
   {
     value:"caseNo",
     name:'案号',
+    width:"220px",
     ifSort:false
   },
   {
     value:"title",
     name:'标题',
+    width:"240px",
     ifSort:false
   },
   {
-    value:"client",
+    value:"customer",
     name:'客户',
+    width:"240px",
     ifSort:false
   },
   {
-    value:"writePerson",
+    value:"writer",
     name:'撰写人',
+    width:"110px",
     ifSort:false
   },
 
   {
-    value:"examinePerson",
+    value:"auditor",
     name:'审核人',
+    width:"110px",
     ifSort:false
   },
   {
-    value:"finishTime",
+    value:"completionDate",
     name:'完成日期',
+    width:"180px",
     ifSort:false
   },
   {
-    value:"a",
+    value:"firstDiffRate",
     name:'初稿与内部定稿差异度',
+    width:"180px",
     ifSort:false,
     type:"function",
     useFunction:(data)=>{
-      return '初稿与内部定稿差异度:' + data.a
+      var num = data.firstDiffRate * 100
+      num = num.toFixed(4)
+      return '初稿与内部定稿差异度:' + num + '%'
     }
   },
   {
-    value:"b",
+    value:"secondDiffRate",
     name:'内部定稿与定稿差异度',
+    width:"180px",
     ifSort:false,
     type:"function",
     useFunction:(data)=>{
-      return '内部定稿与定稿差异度:' + data.b
+      var num = data.secondDiffRate * 100
+      num = num.toFixed(4)
+      return '内部定稿与定稿差异度:' + num + '%'
     }
   },
   {
-    value:"files",
+    value:"assoCaseFileVOList",
     name:'案件文件',
+    width:"360px",
     ifSort:false,
     type:"function",
     useFunction:(data)=>{
@@ -114,80 +194,193 @@ const tableColumn = [
     }
   },
 ]
-export default {
-  components: {},
-  props: {},
-  data() {
-    return {
-      SearchFields:[
+const defaultSeachFields = [
         {
-          value:'case',
+          value:'caseNo',
           label:'案号'
         },
         {
           value:'title',
           label:'标题'
+        },
+        {
+          value:'customer',
+          label:'客户'
+        },
+        {
+          value:'writer',
+          label:'撰写人'
+        },
+        {
+          value:'auditor',
+          label:'审核人'
+        },
+        {
+          value:'completionDate',
+          component:'date',
+          label:'完成日期'
+        },
+        {
+          value:'firstBegin',
+          component:'number',
+          fields:[
+            {
+              label:'开始差异度',
+              value:'firstBegin',
+            },
+            {
+              label:'结束差异度',
+              value:'firstEnd'
+            },
+          ],
+          label:'初稿与内部定稿差异度'
+        },
+        {
+          value:'secondBegin',
+          component:'number',
+          fields:[
+            {
+              label:'开始差异度',
+              value:'secondBegin',
+            },
+            {
+              label:'结束差异度',
+              value:'secondEnd'
+            },
+          ],
+          label:'内部定稿与定稿差异度'
         }
-      ],
-      searchOption:{
+      ]
+export default {
+  components: {},
+  props: {},
+  data() {
+    return {
+      fileType:{
+        1:'初稿文件',
+        2:'内部定稿文件',
+        3:'定稿文件'
+      },
+      SearchFields:defaultSeachFields,
+      searchOption:{//当前检索栏位
         label:'',
         value:''
       },
-      tableData:[
-        {
-            caseNo:'su2345',
-            title:'su1',
-            client:'customer1',
-            writePerson:'test1',
-            examinePerson:'approve1',
-            finishTime:'2024-11-01',
-            a:'30%',
-            b:'40%',
-            files:[
-              {
-                type:'初稿文件',
-                file:{
-                  name:'xxxx.docx',
-                  guid:'',
-                  type:'docx',
-                }
-              },
-              {
-                type:'内部定稿文件',
-                file:{
-                  name:'xxxx.docx',
-                  guid:'',
-                  type:'docx',
-                }
-              },
-              {
-                type:'定稿文件',
-                file:{
-                  name:'xxxx.docx',
-                  guid:'',
-                  type:'docx',
-                }
-              },
-            ]
-        }
-      ],
+      searchValue:{},
+      tableData:[],
       queryParams:{
         size:10,
         current:1,
       },
       total:0,
-      column:tableColumn
+      column:tableColumn,
+      loading:false
     };
   },
   watch: {},
   computed: {},
   created() {},
   mounted() {
+    this.searchOption = this.SearchFields[0]
     this.getList()
   },
   methods: {
+    //预览
+    review(row){
+      var guid = row.fileGuid
+      if(!guid){
+        return
+      }
+      var type = ''
+      if(row.systemFile || row.systemFile.type){
+        type = row.systemFile.type
+      }
+      if(!type){
+        return
+      }
+      this.$commonJS.previewFile(
+        {
+          fileName:row.fileName
+        },
+        guid,
+        type
+      )
+    },
+    //下载
+    downLoad(row){
+      downLoad2(row.fileGuid,row.fileName)
+    },
+    //删除检索条件
+    handleCancelQueryParams(data){
+      var obj = this.SearchFields.find(item=>{
+        return item.value == data.value
+      })
+      if(!obj){
+        return
+      }
+      if(obj.fields && obj.fields.length){
+        obj.results = null
+        obj.fields.forEach(item=>{
+          delete item.result
+          delete this.searchValue[item.value]
+        })
+      }else{
+        delete obj.result
+        delete this.searchValue[obj.value]
+      }
+      this.queryParams.current = 1
+      this.getList()
+    },
+    //检索
+    search(){
+      if(!this.searchOption){
+        return
+      }
+      if(this.searchOption.fields && this.searchOption.fields.length){
+        var data = this.searchOption.fields
+        this.searchOption.results = []
+        data.forEach((item,index)=>{
+          if(item.result){
+            this.searchOption.results[index] = item.result
+            this.searchValue[item.value] = item.result
+          }else{
+            delete this.searchValue[item.value]
+          }
+        })
+        if(this.searchOption.results.length>0){
+          if(!this.searchOption.results[0]){
+            this.searchOption.results[0] = 0
+          }
+        }
+      }else{
+        if(this.searchOption.result === null || this.searchOption.result.trim()){
+            this.searchValue[this.searchOption.value] = this.searchOption.result.trim()
+          }else{
+            delete this.searchValue[this.searchOption.value]
+          }
+      }
+      this.queryParams.current = 1
+      this.getList()
+    },
     //查询数据
-    getList(){},
+    getList(){
+      var params = {
+        ...this.queryParams,
+        ...this.searchValue
+      }
+      this.loading = true
+      this.$api.selectCaseInfoList(params).then(response=>{//成功回调
+        if(response.code == 200){
+          this.loading  = false
+          this.tableData = response.data.data
+          this.total = response.data.total
+        }
+      }).catch(error=>{//失败回调
+        this.tableData = []
+        this.total = 0
+        this.loading  =false
+      })
+    },
     //切换页大小
     handleSizeChange(val){
       this.queryParams.size = val
@@ -201,14 +394,23 @@ export default {
     },
     //切换栏位
     getObject(val){
+      this.searchOption = this.SearchFields.find(item=>{
+        return item.value == val
+      })
     },
     //查看差异详情
     checkDifferenceDetails(row,fieldObj){
+      var field = fieldObj.value
+      var types = {
+        firstDiffRate:'firstDiscrepancyId',
+        secondDiffRate:'secondDiscrepancyId'
+      }
       const router = this.$router.resolve(
         {
           path:'/differenceDetails',
           query:{
-
+            id:row[types[field]],
+            type:field
           }
         }
       )
@@ -230,9 +432,27 @@ export default {
   padding: 0 !important;
 }
 
-.cursor:hover{
+.cursor:hover,.cursor1:hover{
   &>span{
     display: inline-block !important;
   }
 }
+.option {
+  width: 100px;
+  margin-right: 0;
+}
+.main {
+  padding: 0 !important;
+  height: 250px;
+  overflow-y: auto;
+
+  .box {
+    margin-top: 10px;
+
+    .content {
+      line-height: 30px;
+      font-size: 14px;
+    }
+  }
+}
 </style>

+ 91 - 0
file-contrast/src/views/components/view/checkFile.vue

@@ -0,0 +1,91 @@
+<template>
+    <div class="height_100">
+        <div class="header">
+            <div style="color:black">{{ fileName }}</div>
+            <div>
+                <el-link style="font-size: 16px" @click="downLoadFile"><i class="fa el-icon-download"></i><span style="margin-left:10px">下载</span></el-link>
+            </div>
+        </div>
+        <div style="display:flex;justify-content: center;height: calc(100% - 30px);">
+            <div v-if="isPicture == 0"  v-loading="loadLoading" style="width:100%;height:100%">
+                <iframe id="checkIframe" :src="FileUrl" frameborder="0" width="100%" :height="height"></iframe>
+            </div>
+            <el-image fit="contain" v-else :src="FileUrl" width="100%" :preview-src-list="srcList"></el-image>
+        </div>
+        
+    </div>
+</template>
+<script>
+import { downLoad2 } from '@/utils'
+export default {
+    data() {
+        return {
+            loadLoading:true,
+            // FileName:'',
+            height:document.documentElement.clientHeight - 100,
+            // srcList:[],
+        }
+    },
+    computed:{
+        // row(){
+        //     return JSON.parse(this.$route.query.row);
+        // },
+        FileUrl(){
+            return this.$route.query.FileUrl
+        },
+        isPicture(){
+            return this.$route.query.isPicture || 0
+        },
+        fileName(){
+            return this.$route.query.fileName
+        },
+        guid(){
+            return this.$route.query.guid
+        }
+    },
+    mounted(){
+            var that = this
+            this.$nextTick(()=>{
+                var a = document.getElementById('checkIframe')
+                a.onload = function() {
+                    that.loadLoading = false
+                };
+                if(a.contentDocument && a.contentDocument.readyState && a.contentDocument.readyState == 'complete'){
+                    that.loadLoading = false
+                }
+            })
+        
+    },
+  methods: {
+    downLoadFile(){ 
+        var href = ''
+        href =  this.$commonJS.checkViewer(this.guid)
+        const anchor = document.createElement('a');
+        const fileName = 'download';
+        if ('download' in anchor) {
+          anchor.href = href;
+          anchor.setAttribute("download", fileName);
+          anchor.className = "download-js-link";
+          anchor.innerHTML = "downloading...";
+          anchor.style.display = "none";
+          document.body.appendChild(anchor);
+          setTimeout(function () {
+            anchor.click();
+            document.body.removeChild(anchor);
+          }, 66);
+          return true;
+        }
+    },
+      
+
+    },
+}
+</script>
+<style lang="scss" scoped>
+    .header{
+        padding: 0 20px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+    }
+</style>

+ 135 - 57
file-contrast/src/views/differenceDetails/components/differenceDetails.vue

@@ -2,33 +2,33 @@
   <div class="caseList height_100">
     <el-container>
       <el-header style="height:30px;padding:0 20px !important;color:black;font-weight:bold;font-size:20px;">
-        差异详情
+        {{contrastType[type]}}差异详情
       </el-header>
         <el-main class="height_100" style="padding:15px 50px !important">
             <div class="caseInformation">
                 <el-row :gutter="20">
                     <el-col :span="3">案号:</el-col>
-                    <el-col :span="5">{{caseInformation.caseNo}}</el-col>
+                    <el-col :span="5"><div>{{caseInformation.caseNo}}</div></el-col>
                     <el-col :span="3">标题:</el-col>
                     <el-col :span="5">{{caseInformation.title}}</el-col>
                     <el-col :span="3">客户:</el-col>
-                    <el-col :span="5">{{caseInformation.client}}</el-col>
+                    <el-col :span="5">{{caseInformation.customer}}</el-col>
                 </el-row>
                 <el-row :gutter="20">
                     <el-col :span="3">撰写人:</el-col>
-                    <el-col :span="5">{{caseInformation.writePerson}}</el-col>
+                    <el-col :span="5"><div>{{caseInformation.writer || ''}}</div></el-col>
                     <el-col :span="3">审核人:</el-col>
-                    <el-col :span="5">{{caseInformation.examinePerson}}</el-col>
+                    <el-col :span="5">{{caseInformation.auditor}}</el-col>
                     <el-col :span="3">完成日期:</el-col>
-                    <el-col :span="5">{{caseInformation.finishTime}}</el-col>
+                    <el-col :span="5">{{caseInformation.completionDate}}</el-col>
                 </el-row>
                 <el-row :gutter="20">
                     <el-col :span="3">原文件:</el-col>
-                    <el-col :span="21">{{caseInformation.originalFile.name}}</el-col>
+                    <el-col :span="21">{{caseInformation.caseFileName1}}</el-col>
                 </el-row>
                 <el-row :gutter="20">
                     <el-col :span="3">对比文件:</el-col>
-                    <el-col :span="21">{{caseInformation.contrastFile.name}}</el-col>
+                    <el-col :span="21">{{caseInformation.caseFileName2}}</el-col>
                 </el-row>
             </div>
             <div>
@@ -41,7 +41,7 @@
                     </el-table-column>
                     <el-table-column v-for="item in tableField" :key="item.value" :prop="item.value" :render-header=" $commonJS.renderHeaderMethods" :label="item.label" :sortable="item.ifSort?'custom':false" align="center">
                         <template slot-scope="scope">
-                            <span>{{ tableDatas[scope.row.value][item.value] }}</span>
+                            <span v-if="tableDatas[item.value]">{{ tableDatas[item.value][scope.row.value] }}</span>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -51,6 +51,9 @@
                     <el-radio-group v-model="radio">
                         <el-radio v-for="item in tableField" :key="item.value" :label="item.value">{{item.contrast}}</el-radio>
                     </el-radio-group>
+                    <div v-html="getHtml()">
+                        
+                    </div>
                 </p>
             </div>
         </el-main>
@@ -61,10 +64,17 @@
 <script>
 export default {
   components: {},
-  props: {},
+  props: {
+    id:'',
+    type:''
+  },
   data() {
     return {
-        radio:'',
+        contrastType:{
+            firstDiffRate:'初稿与内部定稿',
+            secondDiffRate:'内部定稿与定稿'
+        },
+        radio:'all',
         caseInformation:{
             caseNo:'su2345',
             title:'su1',
@@ -86,57 +96,26 @@ export default {
         tableData:[
             {
                 label:'原文字数',
-                value:'originalWordCount'
-            },
-            {
-                label:'修改位置处数',
-                value:'changePositions'
+                value:'totalWorldCount'
             },
             {
                 label:'插入字数',
-                value:'insertWordCount'
+                value:'editWorldCount'
             },
             {
                 label:'删除字数',
-                value:'deleteWordCount'
+                value:'delWorldCount'
             },
             {
-                label:'差异度',
-                value:'differenceDegree'
-            },
-        ],
-        tableDatas:{
-            originalWordCount:{
-                all:'11050',
-                abstract:'300',
-                claim:'1200',
-                instructions:'9687'
-            },
-            changePositions:{
-                all:'40',
-                abstract:'15',
-                claim:'86',
-                instructions:'53'
+                label:'修改比例',
+                value:'rate'
             },
-            insertWordCount:{
-                all:'26',
-                abstract:'12',
-                claim:'25',
-                instructions:'21'
-            },
-            deleteWordCount:{
-                all:'12',
-                abstract:'8',
-                claim:'47',
-                instructions:'32'
-            },
-            differenceDegree:{
-                all:'17.0010%',
-                abstract:'8.5600%',
-                claim:'13.2650%',
-                instructions:'19.5605%'
+            {
+                label:'语义相似度',
+                value:'similarity'
             },
-        },
+        ],
+        tableDatas:{},
         tableField:[
             {
                 label:'全部文本',
@@ -158,30 +137,129 @@ export default {
                 contrast:'说明书',
                 value:'instructions'
             },
-        ]
+        ],
+        queryParams:{
+            "discrepancyId":this.id
+        }
+        
     };
   },
-  watch: {},
+  watch: {
+    id(){
+        this.queryParams.discrepancyId = this.id
+        this.getCaseInformation()
+    }
+  },
   computed: {},
   created() {},
   mounted() {
     this.getCaseInformation()
-    this.getContrastResult()
   },
   methods: {
+    //获取差异全文
+    getHtml(){
+        if(!this.radio){
+            return ''
+        }
+        var obj = this.tableDatas[this.radio]
+        if(obj){
+            return obj.diffContent
+        }
+        return '';
+    },
     //获取案件信息
     getCaseInformation(){
-        
+        console.log(this.queryParams)
+        var params = {
+            ...this.queryParams
+        }
+        this.loading = true
+        this.$api.selectDiscrepancy(params).then(response=>{//成功回调
+        if(response.code == 200){
+          this.loading  = false
+          this.caseInformation = response.data
+          this.getContrastResult()
+        }
+        }).catch(error=>{//失败回调
+            this.caseInformation = {}
+            this.loading  =false
+        })
     },
     //获取对比结果
-    getContrastResult(){},
+    getContrastResult(){
+        var data = this.caseInformation.discrepancyDetails
+        if(!data || data.length == 0){
+            this.tableDatas = {}
+            return
+        }
+        //数据分组
+        var diffTypes = {
+            1:'all',
+            2:'abstract',
+            3:'claim',
+            4:'instructions'
+        }
+        var obj = {}
+        data.forEach(item => {
+            var field = diffTypes[item.diffType]
+            if(!field){
+                return
+            }
+            var percentField = ['rate','similarity']
+            percentField.forEach(i=>{
+                if(item[i]){
+                    var num = item[i] * 100
+                    num = num.toFixed(4)
+                    item[i] = num + '%'
+                }
+            })
+            obj[field] = item
+        });
+        this.tableDatas = obj
+    },
   },
 };
 </script>
+<style lang="scss">
+.caseInformation{
+    .el-row{
+        width: calc(100% - 20px);
+        margin: 15px 0;
+        display: flex;
+        align-items: stretch;
+    }
+    .el-col{
+        line-height: 30px;
+        border: 1px solid rgb(216, 216, 216);
+    }
+    .el-col:nth-child(odd){
+        max-width:150px;
+        min-width:150px;
+        width:150px;
+        background-color: #e2e1e4;
+        color: #fff;
+        text-align: right;
+        border-radius: 5px 0 0 5px;
+        border-right: 0;
+        margin-left:20px;
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+    }
+    .el-col:nth-child(even){
+        text-align: left;
+        border-radius: 0 5px 5px 0;
+        border-left: 0;
+        display: flex;
+        align-items: center;
+    }
+} 
+</style>
 <style lang="scss" scoped>
 .caseInformation{
     &>*{
         margin: 15px 0;
+        width: 100%;
     }
 }
 </style>

+ 10 - 2
file-contrast/src/views/differenceDetails/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="height_100">
-    <differenceDetails></differenceDetails>
+    <differenceDetails :id="id" :type="type"></differenceDetails>
   </div>
 </template>
 
@@ -13,10 +13,18 @@ export default {
   props: {},
   data() {
     return {
+      
     };
   },
   watch: {},
-  computed: {},
+  computed: {
+    id(){
+        return this.$route.query.id
+      },
+      type(){
+        return this.$route.query.type
+      },
+  },
   created() {},
   mounted() {},
   methods: {},

+ 11 - 3
file-contrast/vue.config.js

@@ -92,14 +92,22 @@ module.exports = {
     //   errors: false
     // },
     proxy: {
-      '/permission': {
+      '/xiaoshi': {
         // target: 'http://192.168.0.57:8879',
-        target: 'http://192.168.1.24:8871',
+        target: 'http://192.168.2.110:8090',
+        ws: true,
+        changeOrigin: true,
+        // pathRewrite:{
+        //   '/api':''
+        // }
+      },
+      '/fileManager': {
+        target: 'http://192.168.2.110:8803',
         ws: true,
         changeOrigin: true,
         pathRewrite:{
           '/api':''
-        }
+      }
       },
     }
   }