11
This commit is contained in:
@ -4,7 +4,7 @@ COPY build /usr/share/nginx/html
|
|||||||
COPY deploy/entrypoint.sh /entrypoint.sh
|
COPY deploy/entrypoint.sh /entrypoint.sh
|
||||||
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
ENV BACKEND_ADDRESS="http://localhost:31000"
|
ENV BACKEND_ADDRESS="http://43.138.83.20:10001"
|
||||||
ENV BACKEND_TIMEOUT=10000
|
ENV BACKEND_TIMEOUT=10000
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|||||||
@ -9,7 +9,7 @@ In the project directory, you can run:
|
|||||||
### `npm start`
|
### `npm start`
|
||||||
|
|
||||||
Runs the app in the development mode.\
|
Runs the app in the development mode.\
|
||||||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
|
Open [http://43.138.83.20:3000](http://43.138.83.20:3000) to view it in your browser.
|
||||||
|
|
||||||
The page will reload when you make changes.\
|
The page will reload when you make changes.\
|
||||||
You may also see any lint errors in the console.
|
You may also see any lint errors in the console.
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
window.BACKEND_ADDRESS = "http://localhost:31000";
|
window.BACKEND_ADDRESS = "http://localhost:8080";
|
||||||
window.BACKEND_TIMEOUT = 10000;
|
window.BACKEND_TIMEOUT = 10000;
|
||||||
@ -2,8 +2,8 @@ import axios from 'axios';
|
|||||||
import baseWebConfig from "../config/BaseWebConfig";
|
import baseWebConfig from "../config/BaseWebConfig";
|
||||||
|
|
||||||
const authorizeAxios = axios.create({
|
const authorizeAxios = axios.create({
|
||||||
baseURL: window.BACKEND_ADDRESS || baseWebConfig.baseUrl,
|
baseURL: baseWebConfig.baseUrl,
|
||||||
timeout: window.BACKEND_TIMEOUT || baseWebConfig.timeout,
|
timeout: baseWebConfig.timeout,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 传入messageApi
|
// 传入messageApi
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import baseWebConfig from "../config/BaseWebConfig";
|
|||||||
|
|
||||||
const creatMessageCommonAxios = (messageApi) => {
|
const creatMessageCommonAxios = (messageApi) => {
|
||||||
const instance = axios.create({
|
const instance = axios.create({
|
||||||
baseURL: window.BACKEND_ADDRESS || baseWebConfig.baseUrl,
|
baseURL: baseWebConfig.baseUrl,
|
||||||
timeout: window.BACKEND_TIMEOUT || baseWebConfig.timeout,
|
timeout: baseWebConfig.timeout,
|
||||||
});
|
});
|
||||||
|
|
||||||
const defaultResponse = {
|
const defaultResponse = {
|
||||||
|
|||||||
BIN
src/menu.zip
Normal file
BIN
src/menu.zip
Normal file
Binary file not shown.
@ -6,7 +6,9 @@ import {
|
|||||||
MonitorOutlined,
|
MonitorOutlined,
|
||||||
ReconciliationOutlined,
|
ReconciliationOutlined,
|
||||||
UsergroupAddOutlined,
|
UsergroupAddOutlined,
|
||||||
UserSwitchOutlined
|
UserSwitchOutlined,
|
||||||
|
NotificationOutlined,
|
||||||
|
SettingOutlined
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {NavLink} from "react-router-dom";
|
import {NavLink} from "react-router-dom";
|
||||||
@ -44,21 +46,21 @@ const DashboardMenuItems = [
|
|||||||
icon: <UserSwitchOutlined/>,
|
icon: <UserSwitchOutlined/>,
|
||||||
label: <NavLink to={'/user-management'}>用户管理</NavLink>
|
label: <NavLink to={'/user-management'}>用户管理</NavLink>
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// key: `announcement-management`,
|
|
||||||
// icon: <NotificationOutlined/>,
|
|
||||||
// label: `公告管理`,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
key: `/data-maintenance`,
|
key: `/data-maintenance`,
|
||||||
icon: <DatabaseOutlined/>,
|
icon: <DatabaseOutlined/>,
|
||||||
label: <NavLink to={'/data-maintenance'}>数据维护</NavLink>
|
label: <NavLink to={'/data-maintenance'}>数据维护</NavLink>
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// key: `settings`,
|
key: `/generate-certificate`,
|
||||||
// icon: <SettingOutlined/>,
|
icon: <NotificationOutlined/>,
|
||||||
// label: <NavLink to={'/system-settings'}>系统设置</NavLink>
|
label: <NavLink to={'/generate-certificate'}>证书生成</NavLink>
|
||||||
// }
|
},
|
||||||
|
{
|
||||||
|
key: `settings`,
|
||||||
|
icon: <SettingOutlined/>,
|
||||||
|
label: <NavLink to={'/system-settings'}>系统设置</NavLink>
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -89,7 +89,7 @@ function Login(props) {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Input id='username-input'
|
<Input id='username-input'
|
||||||
placeholder="请输入用户名"
|
placeholder="请输入教师工号"
|
||||||
prefix={<UserOutlined/>}
|
prefix={<UserOutlined/>}
|
||||||
size={"large"}
|
size={"large"}
|
||||||
style={{marginBottom: '20px'}}
|
style={{marginBottom: '20px'}}
|
||||||
@ -116,9 +116,9 @@ function Login(props) {
|
|||||||
<Footer style={{background: 'rgba(0,0,0,0)'}}>
|
<Footer style={{background: 'rgba(0,0,0,0)'}}>
|
||||||
<Flex vertical justify={'center'} align={'center'} wrap={"wrap"}>
|
<Flex vertical justify={'center'} align={'center'} wrap={"wrap"}>
|
||||||
<Typography.Text type={"secondary"}>Powered by ©2023
|
<Typography.Text type={"secondary"}>Powered by ©2023
|
||||||
- {new Date().getFullYear()} SimRobot Studio</Typography.Text>
|
- {new Date().getFullYear()}来自哈师大教务处</Typography.Text>
|
||||||
<Typography.Text type={"secondary"}>SimRobot Studio
|
<Typography.Text type={"secondary"}>
|
||||||
来自哈尔滨师范大学计算机科学与信息工程学院软件工程系</Typography.Text>
|
</Typography.Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Footer>
|
</Footer>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
BIN
src/page/Dashboard/DataCheck.zip
Normal file
BIN
src/page/Dashboard/DataCheck.zip
Normal file
Binary file not shown.
@ -9,7 +9,7 @@ const CardAction = (record, messageApi, navigator) => {
|
|||||||
const commonAxios = creatMessageCommonAxios(messageApi);
|
const commonAxios = creatMessageCommonAxios(messageApi);
|
||||||
|
|
||||||
const downloadRecord = (recordId) => {
|
const downloadRecord = (recordId) => {
|
||||||
let baseUrl = window.BACKEND_ADDRESS || baseWebConfig.baseUrl
|
let baseUrl = baseWebConfig.baseUrl
|
||||||
commonAxios.get(`${baseUrl}/api/v1/workload/certificate/download/${recordId}`, {responseType: 'blob'}).then((response) => {
|
commonAxios.get(`${baseUrl}/api/v1/workload/certificate/download/${recordId}`, {responseType: 'blob'}).then((response) => {
|
||||||
if (response.data.type === 'application/json') {
|
if (response.data.type === 'application/json') {
|
||||||
messageApi.error('证明已失效 (GENERATE_CERTIFICATE_ERROR_007)');
|
messageApi.error('证明已失效 (GENERATE_CERTIFICATE_ERROR_007)');
|
||||||
|
|||||||
@ -13,7 +13,7 @@ const AddUserDrawer = props => {
|
|||||||
};
|
};
|
||||||
const fileUploadProps = {
|
const fileUploadProps = {
|
||||||
name: 'file',
|
name: 'file',
|
||||||
action: window.BACKEND_ADDRESS || baseWebConfig.baseUrl + '/api/v1/teacher/import',
|
action: baseWebConfig.baseUrl + '/api/v1/teacher/import',
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Bearer ${localStorage.getItem('token') || ''}`,
|
authorization: `Bearer ${localStorage.getItem('token') || ''}`,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -34,10 +34,12 @@ const DashboardRoutes = {
|
|||||||
path: 'data-maintenance',
|
path: 'data-maintenance',
|
||||||
element: <DataManager/>
|
element: <DataManager/>
|
||||||
},
|
},
|
||||||
|
//未找到
|
||||||
{
|
{
|
||||||
path: 'system-settings',
|
path: 'system-settings',
|
||||||
element: <SystemSettings/>
|
element: <SystemSettings/>
|
||||||
},
|
},
|
||||||
|
//未找到
|
||||||
{
|
{
|
||||||
path: 'generate-certificate',
|
path: 'generate-certificate',
|
||||||
element: <GenerateCertificate />
|
element: <GenerateCertificate />
|
||||||
@ -46,10 +48,10 @@ const DashboardRoutes = {
|
|||||||
path: 'user-management',
|
path: 'user-management',
|
||||||
element: <UserManagement/>
|
element: <UserManagement/>
|
||||||
},
|
},
|
||||||
{
|
//{
|
||||||
path: 'about-us',
|
// path: 'about-us',
|
||||||
element: <AboutUs/>
|
// element: <AboutUs/>
|
||||||
},
|
//},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user