From a99c0c6a094024f9096350e484c561ae4e8a112b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <964919485@qq.com> Date: Mon, 22 Aug 2022 19:26:52 +0800 Subject: [PATCH 1/3] 11 --- src/components/test/upload.vue | 27 +++++++++++++++++++++++++++ src/router/index.js | 6 ++++++ 2 files changed, 33 insertions(+) create mode 100644 src/components/test/upload.vue diff --git a/src/components/test/upload.vue b/src/components/test/upload.vue new file mode 100644 index 0000000..e358e58 --- /dev/null +++ b/src/components/test/upload.vue @@ -0,0 +1,27 @@ + + + + 点击上传 + + + + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 55589fa..0c6a822 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -20,6 +20,7 @@ import stationList from "@/components/ForUser/stationList"; import enterpriseList from "@/components/ForUser/enterpriseList"; import wikiList from "@/components/ForUser/wikiList"; import logintest from "@/components/Manager/logintest"; +import upload from "../components/test/upload"; Vue.use(VueRouter) @@ -29,6 +30,11 @@ const routes = [ path: "/", redirect: "/user" }, + { + name: "上传测试", + path: "/upload", + component: upload + }, { name: "登录", path: "/login", -- Gitee From de35c11b30308a996b898c1fe04361f53c33c25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <964919485@qq.com> Date: Tue, 23 Aug 2022 09:51:47 +0800 Subject: [PATCH 2/3] 11 --- src/components/ForUser/wikiList.vue | 90 +++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 4 deletions(-) diff --git a/src/components/ForUser/wikiList.vue b/src/components/ForUser/wikiList.vue index 794957e..598a039 100644 --- a/src/components/ForUser/wikiList.vue +++ b/src/components/ForUser/wikiList.vue @@ -1,5 +1,45 @@ + 添加百科 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + ok 查看 修改 删除 @@ -57,15 +98,27 @@ import axios from "axios"; _this.tableData = resp.data; }) }, + change() { + + }, + addEnc() { + var _this = this + let addEnc = qs.stringify(_this.form) + axios.post("http://localhost:82/ee/add", addEnc).then(function () { + window.location.reload() + }) + _this.dialogFormVisible = false + }, deleteEnc(obj) { const _this = this console.log(obj) - let del = qs.stringify({"encId":obj}) + let dell = qs.stringify({"encId":obj}) _this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning'}).then(function(){ - axios.post("https://localhost:82/ee/del",del).then(function(){ + axios.post("https://localhost:82/ee/del",dell).then(function(){ + alert(obj) window.location.reload() }) @@ -75,7 +128,36 @@ import axios from "axios"; message: '已取消删除' }); }); - } + }, + updateEnc() { + var _this = this + let updateEncyclopedia = qs.stringify({ + encId:_this.updateForm.encId, + encTitle:_this.updateForm.encTitle, + encContext:_this.updateForm.encContext, + encTime:_this.updateForm.encTime, + + }) + axios.post("http://localhost:82/ee/update",updateEncyclopedia).then(function (){ + _this.dialogFormVisibleUpdate=false + window.location.reload() + + }) + }, + handleRemove(file, fileList) { + console.log(file, fileList); + }, + handlePreview(file) { + console.log(file); + }, + handleExceed(files, fileList) { + this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); + }, + // eslint-disable-next-line no-unused-vars + beforeRemove(file, fileList) { + return this.$confirm(`确定移除 ${file.name}?`); + }, + }, mounted() { this.getData(); } -- Gitee From 168d2e3fc1f8ba28e1b03090debc31be6284efba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9C=86=E4=BC=9F?= <964919485@qq.com> Date: Tue, 23 Aug 2022 19:38:09 +0800 Subject: [PATCH 3/3] 11 --- README.md | 5 + public/addstation.html | 35 +- public/index.html | 19 +- src/components/ForUser/enterpriseList.vue | 127 ++--- src/components/ForUser/resumeList.vue | 107 +++-- src/components/ForUser/stationList.vue | 436 ++++++++--------- src/components/ForUser/wikiList.vue | 40 +- src/components/Manager/enterpriseManager.vue | 463 ++++++++++--------- src/components/Manager/logintest.vue | 61 +-- src/components/Manager/roleManager.vue | 84 ++-- src/components/Manager/userManager.vue | 264 +++++------ src/components/forget.vue | 12 +- src/components/login.vue | 264 ++++++----- src/components/register.vue | 118 ++--- src/components/userstageMain.vue | 5 +- src/main.js | 5 +- src/router/index.js | 216 ++++----- src/store/vueX.js | 14 +- src/views/backstage.vue | 10 +- src/views/insert.vue | 7 +- src/views/selectAll.vue | 11 +- src/views/userstage.vue | 11 +- 22 files changed, 1176 insertions(+), 1138 deletions(-) diff --git a/README.md b/README.md index a2584b0..6035e44 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,29 @@ # irs_vue ## Project setup + ``` npm install ``` ### Compiles and hot-reloads for development + ``` npm run serve ``` ### Compiles and minifies for production + ``` npm run build ``` ### Lints and fixes files + ``` npm run lint ``` ### Customize configuration + See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/public/addstation.html b/public/addstation.html index da53d42..21bdf06 100644 --- a/public/addstation.html +++ b/public/addstation.html @@ -10,10 +10,10 @@ 新增图书 - - - - + + + + @@ -24,30 +24,29 @@ import axios from "axios"; new Vue({ - el:"#app", - data(){ - return{ - book:{} + el: "#app", + data() { + return { + book: {} } }, - methods:{ - submitForm(){ + methods: { + submitForm() { - var _this=this + var _this = this axios({ - method:"post", - url:"/addBookServlet", - data:_this.book - }).then(function (resp){ - if(resp.data == "success"){ - window.location.href="/BookList.html"; + method: "post", + url: "/addBookServlet", + data: _this.book + }).then(function (resp) { + if (resp.data == "success") { + window.location.href = "/BookList.html"; } }) } } - }); diff --git a/public/index.html b/public/index.html index 3e5a139..e330899 100644 --- a/public/index.html +++ b/public/index.html @@ -1,17 +1,18 @@ - + <%= htmlWebpackPlugin.options.title %> - - - - We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue. - - - - + + + + We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. + Please enable it to continue. + + + + diff --git a/src/components/ForUser/enterpriseList.vue b/src/components/ForUser/enterpriseList.vue index 6bf92cb..3989ee2 100644 --- a/src/components/ForUser/enterpriseList.vue +++ b/src/components/ForUser/enterpriseList.vue @@ -1,75 +1,76 @@ - - - 这是用户看到的企业列表 - + + + 这是用户看到的企业列表 + - - - - - - - - - - - - - - - - - - - 查看 - 修改 - 删除 - - - - + + + + + + + + + + + + + + + + + + + 查看 + 修改 + 删除 + + + + - + diff --git a/src/components/ForUser/resumeList.vue b/src/components/ForUser/resumeList.vue index d115a4d..96473cf 100644 --- a/src/components/ForUser/resumeList.vue +++ b/src/components/ForUser/resumeList.vue @@ -13,7 +13,7 @@ - + @@ -43,7 +43,7 @@ @@ -78,14 +78,14 @@ - + - + @@ -124,12 +124,12 @@ export default { data() { return { dataList: [], - user:{}, + user: {}, drawer: false, direction: 'rtl', dialogFormVisibleForA: false, dialogFormVisibleForU: false, - updateIndex:0, + updateIndex: 0, formAdd: { uid: '', reSkill: '', @@ -141,7 +141,7 @@ export default { reClass: '', reGraduationYear: '', }, - resetUpdate:{}, + resetUpdate: {}, formUpdate: { uid: '', reSkill: '', @@ -160,75 +160,75 @@ export default { methods: { getData() { const _this = this - let u=JSON.parse(sessionStorage.getItem("user")) - _this.user=u - var uId=qs.stringify({uId: u.uId}) - axios.post("http://localhost:82/resume/findResumeByUid",uId).then(function (resp) { + let u = JSON.parse(sessionStorage.getItem("user")) + _this.user = u + var uId = qs.stringify({uId: u.uId}) + axios.post("http://localhost:82/resume/findResumeByUid", uId).then(function (resp) { _this.dataList = resp.data; }) }, - addResume(){ - const _this = this - let u=JSON.parse(sessionStorage.getItem("user")) - _this.formAdd.uId=u.uId - var addResume=qs.stringify(_this.formAdd) - axios.post("http://localhost:82/resume/addResume",addResume).then(function (){ - _this.$message({ - type: 'success', - message: '添加成功' - }) + addResume() { + const _this = this + let u = JSON.parse(sessionStorage.getItem("user")) + _this.formAdd.uId = u.uId + var addResume = qs.stringify(_this.formAdd) + axios.post("http://localhost:82/resume/addResume", addResume).then(function () { + _this.$message({ + type: 'success', + message: '添加成功' }) + }) _this.dataList.push(_this.formAdd) - _this.formAdd=_this.$options.data().formAdd + _this.formAdd = _this.$options.data().formAdd _this.dialogFormVisibleForA = false }, - toUpdateResume(resume,i){ + toUpdateResume(resume, i) { const _this = this - _this.resetUpdate =resume - _this.formUpdate=JSON.parse(JSON.stringify(resume)) - _this.dialogFormVisibleForU=true - _this.updateIndex=i; + _this.resetUpdate = resume + _this.formUpdate = JSON.parse(JSON.stringify(resume)) + _this.dialogFormVisibleForU = true + _this.updateIndex = i; }, - updateResume(){ + updateResume() { const _this = this - var updateResume=qs.stringify(_this.formUpdate) - axios.post("http://localhost:82/resume/updateResume",updateResume).then(function (){ + var updateResume = qs.stringify(_this.formUpdate) + axios.post("http://localhost:82/resume/updateResume", updateResume).then(function () { _this.$message({ type: 'success', message: '修改成功' }) - _this.dataList[_this.updateIndex]=_this.formUpdate - _this.formUpdate=_this.$options.data().formUpdate - _this.resetUpdate=_this.$options.data().resetUpdate + _this.dataList[_this.updateIndex] = _this.formUpdate + _this.formUpdate = _this.$options.data().formUpdate + _this.resetUpdate = _this.$options.data().resetUpdate _this.dialogFormVisibleForU = false - _this.updateIndex=0; + _this.updateIndex = 0; }) }, - resetAddResume(){ + resetAddResume() { const _this = this - _this.formAdd=_this.$options.data().formAdd + _this.formAdd = _this.$options.data().formAdd }, - resetUpdateResume(){ + resetUpdateResume() { const _this = this - _this.formUpdate=_this.resetUpdate + _this.formUpdate = _this.resetUpdate }, - delResume(reId,i){ + delResume(reId, i) { const _this = this - var param=qs.stringify({"reId": reId}) + var param = qs.stringify({"reId": reId}) _this.$confirm('此操作将永久删除该简历, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(function(){ - axios.post("http://localhost:82/resume/delResume",param).then(function (){ - _this.dataList.splice(i,1) + }).then(function () { + axios.post("http://localhost:82/resume/delResume", param).then(function () { + _this.dataList.splice(i, 1) _this.$message({ type: 'success', message: '删除成功' }); }) - }).catch(function(){ + }).catch(function () { _this.$message({ type: 'info', message: '已取消删除' @@ -244,31 +244,40 @@ export default { - - 登录页面 + + 登录页面 - 账户: + 账户: + - 密码: + 密码: + - 添加 - + 添加 + diff --git a/src/main.js b/src/main.js index 95aa4e6..d84ab3e 100644 --- a/src/main.js +++ b/src/main.js @@ -5,11 +5,10 @@ import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' - Vue.config.productionTip = false Vue.use(ElementUI) new Vue({ - router, - render: h => h(App) + router, + render: h => h(App) }).$mount('#app') diff --git a/src/router/index.js b/src/router/index.js index 9301c85..b99b681 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -25,117 +25,117 @@ import resumeList from "@/components/ForUser/resumeList"; Vue.use(VueRouter) const routes = [ - { - name: "主页重定向", - path: "/", - redirect: "/user" - }, - { - name: "登录", - path: "/login", - component: login - }, - { - name: "注册", - path: "/register", - component: register - }, - { - name: "主页", - path: "/demo", - component: index, - children: [ - { - name: "修改操作", - path: "/update", - component: update, - }, { - name: "查看全部", - path: "/selectAll", - component: selectAll, - }, { - name: "查看一个", - path: "/selectOne", - component: selectOne, - }, { - name: "添加一个", - path: "/insert", - component: insert, - } - ] - }, - { - name: "userstage", - path: "/user", - component: userstage, - redirect: "/userstageMain", - children: [ - { - name: "用户首页", - path: "/userstageMain", - component: userstageMain - }, - { - name: "岗位列表(学员)", - path: "/stationList", - component: stationList - }, - { - name: "企业列表(学员)", - path: "/enterpriseList", - component: enterpriseList - }, - { - name: "百科列表(学员)", - path: "/wikiList", - component: wikiList - }, - { - name: "简介列表(学员)", - path: "/resumeList", - component: resumeList - }, - { - name: "登录测试", - path: "/logintest", - component: logintest - } - ] - }, - { - name: "backstage", - path: "/admin", - component: backstage, - redirect: "/backstageMain", - children: [ - { - name: "后台首页", - path: "/backstageMain", - component: backstageMain - }, - { - name: "用户管理", - path: "/userManager", - component: userManager - }, - { - name: "角色管理", - path: "/roleManager", - component: roleManager - }, - { - name: "企业管理", - path: "/enterpriseManager", - component: enterpriseManager - } - ] - } + { + name: "主页重定向", + path: "/", + redirect: "/user" + }, + { + name: "登录", + path: "/login", + component: login + }, + { + name: "注册", + path: "/register", + component: register + }, + { + name: "主页", + path: "/demo", + component: index, + children: [ + { + name: "修改操作", + path: "/update", + component: update, + }, { + name: "查看全部", + path: "/selectAll", + component: selectAll, + }, { + name: "查看一个", + path: "/selectOne", + component: selectOne, + }, { + name: "添加一个", + path: "/insert", + component: insert, + } + ] + }, + { + name: "userstage", + path: "/user", + component: userstage, + redirect: "/userstageMain", + children: [ + { + name: "用户首页", + path: "/userstageMain", + component: userstageMain + }, + { + name: "岗位列表(学员)", + path: "/stationList", + component: stationList + }, + { + name: "企业列表(学员)", + path: "/enterpriseList", + component: enterpriseList + }, + { + name: "百科列表(学员)", + path: "/wikiList", + component: wikiList + }, + { + name: "简介列表(学员)", + path: "/resumeList", + component: resumeList + }, + { + name: "登录测试", + path: "/logintest", + component: logintest + } + ] + }, + { + name: "backstage", + path: "/admin", + component: backstage, + redirect: "/backstageMain", + children: [ + { + name: "后台首页", + path: "/backstageMain", + component: backstageMain + }, + { + name: "用户管理", + path: "/userManager", + component: userManager + }, + { + name: "角色管理", + path: "/roleManager", + component: roleManager + }, + { + name: "企业管理", + path: "/enterpriseManager", + component: enterpriseManager + } + ] + } ] const router = new VueRouter({ - mode: 'history', - base: process.env.BASE_URL, - routes + mode: 'history', + base: process.env.BASE_URL, + routes }) export default router diff --git a/src/store/vueX.js b/src/store/vueX.js index 2aace62..bc1d40e 100644 --- a/src/store/vueX.js +++ b/src/store/vueX.js @@ -4,19 +4,19 @@ import Vuex from "vuex" Vue.use(Vuex); export default new Vuex.Store({ - state:{ - user:{}, + state: { + user: {}, jurisdictionRoleList: [] }, - mutations:{ + mutations: { // 保存当前菜单栏的路径 - saveUser(state,user){ + saveUser(state, user) { state.user = user state.jurisdictionRoleList = user.jurisdictionRoleList }, - clearUser(state){ - state.user=null - state.jurisdictionRoleList = null; + clearUser(state) { + state.user = null + state.jurisdictionRoleList = null; } } }) diff --git a/src/views/backstage.vue b/src/views/backstage.vue index 1bac907..4381491 100644 --- a/src/views/backstage.vue +++ b/src/views/backstage.vue @@ -45,14 +45,14 @@ -- Gitee