明梦爽
2022-01-19 b80d0c5dd5ca242427a07f4891e8a0dc354889b3
后台查看功能完成
21个文件已修改
8个文件已添加
3个文件已删除
2102 ■■■■■ 已修改文件
package-lock.json 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/404.gif 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/my_style.css 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/head.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/AdminHome.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Edit.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Main.vue 247 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Administrator/Welcome.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Home.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Login.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/NotFound.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/News.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/introduce.vue 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/kePuFengCai.vue 137 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/keXieXiangMu.vue 201 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/telephone.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/xueShuJiaoLiu.vue 131 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/zhengce.vue 128 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router.js 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage/moreMessage.vue 212 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage/noticeMessage.vue 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage/schoolMessage.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage/workMessage.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/notice.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/school.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/work.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
@@ -1,16 +1,21 @@
{
  "name": "vue_shop",
  "name": "xin_chuan",
  "version": "0.1.0",
  "lockfileVersion": 2,
  "requires": true,
  "packages": {
    "": {
      "name": "xin_chuan",
      "version": "0.1.0",
      "dependencies": {
        "@tinymce/tinymce-vue": "^3.0.1",
        "axios": "^0.18.0",
        "element-ui": "^2.4.5",
        "D": "^1.0.0",
        "element-ui": "^2.15.6",
        "node_module": "^0.0.0",
        "tinymce": "^5.0.16",
        "vue": "^2.5.22",
        "vue-quill-editor": "^3.0.6",
        "vue-router": "^3.0.1"
      },
      "devDependencies": {
@@ -952,6 +957,14 @@
      "dev": true,
      "engines": {
        "node": ">=0.8.0"
      }
    },
    "node_modules/@tinymce/tinymce-vue": {
      "version": "3.0.1",
      "resolved": "https://registry.npmmirror.com/@tinymce/tinymce-vue/download/@tinymce/tinymce-vue-3.0.1.tgz",
      "integrity": "sha1-xga11rBwSn/B79+W72CAzcI8iPM=",
      "peerDependencies": {
        "vue": "^2.4.3"
      }
    },
    "node_modules/@types/q": {
@@ -3944,6 +3957,12 @@
      "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
      "dev": true
    },
    "node_modules/D": {
      "version": "1.0.0",
      "resolved": "https://registry.npmmirror.com/D/download/D-1.0.0.tgz",
      "integrity": "sha1-w0ik4DT3KEe+USBvxTD8CJ6cwqk=",
      "deprecated": "Package no longer supported. Contact support@npmjs.com for more info."
    },
    "node_modules/dashdash": {
      "version": "1.14.1",
      "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz",
@@ -3998,8 +4017,7 @@
    "node_modules/deep-equal": {
      "version": "1.0.1",
      "resolved": "http://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz",
      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
      "dev": true
      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
    },
    "node_modules/deep-is": {
      "version": "0.1.3",
@@ -4409,9 +4427,9 @@
      "dev": true
    },
    "node_modules/element-ui": {
      "version": "2.5.4",
      "resolved": "http://registry.npm.taobao.org/element-ui/download/element-ui-2.5.4.tgz",
      "integrity": "sha1-HgUQMgJqFEvBj3kg8L6SeXdUHLg=",
      "version": "2.15.6",
      "resolved": "https://registry.npmmirror.com/element-ui/download/element-ui-2.15.6.tgz",
      "integrity": "sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==",
      "dependencies": {
        "async-validator": "~1.8.1",
        "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -4419,6 +4437,9 @@
        "normalize-wheel": "^1.0.1",
        "resize-observer-polyfill": "^1.5.0",
        "throttle-debounce": "^1.0.1"
      },
      "peerDependencies": {
        "vue": "^2.5.17"
      }
    },
    "node_modules/elliptic": {
@@ -5410,8 +5431,7 @@
    "node_modules/extend": {
      "version": "3.0.2",
      "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
      "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=",
      "dev": true
      "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
    },
    "node_modules/extend-shallow": {
      "version": "3.0.2",
@@ -5547,6 +5567,11 @@
      "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz",
      "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
      "dev": true
    },
    "node_modules/fast-diff": {
      "version": "1.1.2",
      "resolved": "https://registry.nlark.com/fast-diff/download/fast-diff-1.1.2.tgz",
      "integrity": "sha1-S2LEK44D3j+EhGC2OQeZIGldAVQ="
    },
    "node_modules/fast-glob": {
      "version": "2.2.6",
@@ -9090,7 +9115,6 @@
      "version": "4.1.1",
      "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz",
      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
      "dev": true,
      "engines": {
        "node": ">=0.10.0"
      }
@@ -9474,6 +9498,11 @@
      "dependencies": {
        "no-case": "^2.2.0"
      }
    },
    "node_modules/parchment": {
      "version": "1.1.4",
      "resolved": "https://registry.npmmirror.com/parchment/download/parchment-1.1.4.tgz",
      "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
    },
    "node_modules/parent-module": {
      "version": "1.0.0",
@@ -10579,6 +10608,45 @@
      "resolved": "http://registry.npm.taobao.org/querystringify/download/querystringify-2.1.0.tgz",
      "integrity": "sha1-fe2N+/eHncxg0KZErGdUsoOtF+8=",
      "dev": true
    },
    "node_modules/quill": {
      "version": "1.3.7",
      "resolved": "https://registry.npmmirror.com/quill/download/quill-1.3.7.tgz",
      "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
      "dependencies": {
        "clone": "^2.1.1",
        "deep-equal": "^1.0.1",
        "eventemitter3": "^2.0.3",
        "extend": "^3.0.2",
        "parchment": "^1.1.4",
        "quill-delta": "^3.6.2"
      }
    },
    "node_modules/quill-delta": {
      "version": "3.6.3",
      "resolved": "https://registry.nlark.com/quill-delta/download/quill-delta-3.6.3.tgz",
      "integrity": "sha1-sZ/SuJQSMBxg4f8hPY2GDqwPEDI=",
      "dependencies": {
        "deep-equal": "^1.0.1",
        "extend": "^3.0.2",
        "fast-diff": "1.1.2"
      },
      "engines": {
        "node": ">=0.10"
      }
    },
    "node_modules/quill/node_modules/clone": {
      "version": "2.1.2",
      "resolved": "https://registry.nlark.com/clone/download/clone-2.1.2.tgz",
      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
      "engines": {
        "node": ">=0.8"
      }
    },
    "node_modules/quill/node_modules/eventemitter3": {
      "version": "2.0.3",
      "resolved": "https://registry.npmmirror.com/eventemitter3/download/eventemitter3-2.0.3.tgz",
      "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
    },
    "node_modules/randombytes": {
      "version": "2.0.6",
@@ -12371,6 +12439,11 @@
      "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
      "dev": true
    },
    "node_modules/tinymce": {
      "version": "5.0.16",
      "resolved": "https://registry.npmmirror.com/tinymce/download/tinymce-5.0.16.tgz?cache=0&sync_timestamp=1637123728362&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftinymce%2Fdownload%2Ftinymce-5.0.16.tgz",
      "integrity": "sha1-fNNPEBbYb6KBZSugLKUCZiHddZA="
    },
    "node_modules/tmp": {
      "version": "0.0.33",
      "resolved": "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz",
@@ -13026,6 +13099,19 @@
        "loader-utils": "^1.1.0",
        "vue-hot-reload-api": "^2.3.0",
        "vue-style-loader": "^4.1.0"
      }
    },
    "node_modules/vue-quill-editor": {
      "version": "3.0.6",
      "resolved": "https://registry.npmmirror.com/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz",
      "integrity": "sha512-g20oSZNWg8Hbu41Kinjd55e235qVWPLfg4NvsLW6d+DhgBTFbEuMpcWlUdrD6qT3+Noim6DRu18VLM9lVShXOQ==",
      "dependencies": {
        "object-assign": "^4.1.1",
        "quill": "^1.3.4"
      },
      "engines": {
        "node": ">= 4.0.0",
        "npm": ">= 3.0.0"
      }
    },
    "node_modules/vue-router": {
@@ -14533,6 +14619,12 @@
          "dev": true
        }
      }
    },
    "@tinymce/tinymce-vue": {
      "version": "3.0.1",
      "resolved": "https://registry.npmmirror.com/@tinymce/tinymce-vue/download/@tinymce/tinymce-vue-3.0.1.tgz",
      "integrity": "sha1-xga11rBwSn/B79+W72CAzcI8iPM=",
      "requires": {}
    },
    "@types/q": {
      "version": "1.5.1",
@@ -17173,6 +17265,11 @@
      "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=",
      "dev": true
    },
    "D": {
      "version": "1.0.0",
      "resolved": "https://registry.npmmirror.com/D/download/D-1.0.0.tgz",
      "integrity": "sha1-w0ik4DT3KEe+USBvxTD8CJ6cwqk="
    },
    "dashdash": {
      "version": "1.14.1",
      "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz",
@@ -17218,8 +17315,7 @@
    "deep-equal": {
      "version": "1.0.1",
      "resolved": "http://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz",
      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
      "dev": true
      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
    },
    "deep-is": {
      "version": "0.1.3",
@@ -17569,9 +17665,9 @@
      "dev": true
    },
    "element-ui": {
      "version": "2.5.4",
      "resolved": "http://registry.npm.taobao.org/element-ui/download/element-ui-2.5.4.tgz",
      "integrity": "sha1-HgUQMgJqFEvBj3kg8L6SeXdUHLg=",
      "version": "2.15.6",
      "resolved": "https://registry.npmmirror.com/element-ui/download/element-ui-2.15.6.tgz",
      "integrity": "sha512-rcYXEKd/j2G0AgficAOk1Zd1AsnHRkhmrK4yLHmNOiimU2JfsywgfKUjMoFuT6pQx0luhovj8lFjpE4Fnt58Iw==",
      "requires": {
        "async-validator": "~1.8.1",
        "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -18405,8 +18501,7 @@
    "extend": {
      "version": "3.0.2",
      "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
      "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=",
      "dev": true
      "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
    },
    "extend-shallow": {
      "version": "3.0.2",
@@ -18516,6 +18611,11 @@
      "resolved": "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz",
      "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
      "dev": true
    },
    "fast-diff": {
      "version": "1.1.2",
      "resolved": "https://registry.nlark.com/fast-diff/download/fast-diff-1.1.2.tgz",
      "integrity": "sha1-S2LEK44D3j+EhGC2OQeZIGldAVQ="
    },
    "fast-glob": {
      "version": "2.2.6",
@@ -21370,8 +21470,7 @@
    "object-assign": {
      "version": "4.1.1",
      "resolved": "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz",
      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
      "dev": true
      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
    },
    "object-copy": {
      "version": "0.1.0",
@@ -21672,6 +21771,11 @@
      "requires": {
        "no-case": "^2.2.0"
      }
    },
    "parchment": {
      "version": "1.1.4",
      "resolved": "https://registry.npmmirror.com/parchment/download/parchment-1.1.4.tgz",
      "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
    },
    "parent-module": {
      "version": "1.0.0",
@@ -22581,6 +22685,41 @@
      "resolved": "http://registry.npm.taobao.org/querystringify/download/querystringify-2.1.0.tgz",
      "integrity": "sha1-fe2N+/eHncxg0KZErGdUsoOtF+8=",
      "dev": true
    },
    "quill": {
      "version": "1.3.7",
      "resolved": "https://registry.npmmirror.com/quill/download/quill-1.3.7.tgz",
      "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
      "requires": {
        "clone": "^2.1.1",
        "deep-equal": "^1.0.1",
        "eventemitter3": "^2.0.3",
        "extend": "^3.0.2",
        "parchment": "^1.1.4",
        "quill-delta": "^3.6.2"
      },
      "dependencies": {
        "clone": {
          "version": "2.1.2",
          "resolved": "https://registry.nlark.com/clone/download/clone-2.1.2.tgz",
          "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
        },
        "eventemitter3": {
          "version": "2.0.3",
          "resolved": "https://registry.npmmirror.com/eventemitter3/download/eventemitter3-2.0.3.tgz",
          "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
        }
      }
    },
    "quill-delta": {
      "version": "3.6.3",
      "resolved": "https://registry.nlark.com/quill-delta/download/quill-delta-3.6.3.tgz",
      "integrity": "sha1-sZ/SuJQSMBxg4f8hPY2GDqwPEDI=",
      "requires": {
        "deep-equal": "^1.0.1",
        "extend": "^3.0.2",
        "fast-diff": "1.1.2"
      }
    },
    "randombytes": {
      "version": "2.0.6",
@@ -24120,6 +24259,11 @@
      "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=",
      "dev": true
    },
    "tinymce": {
      "version": "5.0.16",
      "resolved": "https://registry.npmmirror.com/tinymce/download/tinymce-5.0.16.tgz?cache=0&sync_timestamp=1637123728362&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftinymce%2Fdownload%2Ftinymce-5.0.16.tgz",
      "integrity": "sha1-fNNPEBbYb6KBZSugLKUCZiHddZA="
    },
    "tmp": {
      "version": "0.0.33",
      "resolved": "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz",
@@ -24684,6 +24828,15 @@
        "vue-style-loader": "^4.1.0"
      }
    },
    "vue-quill-editor": {
      "version": "3.0.6",
      "resolved": "https://registry.npmmirror.com/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz",
      "integrity": "sha512-g20oSZNWg8Hbu41Kinjd55e235qVWPLfg4NvsLW6d+DhgBTFbEuMpcWlUdrD6qT3+Noim6DRu18VLM9lVShXOQ==",
      "requires": {
        "object-assign": "^4.1.1",
        "quill": "^1.3.4"
      }
    },
    "vue-router": {
      "version": "3.0.2",
      "resolved": "http://registry.npm.taobao.org/vue-router/download/vue-router-3.0.2.tgz",
package.json
@@ -8,10 +8,14 @@
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@tinymce/tinymce-vue": "^3.0.1",
    "axios": "^0.18.0",
    "element-ui": "^2.4.5",
    "D": "^1.0.0",
    "element-ui": "^2.15.6",
    "node_module": "^0.0.0",
    "tinymce": "^5.0.16",
    "vue": "^2.5.22",
    "vue-quill-editor": "^3.0.6",
    "vue-router": "^3.0.1"
  },
  "devDependencies": {
public/index.html
@@ -5,7 +5,7 @@
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>新网与传播学院网站</title>
    <title>新闻与传播学院网站</title>
  </head>
  <body>
    <noscript>
src/api/api.js
@@ -1,28 +1,33 @@
//用于写接口
//post请求参数放在data里面,get请求参数放在params里边
import request from "../utils/request";
// 导航栏列表
export const getNavList = data => {
  return request({
    method: 'GET',
    url: '/contype/findList',
    params:data,
  })
}
// // 导航栏列表
// export const getNavList = data => {
//   return request({
//     method: 'GET',
//     url: '/news_type/all',
//     params:data,
//   })
// }
//获取小标题
export const getMinTitle = data => {
  return request({
    method: 'POST',
    url: '/category/findCategoryIdByContypeId',
    data,
    method: 'GET',
    url: `/news_category/list/${data}`,
  })
}
//获取新闻列表
export const getNewsList = data => {
  return request({
    method: 'POST',
    url: '/newsTheme/findByTypeIdAndCategoryId',
    data,
    url:'/news/list',
    params:data,
  })
}
//获取只有一篇新闻
export const getnew = data => {
  return request({
    method: 'GET',
    url:`/news/main/${data}`
  })
}
src/assets/404.gif
src/assets/css/my_style.css
@@ -20,6 +20,9 @@
.marr10{
  margin-right: 10px !important;
}
.marb5{
  margin-bottom: 5px !important;
}
.marb10{
  margin-bottom: 10px !important;
}
@@ -58,4 +61,8 @@
/* 蓝色标题 */
.color {
  color: rgb(1, 72, 153);
}
/* 变小手 */
.cursor{
  cursor: pointer;
}
src/assets/head.png
src/components/Administrator/AdminHome.vue
New file
@@ -0,0 +1,65 @@
<template>
  <el-container class="home-container">
    <el-header>
      <div>
        <img src="../../assets/head.png" alt="" />
        <span>后台管理系统</span>
      </div>
      <el-button type="info" @click="logout">退出</el-button>
    </el-header>
    <el-container>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>
<script>
export default {
  data() {
    return {
    }
  },
  created() {
  },
  methods: {
    logout() {
      //清空token
      window.sessionStorage.clear()
      //跳转到登录页
      this.$router.push('/login')
    },
  }
}
</script>
<style lang="less" scoped>
.home-container {
  height: 100%;
}
.el-header {
  background-color: rgb(55, 61, 63);
  display: flex;
  justify-content: space-between;
  padding-left: 0;
  align-items: center;
  color: #fff;
  font-size: 20px;
  > div {
    display: flex;
    justify-content: center;
    align-items: center;
    span {
      margin-left: 15px;
    }
  }
}
.el-main {
  background-color: rgb(233, 237, 240);
}
.iconfont {
  margin-right: 10px;
}
</style>
src/components/Administrator/Edit.vue
New file
@@ -0,0 +1,33 @@
<template>
  <div>
    <quill-editor ref="text" v-model="content" class="myQuillEditor" :options="editorOption" />
    <el-button type="primary" @click="submit">提交</el-button>
  </div>
</template>
<script>
import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
export default {
  components:{ quillEditor },
  data () {
    return {
      content: '',
      editorOption: {} ,
    }
  },
  methods: {
    submit () {
      console.log(this.$refs.text.value)
    }
  }
}
</script>
<style lang="less" scoped>
// .myQuillEditor{
//   height: 400px;
// }
</style>
src/components/Administrator/Main.vue
New file
@@ -0,0 +1,247 @@
<template>
  <div>
     <div class="block">
      <el-cascader
        v-model="value"
        :options="options"
        clearable
        filterable
        @change="handleChange">
      </el-cascader>
    </div>
    <div>
      <el-card class="box-card">
        <el-button class="add" type="success" icon="el-icon-plus" @click="goEdit()">点击在该列表下添加一条新闻</el-button>
        <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' }"设置整个表格内容水平居中: -->
          <!-- 问题:怎么获取数组中每个对象的key值(每条新闻的id)?
               解决:通过作用域插槽 slot-scope 获取每个对象 -->
          <el-table-column type="index"></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 }} -->
              <div>
                <el-button type="success" @click="look(scope.row.id)">查看</el-button>
                <el-button type="warning" @click="amend(scope.row.id)">修改</el-button>&nbsp
                <el-popconfirm
                  confirm-button-text='是的'
                  cancel-button-text='取消'
                  icon="el-icon-info"
                  icon-color="red"
                  title="确定删除该条新闻?"
                >
                  <el-button slot="reference">删除</el-button>
                </el-popconfirm>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <!-- 分页 -->
          <div>
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[3,6,12, 18,]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total">
            </el-pagination>
          </div>
      </el-card>
    </div>
  </div>
</template>
<script>
import { getNewsList } from '../../api/api'
import axios from 'axios'
export default {
  data() {
    return {
      visible: false,
      newsCategoryId:1, //先存一个小标题id
      tableData:[],   //新闻列表对象
      pageSize:6,     //每页条数
      currentPage:1,  //当前页
      newsList:[],
      total:0,        //新闻总条数
      value: [],
      options: [{
        value: 1,
        label: '首页',
        children: [{
          value:42,
          label: '通知公告',
        },
        {
          value:43,
          label: '工作动态',
        },
        {
          value:44,
          label: '学院动态',
        }],
      },{
          value: 22,
          label: '科协概况',
          children: [{
            value:27,
            label: '简介',
          },
          {
            value:28,
            label: '章程',
          },
          {
            value:29,
            label: '组织结构',
          },
          {
            value:30,
            label: '工作职责',
          },
          {
            value:31,
            label: '专职人员',
          }],
        },
        {
          value: 23,
          label: '政策法规',
          children: [{
            value:35,
            label: '中国科协政策文件',
          },
          {
            value:36,
            label: '地方科协政策文件',
          },
          {
            value:37,
            label: '社团管理文件',
          }],
        },
        {
          value: 25,
          label: '学术交流',
          children: [{
            value:38,
            label: '学术信息',
          },
          {
            value:39,
            label: '科技竞赛',
          }],
        },
        {
          value: 27,
          label: '科普风采',
          children: [{
            value:40,
            label: '平顶山学院科普活动',
          },
          {
            value:41,
            label: '平顶山市政协科普活动',
          }],
      }]
    }
  },
  created(){
  },
  mounted(){
  },
  methods: {
    handleChange(value) {
      console.log(value);
      console.log(value[1]);
      this.newsCategoryId = value[1]; //将得到的小标题id存放起来
      this.query(this.newsCategoryId);
    },
    // query(value){
    //   const data = {
    //     current:this.currentPage,
    //     newsCategoryId:value[1],
    //     size:this.pageSize
    //   };
    //   getNewsList(data).then(res=>{
    //     console.log(res);
    //     this.tableData = res.data.records
    //     this.total = res.data.total
    //   }).catch(err => {
    //     console.log(err);
    //   })
    // },
    query(newsCategoryId){
      const data = {
        current:this.currentPage,
        newsCategoryId:newsCategoryId,
        size:this.pageSize
      };
      getNewsList(data).then(res=>{
        console.log(res);
        if (res.code !== 200) {
          return this.$message.error('获取新闻列表失败')
        }else{
          this.tableData = res.data.records
          this.total = res.data.total
        }
      }).catch(err => {
        console.log(err);
      })
    },
    //修改
    amend(id){
      alert('爱你呦');
      console.log('>>>'+id);
    },
    //查看
    look(id){
      this.$router.push({path:'news',query:{id:id}})
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.currentPage = val;
      this.query(this.newsCategoryId)
    },
    handleSizeChange(val) {
      // console.log(`每页 ${val} 条`);
      this.pageSize = val;
      this.query(this.newsCategoryId)
    },
    //去往添加编辑页面
    goEdit(){
      if (this.newsCategoryId==27||this.newsCategoryId==28||this.newsCategoryId==29||
      this.newsCategoryId==30||this.newsCategoryId==31) {
        this.$message.error('该新闻标题下不能添加新闻')
      }else if(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('/administrator/edit')
      }else{
        this.$message.error('请先选择新闻标题')
      }
    }
  },
}
</script>
<style lang="less">
.add{
  margin-bottom: 10px !important;
}
.el-pagination{
  margin-top: 10px;
}
</style>
src/components/Administrator/Welcome.vue
New file
@@ -0,0 +1,17 @@
<template>
  <div>
    <h2>欢迎进入后台管理系统</h2>
  </div>
</template>
<script>
export default {
}
</script>
<style lang="less" scoped>
</style>
src/components/Home.vue
@@ -13,7 +13,7 @@
    <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()">
          {{ item.contypeName }}
          {{ item.name }}
        </el-menu-item>
      </el-menu>
    </el-row>
@@ -29,20 +29,30 @@
<script>
import {getNavList} from '../api/api'
import axios from 'axios'
export default {
  name: '',
  data() {
    return {
      activeIndex: '1',
      menuList: [{contypeName: '首页',id: 1},{contypeName: '科协概况',id: 2},{contypeName: '政策法规',id: 3},{contypeName: '科协项目',id: 4},
      {contypeName: '学术交流',id: 5},{contypeName: '办事指南',id: 6},{contypeName: '科普风采',id: 7},{contypeName: '学校首页',id: 8},
      {contypeName: '联系我们',id: 9}],
      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:[]
    }
  },
  created() {
    // this.getNavArr();
  },
  mounted() {},
  mounted() {
    let api3 = 'http://localhost:8080/news_type/all'
    axios.get(api3).then((res)=>{
      // console.log(res);
      this.menuList2 = res.data.data
    }).catch((error)=>{
      console.log(error);
    })
  },
  watch: {},
  methods: {
    // //获取导航栏
@@ -51,37 +61,38 @@
    //   getNavList(data).then(res => {
    //     console.log('res', res)
    //     if(res.code == 200){
    //       this.menuList = res.data
    //       this.menuList2 = res.data.data
    //     }
    //     this.menuList2 = res.data.data
    //   }).catch(err => {
    //     console.log('err', err)
    //   })
    // },
    formatterTitle(t){
      switch(t){
        case '1':
          return 'index'
        case '2':
        case '22':
          return 'introduce'
        case '3':
        case '23':
          return 'zhengce'
        case '4':
        case '24':
          return 'keXieXiangMu'
        case '5':
        case '25':
          return 'xueShuJiaoLiu'
        case '6':
        case '26':
          return 'banShiZhiNan'
        case '7':
        case '27':
          return 'kePuFengCai'
        case '8':
        case '28':
          return 'xueXiaoShouYe'
        case '9':
        case '29':
          return 'telephone'
      }
    },
    handleSelect(key, keyPath) {
      if (key == '8') {
      if (key == '28') {
        window.open('https://www.pdsu.edu.cn/#')
      } else {
        this.$router.push({
src/components/Login.vue
@@ -6,27 +6,14 @@
        <img src="../assets/logo.png" alt="" />
      </div>
      <!-- 登录表单区域 -->
      <el-form
        ref="loginFormRef"
        :model="loginForm"
        :rules="loginFormRules"
        label-width="0px"
        class="login_form"
      >
      <el-form ref="loginFormRef" :model="loginForm" :rules="loginFormRules" label-width="0px" class="login_form">
        <!-- 用户名 -->
        <el-form-item prop="account">
          <el-input
            v-model="loginForm.account"
            prefix-icon="iconfont icon-user"
          ></el-input>
        <el-form-item prop="username">
          <el-input v-model="loginForm.username" prefix-icon="iconfont icon-user"></el-input>
        </el-form-item>
        <!-- 密码 -->
        <el-form-item prop="password">
          <el-input
            v-model="loginForm.password"
            prefix-icon="iconfont icon-3702mima"
            type="password"
          ></el-input>
          <el-input v-model="loginForm.password" prefix-icon="iconfont icon-3702mima" type="password"></el-input>
        </el-form-item>
        <!-- 按钮区域 -->
        <el-form-item class="btns">
@@ -44,30 +31,20 @@
    return {
      // 这是登录表单的数据绑定对象
      loginForm: {
        account: '181360226',
        password: 'pyb***20000112'
        username: 'admin',
        password: '123456'
      },
      // 这是表单的验证规则对象
      loginFormRules: {
        // 验证用户名是否合法
        account: [
        username: [
          { required: true, message: '请输入登录名称', trigger: 'blur' },
          {
            min: 3,
            max: 10,
            message: '长度在 3 到 10 个字符',
            trigger: 'blur'
          }
          { min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur'}
        ],
        // 验证密码是否合法
        password: [
          { required: true, message: '请输入登录密码', trigger: 'blur' },
          {
            min: 6,
            max: 15,
            message: '长度在 6 到 15 个字符',
            trigger: 'blur'
          }
          { min: 6, max: 15, message: '长度在 6 到 15 个字符', trigger: 'blur'}
        ]
      }
    }
@@ -80,9 +57,10 @@
    login() {
      this.$refs.loginFormRef.validate(async (valid) => {
        if (!valid) return
        const { data: res } = await this.$http.post('login', this.loginForm)
        const { data: res } = await this.$http.post('/login', this.loginForm)
        console.log('12312123123123123')
        console.log(res)
        if (res.code !== 200) return this.$message.error('登录失败!')
        if (res.meta.status !== 200) return this.$message.error('登录失败!')
        this.$message.success('登录成功')
        // console.log(res)
        // 1. 将登录成功之后的 token,保存到客户端的 sessionStorage 中
@@ -90,7 +68,7 @@
        //   1.2 token 只应在当前网站打开期间生效,所以将 token 保存在 sessionStorage 中
        window.sessionStorage.setItem('token', res.data.token)
        // 2. 通过编程式导航跳转到后台主页,路由地址是 /home
        this.$router.push('/home')
        this.$router.push('/administrator')
      })
    }
  }
src/components/NotFound.vue
New file
@@ -0,0 +1,22 @@
<template>
  <div class="center">
    <img src="../assets/404.gif" alt="">
  </div>
</template>
<script>
export default {
};
</script>
<style scoped>
.center{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
}
img{
  width: 300px;
}
</style>
src/components/page/News.vue
New file
@@ -0,0 +1,61 @@
<template>
  <div class="box">
    <!-- <p>{{ this.$route.query.id }}</p> -->
    <div class="header">
      <h2>{{ title }}</h2>
      <p>发布日期:{{ releaseTime }} 点击量:[ {{hits}} ]</p>
    </div>
    <hr>
    <div v-html="content"></div>
  </div>
</template>
<script>
import {getnew} from '../../api/api'
export default {
  name:'noticeMessage',
  data(){
    return {
      content:'',
      hits:'',
      releaseTime:'',
      title:''
    }
  },
  created(){
    console.log(">>>>>>>>",this.$route.query.id);
    this.getalone();
    // this.queryAll();
  },
  methods:{
    getalone(){
      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;
      })
    },
    // queryAll(){
    //   this.content = ``
    // }
  }
}
</script>
<style>
h2{
  color: rgb(3, 73, 144);
  text-align: center;
}
p{
  background-color: rgb(246, 246, 246);
  text-align: center;
  height: 35px;
  line-height: 35px;
}
.box {
  width: 1200px;
  margin: 0 auto;
}
</style>
src/components/page/index.vue
@@ -3,7 +3,7 @@
    <!-- 首页上半部分 -->
    <el-row type="flex" class="row-bg" justify="space-between">
        <div class="block marr10">
          <el-carousel height="460px"  arrow="always" :interval="2000">
          <el-carousel height="460px"  arrow="always" :interval="3000">
            <el-carousel-item v-for="(item,index) in imgList" :key="index">
              <div>
                <img :src="item.path"  alt="" style="width:105%;">
src/components/page/introduce.vue
@@ -7,41 +7,20 @@
      <!-- 小标题 -->
      <el-col :span="4" class="marr10">
        <ul>
          <li
            v-for="(item, index) in menuList"
            :key="index"
            class="liStylenone liPointer marb10"
            @click="changeMenu(item)"
          >
            <b :class="cont == item.categoryName ? 'ft-blue' : 'ft-black'">{{
              item.categoryName
            }}</b>
          <li v-for="(item, index) in menuList" :key="index" class="liStylenone liPointer marb10" @click="changeMenu(item)">
            <b :class="cont == item.name ? 'ft-blue' : 'ft-black'">{{item.name}}</b>
          </li>
        </ul>
      </el-col>
       <!-- 新闻内容 -->
      <el-card class="box-card">
        <el-col :span="18">
          <div>
            <el-row
              class="marb10"
              :key="index"
              v-for="(item, index) in newsList"
            >
          <!-- <div v-if="newsList.length > 0">
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
              {{ item.title }}
            </el-row>
          </div>
          <!-- 分页 -->
          <div>
            <el-pagination
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="20"
              layout="total, pager, next"
              :total="total"
            >
            </el-pagination>
          </div>
          </div> -->
          <div>{{ content }}</div>
        </el-col>
      </el-card>
    </el-row>
@@ -50,7 +29,7 @@
<script>
import globalTitle from '../globalTitle.vue'
import { getMinTitle, getNewsList } from '../../api/api'
import {getMinTitle,getNewsList,getnew} from '../../api/api'
export default {
  name: 'introduce',
  components: {
@@ -60,62 +39,66 @@
    return {
      cont: '',
      menuList: [],
      newsList: [],
      total: 0,
      currentPage: 1
      newsList:[],
      content:'',
    }
  },
  created() {
    this.getMinTitleList()
  },
  mounted() {},
  mounted() {
    this.getTitle();
  },
  watch: {
    menuList(newval, oldval) {
      this.getAllNewsList(this.menuList[0])
      this.cont = this.menuList[0].categoryName
    menuList(n,o){
      this.cont =  this.menuList[0].name;
      this.getnews(this.menuList[0]);
      this.getalone(this.newsList);
    }
  },
  methods: {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    getTitle(){
      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);
      })
    },
    changeMenu(val) {
      this.getAllNewsList(val)
      this.cont = val.categoryName
      this.cont = val.name;
      this.getnews(val)
    },
    getMinTitleList() {
    getnews(item){
      const data = {
        contypeId: this.$route.query.id,
        p: 1
      }
      getMinTitle(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.menuList = res.data.records
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
        current:1,
        newsCategoryId:item.id,
        size:5
      };
      getNewsList(data).then(res => {
        console.log(res);
        if(res.code == 200){
          // if(res.data.records.length == 1){
            this.newsList = [];
            this.getalone(res.data.records[0]);
          // }else{
          //   this.content = '';
          //   this.newsList = res.data.records
          // }
        }
      }).catch(error => {
        console.log(error);
      })
    },
    getAllNewsList(item) {
      const data = {
        categoryId: item.id,
        contypeId: item.contypeId,
        p: this.currentPage
      }
      getNewsList(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.newsList = res.data.records
            this.total = Number(res.data.total)
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
    getalone(item){
      const data = item.id;
      getnew(data).then(res => {
        console.log(">>>>",res);
        this.content = res.data.content;
        this.data = res.data;
      })
    }
  }
}
src/components/page/kePuFengCai.vue
@@ -7,15 +7,8 @@
      <!-- 小标题 -->
      <el-col :span="4" class="marr10">
        <ul>
          <li
            v-for="(item, index) in menuList"
            :key="index"
            class="liStylenone liPointer marb10"
            @click="changeMenu(item)"
          >
            <b :class="cont == item.categoryName ? 'ft-blue' : 'ft-black'">{{
              item.categoryName
            }}</b>
          <li v-for="(item, index) in menuList" :key="index" class="liStylenone liPointer marb10" @click="changeMenu(item)">
            <b :class="cont == item.name ? 'ft-blue' : 'ft-black'">{{item.name}}</b>
          </li>
        </ul>
      </el-col>
@@ -23,23 +16,22 @@
      <el-card class="box-card">
        <el-col :span="18">
          <div>
            <el-row
              class="marb10"
              :key="index"
              v-for="(item, index) in newsList"
            >
              {{ item.title }}
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
              <div class="flex-v flex-between marb5 cursor" @click="show(item)">
                <div>{{ item.title }}</div>
                <div>{{ item.releaseTime }}</div>
              </div>
            </el-row>
          </div>
          <!-- 分页 -->
          <div>
          <div class="fenye">
            <el-pagination
              background
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="20"
              layout="total, pager, next"
              :total="total"
            >
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="total">
            </el-pagination>
          </div>
        </el-col>
@@ -47,78 +39,81 @@
    </el-row>
  </div>
</template>
<script>
import globalTitle from '../globalTitle.vue'
import { getMinTitle, getNewsList } from '../../api/api'
export default {
  name: 'kePuFengCai',
  components: {
    globalTitle
  },
  components: { globalTitle },
  name: 'xueShuJiaoLiu',
  data() {
    return {
      cont: '',
      menuList: [],
      newsList: [],
      total: 0,
      currentPage: 1
      newsList:[],
      pageSize:2,
      currentPage:1,
      total:0,
      item:{},
    }
  },
  created() {
    this.getMinTitleList()
  },
  mounted() {},
  mounted() {
    this.getTitle();
  },
  watch: {
    menuList(newval, oldval) {
      this.getAllNewsList(this.menuList[0])
      this.cont = this.menuList[0].categoryName
    menuList(n,o){
      this.cont =  this.menuList[0].name
      this.getnews(this.menuList[0]);
    }
  },
  methods: {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      console.log(`当前页: ${val}`);
      this.getnews(this.item);
    },
    getTitle(){
      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);
      })
    },
    changeMenu(val) {
      this.getAllNewsList(val)
      this.cont = val.categoryName
      this.cont = val.name
      this.item = val
      this.currentPage = 1
      this.getnews(val);
    },
    getMinTitleList() {
    getnews(item){
      const data = {
        contypeId: this.$route.query.id,
        p: 1
      }
      getMinTitle(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.menuList = res.data.records
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
        current:this.currentPage,
        newsCategoryId:item.id,
        size:this.pageSize
      };
      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);
      })
    },
    getAllNewsList(item) {
      const data = {
        categoryId: item.id,
        contypeId: item.contypeId,
        p: this.currentPage
      }
      getNewsList(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.newsList = res.data.records
            this.total = Number(res.data.total)
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
    show(item){
      // console.log(item.id);
      this.$router.push({path:'/home/news',query:{id:item.id}})
    }
  }
}
</script>
<style lang="less" scoped>
ul {
  width: 200px;
@@ -135,4 +130,12 @@
.ft-black {
  color: #000;
}
</style>
.box-card{
  height: 600px;
  position: relative;
  .fenye{
    position: absolute;
    bottom: 2px;
  }
}
</style>
src/components/page/keXieXiangMu.vue
@@ -1,47 +1,28 @@
<template>
  <div>
    <globalTitle />
    <globalTitle/>
    <div>
      <!-- 项目展示区 -->
      <el-table :data="tableData" style="width: 100%" border stripe>
        <el-table-column
          type="index"
          label="序号"
          width="80px"
        ></el-table-column>
        <el-table-column
          prop="lixiangbianhao"
          label="立项编号"
        ></el-table-column>
        <el-table-column
          prop="xiangmumingcheng"
          label="项目名称"
        ></el-table-column>
        <el-table-column
          prop="xiangmuxingshi"
          label="项目形式"
        ></el-table-column>
        <el-table-column
          prop="xiangmufuzheren"
          label="项目负责人"
        ></el-table-column>
        <el-table-column
          prop="jiexiangshijian"
          label="结项时间"
        ></el-table-column>
        <el-table-column prop="beizhu" label="备注"></el-table-column>
      </el-table>
      <!-- 分页导航栏 -->
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="queryInfo.pagenum"
        :page-sizes="[1, 5, 8, 10]"
        :page-size="queryInfo.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
      <el-card class="mart10">
        <h4>平顶山学院2021年度河南省科协立项列表</h4>
        <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>
      </el-card>
    </div>
  </div>
</template>
@@ -53,130 +34,36 @@
  name: 'keXieXiangMu',
  data() {
    return {
      tableData: [
        {
          lixiangbianhao: '1',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '2',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '3',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '4',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '5',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '6',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '7',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '8',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '9',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        },
        {
          lixiangbianhao: '10',
          xiangmumingcheng: '平顶山学院科学技术协会官网搭建',
          xiangmuxingshi: '607实验室构建',
          xiangmufuzheren: '喻恒',
          jiexiangshijian: '2021-12-31',
          beizhu: '科技楼S607'
        }
      ],
      // 获取用户列表的参数对象
      queryInfo: {
        query: '',
        // 当前页数
        pagenum: 1,
        // 当前每页显示多少条数据
        pagesize: 2
      },
      userlist: [],
      total: 0
      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:'无'},
        {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:'无'},
        {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:'无'},
        {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() {
    this.getUserList()
  },
  methods: {
    async getUserList() {
      const { data: res } = await this.$http.get('users', {
        params: this.queryInfo
      })
      if (res.meta.status !== 200) {
        return this.$message.error('获取用户列表失败! ')
      }
      this.userlist = res.data.users
      this.total = res.data.total
      console.log(res)
    },
    // 监听pagesize改变的事件
    handleSizeChange(newSize) {
      // console.log(newSize)
      this.queryInfo.pagesize = newSize
      this.getUserList()
    },
    // // 监听 页码值 改变的事件
    handleCurrentChange(newPage) {
      // console.log(newPage)
      this.queryInfo.newpage = newPage
    }
  }
}
</script>
<style lang="less" scoped>
h4{
  text-align: center;
  margin-top: 0;
}
.mart10{
  margin-top: 10px;
}
</style>
src/components/page/telephone.vue
@@ -1,14 +1,36 @@
<template>
  <div>
    <globalTitle />
    <el-table :data="tableData" stripe style="width: 100%;">
      <el-table-column type="index" label="序号" width="80px"></el-table-column>
      <el-table-column prop="zhize" label="职责" width="180"> </el-table-column>
      <el-table-column prop="name" label="姓名" width="180"> </el-table-column>
      <el-table-column prop="tele" label="联系电话" width="180">
      </el-table-column>
      <el-table-column prop="e" label="邮箱"> </el-table-column>
    </el-table>
    <el-card class="card">
      <div class="max">
        <div class="left">
          <el-card style="" class="img">
            <p>微信公众号</p>
            <img src="../../assets/gongZhongHao.jpg" alt="">
          </el-card>
          <el-card style="" class="img">
            <p>新浪微博</p>
            <img src="../../assets/weiBo.jpg" alt="">
          </el-card>
        </div>
        <divc 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>
        </divc>
      </div>
    </el-card>
  </div>
</template>
@@ -19,47 +41,39 @@
  name: 'telephone',
  data() {
    return {
      tableData: [
        {
          zhize: '校科协主席',
          name: '王小虎',
          tele: '17630124661',
          e: '2345@qq.com'
        },
        {
          zhize: '校科协秘书长',
          name: '王小虎',
          tele: '17630124661',
          e: '2345@qq.com'
        },
        {
          zhize: '校科协联络员',
          name: '王小虎',
          tele: '17630124661',
          e: '2345@qq.com'
        },
        {
          zhize: '青年分会主席',
          name: '王小虎',
          tele: '17630124661',
          e: '2345@qq.com'
        },
        {
          zhize: '学生分会联络员',
          name: '王小虎',
          tele: '17630124661',
          e: '2345@qq.com'
        },
        {
          zhize: 'XXXXX',
          name: 'XXX',
          tele: '17630124661',
          e: '2345@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'},
      ]
    }
  }
}
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
.card{
  margin-top: 10px;
}
.max{
  display: flex;
  justify-content: space-between;
}
p{
  text-align: center;
}
.right{
  width: 800px;
}
.left{
  width: 200px;
}
.img{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
</style>
src/components/page/xueShuJiaoLiu.vue
@@ -7,15 +7,8 @@
      <!-- 小标题 -->
      <el-col :span="4" class="marr10">
        <ul>
          <li
            v-for="(item, index) in menuList"
            :key="index"
            class="liStylenone liPointer marb10"
            @click="changeMenu(item)"
          >
            <b :class="cont == item.categoryName ? 'ft-blue' : 'ft-black'">{{
              item.categoryName
            }}</b>
          <li v-for="(item, index) in menuList" :key="index" class="liStylenone liPointer marb10" @click="changeMenu(item)">
            <b :class="cont == item.name ? 'ft-blue' : 'ft-black'">{{item.name}}</b>
          </li>
        </ul>
      </el-col>
@@ -23,23 +16,22 @@
      <el-card class="box-card">
        <el-col :span="18">
          <div>
            <el-row
              class="marb10"
              :key="index"
              v-for="(item, index) in newsList"
            >
              {{ item.title }}
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
              <div class="flex-v flex-between marb5 cursor" @click="show(item)">
                <div>{{ item.title }}</div>
                <div>{{ item.releaseTime }}</div>
              </div>
            </el-row>
          </div>
          <!-- 分页 -->
          <div>
          <div class="fenye">
            <el-pagination
              background
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="20"
              layout="total, pager, next"
              :total="total"
            >
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="total">
            </el-pagination>
          </div>
        </el-col>
@@ -58,65 +50,66 @@
    return {
      cont: '',
      menuList: [],
      newsList: [],
      total: 0,
      currentPage: 1
      newsList:[],
      pageSize:2,
      currentPage:1,
      total:0,
      item:{},
    }
  },
  created() {
    this.getMinTitleList()
  },
  mounted() {},
  mounted() {
    this.getTitle();
  },
  watch: {
    menuList(newval, oldval) {
      this.getAllNewsList(this.menuList[0])
      this.cont = this.menuList[0].categoryName
    menuList(n,o){
      this.cont =  this.menuList[0].name
      this.getnews(this.menuList[0]);
    }
  },
  methods: {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      console.log(`当前页: ${val}`);
      this.getnews(this.item);
    },
    //改变 小标题获取不同的新闻内容
    getTitle(){
      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);
      })
    },
    changeMenu(val) {
      this.getAllNewsList(val)
      this.cont = val.categoryName
      this.cont = val.name
      this.item = val
      this.currentPage = 1
      this.getnews(val);
    },
    //获取小标题列表
    getMinTitleList() {
    getnews(item){
      const data = {
        contypeId: this.$route.query.id,
        p: 1
      }
      getMinTitle(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.menuList = res.data.records
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
        current:this.currentPage,
        newsCategoryId:item.id,
        size:this.pageSize
      };
      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);
      })
    },
    //获取新闻列表
    getAllNewsList(item) {
      const data = {
        categoryId: item.id,
        contypeId: item.contypeId,
        p: this.currentPage
      }
      getNewsList(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.newsList = res.data.records
            this.total = Number(res.data.total)
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
    // 跳转到新闻展示页面
    show(item){
      // console.log(item.id);
      this.$router.push({path:'/home/news',query:{id:item.id}})
    }
  }
}
@@ -138,4 +131,12 @@
.ft-black {
  color: #000;
}
.box-card{
  height: 600px;
  position: relative;
  .fenye{
    position: absolute;
    bottom: 2px;
  }
}
</style>
src/components/page/zhengce.vue
@@ -7,38 +7,30 @@
      <!-- 小标题 -->
      <el-col :span="4" class="marr10">
        <ul>
          <li
            v-for="(item, index) in menuList"
            :key="index"
            class="liStylenone liPointer marb10"
            @click="changeMenu(item)"
          >
            <b :class="cont == item.categoryName ? 'ft-blue' : 'ft-black'">{{
              item.categoryName
            }}</b>
          <li v-for="(item, index) in menuList" :key="index" class="liStylenone liPointer marb10" @click="changeMenu(item)">
            <b :class="cont == item.name ? 'ft-blue' : 'ft-black'">{{item.name}}</b>
          </li>
        </ul>
      </el-col>
      <el-card class="box-card">
        <el-col :span="18">
          <div>
            <el-row
              class="marb10"
              :key="index"
              v-for="(item, index) in newsList"
            >
              {{ item.title }}
            <el-row class="marb10" :key="index" v-for="(item, index) in newsList">
              <div class="flex-v flex-between marb5 cursor" @click="show(item)">
                <div>{{ item.title }}</div>
                <div>{{ item.releaseTime }}</div>
              </div>
            </el-row>
          </div>
          <!-- 分页 -->
          <div>
          <div class="fenye">
            <el-pagination
              background
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="20"
              layout="total, pager, next"
              :total="total"
            >
              :page-size="pageSize"
              layout="prev, pager, next,total"
              :total="total">
            </el-pagination>
          </div>
        </el-col>
@@ -59,62 +51,66 @@
    return {
      cont: '',
      menuList: [],
      newsList: [],
      total: 0,
      currentPage: 1
      newsList:[],
      pageSize:2,
      currentPage:1,
      total:0,
      item:{},
    }
  },
  created() {
    this.getMinTitleList()
  },
  mounted() {},
  mounted() {
    this.getTitle();
  },
  watch: {
    menuList(newval, oldval) {
      this.getAllNewsList(this.menuList[0])
      this.cont = this.menuList[0].categoryName
    menuList(n,o){
      this.cont =  this.menuList[0].name;
      this.getnews(this.menuList[0]);
    }
  },
  methods: {
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      console.log(`当前页: ${val}`);
      this.getnews(this.item);
    },
    getTitle(){
      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);
      })
    },
    changeMenu(val) {
      this.getAllNewsList(val)
      this.cont = val.categoryName
      this.cont = val.name
      this.item = val
      this.currentPage = 1
      this.getnews(val);
    },
    getMinTitleList() {
    getnews(item){
      const data = {
        contypeId: this.$route.query.id,
        p: 1
      }
      getMinTitle(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.menuList = res.data.records
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
        current:this.currentPage,
        newsCategoryId:item.id,
        size:this.pageSize
      };
      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);
      })
    },
    getAllNewsList(item) {
      const data = {
        categoryId: item.id,
        contypeId: item.contypeId,
        p: this.currentPage
      }
      getNewsList(data)
        .then((res) => {
          console.log('res', res)
          if (res.code == 200) {
            this.newsList = res.data.records
            this.total = Number(res.data.total)
          }
        })
        .catch((err) => {
          console.log('err', err)
        })
    // 跳转到新闻展示页面
    show(item){
      // console.log(item.id);
      this.$router.push({path:'/home/news',query:{id:item.id}})
    }
  }
}
@@ -136,4 +132,12 @@
.ft-black{
  color: #000;
}
.box-card{
  height: 600px;
  position: relative;
  .fenye{
    position: absolute;
    bottom: 2px;
  }
}
</style>
src/main.js
@@ -8,9 +8,13 @@
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://8.140.68.52:8181'
// axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1'
axios.defaults.baseURL = 'http://localhost:8080/'
axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
src/router.js
@@ -2,6 +2,7 @@
import Router from 'vue-router'
import Login from './components/Login.vue'
import Home from './components/Home.vue'
import NotFound from './components/NotFound.vue'
import index from './components/page/index.vue'
import introduce from './components/page/introduce.vue'
import zhengce from './components/page/zhengce.vue'
@@ -11,10 +12,12 @@
import kePuFengCai from './components/page/kePuFengCai.vue'
import xueXiaoShouYe from './components/page/xueXiaoShouYe.vue'
import telephone from './components/page/telephone.vue'
import schoolMessage from './views/homePage/schoolMessage'
import noticeMessage from './views/homePage/noticeMessage'
import News from './components/page/News.vue'
import moreMessage from './views/homePage/moreMessage'
import workMessage from './views/homePage/workMessage'
import Administrator from './components/Administrator/AdminHome.vue'
import Welcome from './components/Administrator/Welcome.vue'
import Main from './components/Administrator/Main.vue'
import Edit from './components/Administrator/Edit.vue'
Vue.use(Router)
@@ -23,6 +26,13 @@
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/login', component: Login },
    { path:'/administrator',
      component: Administrator,
      children: [{ path:'welcome',component:Welcome },
                { path:'main',component:Main },
                { path:'edit',component:Edit },
                { path:'news',component:News }]
    },
    { 
      path: '/home', 
      component: Home ,
@@ -76,27 +86,18 @@
          component:telephone
        },
        {
          path:'schoolMessage',
          name:'schoolMessage',
          component:schoolMessage
        },
        {
          path:'noticeMessage',
          name:'noticeMessage',
          component:noticeMessage
        },
        {
          path:'moreMessage',
          name:'moreMessage',
          component:moreMessage
        },
        {
          path:'workMessage',
          name:'workMessage',
          component:workMessage
          path:'news',
          name:'News',
          component:News
        },
      ]
    }
    },
    { path:'*',component:NotFound }
  ],
  scrollBehavior(to, from, savedPosition) { //页面跳转后自动回到顶部
    if (savedPosition) {
src/utils/request.js
@@ -1,6 +1,6 @@
//对axios的封装
import axios from 'axios'
let is_baseURL = 'http://8.140.68.52:8181/'//测试环境
let is_baseURL = 'http://localhost:8080/'//测试环境
//创建axios实例
const request = axios.create({
  baseURL: is_baseURL
src/views/homePage/moreMessage.vue
@@ -5,100 +5,185 @@
    </el-row>
    <div class="mart15">
      <div v-if="this.$route.query.type == '通知公告'">
        <ul>
          <li class="lieBiao flex-v flex-between" :key="index" v-for="(item, index) in noticeList">
            <div class="time">
              <span>{{ item.year }}</span>
              <span>{{ item.month }}</span>
            </div>
            <div class="title liPointer" @click="toNoticeMsg(item.id,item.count)">
              {{ item.news }}
            </div>
          </li>
        </ul>
        <el-card>
          <ul class="ul">
            <li class="lieBiao liPointer flex-v flex-between" :key="index" v-for="(item, index) in noticeList">
              <div class="time">
                {{ item.releaseTime }}
              </div>
              <div class="title" @click="toNoticeMsg(item.id)">
                {{ item.title }}
              </div>
            </li>
          </ul>
          <!-- 分页 -->
          <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>
          </div>
        </el-card>
      </div>
      <div v-if="this.$route.query.type == '学院动态'">
        <ul>
          <li class="lieBiao flex-v flex-between" :key="index" v-for="(item, index) in schoolList">
            <!-- <a href="item.path"> {{ item.title }} </a> -->
            <!-- <router-link :to="{name:'schoolMessage',params:{id:item.id}}" >{{ item.title }} </router-link> -->
            <div class="time">
              <span>{{ item.year }}</span>
              <span>{{ item.month }}</span>
          <el-card>
            <ul class="ul">
              <li class="lieBiao liPointer flex-v flex-between" :key="index" v-for="(item, index) in schoolList">
                <div class="time">
                  {{ item.releaseTime }}
                </div>
                <div class="title" @click="toSchoolMsg(item.id)">
                  {{ item.title }}
                </div>
              </li>
            </ul>
            <!-- 分页 -->
            <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>
            </div>
            <div  class="title liPointer" @click="toSchoolMsg(item.id,item.count)">
              {{ item.news }}
            </div>
          </li>
        </el-card>
        </ul>
      </div>
      <div v-if="this.$route.query.type == '工作状态'">
        <ul>
          <li class="lieBiao flex-v flex-between" :key="index" v-for="(item, index) in workList">
            <!-- <a href="item.path"> {{ item.title }} </a> -->
            <!-- <router-link :to="{name:'schoolMessage',params:{id:item.id}}" >{{ item.title }} </router-link> -->
            <div class="time">
              <span>{{ item.year }}</span>
              <span>{{ item.month }}</span>
         <ul>
           <el-card>
            <ul class="ul">
              <li class="lieBiao liPointer flex-v flex-between" :key="index" v-for="(item, index) in workList">
                <div class="time">
                  {{ item.releaseTime }}
                </div>
                <div class="title" @click="toWorkMsg(item.id)">
                  {{ item.title }}
                </div>
              </li>
            </ul>
            <!-- 分页 -->
            <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>
            </div>
            <div class="title liPointer" @click="toWorkMsg(item.id,item.count)">{{ item.news }}</div>
          </li>
           </el-card>
        </ul>
      </div>
    </div>
  </div>
</template>
<script>
import {getNewsList} from '../../api/api'
export default {
  name: 'moreMessage',
  data() {
    return {
      noticeList: [{id:1,year: 2022,month:'1-10',count:10, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:2,year: 2022,month:'1-10',count:11, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:3,year: 2022,month:'1-10',count:12, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:4,year: 2022,month:'1-10',count:13, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:5,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:15, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:17, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'}],
      schoolList: [{id:1,year: 2022,month:'1-10',count:10, news:'唐三藏参见女王陛下'},{id:2,year: 2022,month:'1-10',count:11, news:'唐三藏参见女王陛下'},
      {id:3,year: 2022,month:'1-10',count:12, news:'唐三藏参见女王陛下'},{id:4,year: 2022,month:'1-10',count:13, news:'唐三藏参见女王陛下'},
      {id:5,year: 2022,month:'1-10',count:14, news:'唐三藏参见女王陛下'},{id:6,year: 2022,month:'1-10',count:14, news:'唐三藏参见女王陛下'},
      {id:6,year: 2022,month:'1-10',count:15, news:'唐三藏参见女王陛下'},{id:6,year: 2022,month:'1-10',count:16, news:'唐三藏参见女王陛下'},
      {id:6,year: 2022,month:'1-10',count:16, news:'唐三藏参见女王陛下'},{id:6,year: 2022,month:'1-10',count:17, news:'唐三藏参见女王陛下'}],
      workList: [{id:1,year: 2022,month:'1-10',count:10, news:'黑人超白竹炭深洁牙膏'},{id:2,year: 2022,month:'1-10',count:11, news:'黑人超白竹炭深洁牙膏'},
      {id:3,year: 2022,month:'1-10',count:12, news:'黑人超白竹炭深洁牙膏'},{id:4,year: 2022,month:'1-10',count:13, news:'黑人超白竹炭深洁牙膏'},
      {id:5,year: 2022,month:'1-10',count:14, news:'黑人超白竹炭深洁牙膏'},{id:6,year: 2022,month:'1-10',count:14, news:'黑人超白竹炭深洁牙膏'},
      {id:6,year: 2022,month:'1-10',count:15, news:'黑人超白竹炭深洁牙膏'},{id:6,year: 2022,month:'1-10',count:16, news:'黑人超白竹炭深洁牙膏'},
      {id:6,year: 2022,month:'1-10',count:16, news:'黑人超白竹炭深洁牙膏'},{id:6,year: 2022,month:'1-10',count:17, news:'黑人超白竹炭深洁牙膏'}],
      noticeList: [],
      schoolList: [],
      workList: [],
      currentPage:1,
      pageSize:4,
      total:0,
    }
  },
  mounted(){
    this.getnotice();
    this.getwork();
    this.getschool();
  },
  methods: {
    toNoticeMsg(id,count) {
    handleCurrentChange(val){
      console.log(`当前页: ${val}`);
      this.getnotice();
      this.getwork();
      this.getschool();
    },
    //获取新闻列表
    getnotice(){
      const data = {
        current:this.currentPage,
        newsCategoryId:42,
        size:this.pageSize
      }
      getNewsList(data).then(res => {
        console.log(res);
        if(res.code == 200){
          this.noticeList = res.data.records
          this.total =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
      })
    },
    getwork(){
      const data = {
        current:this.currentPage,
        newsCategoryId:43,
        size:this.pageSize
      }
      getNewsList(data).then(res => {
        console.log(res);
        if(res.code == 200){
          this.workList = res.data.records
          this.total =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
      })
    },
    getschool(){
      const data = {
        current:this.currentPage,
        newsCategoryId:44,
        size:this.pageSize
      }
      getNewsList(data).then(res => {
        console.log(res);
        if(res.code == 200){
          this.schoolList = res.data.records
          this.total =  Number(res.data.total)
        }
      }).catch(error => {
        console.log(error);
      })
    },
    toNoticeMsg(id) {
      this.$router.push({
        path: '/home/noticeMessage',
        path: '/home/news',
        query: {
          id: id,
          count: count
        }
      })
      window.location.reload()
    },
    toSchoolMsg(id,count) {
    toSchoolMsg(id) {
      this.$router.push({
        path: '/home/schoolMessage',
        path: '/home/news',
        query: {
          id: id,
          count: count
        }
      })
      window.location.reload()
    },
    toWorkMsg(id,count) {
    toWorkMsg(id) {
      this.$router.push({
        path: '/home/workMessage',
        path: '/home/news',
        query: {
          id: id,
          count: count
        }
      })
      window.location.reload()
@@ -117,17 +202,24 @@
  margin-bottom: 10px;
}
.time {
  width: 80px;
  width: 100px;
  padding: 17px 0px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background-color: rgb(1, 72, 153);
  color: white;
  text-align: center;
}
.title {
  width: 1030px;
  height: 70px;
  width: 550px;
  height: 50px;
  overflow: hidden;
  line-height: 60px;
  /* // background-color: rgb(179, 19, 19); */
  padding: 0 0 0 10px;
}
.ul{
  width: 700px;
  margin: 0 auto;
}
</style> 
src/views/homePage/noticeMessage.vue
File was deleted
src/views/homePage/schoolMessage.vue
File was deleted
src/views/homePage/workMessage.vue
File was deleted
src/views/notice.vue
@@ -12,11 +12,10 @@
      <ul>
        <li class="lieBiao liPointer" :key="index" v-for="(item, index) in noticeList">
          <div class="time">
            <span>{{ item.year }}</span>
            <span>{{ item.month }}</span>
            {{ item.releaseTime }}
          </div>
          <div class="title" @click="toNoticeMsg(item.id,item.count)">
            {{ item.news }}
          <div class="title" @click="toNoticeMsg(item.id)">
            {{ item.title }}
          </div>
        </li>
      </ul>
@@ -24,45 +23,52 @@
  </div>
</template>
<script>
import {getNewsList} from '../api/api'
import axios from 'axios'
import {getMinTitle,getNewsList} from '../api/api'
export default {
  name: 'notice',
  data() {
    return {
     noticeList: [{id:1,year: 2022,month:'1-10',count:10, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:2,year: 2022,month:'1-10',count:11, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:3,year: 2022,month:'1-10',count:12, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:4,year: 2022,month:'1-10',count:13, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:5,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:15, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:17, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'}],
     noticeList: [],
    }
  },
  created() {
    this.getnews();
  },
  mounted(){
    //获取小标题
    // axios.get('http://localhost:8080/news_category/list/1').then(res => {
    //   console.log(res);
    //   if(res.status==200){
    //     this.noticeList = res.data.data
    //   }
    // }).catch(err => {
    //   console.log(err);
    // })
    this.getnews()
  },
  methods: {
    //获取新闻列表
    getnews() {
    getnews(){
      const data = {
        categoryId: 1,//小标题ID
        contypeId: 2,//大标题ID
        p: 0//当前页
      };
        current:1,
        newsCategoryId:42,
        size:6
      }
      getNewsList(data).then(res => {
        console.log('res',res);
        console.log(res);
        if(res.code == 200){
          this.noticeList = res.data.records
        }
      }).catch(err => {
        console.log('err',err);
      }).catch(error => {
        console.log(error);
      })
    },
    // 去到新闻展示页
    toNoticeMsg(id,count) {
    toNoticeMsg(id) {
      this.$router.push({
        path: '/home/noticeMessage',
        path: '/home/news',
        query: {
          id:id,
          count:count
        }
      })
    },
@@ -83,7 +89,7 @@
  border-bottom: 1px solid rgb(1, 72, 153);
}
.lieBiao {
  width: 95%;
  width: 100%;
  height: 55px;
  background: rgb(241, 241, 241);
  display: flex;
@@ -92,12 +98,10 @@
  margin-bottom: 10px;
}
.time {
  width: 80px;
  overflow: hidden;
  width: 100px;
  padding: 17px 0px;
  display: flex;
  // line-height: 20px;
  flex-direction: column;
  padding: 8px;
  background-color: rgb(1, 72, 153);
  color: white;
  text-align: center;
@@ -107,6 +111,7 @@
  height: 50px;
  overflow: hidden;
  line-height: 50px;
  // background-color: rgb(179, 19, 19);
  padding: 0 0 0 10px;
}
</style>
src/views/school.vue
@@ -9,10 +9,8 @@
    <div style="max-height:420px;overflow:hidden;">
      <ul>
        <li :key="index" v-for="(item, index) in schoolList" class="liPointer">
          <!-- <a href="item.path"> {{ item.title }} </a> -->
          <!-- <router-link :to="{name:'schoolMessage',params:{id:item.id}}" >{{ item.title }} </router-link> -->
          <div @click="toSchoolMsg(item.title)" class="bgc mart10">
            {{ item.news }}
          <div @click="toSchoolMsg(item.id)" class="bgc mart10">
            {{ item.title }}
          </div>
        </li>
      </ul>
@@ -25,11 +23,7 @@
  name: 'school',
  data() {
    return {
      schoolList: [{id:1,year: 2022,month:'1-10',count:10, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:2,year: 2022,month:'1-10',count:11, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:3,year: 2022,month:'1-10',count:12, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:4,year: 2022,month:'1-10',count:13, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:5,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:15, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:17, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'}],
      schoolList: [],
    }
  },
  created() {
@@ -38,17 +32,17 @@
  methods:{
    getnews(){
      const data = {
        categoryId: 1,
        contypeId: 2,
        p: 0
    }
        current:1,
        newsCategoryId:44,
        size:6
      }
      getNewsList(data).then(res => {
        console.log('res',res);
        console.log(res);
        if(res.code == 200){
          this.schoolList = res.data.records
        }
      }).catch(err => {
        console.log('err',err);
      }).catch(error => {
        console.log(error);
      })
    },
    //前往更多信息页面
@@ -61,11 +55,11 @@
      })
    },
    //前往信息展示页面
    toSchoolMsg(t) {
    toSchoolMsg(id) {
      this.$router.push({
        path: 'schoolMessage',
        path: '/home/news',
        query: {
          title:t
          id:id
        }
      })
    }
src/views/work.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <el-row type="flex" justify="space-between" class="underline">
    <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>
@@ -9,8 +9,8 @@
    <div style="max-height:420px;overflow:hidden;">
      <ul>
        <li :key="index" v-for="(item, index) in workList" class="liPointer">
          <div @click="toWorkMsg(item.title)" class="bgc mart10">
            {{ item.news }}
          <div @click="toWorkMsg(item.id)" class="bgc mart10">
            {{ item.title }}
          </div>
        </li>
      </ul>
@@ -23,38 +23,34 @@
  name:'work',
  data(){
    return{
      workList: [{id:1,year: 2022,month:'1-10',count:10, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:2,year: 2022,month:'1-10',count:11, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:3,year: 2022,month:'1-10',count:12, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:4,year: 2022,month:'1-10',count:13, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:5,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:14, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:15, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},
      {id:6,year: 2022,month:'1-10',count:16, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'},{id:6,year: 2022,month:'1-10',count:17, news:'你走过的地方只剩下思念难捱,把你藏在心头,每天每夜想你'}],
      workList: [],
    }
  },
  created() {
    // this.getnews();
    this.getnews()
  },
  methods:{
    //获取新闻列表
    // getnews() {
    //   const data = {
    //     categoryId: 2,//小标题ID
    //     contypeId: 2,//大标题ID
    //     p: 0//当前页
    //   };
    //   getNewsList(data).then(res => {
    //     console.log('res',res);
    //     if(res.code == 200){
    //       this.workList = res.data.records
    //     }
    //   }).catch(err => {
    //     console.log('err',err);
    //   })
    // },
    toWorkMsg(t) {
    getnews(){
      const data = {
        current:1,
        newsCategoryId:43,
        size:6
      }
      getNewsList(data).then(res => {
        console.log(res);
        if(res.code == 200){
          this.workList = res.data.records
        }
      }).catch(error => {
        console.log(error);
      })
    },
    toWorkMsg(id) {
      this.$router.push({
        path:'/home/workMessage',
        path:'/home/news',
        query: {
          title:t
          id:id,
        }
      })
    },