重新登录404

master
xiaoning 1 month ago
parent d62bba89c1
commit ae30756850

@ -23,7 +23,6 @@ npm run dev
npm run build:stage npm run build:stage
# 构建生产环境 # 构建生产环境
配置路由router -- index.js -- new Router添加: base: '/yoga/manager',
npm run build:prod npm run build:prod
``` ```
## 项目地址 ## 项目地址

@ -1,9 +1,9 @@
{ {
"name": "ruoyi-ui-merge", "name": "ruoyi-ui-merge",
"version": "3.8.3", "version": "3.8.3",
"description": "ruoyi-mall商城管理系统", "description": "yoga后台管理系统",
"author": "若依", "author": "",
"license": "MIT", "license": "",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"local": "vue-cli-service serve --mode .env.local", "local": "vue-cli-service serve --mode .env.local",
@ -58,6 +58,7 @@
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"v-charts": "^1.19.0", "v-charts": "^1.19.0",
"path-to-regexp": "2.4.0",
"vue": "2.6.12", "vue": "2.6.12",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-cropper": "0.5.5", "vue-cropper": "0.5.5",
@ -90,7 +91,8 @@
"stylus": "^0.54.5", "stylus": "^0.54.5",
"stylus-loader": "^3.0.2", "stylus-loader": "^3.0.2",
"svg-sprite-loader": "5.1.1", "svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12" "vue-template-compiler": "2.6.12",
"normalize.css": "7.0.0"
}, },
"engines": { "engines": {
"node": ">=8.9", "node": ">=8.9",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -18,5 +18,5 @@ export default {
} }
</script> </script>
<style lang="stylus"> <style lang="stylus">
@import "base" @import "base";
</style> </style>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.2 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1595653532290" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7012" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="600"><defs><style type="text/css"></style></defs><path d="M800 279.04h119.04v558.08h-183.68V503.04c-16.64 5.76-33.28 10.88-49.28 12.8l14.72-47.36c9.6-2.56 19.84-5.76 30.08-10.24 19.84-8.32 36.48-17.28 48-28.16v363.52h97.28V321.92h-61.44c-24.96 19.2-53.12 35.2-83.84 48l5.76-17.92H652.8l8.32-2.56c49.92-14.08 91.52-35.2 126.72-62.08l12.16-8.32zM555.52 352h181.12l-5.76 17.92-30.08 98.56-14.72 47.36-83.84 271.36H442.88l-89.6-305.28-38.4-129.92h181.76l8.96 33.28 20.48 88.32 29.44-121.6zM353.28 192v160h-38.4l38.4 129.92v268.16H169.6V414.72c-20.48 7.04-39.04 13.44-57.6 15.36L64 435.84V271.36l30.72-8.96c49.92-14.08 92.16-35.2 127.36-62.08L233.6 192h119.68z m-43.52 514.56V234.88h-61.44c-39.68 30.72-86.4 53.76-140.8 69.76v81.92c17.28-1.92 35.84-7.04 56.96-14.72 20.48-8.32 36.48-17.92 48.64-28.16v362.88h96.64z m364.16-296.96l3.84-14.08H590.08l-53.76 221.44c-5.12 21.76-8.96 40.96-10.24 57.6H524.8c-0.64-16-3.84-35.84-9.6-59.52l-52.48-219.52h-89.6l102.4 348.16h94.72l68.48-222.08 35.2-112z" p-id="7013" fill="#1296db"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -1,32 +1,22 @@
<!--新增学--> <!--新增学-->
<template> <template>
<div> <div>
<el-dialog title="新增学" :visible.sync="open" width="600px"> <el-dialog title="新增学" :visible.sync="open" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学姓名:" prop="studentName"> <el-form-item label="学姓名:" prop="studentName">
<el-input v-model="form.studentName" placeholder="请输入学姓名" /> <el-input v-model="form.studentName" placeholder="请输入学姓名" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学校:" prop="schoolName"> <el-form-item label="性别:" prop="sex">
<el-select <el-select v-model="form.sex" placeholder="请选择性别">
v-model="form.schoolName"
placeholder="请选择/输入所属学校"
clearable
filterable
default-first-option
allow-create
remote
:remote-method="schoolSelect"
:loading="loadingSelect"
>
<el-option <el-option
v-for="item in schoolOptions" v-for="dict in sexOptions"
:key="item.schoolId" :key="dict.dictValue"
:label="item.schoolName" :label="dict.dictLabel"
:value="item.schoolName" :value="dict.dictValue"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -38,25 +28,14 @@
<el-date-picker <el-date-picker
v-model="form.birthDay" v-model="form.birthDay"
clearable clearable
style="width: 200px" style="width: 190px"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择出生日期" placeholder="选择出生日期"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="性别:">
<el-radio-group v-model="form.sex" placeholder="请选择性别">
<el-radio
v-for="dict in sexOptions"
:key="dict.dictValue"
:label="dict.dictValue"
:value="dict.dictValue"
>{{ dict.dictLabel }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入校时间:" prop="inTime"> <el-form-item label="入校时间:" prop="inTime">
<el-date-picker <el-date-picker
@ -70,23 +49,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-for="(item, index) in contactArray" :key="index" :span="24" style="text-align: left;"> <el-col v-for="(item, index) in contactArray" :key="index" :span="24" style="text-align: left;">
<el-form-item label="联系人:"> <el-form-item label="联系电话:">
<el-select <el-input v-model="contactArray[index].contactPhone" style="width: 200px;" placeholder="联系电话" />
v-model="contactArray[index].contactRelation"
filterable
placeholder="关系"
default-first-option
style="width: 80px"
>
<el-option
v-for="dict in contactRelationOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
<el-input v-model="contactArray[index].contactNick" style="width: 100px;" placeholder="称呼" />
<el-input v-model="contactArray[index].contactPhone" style="width: 150px;" placeholder="联系电话" />
<el-button v-if="index === 0 && contactArray.length > 0" style="padding: 3px 5px;margin-left: 5px;" type="primary" icon="el-icon-plus" size="mini" @click="handleAddContactInfo()" /> <el-button v-if="index === 0 && contactArray.length > 0" style="padding: 3px 5px;margin-left: 5px;" type="primary" icon="el-icon-plus" size="mini" @click="handleAddContactInfo()" />
<el-button v-if="index > 0" style="padding: 3px 5px;margin-left: 5px;" type="danger" icon="el-icon-minus" size="mini" @click="handleDeleteContactInfo(index)" /> <el-button v-if="index > 0" style="padding: 3px 5px;margin-left: 5px;" type="danger" icon="el-icon-minus" size="mini" @click="handleDeleteContactInfo(index)" />
</el-form-item> </el-form-item>
@ -113,7 +77,7 @@ export default {
open: false, open: false,
// //
form: { form: {
sex: 'M' sex: '2'
}, },
// //
schoolOptions: [], schoolOptions: [],
@ -121,7 +85,7 @@ export default {
sexOptions: [], sexOptions: [],
rules: { rules: {
studentName: [ studentName: [
{ required: true, message: '学姓名不能为空', trigger: 'blur' } { required: true, message: '学姓名不能为空', trigger: 'blur' }
], ],
birthDay: [ birthDay: [
{ required: true, message: '出生日期不能为空', trigger: 'blur' } { required: true, message: '出生日期不能为空', trigger: 'blur' }
@ -147,7 +111,7 @@ export default {
}, },
methods: { methods: {
loadDictInfo() { loadDictInfo() {
this.getDictListByDictType('sex').then(response => { this.getDictListByDictType('sys_user_sex').then(response => {
this.sexOptions = response.data this.sexOptions = response.data
}) })
this.getDictListByDictType('contact_relation').then(response => { this.getDictListByDictType('contact_relation').then(response => {
@ -166,7 +130,7 @@ export default {
schoolName: undefined, schoolName: undefined,
studentName: undefined, studentName: undefined,
birthDay: undefined, birthDay: undefined,
sex: 'M', sex: '2',
phone: undefined, phone: undefined,
inTime: moment(new Date()).format('YYYY-MM-DD') inTime: moment(new Date()).format('YYYY-MM-DD')
} }
@ -181,7 +145,7 @@ export default {
this.loadDictInfo() this.loadDictInfo()
this.reset() this.reset()
this.open = true this.open = true
this.title = '添加学基本信息' this.title = '添加学基本信息'
}, },
handleUpdate(studentId) { handleUpdate(studentId) {
this.loadDictInfo() this.loadDictInfo()
@ -192,7 +156,7 @@ export default {
this.contactArray = response.data.contactList this.contactArray = response.data.contactList
} }
this.open = true this.open = true
this.title = '修改学基本信息' this.title = '修改学基本信息'
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -201,7 +165,7 @@ export default {
if (valid) { if (valid) {
this.contactArray.forEach(item => { this.contactArray.forEach(item => {
if (item.contactRelation === undefined || item.contactRelation === null || item.contactRelation.trim() === '') { if (item.contactRelation === undefined || item.contactRelation === null || item.contactRelation.trim() === '') {
this.msgError('请选择联系人与学关系') this.msgError('请选择联系人与学关系')
valid = false valid = false
} else if (item.contactPhone === undefined || item.contactPhone === null || item.contactPhone.trim() === '') { } else if (item.contactPhone === undefined || item.contactPhone === null || item.contactPhone.trim() === '') {
this.msgError('请填写联系人电话') this.msgError('请填写联系人电话')
@ -227,7 +191,7 @@ export default {
if (response.respCode === '0000') { if (response.respCode === '0000') {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.open = false this.open = false
this.$emit('success') this.$emit('success',response.data)
} else { } else {
this.msgError(response.respMsg) this.msgError(response.respMsg)
} }

@ -41,6 +41,9 @@ export default {
this.searchStudent('') this.searchStudent('')
}, },
methods: { methods: {
defaultStudentId(studentId){
this.studentId=studentId;
},
// //
searchStudent(query) { searchStudent(query) {
// //

@ -6,14 +6,11 @@ import Element from 'element-ui'
import './assets/styles/element-variables.scss' import './assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css import '@/assets/styles/index.scss' // global css
import '@/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css import '@/assets/styles/ruoyi.scss' // ruoyi css
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import 'normalize.css/normalize.css' // A modern alternative to CSS resets import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import '@/styles/index.scss' // global css
import App from './App' import App from './App'
import store from './store' import store from './store'
@ -132,8 +129,6 @@ DictData.install()
Vue.use(Element, { Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size size: Cookies.get('size') || 'medium' // set element-ui default size
}) })
// set ElementUI lang to EN
Vue.use(ElementUI, { locale })
Vue.config.productionTip = false Vue.config.productionTip = false

@ -234,7 +234,7 @@ Router.prototype.push = function push(location) {
export default new Router({ export default new Router({
mode: 'history', // 去掉url中的# mode: 'history', // 去掉url中的#
// base: '/yoga/manager/', base: process.env.NODE_ENV=== "production" ? "/yoga/manager/" : "",
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}) })

@ -75,6 +75,7 @@ service.interceptors.response.use(res => {
if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){ if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){
return res.data return res.data
} }
let url=process.env.NODE_ENV=== "production" ? "/yoga/manager/index" : "/index";
if (code === 401) { if (code === 401) {
if (!isRelogin.show) { if (!isRelogin.show) {
isRelogin.show = true; isRelogin.show = true;
@ -86,8 +87,7 @@ service.interceptors.response.use(res => {
).then(() => { ).then(() => {
isRelogin.show = false; isRelogin.show = false;
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
// location.href = '/index'; location.href = url;
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
}) })
}).catch(() => { }).catch(() => {
isRelogin.show = false; isRelogin.show = false;

@ -6,7 +6,7 @@
<div class="title top"> <div class="title top">
<div style=" border-left: 3px solid #409EFF; padding-left: 10px;" >选择学员</div> <div style=" border-left: 3px solid #409EFF; padding-left: 10px;" >选择学员</div>
</div> </div>
<student-select v-model="orderForm.studentId" @change="handleStudentChange" placeholder="查询学生" /> <student-select :key="studentSelectKey" ref="studentSelect" v-model="orderForm.studentId" @change="handleStudentChange" placeholder="查询学生" />
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddStudent"></el-button> <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddStudent"></el-button>
</div> </div>
<div class="stu-info"> <div class="stu-info">
@ -527,7 +527,7 @@
</div> </div>
</div> </div>
<order-choose-course ref="orderChooseCourse" @chooseComplete="chooseCourseComplete" /> <order-choose-course ref="orderChooseCourse" @chooseComplete="chooseCourseComplete" />
<change-student ref="changeStudent" /> <change-student ref="changeStudent" @success="changeStudent" />
</div> </div>
</template> </template>
<script> <script>
@ -562,6 +562,7 @@ export default {
}, },
data() { data() {
return { return {
studentSelectKey:0,
loading: false, loading: false,
loadingSelect: false, loadingSelect: false,
chooseCourseIdList: [], chooseCourseIdList: [],
@ -792,6 +793,19 @@ export default {
}) })
}, },
methods: { methods: {
changeStudent(val){
//form
this.orderForm.studentId=val;
//
this.handleStudentChange(val)
//studentSelect
this.studentSelectKey +=1;
//studentSelectstudentId
setTimeout(() => {
this.$refs.studentSelect.defaultStudentId(val)
}, 500);
},
// //
handleStudentChange(studentId) { handleStudentChange(studentId) {
if (!studentId) { if (!studentId) {
@ -862,6 +876,7 @@ export default {
}, },
// //
loadChooseCourseInfo(coursesIdArray, deptId) { loadChooseCourseInfo(coursesIdArray, deptId) {
orderCourseDetail({ orderCourseDetail({
courseIds: coursesIdArray.toString(), courseIds: coursesIdArray.toString(),
deptId: deptId, deptId: deptId,
@ -965,6 +980,7 @@ export default {
}, },
// //
submitOrder() { submitOrder() {
const reqParam = { const reqParam = {
studentId: this.orderForm.studentId, studentId: this.orderForm.studentId,
commissionPlansId:this.orderForm.commissionPlansId, commissionPlansId:this.orderForm.commissionPlansId,

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require('compression-webpack-plugin') const CompressionPlugin = require('compression-webpack-plugin')
const name = process.env.VUE_APP_TITLE || 'ruoyi-mall商城管理系统' // 网页标题 const name = process.env.VUE_APP_TITLE || 'yoga后台管理系统' // 网页标题
const port = process.env.port || process.env.npm_config_port || 8099 // 端口 const port = process.env.port || process.env.npm_config_port || 8099 // 端口
@ -18,7 +18,7 @@ module.exports = {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/" : "/", publicPath: process.env.NODE_ENV === "production" ? "/yoga/manager/" : "/",
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist // 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: 'dist', outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@ -35,7 +35,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`, target: `http://localhost:8081`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save