Selaa lähdekoodia

角色和模块接口联调

wangrulan 2 vuotta sitten
vanhempi
commit
7bba918b9b

+ 4 - 2
src/common/less/layout.less

@@ -7,7 +7,7 @@
       height: 60px;
       line-height: 60px;
       // background-color: #409EFF;
-      background: linear-gradient(to right, #409EFF, #a5d3fc);
+      background: linear-gradient(to right, #409EFF, #86c6fe);
       padding-left: 20px;
       color: #fff;
       font-size: 20px;
@@ -43,7 +43,7 @@
         line-height: 15px;
         text-align: center;
         position: absolute;
-        bottom: 0;
+        bottom: 5px;
         background-color: #409EFF;
         color: #fff;
       }
@@ -70,11 +70,13 @@
         width:calc(~'100% - 20px');
         // width:100%;
         height: calc(~'100vh - 130px');
+        // height: calc(~'100vh - 130px');
         background-color: #fff;
         // margin-left: 10px;
         margin-top: 10px;
         padding: 10px;
         box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
+        overflow: auto;
       }
     }
   }

+ 7 - 0
src/common/less/public.less

@@ -133,4 +133,11 @@ i {
 
 .el-table th>.cell{
   font-weight: bold;
+}
+
+.el-pagination{
+  float: right;
+}
+.el-table td, .el-table th{
+  padding: 10px 0;
 }

+ 2 - 3
src/components/permissions/index.vue

@@ -45,9 +45,9 @@
         /<span class="fontBlur pointer marginLeft5">{{activeMenu}}</span>
       </div>
       <div class="list">
-        <keep-alive>
+        <!-- <keep-alive> -->
           <router-view />
-        </keep-alive>
+        <!-- </keep-alive> -->
       </div>
     </div>
   </div>
@@ -123,7 +123,6 @@ export default {
       this.isCollapse = !this.isCollapse
     },
     navLike(val){
-      console.log('val: ', val);
       this.$router.push({
           path:val.url,
           query: {

+ 19 - 29
src/components/permissions/module/index.vue

@@ -38,8 +38,8 @@
           size="small"
         >
           <el-option label="全部" value="0" />
-          <el-option label="web" value="web" />
-          <el-option label="app" value="app" />
+          <el-option label="app" value="1" />
+          <el-option label="web" value="2" />
         </el-select>
       </el-form-item>
       <el-form-item style="float: right">
@@ -96,7 +96,7 @@
       <el-table-column label="模块名称" align="center" prop="functionName" />
       <el-table-column label="系统" align="center" prop="systemName" />
       <el-table-column label="客户端" align="center" prop="clientName" />
-      <el-table-column label="介绍" align="center" prop="clientName" />
+      <el-table-column label="介绍" align="center" prop="clientName" :show-overflow-tooltip="true"/>
       <!-- <el-table-column label="app优先级" align="center" prop="appPriority" />
       <el-table-column label="web优先级" align="center" prop="webPriority" />
       <el-table-column label="app链接" align="center" prop="appUrl" />
@@ -218,22 +218,11 @@ export default {
       queryParams: {
         current: 1,
         pageSize: 10,
-        functionName: "",
-        system: "",
-        client: "",
+        functionName: null,
+        system: null,
+        client: '0',
       },
-      tableList: [
-        {
-          functionName: "投诉大屏",
-          systemName: "大屏",
-          clientName: "web",
-        },
-        {
-          functionName: "工单查询",
-          systemName: "流程",
-          clientName: "web",
-        },
-      ],
+      tableList: [],
       total: 0,
       multiple: true,
       delList:[],
@@ -257,24 +246,24 @@ export default {
   computed: {},
   watch: {},
   created() {
+    console.log('模块')
     this.init();
     this.getList();
   },
   methods: {
     init() {
-      // getSystemList().then(res=>{
-      //   console.log('res: ', res);
-      //   this.systemList = res.data
-      // })
+      getSystemList().then(res=>{
+        console.log('res: ', res);
+        this.systemList = res.data
+      })
     },
     getList() {
-      // this.loading = true;
-      // getFunctionList(this.queryParams).then(res=>{
-      //   console.log('res: ', res);
-      // this.loading = false;
-      //   this.tableList = res.data;
-      //   this.total = res.total
-      // })
+      this.loading = true;
+      getFunctionList(this.queryParams).then(res=>{
+        this.loading = false;
+        this.tableList = res.data.list;
+        this.total = res.data.total
+      })
     },
     handleQuery() {
       this.getList();
@@ -282,6 +271,7 @@ export default {
     // 重置
     resetQuery() {
       this.resetForm("queryForm");
+      this.getList();
     },
     handleSelectionChange(val) {
       console.log("val: ", val);

+ 6 - 3
src/components/permissions/role/index.vue

@@ -49,7 +49,7 @@
       <el-table-column label="角色名称" align="center" prop="roleName" />
       <el-table-column label="系统" align="center" prop="systemName" />
       <el-table-column label="系统id" align="center" prop="system" />
-      <el-table-column label="角色描述" align="center" prop="system" />
+      <el-table-column label="角色描述" align="center" prop="roleDescription" :show-overflow-tooltip="true"/>
     </el-table>
     <pagination
         v-show="total>0"
@@ -73,8 +73,8 @@ export default {
       queryParams: {
         current: 1,
         pageSize: 10,
-        roleName: "",
-        system: "",
+        roleName: null,
+        system: null,
       },
       tableList: [],
       total: 0,
@@ -94,7 +94,9 @@ export default {
       })
     },
     getList() {
+      this.loading = true;
       getRoleList(this.queryParams).then(res=>{
+        this.loading = false;
         this.tableList = res.data.list;
         this.total = res.data.total
       })
@@ -105,6 +107,7 @@ export default {
     // 重置
     resetQuery() {
       this.resetForm("queryForm");
+      this.getList()
     },
   },
 };