明梦爽
2022-04-17 5529b7077126be368abd444d45ec085d8c7779e3
eslint语法规范
35个文件已修改
5个文件已添加
1个文件已删除
8652 ■■■■■ 已修改文件
.eslintrc.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json 7231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/AdEdit.vue 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/AdMain.vue 214 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/AdminHome.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Edit copy.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Edit.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/EditLunBo.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Main copy.vue 201 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Main.vue 214 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Welcome.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Home.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Login.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/NotFound.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/globalTitle.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/News.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/banShiZhiNan.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/introduce.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/kePuFengCai.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/keXieXiangMu.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/telephone.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/xueShuJiaoLiu.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/xueXiaoShouYe.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/zhengce.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage/moreMessage.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/notice.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/school.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/work.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
后端API接口服务/static/images/036dc279-73bb-4f9c-9a8c-80c3d7b32408.png 补丁 | 查看 | 原始文档 | blame | 历史
后端API接口服务/static/images/1273facb-e9c9-415e-949a-4c71853c8785.png 补丁 | 查看 | 原始文档 | blame | 历史
后端API接口服务/static/images/349d3ef1-f9d7-46c0-8e17-37daf863c87f.png 补丁 | 查看 | 原始文档 | blame | 历史
后端API接口服务/static/images/4913f227-7009-4bf1-8c07-eb69156f09ce.png 补丁 | 查看 | 原始文档 | blame | 历史
后端API接口服务/static/images/62cefc6b-54a8-4e8c-a250-0e0cd4ba4e20.png 补丁 | 查看 | 原始文档 | blame | 历史
.eslintrc.js
File was deleted
package-lock.json
Diff too large
package.json
@@ -21,13 +21,9 @@
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.4.0",
    "@vue/cli-plugin-eslint": "^3.4.0",
    "@vue/cli-service": "^3.4.0",
    "@vue/eslint-config-standard": "^4.0.0",
    "babel-eslint": "^10.0.1",
    "babel-plugin-component": "^1.1.1",
    "eslint": "^5.8.0",
    "eslint-plugin-vue": "^5.0.0",
    "less": "^3.9.0",
    "less-loader": "^4.1.0",
    "quill-image-extend-module": "^1.1.2",
src/App.vue
@@ -11,5 +11,4 @@
}
</script>
<style>
</style>
<style></style>
src/api/api.js
@@ -1,6 +1,6 @@
//用于写接口
import request from "../utils/request";
import request from '../utils/request'
// // å¯¼èˆªæ åˆ—表
// export const getNavList = data => {
//   return request({
@@ -13,7 +13,7 @@
export const getMinTitle = data => {
  return request({
    method: 'GET',
    url: `/news_category/list/${data}`,
    url: `/news_category/list/${data}`
  })
}
//获取新闻列表
@@ -21,7 +21,7 @@
  return request({
    method: 'POST',
    url: '/news/list',
    params: data,
    params: data
  })
}
//获取只有一篇新闻
@@ -36,7 +36,7 @@
  return request({
    method: 'POST',
    url: '/news/update',
    params: data,
    params: data
  })
}
//删除新闻
@@ -44,7 +44,7 @@
  return request({
    method: 'POST',
    url: '/news/delete',
    params: data,
    params: data
  })
}
//模糊查询
@@ -52,7 +52,7 @@
  return request({
    method: 'POST',
    url: '/news/fuzzy',
    params: data,
    params: data
  })
}
//添加新闻
src/components/Administrator/AdEdit.vue
@@ -1,24 +1,16 @@
<template>
  <div>
    <el-card class="box-card">
      <el-button type="primary" @click="add()" icon="el-icon-circle-plus" class='add'>注册新的管理员账号</el-button>
      <el-button type="primary" @click="add()" icon="el-icon-circle-plus" class="add">注册新的管理员账号</el-button>
      <!-- æ–°é—»è¡¨æ ¼åŒºåŸŸ -->
      <el-table
        :data="tableData"
        border
        style="width: 100%"
        :header-cell-style="{textAlign: 'center'}"
        :cell-style="{ textAlign: 'center' }"
      >
      <el-table :data="tableData" border style="width: 100%" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
        <el-table-column type="index" label="序号" width="50">
          <!-- <template slot-scope="scope">
            <span>{{ (currentPage-1)*pageSize+scope.$index+1 }}</span>
          </template> -->
        </el-table-column>
        <el-table-column prop="username" label="普通管理员账号" width="" >
        </el-table-column>
        <el-table-column prop="id" label="id" width="">
        </el-table-column>
        <el-table-column prop="username" label="普通管理员账号" width=""> </el-table-column>
        <el-table-column prop="id" label="id" width=""> </el-table-column>
        <el-table-column label="操作" width="">
          <template slot-scope="scope">
            <!-- {{ scope.row.id }} -->
@@ -27,16 +19,11 @@
              <el-button type="danger" @click="deleteAds(scope.row.id)" icon="el-icon-delete"></el-button>
            </div>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
    <!-- ä¿®æ”¹è´¦æˆ·çš„对话框 -->
    <el-dialog
      title="修改普通管理员密码"
      :visible.sync="editDialogVisible"
      width="50%"
      @close="editClose">
    <el-dialog title="修改普通管理员密码" :visible.sync="editDialogVisible" width="50%" @close="editClose">
      <!-- rules表单验证规则,ref当前表单的验证对象 -->
      <el-form ref="editFormRef" :model="editForm"  label-width="80px" status-icon>
        <el-form-item label="用户名:">
@@ -55,11 +42,7 @@
      </span>
    </el-dialog>
    <!-- æ·»åŠ ç®¡ç†å‘˜å¯¹è¯æ¡† -->
    <el-dialog
      title="添加普通管理员"
      :visible.sync="addDialogVisible"
      width="50%"
      @close="addClose">
    <el-dialog title="添加普通管理员" :visible.sync="addDialogVisible" width="50%" @close="addClose">
      <!-- rules表单验证规则,ref当前表单的验证对象 -->
      <el-form ref="addFormRef" :model="addForm"  label-width="80px" status-icon>
        <el-form-item label="用户名:">
@@ -107,14 +90,14 @@
      this.editDialogVisible = true
    },
    editClose(){
      this.editForm.username = '';
      this.editForm.oldPassword = '';
      this.editForm.password = '';
      this.editForm.username = ''
      this.editForm.oldPassword = ''
      this.editForm.password = ''
    },
    cancel(){
      this.editForm.username = '';
      this.editForm.oldPassword = '';
      this.editForm.password = '';
      this.editForm.username = ''
      this.editForm.oldPassword = ''
      this.editForm.password = ''
      this.editDialogVisible = false
    },
    //编辑确定事件
@@ -147,7 +130,7 @@
      })
      //如果用户点击确定则返回confirm
      //如果用户点击取消则返回cancel
      console.log(res);
      console.log(res)
      if(res !== 'confirm'){
        return this.$message.info('已取消删除~')
      }else{
@@ -172,13 +155,13 @@
    },
    //注册取消清空
    canceladd(){
      this.addForm.username = '';
      this.addForm.password = '';
      this.addForm.username = ''
      this.addForm.password = ''
      this.addDialogVisible = false
    },
    addClose(){
      this.addForm.username = '';
      this.addForm.password = '';
      this.addForm.username = ''
      this.addForm.password = ''
    },
    //注册提交
    addEdit(){
@@ -195,7 +178,6 @@
          this.$message.error('注册失败')
        }
      })
    }
  }
}
@@ -205,5 +187,4 @@
.add{
  margin-bottom: 10px;
}
</style>
src/components/Administrator/AdMain.vue
@@ -3,14 +3,7 @@
    <!-- çº§è”选择器 -->
    <el-row class="block">
      <el-col :span="4">
        <el-cascader
          v-model="value"
          :options="options"
          clearable
          filterable
          :getCheckedNodes="true"
          @change="handleChange">
        </el-cascader>
        <el-cascader v-model="value" :options="options" clearable filterable :getCheckedNodes="true" @change="handleChange"> </el-cascader>
      </el-col>
      <el-col :span="5">
        <el-button type="primary" icon="el-icon-edit" @click="goAdEdit()">点击对普通管理员进行管理</el-button>
@@ -25,8 +18,7 @@
          </el-col>
          <el-col :span="10">
            <!-- æ–°é—»æœç´¢ -->
            <el-input clearable placeholder="请输入所要查询的新闻标题" v-model="search" class="input-with-select">
            </el-input>
            <el-input clearable placeholder="请输入所要查询的新闻标题" v-model="search" class="input-with-select"> </el-input>
          </el-col>
        </el-row>
        <!-- æ–°é—»è¡¨æ ¼åŒºåŸŸ -->
