Explorar o código

F - 权限-发布 - 修复角色权限分配权限不能点击问题,修复新建发布不能获取通知方式问题。

张玉坡 %!s(int64=6) %!d(string=hai) anos
pai
achega
2d7d567628

+ 2 - 2
spug_web/src/components/account/Permission.vue

@@ -244,7 +244,7 @@
             fetch() {
                 this.loading = true;
                 this.$http.get(`/api/account/roles/${this.role.id}/permissions`).then(res => {
-                    this.codes = res.result
+                    this.codes = res.result;
                 }, res => this.$layer_message(res.result)).finally(() => this.loading = false)
             },
             saveCommit() {
@@ -264,4 +264,4 @@
             this.fetch()
         }
     }
-</script>
+</script>

+ 6 - 6
spug_web/src/components/account/TagTd.vue

@@ -1,5 +1,5 @@
 <template>
-    <td @click="check"><el-tag :type="tag_type" style="cursor: pointer">{{item.desc}}</el-tag></td>
+    <td ><el-tag @click="check" type="info" :color="colorUpdate" style="cursor: pointer">{{item.desc}}</el-tag></td>
 </template>
 
 <script>
@@ -9,14 +9,14 @@
             return {}
         },
         computed: {
-            tag_type() {
-                return (this.item['is_has']) ? 'primary' : 'info'
-            }
+            colorUpdate() {
+                return (this.item['is_has']) ? '#99ffd6' : '#ffffff'
+            },
         },
         methods: {
             check() {
-                this.item['is_has'] = !this.item['is_has']
+                this.item['is_has'] = !this.item['is_has'];
             }
         }
     }
-</script>
+</script>

+ 2 - 2
spug_web/src/components/publish/App.vue

@@ -162,7 +162,6 @@
                 let [action, index] = command.split(' ');
                 this.form = this.$deepCopy(this.tableData[index]);
                 if (action === 'edit') {
-
                     if (this.images.length === 0) this.fetchImages();
                     this.dialogAddVisible = true;
                     this.fetchNotifyWay();
@@ -200,6 +199,7 @@
                 // this.$router.push({name: 'app_add'})
                 this.form = this.init_form();
                 this.dialogAddVisible = true;
+                this.fetchNotifyWay();
                 if (this.images.length === 0) this.fetchImages()
             },
             addGroup() {
@@ -220,4 +220,4 @@
             this.fetch(true)
         }
     }
-</script>
+</script>