瀏覽代碼

用户管理

LinHGL 5 年之前
父節點
當前提交
9defee31e4
共有 1 個文件被更改,包括 13 次插入4 次删除
  1. 13 4
      src/views/UserMes/userMes.vue

+ 13 - 4
src/views/UserMes/userMes.vue

@@ -70,7 +70,7 @@
           <el-button slot="append" icon="el-icon-search"></el-button>
         </el-input>
       </el-col>
-      <el-col :span="4"><el-button type="success" icon="el-icon-plus">批量导入</el-button></el-col>
+      <el-col :span="6" class="sizeA"><el-button type="success" icon="el-icon-plus">批量导入</el-button></el-col>
     </el-row>
     <el-table :data="tableData" style="width: 100%" border stripe>
       <el-table-column prop="name" align="center" label="姓名" width="100"> </el-table-column>
@@ -97,6 +97,9 @@
         </template>
       </el-table-column>
     </el-table>
+    <el-col class="paging">
+      <el-pagination background layout="prev, pager, next" :total="1000"></el-pagination>
+    </el-col>
   </div>
 </template>
 
@@ -219,13 +222,15 @@ export default {
         })
         .catch(_ => {});
     },
-    open1() {
-      this.$confirm('此操作将永久注销该账号, 是否继续?', '提示', {
+    open1(num) {
+      console.log(num);
+      this.$confirm('确认注销此用户吗?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
       })
         .then(() => {
+          this.$set(this.tableData[num], `state`, '0');
           this.$message({
             type: 'success',
             message: '注销成功!',
@@ -234,7 +239,7 @@ export default {
         .catch(() => {
           this.$message({
             type: 'info',
-            message: '已取消注销',
+            message: '已取消',
           });
         });
     },
@@ -267,4 +272,8 @@ export default {
 .sizeA {
   padding: 30px;
 }
+.paging {
+  text-align: right;
+  margin: 10px 0;
+}
 </style>