@@ -42,12 +34,9 @@
              <span>{{ (currentPage-1)*pageSize+scope.$index+1 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width="" >
          </el-table-column>
          <el-table-column prop="title" label="新闻标题" width="">
          </el-table-column>
          <el-table-column prop="id" label="id" width="">
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width=""> </el-table-column>
          <el-table-column prop="title" label="新闻标题" width=""> </el-table-column>
          <el-table-column prop="id" label="id" width=""> </el-table-column>
          <el-table-column label="操作" width="">
            <template slot-scope="scope">
              <!-- {{ scope.row.id }} -->
@@ -57,7 +46,6 @@
                <el-button type="info" @click="deleteNews(scope.row.id)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <!-- åˆ†é¡µ -->
@@ -68,20 +56,17 @@
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[6,12, 18,]"
              :page-sizes="[6, 12, 18]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total">
              :total="total"
            >
            </el-pagination>
          </div>
        </div>
      </el-card>
      <!-- ä¿®æ”¹æ–°é—»çš„对话框 -->
      <el-dialog
        title="修改新闻"
        :visible.sync="editDialogVisible"
        width="50%"
        :before-close="handleClose">
      <el-dialog title="修改新闻" :visible.sync="editDialogVisible" width="50%" :before-close="handleClose">
        <!-- rules表单验证规则,ref当前表单的验证对象 -->
        <el-form ref="editFormRef" :model="editForm"  label-width="80px" status-icon>
          <el-form-item label="id:">
@@ -91,13 +76,7 @@
            <el-input v-model="editForm.title"></el-input>
          </el-form-item>
          <el-form-item label="发布日期:">
            <el-date-picker
              v-model="editForm.releaseTime"
              type="date"
              placeholder="请选择发布日期"
              format="yyyy å¹´ MM æœˆ dd æ—¥"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
            <el-date-picker v-model="editForm.releaseTime" type="date" placeholder="请选择发布日期" format="yyyy å¹´ MM æœˆ dd æ—¥" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
@@ -132,103 +111,114 @@
      fuzzytable:false, //模糊查询表格的显示
      fuzzyForm:{ fuzzytitle:'',fuzzytotal:0,fuzzycurrent:1,fuzzysize:6 },  //模糊查询列表对象
      value: [],
      options: [{
      options: [
        {
        value: 1,
        label: '首页',
        children: [{
          children: [
            {
          value:42,
          label: '通知公告',
              label: '通知公告'
        }, 
        {
          value:43,
          label: '工作动态',
              label: '工作动态'
        },
        {
          value:44,
          label: '学院动态',
              label: '学院动态'
        },
        {
          value:45,
          label: '轮播图',
        }],
      },{
              label: '轮播图'
            }
          ]
        },
        {
          value: 22,
          label: '科协概况',
          children: [{
          children: [
            {
            value:27,
            label: '简介',
              label: '简介'
          }, 
          {
            value:28,
            label: '章程',
              label: '章程'
          },
          {
            value:29,
            label: '组织结构',
              label: '组织结构'
          },
          {
            value:30,
            label: '工作职责',
              label: '工作职责'
          },
          {
            value:31,
            label: '专职人员',
          }],
              label: '专职人员'
            }
          ]
        },
        {
          value: 23,
          label: '政策法规',
          children: [{
          children: [
            {
            value:35,
            label: '中国科协政策文件',
              label: '中国科协政策文件'
          }, 
          {
            value:36,
            label: '地方科协政策文件',
              label: '地方科协政策文件'
          },
          {
            value:37,
            label: '社团管理文件',
          }],
              label: '社团管理文件'
            }
          ]
        },
        {
          value: 25,
          label: '学术交流',
          children: [{
          children: [
            {
            value:38,
            label: '学术信息',
              label: '学术信息'
          }, 
          {
            value:39,
            label: '科技竞赛',
          }],
              label: '科技竞赛'
            }
          ]
        },
        {
          value: 27,
          label: '科普风采',
          children: [{
          children: [
            {
            value:40,
            label: '平顶山学院科普活动',
              label: '平顶山学院科普活动'
          }, 
          {
            value:41,
            label: '平顶山市政协科普活动',
          }],
      }]
              label: '平顶山市政协科普活动'
            }
          ]
        }
      ]
    }
  },
  created(){
  },
  mounted(){
  },
  created() {},
  mounted() {},
  methods: {
    //修改对话框关闭的方法
    handleClose(done) {
      this.$confirm('确认关闭?')
        .then(_ => {
          done();
          done()
        })
        .catch(_ => {});
        .catch(_ => {})
    },
    //跳转普通管理列表
    goAdEdit(){
@@ -238,17 +228,18 @@
    handleChange(value) {
      // console.log(value);
      // console.log(value[1]);
      this.currentPage = 1;
      this.newsCategoryId = value[1]; //将得到的小标题id存放起来
      this.query(this.newsCategoryId);
      this.currentPage = 1
      this.newsCategoryId = value[1] //将得到的小标题id存放起来
      this.query(this.newsCategoryId)
    },
    query(newsCategoryId){
      const data = {
        current:this.currentPage,
        newsCategoryId:newsCategoryId,
        size:this.pageSize
      };
      getNewsList(data).then(res=>{
      }
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if (res.code !== 200) {
          return this.$message.error('获取新闻列表失败')
@@ -256,8 +247,9 @@
          this.tableData = res.data.records
          this.total = res.data.total
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //展示修改对话框
@@ -268,7 +260,7 @@
          this.editForm = res.data
        }     
      })
      this.editDialogVisible = true;
      this.editDialogVisible = true
    },
    //确定修改表单提交,验证发起请求
    editNew(){
@@ -278,11 +270,11 @@
        title:this.editForm.title
      }
      update(data).then(res=>{
        console.log('dsadasas',res);
        console.log('dsadasas', res)
        if (res.code == 200) {
          this.editDialogVisible =false;
          this.editDialogVisible = false
          this.$message.success('修改新闻成功!')
          this.query(this.newsCategoryId);
          this.query(this.newsCategoryId)
        }
      })
    },
@@ -301,7 +293,8 @@
        size: this.fuzzyForm.fuzzysize,
        title:title
      }
      fuzzy(data).then(res => {
      fuzzy(data)
        .then(res => {
        // console.log(res);
        if (res.code !== 200) {
          return this.$message.error('查询新闻列表失败')
@@ -309,8 +302,9 @@
          this.fuzzytableData = res.data.records
          this.fuzzyForm.fuzzytotal = res.data.total
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //清空查询列表内容
@@ -335,20 +329,20 @@
      })
      //如果用户点击确定则返回confirm
      //如果用户点击取消则返回cancel
      console.log(res);
      console.log(res)
      if(res !== 'confirm'){
        return this.$message.info('已取消删除~')
      }else{
        console.log(id);
        console.log(id)
        const data = {
          id:id
        }
        //参数data è¦ä»¥å¯¹è±¡çš„形式传入
        deleteNew(data).then(res => {
          console.log('>>>'+res);
          console.log('>>>' + res)
          if(res.code == 200){
            this.$message.success('删除新闻成功!')
            this.query(this.newsCategoryId);
            this.query(this.newsCategoryId)
          }else{
            return this.$message.error('删除新闻失败!')
          }
@@ -365,12 +359,12 @@
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.currentPage = val;
      this.currentPage = val
      this.query(this.newsCategoryId)
    },
    handleSizeChange(val) {
      // console.log(`每页 ${val} æ¡`);
      this.pageSize = val;
      this.pageSize = val
      this.query(this.newsCategoryId)
    },
    handleCurrentChangefuzzy(val){
@@ -383,39 +377,55 @@
    },
    //去往添加编辑页面
    goEdit(id){
      let title = '';
      console.log(this.value);
      if (this.value.length = 2) {
        let t = this.value[0];
        let i = this.value[1];
      let title = ''
      console.log(this.value)
      if ((this.value.length = 2)) {
        let t = this.value[0]
        let i = this.value[1]
        this.options.forEach( item => {
          if(item.value == t){
            title += item.label+'/'
            item.children.forEach( e => {
              if(e.value == i) title += e.label;
              if (e.value == i) title += e.label
            })
          }
        })
      }
      if (this.newsCategoryId==27&&this.total==1||this.newsCategoryId==28&&this.total==1||this.newsCategoryId==29&&this.total==1||
      this.newsCategoryId==30&&this.total==1||this.newsCategoryId==31&&this.total==1) {
      if (
        (this.newsCategoryId == 27 && this.total == 1) ||
        (this.newsCategoryId == 28 && this.total == 1) ||
        (this.newsCategoryId == 29 && this.total == 1) ||
        (this.newsCategoryId == 30 && this.total == 1) ||
        (this.newsCategoryId == 31 && this.total == 1)
      ) {
        this.$message.error('该新闻标题下只能存在一篇新闻')
      }else if(this.newsCategoryId==27||this.newsCategoryId==28||this.newsCategoryId==29||this.newsCategoryId==30||
      this.newsCategoryId==31||this.newsCategoryId == 35||this.newsCategoryId==36||this.newsCategoryId==37||
      this.newsCategoryId==38||this.newsCategoryId==39||this.newsCategoryId==40||
      this.newsCategoryId==41||this.newsCategoryId==42||this.newsCategoryId==43||
      this.newsCategoryId==44){
      } else if (
        this.newsCategoryId == 27 ||
        this.newsCategoryId == 28 ||
        this.newsCategoryId == 29 ||
        this.newsCategoryId == 30 ||
        this.newsCategoryId == 31 ||
        this.newsCategoryId == 35 ||
        this.newsCategoryId == 36 ||
        this.newsCategoryId == 37 ||
        this.newsCategoryId == 38 ||
        this.newsCategoryId == 39 ||
        this.newsCategoryId == 40 ||
        this.newsCategoryId == 41 ||
        this.newsCategoryId == 42 ||
        this.newsCategoryId == 43 ||
        this.newsCategoryId == 44
      ) {
        this.$router.push({path:'/administrator/edit',query:{id:id,title:title}})
        console.log(this.newsCategoryId);
        console.log(this.newsCategoryId)
      }else if(this.newsCategoryId==45){
        this.$router.push({path:'/administrator/editlunbo',query:{id:id,title:title}})
        // console.log(this.newsCategoryId);
      }else{
        this.$message.error('请先选择新闻标题')
      }
    }
  },
  }
}
</script>
src/components/Administrator/AdminHome.vue
@@ -18,18 +18,16 @@
<script>
export default {
  data() {
    return {
    }
    return {}
  },
  created() {
  },
  created() {},
  methods: {
    logout() {
      //清空token
      window.sessionStorage.clear()
      //跳转到登录页
      this.$router.push('/login')
    },
    }
  }
}
</script>
src/components/Administrator/Edit copy.vue
@@ -24,7 +24,7 @@
      content: '',  //新闻内容
      newsCategoryId:2,
      editorOption: {
        placeholder: "请输入正文",
        placeholder: '请输入正文',
        // editorOption里是放图片上传配置参数用的,例如:
        action:  '/api/product/richtext_img_upload.do',  // å¿…填参数 å›¾ç‰‡ä¸Šä¼ åœ°å€
        methods: 'POST',  // å¿…填参数 å›¾ç‰‡ä¸Šä¼ æ–¹å¼
@@ -33,7 +33,7 @@
        size: 10000000,  // å¯é€‰å‚æ•°   å›¾ç‰‡å¤§å°ï¼Œå•位为Kb, 1M = 1024Kb
        accept: 'multipart/form-data, image/png, image/gif, image/jpeg, image/bmp, image/x-icon,image/jpg'  // å¯é€‰ å¯ä¸Šä¼ çš„图片格式
      } ,  //编辑器新闻对象
      fileList:[],
      fileList: []
    }
  },
  created(){
@@ -49,12 +49,12 @@
        releaseTime:this.releaseTime
      }
      add(data).then(res => {
        console.log(res);
        console.log(res)
        if(res.code !== 200){
          return this.$message.error('发布新闻失败,请重试!')
        }else{
          this.$message.success('新闻发布成功!')
          console.log(this.content);
          console.log(this.content)
          this.$router.go(-1)
        }
      })
src/components/Administrator/Edit.vue
@@ -1,20 +1,18 @@
<template>
  <div class="box">
    <el-row><h3 style="margin-top: 0px">{{ $route.query.title }}</h3></el-row>
    <el-row
      ><h3 style="margin-top: 0px">{{ $route.query.title }}</h3></el-row
    >
    æ–°é—»æ ‡é¢˜ï¼š<el-input v-model="title" placeholder="请输入新闻标题"></el-input><br/><br/>
    å‘布日期:<el-date-picker  format="yyyy å¹´ MM æœˆ dd æ—¥" value-format="yyyy-MM-dd" v-model="releaseTime" placeholder="请选择新闻发布日期"></el-date-picker><br/><br/>
    æ–°é—»å†…容:<quill-editor ref="text" v-model="content" class="myQuillEditor" :options="editorOption" />
    <el-row style="margin-top:50px;">
      <el-button  type="success" @click="submit">发布</el-button>
      <!-- <input type="file" @change="chooseFile"/><br/><br/>
      <el-button  type="success" @click="tijiao">提交</el-button><br/><br/>
      <img :src="'http://localhost:7070/'+this.photo" style="width: 400px"> -->
    </el-row>
  </div>
</template>
<script>
import axios from 'axios'
// import axios from 'axios'
import { add,fileUpload, login } from '../../api/api'
import {quillEditor,Quill} from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
@@ -22,7 +20,7 @@
import 'quill/dist/quill.bubble.css'
import { container, ImageExtend,QuillWatch } from 'quill-image-extend-module'
Quill.register('modules/ImageExtend', ImageExtend)
axios.defaults.withCredentials = true;
// axios.defaults.withCredentials = true
export default {
  components:{ quillEditor },
@@ -35,18 +33,19 @@
      photo:'',
      newsCategoryId:2,
      editorOption: {
        placeholder: "请输入正文",
        placeholder: '请输入正文',
        modules: {
            ImageExtend: {  // å¦‚果不作设置,即{}  åˆ™ä¾ç„¶å¼€å¯å¤åˆ¶ç²˜è´´åŠŸèƒ½ä¸”ä»¥base64插入
          ImageExtend: {
            // å¦‚果不作设置,即{}  åˆ™ä¾ç„¶å¼€å¯å¤åˆ¶ç²˜è´´åŠŸèƒ½ä¸”ä»¥base64插入
                name: 'file',  // å›¾ç‰‡å‚数名
                loading: true,
                size: 10,  // å¯é€‰å‚æ•° å›¾ç‰‡å¤§å°ï¼Œå•位为M,1M = 1024kb
                action:'http://localhost:7070/uploading',
                response: (res) => {
                  console.log(res);
            response: res => {
              console.log(res)
                    return 'http://localhost:7070/'+res.data
                },
                headers: (xhr) => {
            headers: xhr => {
                  // axios.defaults.withCredentials = true;
                  // xhr.setRequestHeader('Cookie','NMTID=00OVM6QOJcTDVhqDUtvgSnd-5FBxLcAAAF9nTiDHg; JSESSIONID=5ACC52D29A2434E09450CB975E08C288')
                },  // å¯é€‰å‚æ•° è®¾ç½®è¯·æ±‚头部
@@ -63,53 +62,37 @@
                container:[
                    ['bold', 'italic', 'underline', 'strike'],        //加粗,斜体,下划线,删除线
                    ['blockquote', 'code-block'],         //引用,代码块
                    [{ 'header': 1 }, { 'header': 2 }],               // æ ‡é¢˜ï¼Œé”®å€¼å¯¹çš„形式;1、2表示字体大小
                    [{ 'list': 'ordered'}, { 'list': 'bullet' }],          //列表
                    [{ 'script': 'sub'}, { 'script': 'super' }],      // ä¸Šä¸‹æ ‡
                    [{ 'indent': '-1'}, { 'indent': '+1' }],          // ç¼©è¿›
                    [{ 'direction': 'rtl' }],                         // æ–‡æœ¬æ–¹å‘
                    [{ 'size': ['small', false, 'large', 'huge'] }],  // å­—体大小
                    [{ 'header': [1, 2, 3, 4, 5, 6, false] }],         //几级标题
                    [{ 'color': [] }, { 'background': [] }],          // å­—体颜色,字体背景颜色
                    [{ 'font': [] }],         //字体
                    [{ 'align': [] }],        //对齐方式
              [{ header: 1 }, { header: 2 }], // æ ‡é¢˜ï¼Œé”®å€¼å¯¹çš„形式;1、2表示字体大小
              [{ list: 'ordered' }, { list: 'bullet' }], // åˆ—表
              [{ script: 'sub' }, { script: 'super' }], // ä¸Šä¸‹æ ‡
              [{ indent: '-1' }, { indent: '+1' }], // ç¼©è¿›
              [{ direction: 'rtl' }], // æ–‡æœ¬æ–¹å‘
              [{ size: ['small', false, 'large', 'huge'] }], // å­—体大小
              [{ header: [1, 2, 3, 4, 5, 6, false] }], // å‡ çº§æ ‡é¢˜
              [{ color: [] }, { background: [] }], // å­—体颜色,字体背景颜色
              [{ font: [] }], // å­—体
              [{ align: [] }], // å¯¹é½æ–¹å¼
                    ['clean'],        //清除字体样式
                    ['image']        //上传图片、上传视频
                ],
                handlers: {
                    'image': function () {  // åŠ«æŒåŽŸæ¥çš„å›¾ç‰‡ç‚¹å‡»æŒ‰é’®äº‹ä»¶
              image: function() {
                // åŠ«æŒåŽŸæ¥çš„å›¾ç‰‡ç‚¹å‡»æŒ‰é’®äº‹ä»¶
                        QuillWatch.emit(this.quill.id)
                    }
                }
            },
        },
          }
        }
      } ,  //编辑器新闻对象
      fileList:[],
      fileList: []
    }
  },
  created(){
    // console.log('>>>>>>>',this.$route.query.id);
    this.newsCategoryId = this.$route.query.id
  },
  mounted(){
  },
  mounted() {},
  methods:{
    // chooseFile(file){
    //   this.picture = file.target.files[0];
    //   console.log(this.picture)
    //   return false;
    // },
    // tijiao(){
    //   const fd = new FormData()
    //   fd.append('file',this.picture)
    //   fileUpload(fd).then(res => {
    //     console.log(res)
    //     if(res.code == 200){
    //       this.photo = res.data
    //       console.log(this.photo);
    //     }
    //   })
    // },
    submit(){
      const data = {
        newsCategoryId:this.newsCategoryId,
@@ -117,19 +100,19 @@
        title:this.title,
        releaseTime:this.releaseTime
      }
      console.log(this.content);
      console.log(this.content)
      // console.log(this.newsCategoryId);
      add(data).then(res => {
        console.log(res);
        console.log(res)
        if(res.code !== 200){
          return this.$message.error('发布新闻失败,请重试!')
        }else{
          this.$message.success('新闻发布成功!')
          console.log(this.content);
          console.log(this.content)
          this.$router.go(-1)
        }
      })
    },
    }
  }
}
</script>
src/components/Administrator/EditLunBo.vue
@@ -1,6 +1,8 @@
<template>
  <div class="box">
    <el-row><h3 style="margin-top: 0px">{{ $route.query.title }}</h3></el-row>
    <el-row
      ><h3 style="margin-top: 0px">{{ $route.query.title }}</h3></el-row
    >
    æ–°é—»æ ‡é¢˜ï¼š<el-input v-model="title" placeholder="请输入新闻标题"></el-input><br/><br/>
    å‘布日期:<el-date-picker  format="yyyy å¹´ MM æœˆ dd æ—¥" value-format="yyyy-MM-dd" v-model="releaseTime" placeholder="请选择新闻发布日期"></el-date-picker><br/><br/>
    <input type="file" @change="chooseFile"/><br/><br/>
