Browse Source

公告列表过滤,new标识,搜索修复,详情页及编辑页面修改

cyy 1 year ago
parent
commit
1cb53ff6c8

BIN
src/assets/images/new.png


+ 0 - 1
src/views/platform/my/index.vue

@@ -167,7 +167,6 @@ export default {
           this.actions.push({ name: positions[i].name, obj: positions[i] })
           this.actions.push({ name: positions[i].name, obj: positions[i] })
         }
         }
       }
       }
-      console.log('12212121212121')
       const mid = JSON.parse(localStorage.getItem('mainPosition'))
       const mid = JSON.parse(localStorage.getItem('mainPosition'))
       this.mainPositionName = mid
       this.mainPositionName = mid
         ? mid.name
         ? mid.name

+ 194 - 126
src/views/platform/notice/edit.vue

@@ -7,11 +7,7 @@
   >
   >
     <div v-if="dialogLoading">
     <div v-if="dialogLoading">
       <van-sticky>
       <van-sticky>
-        <van-nav-bar
-          title="公告"
-          left-arrow
-          @click-left="onClose"
-        >
+        <van-nav-bar title="公告" left-arrow @click-left="onClose">
           <template #left>
           <template #left>
             <van-icon name="cross" class="ibps-nav-bar__close-icon" />
             <van-icon name="cross" class="ibps-nav-bar__close-icon" />
           </template>
           </template>
@@ -30,7 +26,7 @@
             autocomplete="off"
             autocomplete="off"
             :rules="[{ required: true, message: '必填' }]"
             :rules="[{ required: true, message: '必填' }]"
           />
           />
-          <ibps-radio
+          <!-- <ibps-radio
             v-model="form.publicItem"
             v-model="form.publicItem"
             :options="publishOptions"
             :options="publishOptions"
             :clearable="false"
             :clearable="false"
@@ -42,8 +38,8 @@
             category-key="NOTICE_TYPE"
             category-key="NOTICE_TYPE"
             label="类型"
             label="类型"
             clearable
             clearable
-          />
-          <ibps-user-selector
+          /> -->
+          <!-- <ibps-user-selector
             v-model="userSelect"
             v-model="userSelect"
             label="发布人"
             label="发布人"
             type="user"
             type="user"
@@ -59,16 +55,16 @@
                 inactive-value="N"
                 inactive-value="N"
               />
               />
             </template>
             </template>
-          </van-field>
+          </van-field> -->
 
 
-          <ibps-user-selector
-            v-show="form.public0==='N'"
+          <!-- <ibps-user-selector
+            v-show="form.public0 === 'N'"
             v-model="orgSelect"
             v-model="orgSelect"
             label="发布范围"
             label="发布范围"
             type="org"
             type="org"
             store="array"
             store="array"
             clearable
             clearable
-          />
+          /> -->
           <van-field
           <van-field
             v-model="form.author"
             v-model="form.author"
             label="作者"
             label="作者"
@@ -78,7 +74,7 @@
             autocomplete="off"
             autocomplete="off"
             name="text"
             name="text"
           />
           />
-          <van-field
+          <!-- <van-field
             v-model="form.key"
             v-model="form.key"
             label="关键字"
             label="关键字"
             placeholder="请输入"
             placeholder="请输入"
@@ -86,7 +82,7 @@
             clearable
             clearable
             name="text"
             name="text"
             autocomplete="off"
             autocomplete="off"
-          />
+          /> -->
           <ibps-date-picker
           <ibps-date-picker
             v-model="form.publicDate"
             v-model="form.publicDate"
             label="发布时间"
             label="发布时间"
@@ -108,29 +104,30 @@
             placeholder="请上传附件"
             placeholder="请上传附件"
             clearable
             clearable
           />
           />
