Quellcode durchsuchen

修改无效证据重复出现问题

zhuliu vor 2 Jahren
Ursprung
Commit
1dc6802f0e

+ 5 - 4
RMS-FrontEnd/src/views/report/InvalidResponse/components/InvalidDetails/InvalidDetails.vue

@@ -9,10 +9,13 @@
                 <i class="iconfont icon-yanjing_yincang" v-else @click="changeShow(item)" style="font-size:20px"></i>
               </span>
             </p>
+            <div v-if="!item.show" style="margin-bottom:10px">
+              <Table :tableData="item.proofDetails" @submit="submitInvalid"  v-bind="$attrs" v-on="$listeners" :proofs="item.proofs" :proofGroup="item"></Table>
+            </div>
             <div style="display:flex;align-items:center;" v-if="!item.show">
               <p style="min-width:80px !important">陈述意见:</p>
                 <div  v-if="!item.editArgumentStr" style="display:flex;align-items:center">
-                  <div v-html="item.argumentStr" class="div_MAX_Height" ></div><span @click="editArgumentStr(item)"><el-link type="primary"><i class="iconfont icon-bianji" style="font-size:28px"></i></el-link></span>
+                  <div v-html="item.argumentStr" class="div_MAX_Height" style="border:1px solid #DCDFE6"></div><span @click="editArgumentStr(item)"><el-link type="primary"><i class="iconfont icon-bianji" style="font-size:28px"></i></el-link></span>
                 </div>
                 <div v-else style="width:100%;display:flex;align-items:center">
                   <myRich-Text style="width:100%" v-model="item.argumentStr" placeholder="请输入陈述意见"></myRich-Text>
@@ -22,9 +25,7 @@
                 </div>
             </div>
         </div>
-        <div v-if="!item.show">
-          <Table :tableData="item.proofDetails" @submit="submitInvalid"  v-bind="$attrs" v-on="$listeners" :proofs="item.proofs" :proofGroup="item"></Table>
-        </div>
+        
     </div>
   </div>
 </template>

+ 20 - 12
RMS-FrontEnd/src/views/report/InvalidResponse/components/InvalidIndex.vue

@@ -9,17 +9,17 @@
       <el-button type="primary" size="small" @click="exportInvalid" :loading="btnLoading">导出无效理由</el-button>
     </div>
     
-    <el-table border ref="table" v-if="refreshData" :data="tableData" row-key="pId" :expand-row-keys="expands" :span-method="objectSpanMethod" :maxHeight="tableHeight">
+    <el-table border ref="table" v-if="refreshData" :data="tableData" v-loading="tableLoading" row-key="pId" :expand-row-keys="expands" :span-method="objectSpanMethod" :maxHeight="tableHeight">
       <el-table-column prop="id" label="序号" align="center" width="80px">
         <template slot-scope="scope">
           <div>
-            {{ scope.$index + 1 }}
+            {{ scope.row.index }}
           </div>
         </template>
       </el-table-column>
       <el-table-column v-for="item in tableField.filter(item => !item.hidden)"  :key="item.key" :label="item.name" :prop="['court','argumentStr'].indexOf(item.key)!=-1?'id':item.key" align="center" type>
         <template slot-scope="scope">
-            <div v-if="item.key == 'proofStr'" style="margin-right: 10px;">
+            <div v-if="item.key == 'proofStr'"  class="div_MAX_Height">
               <!-- <span v-if="scope.row.proofGroups.length > 0">
                 <p v-for="(i, index) in scope.row.proofGroups" :key="index">
                   <span v-for="(y, index1) in i.proofs" :key="y.label">
@@ -55,13 +55,12 @@
                   </span>
                 </p>
               </span>
-              <span>
+              <span v-else>
                 {{ scope.row[item.key] }}
               </span>
 
               <div style="position: relative;">
-                <span >{{ getData(scope.row,item.key) }} </span>
-                <span style="margin-left:40px;position:absolute;right:-10px;bottom: 15px;" v-if="![0,1].includes(scope.row.invalidName)"> 
+                <span style="margin-left:40px;position:absolute;right:10px;bottom: 15px;" v-if="![0,1].includes(scope.row.invalidName)"> 
                   <i v-if="!scope.row.iconShow" class="iconfont icon-yanjing_yincang" @click="toogleExpand(scope.row,scope.$index)"></i>
                   <i v-else class="iconfont icon-yanjing_xianshi" @click="toogleExpand(scope.row,scope.$index)"></i>
                 </span>
@@ -318,6 +317,7 @@ export default {
     }
     return {
       btnLoading:false,
+      tableLoading:false,
       expands:[],
       description: '',
       argumentStr: '',
@@ -348,11 +348,11 @@ export default {
           name: '相关证据',
           hidden: false
         },
-        {
-          key: 'argument_str',
-          name: '证据组合陈述意见',
-          hidden: false
-        },
+        // {
+        //   key: 'argument_str',
+        //   name: '证据组合陈述意见',
+        //   hidden: false
+        // },
         {
           key: 'argumentStr',
           name: '陈述意见',
@@ -594,6 +594,7 @@ export default {
     },
     // 请求无效理由和证据
    async getInvalidReason() {
+    this.tableLoading = true
       await this.$api.queryInvalidReason({reportId:this.reportId}).then((res) => {
         if (res.code == 200) {
           if(res.data){
@@ -617,32 +618,39 @@ export default {
             this.tableData = []
           }
           this.expands = []
+          this.tableLoading = false
           this.getSpanArr(this.tableData) 
         }
+      }).catch(error=>{
+        this.tableLoading = false
+        this.tableData=[]
       })
     },
     // 处理数据
     get(data) {
       var arr = []
       var i = 1
-      data.forEach(item => {
+      data.forEach((item,index) => {
         if (![0, 1].includes(item.invalidName)) {
           if (item.proofGroups && item.proofGroups.length > 1) {
             item.proofGroups.forEach(item1 => {
               var s = JSON.parse(JSON.stringify(item))
               s.pId = i
               i++
+              s.index = index+1
               s.proofGroups = [item1]
               arr.push(s)
             })
           } else {
             item.pId = i
             i++
+            item.index = index+1
             arr.push(item)
           }
         } else {
           item.pId = i
           i++
+          item.index = index+1
           arr.push(item)
         }
       })