From fcb6cfdbdb5fbce7d02d8513719237e65a72f474 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 09 三月 2023 16:45:20 +0800
Subject: [PATCH] 修改报案人材料图片

---
 src/views/cause/Entry.vue | 1188 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 878 insertions(+), 310 deletions(-)

diff --git a/src/views/cause/Entry.vue b/src/views/cause/Entry.vue
index e39f3c0..c5d04cc 100644
--- a/src/views/cause/Entry.vue
+++ b/src/views/cause/Entry.vue
@@ -7,7 +7,7 @@
             <el-input placeholder="璇疯緭鍏ユ浠剁紪鍙锋垨鍚嶇О" v-model="queryInfo.cause"></el-input>
           </el-form-item>
           <el-form-item label="妗堜欢鐘舵�侊細">
-            <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨">
+            <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨" :style="{ width: '120px' }">
               <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
               </el-option>
             </el-select>
@@ -16,13 +16,13 @@
             <el-button type="primary" @click="search">鏌ヨ</el-button>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="addAduitDialogVisible = true">娣诲姞</el-button>
+            <el-button type="primary" @click="addAduitAnJian">娣诲姞</el-button>
           </el-form-item>
 
           <el-form-item>
             <el-upload name="multipartFile" class="upload-demo" action="/api/cause/upload " :show-file-list="false"
               :before-upload="beforeAvatarUpload" :on-success="respond" :limit="1">
-              <el-button type="primary">瀵煎叆</el-button>
+<!--              <el-button type="primary">瀵煎叆</el-button>-->
             </el-upload>
           </el-form-item>
         </el-form>
@@ -35,15 +35,17 @@
           </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>
           <el-table-column prop="firstTime" label="鏈�鏃╁彂妗堟棩鏈�" width="160" header-align="center" align="center">
           </el-table-column>
           <el-table-column prop="status" label="妗堜欢鐘舵��" width="110" header-align="center" align="center">
             <template slot-scope="scope">
-              <span v-if="scope.row.status == 0">鏈鏍�</span>
+              <span v-if="scope.row.status == 0">鍙楃悊涓�</span>
               <span v-if="scope.row.status == 1">涓嶄簣绔嬫</span>
-              <span v-if="scope.row.status == 2">鍙楃悊涓�</span>
+              <span v-if="scope.row.status == 2">浠ョ珛妗�</span>
               <span v-if="scope.row.status == 3">宸茬粨妗�</span>
-              <span v-if="scope.row.status == 4">宸叉挙妗�</span>
+              <span v-if="scope.row.status == 4">宸茬珛妗�</span>
             </template>
           </el-table-column>
           <el-table-column prop="userName" label="璐熻矗浜�" width="130" header-align="center" align="center">
@@ -54,7 +56,7 @@
             <template slot-scope="scope">
               <el-button type="text" size="medium" @click="updateCauseDialogVisible(scope.row)">缂栬緫</el-button>
               <el-button type="text" size="medium" @click="reporterVisibleBefore(scope.row.id)">鎶ユ浜哄憳</el-button>
-              <el-button type="text" size="medium" @click="handleAudit(scope.row)">缇ゅ叕鍛�</el-button>
+              <el-button type="text" size="medium" @click="groupAn(scope.row.groupId)">缇ゅ叕鍛�</el-button>
               <el-button type="text" size="medium" @click="removeCause(scope.row.id)" style="color:#ff0000">鍒犻櫎
               </el-button>
             </template>
@@ -66,29 +68,35 @@
     </el-card>
 
     <!--娣诲姞妗堜欢寮圭獥-->
-    <el-dialog title="娣诲姞妗堜欢" :visible.sync="addAduitDialogVisible" width="50%" :before-close="addAduitClose">
+    <el-dialog title="娣诲姞妗堜欢" :visible.sync="addAduitDialogVisible" :before-close="addAduitClose">
       <el-row :gutter="15">
-        <el-form ref="addAduitForm" :model="causeForm" :rules="rules" size="medium" label-width="100px">
-          <el-col :span="18">
+        <el-form ref="causeForm" :model="causeForm" :rules="addCauseRules" size="medium" label-width="100px">
+          <el-col :span="12">
             <el-form-item label="妗堜欢缂栧彿 " prop="number">
-              <el-input v-model="causeForm.number" clearable :style="{ width: '100%' }">
+              <el-input v-model="causeForm.number" clearable :style="{ width: '100%' }" placeholder="杈撳叆妗堜欢缂栧彿">
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="12">
             <el-form-item label="妗堜欢鍚嶇О" prop="name">
-              <el-input v-model="causeForm.name" clearable :style="{ width: '100%' }">
+              <el-input v-model="causeForm.name" clearable :style="{ width: '100%' }" placeholder="杈撳叆妗堜欢鍚嶇О">
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
-            <el-form-item label="鏈�鏃╁彂妗堟椂闂�" prop="firstTime">
-              <el-date-picker v-model="causeForm.firstTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+          <el-col :span="12">
+            <el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney">
+              <el-input v-model="causeForm.totalMoney" clearable :style="{ width: '100%' }"
+                placeholder="杈撳叆棰勪及鎬婚噾棰�"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鏈�鏃╁彂妗�" prop="firstTime">
+              <el-date-picker v-model="causeForm.firstTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
                 :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
               </el-date-picker>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="12">
             <el-form-item label="妗堜欢鐘舵��" prop="status">
               <el-select v-model="causeForm.status" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '100%' }">
                 <el-option v-for="item in causeOptions" :key="item.value" :label="item.label" :value="item.value">
@@ -96,7 +104,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="12">
             <el-form-item label="璐熻矗浜�" prop="userId">
               <el-select v-model="causeForm.userId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '100%' }">
                 <el-option v-for="item in user" :key="item.userId" :label="item.userName" :value="item.userId"
@@ -104,9 +112,12 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+
+          <el-col :span="24">
             <el-form-item label="妗堜欢鎻忚堪" prop="description">
-              <el-input v-model="causeForm.description" clearable :style="{ width: '100%', height: '50%' }"></el-input>
+              <el-input v-model="causeForm.description" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�"
+                :autosize="{ minRows: 4, maxRows: 8 }" :style="{ width: '100%' }">
+              </el-input>
             </el-form-item>
           </el-col>
         </el-form>
@@ -120,27 +131,32 @@
     <!--淇敼妗堜欢寮圭獥-->
     <el-dialog title="淇敼妗堜欢" :visible.sync="updateAduitDialogVisible" width="50%" :before-close="updateAduitClose">
       <el-row :gutter="15">
