Bläddra i källkod

申请人文件上传接口调试及详情展示

Your Name 2 år sedan
förälder
incheckning
269a2ee1a2

+ 5
- 18
src/views/caseManagement/caseList.vue Visa fil

126
         class-name="small-padding fixed-width"
126
         class-name="small-padding fixed-width"
127
       >
127
       >
128
         <template slot-scope="scope">
128
         <template slot-scope="scope">
129
-          <!-- <el-button
130
-            size="mini"
131
-            type="text"
132
-            icon="el-icon-check"
133
-            @click="onsubmitRow(scope.row)"
134
-            v-hasPermi="['monitor:online:forceLogout']"
135
-            >提交</el-button
136
-          > -->
137
           <el-button
129
           <el-button
138
             size="mini"
130
             size="mini"
139
             type="text"
131
             type="text"
154
           <el-button
146
           <el-button
155
             size="mini"
147
             size="mini"
156
             type="text"
148
             type="text"
157
-            icon="el-icon-edit"
149
+            icon="el-icon-check"
158
             @click="onsubmitRow(scope.row)"
150
             @click="onsubmitRow(scope.row)"
159
             v-if="scope.row.caseStatus == 0"
151
             v-if="scope.row.caseStatus == 0"
160
             v-hasPermi="['monitor:online:forceLogout']"
152
             v-hasPermi="['monitor:online:forceLogout']"
178
             v-hasPermi="['monitor:online:forceLogout']"
170
             v-hasPermi="['monitor:online:forceLogout']"
179
             >立案审查</el-button
171
             >立案审查</el-button
180
           >
172
           >
181
-          <!-- <el-popconfirm title="是否进行缴费" @confirm="payStatus(scope.row)"> -->
182
           <el-button
173
           <el-button
183
             size="mini"
174
             size="mini"
184
             type="text"
175
             type="text"
188
             v-hasPermi="['monitor:online:forceLogout']"
179
             v-hasPermi="['monitor:online:forceLogout']"
189
             >缴费</el-button
180
             >缴费</el-button
190
           >
181
           >
191
-          <!-- </el-popconfirm> -->
192
 
182
 
193
           <!-- <el-button
183
           <!-- <el-button
194
             size="mini"
184
             size="mini"
281
       :dialogtitle="dialogtitle"
271
       :dialogtitle="dialogtitle"
282
       :getcaseApply="getcaseApply"
272
       :getcaseApply="getcaseApply"
283
       :flag="flag"
273
       :flag="flag"
274
+      :caseAttachList="caseAttachList"
284
       :initpaymentArr="initpaymentArr"
275
       :initpaymentArr="initpaymentArr"
285
       :initpaymentArr1="initpaymentArr1"
276
       :initpaymentArr1="initpaymentArr1"
286
     ></caseentryDialog>
277
     ></caseentryDialog>
427
       openPay: false, //缴费弹框
418
       openPay: false, //缴费弹框
428
       payTitle: "",
419
       payTitle: "",
429
       payForm: {},
420
       payForm: {},
421
+      caseAttachList: [], //案件质证资料
430
     };
422
     };
431
   },
423
   },
432
   created() {
424
   created() {
553
     // 是否进行缴费
545
     // 是否进行缴费
554
     payStatus(val) {
546
     payStatus(val) {
555
       this.getDetail({ id: val.id });
547
       this.getDetail({ id: val.id });
556
-      this.payTitle = "缴费";
557
-      this.$modal
558
-        .confirm("是否进行缴费?")
559
-        .then()
560
-        .then(() => {
548
+      // this.payTitle = "缴费";
561
           this.openPay = true;
549
           this.openPay = true;
562
-        })
563
-        .catch(() => {});
564
     },
550
     },
565
     getDetail(parms) {
551
     getDetail(parms) {
566
       caseApplicationDetail(parms).then((res) => {
552
       caseApplicationDetail(parms).then((res) => {
670
             this.initpaymentArr1.push(item);
656
             this.initpaymentArr1.push(item);
671
           }
657
           }
672
         });
658
         });
659
+        this.caseAttachList = res.data.caseAttachList
673
       });
