From 2e880f52f2869d151f567ce087b44009a8dc5bfd Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 15 Jun 2021 09:56:42 +0800 Subject: [PATCH] fix --- src/components/page/AddCustomer.vue | 13 ++- src/components/page/AddLink.vue | 4 +- src/components/page/AddOrder.vue | 4 +- src/components/page/Configure.vue | 17 +-- src/components/page/Login.vue | 6 +- src/components/page/User.vue | 22 +++- src/config/index.js | 63 +++++++++++ src/main.js | 4 +- src/utils/api.js | 161 ++++++++++++++-------------- vue.config.js | 7 +- 10 files changed, 203 insertions(+), 98 deletions(-) create mode 100644 src/config/index.js diff --git a/src/components/page/AddCustomer.vue b/src/components/page/AddCustomer.vue index 6d9c66a..31dce13 100644 --- a/src/components/page/AddCustomer.vue +++ b/src/components/page/AddCustomer.vue @@ -335,7 +335,6 @@ export default { }; }, mounted() { - this.getSchoolData() this.getIndustryClass() if(this.customerId){ let data = { @@ -360,8 +359,11 @@ export default { this.coursePermissionss = res.message[0].coursePermissionss this.getCityData() this.changIndustryData() + this.getSchoolData() }).catch((res) => { }) + }else{ + this.getSchoolData() } }, methods: { @@ -447,6 +449,15 @@ export default { this.$refs[formName].validate((valid) => { if (valid) { if(this.NoAdd){ + let obj = {}; + obj = this.schoolList.find((item)=>{ + return item.schoolId === this.form.schoolId; + }); + this.form.customerName = obj.schoolName + this.form.level = obj.level + this.form.provinces = obj.provinceId + this.getCityData() + this.form.city = obj.cityId let data = { customerName: this.form.customerName, schoolId: this.form.schoolId, diff --git a/src/components/page/AddLink.vue b/src/components/page/AddLink.vue index 4ae70de..3b4807b 100644 --- a/src/components/page/AddLink.vue +++ b/src/components/page/AddLink.vue @@ -34,7 +34,8 @@ - + { + this.$post(this.api.logins,data).then(res => { if(res.message.retvalue.roleId == 1){ this.$message.success('登录成功'); localStorage.setItem('ms_username', this.param.username); diff --git a/src/components/page/User.vue b/src/components/page/User.vue index 8956e59..0625f28 100644 --- a/src/components/page/User.vue +++ b/src/components/page/User.vue @@ -114,6 +114,7 @@ 编辑 删除 + 重置密码 @@ -152,11 +153,11 @@ export default { }, { name: '管理员', - value: 2 + value: 13 }, { name: '教师', - value: 3 + value: 14 }, { name: '学生', @@ -322,6 +323,23 @@ export default { }) .catch(() => {}); }, + resetPassword(row){ + this.$confirm(`重置后的密码为:${this.$config.initialPassword},确定重置?`, '提示', { + }).then(() => { + let data = { + newPwd: this.$config.initialPassword, + userId: row.userId, + } + this.$get(this.api.resetPwd,data).then(res => { + if(res.errmessage == 'success'){ + this.$message.success('重置成功') + }else{ + this.$message.error('重置失败') + } + }).catch(res => {}); + }).catch(() => { + }); + }, getRowKeys(row) { return row.userId; }, diff --git a/src/config/index.js b/src/config/index.js new file mode 100644 index 0000000..f6acf70 --- /dev/null +++ b/src/config/index.js @@ -0,0 +1,63 @@ +export default { + /** + * @description 配置显示在浏览器标签的title + */ + title: 'saas平台服务端管理系统', + /** + * @description 是否使用国际化,默认为false + * 如果不使用,则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'} + * 用来在菜单中显示文字 + */ + locale: 'zh', + /** + * @description 长时间未操作,自动退出登录时间 + */ + autoLogoutTime: 3600000, + /** + * @description 默认密码 + */ + initialPassword: '111aaa', + /** + * @description 系统列表 + */ + systemList: [ + { + id: 1, + label: 'Python程序设计教学系统' + } + // ,{ + // id: 2, + // label: '跨国仿真系统' + // },{ + // id: 3, + // label: '期权期货系统' + // } + ,{ + id: 4, + label: '经济金融建模实验教学系统' + },{ + id: 5, + label: 'Python可视化实验教学系统' + },{ + id: 6, + label: '金融随机过程实验教学系统' + },{ + id: 7, + label: '量化投资策略建模实验教学系统' + },{ + id: 8, + label: '大数据分析实验教学系统' + }, + { + id: 9, + label: 'Python数据清洗教学实验系统' + },{ + id: 10, + label: 'Python数据采集(爬虫)教学实验系统' + } + ], + /** + * @description 是否使用动态路由 + */ + dynamicRoute: false +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index d5fa888..9211f8a 100644 --- a/src/main.js +++ b/src/main.js @@ -14,6 +14,7 @@ import './util/rem'; import {post,get,del,put} from './utils/http'; import api from './utils/api'; import store from './store' +import config from '@/config' import { systemStatus, systemTypeStatus, systemAttributionStatus, courseTypeStatus, hoursStatus, roleStatus, orderTypeFn, orderStatusFn, orderNatureFn, Percentage, removeByValue, isIE } from './utils/core'; import preventReClick from './store/preventReClick' //防多次点击,重复提交 @@ -25,6 +26,7 @@ Vue.prototype.$post = post; Vue.prototype.$del = del; Vue.prototype.$put = put; +Vue.prototype.$config = config Vue.prototype.systemStatus = systemStatus; Vue.prototype.systemTypeStatus = systemTypeStatus; Vue.prototype.systemAttributionStatus = systemAttributionStatus; @@ -48,7 +50,7 @@ const i18n = new VueI18n({ //使用钩子函数对路由进行权限跳转 router.beforeEach((to, from, next) => { - document.title = `${to.meta.title} | saas平台服务端管理系统`; + document.title = `${to.meta.title} | ${config.title}`; const role = localStorage.getItem('ms_username'); if (!role && to.path !== '/login') { next('/login'); diff --git a/src/utils/api.js b/src/utils/api.js index a8c675e..df88fbf 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -1,98 +1,99 @@ // let host = 'http://192.168.31.117:8080' // let host = 'http://www.huorantech.cn/liuwanr' -let host = 'http://39.108.250.202/liuwanr' +let host = 'http://39.108.250.202' // let host = 'http://www.liuwanr.cn:8080' export default { - logins: `${host}/userInfo/adminLogins`, //登录 - // addUser: `${host}/user/addUser`, //增加用户 - addUser: `${host}/userInfo/addUser`, //增加用户新版 - // queryUser: `${host}/user/queryUser`, //查询用户 - queryUser: `${host}/userInfo/queryUserInfo`, //查询用户新版 - // deleteUser: `${host}/user/deleteUser`, //删除用户 - deleteUser: `${host}/userInfo/deleteUserInfo`, //删除用户新版 - updateUser: `${host}/user/updateUser`, //编辑用户 - // queryUserDetails: `${host}/user/queryUserDetails`, //查询用户详情 - queryUserInfoDetails: `${host}/userInfo/queryUserInfoDetails`, //查询用户详情新版 - queryAccountIsExist: `${host}/userInfo/queryServerAccountIsExist`, //查询账号是否存在 - queryUserOR: `${host}/userInfo/queryUserOR`, //查询系统列表详情 - queryWorkNumberIsExist:`${host}/userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在 - queryCustomerUser: `${host}/user/queryCustomer`, //用户模块查询客户接口 - queryStaffPro: `${host}/staffProfessionalArchitecture/queryAllStaffProfessionalArchitecture`, //查询一级部门 - queryStaffGrade: `${host}/staffGrade/queryStaffGrade`, //查询二级部门 - queryStuPro: `${host}/stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业 - queryStuGrade: `${host}/stuProfessionalArchitecture/queryStuGrade`, //查询学生年级 - queryStuClass: `${host}/stuProfessionalArchitecture/queryStuClass`, //查询学生班级 - userQueryCustomer: `${host}/userInfo/queryCustomer`, //查询客户列表 - updateUserInfo: `${host}/userInfo/updateUserInfo`, //查询更新用户 - updateUserProfiles: `${host}/userInfo/updateUserProfiles`, //更新用户个人档案 - updateOR: `${host}/userInfo/updateOR`, //更新用户组织架构 - deletePlatform: `${host}/userInfo/deletePlatform`, //更新用户组织架构 - updateUserRoleId: `${host}/userInfo/updateUserRoleId`, //更新用户角色id接口 + logins: `${host}/liuwanr/userInfo/adminLogins`, //登录 + // addUser: `${host}/liuwanr/user/addUser`, //增加用户 + addUser: `${host}/liuwanr/userInfo/addUser`, //增加用户新版 + // queryUser: `${host}/liuwanr/user/queryUser`, //查询用户 + queryUser: `${host}/liuwanr/userInfo/queryUserInfo`, //查询用户新版 + // deleteUser: `${host}/liuwanr/user/deleteUser`, //删除用户 + deleteUser: `${host}/liuwanr/userInfo/deleteUserInfo`, //删除用户新版 + updateUser: `${host}/liuwanr/user/updateUser`, //编辑用户 + // queryUserDetails: `${host}/liuwanr/user/queryUserDetails`, //查询用户详情 + queryUserInfoDetails: `${host}/liuwanr/userInfo/queryUserInfoDetails`, //查询用户详情新版 + queryAccountIsExist: `${host}/liuwanr/userInfo/queryServerAccountIsExist`, //查询账号是否存在 + queryUserOR: `${host}/liuwanr/userInfo/queryUserOR`, //查询系统列表详情 + queryWorkNumberIsExist:`${host}/liuwanr/userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在 + queryCustomerUser: `${host}/liuwanr/user/queryCustomer`, //用户模块查询客户接口 + queryStaffPro: `${host}/liuwanr/staffProfessionalArchitecture/queryAllStaffProfessionalArchitecture`, //查询一级部门 + queryStaffGrade: `${host}/liuwanr/staffGrade/queryStaffGrade`, //查询二级部门 + queryStuPro: `${host}/liuwanr/stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业 + queryStuGrade: `${host}/liuwanr/stuProfessionalArchitecture/queryStuGrade`, //查询学生年级 + queryStuClass: `${host}/liuwanr/stuProfessionalArchitecture/queryStuClass`, //查询学生班级 + userQueryCustomer: `${host}/liuwanr/userInfo/queryCustomer`, //查询客户列表 + updateUserInfo: `${host}/liuwanr/userInfo/updateUserInfo`, //查询更新用户 + updateUserProfiles: `${host}/liuwanr/userInfo/updateUserProfiles`, //更新用户个人档案 + updateOR: `${host}/liuwanr/userInfo/updateOR`, //更新用户组织架构 + deletePlatform: `${host}/liuwanr/userInfo/deletePlatform`, //更新用户组织架构 + updateUserRoleId: `${host}/liuwanr/userInfo/updateUserRoleId`, //更新用户角色id接口 + resetPwd:`${host}/evaluation/tms/system/resetPwd`, - deleteCustomer: `${host}/customer/deleteCustomer`, //删除客户 - updateCustomer: `${host}/customer/updateCustomer`, //更新客户 - addCustomer: `${host}/customer/addCustomer`, //添加客户 - queryCustomer: `${host}/customer/queryCustomer`, //查询客户 - queryCustomerIsExists: `${host}/customer/queryCustomerIsExists`, //查询客户是否存在 - queryCustomerDetails: `${host}/customer/queryCustomerDetails`, //查询客户详情 - queryCustomerIndustryClass: `${host}/customer/queryCustomerIndustryClass`, //查询行业类 - queryCustomerIndustry: `${host}/customer/queryCustomerIndustry`, //查询行业 - queryPhone: `${host}/user/queryPhone`, //查询电话 - querySchoolData: `${host}/customer/querySchool`, //根据学校名称查询学校信息 - queryPlatform: `${host}/userInfo/queryPlatform`, //查询系统列表 + deleteCustomer: `${host}/liuwanr/customer/deleteCustomer`, //删除客户 + updateCustomer: `${host}/liuwanr/customer/updateCustomer`, //更新客户 + addCustomer: `${host}/liuwanr/customer/addCustomer`, //添加客户 + queryCustomer: `${host}/liuwanr/customer/queryCustomer`, //查询客户 + queryCustomerIsExists: `${host}/liuwanr/customer/queryCustomerIsExists`, //查询客户是否存在 + queryCustomerDetails: `${host}/liuwanr/customer/queryCustomerDetails`, //查询客户详情 + queryCustomerIndustryClass: `${host}/liuwanr/customer/queryCustomerIndustryClass`, //查询行业类 + queryCustomerIndustry: `${host}/liuwanr/customer/queryCustomerIndustry`, //查询行业 + queryPhone: `${host}/liuwanr/user/queryPhone`, //查询电话 + querySchoolData: `${host}/liuwanr/customer/querySchool`, //根据学校名称查询学校信息 + queryPlatform: `${host}/liuwanr/userInfo/queryPlatform`, //查询系统列表 - queryOrder: `${host}/order/queryOrder`, //查询订单 - queryOrderDetails: `${host}/order/queryOrderDetails`, //查询订单详情 - queryOrderCustomer: `${host}/order/queryOrderCustomer`, //查询订单客户 - queryOrderCustomerContact: `${host}/order/queryOrderCustomerContact`, //查询订单客户联系人 - addOrder: `${host}/order/addOrder`, //添加订单 - updateOrder: `${host}/order/updateOrder`, //编辑订单 - deleteOrder: `${host}/order/deleteOrder`, //删除订单 - bindingApplication: `${host}/order/bindingApplicationPermissions`, //绑定应用权限 - queryCoursePermissions: `${host}/order/queryCoursePermissions`, //查询应用权限 - queryCourseList: `${host}/order/queryCourseList`, //查询订单课程列表 - isDeliverGoods: `${host}/order/isDeliverGoods`, //是否上架课程 + queryOrder: `${host}/liuwanr/order/queryOrder`, //查询订单 + queryOrderDetails: `${host}/liuwanr/order/queryOrderDetails`, //查询订单详情 + queryOrderCustomer: `${host}/liuwanr/order/queryOrderCustomer`, //查询订单客户 + queryOrderCustomerContact: `${host}/liuwanr/order/queryOrderCustomerContact`, //查询订单客户联系人 + addOrder: `${host}/liuwanr/order/addOrder`, //添加订单 + updateOrder: `${host}/liuwanr/order/updateOrder`, //编辑订单 + deleteOrder: `${host}/liuwanr/order/deleteOrder`, //删除订单 + bindingApplication: `${host}/liuwanr/order/bindingApplicationPermissions`, //绑定应用权限 + queryCoursePermissions: `${host}/liuwanr/order/queryCoursePermissions`, //查询应用权限 + queryCourseList: `${host}/liuwanr/order/queryCourseList`, //查询订单课程列表 + isDeliverGoods: `${host}/liuwanr/order/isDeliverGoods`, //是否上架课程 - deleteCourse: `${host}/course/deleteCourse`, //删除课程 - updateCourse: `${host}/course/updateCourse`, //更新课程 - addCourse: `${host}/course/addCourse`, //添加课程 - queryCourse: `${host}/course/queryCourse`, //查询课程 - queryCourseDetails: `${host}/course/queryCourseDetails`, //查询课程详情 - isShelves: `${host}/course/isShelves`, //是否上架课程 - queryCourseNameIsExists: `${host}/course/queryCourseNameIsExists`, //查询课程名称是否存在 + deleteCourse: `${host}/liuwanr/course/deleteCourse`, //删除课程 + updateCourse: `${host}/liuwanr/course/updateCourse`, //更新课程 + addCourse: `${host}/liuwanr/course/addCourse`, //添加课程 + queryCourse: `${host}/liuwanr/course/queryCourse`, //查询课程 + queryCourseDetails: `${host}/liuwanr/course/queryCourseDetails`, //查询课程详情 + isShelves: `${host}/liuwanr/course/isShelves`, //是否上架课程 + queryCourseNameIsExists: `${host}/liuwanr/course/queryCourseNameIsExists`, //查询课程名称是否存在 - deleteServiceConfig: `${host}/serviceConfig/deleteServiceConfig`, //删除服务配置 - updateServiceConfig: `${host}/serviceConfig/updateServiceConfig`, //更新服务配置 - addServiceConfig: `${host}/serviceConfig/addServiceConfig`, //添加服务配置 - queryServiceConfig: `${host}/serviceConfig/queryServiceConfig`, //查询服务配置 - queryServiceConfigDetails: `${host}/serviceConfig/queryServiceConfigDetails`, //查询服务配置详情 + deleteServiceConfig: `${host}/liuwanr/serviceConfig/deleteServiceConfig`, //删除服务配置 + updateServiceConfig: `${host}/liuwanr/serviceConfig/updateServiceConfig`, //更新服务配置 + addServiceConfig: `${host}/liuwanr/serviceConfig/addServiceConfig`, //添加服务配置 + queryServiceConfig: `${host}/liuwanr/serviceConfig/queryServiceConfig`, //查询服务配置 + queryServiceConfigDetails: `${host}/liuwanr/serviceConfig/queryServiceConfigDetails`, //查询服务配置详情 - deleteSchool: `${host}/school/deleteSchool`, //删除学校 - updateSchool: `${host}/school/updateSchool`, //更新学校 - addSchool: `${host}/school/addSchool`, //添加学校 - querySchool: `${host}/school/querySchool`, //查询学校 - querySchoolDetails: `${host}/school/querySchoolDetails`, //查询学校详情 + deleteSchool: `${host}/liuwanr/school/deleteSchool`, //删除学校 + updateSchool: `${host}/liuwanr/school/updateSchool`, //更新学校 + addSchool: `${host}/liuwanr/school/addSchool`, //添加学校 + querySchool: `${host}/liuwanr/school/querySchool`, //查询学校 + querySchoolDetails: `${host}/liuwanr/school/querySchoolDetails`, //查询学校详情 - queryProvince: `${host}/province/queryProvince`, //查询省份 - queryCity: `${host}/city/queryCity`, //查询城市 + queryProvince: `${host}/liuwanr/province/queryProvince`, //查询省份 + queryCity: `${host}/liuwanr/city/queryCity`, //查询城市 - queryCourseDiscipline: `${host}/course/queryCourseDiscipline`, //查询课程学科 - queryCourseProfessionalClass: `${host}/course/queryCourseProfessionalClass`, //查询专业类 - queryCourseProfessional: `${host}/course/queryCourseProfessional`, //查询专业 - queryAppConfig: `${host}/course/queryAppConfig`, //查询应用配置 - queryTrainingConfig: `${host}/course/queryConfig`, //查询实训配置 - deleteTrainingConfig: `${host}/course/deleteTrainingConfig`, //删除实训配置 - isShow: `${host}/course/isShow`, //是否展示项目控制 - queryCourseDetailsTC: `${host}/course/queryCourseDetailsTC`, //查询课程详情课程权限 + queryCourseDiscipline: `${host}/liuwanr/course/queryCourseDiscipline`, //查询课程学科 + queryCourseProfessionalClass: `${host}/liuwanr/course/queryCourseProfessionalClass`, //查询专业类 + queryCourseProfessional: `${host}/liuwanr/course/queryCourseProfessional`, //查询专业 + queryAppConfig: `${host}/liuwanr/course/queryAppConfig`, //查询应用配置 + queryTrainingConfig: `${host}/liuwanr/course/queryConfig`, //查询实训配置 + deleteTrainingConfig: `${host}/liuwanr/course/deleteTrainingConfig`, //删除实训配置 + isShow: `${host}/liuwanr/course/isShow`, //是否展示项目控制 + queryCourseDetailsTC: `${host}/liuwanr/course/queryCourseDetailsTC`, //查询课程详情课程权限 - queryLinkDetails: `${host}/course/queryLinkDetails`, //查询环节详情 - addCourseLink: `${host}/course/addCourseLink`, //添加课程环节 - updateLink: `${host}/course/updateLink`, //更新环节 + queryLinkDetails: `${host}/liuwanr/course/queryLinkDetails`, //查询环节详情 + addCourseLink: `${host}/liuwanr/course/addCourseLink`, //添加课程环节 + updateLink: `${host}/liuwanr/course/updateLink`, //更新环节 - uploadFiles: `${host}/aliyun/uploadFiles`, //上传文件 - downloadFiles: `${host}/aliyun/downloadFiles`, //下载文件 + uploadFiles: `${host}/liuwanr/aliyun/uploadFiles`, //上传文件 + downloadFiles: `${host}/liuwanr/aliyun/downloadFiles`, //下载文件 } diff --git a/vue.config.js b/vue.config.js index 801340c..3efe1de 100644 --- a/vue.config.js +++ b/vue.config.js @@ -21,8 +21,9 @@ module.exports = { }, publicPath: './',   outputDir: 'dist', -  assetsDir: 'static' - // devServer: { +  assetsDir: 'static', + devServer: { + port: 8086 // proxy: { // "/api": { // target: "http://192.168.0.106:8080", @@ -33,5 +34,5 @@ module.exports = { // } // } // } - // } + } } \ No newline at end of file