-        <el-form ref="addAduitForm" :model="updataCauseForm" :rules="rules" size="medium" label-width="100px">
-          <el-col :span="18">
+        <el-form ref="addAduitForm" :model="updataCauseForm" size="medium" label-width="100px">
+          <el-col :span="12">
             <el-form-item label="妗堜欢缂栧彿 " prop="number">
               <el-input v-model="updataCauseForm.number" clearable :style="{ width: '100%' }">
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="12">
             <el-form-item label="妗堜欢鍚嶇О" prop="name">
               <el-input v-model="updataCauseForm.name" clearable :style="{ width: '100%' }">
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <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>
+          </el-col>
+          <el-col :span="12">
             <el-form-item label="鏈�鍙戞棭妗堟椂闂�" prop="firstTime">
               <el-date-picker v-model="updataCauseForm.firstTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿"
                 :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
               </el-date-picker>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="12">
             <el-form-item label="妗堜欢鐘舵��" prop="status">
               <el-select v-model="updataCauseForm.status" clearable :style="{ width: '100%' }">
                 <el-option v-for="item in causeOptions" :key="item.value" :label="item.label" :value="item.value">
@@ -148,7 +164,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="12">
             <el-form-item label="璐熻矗浜�" prop="userId">
               <el-select v-model="updataCauseForm.userName" clearable :style="{ width: '100%' }">
                 <el-option v-for="item in user" :key="item.userId" :label="item.userName" :value="item.userId"
@@ -156,9 +172,10 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="18">
+          <el-col :span="24">
             <el-form-item label="妗堜欢鎻忚堪" prop="description">
-              <el-input v-model="updataCauseForm.description" clearable :style="{ width: '100%', height: '50%' }">
+              <el-input v-model="updataCauseForm.description" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�"
+                :autosize="{ minRows: 4, maxRows: 8 }" :style="{ width: '100%' }">
               </el-input>
             </el-form-item>
           </el-col>
@@ -176,34 +193,41 @@
         <el-card style="height: 100%">
           <template slot="header">
             <el-form :inline="true" :model="queryInfoReport" class="demo-form-inline">
-              <el-form-item label="鎶ユ浜猴細">
-                <el-input placeholder="璇疯緭鍏ュ鍚嶆垨韬唤璇�" v-model="queryInfoReport.people"></el-input>
+              <el-form-item label="鎶ユ浜�:">
+                <el-input placeholder="璇疯緭鍏ュ鍚嶆垨韬唤璇�" v-model="queryInfoReport.people" :style="{ width: '180px' }">
+                </el-input>
               </el-form-item>
-              <el-form-item label="鎵嬫満鍙风爜锛�">
-                <el-input placeholder="璇疯緭鍏�" v-model="queryInfoReport.phoneNumber"></el-input>
+              <el-form-item label="鎵嬫満鍙风爜:">
+                <el-input placeholder="璇疯緭鍏�" v-model="queryInfoReport.phoneNumber" :style="{ width: '120px' }">
+                </el-input>
               </el-form-item>
-              <el-form-item label="鏄惁宸茶繘缇わ細">
-                <el-select v-model="queryInfoReport.isInGroup" placeholder="璇烽�夋嫨" style="width:50%">
+              <el-form-item label="鏄惁宸茶繘缇�:">
+                <el-select v-model="queryInfoReport.isInGroup" :style="{ width: '100px' }">
                   <el-option v-for="item in optionsGroup" :key="item.value" :label="item.label" :value="item.value">
                   </el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="鎶ユ鏉愭枡锛�">
-                <el-select v-model="queryInfoReport.HavaMaterial" placeholder="璇烽�夋嫨" style="width:50%">
+
+              <el-form-item label="鎶ユ鏉愭枡:">
+                <el-select v-model="queryInfoReport.HavaMaterial" :style="{ width: '100px' }">
                   <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value">
                   </el-option>
                 </el-select>
               </el-form-item>
 
               <el-form-item>
-                <el-button type="primary" @click="search">鏌ヨ</el-button>
+                <el-button type="primary" @click="searchByCondition">鏌ヨ</el-button>
               </el-form-item>
               <el-form-item>
-                <el-button type="primary" @click="addAduitDialogOpen">娣诲姞</el-button>
+                <el-button type="primary" @click="addVisibelReport">娣诲姞</el-button>
               </el-form-item>
-              <!-- <el-form-item>
-                <el-button type="primary" @click="exportExcel">瀵煎叆</el-button>
-              </el-form-item> -->
+              <el-form-item>
+                <el-upload name="multipartFile" class="upload-demo" action="/api/cause/reporterUpload"
+                  :show-file-list="false" :data="{ causeId: this.reportCauseId }" :before-upload="beforeAvatarUpload"
+                  :on-success="reporterRespond" :limit="1">
+<!--                  <el-button type="primary">瀵煎叆</el-button>-->
+                </el-upload>
+              </el-form-item>
               <el-form-item>
                 <el-button type="primary" @click="exportExcel">鎶ユ鏉愭枡瀵煎嚭</el-button>
               </el-form-item>
@@ -216,18 +240,18 @@
                 <img :src="scope.row.pic" style="width: 40px;height: 40px; border-radius: 50%;">
               </template>
             </el-table-column>
-            <el-table-column width="80" prop="userName" label="鎶ユ浜�"></el-table-column>
-            <el-table-column width="120" prop="userMobile" label="鎵嬫満鍙风爜"></el-table-column>
-            <el-table-column width="180" prop="userIdcard" label="璇佷欢鍙风爜"></el-table-column>
+            <el-table-column width="80" prop="reporterName" label="鎶ユ浜�"></el-table-column>
+            <el-table-column width="120" prop="mobile" label="鎵嬫満鍙�"></el-table-column>
+            <el-table-column width="180" prop="idcard" label="璇佷欢鍙风爜"></el-table-column>
             <el-table-column width="100" prop="isCommission" label="鏄惁浠e姙">
               <template slot-scope="scope">
                 <span v-if="scope.row.isCommission == 1">鏄�</span>
                 <span v-else>鍚�</span>
               </template>
             </el-table-column>
-            <el-table-column width="100" prop="isIntoGroup" label="鏄惁杩涚兢">
+            <el-table-column width="100" prop="isInGroup" label="鏄惁杩涚兢">
               <template slot-scope="scope">
-                <span v-if="scope.row.isIntoGroup == 1">鏄�</span>
+                <span v-if="scope.row.isInGroup == 1">鏄�</span>
                 <span v-else>鍚�</span>
               </template>
             </el-table-column>
@@ -238,7 +262,8 @@
             </el-table-column>
             <el-table-column width="100" prop="reportMaterials" label="鎶ユ鏉愭枡">
               <template slot-scope="scope">
-                <span>{{ scope.row.reportMaterials === "" ? "鏈彁浜�" : "宸叉彁浜�" }}</span>
+                <span>{{ scope.row.reportMaterials === null || scope.row.reportMaterials === '' ? "鏈彁浜�" : "宸叉彁浜�"
+}}</span>
               </template>
             </el-table-column>
             <el-table-column width="200" prop="reportTime" label="鎶ユ鏃堕棿">
