浏览代码

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/pblUserManage

huangwenhao 7 月之前
父节点
当前提交
6ef4bf8d28
共有 1 个文件被更改,包括 315 次插入274 次删除
  1. 315 274
      src/components/examine.vue

+ 315 - 274
src/components/examine.vue

@@ -1,17 +1,21 @@
 <template>
-  <div class="table-container">
+  <div class="table_container">
     <div class="title_examine">
       <p style="font-size: 30px;font-weight: 400;margin-left: -91%;padding-top: 20px">账号审核</p>
-  </div>
+    </div>
     <div class="examine">
       <div class="examine_title1">
-        <a @click="showPending" :style="{ color: isPending ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">待审核({{ tableData.length }})</a>
+        <a @click="showPending"
+          :style="{ color: isPending ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">待审核({{ tableData.length
+          }})</a>
       </div>
       <div class="examine_title2">
-        <a @click="showApproved" :style="{ color: isApproved ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已通过</a>
+        <a @click="showApproved"
+          :style="{ color: isApproved ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已通过</a>
       </div>
       <div class="examine_title3">
-        <a @click="showRefused" :style="{ color: isRefused ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已拒绝</a>
+        <a @click="showRefused"
+          :style="{ color: isRefused ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">已拒绝</a>
       </div>
       <div class="examine_title4">
         <a @click="showAll" :style="{ color: isAll ? 'black' : 'rgb(179, 179, 179)', fontWeight: 'bold' }">全部记录</a>
@@ -30,108 +34,114 @@
 
       <!-- 待审核的数据 -->
       <div v-if="isPending">
-        <el-table :data="currentTableData" border style="width: 100%; background-color: white;" @selection-change="handleSelectionChange">
+        <el-table :data="currentTableData" border style="width: 100%; background-color: white;"
+          @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="50"></el-table-column>
-          <el-table-column prop="company" label="组织名称" width="200">
+          <el-table-column prop="company" label="组织名称" width="400">
             <template slot-scope="scope">{{ scope.row.company }}</template>
           </el-table-column>
-          <el-table-column prop="phone" label="电话/邮箱" width="240"></el-table-column>
-          <el-table-column prop="name" label="姓名" width="220" show-overflow-tooltip :label-class-name="'address-column'"></el-table-column>
-          <el-table-column prop="submission_time" label="提交时间" width="220"></el-table-column>
-          <el-table-column prop="remarks" label="备注" width="230"></el-table-column>
-          <el-table-column label="操作" width="248">
-            <template slot-scope="scope">
-              <button @click="handleApprove(scope.row)" style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">通过</button>
-              <button @click="handleIgnore(scope.row)" style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 35px;">拒绝</button>
+          <el-table-column prop="phone" label="电话/邮箱" width="400"></el-table-column>
+          <el-table-column prop="name" label="姓名" width="400" show-overflow-tooltip
+            :label-class-name="'address-column'"></el-table-column>
+          <el-table-column prop="submission_time" label="提交时间" width="400"></el-table-column>
+          <el-table-column prop="remarks" label="备注" width="400"></el-table-column>
+          <el-table-column label="操作" width="200">
+            <template slot-scope="{ row }">
+              <button @click="ajax_move_to_approved(row.userid, row.companyNumber)"
+                style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">通过</button>
+              <button @click="ajax_move_to_rejected(row.userid, row.companyNumber)"
+                style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 35px;">拒绝</button>
             </template>
           </el-table-column>
         </el-table>
       </div>
