Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
itimor committed Jun 16, 2021
1 parent afaacbc commit 41536d0
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
5 changes: 4 additions & 1 deletion backend/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
apps=(systems tools notices workflows tickets)
rm -rf core.db
for app in ${apps[@]};do
echo $app
rm -rf $app/migrations
done

for app in ${apps[@]};do
echo $app
python manage.py makemigrations $app
done

Expand Down
2 changes: 1 addition & 1 deletion backend/notices/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.0.3 on 2021-05-09 08:31
# Generated by Django 3.0.3 on 2021-06-16 08:30

from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion backend/systems/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.0.3 on 2021-05-09 08:31
# Generated by Django 3.0.3 on 2021-06-16 08:30

import django.contrib.auth.models
from django.db import migrations, models
Expand Down
3 changes: 0 additions & 3 deletions backend/systems/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
'/api/sys/auth/jwt-token-auth/',
'/api/sys/auth/getuserinfo/',
'/api/sys/auth/getmenubutons/',
'/api/sys/user/',
'/api/workflow/customfield/',
'/api/workflow/state/',
]


Expand Down
4 changes: 2 additions & 2 deletions backend/tickets/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.0.3 on 2021-05-09 08:31
# Generated by Django 3.0.3 on 2021-06-16 08:30

from django.conf import settings
from django.db import migrations, models
Expand All @@ -10,8 +10,8 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('workflows', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('workflows', '0001_initial'),
]

operations = [
Expand Down
2 changes: 1 addition & 1 deletion backend/tools/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.0.3 on 2021-05-09 08:31
# Generated by Django 3.0.3 on 2021-06-16 08:30

from django.db import migrations, models
import tools.storage
Expand Down
2 changes: 1 addition & 1 deletion backend/workflows/management/commands/init_leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def handle(self, *args, **options):
self.stdout.write(self.style.SUCCESS('############ 初始化角色权限 ###########'))
menus = [34, 35, 36, 37, 38, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 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]
perms = [92, 96, 48, 44, 52, 73, 74, 75, 76, 85, 86, 87, 88, 81, 82, 83, 84, 77, 78, 79, 80, 28, 32, 68, 64]
perms = [52, 60, 92, 96, 48, 44, 52, 73, 74, 75, 76, 85, 86, 87, 88, 81, 82, 83, 84, 77, 78, 79, 80, 28, 32, 68, 64]
menu_obj_list = Menu.objects.filter(id__in=menus)
perm_obj_list = Permission.objects.filter(id__in=perms)

Expand Down
2 changes: 1 addition & 1 deletion backend/workflows/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.0.3 on 2021-05-09 08:31
# Generated by Django 3.0.3 on 2021-06-16 08:30

from django.conf import settings
from django.db import migrations, models
Expand Down
24 changes: 13 additions & 11 deletions frontend/src/views/sys/role.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<el-button @click="MenuFormVisible = false">{{ "取消" }}</el-button>
<el-button
type="primary"
@click="dialogStatus === 'create' ? createData() : updateData()"
@click="dialogStatus === 'create' ? createData() : updateData('memu')"
>{{ "确定" }}</el-button
>
</div>
Expand Down Expand Up @@ -219,7 +219,7 @@
<el-button @click="PermFormVisible = false">{{ "取消" }}</el-button>
<el-button
type="primary"
@click="dialogStatus === 'create' ? createData() : updateData()"
@click="dialogStatus === 'create' ? createData() : updateData('perm')"
>{{ "确定" }}</el-button
>
</div>
Expand Down Expand Up @@ -293,7 +293,7 @@ export default {
permprops: {
key: "id",
label: "name",
},
}
};
},
computed: {
Expand Down Expand Up @@ -412,24 +412,26 @@ export default {
this.dialogStatus = "update";
if (val == "menu") {
this.MenuFormVisible = true;
this.$nextTick(() => {
this.$refs["dataForm"].clearValidate();
this.valueIdSelectTree2 = this.temp.parent;
this.$refs.tree.setCheckedKeys(this.temp.menus);
});
} else if (val == "perm") {
this.PermFormVisible = true;
} else {
this.BaseFormVisible = true;
}
this.$nextTick(() => {
this.$refs["dataForm"].clearValidate();
this.valueIdSelectTree2 = this.temp.parent;
this.$refs.tree.setCheckedKeys(row.menus);
});
},
updateData() {
updateData(val) {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
this.loading = true;
this.temp.parent = this.valueIdSelectTree2;
this.temp.menus = this.$refs.tree.getCheckedKeys();
if (val == "menu") {
this.temp.parent = this.valueIdSelectTree2;
this.temp.menus = this.$refs.tree.getCheckedKeys();
}
role
.requestPut(this.temp.id, this.temp)
.then(() => {
Expand Down

0 comments on commit 41536d0

Please sign in to comment.