@@ -249,67 +274,175 @@
             <el-table-column label="鎿嶄綔">
               <template slot-scope="scope">
                 <el-button type="text" size="medium" @click="updataReport(scope.row)">缂栬緫</el-button>
-                <el-button type="text" size="medium"
-                  @click="leaveReport(scope.row.id, scope.row.causeId, scope.row.groupId)" style="color:#ff0000"
-                  :disabled="scope.row.isIntoGroup == 0">閫�缇� </el-button>
+<!--                <el-button type="text" size="medium"-->
+<!--                  @click="leaveReport(scope.row.id, scope.row.causeId, scope.row.groupId)" style="color:#ff0000"-->
+<!--                  :disabled="scope.row.isInGroup == 0">閫�缇� </el-button>-->
                 <el-button type="text" size="medium" @click="removeReport(scope.row.id, scope.row.causeId)"
-                  style="color:#ff0000" :disabled="scope.row.isIntoGroup == 1">鍒犻櫎 </el-button>
+                  style="color:#ff0000" :disabled="scope.row.isInGroup == 1">鍒犻櫎 </el-button>
               </template>
             </el-table-column>
           </el-table>
-          <el-pagination @current-change="handleCurrentChange" :current-page="queryInfoReport.current"
+          <el-pagination @current-change="pageReport" :current-page="queryInfoReport.current"
             :page-size="queryInfoReport.size" layout="prev, pager, next" :total="reportTotal"></el-pagination>
         </el-card>
+
+        <!--娣诲姞浜哄憳寮圭獥-->
+        <el-dialog title="娣诲姞浜哄憳" :visible.sync="addReportVisible" width="50%" :append-to-body="true"
+          :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="reporterName">
+                  <el-input v-model="auditFrom.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>
+                </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>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="琚獥鏃堕棿" prop="cheatTime">
+                  <el-date-picker v-model="auditFrom.cheatTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="娑夋閲戦" prop="amountInvolved">
+                  <el-input v-model="auditFrom.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable
+                    :style="{ width: '100%' }">
+                  </el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="妗堜欢鎻忚堪" prop="reportDescription">
+                  <el-input v-model="auditFrom.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable
+                    :style="{ width: '100%' }"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="琛ュ厖淇℃伅" prop="information">
+                  <el-input v-model="auditFrom.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" clearable
+                    :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="涓婁紶" prop="fileList">
+                  <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload"
+                    list-type="picture" :on-success="handleMaterialSuccess">
+                    <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button>
+                  </el-upload>
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </el-row>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="addReportVisible = false">鍙� 娑�</el-button>
+            <el-button type="primary" @click="addAduit">纭� 瀹�</el-button>
+          </span>
+        </el-dialog>
+
         <!--淇敼妗堜欢浜哄憳寮圭獥-->
         <el-dialog title="淇敼浜哄憳" :visible.sync="updateReportVisible" width="50%" :append-to-body="true"
           :before-close="updateReportVisibleclose">
           <el-row :gutter="20">
