From 9ca0e9dc50759f4c00498e68c0155bcc3db2be2f Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期二, 27 十二月 2022 15:20:02 +0800
Subject: [PATCH] 页面修改

---
 src/views/cause/Entry.vue |   75 +++++++++++++++++++++++--------------
 1 files changed, 47 insertions(+), 28 deletions(-)

diff --git a/src/views/cause/Entry.vue b/src/views/cause/Entry.vue
index c7dd612..32074a5 100644
--- a/src/views/cause/Entry.vue
+++ b/src/views/cause/Entry.vue
@@ -35,7 +35,7 @@
           </el-table-column>
           <el-table-column prop="reportNumber" label="鎶ユ浜烘暟" width="100" header-align="center" align="center">
           </el-table-column>
-             <el-table-column prop="totalMoney" label="棰勪及鎬婚噾棰�" width="100" header-align="center" align="center">
+          <el-table-column prop="totalMoney" label="棰勪及鎬婚噾棰�" width="100" header-align="center" align="center">
           </el-table-column>
           <el-table-column prop="firstTime" label="鏈�鏃╁彂妗堟棩鏈�" width="160" header-align="center" align="center">
           </el-table-column>
@@ -83,9 +83,10 @@
               </el-input>
             </el-form-item>
           </el-col>
-           <el-col :span="12">
+          <el-col :span="12">
             <el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney">
-              <el-input v-model="causeForm.totalMoney" clearable :style="{ width: '100%' }" placeholder="杈撳叆棰勪及鎬婚噾棰�"></el-input>
+              <el-input v-model="causeForm.totalMoney" clearable :style="{ width: '100%' }"
+                placeholder="杈撳叆棰勪及鎬婚噾棰�"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -111,7 +112,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          
+
           <el-col :span="24">
             <el-form-item label="妗堜欢鎻忚堪" prop="description">
               <el-input v-model="causeForm.description" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�"
@@ -143,7 +144,7 @@
               </el-input>
             </el-form-item>
           </el-col>
-             <el-col :span="12">
+          <el-col :span="12">
             <el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney">
               <el-input v-model="updataCauseForm.totalMoney" clearable :style="{ width: '100%' }"></el-input>
             </el-form-item>
@@ -261,7 +262,8 @@
             </el-table-column>
             <el-table-column width="100" prop="reportMaterials" label="鎶ユ鏉愭枡">
               <template slot-scope="scope">
-                <span>{{ scope.row.reportMaterials === null||scope.row.reportMaterials === '' ? "鏈彁浜�" : "宸叉彁浜�" }}</span>
+                <span>{{ scope.row.reportMaterials === null || scope.row.reportMaterials === '' ? "鏈彁浜�" : "宸叉彁浜�"
+}}</span>
               </template>
             </el-table-column>
             <el-table-column width="200" prop="ctime" label="鎶ユ鏃堕棿">
@@ -289,15 +291,15 @@
           :before-close="addReportVisibleClose">
           <el-row :gutter="15">
             <el-form ref="auditFrom" :model="auditFrom" :rules="addReportRules" size="medium" label-width="100px">
-              <!-- <el-col :span="12">
-            <el-form-item label="澶村儚" prop="pic" required>
-              <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess"
-                         list-type="picture-card" accept="image/*">
-                <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
-                <i v-else class="el-icon-plus"></i>
-              </el-upload>
-            </el-form-item>
-          </el-col> -->
+              <el-col :span="12">
+                <el-form-item label="澶村儚" prop="pic" required>
+                  <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false"
+                    :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*">
+                    <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px">
+                    <i v-else class="el-icon-plus"></i>
+                  </el-upload>
+                </el-form-item>
+              </el-col>
               <el-col :span="12">
                 <el-form-item label="鎶ユ浜� " prop="reporterName">
                   <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
@@ -362,24 +364,35 @@
           :before-close="updateReportVisibleclose">
           <el-row :gutter="20">
             <el-form ref="updateReportForm" :model="updateReportForm" size="medium" label-width="100px">
-              <!-- <el-col :span="12">
+              <el-col :span="12">
+                <el-form-item label="澶村儚" prop="pic" required>
+                  <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false"
+                    :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*">
+                    <img v-if="updateReportForm.pic!=null||updateReportForm!=''" :src="updateReportForm.pic" style="width: 145px;height: 145px">
+                    <i v-else class="el-icon-plus"></i>
+                  </el-upload>
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="12">
                 <el-form-item label="鎶ユ浜� " prop="reporterName">