-        <!-- 分页组件 -->
-        <el-pagination v-if="Pending_request"
-          :current-page="currentPage" 
-          :page-size="pageSize" 
-          :page-sizes="pageSizeOptions"
-          :total="tableData.length" 
-          @size-change="handlePageSizeChange" 
-          @current-change="handlePageChange"
-          layout="total,sizes,prev, pager, next, jumper">
-        </el-pagination>
-
-    <!-- 已通过的数据 -->
-    <div v-if="isApproved">
-      <el-table :data="currentApprovedData" border style="width: 100%; background-color: white;"  @selection-change="handleApprovedSelectionChange">
-        <el-table-column type="selection" width="50" />
-        <el-table-column prop="company" label="组织名称" width="200">
-          <template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
-        </el-table-column>
-        <el-table-column prop="phone" label="电话/邮箱" width="200" />
-        <el-table-column prop="name" label="姓名" width="200" show-overflow-tooltip :label-class-name="'address-column'" />
-        <el-table-column prop="submission_time" label="提交时间" width="200" />
-        <el-table-column prop="remarks" label="备注" width="180" />
-        <el-table-column prop="Pending_time" label="审核时间" width="200" />
-        <el-table-column prop="open_organization" label="开通组织" width="200">
-          <template slot="default" slot-scope="scope">{{ scope.row.open_organization }}</template>
-        </el-table-column>
-      </el-table>
       <!-- 分页组件 -->
-      <el-pagination :current-page="currentApprovedPage" :page-size="pageSize" :page-sizes="pageSizeOptions"
-        :total="approvedData.length" @size-change="handlePageSizeChange" @current-change="handleApprovedPageChange"
-        layout="total,sizes,prev, pager, next, jumper" />
-    </div>
+      <el-pagination v-if="Pending_request" :current-page="currentPage" :page-size="pageSize"
+        :page-sizes="pageSizeOptions" :total="tableData.length" @size-change="handlePageSizeChange"
+        @current-change="handlePageChange" layout="total,sizes,prev, pager, next, jumper">
+      </el-pagination>
+
+      <!-- 已通过的数据 -->
+      <div v-if="isApproved">
+        <el-table :data="currentApprovedData" border style="width: 100%; background-color: white;"
+          @selection-change="handleApprovedSelectionChange">
+          <el-table-column type="selection" width="50" />
+          <el-table-column prop="company" label="组织名称" width="200">
+            <template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
+          </el-table-column>
+          <el-table-column prop="phone" label="电话/邮箱" width="200" />
+          <el-table-column prop="name" label="姓名" width="200" show-overflow-tooltip
+            :label-class-name="'address-column'" />
+          <el-table-column prop="submission_time" label="提交时间" width="200" />
+          <el-table-column prop="remarks" label="备注" width="180" />
+          <el-table-column prop="Pending_time" label="审核时间" width="200" />
+          <el-table-column prop="open_organization" label="开通组织" width="200">
+            <template slot="default" slot-scope="scope">{{ scope.row.open_organization }}</template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页组件 -->
+        <el-pagination :current-page="currentApprovedPage" :page-size="pageSize" :page-sizes="pageSizeOptions"
+          :total="approvedData.length" @size-change="handlePageSizeChange" @current-change="handleApprovedPageChange"
+          layout="total,sizes,prev, pager, next, jumper" />
+      </div>
 
