基于廊坊系统为基础,国防科技大学系统演示Demo
surprise
2024-04-28 c310c155e3e91e6b285b3fb3519a3ef7c6690d66
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<template>
  <div class="authorityManagement_box">
    <My-bread :list="['运维管理', '权限管理']"></My-bread>
    <el-divider />
    <div class="inquire">
      <el-form ref="formData1" :model="form" :inline="true">
        <el-form-item label="" prop="name">
          <el-input  v-model="form.name" placeholder="关键字" />
        </el-form-item>
 
        <el-form-item>
          <el-button @click="onSubmit" icon="el-icon-search">查询</el-button>
        </el-form-item>
      </el-form>
      <div class="btn_box">
        <el-button icon="el-icon-circle-plus-outline">添加</el-button>
        <el-button type="primary">修改</el-button>
        <el-button>删除</el-button>
      </div>
    </div>
    <div class="table_box">
      <el-table :data="tableData" stripe style="width: 100%">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="name" label="角色名" />
        <el-table-column prop="ip" label="IP地址" />
        <el-table-column prop="creationtime" label="创建时间" />
 
        <el-table-column fixed="right" label="操作" width="350">
          <template #default>
            <!-- <el-button type="primary" size="small">修改</el-button> -->
            <el-button type="primary" size="small">菜单授权</el-button>
            <el-button type="primary" size="small">图层授权</el-button>
            <el-button type="primary" size="small">用户授权</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div style="margin-top: 40px" class="pagination_box">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage4"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="10"
          layout="total, sizes, prev, pager, next, jumper"
          :total="2"
        >
        </el-pagination>
      </div>
    </div>
  </div>
</template>
 
<script>
import MyBread from "../../components/MyBread.vue";
 
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    MyBread,
  },
 
  data() {
    return {
      currentPage4: 1,
      form: {
        name: "",
        region: "",
        jurisdiction: "",
      },
 
      tableData: [
        {
          creationtime: "2022-05-03",
          name: "admin",
          ip: "192.168.11.1",
        },
        {
          creationtime: "2022-05-03",
          name: "admin",
          ip: "192.168.11.1",
        },
      ],
    };
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
    onSubmit() {},
  },
  created() {},
};
</script>
<style lang="less" scoped>
//@import url(); 引入公共css类
.authorityManagement_box {
  background: rgb(240, 242, 245);
  border-radius: 10px;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  .inquire {
    padding: 10px;
    margin-top: 20px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
    margin-bottom: 20px;
    display: flex;
    .btn_box {
      margin-left: auto;
    }
  }
  .table_box {
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid rgb(202, 201, 204);
  }
}
</style>