-                  <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
+                  <el-input v-model="updateReportForm.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }">
                   </el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="鎵嬫満鍙风爜" prop="mobile">
-                  <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }">
+                  <el-input v-model="updateReportForm.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }">
                   </el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="韬唤璇佸彿" prop="idcard">
-                  <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }">
+                  <el-input v-model="updateReportForm.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }">
                   </el-input>
                 </el-form-item>
-              </el-col> -->
+              </el-col>
+              
               <el-col :span="12">
                 <el-form-item prop="reportTime" label="鎶ユ鏃堕棿">
                   <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
@@ -420,8 +433,7 @@
                   </el-upload>
                 </el-form-item>
               </el-col>
-              <!-- 
-   <el-col :span="24">
+              <!-- <el-col :span="24">
                 <el-form-item label="涓婁紶" prop="fileList" required>
                   <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload"
                     list-type="picture" :on-success="handleMaterialSuccess">
@@ -591,9 +603,9 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="鐘舵��" prop="status">
-                    <span v-if="detailsGroupAn.status === 1">宸插彂甯�</span>
-                    <span v-else-if="detailsGroupAn.status === 0">鏈彂甯�</span>
-                    <span v-else="detailsGroupAn.status === 2">宸蹭笅鏋�</span>
+                  <span v-if="detailsGroupAn.status === 1">宸插彂甯�</span>
+                  <span v-else-if="detailsGroupAn.status === 0">鏈彂甯�</span>
+                  <span v-else="detailsGroupAn.status === 2">宸蹭笅鏋�</span>
                 </el-form-item>
               </el-col>
             </el-form>
@@ -729,6 +741,7 @@
         size: 10,
       },
       auditFrom: {
+        pic: '',
         reporterName: '',
         mobile: '',
         idcard: '',
@@ -824,7 +837,7 @@
           message: '璇烽�夋嫨妗堜欢鐘舵�� ',
           trigger: 'blur'
         }],
-          totalMoney: [{
+        totalMoney: [{
           required: true,
           message: '璇疯緭鍏ラ浼版�婚噾棰� ',
           trigger: 'blur'
@@ -890,6 +903,7 @@
       }
       ],
       updateReportForm: {
+        pic: '',
         reporterName: '',
         mobile: '',
         idcard: '',
@@ -905,6 +919,7 @@
       //妗堜欢浜哄憳琛ㄦ牸鏁版嵁
       updateReportPrams: {
         id: '',
+        pic:'',
         reporterName: '',
         mobile: '',
         idcard: '',
@@ -930,6 +945,7 @@
       },
       updataCauseForm: {
         id: '',
+        pic:'',
         name: '',
         number: '',
         firstTime: '',
@@ -1214,6 +1230,8 @@
       this.updateReportPrams.groupId = this.updateReportForm.groupId
       this.updateReportPrams.id = this.updateReportForm.id
       this.updateReportPrams.reportMaterials = this.updateReportPrams.fileList.map(i => i.data).join(',')
+      debugger
+      this.updateReportPrams.pic=this.updateReportForm.pic
       let form = null;
       form = this.updateReportPrams;
       const data = form;
@@ -1231,6 +1249,7 @@
 
     //缂栬緫妗堜欢浜哄憳
     updataReport(val) {
+      debugger
       this.updateReportVisible = true;
       this.updateReportForm = Object.assign({}, val);
       this.causeId = val.causeId;
@@ -1274,7 +1293,7 @@
         if (!vaild) return this.$message.error('杈撳叆鏈夎')
         this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',');
         this.auditFrom.causeId = this.reportCauseId;
-        console.log(this.reportCauseId);
+        // console.log(this.reportCauseId);
         report(this.auditFrom).then(res => {
           this.$message.success('鎻愪氦鎴愬姛')
           this.auditFrom = {}
@@ -1292,9 +1311,9 @@
     },
     handleAvatarSuccess(res, file) {
       this.auditFrom.pic = res.data
-
       getImgUrl(res.data).then(res => {
         this.picShow = res
+        this.updateReportForm.pic = res
       })
     },
     async handleMaterialSuccess(res, file) {

--
Gitblit v1.8.0