-          <ibps-editor
-            v-model="form.content"
-            label="内容"
-          />
-          <ibps-toolbar
-            :actions="actions"
-          />
+          <ibps-editor v-model="form.content" label="内容" />
+          <ibps-toolbar :actions="actions" />
         </van-form>
         </van-form>
       </div>
       </div>
 
 
       <!--明细-->
       <!--明细-->
       <div v-else class="ibps-notice-detail">
       <div v-else class="ibps-notice-detail">
         <van-row>
         <van-row>
-          <van-col span="24" class="notice-title ibps-size-l_xx">{{ form.title }}</van-col>
+          <van-col span="24" class="notice-title ibps-size-l_xx">{{
+            form.title
+          }}</van-col>
           <van-col span="24" class="notice-detailed">
           <van-col span="24" class="notice-detailed">
             <van-row gutter="5" type="flex" align="center">
             <van-row gutter="5" type="flex" align="center">
               <!-- <van-col class="notice-time-horizon">{{ form.publicDate|dateFormat('yyyy-MM-dd') }} <span v-if="$utils.isNotEmpty(form.loseDate)"> ~ </span>{{ form.loseDate|dateFormat('yyyy-MM-dd') }}</van-col>
               <!-- <van-col class="notice-time-horizon">{{ form.publicDate|dateFormat('yyyy-MM-dd') }} <span v-if="$utils.isNotEmpty(form.loseDate)"> ~ </span>{{ form.loseDate|dateFormat('yyyy-MM-dd') }}</van-col>
               <van-col class="notice-userName ibps-is-link">{{ form.userName }}</van-col> -->
               <van-col class="notice-userName ibps-is-link">{{ form.userName }}</van-col> -->
               <van-col span="15">
               <van-col span="15">
                 <span class="notice-time-horizon">
                 <span class="notice-time-horizon">
-                  {{ form.publicDate|dateFormat('yyyy-MM-dd') }} <span v-if="$utils.isNotEmpty(form.loseDate)"> ~ </span>{{ form.loseDate|dateFormat('yyyy-MM-dd') }}
+                  {{ form.publicDate | dateFormat('yyyy-MM-dd') }}
+                  <span v-if="$utils.isNotEmpty(form.loseDate)"> ~ </span
+                  >{{ form.loseDate | dateFormat('yyyy-MM-dd') }}
                 </span>
                 </span>
-                <span class="notice-userName ibps-is-link ibps-wingblank">{{ form.userName }}</span>
+                <span class="notice-userName ibps-is-link ibps-wingblank">{{
+                  form.userName
+                }}</span>
               </van-col>
               </van-col>
 
 
               <!-- <van-col
               <!-- <van-col
@@ -139,16 +136,19 @@
                 :style="{'color':form.publicItem==='important'?'#f56c6c':'#67c23a'}"
                 :style="{'color':form.publicItem==='important'?'#f56c6c':'#67c23a'}"
               > {{ form.publicItem| optionsFilter(publishOptions) }}</van-col> -->
               > {{ form.publicItem| optionsFilter(publishOptions) }}</van-col> -->
 
 
-              <van-col
-                span="9"
-                class="notice-publicItem"
-              > <van-tag
-                size="medium"
-                :color="form.publicItem | optionsFilter(publishOptions,'color')"
-                :text-color="form.publicItem | optionsFilter(publishOptions,'textColor')"
-              >
-                {{ form.publicItem| optionsFilter(publishOptions) }}</van-tag></van-col>
-
+              <van-col span="9" class="notice-publicItem">
+                <van-tag
+                  size="medium"
+                  :color="
+                    form.publicItem | optionsFilter(publishOptions, 'color')
+                  "
+                  :text-color="
+                    form.publicItem | optionsFilter(publishOptions, 'textColor')
+                  "
+                >
+                  {{ form.publicItem | optionsFilter(publishOptions) }}
+                </van-tag>
+              </van-col>
             </van-row>
             </van-row>
           </van-col>
           </van-col>
           <van-col span="24" class="notice-content">
           <van-col span="24" class="notice-content">
@@ -157,6 +157,7 @@
               label="内容"
               label="内容"
               :have-padding="false"
               :have-padding="false"
               readonly
               readonly
