巴林闲侠 2 years ago
parent
commit
746c203aeb
  1. 67
      .vscode/launch.json
  2. 3
      web/client/index.ejs
  3. 3
      web/client/index.html
  4. 2
      web/client/src/app.jsx
  5. 14
      web/client/src/sections/humanAffairs/actions/service.js
  6. 3
      web/client/src/sections/humanAffairs/containers/index.js
  7. 1
      web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
  8. 410
      web/client/src/sections/humanAffairs/containers/weeklyManagement.jsx
  9. 16
      web/client/src/sections/humanAffairs/nav-item.jsx
  10. 12
      web/client/src/sections/humanAffairs/routes.js
  11. 1
      web/client/src/utils/webapi.js
  12. 8
      web/config.js
  13. 4
      web/package.json
  14. 18
      web/routes/services/weekly.js

67
.vscode/launch.json

@ -0,0 +1,67 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "启动 API",
"program": "${workspaceRoot}/api/server.js",
"env": {
"NODE_ENV": "development"
},
"args": [
"-p 4700",
"-f http://localhost:4700",
//
"-g postgres://postgres:123@10.8.30.166:5432/hr-dev",
"--redisHost 10.8.30.112",
"--redisPort 6379",
// "--apiEmisUrl http://10.8.30.112:14000",
//
"--apiEmisUrl http://10.8.30.161:1111",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",
"--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa",
"--qnbkt dev-hr",
// "--qndmn http://resources.anxinyun.cn",
"--qndmn http://rjkwed13l.hn-bkt.clouddn.com",
// * 2
// "--clickHouseUser ",
// "--clickHousePassword ",
"--clickHousePort 30123",
//
// "--clickHouseUrl http://10.8.30.71",
// "--clickHousePepEmis pepca_dev",
// "--clickHouseCamworkflow camworkflow",
// "--clickHouseHr hr_dev",
//
"--clickHouseUrl http://10.8.30.161",
"--clickHousePepEmis pepca8",
"--clickHouseCamworkflow camworkflow",
"--clickHouseHr hrm",
]
},
{
"type": "node",
"request": "launch",
"name": "run mocha",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": [
"app/test/*.test.js",
"--no-timeouts"
],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"NODE_ENV": "development"
}
}
]
}

3
web/client/index.ejs

@ -9,7 +9,8 @@
<!-- <link rel="shortcut icon" href="/assets/images/favicon.ico"> --> <!-- <link rel="shortcut icon" href="/assets/images/favicon.ico"> -->
<script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_20231_3.d613c57d3bf10acf9916c8162dae204a.es5.js"></script> <script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_20231_4.a82ed651163d1db5bc9208ca2d929534.es5.js"></script>
</head> </head>
<body> <body>

3
web/client/index.html

@ -7,8 +7,7 @@
<!-- <link rel="shortcut icon" href="/assets/images/favicon.ico"> --> <!-- <link rel="shortcut icon" href="/assets/images/favicon.ico"> -->
<script <script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_20231_4.a82ed651163d1db5bc9208ca2d929534.es5.js"></script>
src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_20231_3.d613c57d3bf10acf9916c8162dae204a.es5.js"></script>
</head> </head>
<body> <body>

2
web/client/src/app.jsx