660
       });
674
     },
661
     },
675
     // 删除
662
     // 删除

+ 64
- 23
src/views/caseManagement/components/caseentryDialog.vue Visa fil

112
             <el-form-item
112
             <el-form-item
113
               label="申请人案件证据资料上传:"
113
               label="申请人案件证据资料上传:"
114
               prop="applicantEvidence"
114
               prop="applicantEvidence"
115
+              v-if="flag !== '0'"
115
             >
116
             >
116
               <el-upload
117
               <el-upload
117
                 class="upload-demo"
118
                 class="upload-demo"
118
-                action="https://jsonplaceholder.typicode.com/posts/"
119
-                :on-preview="handlePreview"
120
-                :on-remove="handleRemove"
119
+                ref="fileupload"
120
+                :action="UploadUrl()"
121
+                :on-success="handlSuccess"
121
                 :before-remove="beforeRemove"
122
                 :before-remove="beforeRemove"
123
+                :data="filedata"
124
+                :headers="headers"
122
                 multiple
125
                 multiple
123
                 :limit="3"
126
                 :limit="3"
124
                 :on-exceed="handleExceed"
127
                 :on-exceed="handleExceed"
126
               >
129
               >
127
                 <el-button size="small" type="primary">点击上传</el-button>
130
                 <el-button size="small" type="primary">点击上传</el-button>
128
                 <div slot="tip" class="el-upload__tip">
131
                 <div slot="tip" class="el-upload__tip">
129
-                  只能上传jpg/png文件,且不超过500kb
132
+                  文件支持上传jpg/png、.doc/docx、pdf文件
130
                 </div>
133
                 </div>
131
               </el-upload>
134
               </el-upload>
132
             </el-form-item>
135
             </el-form-item>
133
           </el-col>
136
           </el-col>
134
-          <!-- 仅详情展示 -->
135
-          <!-- <el-col :span="12">
137
+          <el-col :span="12">
138
+            <el-form-item
139
+              label="申请人案件证据资料:"
140
+              v-if="flag == '0' && caseAttachList.length > 0"
141
+            >
142
+              <a href=""></a>
143
+            </el-form-item>
144
+          </el-col>
145
+          <!-- 仅详情展示 案件质证环节以后显示被申请人证据-->
146
+          <el-col :span="12">
136
             <el-form-item
147
             <el-form-item
137
-              label="被申请人案件证据资料上传:"
148
+              label="被申请人案件证据资料:"
138
               prop="respondentEvidence"
149
               prop="respondentEvidence"
150
+              v-if="flag == '0' && caseAttachList.length > 0"
139
             >
151
             >
140
-              <el-upload
152
+              <a href="#" @click="toFile" style="color: blue">{{
153
+                caseAttachList[0].annexName
154
+              }}</a>
155
+              <!-- <el-upload
141
                 class="upload-demo"
156
                 class="upload-demo"
142
                 action="https://jsonplaceholder.typicode.com/posts/"
157
                 action="https://jsonplaceholder.typicode.com/posts/"
143
                 :on-preview="handlePreview"
158
                 :on-preview="handlePreview"
152
                 <div slot="tip" class="el-upload__tip">
167
                 <div slot="tip" class="el-upload__tip">
153
                   只能上传jpg/png文件,且不超过500kb
168
                   只能上传jpg/png文件,且不超过500kb
154
                 </div>
169
                 </div>
155
-              </el-upload>
170
+              </el-upload> -->
156
             </el-form-item>
171
             </el-form-item>
157
-          </el-col> -->
172
+          </el-col>
158
         </el-row>
173
         </el-row>
159
       </el-form>
174
       </el-form>
160
       <!-- 申请人主体信息 -->
175
       <!-- 申请人主体信息 -->
602
 
617
 
603
 <script>
618
 <script>
604
 import moment from "moment"; //导入文件
619
 import moment from "moment"; //导入文件