-    <!-- 已拒绝的数据 -->
-    <div v-if="isRefused">
-      <el-table :data="currentRefusedData" border  style="width: 100%; background-color: white;"  @selection-change="handleRefusedSelectionChange">
-        <el-table-column type="selection" width="50" />
-        <el-table-column prop="company" label="组织名称" width="200">
-          <template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
-        </el-table-column>
-        <el-table-column prop="phone" label="电话/邮箱" width="200" />
-        <el-table-column prop="name" label="姓名" width="200" show-overflow-tooltip :label-class-name="'address-column'" />
-        <el-table-column prop="submission_time" label="提交时间" width="200" />
-        <el-table-column prop="remarks" label="备注" width="180" />
-        <el-table-column prop="Pending_time" label="审核时间" width="200" />
-        <el-table-column label="操作" width="195">
-          <template slot="default" slot-scope="scope">
-            <button @click="handleEdit(scope.row)" style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">移动至待审核</button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <!-- 分页组件 -->
-      <el-pagination :current-page="currentRefusedPage" :page-size="pageSize" :page-sizes="pageSizeOptions"
-        :total="RefusedData.length" @size-change="handlePageSizeChange" @current-change="handleRefusedPageChange"
-        layout="total,sizes,prev, pager, next, jumper" />
-    </div>
+      <!-- 已拒绝的数据 -->
+      <div v-if="isRefused">
+        <el-table :data="currentRefusedData" border style="width: 100%; background-color: white;"
+          @selection-change="handleRefusedSelectionChange">
+          <el-table-column type="selection" width="50" />
+          <el-table-column prop="company" label="组织名称" width="200">
+            <template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
+          </el-table-column>
+          <el-table-column prop="phone" label="电话/邮箱" width="200" />
+          <el-table-column prop="name" label="姓名" width="200" show-overflow-tooltip
+            :label-class-name="'address-column'" />
+          <el-table-column prop="submission_time" label="提交时间" width="200" />
+          <el-table-column prop="remarks" label="备注" width="180" />
+          <el-table-column prop="Pending_time" label="审核时间" width="200" />
+          <el-table-column label="操作" width="195">
+            <template slot-scope="{ row }">
+              <button @click="ajax__move_to_pending_from_rejected(row.userid, row.companyNumber)"
+                style="color: #308fff; background: none; border: none; cursor: pointer; margin-left: 25px;">移动至待审核</button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页组件 -->
+        <el-pagination :current-page="currentRefusedPage" :page-size="pageSize" :page-sizes="pageSizeOptions"
+          :total="RefusedData.length" @size-change="handlePageSizeChange" @current-change="handleRefusedPageChange"
+          layout="total,sizes,prev, pager, next, jumper" />
+      </div>
 
-    <!-- 全部记录的数据 -->
-    <div v-if="isAll">
-      <el-table :data="currentAllData" border  style="width: 100%; background-color: white;"  @selection-change="handleAllSelectionChange">
-        <el-table-column type="selection" width="50" />
-        <el-table-column prop="company" label="组织名称" width="200">
-          <template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
-        </el-table-column>
-        <el-table-column prop="phone" label="电话/邮箱" width="200" />
-        <el-table-column prop="name" label="姓名" width="200" show-overflow-tooltip :label-class-name="'address-column'" />
-        <el-table-column prop="submission_time" label="提交时间" width="200" />
-        <el-table-column prop="remarks" label="备注" width="180" />
-        <el-table-column prop="Pending_time" label="审核时间" width="200" />
-        <el-table-column label="操作" width="200" prop="status">
-          <template slot="default" slot-scope="scope">
-            {{ getStatusText(scope.row.status) }}
-          </template>
-        </el-table-column>
-      </el-table>
-      <!-- 分页组件 -->
-      <el-pagination :current-page="currentAllPage" :page-size="pageSize" :page-sizes="[5, 10, 25]"
-        :total="AllData.length" @size-change="handlePageSizeChange" @current-change="handleAllPageChange"
-        layout="total,sizes,prev, pager, next, jumper" />
+      <!-- 全部记录的数据 -->
+      <div v-if="isAll">
+        <el-table :data="currentAllData" border style="width: 100%; background-color: white;"
+          @selection-change="handleAllSelectionChange">
+          <el-table-column type="selection" width="50" />
+          <el-table-column prop="company" label="组织名称" width="200">
+            <template slot="default" slot-scope="scope">{{ scope.row.company }}</template>
+          </el-table-column>
+          <el-table-column prop="phone" label="电话/邮箱" width="200" />
+          <el-table-column prop="name" label="姓名" width="200" show-overflow-tooltip
+            :label-class-name="'address-column'" />
+          <el-table-column prop="submission_time" label="提交时间" width="200" />
+          <el-table-column prop="remarks" label="备注" width="180" />
+          <el-table-column prop="Pending_time" label="审核时间" width="200" />
+          <el-table-column label="操作" width="200" prop="status">
+            <template slot="default" slot-scope="scope">
+              {{ getStatusText(scope.row.status) }}
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页组件 -->
+        <el-pagination :current-page="currentAllPage" :page-size="pageSize" :page-sizes="[5, 10, 25]"
+          :total="AllData.length" @size-change="handlePageSizeChange" @current-change="handleAllPageChange"
+          layout="total,sizes,prev, pager, next, jumper" />
+      </div>
     </div>