@ -14,7 +14,7 @@ const App = props => {
document.title = projectName; document.title = projectName;
console.log(` console.log(`
_ _ _ _------
                   
      |  _  _ l       |  _  _ l
      \` ミ_xノ       \` ミ_xノ

14
web/client/src/sections/humanAffairs/actions/service.js

@ -0,0 +1,14 @@
'use strict';
import { RouteTable, RouteRequest } from '$utils'
export function getServiceUrl() {
return dispatch => {
return RouteRequest.get(RouteTable.getWeeklyService)
.then(res => {
return dispatch({
type: "SERVER_WEEKLY_URL",
payload: res
})
});
}
}

3
web/client/src/sections/humanAffairs/containers/index.js

@ -3,8 +3,9 @@
import PersonnelFiles from './personnelFiles'; import PersonnelFiles from './personnelFiles';
import PersonnelFilesDetail from './personnelFilesDetail'; import PersonnelFilesDetail from './personnelFilesDetail';
import EmployeeInformation from './employeeInformation'; import EmployeeInformation from './employeeInformation';
import WeeklyManagement from './weeklyManagement';
import LeaveStatistics from './leaveStatistics'; import LeaveStatistics from './leaveStatistics';
import OvertimeStatistics from './overtimeStatistics'; import OvertimeStatistics from './overtimeStatistics';
export { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, LeaveStatistics,OvertimeStatistics }; export { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, WeeklyManagement, LeaveStatistics, OvertimeStatistics };

1
web/client/src/sections/humanAffairs/containers/personnelFiles.jsx

@ -25,6 +25,7 @@ const Rest = (props) => {
vacate: '请假', vacate: '请假',
inOffice: '在岗', inOffice: '在岗',
dayoff: '放假', dayoff: '放假',
rest: '休息中',
} }
let [typeChoose, setTypeChoose] = useState(''); let [typeChoose, setTypeChoose] = useState('');
useEffect(() => { useEffect(() => {

410
web/client/src/sections/humanAffairs/containers/weeklyManagement.jsx

@ -0,0 +1,410 @@
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { connect } from 'react-redux';
import { Table, Button, Pagination, Skeleton, Form, Tooltip, Banner } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import { SkeletonScreen } from "$components";
import '../style.less'
import { Setup } from "$components";
import moment from 'moment'
import { getServiceUrl } from '../actions/service';
const WeeklyManagement = (props) => {
const { dispatch, actions, history, user, loading, socket, xqMembers } = props;
const form = useRef();//
const [setup, setSetup] = useState(false);//
const [setupp, setSetupp] = useState([]);//
const [lookup, setLookup] = useState({});//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [order, setOrder] = useState({ orderBy: 'hiredate', orderDirection: 'DESC' }); //
const [limits, setLimits] = useState(0)//
const [downloadUrl, setDownloadUrl] = useState('')//pdf;
const [warningBanner, setWarningBanner] = useState(null);
const WEEKLYMANAGEMENT = "weeklyManagement";
const page = useRef(query.page);//
let btnDisable = false;
const tableList = [//
{
title: '基础信息',
list: [
{ name: "姓名", value: "userName" },
{ name: "所属部门", value: "departmrnt" },
{ name: "职位", value: "roleName" },
{ name: "应提交次数", value: "idNumber" },
{ name: "实际提交次述", value: "number" },
{ name: "延期次数", value: "yqNumber" },
{ name: "未提交次数", value: "noNumber" },
{ name: "未及时审批次数", value: "noAuditNumber" },
{ name: "审批人", value: "auditUser" },
{ name: "操作", value: "action" }
]
}
];
useEffect(() => {
localStorage.getItem(WEEKLYMANAGEMENT) == null
? localStorage.setItem(
WEEKLYMANAGEMENT,
JSON.stringify(['userName', 'departmrnt', 'roleName', 'idNumber', 'number', 'yqNumber', 'noNumber', 'noAuditNumber', 'auditUser',
'action'])
)
: "";
attribute();
}, [])
useEffect(() => {
if (form && form.current && form.current.setValue) {
form.current.setValue("weeklyRange", [moment().startOf('isoWeek').format('YYYY-MM-DD'), moment().endOf('isoWeek').format('YYYY-MM-DD')])
}
}, [])
const columns = [
{
title: (
<span>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 员工编号
</span>
),
width: 200,
dataIndex: "userCode",
key: "userCode",
sorter: (a, b) => { },
// sorter: (a, b) => a.name.length - b.name.length > 0 ? 1 : -1,
render: (_, r, index) => {
return (r.userCode ? r.userCode : '-');
},
},
];
//
function attribute() {
const arr = localStorage.getItem(WEEKLYMANAGEMENT)
? JSON.parse(localStorage.getItem(WEEKLYMANAGEMENT))
: [];
const column = [
{
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 姓名
</div>
),
dataIndex: "userName",
key: "userName",
render: (_, r, index) => {
return (r.userName ? r.userName : '-');
},
}, {
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 所属部门
</div>
),
dataIndex: "departmrnt",
key: "departmrnt",
render: (_, r, index) => {
return (
<div style={{ display: 'flex' }}>
{
r.departmrnt.map((ite, idx) => {
let departmentsArr = []
for (let i = 0; i < r.departmrnt.length; i++) {
departmentsArr.push(r.departmrnt[i].name)
}
return (
<div key={idx} style={{ display: 'flex' }}>
{idx == 0 ?
(<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4 }}>
{ite.name}
</div>) : ('')
}
{
r.departmrnt.length > 1 && idx == 1 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{r.departmrnt.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>
)
},
}, {
title: (
<div>
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} /> 职位
</div>
),
dataIndex: "roleName",
key: "roleName",
render: (_, r, index) => {
return (
<div style={{ display: 'flex', alignItems: 'center' }}>
{
r.role.map((ite, idx) => {
let roleArr = []
for (let i = 0; i < r.role.length; i++) {
roleArr.push(r.role[i].name)
}
return (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ?
(ite.name) : ('')
}
{
r.role.length > 1 && idx == 1 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{r.role.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>);
},
}, {
title: '应提交次数',
dataIndex: "idNumber",
key: "idNumber",
render: (_, r, index) => {
return (r.idNumber ? r.idNumber : '-');
},
}, {
title: '实际提交次述',
dataIndex: "number",
key: "number",
render: (_, r, index) => {
return (r.gender ? r.gender : '-');
},
}, {
title: '延期次数',
dataIndex: "yqNumber",
key: "yqNumber",
render: (_, r, index) => {
return (r.nativePlace ? r.nativePlace : '-');
},
}, {
title: '未提交次数',
dataIndex: "noNumber",
key: "noNumber",
render: (_, r, index) => {
return (r.birthday ? r.birthday : '-');
},
}, {
title: '未及时审批次数',
dataIndex: "noAuditNumber",
key: "noAuditNumber",
render: (_, r, index) => {
return (r.marital ? r.marital : '-');
},
}, {
title: '审批人',
dataIndex: "auditUser",
key: "auditUser",
render: (_, r, index) => {
return (r.politicsStatus ? r.politicsStatus : '-');
},
}, {
title: '操作',
dataIndex: "action",
key: "action",
render: (_, r, index) => {
return (r.vitae ? <a href={`/_file-server/${r.vitae}`} style={{ color: '#005ABD' }}>下载</a> : '-')
},
},
];
for (let i = 0; i < arr.length; i++) {
let colum = column.filter((item) => {
return item.key === arr[i];
});
columns.splice(i + 2, 0, colum[0]);
}
setSetupp(columns);
}
function handleRow(record, index) {//
//
if (index % 2 === 0) {
return {
style: {
background: '#FAFCFF',
}
};
} else {
return {};
}
}
const scroll = useMemo(() => ({}), []);
return (
<>
<div style={{ padding: '0px 12px' }}>
<div style={{ display: 'flex' }}>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>人事管理</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>基本动作</div>
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>周报管理</div>
</div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'baseline' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>周报管理</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>WEEKLY MANAGEMENT</div>
</div>
</div>
<div style={{ marginRight: 20, marginTop: 18 }}>
<Form
labelPosition="left"
labelAlign="right"
labelWidth="80px"
getFormApi={(formApi) => (form.current = formApi)}
>
<div>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Form.DatePicker
label='查询时间:'
field='weeklyRange' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} />
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15 }}
>
{/* <img src="/assets/images/hrImg/export.png" alt="" style={{ width: '100%', height: '100%' }} /> */}
{
downloadUrl ? <iframe src={`/_api/${downloadUrl}`} style={{ display: 'none' }} /> : ''
}
</div>
<img src="/assets/images/hrImg/newsetup.png" alt="" style={{ width: 20, height: 20, cursor: "pointer", marginRight: 15 }}
onClick={() => setSetup(true)}
/>
<Button theme='solid'
type='primary'
style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
// disable={btnDisable}
onClick={() => {
const weeklyRange = form.current.getValue("weeklyRange");
if (weeklyRange && weeklyRange.length == 2) {
dispatch(getServiceUrl()).then(res => {
const { payload } = res;
if (payload && payload.url) {
let url = `${payload.url}/week_report/week`;
if (weeklyRange && weeklyRange.length == 2) {
url += `?start=${moment(weeklyRange[0]).format('YYYY-MM-DD HH:mm:ss')}&end=${moment(weeklyRange[1]).format('YYYY-MM-DD HH:mm:ss')}`
}
console.log(url);
setDownloadUrl(url);
} else {
setWarningBanner("导出地址有误,导出失败");
}
})
} else {
setWarningBanner("请选择查询时间范围");
}
}}>导出</Button>
</div>
</div>
</div>
</Form>
{
warningBanner &&
(<Banner
type="danger"
description={warningBanner}
onClose={() => setWarningBanner(null)}
/>)}
<div style={{ border: '1px solid #C7E1FF', background: '#F4F8FF', borderRadius: 2, height: 32, width: 669, padding: '8px 0px 7px 12px', display: 'flex', alignItems: 'center', color: '#0F7EFB', fontSize: 12 }}>
<img src="/assets/images/hrImg/!.png" alt="" style={{ width: 14, height: 14, marginRight: 8 }} />
表格中带有认证标识"
<img src="/assets/images/hrImg/V.png" alt="" style={{ width: 14, height: 14 }} />
"信息的为系统基础数据来源于项企PEP系统不支持修改和导入变更
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
// loading={loading}
loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
columns={setupp.filter((s) => s)}
dataSource={[]}
bordered={false}
empty="暂无数据"
pagination={false}
onRow={handleRow}
scroll={scroll}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "space-between",
padding: "20px 20px",
}}
>
<div>
</div>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条信息
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.page + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
}}
/>
</div>
</div>
</div>
</div>
</div>
</div>
{setup ? (
<Setup
tableType={WEEKLYMANAGEMENT}
tableList={tableList}
length={10}
close={() => {
setSetup(false);
attribute();
}}
/>
) : (
""
)}
</>
)
}
function mapStateToProps(state) {
const { auth, global, MemberSearch, webSocket } = state;
return {
// loading: members.isRequesting,
user: auth.user,
actions: global.actions,
xqMembers: MemberSearch.data,
// socket: webSocket.socket
};
}
export default connect(mapStateToProps)(WeeklyManagement);

16
web/client/src/sections/humanAffairs/nav-item.jsx

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { IconCode } from '@douyinfe/semi-icons'; import { IconCode } from '@douyinfe/semi-icons';
export function getNavItem (user, dispatch) { export function getNavItem(user, dispatch) {
return ( return (
[ [
{ {
@ -17,7 +17,7 @@ export function getNavItem (user, dispatch) {
items: [{ items: [{
itemKey: 'personnelFiles', to: '/humanAffairs/archivesCenter/personnelFiles', text: '人员档案' itemKey: 'personnelFiles', to: '/humanAffairs/archivesCenter/personnelFiles', text: '人员档案'
}] }]
},{ }, {
itemKey: 'employeeRelations', itemKey: 'employeeRelations',
text: '员工关系', text: '员工关系',
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="iconcbyuangongguanxi"></iconpark-icon>, icon: <iconpark-icon style={{ width: 20, height: 20 }} name="iconcbyuangongguanxi"></iconpark-icon>,
@ -25,14 +25,22 @@ export function getNavItem (user, dispatch) {
items: [{ items: [{
itemKey: 'employeeInformation', to: '/humanAffairs/employeeRelations/employeeInformation', text: '员工信息' itemKey: 'employeeInformation', to: '/humanAffairs/employeeRelations/employeeInformation', text: '员工信息'
}] }]
},{ }, {
itemKey: 'basicAction',
text: '基本动作',
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="iconcbjiben"></iconpark-icon>,
to: '/humanAffairs/basicAction/weeklyManagement',
items: [{
itemKey: 'weeklyManagement', to: '/humanAffairs/basicAction/weeklyManagement', text: '周报管理'
}]
}, {
itemKey: 'leaveManagement', itemKey: 'leaveManagement',
text: '假勤管理', text: '假勤管理',
icon: <iconpark-icon style={{ width: 20, height: 20 }} name="iconcbjiaqinguanli"></iconpark-icon>, icon: <iconpark-icon style={{ width: 20, height: 20 }} name="iconcbjiaqinguanli"></iconpark-icon>,
to: '/humanAffairs/leaveManagement/leaveStatistics', to: '/humanAffairs/leaveManagement/leaveStatistics',
items: [{ items: [{
itemKey: 'leaveStatistics', to: '/humanAffairs/leaveManagement/leaveStatistics', text: '请假统计' itemKey: 'leaveStatistics', to: '/humanAffairs/leaveManagement/leaveStatistics', text: '请假统计'
},{ }, {
itemKey: 'overtimeStatistics', to: '/humanAffairs/leaveManagement/overtimeStatistics', text: '加班统计' itemKey: 'overtimeStatistics', to: '/humanAffairs/leaveManagement/overtimeStatistics', text: '加班统计'
}] }]
}, },

12
web/client/src/sections/humanAffairs/routes.js

@ -1,4 +1,4 @@
import { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, LeaveStatistics, OvertimeStatistics } from './containers'; import { PersonnelFiles, PersonnelFilesDetail, EmployeeInformation, WeeklyManagement, LeaveStatistics, OvertimeStatistics } from './containers';
export default [{ export default [{
type: 'inner', type: 'inner',
@ -17,6 +17,16 @@ export default [{
component: PersonnelFiles, component: PersonnelFiles,
breadcrumb: '人员档案', breadcrumb: '人员档案',
}] }]
}, {
path: '/basicAction',
key: 'basicAction',
breadcrumb: '基本动作',
childRoutes: [{
path: '/weeklyManagement',
key: 'weeklyManagement',
component: WeeklyManagement,
breadcrumb: '周报管理',
}]
}, { }, {
path: '/employeeRelations', path: '/employeeRelations',
key: 'employeeRelations', key: 'employeeRelations',

1
web/client/src/utils/webapi.js

@ -36,4 +36,5 @@ export const RouteTable = {
apiRoot: "/api/root", apiRoot: "/api/root",
fileUpload: "/_upload/new", fileUpload: "/_upload/new",
cleanUpUploadTrash: "/_upload/cleanup", cleanUpUploadTrash: "/_upload/cleanup",
getWeeklyService: '/_service/weekly'
}; };

8
web/config.js

@ -20,6 +20,9 @@ args.option('qnsk', 'qiniuSecretKey');
args.option('qnbkt', 'qiniuBucket'); args.option('qnbkt', 'qiniuBucket');
args.option('qndmn', 'qiniuDomain'); args.option('qndmn', 'qiniuDomain');
//基本动作-周报后端服务
args.option('wkys', 'weeklyServices');
const flags = args.parse(process.argv); const flags = args.parse(process.argv);
const API_URL = process.env.API_URL || flags.apiUrl; const API_URL = process.env.API_URL || flags.apiUrl;
@ -30,6 +33,8 @@ const ANXINCLOUD_QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak
const ANXINCLOUD_QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk; const ANXINCLOUD_QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk;
const ANXINCLOUD_QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt; const ANXINCLOUD_QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt;
const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn; const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
//后端服务
const ANXINCLOUD_WEEKLY_SERVICES = process.env.ANXINCLOUD_WEEKLY_SERVICES || flags.wkys; //周报统计服务
if ( if (
@ -72,6 +77,9 @@ const product = {
fetchUrl: '/_file-server', fetchUrl: '/_file-server',
domain: ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE domain: ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE
}, },
service: {
weekly: ANXINCLOUD_WEEKLY_SERVICES
}
} }
}, { }, {
entry: require('./client').entry,// 静态信息 entry: require('./client').entry,// 静态信息

4
web/package.json

@ -7,7 +7,7 @@
"test": "mocha", "test": "mocha",
"start-vite": "cross-env NODE_ENV=developmentVite npm run start-params", "start-vite": "cross-env NODE_ENV=developmentVite npm run start-params",
"start": "cross-env NODE_ENV=development npm run start-params", "start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5700 -u http://localhost:4700 --apiHrUrl http://localhost:4700 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-hr --qndmn http://rjkwed13l.hn-bkt.clouddn.com", "start-params": "node server -p 5700 -u http://localhost:4700 --apiHrUrl http://localhost:4700 --qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5 --qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa --qnbkt dev-hr --qndmn http://rjkwed13l.hn-bkt.clouddn.com --wkys http://10.8.30.109:14000",
"deploy": "export NODE_ENV=production&& npm run build && node server", "deploy": "export NODE_ENV=production&& npm run build && node server",
"build-dev": "cross-env NODE_ENV=development&&webpack --config webpack.config.js", "build-dev": "cross-env NODE_ENV=development&&webpack --config webpack.config.js",
"build": "cross-env NODE_ENV=production&&webpack --config webpack.config.prod.js" "build": "cross-env NODE_ENV=production&&webpack --config webpack.config.prod.js"
@ -28,6 +28,7 @@
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"babel-plugin-import": "^1.13.3", "babel-plugin-import": "^1.13.3",
"connected-react-router": "^6.8.0", "connected-react-router": "^6.8.0",
"cross-env": "^7.0.3",
"css-loader": "^3.5.0", "css-loader": "^3.5.0",
"express": "^4.17.1", "express": "^4.17.1",
"file-loader": "^6.0.0", "file-loader": "^6.0.0",
@ -57,7 +58,6 @@
"args": "^5.0.1", "args": "^5.0.1",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"cross-env": "^7.0.3",
"echarts": "^5.3.3", "echarts": "^5.3.3",
"echarts-for-react": "^3.0.2", "echarts-for-react": "^3.0.2",
"ezuikit-js": "^0.6.1", "ezuikit-js": "^0.6.1",

18
web/routes/services/weekly.js

@ -0,0 +1,18 @@
'use strict';
// const request = require('superagent');
module.exports = {
entry: function (app, router, opts) {
const getWeeklyService = async function (ctx) {
const { service } = opts;
ctx.status = 200;
ctx.body = {
url: service.weekly,
};
};
router.get('/_service/weekly', getWeeklyService);
}
};
Loading…
Cancel
Save