620
+import { getToken } from "@/utils/auth";
605
 import { addCaseApply, editCaseApply } from "@/api/caseAccess/caseEntry";
621
 import { addCaseApply, editCaseApply } from "@/api/caseAccess/caseEntry";
606
 export default {
622
 export default {
607
   props: [
623
   props: [
613
     "initpaymentArr",
629
     "initpaymentArr",
614
     "initpaymentArr1",
630
     "initpaymentArr1",
615
     "queryParams",
631
     "queryParams",
632
+    "caseAttachList",
616
   ],
633
   ],
617
   data() {
634
   data() {
618
     return {
635
     return {
619
       formData: this.form,
636
       formData: this.form,
637
+      filedata: {
638
+        annexType: 2,
639
+      },
640
+      headers: {
641
+        Authorization: "Bearer " + getToken(),
642
+      },
620
       form2: {
643
       form2: {
621
         paymentArr: [
644
         paymentArr: [
622
           {
645
           {
789
     },
812
     },
790
   },
813
   },
791
   methods: {
814
   methods: {
792
-    handleRemove(file, fileList) {console.log('文件列表移除文件时的钩子');},
793
-    handlePreview(file) {console.log('点击文件列表中已上传的文件时的钩子');},
815
+    UploadUrl() {
816
+      return window.location.origin + "/API/evidence/upload";
817
+    },
818
+    // 文件上传成功
819
+    handlSuccess(res, file) {
820
+      console.log(res, file);
821
+    },
794
     // 文件超出个数限制时的钩子
822
     // 文件超出个数限制时的钩子
795
     handleExceed(files, fileList) {
823
     handleExceed(files, fileList) {
796
       this.$message.warning(
824
       this.$message.warning(
809
     },
837
     },
810
     // 校验借款开始日期与结束日期
838
     // 校验借款开始日期与结束日期
811
     setStartTime() {
839
     setStartTime() {
812
-      if ( this.setTime(this.formData.loanStartDate) >= this.setTime(this.formData.loanEndDate) ) {
813
-        this.$message.error('借款开始日期应早于借款结束日期');
814
-        this.formData.loanStartDate = '';
815
-        this.formData.loanEndDate = '';
840
+      if (
841
+        this.setTime(this.formData.loanStartDate) >=
842
+        this.setTime(this.formData.loanEndDate)
843
+      ) {
844
+        this.$message.error("借款开始日期应早于借款结束日期");
845
+        this.formData.loanStartDate = "";
846
+        this.formData.loanEndDate = "";
816
       }
847
       }
817
     },
848
     },
818
     setEndTime() {
849
     setEndTime() {
819
-      if ( this.setTime(this.formData.loanEndDate) <= this.setTime(this.formData.loanStartDate) ) {
820
-        this.$message.error('借款结束日期应晚于借款开始日期');
821
-        this.formData.loanStartDate = '';
822
-        this.formData.loanEndDate = '';
850
+      if (
851
+        this.setTime(this.formData.loanEndDate) <=
852
+        this.setTime(this.formData.loanStartDate)
853
+      ) {
854
+        this.$message.error("借款结束日期应晚于借款开始日期");
855
+        this.formData.loanStartDate = "";
856
+        this.formData.loanEndDate = "";
823
       }
857
       }
824
     },
858
     },
825
     setTime(val) {
859
     setTime(val) {
826
-      const date = new Date(val)
827
-      const time = date.getTime()
828
-      return time
860
+      const date = new Date(val);
861
+      const time = date.getTime();
862
+      return time;
829
     },
863
     },
830
 
864
 
831
     // 新增申请人主体信息
865
     // 新增申请人主体信息
914
         }
948
         }
915
       });
949
       });
916
     },
950
     },
951
+    // 详情显示,展示案件文件
952
+    toFile() {
953
+      window.open(
954
+        window.location.origin + "/API" + this.caseAttachList[0].annexPath,
955
+        "_black"
956
+      );
957
+    },
917
   },
958
   },
918
 };
959
 };
919
 </script>
960
 </script>