Skip to content

Commit

Permalink
Update Assign.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
anjoy8 committed Jul 15, 2020
1 parent 7d822c9 commit 4f74b43
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .doc/contents/Update/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@

## 更新日志

### 2020-07-15
> 重要内容更新:权限分配页中,按钮展示优化,去掉了 `_{id}` 非必要部分. [7d822c9](https://github.com/anjoy8/Blog.Admin/commit/7d822c987c39ec7b00deb1c5b1c54c06b023f928)
> 注意要保证后端代码同步更新。

### 2020-07-13
> 重要内容更新:左侧导航条支持外链(必须满足正确的 `URL` 要求,比如带 `Http` 协议) [7d822c9](https://github.com/anjoy8/Blog.Admin/commit/7d822c987c39ec7b00deb1c5b1c54c06b023f928)

### 2020-05-01
> 重要内容更新:集成按钮级别权限
Expand Down
4 changes: 4 additions & 0 deletions src/style/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,8 @@ body {

.scrollbar-handle.el-scrollbar > :first-child {
overflow-x: hidden !important;
}

a{
text-decoration: none;
}
19 changes: 14 additions & 5 deletions src/views/Permission/Assign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
<span>
<el-checkbox-group v-model="assignBtns">
<el-checkbox v-for="btn in data.btns" :key="btn.value"
:label="btn.label+'_'+btn.value"></el-checkbox>
:label="btn.value.toString()">
{{btn.label}}
</el-checkbox>
</el-checkbox-group>

</span>
Expand Down Expand Up @@ -160,14 +162,15 @@
let _this=this;
this.loadingSave=true;
this.loadingSaveStr='保存中...';
console.log(this.$refs.tree.getCheckedKeys());
console.log(this.assignBtns)
//console.log(this.$refs.tree.getCheckedKeys());
//console.log(this.assignBtns)
let pids = this.$refs.tree.getCheckedKeys();
try {
if (this.assignBtns.length > 0) {
for (let i = 0; i < this.assignBtns.length; i++) {
let assginbtn = this.assignBtns[i].split("_")[1];
if (assginbtn > 0) {
// let assginbtn = this.assignBtns[i].split("_")[1];
let assginbtn = this.assignBtns[i];
if (assginbtn && assginbtn > 0) {
pids.push(assginbtn);
}
}
Expand Down Expand Up @@ -319,6 +322,12 @@
this.loadingSave=true;
this.loadingSaveStr='加载中...';
this.getRoles();
this.$message({
message: "[2020-07-22 去掉该提醒] 菜单按钮展示方式已变更,请保证后端代码Blog.Core为最新",
type: 'warning'
});
// this.getPermissions();
}
}
Expand Down

0 comments on commit 4f74b43

Please sign in to comment.