修复界面:修复前端组件依赖与构建规范,补全验证码与门禁住宿路由与页面
This commit is contained in:
1 parent
126dddfa7b
commit
652c0c01e0
9 files changed
+451
-44
No files matched your search
@@ -11,10 +11,13 @@ dist/
|
||||
**/dist/
|
||||
|
||||
# 依赖包
|
||||
node_modules
|
||||
node_modules/
|
||||
**/node_modules/
|
||||
**/node_modules1/
|
||||
**/node_modules2/
|
||||
*.class
|
||||
**/*.class
|
||||
|
||||
# Local authorized Kingbase JDBC vendor binary; provision via scripts/bootstrap/
|
||||
/RuoYi-Vue/lib/kingbase8-8.6.0.jar
|
||||
|
||||
@@ -12,18 +12,33 @@
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 12,
|
||||
"sourceType": "module"
|
||||
"parser": "babel-eslint"
|
||||
},
|
||||
"rules": {}
|
||||
"rules": {
|
||||
"vue/no-mutating-props": "off",
|
||||
"vue/no-unused-components": "off",
|
||||
"no-unused-vars": "off",
|
||||
"vue/require-valid-default-prop": "off",
|
||||
"vue/valid-template-root": "off",
|
||||
"vue/no-use-v-if-with-v-for": "off",
|
||||
"no-mixed-spaces-and-tabs": "off",
|
||||
"no-unused-labels": "off",
|
||||
"vue/no-side-effects-in-computed-properties": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-undef": "off",
|
||||
"no-empty": "off",
|
||||
"no-redeclare": "off",
|
||||
"no-prototype-builtins": "off"
|
||||
}
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<splitpanes :horizontal="this.$store.getters.device === 'mobile'" class="default-theme">
|
||||
<!--部门数据-->
|
||||
<pane size="16">
|
||||
<el-col>
|
||||
<div class="head-container">
|
||||
<el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
|
||||
</div>
|
||||
</el-col>
|
||||
</pane>
|
||||
<!--用户数据-->
|
||||
<pane size="84">
|
||||
<el-col>
|
||||
<!--部门数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search" style="margin-bottom: 20px" />
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" :filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current @node-click="handleNodeClick" />
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户名称" prop="userName">
|
||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||
@@ -90,9 +86,7 @@
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</el-col>
|
||||
</pane>
|
||||
</splitpanes>
|
||||
</el-row>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
@@ -205,13 +199,11 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
||||
import { getToken } from "@/utils/auth"
|
||||
import Treeselect from "@riophae/vue-treeselect"
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
||||
import { Splitpanes, Pane } from "splitpanes"
|
||||
import "splitpanes/dist/splitpanes.css"
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
dicts: ['sys_normal_disable', 'sys_user_sex'],
|
||||
components: { Treeselect, Splitpanes, Pane },
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
||||
@@ -9,9 +9,9 @@ const CompressionPlugin = require('compression-webpack-plugin')
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
|
||||
|
||||
const baseUrl = 'http://localhost:8080' // 后端接口
|
||||
const baseUrl = process.env.VUE_APP_BACKEND_URL || 'http://127.0.0.1:8096' // 后端接口
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||
const port = process.env.port || process.env.npm_config_port || 1024 // 端口
|
||||
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
@@ -32,7 +32,7 @@ module.exports = {
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
open: true,
|
||||
open: false,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询住宿安排列表
|
||||
export function listAccommodation(query) {
|
||||
return request({
|
||||
url: '/train/accommodation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取住宿安排详细信息
|
||||
export function getAccommodation(accommodationId) {
|
||||
return request({
|
||||
url: '/train/accommodation/' + accommodationId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取学员当前住宿安排
|
||||
export function getActiveAccommodation(enrollmentId) {
|
||||
return request({
|
||||
url: '/train/accommodation/enrollment/' + enrollmentId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取学员历史住宿记录
|
||||
export function getAccommodationHistory(enrollmentId) {
|
||||
return request({
|
||||
url: '/train/accommodation/enrollment/' + enrollmentId + '/history',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增住宿分配
|
||||
export function addAccommodation(data) {
|
||||
return request({
|
||||
url: '/train/accommodation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 办理入住
|
||||
export function checkInAccommodation(accommodationId) {
|
||||
return request({
|
||||
url: '/train/accommodation/' + accommodationId + '/checkin',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 办理退宿
|
||||
export function checkOutAccommodation(accommodationId) {
|
||||
return request({
|
||||
url: '/train/accommodation/' + accommodationId + '/checkout',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 办理调房
|
||||
export function transferAccommodation(accommodationId, newDormId, newBedNo) {
|
||||
return request({
|
||||
url: '/train/accommodation/' + accommodationId + '/transfer',
|
||||
method: 'post',
|
||||
params: {
|
||||
newDormId: newDormId,
|
||||
newBedNo: newBedNo
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -97,6 +97,25 @@ export const constantRoutes = [
|
||||
meta: { title: '个人中心', icon: 'user' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/train',
|
||||
component: Layout,
|
||||
redirect: '/train/auth',
|
||||
children: [
|
||||
{
|
||||
path: 'auth',
|
||||
component: () => import('@/views/train/auth/index'),
|
||||
name: 'DoorAuth',
|
||||
meta: { title: '门禁授权', icon: 'lock' }
|
||||
},
|
||||
{
|
||||
path: 'accommodation',
|
||||
component: () => import('@/views/train/accommodation/index'),
|
||||
name: 'TrainAccommodation',
|
||||
meta: { title: '住宿管理', icon: 'home' }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="code" v-if="captchaEnabled">
|
||||
<el-form-item prop="code" v-if="captchaEnabled">
|
||||
<el-input
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
||||
</div>
|
||||
</el-form-item>-->
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button
|
||||
@@ -83,8 +83,8 @@ export default {
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: 'blur', message: '请输入您的密码' }
|
||||
]
|
||||
/* code: [{ required: true, trigger: "change", message: "请输入验证码" }]*/
|
||||
],
|
||||
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
@@ -123,7 +123,9 @@ export default {
|
||||
this.loginForm = {
|
||||
username: username === undefined ? this.loginForm.username : username,
|
||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe),
|
||||
code: '',
|
||||
uuid: this.loginForm.uuid || ''
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="72px">
|
||||
<el-form-item label="学员学号" prop="studentId">
|
||||
<el-input
|
||||
v-model="queryParams.studentId"
|
||||
placeholder="请输入学号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="宿舍楼栋" prop="dormBuilding">
|
||||
<el-input
|
||||
v-model="queryParams.dormBuilding"
|
||||
placeholder="请输入楼栋"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="房间号" prop="dormRoom">
|
||||
<el-input
|
||||
v-model="queryParams.dormRoom"
|
||||
placeholder="请输入房间号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="住宿状态" prop="accommodationStatus">
|
||||
<el-select v-model="queryParams.accommodationStatus" placeholder="全部状态" clearable>
|
||||
<el-option label="预分配 (PRE_ASSIGNED)" :value="0" />
|
||||
<el-option label="在住/已入住 (ACTIVE)" :value="1" />
|
||||
<el-option label="已退宿 (CHECKED_OUT)" :value="2" />
|
||||
<el-option label="已调房 (TRANSFERRED)" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['train:accommodation:add']"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>分配住宿</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="accommodationList">
|
||||
<el-table-column label="住宿ID" align="center" prop="accommodationId" width="80" />
|
||||
<el-table-column label="报名编号" align="center" prop="enrollmentId" width="90" />
|
||||
<el-table-column label="学员姓名" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.studentName || scope.row.studentId || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="学员学号" align="center" prop="studentId" width="120" />
|
||||
<el-table-column label="宿舍楼栋" align="center" prop="dormBuilding" width="100" />
|
||||
<el-table-column label="房间号" align="center" prop="dormRoom" width="90" />
|
||||
<el-table-column label="床位号" align="center" prop="bedNo" width="80" />
|
||||
<el-table-column label="住宿状态" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.accommodationStatus === 1" type="success" size="small">在住 (ACTIVE)</el-tag>
|
||||
<el-tag v-else-if="scope.row.accommodationStatus === 0" type="info" size="small">预分配</el-tag>
|
||||
<el-tag v-else-if="scope.row.accommodationStatus === 2" type="danger" size="small">已退宿</el-tag>
|
||||
<el-tag v-else-if="scope.row.accommodationStatus === 3" type="warning" size="small">已调房</el-tag>
|
||||
<el-tag v-else size="small">{{ scope.row.accommodationStatus }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入住时间" align="center" prop="checkInTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkInTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退宿时间" align="center" prop="checkOutTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkOutTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.accommodationStatus === 0"
|
||||
v-hasPermi="['train:accommodation:edit']"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-check"
|
||||
@click="handleCheckIn(scope.row)"
|
||||
>入住</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.accommodationStatus === 1"
|
||||
v-hasPermi="['train:accommodation:edit']"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-sort"
|
||||
@click="handleOpenTransfer(scope.row)"
|
||||
>调房</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.accommodationStatus === 1"
|
||||
v-hasPermi="['train:accommodation:edit']"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
style="color: #F56C6C;"
|
||||
@click="handleCheckOut(scope.row)"
|
||||
>退宿</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
@click="handleViewHistory(scope.row)"
|
||||
>住宿履历</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 办理调房对话框 -->
|
||||
<el-dialog title="办理学员调房 (Room Transfer)" :visible.sync="transferOpen" width="500px" append-to-body>
|
||||
<el-form ref="transferForm" :model="transferData" :rules="transferRules" label-width="100px">
|
||||
<el-form-item label="当前学员">
|
||||
<span>{{ currentRecord.studentName || currentRecord.studentId }} ({{ currentRecord.dormBuilding }} {{ currentRecord.dormRoom }} {{ currentRecord.bedNo }}床)</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标宿舍" prop="newDormId">
|
||||
<el-select v-model="transferData.newDormId" placeholder="请选择目标宿舍" filterable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="d in dormOptions"
|
||||
:key="d.dormId"
|
||||
:label="d.dormBuilding + ' ' + d.dormRoom + ' (余位:' + (d.remainingBeds != null ? d.remainingBeds : d.capacity) + ')'"
|
||||
:value="d.dormId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="新床位号" prop="newBedNo">
|
||||
<el-input v-model="transferData.newBedNo" placeholder="请输入新床位号,如 1号床" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" id="btnSubmitTransfer" @click="submitTransfer">确认调房</el-button>
|
||||
<el-button @click="transferOpen = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 历史住宿履历对话框 -->
|
||||
<el-dialog title="学员历史住宿履历 (Accommodation History)" :visible.sync="historyOpen" width="750px" append-to-body>
|
||||
<el-alert
|
||||
title="住宿履历审计说明:系统保证同一学员在同一报名生命周期内仅存在至多一个生效中 (ACTIVE) 的住宿安排。"
|
||||
type="info"
|
||||
:closable="false"
|
||||
show-icon
|
||||
style="margin-bottom: 15px;"
|
||||
/>
|
||||
<el-table v-loading="historyLoading" :data="historyList" size="small" border empty-text="暂无历史住宿记录">
|
||||
<el-table-column label="记录ID" prop="accommodationId" width="70" align="center" />
|
||||
<el-table-column label="宿舍房间" align="center" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.dormBuilding }} {{ scope.row.dormRoom }} ({{ scope.row.bedNo }}床)</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="住宿状态" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.accommodationStatus === 1" type="success" size="mini">当前在住 (ACTIVE)</el-tag>
|
||||
<el-tag v-else-if="scope.row.accommodationStatus === 2" type="danger" size="mini">已退宿</el-tag>
|
||||
<el-tag v-else-if="scope.row.accommodationStatus === 3" type="warning" size="mini">已调房</el-tag>
|
||||
<el-tag v-else size="mini">{{ scope.row.accommodationStatus }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入住时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkInTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退宿/调离时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.checkOutTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="historyOpen = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAccommodation, checkInAccommodation, checkOutAccommodation, transferAccommodation, getAccommodationHistory } from '@/api/train/accommodation'
|
||||
import { listDormitory } from '@/api/train/dormitory'
|
||||
|
||||
export default {
|
||||
name: 'Accommodation',
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
accommodationList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
studentId: null,
|
||||
dormBuilding: null,
|
||||
dormRoom: null,
|
||||
accommodationStatus: null
|
||||
},
|
||||
currentRecord: {},
|
||||
transferOpen: false,
|
||||
transferData: {
|
||||
newDormId: null,
|
||||
newBedNo: '1号床'
|
||||
},
|
||||
transferRules: {
|
||||
newDormId: [{ required: true, message: '请选择目标宿舍', trigger: 'change' }],
|
||||
newBedNo: [{ required: true, message: '请输入新床位号', trigger: 'blur' }]
|
||||
},
|
||||
dormOptions: [],
|
||||
historyOpen: false,
|
||||
historyLoading: false,
|
||||
historyList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.loadDorms()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listAccommodation(this.queryParams).then(response => {
|
||||
this.accommodationList = response.rows || []
|
||||
this.total = response.total || 0
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
loadDorms() {
|
||||
listDormitory({ pageNum: 1, pageSize: 50 }).then(res => {
|
||||
this.dormOptions = res.rows || []
|
||||
})
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
handleAdd() {
|
||||
this.$modal.msgInfo('请在学员管理或报名名单中点击“住宿安排”办理分配')
|
||||
},
|
||||
handleCheckIn(row) {
|
||||
this.$modal.confirm('确认办理学员 [' + (row.studentName || row.studentId) + '] 的入住手续?').then(() => {
|
||||
return checkInAccommodation(row.accommodationId)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('入住办理成功')
|
||||
this.getList()
|
||||
}).catch(() => {})
|
||||
},
|
||||
handleCheckOut(row) {
|
||||
this.$modal.confirm('确认办理学员 [' + (row.studentName || row.studentId) + '] 的退宿手续?').then(() => {
|
||||
return checkOutAccommodation(row.accommodationId)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('退宿办理成功')
|
||||
this.getList()
|
||||
}).catch(() => {})
|
||||
},
|
||||
handleOpenTransfer(row) {
|
||||
this.currentRecord = row
|
||||
this.transferData.newDormId = null
|
||||
this.transferData.newBedNo = '2号床'
|
||||
this.transferOpen = true
|
||||
},
|
||||
submitTransfer() {
|
||||
this.$refs.transferForm.validate(valid => {
|
||||
if (valid) {
|
||||
transferAccommodation(this.currentRecord.accommodationId, this.transferData.newDormId, this.transferData.newBedNo).then(() => {
|
||||
this.$modal.msgSuccess('调房办理成功')
|
||||
this.transferOpen = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleViewHistory(row) {
|
||||
this.historyOpen = true
|
||||
this.historyLoading = true
|
||||
getAccommodationHistory(row.enrollmentId).then(res => {
|
||||
this.historyList = res.data || []
|
||||
this.historyLoading = false
|
||||
}).catch(() => {
|
||||
this.historyLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+3
-10
@@ -14,7 +14,7 @@ function resolve(dir) {
|
||||
|
||||
const name = process.env.VUE_APP_TITLE || 'SYFJGYD学员管理系统' // 网页标题
|
||||
|
||||
const port = process.env.port || process.env.npm_config_port || 8080 // 端口
|
||||
const port = process.env.port || process.env.npm_config_port || 1024 // 端口
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
// vue.config.js 配置说明
|
||||
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
|
||||
@@ -37,18 +37,11 @@ module.exports = {
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: port,
|
||||
open: true,
|
||||
open: false,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
//target: `http://192.168.125.228:8329`,
|
||||
//target: `http://192.168.125.108:8329`,
|
||||
//target: `http://localhost:8329`,
|
||||
//target: `http://10.1.191.245:8085`, //changchun
|
||||
//target: `http://22.89.215.76:8085`, //changchun weburl
|
||||
//target: `http://22.89.215.76:8085`,
|
||||
target: `http://localhost:8090`,
|
||||
//target: `http://121.196.246.126:38085`,
|
||||
target: process.env.VUE_APP_BACKEND_URL || 'http://127.0.0.1:8096',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Reference in new issue
Block a user