-  </div>
 
- 
 
-    </div>
+
+  </div>
 </template>
 
 <script>
@@ -162,7 +172,7 @@ export default {
       approvedData: [],
       RefusedData: [],
       AllData: [],
-      Pending_request:true,
+      Pending_request: true,
       isPending: true, // 初始状态为待审核
       isApproved: false,
       isRefused: false,
@@ -248,21 +258,6 @@ export default {
       console.log('执行搜索');
     },
 
-    handleApprove(row) {
-      // 调用已通过的处理方法
-      this.ajax__handle_pending_action(row.companyNumber, 'approve');  // 通过操作
-    },
-
-    handleIgnore(row) {
-      // 调用已拒绝的处理方法
-      this.ajax__handle_pending_action(row.companyNumber, 'ignore');  // 忽略操作
-    },
-
-    handleMoveToPending(row) {
-      // 调用移回待审核的方法
-      this.ajax__move_to_pending_from_rejected(row.companyNumber);  // 移动至待审核
-    },
-
     // 创建账户的逻辑
     handleCreateAccount() {
       // 在这里可以进行创建账户的逻辑
@@ -286,17 +281,15 @@ export default {
 
     // 待审核
     showPending() {
-      console.log("Clicked Pending!");
       this.isPending = true;
       this.isApproved = false;
       this.isRefused = false;
       this.isAll = false;
-      this.Pending_request=true;
+      this.Pending_request = true;
     },
     // 已通过
     showApproved() {
-      console.log("Clicked Approved!");
-      this.Pending_request=false;
+      this.Pending_request = false;
       this.isPending = false;
       this.isApproved = true;
       this.isRefused = false;
@@ -309,7 +302,7 @@ export default {
       this.isApproved = false;
       this.isRefused = true;
       this.isAll = false;
-      this.Pending_request=false;
+      this.Pending_request = false;
     },
     //全部记录
     showAll() {
@@ -317,7 +310,7 @@ export default {
       this.isApproved = false;
       this.isRefused = false;
       this.isAll = true;
-      this.Pending_request=false;
+      this.Pending_request = false;
     },
     // 用于切换组织
     selectOrg(org) {
@@ -329,13 +322,13 @@ export default {
     },
     // 用于显示待审核的表格数据
     ajaxpending() {
-      console.log(11111);
+      // console.log(11111);
 
       let params = [
         {
           functionName: "select_requestuser",  // 调用存储过程的名称
           r_type: 0,
-          page:1,
+          page: 1,
           r_num: 20,
         },
       ];
@@ -347,13 +340,14 @@ export default {
 
           this.tableData = res.data[0].map(user => ({
             company: user.schoolName || '未知', // 组织名称
-            phone: user.contact_info || '未知', 
-            name: user.name|| '未知', // 真实姓名对应 name
+            phone: user.contact_info || '未知',
+            name: user.name || '未知', // 真实姓名对应 name
             submission_time: user.create_at || '未知', // 提交时间对应 数据库里的create_at 
             remarks: user.remark || '未知', // 备注内容对应 remark
+            userid: user.id || '未知',
           })); // 将数据存储到 tableData 中
           // 打印映射后的用户信息
-          console.log(this.tableData);
+          console.log("待审核的数据为:", res.data);
         })
         .catch((err) => {
           // 处理失败的响应
@@ -364,12 +358,12 @@ export default {
 
     // 用于显示已通过的表格数据
     ajaxapproved() {
-      console.log(22222);
+      // console.log(22222);
       let params = [
         {
           functionName: "select_requestuser",  // 调用存储过程的名称
           r_type: 1,
-          page:1,
+          page: 1,
           r_num: 100,
         },
       ];
@@ -378,16 +372,17 @@ export default {
           // 假设res.data是一个返回已通过的数组
           this.approvedData = res.data[0].map(user => ({
             company: user.schoolName || '未知', // 组织名称对应 schoolName
-            phone: user.contact_info || '未知', 
+            phone: user.contact_info || '未知',
             name: user.name || '未知', // 真实姓名对应 alias
             submission_time: user.create_at || '未知', // 提交时间对应 数据库里的create_at
             remarks: user.remark || '未知', // 备注内容对应 remark
             Pending_time: user.active_at || '未知', // 处理时间对应 update_time
             open_organization: user.school_name || '未知', // 所属组织对应 school_name
+            userid: user.id || '未知',
           }));
           // 在这里进行已通过数据的获取和处理
-          console.log(this.approvedData);
-          console.log("获取到的数据为:" + res.approvedData)
+          // console.log(this.approvedData);
+          console.log("已通过的数据为:", res.data);
         })
         .catch((err) => {
           // 处理失败的响应
@@ -398,12 +393,11 @@ export default {
 
     // 用于显示已拒绝的表格数据
     ajaxrefused() {
-      console.log(33333);
       let params = [
         {
           functionName: "select_requestuser",  // 调用存储过程的名称
           r_type: 2,
-          page:1,
+          page: 1,
           r_num: 100,
         },
       ];
@@ -417,10 +411,11 @@ export default {
             submission_time: user.create_at || '未知', // 提交时间对应 数据库里的create_at
             remarks: user.remark || '未知', // 备注内容对应 remark
             Pending_time: user.active_at || '未知', // 处理时间对应 update_time
+            userid: user.id || '未知',
           }));
           // 在这里进行已拒绝数据的获取和处理
-          console.log(this.RefusedData);
-          console.log("获取到的数据为:" + res.RefusedData)
+          // console.log(this.RefusedData);
+          console.log("已拒绝的数据为:", res.data);
         })
         .catch((err) => {
           // 处理失败的响应
@@ -429,174 +424,206 @@ export default {
         })
     },
 
-      // 用于显示全部记录的表格数据
-      ajaxAll() {
-        console.log("获取所有记录");
-
-        // 假设分别调用待审核、已通过、已拒绝的请求
-        Promise.all([
-          this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
-        { functionName: "select_requestuser", r_type: 0,page:1,r_num: 100,}
-      ]),
-          this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
-        { functionName: "select_requestuser", r_type: 1,page:1,r_num: 100, }
-      ]),
-          this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
-        { functionName: "select_requestuser", r_type: 2,page:1,r_num: 100, }
+    // 用于显示全部记录的表格数据
+    ajaxAll() {
+      console.log("获取所有记录");
+
+      // 假设分别调用待审核、已通过、已拒绝的请求
+      Promise.all([
+        this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
+          { functionName: "select_requestuser", r_type: 0, page: 1, r_num: 100, }
+        ]),
+        this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
+          { functionName: "select_requestuser", r_type: 1, page: 1, r_num: 100, }
+        ]),
+        this.$ajax.post("http://10.3.16.166:7003/api/pbl/localPost", [
+          { functionName: "select_requestuser", r_type: 2, page: 1, r_num: 100, }
+        ])
       ])
-    ])
-    .then((responses) => {
-    // 解构响应
-    const [pendingRes, approvedRes, refusedRes] = responses;
-        // 合并待审核、已通过和已拒绝的数据
-        const AllData = [
-        ...pendingRes.data[0],  // 待审核数据
-        ...approvedRes.data[0], // 已通过数据
-        ...refusedRes.data[0],  // 已拒绝数据
-      ];
-
-      this.AllData = AllData.map(user => ({
-        company: user.schoolName || '未知',
-        phone: user.contact_info || '未知',
-        name: user.name || '未知',
-        submission_time: user.create_at || '未知',
-        remarks: user.remark || '未知',
-        Pending_time: user.active_at || '未知', // 处理时间对应 update_time
-        // status: this.getStatusText(user.r_type), // 显示状态
-      }));
-
-      console.log(this.AllData);
-    })
-    .catch((err) => {
-      this.$message.error("查询失败");
-      console.error(err);
-    });
-
-    },
-
-    // 通过操作,将数据移到已通过
-    ajax_move_to_approved(companyNumber) {
-      let params = [
-        {
-          functionName: "move_to_approved",  // 这里是将数据移至已通过状态的操作
-          u_id: companyNumber,  // 公司编号
-        },
-      ];
-
-      const successMessage = '数据已成功移动到已通过状态!';
+        .then((responses) => {
+          // 解构响应
+          const [pendingRes, approvedRes, refusedRes] = responses;
+          // 合并待审核、已通过和已拒绝的数据
+          const AllData = [
+            ...pendingRes.data[0],  // 待审核数据
+            ...approvedRes.data[0], // 已通过数据
+            ...refusedRes.data[0],  // 已拒绝数据
+          ];
+
+          this.AllData = AllData.map(user => ({
+            company: user.schoolName || '未知',
+            phone: user.contact_info || '未知',
+            name: user.name || '未知',
+            submission_time: user.create_at || '未知',
+            remarks: user.remark || '未知',
+            Pending_time: user.active_at || '未知', // 处理时间对应 update_time
+            // status: this.getStatusText(user.r_type), // 显示状态
+          }));
 
-      // 发起请求
-      this.$ajax
-        .post("http://10.3.16.166:7003/api/pbl/localPost", params)
-        .then((res) => {
-          console.log(res);
-          this.$message({
-            type: 'success',
-            message: successMessage
-          });
-          // 调用其他需要执行的操作,更新数据状态
-          this.refreshTableData();  // 例如刷新表格数据
+          console.log(this.AllData);
         })
         .catch((err) => {
-          this.$message.error("操作失败");
-          console.error("请求失败,错误信息:", err);
+          this.$message.error("查询失败");
+          console.error(err);
         });
-    },
 
-    // 忽略操作,将数据移到已拒绝
-    ajax_move_to_rejected(companyNumber) {
-      let params = [
-        {
-          functionName: "move_to_rejected",  // 这里是将数据移至已拒绝状态的操作
-          u_id: companyNumber,  // 公司编号
-        },
-      ];
+    },
+    // 通过操作,将数据移到已通过
+    ajax_move_to_approved(userid) {
+      const successMessage = '数据已成功移动到已通过状态!';
 
-      const successMessage = '数据已成功移动到已拒绝状态!';
+      // 弹出确认框
+      this.$confirm(`您确定将此数据移至“已通过”状态吗?`, '确认操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        // 确认后发起请求
+        let params = [
+          {
+            functionName: "account_approve_user",  // 这里是将数据移至已通过状态的操作
+            u_id: userid,  // id
+          },
+        ];
 
-      // 发起请求
-      this.$ajax
-        .post("http://10.3.16.166:7003/api/pbl/localPost", params)
-        .then((res) => {
-          console.log(res);
-          this.$message({
-            type: 'success',
-            message: successMessage
+        // 发起请求
+        this.$ajax
+          .post("http://10.3.16.166:7003/api/pbl/localPost", params)
+          .then((res) => {
+            console.log(res);
+            this.$message({
+              type: 'success',
+              message: successMessage,
+            });
+            // 更新数据状态
+            this.refreshTableData();  // 例如刷新表格数据
+            console.log("此条数据处理后的id为:", userid);
+          })
+          .catch((err) => {
+            this.$message.error("操作失败");
+            console.error("请求失败,错误信息:", err);
           });
-          // 调用其他需要执行的操作,更新数据状态
-          this.refreshTableData();  // 例如刷新表格数据
-        })
-        .catch((err) => {
-          this.$message.error("操作失败");
-          console.error("请求失败,错误信息:", err);
+      }).catch(() => {
+        // 取消操作后的提示
+        this.$message({
+          type: 'info',
+          message: '已取消操作',
         });
-    },
-
-    // 刷新数据(假设你需要刷新表格数据)
-    refreshTableData() {
-      // 在这里重新获取数据或者更新视图
-      this.fetchData();  // 例如通过接口重新获取数据
+      });
     },
 
 
-    // 在待审核区域点击通过和忽略
-    ajax__handle_pending_action(companyNumber, actionType) {
-      // 根据不同的操作,设置对应的API函数和提示消息
-      let params = [
-        {
-          functionName: actionType === 'approve' ? "approve_user" : "ignore_user",  // 通过或忽略
-          u_id: companyNumber,  // 传递公司编号
-        },
-      ];
-
-      const actionMessage = actionType === 'approve' ? '通过该条数据' : '忽略该条数据';
-      const successMessage = actionType === 'approve' ? '通过成功!' : '忽略成功!';
-      const cancelMessage = actionType === 'approve' ? '已取消通过' : '已取消忽略';
+    // 忽略操作,将数据移到已拒绝
+    ajax_move_to_rejected(userid) {
+      const successMessage = '数据已成功移动到已拒绝状态!';
 
-      // 弹窗确认
-      this.$confirm(`此操作将会${actionMessage}, 是否继续?`, '提示', {
+      // 弹出确认框
+      this.$confirm(`您确定将此数据移至“已拒绝”状态吗?`, '确认操作', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning'
+        type: 'warning',
       }).then(() => {
-        // 确定后发起请求
+        // 确认后发起请求
+        let params = [
+          {
+            functionName: "account_reject_user",  // 这里是将数据移至已拒绝状态的操作
+            u_id: userid,  // 公司编号
+          },
+        ];
+
+        // 发起请求
         this.$ajax
           .post("http://10.3.16.166:7003/api/pbl/localPost", params)
           .then((res) => {
-            console.log(res);  // 打印成功响应
+            console.log(res);
             this.$message({
               type: 'success',
-              message: successMessage
+              message: successMessage,
             });
-
-            // 如果是通过操作,调用已通过处理函数
-            if (actionType === 'approve') {
-              this.ajax_move_to_approved(companyNumber);
-            } else {
-              // 如果是忽略操作,调用已拒绝处理函数
-              this.ajax_move_to_rejected(companyNumber);
-            }
+            // 更新数据状态
+            this.refreshTableData();  // 例如刷新表格数据
+            console.log("此条数据处理后的id为:", userid);
           })
           .catch((err) => {
-            // 处理失败的响应
-            this.$message.error("处理失败");
+            this.$message.error("操作失败");
             console.error("请求失败,错误信息:", err);
           });
       }).catch(() => {
         // 取消操作后的提示
         this.$message({
           type: 'info',
-          message: cancelMessage
+          message: '已取消操作',
         });
       });
     },
 
+    // 刷新数据(假设你需要刷新表格数据)
+    refreshTableData() {
+      // 在这里重新获取数据或者更新视图
+      this.ajaxpending();  // 例如通过接口重新获取数据
+      this.ajaxapproved();  // 例如通过接口重新获取数据
+      this.ajaxrefused();  // 例如通过接口重新获取数据
+    },
+
+
+    // // 在待审核区域点击通过和忽略
+    // ajax__handle_pending_action(userid, actionType) {
+    //   // 根据不同的操作,设置对应的API函数和提示消息
+    //   let params = [
+    //     {
+    //       functionName: actionType === 'approve' ? "approve_user" : "ignore_user",  // 通过或忽略
+    //       u_id: userid,  // 传递公司编号
+    //     },
+    //   ];
+
+    //   const actionMessage = actionType === 'approve' ? '通过该条数据' : '忽略该条数据';
+    //   const successMessage = actionType === 'approve' ? '通过成功!' : '忽略成功!';
+    //   const cancelMessage = actionType === 'approve' ? '已取消通过' : '已取消忽略';
+
+    //   // 弹窗确认
+    //   this.$confirm(`此操作将会${actionMessage}, 是否继续?`, '提示', {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     type: 'warning'
+    //   }).then(() => {
+    //     // 确定后发起请求
+    //     this.$ajax
+    //       .post("http://10.3.16.166:7003/api/pbl/localPost", params)
+    //       .then((res) => {
+    //         console.log(res);  // 打印成功响应
+    //         this.$message({
+    //           type: 'success',
+    //           message: successMessage
+    //         });
+
+    //         // 如果是通过操作,调用已通过处理函数
+    //         if (actionType === 'approve') {
+    //           this.ajax_move_to_approved(userid);
+    //         } else {
+    //           // 如果是忽略操作,调用已拒绝处理函数
+    //           this.ajax_move_to_rejected(userid);
+    //         }
+    //       })
+    //       .catch((err) => {
+    //         // 处理失败的响应
+    //         this.$message.error("处理失败");
+    //         console.error("请求失败,错误信息:", err);
+    //       });
+    //   }).catch(() => {
+    //     // 取消操作后的提示
+    //     this.$message({
+    //       type: 'info',
+    //       message: cancelMessage
+    //     });
+    //   });
+    // },
+
     // 在已拒绝区域点击移动至待审核
-    ajax__move_to_pending_from_rejected(companyNumber) {
+    ajax__move_to_pending_from_rejected(userid) {
       let params = [
         {
-          functionName: "move_to_pending",  // 移动至待审核的操作
-          u_id: companyNumber,  // 传递公司编号
+          functionName: "account_move_to_pending",  // 移动至待审核的操作
+          u_id: userid,  // id
         },
       ];
 
@@ -618,7 +645,10 @@ export default {
               message: successMessage
             });
             // 调用函数更新数据
-            this.ajax_move_to_pending(companyNumber);  // 数据移回待审核区域
+            // 更新数据状态
+            this.refreshTableData();  // 例如刷新表格数据
+            console.log("此条数据处理后的id为:", userid);
+            this.ajaxpending(userid);  // 数据移回待审核区域
           })
           .catch((err) => {
             this.$message.error("处理失败");
@@ -645,17 +675,24 @@ export default {
 
 <style scoped>
 .content {
-  width: 1410px;
+  width: 100%;
   /* position: relative; */
 }
 
+/* 表格容器样式 */
+.table_container{
+  width: 97%;
+  padding: 30px;
+}
+
 /* 账号审核标题样式 */
-.title_examine{
- width: 100%;
- height: 100px;
- background-color: #fff;
- border-radius: 10px 10px 10px 10px;
+.title_examine {
+  width: 100%;
+  height: 100px;
+  background-color: #fff;
+  border-radius: 10px 10px 10px 10px;
 }
+
 /* 搜索框容器样式 */
 .search-container {
   position: absolute;
@@ -709,13 +746,9 @@ export default {
   /* 设置透明度 */
 }
 
-.table-container {
-  padding: 30px;
-  /* 可选:添加一些内边距 */
-}
-
 .el-table {
   border: 1px solid #dcdfe6;
+  
   /* 设置表格边框 */
 }
 
@@ -1134,15 +1167,23 @@ hr {
 .el-checkbox {
   margin-right: none !important;
 }
-.cell{
+
+.cell {
   position: absolute;
 }
+
 .el-checkbox span {
-    margin-left: 3px;
+  margin-left: 3px;
 }
+
 /* 取消 ElTableColumn 默认的 inline-block 和 vertical-align 样式 */
 .el-scrollbar__view {
   display: block !important;
   /* 或者 display: flex; 根据你的需求 */
 }
+/* 取消 ElTableColumn 的下方滚动条样式 */
+.el-table--scrollable-x .el-table__body-wrapper{
+  overflow-x: hidden !important;  /* 禁止水平滚动 */
+  overflow-y: auto;    /* 保留垂直滚动(如果需要) */
+}
 </style>