@@ -29,18 +31,19 @@
      content: '',  //新闻内容
      newsCategoryId:45,
      editorOption: {
        placeholder: "请输入正文",
        placeholder: '请输入正文',
        modules: {
            ImageExtend: {  // å¦‚果不作设置,即{}  åˆ™ä¾ç„¶å¼€å¯å¤åˆ¶ç²˜è´´åŠŸèƒ½ä¸”ä»¥base64插入
          ImageExtend: {
            // å¦‚果不作设置,即{}  åˆ™ä¾ç„¶å¼€å¯å¤åˆ¶ç²˜è´´åŠŸèƒ½ä¸”ä»¥base64插入
                name: 'file',  // å›¾ç‰‡å‚数名
                loading: true,
                size: 10,  // å¯é€‰å‚æ•° å›¾ç‰‡å¤§å°ï¼Œå•位为M,1M = 1024kb
                action:'http://localhost:7070/uploading',
                response: (res) => {
                  console.log(res);
            response: res => {
              console.log(res)
                    return 'http://localhost:7070/'+res.data
                },
                headers: (xhr) => {
            headers: xhr => {
                  // axios.defaults.withCredentials = true;
                  // xhr.setRequestHeader('Cookie','NMTID=00OVM6QOJcTDVhqDUtvgSnd-5FBxLcAAAF9nTiDHg; JSESSIONID=5ACC52D29A2434E09450CB975E08C288')
                },  // å¯é€‰å‚æ•° è®¾ç½®è¯·æ±‚头部
@@ -57,28 +60,29 @@
                container:[
                    ['bold', 'italic', 'underline', 'strike'],        //加粗,斜体,下划线,删除线
                    ['blockquote', 'code-block'],         //引用,代码块
                    [{ 'header': 1 }, { 'header': 2 }],               // æ ‡é¢˜ï¼Œé”®å€¼å¯¹çš„形式;1、2表示字体大小
                    [{ 'list': 'ordered'}, { 'list': 'bullet' }],          //列表
                    [{ 'script': 'sub'}, { 'script': 'super' }],      // ä¸Šä¸‹æ ‡
                    [{ 'indent': '-1'}, { 'indent': '+1' }],          // ç¼©è¿›
                    [{ 'direction': 'rtl' }],                         // æ–‡æœ¬æ–¹å‘
                    [{ 'size': ['small', false, 'large', 'huge'] }],  // å­—体大小
                    [{ 'header': [1, 2, 3, 4, 5, 6, false] }],         //几级标题
                    [{ 'color': [] }, { 'background': [] }],          // å­—体颜色,字体背景颜色
                    [{ 'font': [] }],         //字体
                    [{ 'align': [] }],        //对齐方式
              [{ header: 1 }, { header: 2 }], // æ ‡é¢˜ï¼Œé”®å€¼å¯¹çš„形式;1、2表示字体大小
              [{ list: 'ordered' }, { list: 'bullet' }], //列表
              [{ script: 'sub' }, { script: 'super' }], // ä¸Šä¸‹æ ‡
              [{ indent: '-1' }, { indent: '+1' }], // ç¼©è¿›
              [{ direction: 'rtl' }], // æ–‡æœ¬æ–¹å‘
              [{ size: ['small', false, 'large', 'huge'] }], // å­—体大小
              [{ header: [1, 2, 3, 4, 5, 6, false] }], //几级标题
              [{ color: [] }, { background: [] }], // å­—体颜色,字体背景颜色
              [{ font: [] }], //字体
              [{ align: [] }], //对齐方式
                    ['clean'],        //清除字体样式
                    ['image']        //上传图片、上传视频
                ],
                handlers: {
                    'image': function () {  // åŠ«æŒåŽŸæ¥çš„å›¾ç‰‡ç‚¹å‡»æŒ‰é’®äº‹ä»¶
              image: function() {
                // åŠ«æŒåŽŸæ¥çš„å›¾ç‰‡ç‚¹å‡»æŒ‰é’®äº‹ä»¶
                        QuillWatch.emit(this.quill.id)
                    }
                }
            },
        },
          }
        }
      } ,  //编辑器新闻对象
      fileList:[],
      fileList: []
    }
  },
  created(){
@@ -87,14 +91,14 @@
  },
  methods:{
    chooseFile(file) {
      this.pictureFile = file.target.files[0];
      this.pictureFile = file.target.files[0]
      console.log(this.pictureFile)
      console.log(file);
      return false;
      console.log(file)
      return false
    },
    submit(){
      const fd = new FormData();
      fd.append('pictureFile',this.pictureFile);
      const fd = new FormData()
      fd.append('pictureFile', this.pictureFile)
      const data = {
        newsCategoryId:this.newsCategoryId,
        content:this.content,
@@ -103,13 +107,13 @@
      }
      // console.log(999)
      add(data,fd).then(res => {
        console.log(res);
        console.log(this.newsCategoryId);
        console.log(res)
        console.log(this.newsCategoryId)
        if (res.code != 200) {
          return this.$message.error('发布新闻失败,请重试!')
        }else{
          this.$message.success('新闻发布成功!')
          console.log(this.content);
          console.log(this.content)
          this.$router.go(-1)
        }
      })
src/components/Administrator/Main copy.vue
@@ -2,13 +2,7 @@
  <div>
    <!-- çº§è”选择器 -->
     <div class="block">
      <el-cascader
        v-model="value"
        :options="options"
        clearable
        filterable
        @change="handleChange">
      </el-cascader>
      <el-cascader v-model="value" :options="options" clearable filterable @change="handleChange"> </el-cascader>
    </div>
    <div>
      <el-card class="box-card">
@@ -25,8 +19,7 @@
          </el-col>
        </el-row>
        <!-- æ–°é—»è¡¨æ ¼åŒºåŸŸ -->
        <el-table v-show="gettable" :data="tableData" border style="width: 100%" :header-cell-style="{textAlign: 'center'}" :cell-style="{ textAlign: 'center' }"
        >
        <el-table v-show="gettable" :data="tableData" border style="width: 100%" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
          <!-- :header-cell-style="{textAlign: 'center'}"设置头部居中: -->
          <!-- :cell-style="{ textAlign: 'center' }"设置整个表格内容水平居中: -->
          <!-- é—®é¢˜ï¼šæ€Žä¹ˆèŽ·å–æ•°ç»„ä¸­æ¯ä¸ªå¯¹è±¡çš„key值(每条新闻的id)?
@@ -36,12 +29,9 @@
              <span>{{ (currentPage-1)*pageSize+scope.$index+1 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width="" >
          </el-table-column>
          <el-table-column prop="title" label="新闻标题" width="">
          </el-table-column>
          <el-table-column prop="id" label="id" width="">
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width=""> </el-table-column>
          <el-table-column prop="title" label="新闻标题" width=""> </el-table-column>
          <el-table-column prop="id" label="id" width=""> </el-table-column>
          <el-table-column label="操作" width="">
            <template slot-scope="scope">
              <!-- {{ scope.row.id }} -->
@@ -51,7 +41,6 @@
                <el-button type="info" @click="deleteNews(scope.row.id)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <!-- æ¨¡ç³ŠæŸ¥è¯¢çš„表格显示 -->
@@ -61,12 +50,9 @@
              <span>{{ (fuzzyForm.fuzzycurrent-1)*fuzzyForm.fuzzysize+scope.$index+1 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width="" >
          </el-table-column>
          <el-table-column prop="title" label="新闻标题" width="">
          </el-table-column>
          <el-table-column prop="id" label="id" width="">
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width=""> </el-table-column>
          <el-table-column prop="title" label="新闻标题" width=""> </el-table-column>
          <el-table-column prop="id" label="id" width=""> </el-table-column>
          <el-table-column label="操作" width="">
            <template slot-scope="scope">
              <div>
@@ -75,7 +61,6 @@
                <el-button type="info" @click="deleteNews(scope.row.id)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <!-- åˆ†é¡µ -->
@@ -87,10 +72,11 @@
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[6,12, 18,]"
              :page-sizes="[6, 12, 18]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total">
              :total="total"
            >
            </el-pagination>
          </div>
          <!-- æ¨¡ç³Šæ–°é—»åˆ—表分页 -->
@@ -100,20 +86,17 @@
              @size-change="handleSizeChangefuzzy"
              @current-change="handleCurrentChangefuzzy"
              :current-page="fuzzyForm.fuzzycurrent"
              :page-sizes="[6,10, 18,]"
              :page-sizes="[6, 10, 18]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="fuzzyForm.fuzzytotal">
              :total="fuzzyForm.fuzzytotal"
            >
            </el-pagination>
          </div>
        </div>
      </el-card>
      <!-- ä¿®æ”¹æ–°é—»çš„对话框 -->
      <el-dialog
        title="修改新闻"
        :visible.sync="editDialogVisible"
        width="50%"
        :before-close="handleClose">
      <el-dialog title="修改新闻" :visible.sync="editDialogVisible" width="50%" :before-close="handleClose">
        <!-- rules表单验证规则,ref当前表单的验证对象 -->
        <el-form ref="editFormRef" :model="editForm"  label-width="80px" status-icon>
          <el-form-item label="id:">
@@ -155,114 +138,126 @@
      fuzzytable:false, //模糊查询表格的显示
      fuzzyForm:{ fuzzytitle:'',fuzzytotal:0,fuzzycurrent:1,fuzzysize:6 },  //模糊查询列表对象
      value: [],
      options: [{
      options: [
        {
        value: 1,
        label: '首页',
        children: [{
          children: [
            {
          value:42,
          label: '通知公告',
              label: '通知公告'
        }, 
        {
          value:43,
          label: '工作动态',
              label: '工作动态'
        },
        {
          value:44,
          label: '学院动态',
        }],
      },{
              label: '学院动态'
            }
          ]
        },
        {
          value: 22,
          label: '科协概况',
          children: [{
          children: [
            {
            value:27,
            label: '简介',
              label: '简介'
          }, 
          {
            value:28,
            label: '章程',
              label: '章程'
          },
          {
            value:29,
            label: '组织结构',
              label: '组织结构'
          },
          {
            value:30,
            label: '工作职责',
              label: '工作职责'
          },
          {
            value:31,
            label: '专职人员',
          }],
              label: '专职人员'
            }
          ]
        },
        {
          value: 23,
          label: '政策法规',
          children: [{
          children: [
            {
            value:35,
            label: '中国科协政策文件',
              label: '中国科协政策文件'
          }, 
          {
            value:36,
            label: '地方科协政策文件',
              label: '地方科协政策文件'
          },
          {
            value:37,
            label: '社团管理文件',
          }],
              label: '社团管理文件'
            }
          ]
        },
        {
          value: 25,
          label: '学术交流',
          children: [{
          children: [
            {
            value:38,
            label: '学术信息',
              label: '学术信息'
          }, 
          {
            value:39,
            label: '科技竞赛',
          }],
              label: '科技竞赛'
            }
          ]
        },
        {
          value: 27,
          label: '科普风采',
          children: [{
          children: [
            {
            value:40,
            label: '平顶山学院科普活动',
              label: '平顶山学院科普活动'
          }, 
          {
            value:41,
            label: '平顶山市政协科普活动',
          }],
      }]
              label: '平顶山市政协科普活动'
            }
          ]
        }
      ]
    }
  },
  created(){
  },
  mounted(){
  },
  created() {},
  mounted() {},
  methods: {
    //修改对话框关闭的方法
    handleClose(done) {
      this.$confirm('确认关闭?')
        .then(_ => {
          done();
          done()
        })
        .catch(_ => {});
        .catch(_ => {})
    },
    //级联选择器的方法
    handleChange(value) {
      // console.log(value);
      // console.log(value[1]);
      this.newsCategoryId = value[1]; //将得到的小标题id存放起来
      this.query(this.newsCategoryId);
      this.newsCategoryId = value[1] //将得到的小标题id存放起来
      this.query(this.newsCategoryId)
    },
    query(newsCategoryId){
      const data = {
        current:this.currentPage,
        newsCategoryId:newsCategoryId,
        size:this.pageSize
      };
      getNewsList(data).then(res=>{
      }
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if (res.code !== 200) {
          return this.$message.error('获取新闻列表失败')
@@ -270,8 +265,9 @@
          this.tableData = res.data.records
          this.total = res.data.total
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //展示修改对话框
@@ -282,7 +278,7 @@
          this.editForm = res.data
        }     
      })
      this.editDialogVisible = true;
      this.editDialogVisible = true
    },
    //确定修改表单提交,验证发起请求
    editNew(){
@@ -294,9 +290,9 @@
      update(data).then(res=>{
        // console.log('dsadasas',res);
        if (res.code == 200) {
          this.editDialogVisible =false;
          this.editDialogVisible = false
          this.$message.success('修改新闻成功!')
          this.query(this.newsCategoryId);
          this.query(this.newsCategoryId)
        }
      })
    },
@@ -315,7 +311,8 @@
        size: this.fuzzyForm.fuzzysize,
        title:title
      }
      fuzzy(data).then(res => {
      fuzzy(data)
        .then(res => {
        // console.log(res);
        if (res.code !== 200) {
          return this.$message.error('查询新闻列表失败')
@@ -323,8 +320,9 @@
          this.fuzzytableData = res.data.records
          this.fuzzyForm.fuzzytotal = res.data.total
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //清空查询列表内容
@@ -349,20 +347,20 @@
      })
      //如果用户点击确定则返回confirm
      //如果用户点击取消则返回cancel
      console.log(res);
      console.log(res)
      if(res !== 'confirm'){
        return this.$message.info('已取消删除~')
      }else{
        console.log(id);
        console.log(id)
        const data = {
          id:id
        }
        //参数data è¦ä»¥å¯¹è±¡çš„形式传入
        deleteNew(data).then(res => {
          console.log('>>>'+res);
          console.log('>>>' + res)
          if(res.code == 200){
            this.$message.success('删除新闻成功!')
            this.query(this.newsCategoryId);
            this.query(this.newsCategoryId)
          }else{
            return this.$message.error('删除新闻失败!')
          }
@@ -375,12 +373,12 @@
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.currentPage = val;
      this.currentPage = val
      this.query(this.newsCategoryId)
    },
    handleSizeChange(val) {
      // console.log(`每页 ${val} æ¡`);
      this.pageSize = val;
      this.pageSize = val
      this.query(this.newsCategoryId)
    },
    handleCurrentChangefuzzy(val){
@@ -393,21 +391,38 @@
    },
    //去往添加编辑页面
    goEdit(id){
      if (this.newsCategoryId==27&&this.total==1||this.newsCategoryId==28&&this.total==1||this.newsCategoryId==29&&this.total==1||
      this.newsCategoryId==30&&this.total==1||this.newsCategoryId==31&&this.total==1) {
      if (
        (this.newsCategoryId == 27 && this.total == 1) ||
        (this.newsCategoryId == 28 && this.total == 1) ||
        (this.newsCategoryId == 29 && this.total == 1) ||
        (this.newsCategoryId == 30 && this.total == 1) ||
        (this.newsCategoryId == 31 && this.total == 1)
      ) {
        this.$message.error('该新闻标题下只能存在一篇新闻')
      }else if(this.newsCategoryId==27||this.newsCategoryId==28||this.newsCategoryId==29||this.newsCategoryId==30||
      this.newsCategoryId==31||this.newsCategoryId == 35||this.newsCategoryId==36||this.newsCategoryId==37||
      this.newsCategoryId==38||this.newsCategoryId==39||this.newsCategoryId==40||
      this.newsCategoryId==41||this.newsCategoryId==42||this.newsCategoryId==43||
      this.newsCategoryId==44){
      } else if (
        this.newsCategoryId == 27 ||
        this.newsCategoryId == 28 ||
        this.newsCategoryId == 29 ||
        this.newsCategoryId == 30 ||
        this.newsCategoryId == 31 ||
        this.newsCategoryId == 35 ||
        this.newsCategoryId == 36 ||
        this.newsCategoryId == 37 ||
        this.newsCategoryId == 38 ||
        this.newsCategoryId == 39 ||
        this.newsCategoryId == 40 ||
        this.newsCategoryId == 41 ||
        this.newsCategoryId == 42 ||
        this.newsCategoryId == 43 ||
        this.newsCategoryId == 44
      ) {
        this.$router.push({path:'/administrator/edit',query:{id:id}})
        console.log(this.newsCategoryId);
        console.log(this.newsCategoryId)
      }else{
        this.$message.error('请先选择新闻标题')
      } 
    }
  },
  }
}
</script>
src/components/Administrator/Main.vue
@@ -3,14 +3,7 @@
    <!-- çº§è”选择器 -->
    <el-row class="block">
      <el-col :span="4">
        <el-cascader
          v-model="value"
          :options="options"
          clearable
          filterable
          :getCheckedNodes="true"
          @change="handleChange">
        </el-cascader>
        <el-cascader v-model="value" :options="options" clearable filterable :getCheckedNodes="true" @change="handleChange"> </el-cascader>
      </el-col>
    </el-row>
    <div>
@@ -22,8 +15,7 @@
          </el-col>
          <el-col :span="10">
            <!-- æ–°é—»æœç´¢ -->
            <el-input clearable placeholder="请输入所要查询的新闻标题" v-model="search" class="input-with-select">
            </el-input>
            <el-input clearable placeholder="请输入所要查询的新闻标题" v-model="search" class="input-with-select"> </el-input>
          </el-col>
        </el-row>
        <!-- æ–°é—»è¡¨æ ¼åŒºåŸŸ -->
@@ -39,12 +31,9 @@
              <span>{{ (currentPage-1)*pageSize+scope.$index+1 }}</span>
            </template>
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width="" >
          </el-table-column>
          <el-table-column prop="title" label="新闻标题" width="">
          </el-table-column>
          <el-table-column prop="id" label="id" width="">
          </el-table-column>
          <el-table-column prop="releaseTime" label="日期" width=""> </el-table-column>
          <el-table-column prop="title" label="新闻标题" width=""> </el-table-column>
          <el-table-column prop="id" label="id" width=""> </el-table-column>
          <el-table-column label="操作" width="">
            <template slot-scope="scope">
              <!-- {{ scope.row.id }} -->
@@ -54,7 +43,6 @@
                <el-button type="info" @click="deleteNews(scope.row.id)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <!-- åˆ†é¡µ -->
@@ -65,20 +53,17 @@
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[6,12, 18,]"
              :page-sizes="[6, 12, 18]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total">
              :total="total"
            >
            </el-pagination>
          </div>
        </div>
      </el-card>
      <!-- ä¿®æ”¹æ–°é—»çš„对话框 -->
      <el-dialog
        title="修改新闻"
        :visible.sync="editDialogVisible"
        width="50%"
        :before-close="handleClose">
      <el-dialog title="修改新闻" :visible.sync="editDialogVisible" width="50%" :before-close="handleClose">
        <!-- rules表单验证规则,ref当前表单的验证对象 -->
        <el-form ref="editFormRef" :model="editForm"  label-width="80px" status-icon>
          <el-form-item label="id:">
@@ -88,13 +73,7 @@
            <el-input v-model="editForm.title"></el-input>
          </el-form-item>
          <el-form-item label="发布日期:">
            <el-date-picker
              v-model="editForm.releaseTime"
              type="date"
              placeholder="请选择发布日期"
              format="yyyy å¹´ MM æœˆ dd æ—¥"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
            <el-date-picker v-model="editForm.releaseTime" type="date" placeholder="请选择发布日期" format="yyyy å¹´ MM æœˆ dd æ—¥" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
@@ -129,119 +108,131 @@
      fuzzytable:false, //模糊查询表格的显示
      fuzzyForm:{ fuzzytitle:'',fuzzytotal:0,fuzzycurrent:1,fuzzysize:6 },  //模糊查询列表对象
      value: [],
      options: [{
      options: [
        {
        value: 1,
        label: '首页',
        children: [{
          children: [
            {
          value:42,
          label: '通知公告',
              label: '通知公告'
        }, 
        {
          value:43,
          label: '工作动态',
              label: '工作动态'
        },
        {
          value:44,
          label: '学院动态',
              label: '学院动态'
        },
        {
          value:45,
          label: '轮播图',
        }],
      },{
              label: '轮播图'
            }
          ]
        },
        {
          value: 22,
          label: '科协概况',
          children: [{
          children: [
            {
            value:27,
            label: '简介',
              label: '简介'
          }, 
          {
            value:28,
            label: '章程',
              label: '章程'
          },
          {
            value:29,
            label: '组织结构',
              label: '组织结构'
          },
          {
            value:30,
            label: '工作职责',
              label: '工作职责'
          },
          {
            value:31,
            label: '专职人员',
          }],
              label: '专职人员'
            }
          ]
        },
        {
          value: 23,
          label: '政策法规',
          children: [{
          children: [
            {
            value:35,
            label: '中国科协政策文件',
              label: '中国科协政策文件'
          }, 
          {
            value:36,
            label: '地方科协政策文件',
              label: '地方科协政策文件'
          },
          {
            value:37,
            label: '社团管理文件',
          }],
              label: '社团管理文件'
            }
          ]
        },
        {
          value: 25,
          label: '学术交流',
          children: [{
          children: [
            {
            value:38,
            label: '学术信息',
              label: '学术信息'
          }, 
          {
            value:39,
            label: '科技竞赛',
          }],
              label: '科技竞赛'
            }
          ]
        },
        {
          value: 27,
          label: '科普风采',
          children: [{
          children: [
            {
            value:40,
            label: '平顶山学院科普活动',
              label: '平顶山学院科普活动'
          }, 
          {
            value:41,
            label: '平顶山市政协科普活动',
          }],
      }]
              label: '平顶山市政协科普活动'
            }
          ]
        }
      ]
    }
  },
  created(){
  },
  mounted(){
  },
  created() {},
  mounted() {},
  methods: {
    //修改对话框关闭的方法
    handleClose(done) {
      this.$confirm('确认关闭?')
        .then(_ => {
          done();
          done()
        })
        .catch(_ => {});
        .catch(_ => {})
    },
    //级联选择器的方法
    handleChange(value) {
      // console.log(value);
      // console.log(value[1]);
      this.currentPage = 1;
      this.newsCategoryId = value[1]; //将得到的小标题id存放起来
      this.query(this.newsCategoryId);
      this.currentPage = 1
      this.newsCategoryId = value[1] //将得到的小标题id存放起来
      this.query(this.newsCategoryId)
    },
    query(newsCategoryId){
      const data = {
        current:this.currentPage,
        newsCategoryId:newsCategoryId,
        size:this.pageSize
      };
      getNewsList(data).then(res=>{
      }
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if (res.code !== 200) {
          return this.$message.error('获取新闻列表失败')
@@ -249,8 +240,9 @@
          this.tableData = res.data.records
          this.total = res.data.total
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //展示修改对话框
@@ -261,7 +253,7 @@
          this.editForm = res.data
        }     
      })
      this.editDialogVisible = true;
      this.editDialogVisible = true
    },
    //确定修改表单提交,验证发起请求
    editNew(){
@@ -271,11 +263,11 @@
        title:this.editForm.title
      }
      update(data).then(res=>{
        console.log('dsadasas',res);
        console.log('dsadasas', res)
        if (res.code == 200) {
          this.editDialogVisible =false;
          this.editDialogVisible = false
          this.$message.success('修改新闻成功!')
          this.query(this.newsCategoryId);
          this.query(this.newsCategoryId)
        }
      })
    },
@@ -294,7 +286,8 @@
        size: this.fuzzyForm.fuzzysize,
        title:title
      }
      fuzzy(data).then(res => {
      fuzzy(data)
        .then(res => {
        // console.log(res);
        if (res.code !== 200) {
          return this.$message.error('查询新闻列表失败')
@@ -302,8 +295,9 @@
          this.fuzzytableData = res.data.records
          this.fuzzyForm.fuzzytotal = res.data.total
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //清空查询列表内容
@@ -328,20 +322,20 @@
      })
      //如果用户点击确定则返回confirm
      //如果用户点击取消则返回cancel
      console.log(res);
      console.log(res)
      if(res !== 'confirm'){
        return this.$message.info('已取消删除~')
      }else{
        console.log(id);
        console.log(id)
        const data = {
          id:id
        }
        //参数data è¦ä»¥å¯¹è±¡çš„形式传入
        deleteNew(data).then(res => {
          console.log('>>>'+res);
          console.log('>>>' + res)
          if(res.code == 200){
            this.$message.success('删除新闻成功!')
            this.query(this.newsCategoryId);
            this.query(this.newsCategoryId)
          }else{
            return this.$message.error('删除新闻失败!')
          }
@@ -358,12 +352,12 @@
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.currentPage = val;
      this.currentPage = val
      this.query(this.newsCategoryId)
    },
    handleSizeChange(val) {
      // console.log(`每页 ${val} æ¡`);
      this.pageSize = val;
      this.pageSize = val
      this.query(this.newsCategoryId)
    },
    handleCurrentChangefuzzy(val){
@@ -376,39 +370,55 @@
    },
    //去往添加编辑页面
    goEdit(id){
      let title = '';
      console.log(this.value);
      if (this.value.length = 2) {
        let t = this.value[0];
        let i = this.value[1];
      let title = ''
      console.log(this.value)
      if ((this.value.length = 2)) {
        let t = this.value[0]
        let i = this.value[1]
        this.options.forEach( item => {
          if(item.value == t){
            title += item.label+'/'
            item.children.forEach( e => {
              if(e.value == i) title += e.label;
              if (e.value == i) title += e.label
            })
          }
        })
      }
      if (this.newsCategoryId==27&&this.total==1||this.newsCategoryId==28&&this.total==1||this.newsCategoryId==29&&this.total==1||
      this.newsCategoryId==30&&this.total==1||this.newsCategoryId==31&&this.total==1) {
      if (
        (this.newsCategoryId == 27 && this.total == 1) ||
        (this.newsCategoryId == 28 && this.total == 1) ||
        (this.newsCategoryId == 29 && this.total == 1) ||
        (this.newsCategoryId == 30 && this.total == 1) ||
        (this.newsCategoryId == 31 && this.total == 1)
      ) {
        this.$message.error('该新闻标题下只能存在一篇新闻')
      }else if(this.newsCategoryId==27||this.newsCategoryId==28||this.newsCategoryId==29||this.newsCategoryId==30||
      this.newsCategoryId==31||this.newsCategoryId == 35||this.newsCategoryId==36||this.newsCategoryId==37||
      this.newsCategoryId==38||this.newsCategoryId==39||this.newsCategoryId==40||
      this.newsCategoryId==41||this.newsCategoryId==42||this.newsCategoryId==43||
      this.newsCategoryId==44){
      } else if (
        this.newsCategoryId == 27 ||
        this.newsCategoryId == 28 ||
        this.newsCategoryId == 29 ||
        this.newsCategoryId == 30 ||
        this.newsCategoryId == 31 ||
        this.newsCategoryId == 35 ||
        this.newsCategoryId == 36 ||
        this.newsCategoryId == 37 ||
        this.newsCategoryId == 38 ||
        this.newsCategoryId == 39 ||
        this.newsCategoryId == 40 ||
        this.newsCategoryId == 41 ||
        this.newsCategoryId == 42 ||
        this.newsCategoryId == 43 ||
        this.newsCategoryId == 44
      ) {
        this.$router.push({path:'/administrator/edit',query:{id:id,title:title}})
        console.log(this.newsCategoryId);
        console.log(this.newsCategoryId)
      }else if(this.newsCategoryId==45){
        this.$router.push({path:'/administrator/editlunbo',query:{id:id,title:title}})
        // console.log(this.newsCategoryId);
      }else{
        this.$message.error('请先选择新闻标题')
      }
    }
  },
  }
}
</script>
src/components/Administrator/Welcome.vue
@@ -2,24 +2,14 @@
  <div>
    <h2>欢迎进入后台管理系统</h2>
    <el-upload
      ref="upload"
      action
      accept="image/*"
      :limit= 3
      :file-list='filelist'
      list-type="picture-card"
      :on-preview="handlePictureCardPreview"
      :on-remove="handleRemove"
      :http-request='upload'>
    <el-upload ref="upload" action accept="image/*" :limit="3" :file-list="filelist" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-remove="handleRemove" :http-request="upload">
      <i class="el-icon-plus"></i>
    </el-upload>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%" :src="dialogImageUrl" alt="">
      <img width="100%" :src="dialogImageUrl" alt="" />
    </el-dialog>
    <el-button @click="save">保存</el-button>
  </div>
</template>
<script>
@@ -32,32 +22,32 @@
      filelist:[],
      delList:[],
      dialogVisible:false,
      dialogImageUrl:'',
      dialogImageUrl: ''
    }
  },
  methods:{
    save(){
      //取到图片集合
      let uploadImglist = this.$refs.upload.uploadFiles
      console.log(uploadImglist);
      let formData = new FormData();
      console.log(uploadImglist)
      let formData = new FormData()
      uploadImglist.forEach(item => {
        //ready状态的是未上传的 success是已经上传成功的,只需要添加未上传的即可
        if(item.status == "ready"){
          formData.append('file', item.raw);
        if (item.status == 'ready') {
          formData.append('file', item.raw)
        }
      });
      })
      formData.get('file')
      fileUpload(formData).then(res=>{
        //上传接口
        console.log(res);
        console.log(res)
      })
    },
    // é¢„览图片
    handlePictureCardPreview(file){
      this.dialogVisible = true
      this.dialogImageUrl=file.url
      console.log(this.dialogImageUrl);
      console.log(this.dialogImageUrl)
    },
    // åˆ é™¤å›¾ç‰‡
    handleRemove(file){
@@ -66,12 +56,9 @@
        this.delList.push(file.id)
      }
    },
    upload(){
    }
    upload() {}
  }
}
</script>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>
src/components/Home.vue
@@ -6,13 +6,13 @@
        <img src="../assets/xiaohui4.png" alt="" />
      </div>
      <div>
        <img src="../assets/bg.png" alt="">
        <img src="../assets/bg.png" alt="" />
      </div>
    </el-header>
    <!-- ä¸»é¡µå¯¼èˆªæ  -->
    <el-row>
      <el-menu mode="horizontal" background-color="rgb(64, 112, 186)" text-color="white" class="menu" active-text-color="#000000" :default-active="activeIndex" @select="handleSelect">
        <el-menu-item :key="index" v-for="(item, index) in menuList" :index="(item.id).toString()">
        <el-menu-item :key="index" v-for="(item, index) in menuList" :index="item.id.toString()">
          {{ item.name }}
        </el-menu-item>
      </el-menu>
@@ -35,9 +35,17 @@
  data() {
    return {
      activeIndex: '1',
      menuList: [{name: '首页',id: 1},{name: '科协概况',id: 22},{name: '政策法规',id: 23},{name: '科协项目',id: 24},
      {name: '学术交流',id: 25},{name: '办事指南',id: 26},{name: '科普风采',id: 27},{name: '学校首页',id: 28},
      {name: '联系我们',id: 29}],
      menuList: [
        { name: '首页', id: 1 },
        { name: '科协概况', id: 22 },
        { name: '政策法规', id: 23 },
        { name: '科协项目', id: 24 },
        { name: '学术交流', id: 25 },
        { name: '办事指南', id: 26 },
        { name: '科普风采', id: 27 },
        { name: '学校首页', id: 28 },
        { name: '联系我们', id: 29 }
      ],
      menuList2:[]
    }
  },
@@ -46,11 +54,14 @@
  },
  mounted() {
    let api3 = 'http://localhost:7070/news_type/all'
    axios.get(api3).then((res)=>{
    axios
      .get(api3)
      .then(res => {
      // console.log(res);
      this.menuList2 = res.data.data
    }).catch((error)=>{
      console.log(error);
      })
      .catch(error => {
        console.log(error)
    })
  },
  watch: {},
src/components/Login.vue
@@ -34,7 +34,7 @@
      loginForm: {
        username: '',
        password: ''
      },
      }
    }
  },
  methods: {
@@ -48,7 +48,7 @@
        password: this.loginForm.password
      }
      login(data).then(res => {
        console.log(res);
        console.log(res)
        if(res.code !== 200){
          this.$message.error('登录失败!')
        }else if(res.data.role == '超级管理员'){
src/components/NotFound.vue
@@ -1,12 +1,11 @@
<template>
  <div class="center">
    <img src="../assets/404.gif" alt="">
    <img src="../assets/404.gif" alt="" />
  </div>
</template>
<script>
export default {
};
export default {}
</script>
<style scoped>
src/components/globalTitle.vue
@@ -2,7 +2,9 @@
  <div>
    <el-row>
      <div class="fl">
        <span><b>{{ getTitle(this.$route.query.title) }}</b></span>
        <span
          ><b>{{ getTitle(this.$route.query.title) }}</b></span
        >
      </div>
      <div class="fr">
        <el-breadcrumb separator-class="el-icon-arrow-right">
@@ -19,11 +21,10 @@
  name:'globalTitle',
  data(){
    return {
      title:'',
      title: ''
    }
  },
  created(){
  },
  created() {},
  methods:{
    getTitle(v){
      switch(v){
src/components/page/News.vue
@@ -5,7 +5,7 @@
      <h2>{{ title }}</h2>
      <p>发布日期:{{ releaseTime }} ç‚¹å‡»é‡ï¼š[ {{(hits+1)/2}} ]</p>
    </div>
    <hr>
    <hr />
    <div v-html="content" class="ql-editor"></div>
  </div>
</template>
@@ -23,20 +23,20 @@
  },
  created(){
    // console.log(">>>>>>>>",this.$route.query.id);
    this.getalone();
    this.getalone()
  },
  methods:{
    getalone(){
      const data = this.$route.query.id;
      const data = this.$route.query.id
      getnew(data).then(res => {
        console.log(res);
        this.content = res.data.content;
        this.hits = res.data.hits;
        this.releaseTime = res.data.releaseTime;
        this.title = res.data.title;
        console.log(res)
        this.content = res.data.content
        this.hits = res.data.hits
        this.releaseTime = res.data.releaseTime
        this.title = res.data.title
      })
    },
  },
    }
  }
}
</script>
<style>
src/components/page/banShiZhiNan.vue
@@ -2,7 +2,7 @@
  <div>
    <globalTitle />
    <div>
      <img src="../../assets/keyanlixiangjieti.png" alt="">
      <img src="../../assets/keyanlixiangjieti.png" alt="" />
    </div>
  </div>
</template>
@@ -11,11 +11,8 @@
import globalTitle from '../globalTitle.vue'
export default {
  components: { globalTitle},
  name: 'banShiZhiNan',
  name: 'banShiZhiNan'
}
</script>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>
src/components/page/index.vue
@@ -6,7 +6,7 @@
          <el-carousel height="450px"  arrow="always" :interval="3000">
            <el-carousel-item v-for="(item,index) in imgList" :key="index">
              <div @click="gonew(item.id)" class="cursor" style="width:590px; height:450px">
                <img :src="'http://localhost:7070/'+item.picturePath"  alt="" style="width:100%; height:90%">
              <img :src="'http://localhost:7070/' + item.picturePath" alt="" style="width:100%; height:90%" />
              </div>
            </el-carousel-item>
          </el-carousel>
@@ -22,10 +22,10 @@
    <!-- å®šä½fixed -->
    <div class="fixed1">
      <a href="#"><img src="../../assets/gzh.jpg" alt=""></a>
      <a href="#"><img src="../../assets/gzh.jpg" alt=""/></a>
    </div>
    <div class="fixed2">
      <a href="#"><img src="../../assets/wb.jpg" alt=""></a>
      <a href="#"><img src="../../assets/wb.jpg" alt=""/></a>
    </div>
  </div>
</template>
@@ -47,7 +47,7 @@
      //   { path:require('../../assets/2.jpg'),index: 2},
      //   { path:require('../../assets/3.jpg'),index: 3},
      // ],
      imgList:[],
      imgList: []
    }
  },
  created(){
@@ -60,13 +60,15 @@
        newsCategoryId:45,
        size:3
      }
      getNewsList(data).then(res => {
        console.log(res);
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.imgList = res.data.records
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    gonew(id){
src/components/page/introduce.vue
@@ -38,33 +38,34 @@
      new:{}  //新闻对象
    }
  },
  created() {
  },
  created() {},
  mounted() {
    this.getTitle();
    this.getTitle()
  },
  watch: {
    menuList(n,o){
      this.cont =  this.menuList[0].name;
      this.getnews(this.menuList[0]); //改变对象,菜单栏的东西要写到监听属性里边
      this.cont = this.menuList[0].name
      this.getnews(this.menuList[0]) //改变对象,菜单栏的东西要写到监听属性里边
    }
  },
  methods: {
    //获取小标题的id
    getTitle(){
      const data = Number(this.$route.query.id);
      getMinTitle(data).then(res => {
      const data = Number(this.$route.query.id)
      getMinTitle(data)
        .then(res => {
        // console.log(res);
        if(res.code == 200){
          this.menuList = res.data
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    //小标题菜单的球切换
    changeMenu(val) {
      this.cont = val.name;
      this.cont = val.name
      this.getnews(val)
    },
    //获取到了新闻列表,里边只有一个对象
@@ -73,28 +74,32 @@
        current:1,
        newsCategoryId:item.id,
        size:5
      };
      getNewsList(data).then(res => {
      }
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if(res.code == 200){
          this.newsList = res.data.records
          this.getalone(this.newsList[0].id)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    //获取新闻内容,得到一个新闻对象
    getalone(id){
      const data = id;
      getnew(data).then(res => {
      const data = id
      getnew(data)
        .then(res => {
        // console.log(res);
        if(res.code == 200){
          this.new = res.data;
          console.log(this.new.content);
            this.new = res.data
            console.log(this.new.content)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    }
  }
src/components/page/kePuFengCai.vue
@@ -15,7 +15,7 @@
       <!-- æ–°é—»å†…容 -->
      <el-card class="box-card">
        <p class="name">{{this.cont}}</p>
        <hr class="namehr">
        <hr class="namehr" />
        <el-col :span="24">
          <div>
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
@@ -28,14 +28,7 @@
          </div>
          <!-- åˆ†é¡µ -->
          <div class="fenye">
            <el-pagination
              background
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="total">
            </el-pagination>
            <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next,total" :total="total"> </el-pagination>
          </div>
        </el-col>
      </el-card>
@@ -57,57 +50,60 @@
      pageSize:6,
      currentPage:1,
      total:0,
      item:{},
      item: {}
    }
  },
  created() {
  },
  created() {},
  mounted() {
    this.getTitle();
    this.getTitle()
  },
  watch: {
    menuList(n,o){
      this.cont =  this.menuList[0].name
      this.item = this.menuList[0];
      this.getnews(this.menuList[0]);
      this.item = this.menuList[0]
      this.getnews(this.menuList[0])
    }
  },
  methods: {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.getnews(this.item);
      console.log(`当前页: ${val}`)
      this.getnews(this.item)
    },
    getTitle(){
      const data = Number(this.$route.query.id);
      getMinTitle(data).then(res => {
        console.log(res);
      const data = Number(this.$route.query.id)
      getMinTitle(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.menuList = res.data
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    changeMenu(val) {
      this.cont = val.name
      this.item = val
      this.currentPage = 1
      this.getnews(val);
      this.getnews(val)
    },
    getnews(item){
      const data = {
        current:this.currentPage,
        newsCategoryId:item.id,
        size:this.pageSize
      };
      getNewsList(data).then(res => {
        console.log(res);
      }
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.newsList = res.data.records
          this.total =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    show(item){
src/components/page/keXieXiangMu.vue
@@ -7,20 +7,13 @@
        <el-table :data="tableData" border style="width: 100%" :header-cell-style="{textAlign: 'center'}" :cell-style="{ textAlign: 'center' }">
          <!-- :header-cell-style="{textAlign: 'center'}"设置头部居中: -->
          <!-- :cell-style="{ textAlign: 'center' }"设置整个表格内容水平居中: -->
          <el-table-column prop="id" label="序号" width="" >
          </el-table-column>
          <el-table-column prop="bianhao" label="立项编号" width="">
          </el-table-column>
          <el-table-column prop="name" label="项目名称">
          </el-table-column>
          <el-table-column prop="xingshi" label="项目形式">
          </el-table-column>
          <el-table-column prop="fuzeren" label="项目负责人">
          </el-table-column>
          <el-table-column prop="time" label="结项时间">
          </el-table-column>
          <el-table-column prop="beizhu" label="备注">
          </el-table-column>
          <el-table-column prop="id" label="序号" width=""> </el-table-column>
          <el-table-column prop="bianhao" label="立项编号" width=""> </el-table-column>
          <el-table-column prop="name" label="项目名称"> </el-table-column>
          <el-table-column prop="xingshi" label="项目形式"> </el-table-column>
          <el-table-column prop="fuzeren" label="项目负责人"> </el-table-column>
          <el-table-column prop="time" label="结项时间"> </el-table-column>
          <el-table-column prop="beizhu" label="备注"> </el-table-column>
        </el-table>
      </el-card>
    </div>
@@ -34,7 +27,7 @@
  name: 'keXieXiangMu',
  data() {
    return {
      tableData:[{id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
      tableData: [
        {id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
        {id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
        {id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
@@ -47,14 +40,12 @@
        {id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
        {id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
        {id:1,bianhao:'001',name:'苹果',xingshi:'线上操作',fuzeren:'老杨',time:'2022-1-8',beizhu:'无'},
        { id: 1, bianhao: '001', name: '苹果', xingshi: '线上操作', fuzeren: '老杨', time: '2022-1-8', beizhu: '无' }
      ]
    }
  },
  created() {
  },
  methods: {
  }
  created() {},
  methods: {}
}
</script>
src/components/page/telephone.vue
@@ -6,27 +6,22 @@
        <div class="left">
          <el-card style="" class="img">
            <p>微信公众号</p>
            <img src="../../assets/gongZhongHao.jpg" alt="">
            <img src="../../assets/gongZhongHao.jpg" alt="" />
          </el-card>
          <el-card style="" class="img">
            <p>新浪微博</p>
            <img src="../../assets/weiBo.jpg" alt="">
            <img src="../../assets/weiBo.jpg" alt="" />
          </el-card>
        </div>
        <div class="right">
          <el-table :data="tableData" border  :header-cell-style="{textAlign: 'center'}" :cell-style="{ textAlign: 'center' }">
            <!-- :header-cell-style="{textAlign: 'center'}"设置头部居中: -->
            <!-- :cell-style="{ textAlign: 'center' }"设置整个表格内容水平居中: -->
            <el-table-column prop="id" label="序号" width="60" >
            </el-table-column>
            <el-table-column prop="zhize" label="职责" width="">
            </el-table-column>
            <el-table-column prop="name" label="姓名">
            </el-table-column>
            <el-table-column prop="tel" label="联系电话">
            </el-table-column>
            <el-table-column prop="mail" label="邮箱" width="200">
            </el-table-column>
            <el-table-column prop="id" label="序号" width="60"> </el-table-column>
            <el-table-column prop="zhize" label="职责" width=""> </el-table-column>
            <el-table-column prop="name" label="姓名"> </el-table-column>
            <el-table-column prop="tel" label="联系电话"> </el-table-column>
            <el-table-column prop="mail" label="邮箱" width="200"> </el-table-column>
          </el-table>  
        </div>
      </div>
@@ -41,12 +36,13 @@
  name: 'telephone',
  data() {
    return {
      tableData:[{id:1,zhize:'校长',name:'杨鸣',tel:'12345678910',mail:'12312312@qq.com'},
      tableData: [
        {id:1,zhize:'校长',name:'杨鸣',tel:'12345678910',mail:'12312312@qq.com'},
        {id:1,zhize:'校长',name:'杨鸣',tel:'12345678910',mail:'12312312@qq.com'},
        {id:1,zhize:'校长',name:'杨鸣',tel:'12345678910',mail:'12312312@qq.com'},
        {id:1,zhize:'校长',name:'杨鸣',tel:'12345678910',mail:'12312312@qq.com'},
        {id:1,zhize:'校长',name:'杨鸣',tel:'12345678910',mail:'12312312@qq.com'},
        { id: 1, zhize: '校长', name: '杨鸣', tel: '12345678910', mail: '12312312@qq.com' }
      ]
    }
  }
src/components/page/xueShuJiaoLiu.vue
@@ -15,7 +15,7 @@
       <!-- æ–°é—»å†…容 -->
      <el-card class="box-card">
        <p class="name">{{this.cont}}</p>
        <hr class="namehr">
        <hr class="namehr" />
        <el-col :span="24">
          <div>
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
@@ -28,14 +28,7 @@
          </div>
          <!-- åˆ†é¡µ -->
          <div class="fenye">
            <el-pagination
              background
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="total">
            </el-pagination>
            <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next,total" :total="total"> </el-pagination>
          </div>
        </el-col>
      </el-card>
@@ -57,57 +50,60 @@
      pageSize:6,
      currentPage:1,
      total:0,
      item:{},
      item: {}
    }
  },
  created() {
  },
  created() {},
  mounted() {
    this.getTitle();
    this.getTitle()
  },
  watch: {
    menuList(n,o){
      this.cont =  this.menuList[0].name
      this.item = this.menuList[0];
      this.getnews(this.menuList[0]);
      this.item = this.menuList[0]
      this.getnews(this.menuList[0])
    }
  },
  methods: {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      this.getnews(this.item);
      console.log(`当前页: ${val}`)
      this.getnews(this.item)
    },
    getTitle(){
      const data = Number(this.$route.query.id);
      getMinTitle(data).then(res => {
        console.log(res);
      const data = Number(this.$route.query.id)
      getMinTitle(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.menuList = res.data
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    changeMenu(val) {
      this.cont = val.name
      this.item = val
      this.currentPage = 1
      this.getnews(val);
      this.getnews(val)
    },
    getnews(item){
      const data = {
        current:this.currentPage,
        newsCategoryId:item.id,
        size:this.pageSize
      };
      getNewsList(data).then(res => {
        console.log(res);
      }
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.newsList = res.data.records
          this.total =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    // è·³è½¬åˆ°æ–°é—»å±•示页面
src/components/page/xueXiaoShouYe.vue
@@ -12,6 +12,4 @@
}
</script>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>
src/components/page/zhengce.vue
@@ -14,7 +14,7 @@
      </el-col>
      <el-card class="box-card">
        <p class="name">{{this.cont}}</p>
        <hr class="namehr">
        <hr class="namehr" />
        <el-col :span="24">
          <div>
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
@@ -27,14 +27,7 @@
          </div>
          <!-- åˆ†é¡µ -->
          <div class="fenye">
            <el-pagination
              background
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="total">
            </el-pagination>
            <el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" :page-size="pageSize" layout="prev, pager, next,total" :total="total"> </el-pagination>
          </div>
        </el-col>
      </el-card>
@@ -58,65 +51,68 @@
      pageSize:6,
      currentPage:1,
      total:0,
      item:{},
      item: {}
    }
  },
  created() {
  },
  created() {},
  mounted() {
    this.getTitle();
    this.getTitle()
  },
  watch: {
    menuList(n,o){
      this.cont =  this.menuList[0].name;
      this.item = this.menuList[0];
      this.getnews(this.menuList[0]);
      this.cont = this.menuList[0].name
      this.item = this.menuList[0]
      this.getnews(this.menuList[0])
    }
  },
  methods: {
    getTitle(){
      const data = Number(this.$route.query.id);
      getMinTitle(data).then(res => {
        console.log(res);
      const data = Number(this.$route.query.id)
      getMinTitle(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.menuList = res.data
        }
      }).catch(err => {
        console.log(err);
        })
        .catch(err => {
          console.log(err)
      })
    },
    changeMenu(val) {
      this.cont = val.name
      this.item = val
      this.currentPage = 1
      this.getnews(val);
      this.getnews(val)
    },
    getnews(item){
      const data = {
        current:this.currentPage,
        newsCategoryId:item.id,
        size:this.pageSize
      };
      getNewsList(data).then(res => {
        console.log(res);
      }
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.newsList = res.data.records
          this.total =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
      console.log(`当前页: ${val}`)
      // this.currentPage = val
      this.getnews(this.item);
      this.getnews(this.item)
    },
    // è·³è½¬åˆ°æ–°é—»å±•示页面
    show(item){
      // console.log(item.id);
      this.$router.push({path:'/home/news',query:{id:item.id}})
    },
    }
  }
}
</script>
src/main.js
@@ -8,13 +8,12 @@
import './assets/css/global.css'
import './assets/css/my_style.css'
import axios from 'axios'
// é…ç½®è¯·æ±‚的跟路径
// axios.defaults.baseURL = 'http://8.140.68.52:8181'
// axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1'
axios.defaults.baseURL = 'http://localhost:7070/'
axios.defaults.withCredentials = true;
axios.defaults.withCredentials = true
axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
src/router.js
@@ -22,22 +22,24 @@
import AdMain from './components/Administrator/AdMain.vue'
import AdEdit from './components/Administrator/AdEdit.vue'
Vue.use(Router)
const router = new Router({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/login', component: Login },
    { path:'/administrator',
    {
      path: '/administrator',
      component: Administrator,
      children: [{ path:'welcome',component:Welcome },
      children: [
        { path: 'welcome', component: Welcome },
                { path:'main',component:Main },
                { path:'edit',component:Edit },
                { path:'news',component:News },
                { path:'editlunbo',component:EditLunBo },
                { path:'admain',component:AdMain },
                { path:'adedit',component:AdEdit }]
        { path: 'adedit', component: AdEdit }
      ]
    },
    { 
      path: '/home', 
@@ -100,12 +102,13 @@
          path:'news',
          name:'News',
          component:News
        },
        }
      ]
    },
    { path:'*',component:NotFound }
  ],
  scrollBehavior(to, from, savedPosition) { //页面跳转后自动回到顶部
  scrollBehavior(to, from, savedPosition) {
    //页面跳转后自动回到顶部
    if (savedPosition) {
        return savedPosition
    }
src/utils/request.js
@@ -1,5 +1,6 @@
//对axios的封装
import axios from 'axios'
// eslint-disable-next-line camelcase
let is_baseURL = 'http://localhost:7070/'//测试环境
//创建axios实例
const request = axios.create({
src/views/homePage/moreMessage.vue
@@ -18,13 +18,7 @@
          </ul>
          <!-- åˆ†é¡µ -->
          <div>
            <el-pagination
              background
              @current-change="handleCurrentChange1"
              :current-page="currentPagenotice"
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="totalnotice">
            <el-pagination background @current-change="handleCurrentChange1" :current-page="currentPagenotice" :page-size="pageSize" layout="prev, pager, next,total" :total="totalnotice">
            </el-pagination>
          </div>
        </el-card>
@@ -44,13 +38,7 @@
            </ul>
            <!-- åˆ†é¡µ -->
            <div>
              <el-pagination
                background
                @current-change="handleCurrentChange2"
                :current-page.sync="currentPageschool"
                :page-size="pageSize"
                layout="prev, pager, next,total"
                :total="totalschool">
              <el-pagination background @current-change="handleCurrentChange2" :current-page.sync="currentPageschool" :page-size="pageSize" layout="prev, pager, next,total" :total="totalschool">
              </el-pagination>
            </div>
        </el-card>
@@ -71,13 +59,7 @@
            </ul>
            <!-- åˆ†é¡µ -->
            <div>
              <el-pagination
                background
                @current-change="handleCurrentChange3"
                :current-page.sync="currentPagework"
                :page-size="pageSize"
                layout="prev, pager, next,total"
                :total="totalwork">
              <el-pagination background @current-change="handleCurrentChange3" :current-page.sync="currentPagework" :page-size="pageSize" layout="prev, pager, next,total" :total="totalwork">
              </el-pagination>
            </div>
           </el-card>
@@ -101,32 +83,32 @@
      pageSize:10,
      totalnotice:0,  //通知公告新闻的总条数
      totalschool:0,  //学院动态新闻的总条数
      totalwork:0,  //工作动态新闻的总条数
      totalwork: 0 //工作动态新闻的总条数
    }
  },
  mounted(){
    this.getnotice();
    this.getwork();
    this.getschool();
    this.getnotice()
    this.getwork()
    this.getschool()
  },
  methods: {
    //通知公告的分页切换
    handleCurrentChange1(val){
      // console.log(`当前页: ${val}`);
      this.currentPagenotice = val;
      this.getnotice();
      this.currentPagenotice = val
      this.getnotice()
    },
    //学院动态的分页切换
    handleCurrentChange2(val){
      // console.log(`当前页: ${val}`);
      this.currentPageschool = val;
      this.getschool();
      this.currentPageschool = val
      this.getschool()
    },
    //工作动态的分页切换
    handleCurrentChange3(val){
      // console.log(`当前页: ${val}`);
      this.currentPagework = val;
      this.getwork();
      this.currentPagework = val
      this.getwork()
    },
    //获取新闻列表
    getnotice(){
@@ -135,14 +117,16 @@
        newsCategoryId:42,
        size:this.pageSize
      }
      getNewsList(data).then(res => {
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if(res.code == 200){
          this.noticeList = res.data.records
          this.totalnotice =  res.data.total
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    getwork(){
@@ -151,14 +135,16 @@
        newsCategoryId:43,
        size:this.pageSize
      }
      getNewsList(data).then(res => {
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if(res.code == 200){
          this.workList = res.data.records
          this.totalwork =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    getschool(){
@@ -167,21 +153,23 @@
        newsCategoryId:44,
        size:this.pageSize
      }
      getNewsList(data).then(res => {
      getNewsList(data)
        .then(res => {
        // console.log(res);
        if(res.code == 200){
          this.schoolList = res.data.records
          this.totalschool =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    toNoticeMsg(id) {
      this.$router.push({
        path: '/home/news',
        query: {
          id: id,
          id: id
        }
      })
      window.location.reload()
@@ -190,7 +178,7 @@
      this.$router.push({
        path: '/home/news',
        query: {
          id: id,
          id: id
        }
      })
      window.location.reload()
@@ -199,7 +187,7 @@
      this.$router.push({
        path: '/home/news',
        query: {
          id: id,
          id: id
        }
      })
      window.location.reload()
src/views/notice.vue
@@ -3,9 +3,7 @@
    <!-- é€šçŸ¥å…¬å‘Šå¯¼èˆªæ¡ -->
    <el-row type="flex" class="row-bg underline marb10" justify="space-between">
      <span class="color"><b>通知公告</b></span>
      <span @click="goMore('通知公告')" class="liPointer">
        æ›´å¤š<i class="el-icon-d-arrow-right"></i>
      </span>
      <span @click="goMore('通知公告')" class="liPointer"> æ›´å¤š<i class="el-icon-d-arrow-right"></i> </span>
    </el-row>
    <!-- é€šçŸ¥å…¬å‘Šæ–°é—»åˆ—表 -->
    <div style="max-height:382px;overflow:hidden;">
@@ -29,11 +27,10 @@
  name: 'notice',
  data() {
    return {
     noticeList: [],
      noticeList: []
    }
  },
  created() {
  },
  created() {},
  mounted(){
    //获取小标题
    // axios.get('http://localhost:8080/news_category/list/1').then(res => {
@@ -54,13 +51,15 @@
        newsCategoryId:42,
        size:6
      }
      getNewsList(data).then(res => {
        console.log(res);
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.noticeList = res.data.records
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    // åŽ»åˆ°æ–°é—»å±•ç¤ºé¡µ
@@ -68,7 +67,7 @@
      this.$router.push({
        path: '/home/news',
        query: {
          id:id,
          id: id
        }
      })
    },
src/views/other.vue
@@ -74,7 +74,8 @@
.bg2 {
  background: url('../assets/wbbg.png') no-repeat 20px 50px;
}
.bg,.bg2 {
.bg,
.bg2 {
  position: relative;
  height: 120px;
}
src/views/school.vue
@@ -2,9 +2,7 @@
  <div>
    <el-row type="flex" justify="space-between" class="underline">
      <span class="color"><b>学院动态</b></span>
      <span @click="goMore('学院动态')" class="liPointer"
        >更多<i class="el-icon-d-arrow-right"></i>
      </span>
      <span @click="goMore('学院动态')" class="liPointer">更多<i class="el-icon-d-arrow-right"></i> </span>
    </el-row>
    <div style="max-height:420px;overflow:hidden;">
      <ul>
@@ -23,7 +21,7 @@
  name: 'school',
  data() {
    return {
      schoolList: [],
      schoolList: []
    }
  },
  created() {
@@ -36,13 +34,15 @@
        newsCategoryId:44,
        size:6
      }
      getNewsList(data).then(res => {
        console.log(res);
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.schoolList = res.data.records
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    //前往更多信息页面
@@ -50,7 +50,7 @@
      this.$router.push({
        path:'moreMessage',
        query:{
          type:val,
          type: val
        }
      })
    },
src/views/work.vue
@@ -2,9 +2,7 @@
  <div>
    <el-row type="flex" justify="space-between" class="underline row-bg">
      <span class="color"><b>工作动态</b></span>
      <span @click="goMore('工作状态')" class="liPointer"
        >更多<i class="el-icon-d-arrow-right"></i>
      </span>
      <span @click="goMore('工作状态')" class="liPointer">更多<i class="el-icon-d-arrow-right"></i> </span>
    </el-row>
    <div style="max-height:420px;overflow:hidden;">
      <ul>
@@ -23,7 +21,7 @@
  name:'work',
  data(){
    return{
      workList: [],
      workList: []
    }
  },
  created() {
@@ -37,20 +35,22 @@
        newsCategoryId:43,
        size:6
      }
      getNewsList(data).then(res => {
        console.log(res);
      getNewsList(data)
        .then(res => {
          console.log(res)
        if(res.code == 200){
          this.workList = res.data.records
        }
      }).catch(error => {
        console.log(error);
        })
        .catch(error => {
          console.log(error)
      })
    },
    toWorkMsg(id) {
      this.$router.push({
        path:'/home/news',
        query: {
          id:id,
          id: id
        }
      })
    },
@@ -58,7 +58,7 @@
      this.$router.push({
        path:'moreMessage',
        query:{
          type:val,
          type: val
        }
      })
    }
ºó¶ËAPI½Ó¿Ú·þÎñ/static/images/036dc279-73bb-4f9c-9a8c-80c3d7b32408.png
ºó¶ËAPI½Ó¿Ú·þÎñ/static/images/1273facb-e9c9-415e-949a-4c71853c8785.png
ºó¶ËAPI½Ó¿Ú·þÎñ/static/images/349d3ef1-f9d7-46c0-8e17-37daf863c87f.png
ºó¶ËAPI½Ó¿Ú·þÎñ/static/images/4913f227-7009-4bf1-8c07-eb69156f09ce.png
ºó¶ËAPI½Ó¿Ú·þÎñ/static/images/62cefc6b-54a8-4e8c-a250-0e0cd4ba4e20.png