LiuJ 1 nedēļu atpakaļ
vecāks
revīzija
f34c3d9372

+ 34 - 0
src/router/index.js

@@ -548,6 +548,23 @@ export const constantRoutes = [
       }
     ]
 
+  },
+  {
+    path: '/noticeListApply',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/news/noticeListApply'),
+        meta: {
+          title: '行政通知审核列表',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+
   },
   {
     path: '/ncomplaintList',
@@ -565,6 +582,23 @@ export const constantRoutes = [
       }
     ]
 
+  },
+  {
+    path: '/ncomplaintListApply',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/news/ncomplaintListApply'),
+        meta: {
+          title: '投诉举报',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+
   },
       
   // ----------liuj------------

+ 32 - 19
src/views/news/addNotice.vue

@@ -1,10 +1,11 @@
 <template>
+
+
   <div class="mainBox">
     <div class="layerBox">
       <tableTitle :name="tableDivTitle" />
       <el-form :model="form" ref="form" :rules="formRules" label-position="left" label-width="120px">
         <div class="formDiv">
-
           <el-form-item label="标题:" prop="title" class="custom-align-right">
             <el-input v-model="form.title" autocomplete="off" placeholder="请输入标题"></el-input>
           </el-form-item>
@@ -29,7 +30,7 @@
             <el-cascader :key="cascaderKey" v-model="form.city_arr_id" placeholder="请选择发布范围" :props="cityData"
               filterable clearable></el-cascader>
           </el-form-item>
-          <el-form-item label="行政职能:"  prop="department_arr_id" class="custom-align-right">
+          <el-form-item label="行政职能:" prop="department_arr_id" class="custom-align-right">
             <el-cascader :key="searchDepartmentKey" v-model="form.department_arr_id" placeholder="请选择行政职能"
               popper-class="my_cascader" :props="searchDepartmentData" filterable clearable></el-cascader>
           </el-form-item>
@@ -38,15 +39,15 @@
               end-placeholder="结束日期" :picker-options="pickerOptions">
             </el-date-picker>
           </el-form-item>
-        
+
           <el-form-item label="附件:" class="custom-align-right" prop="">
             <div class="uploaderBox" @mouseenter="hovering = true" mouseleave="hovering = false">
               <el-upload class="avatar-uploader" action="#" :show-file-list="false" :before-upload="beforeAvatarUpload">
                 <!-- 预览图片 -->
-                <img v-if="file && (fileType == 'jpeg' || fileType =='png' )" :src="file" class="avatar">
-                <div v-if="file && (fileType == 'pdf' || fileType =='word' )" class="chooseImgDiv1">
+                <img v-if="file && (fileType == 'jpeg' || fileType == 'png')" :src="file" class="avatar">
+                <div v-if="file && (fileType == 'pdf' || fileType == 'word')" class="chooseImgDiv1">
                   <div>
-                    <div>{{file}}</div>
+                    <div>{{ file }}</div>
                   </div>
                 </div>
                 <div v-else class="chooseImgDiv">
@@ -64,14 +65,15 @@
             </div>
           </el-form-item>
           <el-form-item label="建立群聊:" prop="is_group" class="custom-align-right">
-              <el-radio-group v-model="form.is_group" :disabled="this.$route.query.id!=undefined"> 
-                <el-radio :label="1">是</el-radio>
-                <el-radio :label="0">否</el-radio>
-              </el-radio-group>
-            </el-form-item>
+            <el-radio-group v-model="form.is_group" :disabled="this.$route.query.id != undefined">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
 
-          <el-form-item label="群聊名称:" prop="group_name" class="custom-align-right" v-if="form.is_group == 1" :disabled="this.$route.query.id!=undefined">
-                <el-input v-model="form.group_name" autocomplete="off" placeholder="请输入群聊名称"></el-input>
+          <el-form-item label="群聊名称:" prop="group_name" class="custom-align-right" v-if="form.is_group == 1"
+            :disabled="this.$route.query.id != undefined">
+            <el-input v-model="form.group_name" autocomplete="off" placeholder="请输入群聊名称"></el-input>
           </el-form-item>
         </div>
       </el-form>
@@ -132,6 +134,7 @@ export default {
       searchCascaderKey: 0, //列表缓存key
       website_id: 2,
       file: '',
+      userType: 1, //用户类型 1:普通用户,
       pickerOptions: {
         selectableRange: '1900-01-01 to 2100-12-31', // 允许选择的日期范围
         // disabledDate(time) {
@@ -391,7 +394,7 @@ export default {
           }
           console.log(typeof this.form.time, '---=-==-=')
           console.log(this.form.time.length, '---=-==-=')
-          if (typeof this.form.time=='object' && this.form.time.length > 0) {
+          if (typeof this.form.time == 'object' && this.form.time.length > 0) {
             this.form.start = this.formatDate(this.form.time[0]);
             this.form.end = this.formatDate(this.form.time[1]);
             delete this.form.time;
@@ -401,6 +404,11 @@ export default {
           delete this.form.catid;
           this.form.file = this.file;
           console.log(this.form, 'this.form-----------------')
+          if (this.userType == 10000) {
+            this.form.status = 2
+          } else {
+            this.form.status = 1
+          }
           this.$store.dispatch('news/addNotice', this.form).then(res => {
             if (res.code == 200) {
               //汇报结果
@@ -472,11 +480,11 @@ export default {
         this.form.cat_id = res.data.cat_id;
         this.form.time = [res.data.start, res.data.end];
         this.form.file = res.data.file;
-        this.file = res.data.file; 
+        this.file = res.data.file;
         const filePath = res.data.file;
         const fileExtension = filePath.split('.').pop().toLowerCase();
         this.fileType = fileExtension; // 设置文件类型
-        this.form.is_group = parseInt(res.data.is_group );
+        this.form.is_group = parseInt(res.data.is_group);
         this.form.group_name = res.data.group_name;
       })
     },
@@ -539,7 +547,7 @@ export default {
             this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
           }
           console.log(typeof this.form.time, '---=-==-=')
-          if (typeof this.form.time=='object' && this.form.time.length > 0) {
+          if (typeof this.form.time == 'object' && this.form.time.length > 0) {
             this.form.start = this.formatDate(this.form.time[0]);
             this.form.end = this.formatDate(this.form.time[1]);
             delete this.form.time;
@@ -549,6 +557,13 @@ export default {
           delete this.form.catid;
           this.form.file = this.file;
           console.log(this.form, 'this.form-----------------')
+
+          if (this.userType == 10000) {
+            this.form.status = 2
+          } else {
+            this.form.status = 1
+          }
+
           this.$store.dispatch('news/updateNotice', this.form).then(res => {
             if (res.code != 200) {
               this.$message.error("修改失败,请稍后再试!");
@@ -602,8 +617,6 @@ export default {
 };
 </script>
 <style scoped lang="less">
-
-
 //执行v-deep穿透scope选择器 start------------------------------------------------------------>*/
 ::v-deep .custom-form-item>.el-form-item__label {
   line-height: 140px !important;

+ 248 - 0
src/views/news/ncomplaintListApply.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="mainBox">
+    <!--搜索功能 start------------------------------------------------------------>
+    <div class="layerBox_search">
+      <div class="layerBoxLine">
+        <el-row>
+
+          <el-col :span="8">
+            <div class="searchBox">
+              <div class="searchTitle">投诉主题:</div>
+              <el-input placeholder="请输入投诉主题" autocomplete="off" v-model="getApiData.title" />
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="searchBox">
+              <div class="searchTitle">投诉类型:</div>
+              <el-input placeholder="请输入投诉类型" autocomplete="off" v-model="getApiData.title" />
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="searchBox">
+              <div class="searchTitle">处理状态:</div>
+              <el-select v-model="getApiData.deal" placeholder="请处理状态..">
+                <el-option label="未处理" value="1"></el-option>
+                <el-option label="处理中" value="2"></el-option>
+                <el-option label="已完结" value="3"></el-option>
+                <el-option label="不予处理" value="4"></el-option>
+              </el-select>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+
+    </div>
+
+    <div class="layerBoxNoBg">
+      <div>
+        <el-button type="primary" @click="goCreat">发布投诉举报</el-button>
+      </div>
+      <div>
+        <el-button @click="clearSearchList">重置</el-button>
+        <el-button type="primary" @click="getData('search')">搜索</el-button>
+      </div>
+    </div>
+    <!--搜索功能 end------------------------------------------------------------>
+
+    <!--表格内容 start------------------------------------------------------------>
+    <div class="layerBox">
+      <tableTitle :name="tableDivTitle" />
+      <el-row>
+        <template>
+          <el-table :data="tableData" style="width: 100%">
+            <el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
+            <el-table-column prop="title" label="投诉主题" width="">
+            </el-table-column>
+            <el-table-column prop="title" label="投诉类型" width="">
+            </el-table-column>
+            <el-table-column prop="type" label="接收人" width="">
+            </el-table-column>
+            <el-table-column prop="level" label="处理状态" width="">
+              <template slot-scope="scope">
+                <span v-if="scope.row.level == 1">
+                  常规
+                </span>
+                <span v-if="scope.row.level == 2">
+                  紧急
+                </span>
+                <span v-if="scope.row.level == 3">
+                  特急
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="start" label="投诉时间" width="">
+
+            </el-table-column>
+            <el-table-column prop="created_at" label="创建时间" width=""></el-table-column>
+
+            <el-table-column fixed="right" label="操作" width="200" header-align="center">
+              <template slot-scope="scope">
+                <div class="listBtnBox">
+                  <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
+                      class="el-icon-delete"></i>删除</div>
+                  <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i
+                      class="el-icon-edit-outline"></i>编辑</div>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+      </el-row>
+    </div>
+    <!--分页 start------------------------------------------------------------>
+    <div class="alignBox">
+      <el-row>
+        <el-col :span="24">
+          <el-pagination @size-change="handleSizeChange" :current-page="getApiData.page"
+            @current-change="handleCurrentChange" :page-size="10" layout="total, prev, pager, next, jumper"
+            :total="allCount"></el-pagination>
+        </el-col>
+      </el-row>
+    </div>
+    <!--分页 end------------------------------------------------------------>
+    <!--表格内容 end------------------------------------------------------------>
+  </div>
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle';
+//引入公用样式
+import '@/styles/global.less';
+
+export default {
+  components: {
+    tableTitle,//表格标题
+  },
+  data() {
+    return {
+      //1.列表和分页相关 start ------------------------------------------------------------>
+      tableDivTitle: "投诉列表",
+      tableData: [],//内容
+      editId: 0,//要修改的网站id
+      getApiData: {
+        name: "",//标题
+        category_name: "",//导航池id
+        website_name: "",//网站名称
+        type_id: "",//发布类型
+
+        page: 1,//当前是第几页
+        page_size: 10,//一共多少条
+      },
+      allCount: 0,//总条数
+      //分页相关 end ------------------------------------------------------------>
+
+    }
+  },
+  methods: {
+    //1.列表和分页相关 start ------------------------------------------------------------>
+    //1.1 开始请求列表信息方法
+    getData(type) {
+      if (type == "search") {
+        this.getApiData.page = 1;
+      }
+      console.log(this.getApiData, '---1--')
+      this.$store.dispatch('news/getComplaintList', this.getApiData).then(res => {
+        console.log(this.getApiData, '---2-')
+        let data = [];
+        for (let item of res.data.rows) {
+          data.push(item)
+        }
+        this.tableData = res.data.rows; //给与内容
+        this.allCount = res.data.count; //给与总条数
+      })
+    },
+    //1.2 删除内容
+    deleteRow(id) {
+      this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        console.log("当前删除:" + id)
+        this.$store.dispatch('news/deleteComplaint', { id: id }).then(res => {
+          this.getData();
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        }).catch(() => {
+          this.$message({
+            type: 'warning',
+            message: '网络错误,请重试!'
+          });
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '已取消删除'
+        });
+      });
+    },
+    //1.3 修改网站状态
+    upRow(id, status) {
+      let data = {
+        id: id,
+        status: status
+      }
+      this.$store.dispatch('news/upComplaintStatus', data).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            type: 'success',
+            message: '通知状态已修改!'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '已取消删除'
+        });
+      });
+    },
+    //1.4 列表内容分页
+    //直接跳转
+    handleSizeChange(val) {
+      this.getApiData.page = val;
+      this.getData();
+    },
+    //1.5 点击分页
+    handleCurrentChange(val) {
+      this.getApiData.page = val;
+      this.getData();
+    },
+    //1.6 重置按钮
+    clearSearchList() {
+      this.tableData = [];
+      this.getApiData.title = "";
+      this.getApiData.level = "";
+
+      this.getApiData.page = 1;
+      this.getApiData.pageSize = 10;
+      this.getData();
+    },
+    //列表和分页相关 end ------------------------------------------------------------>
+    //2.添加新闻 start ------------------------------------------------------------>
+    //跳转到通知发布页面
+    goCreat() {
+      this.$router.push({
+        path: '/addComplaint',
+      });
+    },
+    goEdit(id) {
+      let data = {
+        id: id
+      }
+      this.$router.push({
+        path: '/addComplaint',
+        query: data
+      });
+    }
+    //添加新闻 end ------------------------------------------------------------>
+  },
+  mounted() {
+    //1.获得初始数据
+    this.getData();
+  }
+}
+</script>
+<style scoped lang="less"></style>

+ 14 - 1
src/views/news/noticeList.vue

@@ -72,6 +72,19 @@
                 </span>
               </template>
             </el-table-column>
+            <el-table-column prop="status" label="审核状态" width="">
+              <template slot-scope="scope">
+                <span v-if="scope.row.status == 1">
+                  未审核
+                </span>
+                <span v-if="scope.row.status == 2">
+                  已审核
+                </span>
+                <span v-if="scope.row.status == 3">
+                  已拒绝
+                </span>
+              </template>
+            </el-table-column>
             <el-table-column prop="start" label="开始时间" width="">
 
             </el-table-column>
@@ -128,7 +141,7 @@ export default {
         category_name: "",//导航池id
         website_name: "",//网站名称
         type_id: "",//发布类型
-
+        status: 2,
         page: 1,//当前是第几页
         page_size: 10,//一共多少条
       },

+ 352 - 0
src/views/news/noticeListApply.vue

@@ -0,0 +1,352 @@
+<template>
+  <div class="mainBox">
+    <!--搜索功能 start------------------------------------------------------------>
+    <div class="layerBox_search">
+      <div class="layerBoxLine">
+        <el-row>
+
+          <el-col :span="8">
+            <div class="searchBox">
+              <div class="searchTitle">标题:</div>
+              <el-input placeholder="请输入标题" autocomplete="off" v-model="getApiData.title" />
+            </div>
+          </el-col>
+          <el-col :span="8">
+            <div class="searchBox">
+              <div class="searchTitle">公告级别:</div>
+              <el-select v-model="getApiData.level" placeholder="请选择..">
+                <el-option label="常规" value="1"></el-option>
+                <el-option label="紧急" value="2"></el-option>
+                <el-option label="特急" value="3"></el-option>
+              </el-select>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+
+    </div>
+
+    <div class="layerBoxNoBg">
+      <div>
+        <el-button type="primary" @click="goCreat">发布通知</el-button>
+      </div>
+      <div>
+        <el-button @click="clearSearchList">重置</el-button>
+        <el-button type="primary" @click="getData('search')">搜索</el-button>
+      </div>
+    </div>
+    <!--搜索功能 end------------------------------------------------------------>
+
+    <!--表格内容 start------------------------------------------------------------>
+    <div class="layerBox">
+      <tableTitle :name="tableDivTitle" />
+      <el-row>
+        <template>
+          <el-table :data="tableData" style="width: 100%">
+            <el-table-column fixed prop="id" label="编号" width="50"></el-table-column>
+            <el-table-column prop="title" label="标题" width="">
+
+            </el-table-column>
+            <el-table-column prop="type" label="类型" width="">
+
+
+              <template slot-scope="scope">
+                <span v-if="scope.row.type == 1">
+                  公告
+                </span>
+                <span v-if="scope.row.type == 2">
+                  通知
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="level" label="级别" width="">
+              <template slot-scope="scope">
+                <span v-if="scope.row.level == 1">
+                  常规
+                </span>
+                <span v-if="scope.row.level == 2">
+                  紧急
+                </span>
+                <span v-if="scope.row.level == 3">
+                  特急
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="status" label="审核状态" width="">
+              <template slot-scope="scope">
+                <span v-if="scope.row.status == 1">
+                  未审核
+                </span>
+                <span v-if="scope.row.status == 2">
+                  已审核
+                </span>
+                <span v-if="scope.row.status == 3">
+                  已拒绝
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="start" label="开始时间" width="">
+
+            </el-table-column>
+            <el-table-column prop="end" label="到期时间" width=""></el-table-column>
+            <el-table-column prop="created_at" label="创建时间" width=""></el-table-column>
+
+            <el-table-column fixed="right" label="操作" width="300" header-align="center">
+              <template slot-scope="scope">
+                <div class="listBtnBox">
+                  <div class="listMainBtn" @click="getUpRow(scope.row.id, tableData)"><i class="el-icon-check"></i>审核
+                  </div>
+                  <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i
+                      class="el-icon-delete"></i>删除</div>
+                  <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i
+                      class="el-icon-edit-outline"></i>编辑</div>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+      </el-row>
+    </div>
+    <!--弹出框1:外部表单弹出框 start------------------------------------------------------------>
+    <el-dialog title="请输入驳回理由" :visible.sync="examineWindow" :close-on-click-modal="false">
+      <el-form :model="form" ref="form" :rules="formRules" label-position="left">
+        <div class="formDiv">
+          <el-form-item label="驳回原因:" :label-width="formLabelWidth" prop="reason" class="custom-align-right">
+            <el-input type="textarea" v-model="form.reason" class="custom-textarea" placeholder="请输入驳回原因"
+              :rows="3"></el-input>
+          </el-form-item>
+        </div>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <div>
+          <el-button type="info" @click="examineWindow = false">取消</el-button>
+          <el-button type="primary" @click="examineToServe">确定</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!--弹出框1:外部表单弹出框 end------------------------------------------------------------>
+    <!--分页 start------------------------------------------------------------>
+    <div class="alignBox">
+      <el-row>
+        <el-col :span="24">
+          <el-pagination @size-change="handleSizeChange" :current-page="getApiData.page"
+            @current-change="handleCurrentChange" :page-size="10" layout="total, prev, pager, next, jumper"
+            :total="allCount"></el-pagination>
+        </el-col>
+      </el-row>
+    </div>
+    <!--分页 end------------------------------------------------------------>
+    <!--表格内容 end------------------------------------------------------------>
+  </div>
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle';
+//引入公用样式
+import '@/styles/global.less';
+
+export default {
+  components: {
+    tableTitle,//表格标题
+  },
+  data() {
+    return {
+      //1.列表和分页相关 start ------------------------------------------------------------>
+      tableDivTitle: "通知列表",
+      tableData: [],//内容
+      editId: 0,//要修改的网站id
+      examineWindow: false,//审核窗口
+      //提交驳回
+      form: {
+        reason: ""
+      },
+      getApiData: {
+        name: "",//标题
+        category_name: "",//导航池id
+        website_name: "",//网站名称
+        type_id: "",//发布类型
+        status1: 1,//审核状态 1待审核 2已审核 3已拒绝
+        page: 1,//当前是第几页
+        page_size: 10,//一共多少条
+      },
+      allCount: 0,//总条数
+      //分页相关 end ------------------------------------------------------------>
+
+    }
+  },
+  methods: {
+    //提交驳回内容
+    examineToServe(id) {
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          let data = {
+            id: this.editId,
+            status: 3,//驳回status
+            reason: this.form.reason
+          }
+          this.$store.dispatch('news/updateNoticeStatus', data).then(res => {
+            if (res.code == 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功!'
+              });
+              this.getData();
+              this.form.reason = "";//清空上一次的输入
+              this.examineWindow = false;
+            }
+          })
+        } else {
+          this.$message.error("驳回理由不能为空!")
+        }
+      })
+    },
+    getUpRow(id) {
+      //设置待审核的id
+      this.editId = id;
+      console.log(id)
+      this.$confirm('将此商品通过审核吗?', '提示', {
+        confirmButtonText: '通过',
+        cancelButtonText: '拒绝',
+        type: 'warning'
+      }).then(() => {
+        this.upRow(id, 2)
+      }).catch(() => {
+        //输入驳回理由
+        console.log("驳回")
+        this.examineWindow = true;
+      })
+    },
+    upRow(id, status) {
+      let data = {
+        id: id,
+        status: status
+      }
+      this.$store.dispatch('news/updateNoticeStatus', data).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            type: 'success',
+            message: '商品状态已修改!'
+          });
+          this.getData();
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '已取消删除'
+        });
+      });
+    },
+
+
+    //1.列表和分页相关 start ------------------------------------------------------------>
+    //1.1 开始请求列表信息方法
+    getData(type) {
+      if (type == "search") {
+        this.getApiData.page = 1;
+      }
+      console.log(this.getApiData, '---1--')
+      this.$store.dispatch('news/getNoticeList', this.getApiData).then(res => {
+        console.log(this.getApiData, '---2-')
+        let data = [];
+        for (let item of res.data.rows) {
+          data.push(item)
+        }
+        this.tableData = res.data.rows; //给与内容
+        this.allCount = res.data.count; //给与总条数
+      })
+    },
+    //1.2 删除内容
+    deleteRow(id) {
+      this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        console.log("当前删除:" + id)
+        this.$store.dispatch('news/deleteNotice', { id: id }).then(res => {
+          this.getData();
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        }).catch(() => {
+          this.$message({
+            type: 'warning',
+            message: '网络错误,请重试!'
+          });
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '已取消删除'
+        });
+      });
+    },
+    //1.3 修改网站状态
+    upRow(id, status) {
+      let data = {
+        id: id,
+        status: status
+      }
+      this.$store.dispatch('news/updateNoticeStatus', data).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            type: 'success',
+            message: '通知状态已修改!'
+          });
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'warning',
+          message: '已取消删除'
+        });
+      });
+    },
+    //1.4 列表内容分页
+    //直接跳转
+    handleSizeChange(val) {
+      this.getApiData.page = val;
+      this.getData();
+    },
+    //1.5 点击分页
+    handleCurrentChange(val) {
+      this.getApiData.page = val;
+      this.getData();
+    },
+    //1.6 重置按钮
+    clearSearchList() {
+      this.tableData = [];
+      this.getApiData.title = "";
+      this.getApiData.level = "";
+
+      this.getApiData.page = 1;
+      this.getApiData.pageSize = 10;
+      this.getData();
+    },
+    //列表和分页相关 end ------------------------------------------------------------>
+    //2.添加新闻 start ------------------------------------------------------------>
+    //跳转到通知发布页面
+    goCreat() {
+      this.$router.push({
+        path: '/addNotice',
+      });
+    },
+    goEdit(id) {
+      let data = {
+        id: id
+      }
+      this.$router.push({
+        path: '/addNotice',
+        query: data
+      });
+    }
+    //添加新闻 end ------------------------------------------------------------>
+  },
+  mounted() {
+    //1.获得初始数据
+    this.getData();
+  }
+}
+</script>
+<style scoped lang="less"></style>