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/manager/User.vue |  343 ++++++++++++++++++++++++++++++---------------------------
 1 files changed, 180 insertions(+), 163 deletions(-)

diff --git a/src/views/manager/User.vue b/src/views/manager/User.vue
index 7642170..e8fa067 100644
--- a/src/views/manager/User.vue
+++ b/src/views/manager/User.vue
@@ -30,20 +30,23 @@
           <el-table-column label="鎿嶄綔" align="conter">
             <template slot-scope="scope">
               <el-button type="text" size="medium" @click="details(scope.row)">缂栬緫</el-button>
-              <el-button type="text" size="medium" @click="reset(scope.row.id)">閲嶇疆瀵嗙爜</el-button>
-              <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎
+              <!--              <el-button type="text" size="medium" @click="reset(scope.row.id)">閲嶇疆瀵嗙爜</el-button>-->
+              <!--              <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎-->
+              <el-button type="text" size="medium" @click="handleToManager(scope.row)">璁句负璀﹀憳</el-button>
+              <el-button type="text" size="medium" @click="updateStatus(scope.row.id,scope.row.status)">
+                {{ scope.row.status == 1 ? "绂佺敤" : "鍚敤" }}
               </el-button>
             </template>
           </el-table-column>
         </el-table>
       </template>
       <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size"
-        layout="prev, pager, next" :total="total"></el-pagination>
+                     layout="prev, pager, next" :total="total"></el-pagination>
     </el-card>
 
     <!--娣诲姞鐢ㄦ埛寮圭獥-->
     <el-dialog title="鐢ㄦ埛娣诲姞" :visible.sync="addPublicityVisibel" width="50%" :before-close="addPublicityClose"
-      :append-to-body="true">
+               :append-to-body="true">
       <el-row :gutter="15">
         <el-form ref="addPublicityForm" :model="addPublicityForm" :rules="rules" size="medium" label-width="100px">
 
@@ -64,7 +67,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="韬唤璇�" prop="userIdcard">
-              <el-input v-model="addPublicityForm.userIdcard" clearable placeholder="璇疯緭鍏ヨ韩浠借瘉"> </el-input>
+              <el-input v-model="addPublicityForm.userIdcard" clearable placeholder="璇疯緭鍏ヨ韩浠借瘉"></el-input>
             </el-form-item>
           </el-col>
         </el-form>
@@ -75,46 +78,43 @@
       </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="detailsRow" :model="detailsRow" size="medium"
-              label-width="100px">
-              <el-col :span="12">
-                <el-form-item label="鐢ㄦ埛鍚�" prop="nickName">
-                  <el-input v-model="detailsRow.nickName" placeholder="璇疯緭鍏ョ敤鎴峰悕" clearable
-                    :style="{ width: '100%' }">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="鐢ㄦ埛濮撳悕" prop="realName">
-                  <el-input v-model="detailsRow.realName" 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="detailsRow.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="detailsRow.userIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable
-                    :style="{ width: '100%' }">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-            </el-form>
-          </el-row>
-          <span slot="footer" class="dialog-footer">
-            <el-button @click="detailsVisible = false">鍙� 娑�</el-button>
-            <el-button type="primary" @click="update">纭� 瀹�</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="detailsRow" :model="detailsRow" size="medium" label-width="100px">
+          <el-col :span="12">
+            <el-form-item label="鐢ㄦ埛鍚�" prop="nickName">
+              <el-input v-model="detailsRow.nickName" placeholder="璇疯緭鍏ョ敤鎴峰悕" clearable :style="{ width: '100%' }">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="鐢ㄦ埛濮撳悕" prop="realName">
+              <el-input v-model="detailsRow.realName" 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="detailsRow.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="detailsRow.userIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable
+                        :style="{ width: '100%' }">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="detailsVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="update">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
 
   </div>
 </template>
@@ -122,7 +122,8 @@
 <script>
 import {
   getPublicityList,
-  addPublicityList
+  addPublicityList,
+  toManager
 } from '@/api/User'
 
 
