明梦爽
2022-01-26 08e0f4f66d2e39a19b91e8e2fe1bcad75569d4b8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
  <div>
    <el-card class="box-card">
      <!-- 新闻表格区域 -->
      <el-table 
        :data="tableData"
        border 
        style="width: 100%" 
        :header-cell-style="{textAlign: 'center'}" 
        :cell-style="{ textAlign: 'center' }"
      >
        <el-table-column type="index" label="序号" width="50">
          <!-- <template slot-scope="scope">
            <span>{{ (currentPage-1)*pageSize+scope.$index+1 }}</span>
          </template> -->
        </el-table-column>
        <el-table-column prop="username" label="普通管理员账号" width="" >
        </el-table-column>
        <el-table-column prop="id" label="id" width="">
        </el-table-column>
        <el-table-column label="操作" width="">
          <template slot-scope="scope">
            <!-- {{ scope.row.id }} -->
            <div>
              <el-button type="success" @click="look(scope.row.id)">添加</el-button>
              <el-button type="warning" @click="showEditDialog(scope.row.id)">修改</el-button>
              <el-button type="info" @click="deleteNews(scope.row.id)">删除</el-button>
            </div>
          </template>
          
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
 
<script>
import { getmain,editAccount } from '../../api/api'
export default {
  data() {
    return {
      tableData:[], //普通管理员列表
    }
  },
  created(){
    this.ready()
  },
  methods:{
    ready(){
      getmain().then(res => {
        console.log(res);
        if(res.code == 200){
          this.tableData = res.data
        }
      })
    }
  }
}
</script>
 
<style lang="less" scoped>
 
</style>