+              class="scrollRestrict"
             />
             />
           </van-col>
           </van-col>
           <van-col span="24" class="notice-fileAttach">
           <van-col span="24" class="notice-fileAttach">
@@ -208,29 +209,63 @@ export default {
     readonly: Boolean
     readonly: Boolean
   },
   },
   data() {
   data() {
+    const { first = '', second = '' } = this.$store.getters.level || {}
+    const { positions = [] } = this.$store.getters.userInfo || {}
+    const position = positions.length ? positions[0] : {}
     return {
     return {
       dialogVisible: false,
       dialogVisible: false,
       dialogLoading: false,
       dialogLoading: false,
       defaultForm: {
       defaultForm: {
+        author: '',
+        content: '',
+        createBy: '',
+        createOrgId: '',
+        createTime: '',
+        dataStatus: '',
+        dbtype: '',
+        depId: position.id,
+        depName: position.name,
+        fileAttach: '',
         id: '',
         id: '',
-        picture: '',
-        status: '',
-        publicItem: 'notices',
-        typeId: '',
-        type: '',
-        title: '',
-        userId: '',
-        userName: '',
+        ip: '',
         public0: 'Y',
         public0: 'Y',
-        depId: '',
-        depName: '',
-        author: '',
+        includeChild: 'N',
         key: '',
         key: '',
-        publicDate: '',
         loseDate: '',
         loseDate: '',
-        fileAttach: '',
-        content: '',
-        editorValue: ''
+        name: '',
+        picture: '',
+        pk: '',
+        publicDate: this.$common.getDateNow(19),
+        publicItem: 'notices',
+        status: '',
+        tenantId: '',
+        title: '',
+        // 改字段暂时无用,改存当前层级第一级ID
+        type: second || first,
+        typeId: '',
+        updateBy: '',
+        updateTime: '',
+        userId: this.$store.getters.userId,
+        userName: this.$store.getters.name
+        // id: '',
+        // picture: '',
+        // status: '',
+        // publicItem: 'notices',
+        // typeId: '',
+        // type: '',
+        // title: '',
+        // userId: '',
+        // userName: '',
+        // public0: 'Y',
+        // depId: '',
+        // depName: '',
+        // author: '',
+        // key: '',
+        // publicDate: '',
+        // loseDate: '',
+        // fileAttach: '',
+        // content: '',
+        // editorValue: ''
       },
       },
       form: {},
       form: {},
       userSelect: [],
       userSelect: [],
@@ -238,15 +273,16 @@ export default {
       publishOptions: publishOptions,
       publishOptions: publishOptions,
       actions: [
       actions: [
         {
         {
-          'name': this.$t('common.button.ts'),
-          'type': 'default',
-          'callback': this.saveDraft
+          name: this.$t('common.button.ts'),
+          type: 'default',
+          callback: this.saveDraft
         },
         },
         {
         {
-          'name': this.$t('common.button.save'),
-          'type': 'primary',
-          'callback': this.saveData
-        }]
+          name: this.$t('common.button.save'),
+          type: 'primary',
+          callback: this.saveData
+        }
+      ]
     }
     }
   },
   },
   watch: {
   watch: {
@@ -287,30 +323,48 @@ export default {
       if (this.$utils.isEmpty(this.id)) {
       if (this.$utils.isEmpty(this.id)) {
         this.form.publicItem = 'notices'
         this.form.publicItem = 'notices'
         this.form.publicDate = fecha.format(new Date(), 'yyyy-MM-dd')
         this.form.publicDate = fecha.format(new Date(), 'yyyy-MM-dd')
-        this.userSelect = [{ 'id': this.$store.getters.userId, 'name': this.$store.getters.userName }]
+        this.userSelect = [
+          { id: this.$store.getters.userId, name: this.$store.getters.userName }
+        ]
         return
         return
       }
       }
       get({
       get({
         newsId: this.id
         newsId: this.id
-      }).then(response => {
-        const data = response.data
-        if (this.$utils.isNotEmpty(data.publicDate)) {
-          data.publicDate = fecha.format(fecha.parse(data.publicDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
-        }
-        if (this.$utils.isNotEmpty(data.loseDate)) {
-          data.loseDate = fecha.format(fecha.parse(data.loseDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
-        }
-
-        this.form = data
-        if (this.$utils.isNotEmpty(this.form.userId) && this.$utils.isNotEmpty(this.form.userName)) {
-          this.userSelect = [{ 'id': this.form.userId, 'name': this.form.userName }]
-        }
-        if (this.$utils.isNotEmpty(this.form.depId) && this.$utils.isNotEmpty(this.form.depName)) {
-          this.orgSelect = [{ 'id': this.form.depId, 'name': this.form.depName }]
-        }
-      }).catch(error => {
-        console.error(error)
       })
       })
+        .then(response => {
+          const data = response.data
+          if (this.$utils.isNotEmpty(data.publicDate)) {
+            data.publicDate = fecha.format(
+              fecha.parse(data.publicDate, 'yyyy-MM-dd'),
+              'yyyy-MM-dd'
+            )
+          }
+          if (this.$utils.isNotEmpty(data.loseDate)) {
+            data.loseDate = fecha.format(
+              fecha.parse(data.loseDate, 'yyyy-MM-dd'),
+              'yyyy-MM-dd'
+            )
+          }
+
+          this.form = data
+          if (
+            this.$utils.isNotEmpty(this.form.userId) &&
+            this.$utils.isNotEmpty(this.form.userName)
+          ) {
+            this.userSelect = [
+              { id: this.form.userId, name: this.form.userName }
+            ]
+          }
+          if (
+            this.$utils.isNotEmpty(this.form.depId) &&
+            this.$utils.isNotEmpty(this.form.depName)
+          ) {
+            this.orgSelect = [{ id: this.form.depId, name: this.form.depName }]
+          }
+        })
+        .catch(error => {
+          console.error(error)
+        })
     },
     },
     onBack() {
     onBack() {
       this.$router.push({ name: 'notice' })
       this.$router.push({ name: 'notice' })
@@ -337,68 +391,82 @@ export default {
       if (this.$utils.isNotEmpty(data.loseDate)) {
       if (this.$utils.isNotEmpty(data.loseDate)) {
         data.loseDate += ' 00:00:00'
         data.loseDate += ' 00:00:00'
       }
       }
-      save(data).then(response => {
-        const message = this.form.status === 'drafts' ? `暂存公告成功!` : `保存公告成功!`
-        this.$notify({
-          type: 'success',
-          message: message
+      save(data)
+        .then(response => {
+          const message =
+            this.form.status === 'drafts' ? `暂存公告成功!` : `保存公告成功!`
+          this.$notify({
+            type: 'success',
+            message: message
+          })
+          this.onClose()
+          this.$emit('callback', true)
+          // this.$router.push({ name: 'notice' })
+        })
+        .catch(error => {
+          console.error(error)
         })
         })
-        this.onClose()
-        this.$emit('callback', true)
-        // this.$router.push({ name: 'notice' })
-      }).catch(error => {
-        console.error(error)
-      })
     },
     },
     saveDraft() {
     saveDraft() {
       this.form.status = 'drafts'
       this.form.status = 'drafts'
       this.onSave()
       this.onSave()
     },
     },
     saveData() {
     saveData() {
-      this.$refs.form.validate().then(() => {
-        this.form.status = 'publish'
-        this.onSave()
-      }).catch(() => {
-        this.$notify({
-          type: 'warning',
-          message: this.$t('common.formError')
+      this.$refs.form
+        .validate()
+        .then(() => {
+          this.form.status = 'publish'
+          this.onSave()
+        })
+        .catch(() => {
+          this.$notify({
+            type: 'warning',
+            message: this.$t('common.formError')
+          })
+          this.$refs.form.scrollToField('title')
         })
         })
-        this.$refs.form.scrollToField('title')
-      })
     }
     }
   }
   }
-
 }
 }
 </script>
 </script>
-<style lang="scss" sc>
- .ibps-notice-detail{
-    .ibps-field__control--left{
-      text-align: right;
-    }
-    .notice-title{
-      flex: 1;
-      -webkit-box-flex: 1;
-      display: flex;
-      box-sizing: border-box;
-      width: 100%;
-      padding: 10px 16px;
-      overflow: hidden;
-      color: #323233;
-      font-size: 14px;
-      line-height: 24px;
-      background-color: #fff;
-    }
-    .notice-detailed{
-      padding: 0px 16px;
-      color: #969799;
-      font-size: 12px !important;
-      line-height: 18px;
-    }
-    .notice-publicItem{
-      text-align:right;
-    }
-    .ibps-cell-wrapper{
-      padding: 0;
-    }
+<style lang="scss" scoped>
+.ibps-notice-detail {
+  .ibps-field__control--left {
+    text-align: right;
+  }
+  .notice-title {
+    flex: 1;
+    -webkit-box-flex: 1;
+    display: flex;
+    box-sizing: border-box;
+    width: 100%;
+    padding: 10px 16px;
+    overflow: hidden;
+    color: #323233;
+    font-size: 14px;
+    line-height: 24px;
+    background-color: #fff;
+  }
+  .notice-detailed {
+    padding: 0px 16px;
+    color: #969799;
+    font-size: 12px !important;
+    line-height: 18px;
+  }
+  .notice-publicItem {
+    text-align: right;
+  }
+  .ibps-cell-wrapper {
+    padding: 0;
+  }
+}
+::v-deep
+  .scrollRestrict
+  .ibps-editor.van-cell.van-cell--borderless.van-field
+  .van-cell__value.van-field__value
+  .van-field__body
+  .van-field__control.van-field__control--left.van-field__control--custom
+  div {
+  overflow-x: scroll;
 }
 }
 </style>
 </style>

+ 101 - 61
src/views/platform/notice/index.vue

@@ -1,18 +1,27 @@
 <template>
 <template>
   <div class="notice ibps-fixed-bottom">
   <div class="notice ibps-fixed-bottom">
     <van-sticky>
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle()"
-      >
-        <div
-          slot="right"
-          @click="onClickRight"
-        >
-          <span class="van-nav-bar__text">{{ $t('platform.notice.create') }}</span>
+      <van-nav-bar :title="generateTitle()">
+        <div slot="right" @click="onClickRight">
+          <span class="van-nav-bar__text">{{
+            $t('platform.notice.create')
+          }}</span>
         </div>
         </div>
       </van-nav-bar>
       </van-nav-bar>
-      <van-tabs v-show="tabDatas.length>1" v-model="tabActive" color="#3396FB" line-width="40" class="ibps-border-bm" @click="onClickTab">
-        <van-tab v-for="data in tabDatas" :key="data.name" :name="data.name" :title="data.title" />
+      <van-tabs
+        v-show="tabDatas.length > 1"
+        v-model="tabActive"
+        color="#3396FB"
+        line-width="40"
+        class="ibps-border-bm"
+        @click="onClickTab"
+      >
+        <van-tab
+          v-for="data in tabDatas"
+          :key="data.name"
+          :name="data.name"
+          :title="data.title"
+        />
       </van-tabs>
       </van-tabs>
       <van-search
       <van-search
         v-model="title"
         v-model="title"
@@ -31,11 +40,11 @@
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" @load="loadData">
       <van-list v-model="loading" :finished="finished" @load="loadData">
         <van-cell
         <van-cell
-          v-for="(item,index) in listData"
-          :key="item.id+index"
+          v-for="(item, index) in listData"
+          :key="item.id + index"
           class="ibps-p-0"
           class="ibps-p-0"
         >
         >
-          <van-swipe-cell :right-width="tabActive==='drafts'?65:0">
+          <van-swipe-cell :right-width="tabActive === 'drafts' ? 65 : 0">
             <!-- <van-cell
             <!-- <van-cell
               :key="item.id+index"
               :key="item.id+index"
               :title="item.title"
               :title="item.title"
@@ -48,32 +57,51 @@
                   {{ item.publicItem| optionsFilter(publishOptions) }}</van-tag>
                   {{ item.publicItem| optionsFilter(publishOptions) }}</van-tag>
               </div>
               </div>
             </van-cell> -->
             </van-cell> -->
-            <van-cell
-              :key="item.id+index"
-              @click="onClick(item)"
-            >
+            <van-cell :key="item.id + index" @click="onClick(item)">
               <template #title>
               <template #title>
-                <span class="ibps-size-l">{{ item.title }}</span>
+                <div style="display:flex;align-items:flex-start;">
+                  <span class="ibps-size-l">{{ item.title }}</span>
+                  <img
+                    v-if="showNewIcon(item.publicDate, 3)"
+                    :src="newPng"
+                    alt=""
+                    srcset=""
+                    style="width:2em;margin-left: 3px;"
+                  />
+                </div>
+
                 <van-tag
                 <van-tag
                   size="medium"
                   size="medium"
-                  :color="item.publicItem | optionsFilter(publishOptions,'color')"
-                  :text-color="item.publicItem | optionsFilter(publishOptions,'textColor')"
+                  :color="
+                    item.publicItem | optionsFilter(publishOptions, 'color')
+                  "
+                  :text-color="
+                    item.publicItem | optionsFilter(publishOptions, 'textColor')
+                  "
                   style="position: absolute;right: 16px;top: 12px;"
                   style="position: absolute;right: 16px;top: 12px;"
                 >
                 >
-                  {{ item.publicItem| optionsFilter(publishOptions) }}</van-tag>
-
+                  {{ item.publicItem | optionsFilter(publishOptions) }}</van-tag
+                >
               </template>
               </template>
               <template #label>
               <template #label>
-                <div class="van-multi-ellipsis--l2 ibps-notice-text">{{ item.content | removeHtmlTag }}</div>
+                <div class="van-multi-ellipsis--l2 ibps-notice-text">
+                  {{ item.content | removeHtmlTag }}
+                </div>
                 <div>
                 <div>
-                  <span class="ibps-offside ibps-border-r">来源:{{ item.userName }}</span>
-                  <span>时间:{{ item.publicDate|dateFormat('yyyy/MM/dd') }}</span>
+                  <span
+class="ibps-offside ibps-border-r"
+                    >作者:{{ item.userName }}</span
+                  >
+                  <span
+                    >发布时间:{{
+                      item.publicDate | dateFormat('yyyy/MM/dd')
+                    }}</span
+                  >
                 </div>
                 </div>
               </template>
               </template>
-
             </van-cell>
             </van-cell>
             <van-button
             <van-button
-              v-if="tabActive==='drafts'"
+              v-if="tabActive === 'drafts'"
               slot="right"
               slot="right"
               type="danger"
               type="danger"
               :text="$t('common.button.remove')"
               :text="$t('common.button.remove')"
@@ -94,7 +122,7 @@
       :visible="noticeVisible"
       :visible="noticeVisible"
       :readonly="noticeReadonly"
       :readonly="noticeReadonly"
       @callback="onRefresh"
       @callback="onRefresh"
-      @close="visible => noticeVisible = visible"
+      @close="visible => (noticeVisible = visible)"
     />
     />
   </div>
   </div>
 </template>
 </template>
@@ -105,6 +133,7 @@ import { queryPageList, remove } from '@/api/platform/system/news'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import navbar from '@/mixins/navbar'
 import navbar from '@/mixins/navbar'
 import { publishOptions } from './constants'
 import { publishOptions } from './constants'
+import newPng from '@/assets/images/new.png'
 
 
 import IbpsListResultPage from '@/components/ibps-list-result-page'
 import IbpsListResultPage from '@/components/ibps-list-result-page'
 import NoticeDialog from './edit'
 import NoticeDialog from './edit'
@@ -118,16 +147,20 @@ export default {
   data() {
   data() {
     return {
     return {
       tabActive: 'publish',
       tabActive: 'publish',
-      tabDatas: [{
-        name: 'publish',
-        title: this.$t('platform.notice.notices')
-      }, {
-        name: 'expired',
-        title: this.$t('platform.notice.expired')
-      }, {
-        name: 'drafts',
-        title: this.$t('platform.notice.drafts')
-      }],
+      tabDatas: [
+        {
+          name: 'publish',
+          title: this.$t('platform.notice.notices')
+        },
+        {
+          name: 'expired',
+          title: this.$t('platform.notice.expired')
+        },
+        {
+          name: 'drafts',
+          title: this.$t('platform.notice.drafts')
+        }
+      ],
 
 
       title: '',
       title: '',
 
 
@@ -143,7 +176,7 @@ export default {
       resultMessage: null,
       resultMessage: null,
 
 
       publishOptions: publishOptions,
       publishOptions: publishOptions,
-
+      newPng: newPng,
       noticeVisible: false,
       noticeVisible: false,
       noticeId: '',
       noticeId: '',
       noticeReadonly: false
       noticeReadonly: false
@@ -157,33 +190,34 @@ export default {
       this.onSearch()
       this.onSearch()
     },
     },
     loadData() {
     loadData() {
-      queryPageList(this.getSearcFormData()).then(response => {
-        // 处理数据
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
+      queryPageList(this.getSearcFormData())
+        .then(response => {
+          // 处理数据
+          ActionUtils.handleListData(this, response.data)
+        })
+        .catch(e => {
+          ActionUtils.handleErrorData(this, e)
+        })
     },
     },
     /**
     /**
      * 获取格式化参数
      * 获取格式化参数
      */
      */
     getSearcFormData() {
     getSearcFormData() {
       let params = {}
       let params = {}
-
+      const { first = '', second = '' } = this.$store.getters.level || {}
       params['Q^STATUS_^S'] = this.tabActive
       params['Q^STATUS_^S'] = this.tabActive
 
 
+      params['Q^type_^SL'] = second || first
+
       if (this.$utils.isNotEmpty(this.title)) {
       if (this.$utils.isNotEmpty(this.title)) {
-        params['Q^title_^S'] = this.title
+        params['Q^TITLE_^SL'] = this.title
       }
       }
 
 
       if (this.$utils.isNotEmpty(this.moreParams)) {
       if (this.$utils.isNotEmpty(this.moreParams)) {
         params = Object.assign(params, this.moreParams)
         params = Object.assign(params, this.moreParams)
       }
       }
 
 
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
+      return ActionUtils.formatParams(params, this.pagination, this.sorts)
     },
     },
     /**
     /**
      * 下拉刷新
      * 下拉刷新
@@ -222,18 +256,24 @@ export default {
       // })
       // })
     },
     },
     onDelete(id) {
     onDelete(id) {
-      this.$dialog.confirm({
-        title: this.$t('common.dialog.warn'),
-        message: '确认删除该公告?'
-      }).then(() => {
-        remove({
-          newsIds: id
-        }).then(response => {
-          this.onClickTab(this.tabActive)
+      this.$dialog
+        .confirm({
+          title: this.$t('common.dialog.warn'),
+          message: '确认删除该公告?'
+        })
+        .then(() => {
+          remove({
+            newsIds: id
+          }).then(response => {
+            this.onClickTab(this.tabActive)
+          })
         })
         })
-      })
+    },
+    showNewIcon(date, days) {
+      const nowDate = new Date().getTime()
+      const targetDate = new Date(date).getTime()
+      return targetDate + days * 24 * 60 * 60 * 1000 > nowDate
     }
     }
   }
   }
-
 }
 }
 </script>
 </script>