@@ -131,13 +132,13 @@
   data() {
     return {
 
- rules: {
+      rules: {
         nickName: [{
           required: true,
           message: '璇疯緭鍏ョ敤鎴峰悕 ',
           trigger: 'blur'
         }],
-         realName: [{
+        realName: [{
           required: true,
           message: '璇疯緭鍏ョ敤鎴峰鍚�',
           trigger: 'blur'
@@ -147,18 +148,17 @@
           message: '璇疯緭鍏ユ墜鏈哄彿 ',
           trigger: 'blur'
         }],
-           userIdcard: [{
+        userIdcard: [{
           required: true,
           message: '璇疯緭鍏ヨ韩浠借瘉 ',
           trigger: 'blur'
         }],
-        },
+      },
       //璇︾粏鍐呭寮规
       detailsVisible: false,
       //璇︾粏鍐呭
-      detailsRow: 
-        {
-        }
+      detailsRow:
+          {}
       ,
       //琛ㄥ崟鎻愪氦鍐呭
       addPublicityForm: {
@@ -206,120 +206,137 @@
 
   },
   methods:
-  {
-    //鍒犻櫎
-    remove(val) {
-      this.$http.delete('/api/user', { params: { id: val } }).then(res => {
-        this.$message({
-          message: '鍒犻櫎鎴愬姛',
-          type: 'success'
-        })
+      {
+        handleToManager(data) {
+          toManager(data.id).then(res => {
+            this.$message({
+              message: '璁剧疆鎴愬姛',
+              type: 'success'
+            })
+            this.search();
+          })
+        },
+        //鏇存柊鐢ㄦ埛鐘舵��
+        updateStatus(id, status) {
+          var _this = this;
+          this.$confirm('纭淇敼璐︽埛鐘舵�佸悧锛�').then(() => {
+                _this.$http.get('/api/user/status', {params: {id: id, status: status}}).then(res => {
+                  _this.$message({
+                    message: '淇敼鎴愬姛',
+                    type: 'success'
+                  })
+                  this.search();
+                })
+              }
+          )
 
-        this.search();
-      })
-    },
-    // //鍙戝竷/涓嬫灦
-    // punlish(val, val2) {
-    //   if (val2 == 0) {
-    //     this.$http.get('/api/commonQuestion/release/' + val).then(res => {
-    //       this.$message({
-    //         message: '鍙戝竷鎴愬姛',
-    //         type: 'success'
-    //       })
+        },
+        // //鍙戝竷/涓嬫灦
+        // punlish(val, val2) {
+        //   if (val2 == 0) {
+        //     this.$http.get('/api/commonQuestion/release/' + val).then(res => {
+        //       this.$message({
+        //         message: '鍙戝竷鎴愬姛',
+        //         type: 'success'
+        //       })
 
-    //       this.search();
-    //     }
-    //     )
-    //   }
-    //   if (val2 == 1) {
-    //     this.$http.get('/api/commonQuestion/offline/' + val).then(res => {
-    //       this.$message({
-    //         message: '涓嬫灦鎴愬姛',
-    //         type: 'success'
-    //       })
-    //       this.search();
-    //     }
-    //     );
-    //   }
-    // },
+        //       this.search();
+        //     }
+        //     )
+        //   }
+        //   if (val2 == 1) {
+        //     this.$http.get('/api/commonQuestion/offline/' + val).then(res => {
+        //       this.$message({
+        //         message: '涓嬫灦鎴愬姛',
+        //         type: 'success'
+        //       })
+        //       this.search();
+        //     }
+        //     );
+        //   }
+        // },
 
-    //缂栬緫
-    details(val) {
-      this.detailsVisible = true;
-            this.detailsRow = Object.assign({}, val);
-    },
-    update(){
-          this.$http.put('/api/user',this.detailsRow).then(res => {this.$message({
-        message: '缂栬緫鎴愬姛',
-        type: 'success'}   
-        )
-         this.search();}
-        );
-          this.detailsVisible =false;
-    },
+        //缂栬緫
+        details(val) {
+          this.detailsVisible = true;
+          this.detailsRow = Object.assign({}, val);
+        },
+        update() {
+          this.$http.put('/api/user', this.detailsRow).then(res => {
+                this.$message({
+                      message: '缂栬緫鎴愬姛',
+                      type: 'success'
+                    }
+                )
+                this.search();
+              }
+          );
+          this.detailsVisible = false;
+        },
 
-    //閲嶇疆瀵嗙爜
-    reset(val) {
-      this.$http.get('/api/user/resetPassword/' + val).then(res => this.$message({
-        message: '閲嶇疆鎴愬姛',
-        type: 'success'
-      }));
-    },
-    //娣诲姞
-    add() {
-        this.$refs.addPublicityForm.validate(async (vaild) => {
-        if (!vaild) return this.$message.error('杈撳叆鏈夎')
-      let param = null;
-      param = this.addPublicityForm; 
-      addPublicityList(param).then(res => {
-        this.$message({
-          message: '鎿嶄綔鎴愬姛',
-          type: 'success'
-        });
-        this.addPublicityForm={}; 
-        this.init();
+        //閲嶇疆瀵嗙爜
+        reset(val) {
+          this.$http.get('/api/user/resetPassword/' + val).then(res => this.$message({
+            message: '閲嶇疆鎴愬姛',
+            type: 'success'
+          }));
+        },
+        //娣诲姞
+        add() {
+          this.$refs.addPublicityForm.validate(async (vaild) => {
+            if (!vaild) return this.$message.error('杈撳叆鏈夎')
+            let param = null;
+            param = this.addPublicityForm;
+            addPublicityList(param).then(res => {
+                  this.$message({
+                    message: '鎿嶄綔鎴愬姛',
+                    type: 'success'
+                  });
+                  this.addPublicityForm = {};
+                  this.init();
+                }
+            )
+            this.addPublicityVisibel = false;
+          })
+        },
+        //鍏抽棴涔嬪墠
+        addPublicityClose() {
+          this.addPublicityVisibel = false;
+        },
+        detailsVisibleclose() {
+          this.detailsVisible = false;
+        },
+        //鍒嗛〉鏂规硶
+        handleCurrentChange(val) {
+          this.queryInfo.current = val;
+          this.search();
+        },
+
+        //鍏叡瀹d紶鍔犺浇
+        init() {
+          let param = {}
+          param.current = this.queryInfo.current
+          param.size = this.queryInfo.size
+          getPublicityList(param).then(res => {
+            this.publicityList = res.records;
+            this.total = res.total
+          })
+        },
+        //鏌ヨ
+        search() {
+          let param = {}
+          param.current = this.queryInfo.current
+          param.realName = this.queryInfo.realName
+          param.nickName = this.queryInfo.nickName
+          param.size = this.queryInfo.size
+          getPublicityList(param).then(res => {
+            this.publicityList = res.records;
+            this.total = res.total
+            this.current = res.current
+          })
+        },
+
       }
-      )
-      this.addPublicityVisibel = false;
-      })
-    },
-    //鍏抽棴涔嬪墠
-    addPublicityClose() {
-      this.addPublicityVisibel = false;
-    },
-    detailsVisibleclose() {
-      this.detailsVisible = false;
-    },
-    //鍒嗛〉鏂规硶
-    handleCurrentChange(val) {
-      this.queryInfo.current = val;
-      this.search();
-    },
-
-    //鍏叡瀹d紶鍔犺浇
-    init() {
-      let param = {}
-      param.current = this.queryInfo.current
-      param.size = this.queryInfo.size
-      getPublicityList(param).then(res => {
-        this.publicityList = res.records;
-        this.total = res.total
-      })
-    },
-    //鏌ヨ
-    search() {
-      let param = {}
-      param.realName = this.queryInfo.realName
-      param.nickName = this.queryInfo.nickName
-      param.size = this.queryInfo.size
-      getPublicityList(param).then(res => {
-        this.publicityList = res.records;
-        this.total = res.total
-        this.current = res.current
-      })
-    },
-
-  }
 }
 </script>
 
@@ -327,4 +344,4 @@
 ::v-deep(.el-table thead) {
   color: #000000;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0