-            <el-form ref="updateReportForm" :model="updateReportForm" :rules="reportRules" size="medium"
-              label-width="100px">
-              <!-- <el-col :span="12"> -->
-              <!-- <el-form-item label="澶村儚" prop="pic" required>
+            <el-form ref="updateReportForm" :model="updateReportForm" 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/*" disabled>
-                    <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)">
-                    </el-image>
+                    :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-form-item>
+              </el-col>
+
+              <el-col :span="12">
+                <el-form-item label="鎶ユ浜� " prop="reporterName">
+                  <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="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="updateReportForm.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }">
+                  </el-input>
+                </el-form-item>
+              </el-col>
+
               <!-- <el-col :span="12">
-                <el-form-item label="鎶ユ浜� " prop="userName" >
-                  <el-input v-model="updateReportForm.userName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable
-                    :style="{ width: '100%' }">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="鎵嬫満鍙风爜" prop="userMobile">
-                  <el-input v-model="updateReportForm.userMobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable
-                    :style="{ width: '100%' }">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="韬唤璇佸彿" prop="userIdcard">
-                  <el-input v-model="updateReportForm.userIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable
-                    :style="{ width: '100%' }">
-                  </el-input>
+                <el-form-item prop="reportTime" label="鎶ユ鏃堕棿">
+                  <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+                  </el-date-picker>
                 </el-form-item>
               </el-col> -->
               <el-col :span="12">
-                <el-form-item prop="amountInvolved" label="娑夋閲戦">
+                <el-form-item label="琚獥鏃堕棿" prop="cheatTime">
+                  <el-date-picker v-model="updateReportForm.cheatTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="娑夋閲戦" prop="amountInvolved">
                   <el-input v-model="updateReportForm.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable
                     :style="{ width: '100%' }">
                   </el-input>
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
-                <el-form-item prop="reportTime" label="鎶ユ鏃堕棿">
-                  <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿"
-                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
-                  </el-date-picker>
+              <el-col :span="24">
+                <el-form-item label="妗堜欢鎻忚堪" prop="reportDescription">
+                  <el-input v-model="updateReportForm.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable
+                    :style="{ width: '100%' }"></el-input>
                 </el-form-item>
               </el-col>
+              <el-col :span="24">
+                <el-form-item label="琛ュ厖淇℃伅" prop="information">
+                  <el-input v-model="updateReportForm.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" clearable
+                    :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="涓婁紶" prop="fileList" required>
+                  <el-upload ref="reportMaterials" :file-list="updateReportForm.fileList" action="/api/minio/upload"
+                    list-type="picture" :on-success="handleReporterMaterialSuccess">
+                    <img v-if="updateReportForm.reportMaterials!=''" :src="'/minio/img/'+updateReportForm.reportMaterials" style="width: 145px;height: 145px">
+                    <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button>
+                  </el-upload>
+                </el-form-item>
+              </el-col>
+              <!-- <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">
+                    <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button>
+                  </el-upload>
+                </el-form-item>
+              </el-col> -->
+
             </el-form>
           </el-row>
           <span slot="footer" class="dialog-footer">
@@ -317,86 +450,215 @@
             <el-button type="primary" @click="updateReportInCasue">纭� 瀹�</el-button>
           </span>
         </el-dialog>
-        <!-- 鏌ョ湅璇︽儏寮圭獥
-        <el-dialog title="妗堜欢璇︽儏" :visible.sync="infoAduitDialogVisible" width="50%" :before-close="infoAduitClose">
-          <el-row :gutter="15">
-            <el-form ref="infoAduitForm" :model="auditInfo" 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/*" disabled>
-                    <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)">
-                    </el-image>
-                  </el-upload>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="鎶ユ浜� ">
-                  <el-input v-model="auditInfo.reporterName" disabled :style="{ width: '100%' }"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="鎵嬫満鍙风爜">
-                  <el-input v-model="auditInfo.mobile" disabled :style="{ width: '100%' }">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="韬唤璇佸彿">
-                  <el-input v-model="auditInfo.idcard" disabled :style="{ width: '100%' }">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="琚獥鏃堕棿">
-                  <el-date-picker v-model="auditInfo.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿"
-                    :style="{ width: '100%' }" format="yyyy-MM-dd HH:mm:ss" :value-format="auditFrom.cheatTime"
-                    disabled>
-                  </el-date-picker>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="娑夋閲戦">
-                  <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }"
-                    disabled>
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24">
-                <el-form-item label="妗堜欢鎻忚堪">
-                  <el-input v-model="auditInfo.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" :style="{ width: '100%' }"
-                    disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24">
-                <el-form-item label="琛ュ厖淇℃伅">
-                  <el-input v-model="auditInfo.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�"
-                    :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24">
-                <el-form-item label="鏉愭枡">
-                  <div class="metalL"></div>
-                </el-form-item>
-              </el-col>
-              <el-col :span="24">
-                <el-form-item label="鍏宠仈妗堜欢" prop="causeId">
-                  <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }"
-                    disabled>
-                    <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-            </el-form>
-          </el-row>
-        </el-dialog> -->
+
+
+
       </el-row>
       <!-- <span slot="footer" class="dialog-footer">
         <el-button @click="reporterVisible = false">鍙� 娑�</el-button>
         <el-button type="primary" @click="updateCause">纭� 瀹�</el-button>
       </span> -->
     </el-dialog>
+
+
+    <!--缇ゅ叕鍛婂脊绐�-->
+    <el-dialog title="缇ゅ叕鍛�" :visible.sync="groupAnVisible" width="85%" :before-close="groupAnVisibleClose">
+      <el-row :gutter="15">
+        <el-card style="height: 100%">
+          <template slot="header">
+            <el-form :inline="true" :model="queryInfoGroupAn" class="demo-form-inline">
+              <el-form-item label="缇ゅ叕鍛婏細">
+                <el-input placeholder="璇疯緭鍏�" v-model="queryInfoGroupAn.content"></el-input>
+              </el-form-item>
+              <el-form-item label="鐘舵��">
+                <el-select v-model="queryInfoGroupAn.status" placeholder="璇烽�夋嫨" :style="{ width: '100px' }">
+                  <el-option v-for="item in statusMate" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+
+              <el-form-item>
+                <el-button type="primary" @click="groupAnSearch">鏌ヨ</el-button>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="openGroupAn">娣诲姞</el-button>
+              </el-form-item>
+
+            </el-form>
+          </template>
+          <el-table :data="groupAnFrom">
+            <el-table-column label="搴忓彿" type="index" width="120" align="center">
+              <template slot-scope="scope">
+                <span>{{ (current - 1) * size + scope.$index + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column width="180" prop="text" label="缇ょ粍鍏憡"></el-table-column>
+            <el-table-column width="120" prop="status" label="鐘舵��">
+              <template slot-scope="scope">
+                <span v-if="scope.row.status === 1">宸插彂甯�</span>
+                <span v-else-if="scope.row.status === 0">鏈彂甯�</span>
+                <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column>
+            <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿">
+            </el-table-column>
+            <el-table-column label="鎿嶄綔" align="conter">
+              <template slot-scope="scope">
+                <el-button type="text" size="medium" @click="details(scope.row.id)">璇︽儏</el-button>
+                <el-button type="text" size="medium" @click="punlishOrUnshelve(scope.row.id, scope.row.status)"
+                  :disabled="scope.row.status == 2">
+                  <span v-if="scope.row.status === 1" style="color:#ff0000">涓嬫灦</span>
+                  <span v-else>鍙戝竷</span>
+                </el-button>
+                <el-button type="text" size="medium" @click="removeGroupAn(scope.row.id)" style="color:#ff0000"
+                  :disabled="scope.row.status == 1">鍒犻櫎
+                </el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-pagination @current-change="pageGroupAn" :current-page="queryInfoGroupAn.current"
+            :page-size="queryInfoGroupAn.size" layout="prev, pager, next" :total="groupAnTotal"></el-pagination>
+        </el-card>
+
+        <!--娣诲姞缇ゅ叕鍛婂脊绐�-->
+        <el-dialog title="缇ょ粍鍏憡娣诲姞" :visible.sync="addGroupAnVisibel" width="50%" :before-close="addGroupAnClose"
+          :append-to-body="true">
+          <el-row :gutter="15">
+            <el-form ref="addGroupForm" :model="addGroupForm" :rules="rules" size="medium" label-width="100px">
+              <el-col :span="24">
+                <el-form-item label="鍏憡鍐呭 " prop="text">
+                  <el-input v-model="addGroupForm.text" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" clearable
+                    :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime">
+                  <el-date-picker v-model="addGroupForm.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鑷�" prop="effectiveEtime">
+                  <el-date-picker v-model="addGroupForm.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+
+                <el-form-item label="绔嬪嵆鍙戝竷" prop="status">
+                  <el-select v-model="addGroupForm.status" clearable placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" :style="{ width: '100%' }">
+                    <el-option v-for="item in groupStatusMate" :key="item.value" :label="item.label" :value="item.value"
+                      :disabled="item.disabled"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+
+            </el-form>
+          </el-row>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="addGroupAnVisibel = false">鍙� 娑�</el-button>
+            <el-button type="primary" @click="addGroupAn">纭� 瀹�</el-button>
+          </span>
+        </el-dialog>
+
+        <!--缇ゅ叕鍛婅鎯呭脊绐�-->
+        <el-dialog title="缇ょ粍鍏憡璇︽儏" :visible.sync="detailsVisible" width="50%" :append-to-body="true"
+          :before-close="detailsVisibleclose">
+
+          <el-row :gutter="15">
+            <el-form ref="addGroupForm" :model="addGroupForm" size="medium" label-width="100px">
+              <el-col :span="24">
+                <el-form-item label="鍏憡鍐呭 " prop="text">
+                  <el-input v-model="detailsGroupAn.text" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled
+                    :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime">
+                  <el-date-picker v-model="detailsGroupAn.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鑷�" prop="effectiveEtime">
+                  <el-date-picker v-model="detailsGroupAn.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鍙戝竷鏃堕棿" prop="effectiveEtime">
+                  <el-date-picker v-model="detailsGroupAn.publishTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled
+                    :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鍒涘缓浜�" prop="effectiveEtime">
+                  <el-input v-model="detailsGroupAn.createName" disabled></el-input>
+                </el-form-item>
+              </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>
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </el-row>
+
+
+          <!-- <div style="display:flex; width:180;">
+            <div style="display:flex; width:180;">
+              <h4>缇ょ粍鍏憡</h4>
+              <p>{{ detailsGroupAn.text }}</p>
+            </div>
+            <div style="display:flex; width:180;">
+              <h4>鐘舵��</h4>
+              <p>{{ detailsGroupAn.status }}</p>
+            </div>
+            <div style="display:flex; width:180;">
+              <h4>鍒涘缓浜�</h4>
+              <p>{{ detailsGroupAn. }}</p>
+            </div>
+            <div style="display:flex; width:180;">
+              <h4>鍙戝竷鏃堕棿</h4>
+              <p>{{ detailsGroupAn.publishTime }}</p>
+            </div>
+            <div style="display:flex; width:180;">
+              <h4>缇ょ粍鍏憡</h4>
+              <p>{{ detailsGroupAn.text }}</p>
+            </div>
+          </div> -->
+
+          <!-- <el-table-column width="180" prop="effectiveStime" label="缇ょ粍鍏憡"></el-table-column>
+            <el-table-column width="120" prop="status" label="鐘舵��">
+              <template slot-scope="scope">
+                <span v-if="scope.row.status === 1">宸插彂甯�</span>
+                <span v-else-if="scope.row.status === 0">鏈彂甯�</span>
+                <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span>
+              </template>
+            </el-table-column>
+            <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column>
+            <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿">
+            </el-table-column> -->
+
+        </el-dialog>
+
+
+
+      </el-row>
+      <!-- <span slot="footer" class="dialog-footer">
+        <el-button @click="reporterVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="updateCause">纭� 瀹�</el-button>
+      </span> -->
+    </el-dialog>
+
   </div>
 </template>
 
@@ -408,25 +670,75 @@
   leaveReport,
   user,
   updataReportCasue,
-  exportReportExcel
+  GroupLits,
+  GroupListBycondition,
+  pOrUGroupAn,
+  deleteGroupAn,
+  detailsGroupAn,
+  report
   //saveSubject
 } from '@/api/cause'
 
-import { getImgUrl, getReportById, report } from '@/api/common'
+import { getImgUrl, getReportById } from '@/api/common'
 
 
 export default {
   name: "Entry",
   data() {
     return {
+
+      //娣诲姞妗堜欢浜哄憳寮圭獥鎺у埗
+      addReportVisible: false,
+      //缇ゅ叕鍛婅缁嗗唴瀹�
+      detailsGroupAn: [],
+      // {
+      //   text: '',
+      //   groupId: '',
+      //   id: '',
+      //   ctime: '',
+      //   effectiveStime: '',
+      //   effectiveEtime: '',
+      //   createName: '',
+      //   status: null,
+      //   publishTime: null
+      // },
+      //缇ゅ叕鍛婅鎯呭脊妗�
+      detailsVisible: false,
+      //缇ゅ叕鍛婃坊鍔犺〃鍗�
+      addGroupForm: {
+        text: '',
+        status: '',
+        effectiveStime: '',
+        effectiveEtime: '',
+      },
+      //缇ゅ叕鍛婄兢娣诲姞寮规
+      addGroupAnVisibel: false,
+      //缇ゅ叕鍛婃煡璇�
+      queryInfoGroupAn: {
+        status: '',
+        content: '',
+        groupId: '',
+        current: 1,
+        size: 10,
+      },
+      groupAnTotal: null,
+      //缇ゅ叕鍛婂簭鍙风浉鍏�
+      current: 1,
+      size: 10,
+      //妗堜欢id
       causeId: '',
+      //妗堜欢浜哄憳瀵煎嚭id
       exportReportId: '',
+      //缇ゅ叕鍛婃煡璇㈣繑鍥炲��
+      groupAnFrom: [],
+      //妗堜欢浜哄憳鏌ヨ鍙傛暟
       queryInfoReport: {
+        causeId: null,
         people: '',
         phoneNumber: '',
-        isInGroup: '5',
+        isInGroup: null,
         current: 1,
-        HavaMaterial: '5',
+        HavaMaterial: null,
         size: 10,
       },
       auditFrom: {
@@ -439,45 +751,110 @@
         reportDescription: '',
         information: '',
         reportMaterials: "",
-        causeId: '',
         fileList: [],
         tmpTime: '',
+        causeId: null,
       },
       auditInfo: {},
       picShow: "",
       optionsGroup: [
         {
-          value: '5',
+          value: null,
           label: '鍏ㄩ儴'
         },
         {
-          value: '0',
+          value: '1',
           label: '鏄�'
         },
         {
-          value: '1',
+          value: '0',
           label: '鍚�'
         }
       ],
       optionsMate: [
         {
-          value: '5',
+          value: null,
           label: '鍏ㄩ儴'
         },
         {
           value: '0',
-          label: '宸叉彁浜�'
+          label: '鏈彁浜�'
         },
         {
           value: '1',
-          label: '鏈彁浜�'
+          label: '宸叉彁浜�'
         }
       ],
+      groupStatusMate: [
+        {
+          value: '0',
+          label: '鍚�'
+        },
+        {
+          value: '1',
+          label: '鏄�'
+        }
+      ],
+      statusMate: [
+        {
+          value: '',
+          label: '鍏ㄩ儴'
+        },
+        {
+          value: '0',
+          label: '鏈彂甯�'
+        },
+        {
+          value: '1',
+          label: '宸插彂甯�'
+        }
+      ],
+      //鎶ユ浜哄憳涓垎椤电殑妗堜欢id
+      reportCauseId: null,
       reportTotal: 0,
       reportList: [],
       addAduitDialogVisible: false,
       infoAduitDialogVisible: false,
       causeOptions: [],
+      groupAnVisible: false,
+      addCauseRules: {
+        number: [{
+          required: true,
+          message: '璇疯緭鍏ユ浠剁紪鍙� ',
+          trigger: 'blur'
+        }],
+        name: [{
+          required: true,
+          message: '璇疯緭鍏ユ浠跺悕绉� ',
+          trigger: 'blur'
+        }],
+        firstTime: [{
+          required: true,
+          message: '璇烽�夋嫨鏈�鏃╂鍙戞椂闂� ',
+          trigger: 'blur'
+        }],
+        status: [{
+          required: true,
+          message: '璇烽�夋嫨妗堜欢鐘舵�� ',
+          trigger: 'blur'
+        }],
+        totalMoney: [{
+          required: true,
+          message: '璇疯緭鍏ラ浼版�婚噾棰� ',
+          trigger: 'blur'
+        }],
+        userId: [{
+          required: true,
+          message: '璐熻矗浜洪�夋嫨 ',
+          trigger: 'blur'
+        }],
+        description: [{
+          required: true,
+          message: '璇疯緭鍏ユ浠舵弿杩� ',
+          trigger: 'blur'
+        }]
+      }
+      ,
       reportRules: {
         reporterName: [{
           required: true,
@@ -486,49 +863,76 @@
         }],
         mobile: [{
           required: true,
-          message: '璇疯緭鍏ユ墜鏈哄彿鐮�',
+          message: '璇疯緭鍏ユ墜鏈哄彿鐮� ',
           trigger: 'blur'
         }],
         idcard: [{
           required: true,
-          message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
+          message: '璇疯緭鍏ヨ韩浠借瘉鍙� ',
           trigger: 'blur'
         }],
         tmpTime: [{
           required: true,
-          message: '璇疯緭鍏ヨ楠楁椂闂�',
+          message: '璇疯緭鍏ヨ楠楁椂闂� ',
           trigger: 'blur'
         }],
         amountInvolved: [{
           required: true,
-          message: '璇疯緭鍏ユ秹妗堥噾棰�',
+          message: '璇疯緭鍏ユ秹妗堥噾棰� ',
           trigger: 'blur'
         }],
         reportDescription: [{
           required: true,
-          message: '璇疯緭鍏ユ浠舵弿杩�',
+          message: '璇疯緭鍏ユ浠舵弿杩� ',
           trigger: 'blur'
         }],
         information: [{
           required: true,
-          message: '璇疯緭鍏ヨˉ鍏呬俊鎭�',
+          message: '璇疯緭鍏ヨˉ鍏呬俊鎭� ',
           trigger: 'blur'
         }],
         causeId: [{
           required: true,
-          message: '璇烽�夋嫨涓嬫媺閫夋嫨',
+          message: '璇烽�夋嫨涓嬫媺閫夋嫨 ',
           trigger: 'change'
         }],
       },
-
-
-      updateReportForm: [],
-
+      fileList: [{
+        name: '',
+        url: '',
+        data: ''
+      }
+      ],
+      updateReportForm: {
+        pic: '',
+        reporterName: '',
+        mobile: '',
+        idcard: '',
+        cheatTime: '',
+        amountInvolved: '',
+        reportDescription: '',
+        information: '',
+        reportMaterials: "",
+        ctime: '',
+        causeId: null,
+        groupId: null,
+      },
       //妗堜欢浜哄憳琛ㄦ牸鏁版嵁
       updateReportPrams: {
         id: '',
+        pic:'',
+        reporterName: '',
+        mobile: '',
+        idcard: '',
+        cheatTime: '',
         amountInvolved: '',
-        reportTime: '',
+        reportDescription: '',
+        information: '',
+        reportMaterials: "",
+        ctime: '',
+        causeId: null,
+        groupId: null,
+        fileList: [],
       },
 
       //妗堜欢琛ㄦ牸鏁版嵁
@@ -542,6 +946,7 @@
       },
       updataCauseForm: {
         id: '',
+        pic:'',
         name: '',
         number: '',
         firstTime: '',
@@ -560,6 +965,32 @@
       user: [],
       updateUser: [],
       options: [
+        {
+          value: null,
+          label: '鍏ㄩ儴'
+        },
+        {
+          value: '0',
+          label: '鍙楃悊涓�'
+        },
+        {
+          value: '1',
+          label: '涓嶄簣绔嬫'
+        },
+        {
+          value: '2',
+          label: '宸茬珛妗�'
+        },
+        {
+          value: '3',
+          label: '宸茬粨妗�'
+        },
+        {
+          value: '4',
+          label: '宸叉挙妗�'
+        }
+      ],
+      causeOptions: [
         {
           value: null,
           label: '鍏ㄩ儴'
@@ -585,74 +1016,72 @@
           label: '宸叉挙妗�'
         }
       ],
-      causeOptions: [
-        {
-          value: '0',
-          label: '鏈鏍�'
-        },
-        {
-          value: '1',
-          label: '涓嶄簣绔嬫'
-        },
-        {
-          value: '2',
-          label: '鍙楃悊涓�'
-        },
-        {
-          value: '3',
-          label: '宸茬粨妗�'
-        },
-        {
-          value: '4',
-          label: '宸叉挙妗�'
-        }
-      ],
-      total: 0,
+      total: null,
       addAduitDialogVisible: false,
       updateAduitDialogVisible: false,
       reporterVisible: false,
       updateReportVisible: false,
-      rules: {
+      addReportRules: {
         reporterName: [{
           required: true,
           message: '璇疯緭鍏ユ姤妗堜汉 ',
           trigger: 'blur'
         }],
-        mobile: [{
+        mobile:
+          [{ required: true, message: '璇疯緭鍏ユ墜鏈哄彿鐮� ', trigger: 'blur' },
+          {
+            validator: function (rule, value, callback) {
+              if (/^1[34578]\d{9}$/.test(value) == false) {
+                callback(new Error("璇疯緭鍏ユ纭殑鎵嬫満鍙�"));
+              } else {
+                callback();
+              }
+            }, trigger: 'blur'
+          }],
+        idcard: [{ required: true, message: '璇疯緭鍏ヨ韩浠借瘉ID ', trigger: 'blur' },
+        { pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '浣犵殑韬唤璇佹牸寮忎笉姝g‘' }],
+        cheatTime: [{
           required: true,
-          message: '璇疯緭鍏ユ墜鏈哄彿鐮�',
-          trigger: 'blur'
-        }],
-        idcard: [{
-          required: true,
-          message: '璇疯緭鍏ヨ韩浠借瘉鍙�',
-          trigger: 'blur'
-        }],
-        tmpTime: [{
-          required: true,
-          message: '璇疯緭鍏ヨ楠楁椂闂�',
+          message: '璇疯緭鍏ヨ楠楁椂闂� ',
           trigger: 'blur'
         }],
         amountInvolved: [{
           required: true,
-          message: '璇疯緭鍏ユ秹妗堥噾棰�',
+          message: '璇疯緭鍏ユ秹妗堥噾棰� ',
           trigger: 'blur'
         }],
         reportDescription: [{
           required: true,
-          message: '璇疯緭鍏ユ浠舵弿杩�',
+          message: '璇疯緭鍏ユ浠舵弿杩� ',
           trigger: 'blur'
         }],
         information: [{
           required: true,
-          message: '璇疯緭鍏ヨˉ鍏呬俊鎭�',
+          message: '璇疯緭鍏ヨˉ鍏呬俊鎭� ',
           trigger: 'blur'
         }],
-        causeId: [{
+      },
+      rules: {
+        text: [{
           required: true,
-          message: '璇烽�夋嫨涓嬫媺閫夋嫨',
-          trigger: 'change'
+          message: '璇疯緭鍏ュ叕鍛婂唴瀹� ',
+          trigger: 'blur'
         }],
+        effectiveStime: [{
+          required: true,
+          message: '閫夋嫨鍏憡鏈夋晥鏈� ',
+          trigger: 'blur'
+        }],
+        effectiveEtime: [{
+          required: true,
+          message: '閫夋嫨鍏憡鏈夋晥鏈� ',
+          trigger: 'blur'
+        }],
+        status: [{
+          required: true,
+          message: '璇疯緭鍏ヨ楠楁椂闂� ',
+          trigger: 'blur'
+        }]
       },
     }
   },
@@ -663,27 +1092,159 @@
   },
   methods:
   {
+    addAduitAnJian(){
+      let date=(new Date()).valueOf();//鑾峰彇鏃堕棿鎴�
+      let txt = '1234567890';//鐢熸垚鐨勯殢鏈烘満鍣ㄧ爜
+      let len =13;//鏈哄櫒鐮佹湁澶氬皯浣�
+      let pwd = '';//瀹氫箟绌哄彉閲忕敤鏉ユ帴鏀舵満鍣ㄧ爜
+      for (let i = 0; i < len; i++) {
+        pwd += txt.charAt(Math.floor(Math.random() * txt.length));//寰幆鏈哄櫒鐮佷綅鏁伴殢鏈哄~鍏�
+      }
+      let id= date+pwd;
+      this.causeForm.number=id;
+      this.addAduitDialogVisible=true;
+    },
 
+    //鍏抽棴妗堜欢鐨勬浠朵汉鍛樻坊鍔�
+    addReportVisibleClose() {
+      this.addReportVisible = false;
+    },
+    //妗堜欢娣诲姞
+    addVisibelReport() {
+      this.addReportVisible = true;
+    },
+
+    detailsVisibleclose() {
+      this.detailsVisible = false;
+    },
+    //缇ゅ叕鍛婅鎯�
+    details(val) {
+
+      detailsGroupAn(val).then(res =>
+        this.detailsGroupAn = res
+      );
+      console.log(this.detailsGroupAn);
+      this.detailsVisible = true;
+    },
+    //缇ゅ叕鍛婂垹闄�
+    removeGroupAn(val) {
+      deleteGroupAn(val).then(res => this.$message({
+        message: '鎿嶄綔鎴愬姛',
+        type: 'success'
+      }));
+      this.groupAnSearch();
+    },
+    //鍒嗛〉
+    pageGroupAn(val) {
+      this.queryInfoGroupAn.current = val;
+      this.groupAnSearch();
+    },
+    //鍙戝竷鍜屼笅鏋�
+    punlishOrUnshelve(val, val2) {
+      pOrUGroupAn(val, val2).then(res => {
+        this.$message({
+          message: '鎿嶄綔鎴愬姛',
+          type: 'success'
+        });
+        this.groupAnSearch();
+      })
+    },
+    //鎵撳紑寮规
+    openGroupAn() { this.addGroupAnVisibel = true; },
+    //娣诲姞缇ゅ叕鍛�
+    addGroupAn() {
+      this.$refs.addGroupForm.validate(async (vaild) => {
+        if (!vaild) return this.$message.error('杈撳叆鏈夎')
+        let from = null;
+        from = this.addGroupForm;
+        const data = from;
+        this.$http.post('/api/announcement/add?groupId=' + this.queryInfoGroupAn.groupId,
+          data
+        ).then(res => {
+          this.$message({
+            message: '娣诲姞鎴愬姛',
+            type: 'success'
+          });
+          this.addGroupForm = {}
+          this.addGroupAnVisibel = false;
+          this.groupAnSearch();
+        });
+      })
+    },
+    //琛屼负 缇ゅ叕鍛�
+    addGroupAnClose() {
+      this.addGroupAnVisibel = false;
+    },
+    groupAnVisibleClose() {
+      this.groupAnVisible = false
+    },
+    //缇ゅ叕鍛婃煡璇�
+    groupAnSearch() {
+      let params = null;
+      params = this.queryInfoGroupAn;
+      GroupListBycondition(params).then(res => {
+        this.queryInfoGroupAn.current = res.current;
+        this.queryInfoGroupAn.size = res.size;
+        this.groupAnFrom = res.records;
+        this.current = res.current;
+        this.size = res.size;
+        this.groupAnTotal = res.total;
+      })
+    },
+    //缇ゅ叕鍛�
+    //鎵撳紑 缇ゅ叕鍛婂脊绐�
+    groupAn(val) {
+      this.groupAnVisible = true;
+      this.getGroupAn(val);
+    },
+    getGroupAn(val) {
+      let params = null;
+      this.queryInfoGroupAn.groupId = val;
+      params = this.queryInfoGroupAn;
+      GroupLits(params).then(res => {
+        this.queryInfoGroupAn.current = res.current;
+        this.queryInfoGroupAn.size = res.size;
+        this.groupAnFrom = res.records;
+        this.current = res.current;
+        this.size = res.size;
+        this.groupAnTotal = res.total;
+      })
+    },
+    //妗堜欢浜哄憳
     //瀵煎嚭鏂囦欢
     exportExcel() {
-      this.$http.post('/api/report/exportReporter?id=' + this.exportReportId,{},{ responseType: 'blob' })
+      this.$http.post('/api/report/exportReporter?id=' + this.exportReportId, {}, { responseType: 'blob' })
         .then(res => {
           const fileName = decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1])
           const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
           const elink = document.createElement('a')
           elink.download = fileName
           elink.href = URL.createObjectURL(blob)
-         document.body.appendChild(elink)
+          document.body.appendChild(elink)
           elink.click()
           document.body.removeChild(elink)
+
         })
+
     },
 
     //妗堜欢浜哄憳缂栬緫琛ㄥ崟鎻愪氦
     updateReportInCasue() {
-      this.updateReportPrams.id = this.updateReportForm.id;
-      this.updateReportPrams.amountInvolved = this.updateReportForm.amountInvolved;
-      this.updateReportPrams.reportTime = this.updateReportForm.reportTime;
+      this.updateReportPrams.reporterName = this.updateReportForm.reporterName
+      this.updateReportPrams.mobile = this.updateReportForm.mobile
+      this.updateReportPrams.idcard = this.updateReportForm.idcard
+      this.updateReportPrams.cheatTime = this.updateReportForm.cheatTime
+      this.updateReportPrams.amountInvolved = this.updateReportForm.amountInvolved
+      this.updateReportPrams.reportDescription = this.updateReportForm.reportDescription
+      this.updateReportPrams.information = this.updateReportForm.information
+      this.updateReportPrams.reportMaterials = this.updateReportForm.reportMaterials
+      this.updateReportPrams.ctime = this.updateReportForm.ctime
+      this.updateReportPrams.causeId = this.updateReportForm.causeId
+      this.updateReportPrams.groupId = this.updateReportForm.groupId
+      this.updateReportPrams.id = this.updateReportForm.id
+      this.updateReportPrams.reportMaterials = this.updateReportPrams.fileList.map(i => i.data).join(',')
+
+      this.updateReportPrams.pic=this.updateReportForm.pic
       let form = null;
       form = this.updateReportPrams;
       const data = form;
@@ -693,10 +1254,9 @@
             message: '淇敼鎴愬姛',
             type: 'success'
           });
-          this.get(this.causeId);
+          this.searchByCondition();
         }
       );
-
       this.updateReportVisible = false;
     },
 
@@ -714,6 +1274,7 @@
     reporterVisibleBefore(row) {
       this.reporterVisible = true;
       this.exportReportId = row;
+      this.reportCauseId = row;
       this.get(row);
     },
     //鎶ユ浜哄憳鏌ヨ
@@ -724,7 +1285,7 @@
         this.reportList = res.data.data.records
         this.reportList.forEach(x => {
           if (x.pic === '' || x.pic === null) {
-            x.pic = './logo.png';
+            x.pic = './logo.jpg';
           } else {
             getImgUrl(x.pic).then(res => {
               x.pic = res
@@ -738,16 +1299,21 @@
       this.infoAduitDialogVisible = false
       this.$refs.infoAduitForm.resetFields()
     },
+    //娣诲姞妗堜欢涓殑妗堜欢浜哄憳
     addAduit() {
-      this.$refs.addAduitForm.validate(async (vaild) => {
+      this.$refs.auditFrom.validate(async (vaild) => {
         if (!vaild) return this.$message.error('杈撳叆鏈夎')
-        this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',')
+        this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',');
+        this.auditFrom.causeId = this.reportCauseId;
+        // console.log(this.reportCauseId);
         report(this.auditFrom).then(res => {
           this.$message.success('鎻愪氦鎴愬姛')
-          this.addAduitDialogVisible = false
-          this.getReportList()
+          this.auditFrom = {}
+          this.addReportVisible = false
+          this.get(this.reportCauseId)
+          this.init()
         }).catch(err => {
-          this.addAduitClose()
+          this.addReportVisibleClose()
         })
       })
     },
@@ -757,9 +1323,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) {
@@ -769,59 +1335,13 @@
         data: res.data
       })
     },
-    addAduitClose() {
-      this.addAduitDialogVisible = false
-      this.$refs.addAduitForm.resetFields()
-      this.picShow = ""
-    },
-    getReportList() {
-      let param = {}
-      param.people = this.queryInfoReport.people
-      param.phoneNumber = this.queryInfoReport.phoneNumber
-      param.current = this.queryInfoReport.current
-      param.size = this.queryInfoReport.size
-      param.isInGroup = this.queryInfoReport.isInGroup !== '5' ? this.queryInfoReport.isInGroup : ''
-      param.HavaMaterial = this.queryInfoReport.HavaMaterial !== '5' ? this.queryInfoReport.HavaMaterial : ''
-      getAuditList(param).then(res => {
-        this.total = res.total
-        this.list = res.records
-        this.list.forEach(x => {
-          if (x.pic === '' || x.pic === null) {
-            x.pic = './logo.png';
-          } else {
-            getImgUrl(x.pic).then(res => {
-              x.pic = res
-            })
-          }
-        })
-      })
-    },
-    search() {
-      this.getReportList()
-    },
-    addAduitDialogOpen() {
-      this.addAduitDialogVisible = true
-    },
 
-    handleCurrentChange(val) {
-      this.queryInfoReport.current = val;
-      this.getReportList();
-    },
-    details(id) {
-      getReportById(id).then(res => {
-        this.auditInfo = res
-        if (res.pic === '' || res.pic === null) {
-          this.picShow = './logo.png';
-        } else {
-          getImgUrl(res.pic).then(res => {
-            this.picShow = res
-          })
-        }
-        this.infoAduitDialogVisible = true
+    async handleReporterMaterialSuccess(res, file) {
+      this.updateReportPrams.fileList.push({
+        name: file.name,
+        url: await getImgUrl(res.data),
+        data: res.data
       })
-    },
-    audit(id) {
-
     },
 
     //妗堜欢褰曞叆鐩稿叧
@@ -856,25 +1376,30 @@
       this.reporterVisible = false
     },
     async createCause() {
-      let form = null;
-      form = this.causeForm;
-      const data = form;
-      this.$http.post('/api/cause/addCause',
-        data
-      ).then(res => {
-        if (res.data.code == 200) {
-          this.$message({
-            type: "success",
-            message: "娣诲姞鎴愬姛"
-          });
-          this.addAduitDialogVisible = false;
-          this.getList();
-        } else {
-          this.$message({
-            type: "error",
-            message: "琛ㄥ崟涓嶈兘涓虹┖"
-          })
+      this.$refs.causeForm.validate(async (vaild) => {
+        if (!vaild) return this.$message.error('杈撳叆鏈夎')
+        let form = null;
+        form = this.causeForm;
+        const data = form;
+        this.$http.post('/api/cause/addCause',
+          data
+        ).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "娣诲姞鎴愬姛"
+            });
+            this.causeForm = {}
+            this.addAduitDialogVisible = false;
+            this.getList();
+          } else {
+            this.$message({
+              type: "error",
+              message: res.data.msg
+            })
+          }
         }
+        )
       })
     },
 
@@ -959,6 +1484,23 @@
       }
       location.reload();
     },
+    //妗堜欢浜哄憳瀵煎叆鎴愬姛鍚�
+    reporterRespond(res) {
+      if (res.code == 200) {
+        this.$message({
+          message: '涓婁紶鎴愬姛',
+          type: 'success'
+        }
+        )
+      } else {
+        this.$message({
+          message: res.msg,
+          type: 'error'
+        })
+      }
+      this.get(this.reportCauseId);
+    },
+
     beforeAvatarUpload(file) {
       let Xls = file.name.split('.');
       if (Xls[1] === 'xls' || Xls[1] === 'xlsx') {
@@ -994,6 +1536,28 @@
         }
       )
 
+    },
+    //妗堜欢浜哄憳寮圭獥涓殑鏌ヨ
+    searchByCondition() {
+      this.queryInfoReport.causeId = this.reportCauseId;
+      this.$http.get('/api/cause/getAllReportList', {
+        params: this.queryInfoReport
+      }).then(
+        res => {
+          this.reportTotal = res.data.data.total
+          this.reportList = res.data.data.records
+          this.reportList.forEach(x => {
+            if (x.pic === '' || x.pic === null) {
+              x.pic = './logo.jpg';
+            } else {
+              getImgUrl(x.pic).then(res => {
+                x.pic = res
+              })
+            }
+          })
+        }
+      )
+
     }
     ,
     addDialogOpen() {
@@ -1002,6 +1566,10 @@
     handleCurrentChange(val) {
       this.queryInfo.current = val;
       this.getList();
+    },
+    pageReport(val) {
+      this.queryInfoReport.current = val;
+      this.searchByCondition();
     },
     removeCause(val) {
       remove(val).then(
@@ -1022,7 +1590,7 @@
             message: '鍒犻櫎鎴愬姛',
             type: 'success'
           });
-          this.get(row);
+          this.searchByCondition();
         }
       )
     },
@@ -1035,7 +1603,7 @@
             message: '閫�缇ゆ垚鍔�',
             type: 'success'
           });
-          this.get(row);
+          this.searchByCondition();
         }
       )
     },
@@ -1052,4 +1620,4 @@
 ::v-deep(.el-table thead) {
   color: #000000;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0