瀏覽代碼

通知公告数据增加层级过滤

cfort 2 年之前
父節點
當前提交
6c9c453d70

+ 2 - 1
src/views/platform/system/news/edit.vue

@@ -219,7 +219,8 @@ export default {
                 status: '',
                 status: '',
                 tenantId: '',
                 tenantId: '',
                 title: '',
                 title: '',
-                type: '',
+                // 改字段暂时无用,改存当前层级第一级ID
+                type: this.$store.getters.level ? this.$store.getters.level.first : '',
                 typeId: '',
                 typeId: '',
                 updateBy: '',
                 updateBy: '',
                 updateTime: '',
                 updateTime: '',

+ 3 - 1
src/views/platform/system/news/list.vue

@@ -131,8 +131,10 @@ export default {
          * 获取格式化参数
          * 获取格式化参数
          */
          */
         getSearcFormData () {
         getSearcFormData () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            params['Q^type_^SL'] = this.$store.getters.level ? this.$store.getters.level.first : ''
             return ActionUtils.formatParams(
             return ActionUtils.formatParams(
-                this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {},
+                params,
                 this.pagination,
                 this.pagination,
                 this.sorts)
                 this.sorts)
         },
         },

+ 3 - 0
src/views/system/dashboard/components/workbench.vue

@@ -463,6 +463,9 @@ export default {
             if (this.activeTab === 'finish') {
             if (this.activeTab === 'finish') {
                 params.end = '1'
                 params.end = '1'
             }
             }
+            if (this.activeTab === 'news') {
+                params['Q^type_^SL'] = this.$store.getters.level ? this.$store.getters.level.first : ''
+            }
             const s = this.activeTab === 'news' ? { 'PUBLIC_DATE_': 'DESC' } : this.sorts
             const s = this.activeTab === 'news' ? { 'PUBLIC_DATE_': 'DESC' } : this.sorts
             return ActionUtils.formatParams(params, page, s)
             return ActionUtils.formatParams(params, page, s)
         },
         },