Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
wms
Compare Revisions
master...Iot_wms
Source
Iot_wms
Select Git revision
...
Target
master
Select Git revision
Compare
Commits (7)
jicheng
· 5f64d2dc
krysent
authored
1 year ago
5f64d2dc
集成
· 2c36aea5
krysent
authored
1 year ago
2c36aea5
集成
· ed6ec515
krysent
authored
1 year ago
ed6ec515
集成
· 8fff25e0
krysent
authored
1 year ago
8fff25e0
packagejson
· bb9822fb
krysent
authored
1 year ago
bb9822fb
nihao
· ec67e9bd
krysent
authored
1 year ago
ec67e9bd
去除logo
· 598e9a60
李翰林
authored
1 year ago
598e9a60
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
884 additions
and
610 deletions
+884
-610
proxy.js
config/proxy.js
+6
-3
package.json
package.json
+2
-2
home.jpg
public/home.jpg
+0
-0
app.jsx
src/app.jsx
+67
-27
index.jsx
src/components/Autocomplete/index.jsx
+61
-0
index.jsx
src/components/InitForm/index.jsx
+21
-1
AvatarDropdown.jsx
src/components/RightContent/AvatarDropdown.jsx
+69
-20
SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+13
-1
mtable.jsx
src/components/Tableform/mtable.jsx
+1
-1
index.jsx
src/components/TagView/index.jsx
+24
-9
global.less
src/global.less
+91
-16
Welcome.jsx
src/pages/Welcome.jsx
+10
-140
document.ejs
src/pages/document.ejs
+2
-2
fields.jsx
src/pages/system/Staff/fields.jsx
+44
-30
index.jsx
src/pages/system/Staff/index.jsx
+125
-110
index.jsx
src/pages/user/Login/index.jsx
+204
-159
craft.js
src/services/craft.js
+8
-8
device.js
src/services/device.js
+18
-18
login.js
src/services/login.js
+14
-6
platform.js
src/services/platform.js
+8
-8
system.js
src/services/system.js
+34
-34
doFetch.js
src/utils/doFetch.js
+1
-1
request.js
src/utils/request.js
+61
-14
No files found.
config/proxy.js
View file @
598e9a60
...
...
@@ -9,12 +9,15 @@
export
default
{
dev
:
{
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/wms/"
:
{
"/wms
pro
/"
:
{
// 要代理的地址
target
:
"http://192.168.40.18/wms/"
,
//39:28040 18/wms/
// target: "http://wms-demo.nangaoyun.com", //39:28040 18/wms/
target
:
"http://192.168.40.203:8000"
,
//39:28040 18/wms/
// target: "http://192.168.40.18/wms/", //39:28040 18/wms/
// target: "http://192.168.40.18/wms/", //39:28040 18/wms/
changeOrigin
:
true
,
pathRewrite
:
{
"^/wms"
:
""
,
"^/wms
pro
"
:
""
,
},
},
"/staticfile/"
:
{
...
...
This diff is collapsed.
Click to expand it.
package.json
View file @
598e9a60
...
...
@@ -5,7 +5,7 @@
"description"
:
"An out-of-box UI solution for enterprise applications"
,
"scripts"
:
{
"analyze"
:
"cross-env ANALYZE=1 umi build"
,
"build"
:
"umi build"
,
"build"
:
"
set NODE_OPTIONS=--openssl-legacy-provider &&
umi build"
,
"deploy"
:
"npm run build && npm run gh-pages"
,
"dev"
:
"npm run start:dev"
,
"gh-pages"
:
"gh-pages -d dist"
,
...
...
@@ -23,7 +23,7 @@
"precommit"
:
"lint-staged"
,
"prettier"
:
"prettier -c --write
\"
src/**/*
\"
"
,
"serve"
:
"umi-serve"
,
"start"
:
"cross-env UMI_ENV=dev umi dev"
,
"start"
:
"
set NODE_OPTIONS=--openssl-legacy-provider &&
cross-env UMI_ENV=dev umi dev"
,
"start:dev"
:
"cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev umi dev"
,
"start:no-mock"
:
"cross-env MOCK=none UMI_ENV=dev umi dev"
,
"start:no-ui"
:
"cross-env UMI_UI=none UMI_ENV=dev umi dev"
,
...
...
This diff is collapsed.
Click to expand it.
public/home.jpg
0 → 100644
View file @
598e9a60
This diff is collapsed.
Click to expand it.
src/app.jsx
View file @
598e9a60
...
...
@@ -24,7 +24,7 @@ export async function getInitialState() {
const
msg
=
await
queryCurrentUser
();
return
msg
.
data
;
}
catch
(
error
)
{
history
.
push
(
loginPath
);
//
history.push(loginPath);
}
return
undefined
;
};
// 如果是登录页面,不执行
...
...
@@ -51,7 +51,7 @@ export async function getInitialState() {
settings
:
defaultSettings
,
newMenu
:
menuData
,
getmenuData
,
collapsed
:
false
collapsed
:
false
,
};
}
return
{
...
...
@@ -59,7 +59,7 @@ export async function getInitialState() {
settings
:
defaultSettings
,
getmenuData
,
collapsed
:
false
,
tagList
:
[]
tagList
:
[]
,
};
}
// ProLayout 支持的api https://procomponents.ant.design/components/layout
export
const
layout
=
async
(
props
)
=>
{
...
...
@@ -74,25 +74,36 @@ export const layout = async (props) => {
},
collapsed
:
initialState
.
collapsed
,
onCollapse
:
(
cols
)
=>
{
setInitialState
(
s
=>
({
...
s
,
collapsed
:
cols
}))
setInitialState
(
(
s
)
=>
({
...
s
,
collapsed
:
cols
}));
},
onPageChange
:
()
=>
{
onPageChange
:
async
()
=>
{
// const { location } = history; // 如果没有登录,重定向到 login
// if (location.pathname != "/user/logon") {
// if (
// (!initialState?.currentUser && location.pathname !== loginPath) ||
// !token
// ) {
// setInitialState((s) => {
// return { ...s, currentUser: undefined, newMenu: [] };
// });
// history.replace(loginPath);
// }
// }
// if (location.pathname == loginPath) {
// setInitialState((s) => {
// return { ...s, currentUser: undefined, newMenu: [] };
// });
// }
const
{
location
}
=
history
;
// 如果没有登录,重定向到 login
if
(
location
.
pathname
!=
"/user/logon"
)
{
if
(
(
!
initialState
?.
currentUser
&&
location
.
pathname
!==
loginPath
)
||
!
token
)
{
setInitialState
((
s
)
=>
{
return
{
...
s
,
currentUser
:
undefined
,
newMenu
:
[]
};
});
history
.
replace
(
loginPath
);
}
}
if
(
location
.
pathname
==
loginPath
)
{
setInitialState
((
s
)
=>
{
return
{
...
s
,
currentUser
:
undefined
,
newMenu
:
[]
};
});
let
Token
=
localStorage
.
getItem
(
"TOKEN_MES"
);
if
(
!
initialState
?.
currentUser
&&
location
.
pathname
!==
loginPath
)
{
let
userInfo
=
await
initialState
.
fetchUserInfo
();
let
menuData
=
await
initialState
.
getmenuData
();
setInitialState
((
s
)
=>
({
...
s
,
currentUser
:
userInfo
?.
data
,
newMenu
:
menuData
,
}));
}
},
contentStyle
:
{
...
...
@@ -107,10 +118,10 @@ export const layout = async (props) => {
},
request
:
(
params
,
defaultMenuData
)
=>
{
let
lastArr
=
initialState
?.
newMenu
?.
userHavePermList
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
)
)
:
[],
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
)
)
:
[],
newArr
=
[
{
path
:
"/welcome"
,
...
...
@@ -131,6 +142,7 @@ export const layout = async (props) => {
},
menuRender
:
(
props
,
defaultDom
)
=>
{
console
.
log
(
props
);
if
(
props
.
isMobile
)
{
return
defaultDom
;
}
else
{
...
...
@@ -138,16 +150,44 @@ export const layout = async (props) => {
}
},
// 自定义 403 页面
// unAccessible: <div>unAccessible</div>,
// 增加一个 loading 的状态
childrenRender
:
(
children
,
props
)
=>
{
// if (initialState?.loading) return <PageLoading />;
if
(
initialState
?.
loading
)
return
<
PageLoading
/>;
let
items
=
[...(
initialState
?.
newMenu
?.
userHavePermList
??
[])];
items
?.
unshift
({
path
:
"/welcome"
,
name
:
"首页"
,
icon
:
"smile"
,
component
:
"./Welcome"
,
haveChildren
:
false
,
key
:
"000000"
,
parentKey
:
"0"
,
routes
:
[],
children
:
null
,
title
:
null
,
});
let
home
;
if
(
history
.
location
.
pathname
!=
"/welcome"
&&
history
.
location
.
pathname
!=
"/"
)
{
home
=
history
.
location
.
pathname
;
}
else
{
home
=
items
?.
length
>
0
?
items
[
0
].
path
.
indexOf
(
"/"
)
>
-
1
?
items
[
0
].
path
:
items
[
0
]?.
routes
?.
length
>
0
?
items
[
0
]?.
routes
[
0
]?.
path
:
""
:
""
;
}
return
(
<>
{
initialState
?.
currentUser
&&
location
.
pathname
!==
loginPath
?
(
<
TagView
home=
"/welcome"
>
{
children
}
</
TagView
>
<
TagView
home=
{
home
}
>
{
children
}
</
TagView
>
)
:
(
children
)
}
...
...
This diff is collapsed.
Click to expand it.
src/components/Autocomplete/index.jsx
0 → 100644
View file @
598e9a60
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
AutoComplete
,
Input
}
from
"antd"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
{
useRequest
}
from
"ahooks"
;
export
default
(
item
)
=>
{
const
{
requestOptions
,
name
,
value
,
onChange
}
=
item
;
const
[
options
,
setoptions
]
=
useState
([]);
const
[
username
,
setusername
]
=
useState
();
// const [value, setvalue] = useState();
const
{
data
,
run
,
runAsync
}
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
requestOptions
?.
url
??
""
,
// params: { [requestOptions.params]: username },
params
:
requestOptions
.
params
&&
{
[
requestOptions
.
params
]:
username
},
});
return
res
?.
data
?.
dataList
;
},
{
manual
:
true
,
debounceWait
:
300
,
}
);
useEffect
(()
=>
{
runAsync
()
.
then
((
data
)
=>
{
const
options
=
data
?.
map
((
it
)
=>
({
...
it
,
label
:
`
${
it
?.
username
}
-
$
{
it
?.
fullName
}
-
$
{
it
?.
phone
}
-
$
{
it
?.
mailbox
}
`,
value: `
$
{
it
?.
username
}
-
$
{
it
?.
fullName
}
-
$
{
it
?.
phone
}
-
$
{
it
?.
mailbox
}
`,
}));
setoptions(options);
})
.catch((error) => {
console.log(error);
});
}, [username]);
const onChangeHandle = (val) => {
setusername(val)
onChange(val)
// setvalue(val);
};
const selectValue = (val) => {
console.log(val);
onChange(val)
};
return (
<AutoComplete
allowClear
placeholder={item.title}
disabled={item.disabled}
options={options}
onChange={onChangeHandle}
onSelect={selectValue}
value={value}
/>
);
};
This diff is collapsed.
Click to expand it.
src/components/InitForm/index.jsx
View file @
598e9a60
...
...
@@ -28,6 +28,7 @@ import Editor from "../Editor";
import
mockfile
from
"./mockfile.js"
;
import
zhCN
from
"antd/lib/locale/zh_CN"
;
import
Diyrule
from
"../Diyrule"
;
import
Autocomplete
from
"../Autocomplete"
;
moment
.
locale
(
"zh-cn"
);
const
{
TreeNode
}
=
TreeSelect
;
...
...
@@ -729,6 +730,25 @@ let InitForm = ({
</
Form
.
Item
>
</
Col
>
)
:
null
;
}
else
if
(
item
.
type
==
"autocompleteinput"
)
{
return
!
extraprops
.
hides
?
(
<
Col
key=
{
i
}
{
...
getCol
(
item
.
col
)}
>
<
Form
.
Item
style=
{
{}
}
label=
{
item
.
title
}
name=
{
item
.
name
[
0
]
}
rules=
{
[
{
required
:
item
.
required
,
message
:
`请输入${item.title}`
,
},
]
}
>
<
Autocomplete
{
...
item
}
/>
{
/* <span style={{position:'relative',fontSize:"12px",color:'#c0c0c0c0'}}>登录账号为"用户名",登录密码为IoT设置的密码</span> */
}
</
Form
.
Item
>
</
Col
>
)
:
null
;
}
else
if
(
item
.
type
==
"textarea"
)
{
return
!
extraprops
.
hides
?
(
<
Col
key=
{
i
}
{
...
getCol
(
item
.
col
)}
>
...
...
@@ -1050,7 +1070,7 @@ let InitForm = ({
const
props
=
{
name
:
"file"
,
action
:
"/wms/ngic-base-business/sysAttachment/uploadFile"
,
action
:
"/wms
pro
/ngic-base-business/sysAttachment/uploadFile"
,
listType
:
item
.
listType
==
"img"
?
"picture-card"
:
"text"
,
accept
:
item
.
listType
==
"img"
?
".jpg,.png,.jpeg,"
:
"*"
,
multiple
:
item
.
multiple
?
item
.
multiple
:
false
,
...
...
This diff is collapsed.
Click to expand it.
src/components/RightContent/AvatarDropdown.jsx
View file @
598e9a60
import
React
,
{
useCallback
,
useState
,
useMemo
}
from
"react"
;
import
{
LogoutOutlined
,
LockOutlined
}
from
"@ant-design/icons"
;
import
{
Menu
,
Spin
,
Form
,
Modal
,
message
,
Avatar
}
from
"antd"
;
import
{
history
,
useModel
,
useRequest
}
from
"umi"
;
import
{
stringify
}
from
"querystring"
;
import
{
LogoutOutlined
,
LockOutlined
,
UserOutlined
,
DownOutlined
,
}
from
"@ant-design/icons"
;
import
{
Menu
,
Spin
,
Form
,
Modal
,
message
,
Select
}
from
"antd"
;
import
{
history
,
useModel
}
from
"umi"
;
import
{
useRequest
}
from
"ahooks"
;
import
HeaderDropdown
from
"../HeaderDropdown"
;
import
styles
from
"./index.less"
;
import
{
fakeAccountLoginOut
,
changePwd
}
from
"@/services/login"
;
...
...
@@ -13,17 +18,19 @@ import ECB from "crypto-js/mode-ecb";
import
Pkcs7
from
"crypto-js/pad-pkcs7"
;
import
Utf8
from
"crypto-js/enc-utf8"
;
import
moment
from
"moment"
;
const
{
Option
}
=
Select
;
/**
* 退出登录,并且将当前的 url 保存
*/
const
loginOut
=
async
()
=>
{
await
fakeAccountLoginOut
();
const
{
query
=
{}
}
=
history
.
location
;
const
{
redirect
}
=
query
;
// Note: There may be security issues, please note
const
{
logoutRedirectUrl
}
=
await
fakeAccountLoginOut
();
const
{
query
=
{}
}
=
history
.
location
;
const
{
redirect
}
=
query
;
// Note: There may be security issues, please not
if
(
window
.
location
.
pathname
!==
"/user/login"
&&
!
redirect
)
{
localStorage
.
clear
();
history
.
replace
(
"/user/login"
);
// history.replace("/user/login");
window
.
location
.
replace
(
logoutRedirectUrl
);
}
};
...
...
@@ -33,7 +40,6 @@ const AvatarDropdown = ({ menu }) => {
[
formRef
]
=
Form
.
useForm
(),
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
formatResult
:
(
res
)
=>
res
,
onSuccess
:
(
result
,
params
)
=>
{
if
(
result
.
code
==
"0000"
)
{
cv
(
false
);
...
...
@@ -47,6 +53,13 @@ const AvatarDropdown = ({ menu }) => {
});
}
},
}),
getUserApp
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysUser/userApp/selection"
,
params
:
{},
});
return
res
?.
data
??
{};
});
const
fields
=
useMemo
(()
=>
{
return
{
...
...
@@ -130,9 +143,9 @@ const AvatarDropdown = ({ menu }) => {
padding
:
Pkcs7
,
}).
toString
();
let
newPassword
=
AES
.
encrypt
(
values
.
newPassword
,
Utf8
.
parse
(
timestamp
),
{
mode
:
ECB
,
padding
:
Pkcs7
,
}).
toString
(),
mode
:
ECB
,
padding
:
Pkcs7
,
}).
toString
(),
password
=
AES
.
encrypt
(
values
.
password
,
Utf8
.
parse
(
timestamp
),
{
mode
:
ECB
,
padding
:
Pkcs7
,
...
...
@@ -148,11 +161,11 @@ const AvatarDropdown = ({ menu }) => {
const
menuHeaderDropdown
=
(
<
Menu
className=
{
styles
.
menu
}
selectedKeys=
{
[]
}
onClick=
{
onMenuClick
}
>
<
Menu
.
Item
key=
"changepwd"
>
{
/*
<Menu.Item key="changepwd">
<LockOutlined />
修改密码
</Menu.Item>
<
Menu
.
Divider
/>
<Menu.Divider />
*/
}
<
Menu
.
Item
key=
"logout"
>
<
LogoutOutlined
/>
退出登录
...
...
@@ -160,7 +173,7 @@ const AvatarDropdown = ({ menu }) => {
</
Menu
>
);
return
(
<
div
>
<
div
className=
"center"
>
<
Modal
title=
"修改密码"
visible=
{
visible
}
...
...
@@ -175,21 +188,57 @@ const AvatarDropdown = ({ menu }) => {
formRef=
{
formRef
}
fields=
{
fields
}
col=
{
{
span
:
24
}
}
onChange=
{
(
changedValues
,
allValues
)
=>
{
}
}
onChange=
{
(
changedValues
,
allValues
)
=>
{}
}
submitData=
{
(
values
,
fn
)
=>
{
saveData
(
values
,
fn
);
}
}
submitting=
{
loading
||
!
visible
}
>
</
InitForm
>
></
InitForm
>
</
Modal
>
<
Select
style=
{
{
width
:
200
,
}
}
onChange=
{
(
value
)
=>
{
window
.
open
(
value
,
"_self"
);
}
}
value=
{
getUserApp
?.
data
?.
dataList
?.
filter
(
(
it
)
=>
it
.
appId
==
getUserApp
?.
data
?.
appId
)?.[
0
]?.
value
}
tagRender=
{
(
props
)
=>
{}
}
>
{
getUserApp
?.
data
?.
dataList
?.
map
((
it
)
=>
{
return
(
<
Option
value=
{
it
.
value
}
label=
{
it
.
label
}
key=
{
it
.
value
}
>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
{
it
?.
appImgList
?.
length
>
0
&&
(
<
img
src=
{
it
?.
appImgList
?.[
0
]?.
url
}
style=
{
{
width
:
26
,
height
:
26
,
objectFit
:
"cover"
,
marginRight
:
6
,
}
}
/>
)
}
<
span
>
{
it
.
label
}
</
span
>
</
div
>
</
Option
>
);
})
}
</
Select
>
<
HeaderDropdown
overlay=
{
menuHeaderDropdown
}
>
<
span
className=
{
`${styles.action} ${styles.account}`
}
>
<
Avatar
style=
{
{
marginRight
:
12
,
backgroundColor
:
"#1890ff"
}
}
>
{
currentUser
.
userName
.
substr
(
0
,
1
)
}
</
Avatar
>
<
UserOutlined
style=
{
{
color
:
"#57b9c6"
,
fontSize
:
20
,
margin
:
"0 4px"
}
}
/>
<
span
className=
{
`${styles.name} anticon`
}
>
{
currentUser
.
userName
}
</
span
>
<
DownOutlined
style=
{
{
fontSize
:
14
,
marginLeft
:
4
}
}
/>
</
span
>
</
HeaderDropdown
>
</
div
>
...
...
This diff is collapsed.
Click to expand it.
src/components/SiderMenu/SiderMenu.js
View file @
598e9a60
...
...
@@ -72,6 +72,7 @@ function Diymenu({
const
getMenuData
=
newMenu
?.
userHavePermList
??
[],
collectPerm
=
newMenu
?.
collectPerm
??
[],
recentUsePermList
=
newMenu
?.
recentUsePermList
??
[];
console
.
log
(
getMenuData
)
let
scrollToAnchor
=
(
anchorName
)
=>
{
if
(
anchorName
)
{
setanchor
(
anchorName
);
...
...
@@ -155,7 +156,7 @@ function Diymenu({
>
<
div
className
=
{
styles
.
logo
}
id
=
"logo"
>
<
Link
to
=
"/welcome"
>
<
img
src
=
{
logo
}
alt
=
"logo"
/>
{
/* <img src={logo} alt="logo" /> */
}
<
h1
style
=
{{
fontSize
:
12
}}
>
{
name
}
<
/h1
>
<
/Link
>
<
/div
>
...
...
@@ -196,6 +197,17 @@ function Diymenu({
<
Icon
type
=
{
alive
?
"fullscreen"
:
"fullscreen-exit"
}
/
>
<
span
>
产品与服务
<
/span
>
<
/Menu.Item
>
<
Menu
.
Item
key
=
"/welcome"
style
=
{{
userSelect
:
"none"
,
backgroundColor
:
"#000"
,
marginTop
:
8
,
}}
>
<
Icon
type
=
"home"
/>
<
span
>
首页
<
/span
>
<
/Menu.Item
>
{
collectPerm
&&
collectPerm
.
map
((
item
,
i
)
=>
{
return
(
...
...
This diff is collapsed.
Click to expand it.
src/components/Tableform/mtable.jsx
View file @
598e9a60
...
...
@@ -118,7 +118,7 @@ class Mtable extends PureComponent {
delete
newparams
.
pageSize
;
}
let
res
=
await
request
(
"/wms"
+
path
,
{
let
res
=
await
request
(
"/wms
pro
"
+
path
,
{
body
:
JSON
.
stringify
(
newparams
?
newparams
:
{}),
headers
,
method
:
"POST"
,
...
...
This diff is collapsed.
Click to expand it.
src/components/TagView/index.jsx
View file @
598e9a60
...
...
@@ -23,20 +23,20 @@ const TagView = ({ children, home }) => {
const
initTags
=
(
routeContext
)
=>
{
const
{
menuData
}
=
routeContext
;
if
(
tagList
.
length
===
0
&&
menuData
)
{
const
firstTag
=
menuData
.
filter
((
el
)
=>
el
.
path
===
home
)[
0
]
;
const
firstTag
=
getHome
(
menuData
);
;
if
(
firstTag
)
{
const
title
=
(
<
FormattedMessage
key=
{
firstTag
.
name
}
id=
{
`menu.${firstTag.name}`
}
defaultMessage=
"首页"
/>
);
//
const title = (
//
<FormattedMessage
//
key={firstTag.name}
//
id={`menu.${firstTag.name}`}
//
defaultMessage="首页"
//
/>
//
);
const
path
=
firstTag
.
path
;
history
.
push
({
pathname
:
firstTag
.
path
,
query
:
firstTag
.
query
});
setTagList
([
{
title
,
title
:
firstTag
.
name
,
path
,
children
:
firstTag
.
children
,
refresh
:
0
,
...
...
@@ -127,6 +127,21 @@ const TagView = ({ children, home }) => {
});
setTagList
(
tagsCopy
);
};
function
getHome
(
data
)
{
let
obj
;
function
loop
(
data
)
{
data
.
map
(
it
=>
{
if
(
it
.
path
==
home
)
{
obj
=
it
;
}
if
(
it
.
children
?.
length
>
0
)
{
loop
(
it
.
children
);
}
});
}
loop
(
data
);
return
obj
;
}
return
(
<>
...
...
This diff is collapsed.
Click to expand it.
src/global.less
View file @
598e9a60
...
...
@@ -9,6 +9,7 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
html,
body,
#root {
...
...
@@ -19,6 +20,7 @@ body,
.colorWeak {
filter: invert(80%);
}
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
left: unset;
}
...
...
@@ -33,6 +35,15 @@ body {
-moz-osx-font-smoothing: grayscale;
}
main>div:nth-child(2)>div>div {
height: 100% !important;
>div {
height: 100% !important;
}
}
ul,
ol {
list-style: none;
...
...
@@ -42,12 +53,15 @@ ol {
.ant-table {
width: 100%;
overflow-x: auto;
&-thead > tr,
&-tbody > tr {
> th,
> td {
&-thead>tr,
&-tbody>tr {
>th,
>td {
white-space: pre;
> span {
>span {
display: block;
}
}
...
...
@@ -56,8 +70,9 @@ ol {
}
// Compatible with IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
body .ant-design-pro > .ant-layout {
@media screen and(-ms-high-contrast: active),
(-ms-high-contrast: none) {
body .ant-design-pro>.ant-layout {
min-height: 100vh;
}
}
...
...
@@ -83,10 +98,12 @@ ol {
.ant-card-body {
padding: 12px !important;
}
.ant-card-head {
padding: 0 20px !important;
}
}
.ant-drawer-content {
overflow-x: hidden !important;
}
...
...
@@ -96,6 +113,7 @@ ol {
padding: 0 !important;
}
}
.ant-pro-table-list-toolbar-container {
padding: 0px !important;
padding-bottom: 8px !important;
...
...
@@ -108,12 +126,14 @@ ol {
justify-content: space-between !important;
padding: 10px 0 10px 0 !important;
}
.ant-pro-form-login-container {
height: auto !important;
margin-top: -10vh;
padding: 0 !important;
background: transparent !important;
}
.ant-pro-form-login-main {
margin-top: 30px !important;
}
...
...
@@ -125,42 +145,51 @@ pre {
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
white-space: pre-wrap !important;
}
.gongyiStep {
height: 100%;
.ant-steps-item-title {
width: 100% !important;
}
}
.center {
display: flex;
align-items: center;
justify-content: center;
}
.spread {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.columns {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.specialpropertiesCard {
.ant-card-body {
padding: 5px !important;
}
}
.oneText {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ant-picker-cell-inner {
display: flex !important;
justify-content: center;
.ant-picker-calendar-date-content {
flex: 1 !important;
}
...
...
@@ -170,16 +199,17 @@ pre {
.ant-tabs-nav {
padding: 0 16px;
}
.ant-tabs-content-holder {
max-height: 520px;
padding: 0 16px;
overflow-y: auto;
}
}
.ant-input[disabled],
.ant-picker-input > input[disabled],
.ant-select-disabled.ant-select:not(.ant-select-customize-input)
.ant-select-selector,
.ant-picker-input>input[disabled],
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector,
.ant-select-disabled.ant-select-multiple .ant-select-selection-item {
color: rgba(0, 0, 0, 0.85) !important;
}
...
...
@@ -191,6 +221,7 @@ pre {
}
}
}
.row-dragging {
z-index: 999999999999;
background: #fafafa;
...
...
@@ -204,6 +235,7 @@ pre {
.row-dragging .drag-visible {
visibility: visible;
}
//reset end
.img {
...
...
@@ -213,21 +245,26 @@ pre {
background-position: center;
background-size: cover;
}
.cover {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
img {
width: 30%;
margin: 30px 0 0 30px;
}
}
.ant-pro-form-login-desc {
margin-bottom: 0 !important;
}
.ant-layout-footer {
background-color: transparent !important;
.ant-pro-global-footer {
margin: 0 !important;
padding: 0 !important;
...
...
@@ -238,62 +275,79 @@ pre {
.ant-tabs-nav-wrap {
display: inline-block !important;
}
.ant-tabs-tab-active {
font-size: 16px !important;
}
.ant-layout-footer {
background-color: #23394a !important;
.ant-pro-global-footer {
margin: 0 0 20px 0 !important;
padding: 0 !important;
* {
color: rgba(255, 255, 255, 0.6) !important;
}
.ant-pro-global-footer-copyright {
color: rgba(255, 255, 255, 0.3) !important;
}
}
}
.ant-input-affix-wrapper {
background-color: rgba(255, 255, 255, 0.3) !important;
border: none !important;
input {
color: #fff !important;
background-color: rgba(255, 255, 255, 0) !important;
}
}
.ant-select-selector {
background-color: rgba(255, 255, 255, 0.3) !important;
border: none !important;
input {
color: #fff !important;
background-color: rgba(255, 255, 255, 0) !important;
}
}
.ant-input {
color: #fff !important;
background-color: rgba(255, 255, 255, 0.3) !important;
border: none !important;
}
.ant-select-selection-item {
color: #fff !important;
}
.anticon-close-circle {
color: #fff !important;
}
.anticon {
color: #fff !important;
}
.ant-select-clear {
background-color: transparent !important;
}
.ant-select-selection-item-content,
.ant-select-selection-item-remove {
color: #000 !important;
.anticon {
color: #000 !important;
}
}
.ant-select-selection-overflow {
display: flex !important;
flex-wrap: nowrap !important;
...
...
@@ -306,38 +360,48 @@ pre {
font-weight: normal !important;
}
}
.ant-layout-header {
transition: all 200ms !important;
transition-timing-function: ease-out !important;
}
.ant-pro-global-header {
padding-left: 6px !important;
}
table {
min-width: calc(100% - 6px) !important;
}
.ant-drawer-open {
transform: none !important;
}
.ant-pro-table-list-toolbar {
overflow: hidden !important;
}
.ant-select-selector {
overflow: hidden !important;
}
.ant-breadcrumb {
span {
>
span {
>span {
max-width: 600px !important;
}
}
}
.ant-tree .ant-tree-treenode {
width: 100%;
> span:last-child {
>span:last-child {
flex: 1;
}
}
.ant-input-number-affix-wrapper,
.ant-input-number {
width: 100% !important;
...
...
@@ -350,6 +414,7 @@ table {
}
@media print {
html,
body {
height: initial !important;
...
...
@@ -365,20 +430,25 @@ table {
page-break-after: always;
}
}
.ant-pro-card-body {
padding: 12px !important;
}
.ant-pagination.ant-pagination-mini .ant-pagination-options-size-changer {
max-width: 100px !important;
}
.ant-pagination-options {
display: flex !important;
min-width: 210px !important;
}
#large {
.header {
background-color: transparent !important;
}
.header-item,
.ceil {
height: auto !important;
...
...
@@ -390,16 +460,20 @@ table {
word-break: break-all !important;
border: #000 1px solid !important;
}
.header-item{
.header-item {
font-weight: bolder !important;
}
.header-item + .header-item {
.header-item+.header-item {
margin-left: -1px !important;
}
.ceil {
margin-top: -1px;
}
.ceil + .ceil {
.ceil+.ceil {
margin-left: -1px !important;
}
...
...
@@ -409,10 +483,11 @@ table {
line-height: 1 !important;
background-color: transparent !important;
}
* {
overflow: visible !important;
font-size: 20px !important;
white-space: pre-wrap !important;
word-break: break-all !important;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/Welcome.jsx
View file @
598e9a60
...
...
@@ -2,148 +2,18 @@ import React, { useState } from "react";
import
AutoTable
from
"@/components/AutoTable"
;
import
DrawInitForm
from
"@/components/DrawInitForm"
;
import
{
Button
}
from
"antd"
;
import
bg
from
"../../public/home.jpg"
;
function
Table
({
route
})
{
const
[
vs
,
setvs
]
=
useState
();
return
(
<
div
style=
{
{
height
:
"200vh"
}
}
>
{
/* <AutoTable
pagetitle={route.name}
pageextra={() => <Button onClick={() => {
setvs(true)
}}>add</Button>
}
columns={[
{
"title": "姓名",
"dataIndex": "userName",
"key": "userName"
},
{
"title": "用户名",
"dataIndex": "accountName",
"key": "accountName"
},
{
"title": "性别1:男;2:女",
"dataIndex": "gender",
"key": "gender",
"valueType": "select",
"request": [
{
"label": "男",
"value": "1"
},
{
"label": "女",
"value": "2"
}
],
"fftype": 0
},
{
"title": "电话",
"dataIndex": "telephone",
"key": "telephone"
},
{
"title": "邮箱",
"dataIndex": "mailNo",
"key": "mailNo",
"search": false
},
{
"title": "组织名称",
"dataIndex": "departmentName",
"key": "departmentName"
},
{
"title": "工厂名称",
"dataIndex": "factoryName",
"key": "factoryName"
},
{
"title": "车间名称",
"dataIndex": "shopNames",
"key": "shopNames"
},
{
"title": "工段",
"dataIndex": "sectionNames",
"key": "sectionNames"
},
{
"title": "产线",
"dataIndex": "productionLines",
"key": "productionLines"
},
{
"title": "分组",
"dataIndex": "groupNames",
"key": "groupNames"
},
{
"title": "角色",
"dataIndex": "roleNames",
"key": "roleNames"
},
{
"title": "直属领导",
"dataIndex": "parentName",
"key": "parentName"
},
{
"title": "学历",
"dataIndex": "academicCareer",
"key": "academicCareer",
"search": false
},
{
"title": "毕业院校",
"dataIndex": "university",
"key": "university",
"search": false
},
{
"title": "专业",
"dataIndex": "major",
"key": "major",
"search": false
},
{
"title": "备注",
"dataIndex": "remarks",
"key": "remarks",
"search": false
}
]}
path="/ngic-auth/sysUser/query/page"
>
</AutoTable>
<DrawInitForm
title="Basic Drawer"
onClose={() => {
setvs(false)
}}
visible={vs}
fields={{
"a": {
"value": null,
"type": "input",
"title": "b",
"name": [
"a"
],
"required": true
}
}}
>
</DrawInitForm> */
}
</
div
>
);
const
style
=
{
width
:
"100%"
,
height
:
"100%"
,
backgroundImage
:
`url(
${
bg
}
)`
,
backgroundPosition
:
"0 0"
,
backgroundSize
:
"cover"
,
backgroundRepeat
:
"no-repeat"
,
};
return
<
div
style=
{
style
}
></
div
>;
}
export
default
Table
;
This diff is collapsed.
Click to expand it.
src/pages/document.ejs
View file @
598e9a60
...
...
@@ -208,7 +208,7 @@
height: 100%;
min-height: 420px;
"
>
<
img
src=
"<%= context.config.publicPath +'logo.png'%>"
alt=
"logo"
width=
"256"
/
>
<
!-- <img src="<%= context.config.publicPath +'logo.png'%>" alt="logo" width="256" /> --
>
<div
class=
"page-loading-warp"
>
<div
class=
"ant-spin ant-spin-lg ant-spin-spinning"
>
<span
class=
"ant-spin-dot ant-spin-dot-spin"
><i
class=
"ant-spin-dot-item"
></i><i
...
...
@@ -216,7 +216,7 @@
</div>
</div>
<div
style=
"display: flex; align-items: center; justify-content: center"
>
江苏南高
<!-- 江苏南高 -->
</div>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/pages/system/Staff/fields.jsx
View file @
598e9a60
...
...
@@ -9,27 +9,37 @@ import {
}
from
"@/services/system"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
export
default
{
accountName
:
{
value
:
null
,
type
:
"input"
,
title
:
"用户名"
,
name
:
[
"accountName"
],
required
:
true
,
},
// accountName: {
// value: null,
// type: "input",
// title: "用户名",
// name: ["accountName"],
// required: true,
// },
// userName: {
// value: null,
// type: "input",
// title: "姓名",
// name: ["userName"],
// required: true,
// },
userName
:
{
value
:
null
,
type
:
"input"
,
title
:
"姓名"
,
type
:
"autocompleteinput"
,
title
:
"用户名-姓名-联系电话-邮箱"
,
name
:
[
"userName"
],
required
:
true
,
requestOptions
:
{
url
:
"/ngic-auth/sysUser/queryLikeIotUsername"
,
params
:
"userName"
,
},
},
telephone
:
{
value
:
null
,
type
:
"input"
,
title
:
"联系电话"
,
name
:
[
"telephone"
],
required
:
false
,
},
//
telephone: {
//
value: null,
//
type: "input",
//
title: "联系电话",
//
name: ["telephone"],
//
required: false,
//
},
departmentId
:
{
value
:
null
,
type
:
"treeselect"
,
...
...
@@ -63,10 +73,14 @@ export default {
required
:
false
,
belinked
:
{
options
:
{
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
...
params
}
}),
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-auth/sysStore/selectionBox"
,
params
:
{
...
params
},
}),
params
:
{
factoryIdList
:
"linked"
}
factoryIdList
:
"linked"
,
}
,
},
},
multiple
:
true
,
...
...
@@ -98,16 +112,16 @@ export default {
},
},
},
mailNo
:
{
value
:
null
,
type
:
"input"
,
title
:
"邮箱"
,
name
:
[
"mailNo"
],
required
:
false
,
col
:
{
span
:
12
,
},
},
//
mailNo: {
//
value: null,
//
type: "input",
//
title: "邮箱",
//
name: ["mailNo"],
//
required: false,
//
col: {
//
span: 12,
//
},
//
},
remark
:
{
value
:
null
,
type
:
"textarea"
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/system/Staff/index.jsx
View file @
598e9a60
...
...
@@ -28,83 +28,83 @@ const initState = {
key
:
"1"
,
tab
:
"正式用户"
,
},
{
key
:
"2"
,
tab
:
"用户申请"
,
},
//
{
//
key: "2",
//
tab: "用户申请",
//
},
];
function
reducer
(
state
,
action
)
{
let
{
type
}
=
action
,
newState
=
{};
switch
(
type
)
{
case
"add"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"新增用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
};
break
;
case
"edit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"编辑用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"audit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"审批用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"see"
:
newState
=
{
...
state
,
detail
:
{
dataSource
:
action
.
dataSource
,
totalCard
:
action
.
totalCard
,
},
visible
:
true
,
};
break
;
case
"start"
:
newState
=
{
...
state
,
extraparams
:
{
orderType
:
action
.
tabKey
,
},
};
break
;
case
"close"
:
newState
=
{
...
state
,
vs
:
false
,
fields
:
{},
iftype
:
{},
curitem
:
{},
detail
:
{
dataSource
:
{},
totalCard
:
[],
},
visible
:
false
,
};
break
;
}
switch
(
type
)
{
case
"add"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"新增用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
};
break
;
case
"edit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"编辑用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"audit"
:
newState
=
{
...
state
,
vs
:
true
,
iftype
:
{
title
:
"审批用户"
,
val
:
type
,
},
fields
:
{
...
action
.
fields
},
curitem
:
action
.
curitem
,
};
break
;
case
"see"
:
newState
=
{
...
state
,
detail
:
{
dataSource
:
action
.
dataSource
,
totalCard
:
action
.
totalCard
,
},
visible
:
true
,
};
break
;
case
"start"
:
newState
=
{
...
state
,
extraparams
:
{
orderType
:
action
.
tabKey
,
},
};
break
;
case
"close"
:
newState
=
{
...
state
,
vs
:
false
,
fields
:
{},
iftype
:
{},
curitem
:
{},
detail
:
{
dataSource
:
{},
totalCard
:
[],
},
visible
:
false
,
};
break
;
}
return
newState
;
}
...
...
@@ -130,13 +130,13 @@ const Staff = (props) => {
columns
=
[
{
title
:
"用户名"
,
dataIndex
:
"
account
Name"
,
key
:
"
account
Name"
,
dataIndex
:
"
user
Name"
,
key
:
"
user
Name"
,
},
{
title
:
"姓名"
,
dataIndex
:
"
user
Name"
,
key
:
"
user
Name"
,
dataIndex
:
"
full
Name"
,
key
:
"
full
Name"
,
render
:
(
_
,
row
)
=>
{
return
(
<
Tooltip
title=
{
row
.
userName
}
>
...
...
@@ -161,7 +161,7 @@ const Staff = (props) => {
});
}
}
>
{
row
.
user
Name
}
{
row
.
full
Name
}
</
a
>
</
Tooltip
>
);
...
...
@@ -315,21 +315,21 @@ const Staff = (props) => {
];
function
extraAction
(
text
,
record
,
_
,
action
)
{
return
[
extraparams
.
orderType
==
"1"
&&
getPrem
(
"sysUser_restPassword"
,
action
,
"重置密码"
,
null
,
{
title
:
"确认重置密码?"
,
onConfirm
:
()
=>
{
doFetch
({
url
:
"/ngic-auth/sysUser/restPassword"
,
params
:
{
id
:
record
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
"0000"
)
{
message
.
success
(
res
.
msg
);
reload
();
}
});
},
}),
//
extraparams.orderType == "1" &&
//
getPrem("sysUser_restPassword", action, "重置密码", null, {
//
title: "确认重置密码?",
//
onConfirm: () => {
//
doFetch({
//
url: "/ngic-auth/sysUser/restPassword",
//
params: { id: record.id },
//
}).then((res) => {
//
if (res.code == "0000") {
//
message.success(res.msg);
//
reload();
//
}
//
});
//
},
//
}),
extraparams
.
orderType
==
"1"
&&
getPrem
(
"sysDepartment_save"
,
action
,
"修改"
,
()
=>
{
doFetch
({
...
...
@@ -348,6 +348,15 @@ const Staff = (props) => {
},
};
}
if
(
i
==
"userName"
)
{
defaultFields
[
i
].
disabled
=
true
;
defaultFields
[
i
].
value
=
`
${
data
[
"userName"
]}
-
${
data
[
"fullName"
]
}${
data
[
"telephone"
]
?
"-"
+
data
[
"telephone"
]
:
""
}${
data
[
"mailNo"
]
?
"-"
+
data
[
"mailNo"
]
:
""
}
`
;
// defaultFields[i].value = data["userName"];
}
}
dispatch
({
type
:
"edit"
,
...
...
@@ -453,6 +462,9 @@ const Staff = (props) => {
let
saveData
=
(
values
,
fn
)
=>
{
let
newfields
=
JSON
.
parse
(
JSON
.
stringify
(
values
));
//新增&修改
let
originalString
=
newfields
.
userName
;
let
userName
=
originalString
?.
substring
(
0
,
originalString
.
indexOf
(
"-"
));
newfields
.
userName
=
userName
;
let
difrid
=
iftype
.
val
!=
"add"
?
{
id
:
curitem
.
id
}
:
{};
run
({
url
:
...
...
@@ -469,6 +481,9 @@ const Staff = (props) => {
onClick=
{
()
=>
{
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
i
.
indexOf
(
"List"
)
!=
-
1
?
[]
:
""
;
if
(
i
==
"userName"
)
{
defaultFields
[
"userName"
].
disabled
=
false
;
}
}
dispatch
({
type
:
"add"
,
fields
:
defaultFields
});
}
}
...
...
@@ -478,22 +493,22 @@ const Staff = (props) => {
];
return
(
<
div
>
{
extraparams
.
orderType
==
"1"
&&
(
<
AutoTable
pagetitle=
{
props
.
route
.
name
}
//页面标题
pageextra=
{
extrarender
}
//页面操作 新增or批量删除
columns=
{
columns
}
actionRef=
{
actionRef
}
onRef=
{
(
node
)
=>
(
ChildRef
=
node
)
}
tabList=
{
tabList
}
activeTabKey=
{
extraparams
.
orderType
}
onTabChange=
{
(
key
)
=>
{
dispatch
({
type
:
"start"
,
tabKey
:
key
});
}
}
path=
{
"/ngic-auth/sysUser/query/page"
}
></
AutoTable
>
)
}
{
extraparams
.
orderType
==
"2"
&&
(
{
/* {extraparams.orderType == "1" && ( */
}
<
AutoTable
pagetitle=
{
props
.
route
.
name
}
//页面标题
pageextra=
{
extrarender
}
//页面操作 新增or批量删除
columns=
{
columns
}
actionRef=
{
actionRef
}
onRef=
{
(
node
)
=>
(
ChildRef
=
node
)
}
//
tabList=
{
tabList
}
//
activeTabKey=
{
extraparams
.
orderType
}
onTabChange=
{
(
key
)
=>
{
dispatch
({
type
:
"start"
,
tabKey
:
key
});
}
}
path=
{
"/ngic-auth/sysUser/query/page"
}
></
AutoTable
>
{
/* ) */
}
{
/* {
extraparams.orderType == "2" && (
<AutoTable
pagetitle={props.route.name} //页面标题
columns={columnsc}
...
...
@@ -506,7 +521,7 @@ const Staff = (props) => {
}}
path={"/ngic-auth/sysAccountApply/queryList"}
></AutoTable>
)
}
)}
*/
}
<
DrawInitForm
title=
{
iftype
.
title
}
visible=
{
vs
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/Login/index.jsx
View file @
598e9a60
This diff is collapsed.
Click to expand it.
src/services/craft.js
View file @
598e9a60
...
...
@@ -2,7 +2,7 @@ import request from "@/utils/request";
//单位下拉框
export
async
function
unitSelect
(
params
)
{
return
request
(
`/wms/ngic-base-business/sysDic/querySelectListByParentKey`
,
{
return
request
(
`/wms
pro
/ngic-base-business/sysDic/querySelectListByParentKey`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -10,7 +10,7 @@ export async function unitSelect(params) {
//序列号规则
export
async
function
serialNumberRuleSelect
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmMainNumberRule/querySunSelectByNoTypeCode`
,
`/wms
pro
/ngic-base-business/bmMainNumberRule/querySunSelectByNoTypeCode`
,
{
method
:
"POST"
,
data
:
params
,
...
...
@@ -19,7 +19,7 @@ export async function serialNumberRuleSelect(params) {
}
//工艺路线
export
async
function
processLineSelect
(
params
)
{
return
request
(
`/wms/ngic-workmanship/pmProcessLine/selectionBox`
,
{
return
request
(
`/wms
pro
/ngic-workmanship/pmProcessLine/selectionBox`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -27,7 +27,7 @@ export async function processLineSelect(params) {
//工艺路线下的工序 下拉
export
async
function
processByProcessLine
(
params
)
{
return
request
(
`/wms/ngic-workmanship/workingProcedure/query/selectbox/processLine`
,
`/wms
pro
/ngic-workmanship/workingProcedure/query/selectbox/processLine`
,
{
method
:
"POST"
,
data
:
params
,
...
...
@@ -37,7 +37,7 @@ export async function processByProcessLine(params) {
//车间下的工序 下拉
export
async
function
workingProcedureByShop
(
params
)
{
return
request
(
`/wms/ngic-workmanship/workingProcedure/query/selectbox/shop`
,
`/wms
pro
/ngic-workmanship/workingProcedure/query/selectbox/shop`
,
{
method
:
"POST"
,
data
:
params
,
...
...
@@ -46,7 +46,7 @@ export async function workingProcedureByShop(params) {
}
//物料工艺路线所属车间的工序 下拉
export
async
function
processByShop
(
params
)
{
return
request
(
`/wms/ngic-workmanship/workingProcedure/query/selectbox`
,
{
return
request
(
`/wms
pro
/ngic-workmanship/workingProcedure/query/selectbox`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -54,14 +54,14 @@ export async function processByShop(params) {
//产出物料编号-名称-单位 下拉
export
async
function
selectboxMaterie
(
params
)
{
return
request
(
`/wms/ngic-workmanship/pmMaterie/query/selectboxMaterie`
,
{
return
request
(
`/wms
pro
/ngic-workmanship/pmMaterie/query/selectboxMaterie`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//标签模板下拉
export
async
function
bmTableSelect
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmTable/querySelectByType`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmTable/querySelectByType`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
This diff is collapsed.
Click to expand it.
src/services/device.js
View file @
598e9a60
...
...
@@ -2,7 +2,7 @@ import request from '@/utils/request';
//设备型号下拉框
export
async
function
equipmentModelList
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentModel/query/selection'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentModel/query/selection'
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -10,91 +10,91 @@ export async function equipmentModelList(params) {
//设备型号--(保养标准页面)下拉框
export
async
function
equipmentMaintainModelList
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentModel/query/selection/maintainStandard'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentModel/query/selection/maintainStandard'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//设备型号--(点检标准页面)下拉框
export
async
function
equipmentCheckModelList
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentModel/query/selection/checkStandard'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentModel/query/selection/checkStandard'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//根据设备型号id查询是寿命件的备件
export
async
function
lifespareSelect
(
params
)
{
return
request
(
`/wms/ngic-equipment-asset/equipmentModelSpare/liveparts/selectionbox/byEquipmentModelId`
,
{
return
request
(
`/wms
pro
/ngic-equipment-asset/equipmentModelSpare/liveparts/selectionbox/byEquipmentModelId`
,
{
method
:
'POST'
,
data
:
params
});
}
//备件下拉框
export
async
function
mdmSpareList
(
params
)
{
return
request
(
`/wms/ngic-spare-parts/mdmSpareParts/mdmSpareList`
,
{
return
request
(
`/wms
pro
/ngic-spare-parts/mdmSpareParts/mdmSpareList`
,
{
method
:
'POST'
,
data
:
params
});
}
//设备供应商详情
export
async
function
deviceprovideDetail
(
params
)
{
return
request
(
'/wms/ngic-auth/sysSupplier/query/detail'
,
{
return
request
(
'/wms
pro
/ngic-auth/sysSupplier/query/detail'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//供应商下拉框
export
async
function
equipmentSupplierList
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentSupplier/query/selection'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentSupplier/query/selection'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//设备供应商删除前校验
export
async
function
deleteProvideCheck
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentSupplier/deleteById'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentSupplier/deleteById'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//设备信息
export
async
function
equipmentDetail
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipment/queryDetail'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipment/queryDetail'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//查询父设备id和子设备id,添加子设备时使用
export
async
function
equipmentChildren
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipment/queryChildren'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipment/queryChildren'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//履历详情
export
async
function
equipmentLogDetail
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentLog/query/detail'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentLog/query/detail'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//设备类型树查询
export
async
function
deviceTypequeryTreeList
(
params
)
{
return
request
(
`/wms/ngic-equipment-asset/equipmentType/queryTreeList`
,
{
return
request
(
`/wms
pro
/ngic-equipment-asset/equipmentType/queryTreeList`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//设备详情
export
async
function
equipmentAllDetail
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipment/query/all/detail'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipment/query/all/detail'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//设备型号详情
export
async
function
equipmentModelDetails
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentModelSpare/queryById'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentModelSpare/queryById'
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -102,14 +102,14 @@ export async function equipmentModelDetails(params) {
//设备下拉框
export
async
function
equipmentList
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipment/query/selection'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipment/query/selection'
,
{
method
:
'POST'
,
data
:
params
,
});
}
//IOT设备下拉框
export
async
function
equipmentIotRelationList
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentIotRelation/query/device/selection'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentIotRelation/query/device/selection'
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -117,7 +117,7 @@ export async function equipmentIotRelationList(params) {
//设备下拉框(过滤已报修)
export
async
function
canApplyRepair
(
params
)
{
return
request
(
'/wms/ngic-equipment-repair/omEquipmentApplyRepair/canApplyRepair/equipmens/selection'
,
{
return
request
(
'/wms
pro
/ngic-equipment-repair/omEquipmentApplyRepair/canApplyRepair/equipmens/selection'
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -125,7 +125,7 @@ export async function canApplyRepair(params) {
//关联备件
export
async
function
equipmentModelSpareImport
(
params
)
{
return
request
(
'/wms/ngic-equipment-asset/equipmentModelSpare/importExcel'
,
{
return
request
(
'/wms
pro
/ngic-equipment-asset/equipmentModelSpare/importExcel'
,
{
method
:
'POST'
,
data
:
params
,
type
:
"form"
...
...
This diff is collapsed.
Click to expand it.
src/services/login.js
View file @
598e9a60
...
...
@@ -10,7 +10,7 @@ export async function fakeAccountLogin(params) {
//登出
export
async
function
fakeAccountLoginOut
(
params
)
{
return
request
(
`/wms
/ngic-auth/sysAccount
/logout`
,
{
return
request
(
`/wms
pro
/logout`
,
{
method
:
"POST"
,
body
:
params
,
});
...
...
@@ -27,15 +27,23 @@ export async function saveForRegister(params) {
//个人信息
export
async
function
queryCurrentUser
(
params
)
{
return
request
(
"/wms
/ngic-auth/sysUser/query
"
,
{
return
request
(
"/wms
pro/ngic-auth/sysUser/me
"
,
{
method
:
"POST"
,
data
:
params
,
});
}
// //获取菜单/权限/菜单/公司类型
// export async function getMenu(params) {
// return request(`/wms/ngic-auth/sysPermission/queryMenu`, {
// method: "POST",
// data: params,
// });
// }
//获取菜单/权限/菜单/公司类型
export
async
function
getMenu
(
params
)
{
return
request
(
`/wms/ngic-auth/sysPermission/queryMenu`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysPermission/queryMenu`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -43,7 +51,7 @@ export async function getMenu(params) {
/*---------------菜单收藏-------------------*/
export
async
function
collectPerms
(
params
)
{
return
request
(
`/wms/ngic-auth/sysUserPermission/collectPerm`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysUserPermission/collectPerm`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -51,14 +59,14 @@ export async function collectPerms(params) {
/*---------------取消菜单收藏-------------------*/
export
async
function
cancelCollectPerms
(
params
)
{
return
request
(
`/wms/ngic-auth/sysUserPermission/cancelCollectPerm`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysUserPermission/cancelCollectPerm`
,
{
method
:
"POST"
,
data
:
params
,
});
}
/*---------------菜单历史记录-------------------*/
export
async
function
mtosave
(
params
)
{
return
request
(
`/wms/ngic-auth/sysUserVisitPermission/save`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysUserVisitPermission/save`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
This diff is collapsed.
Click to expand it.
src/services/platform.js
View file @
598e9a60
...
...
@@ -2,20 +2,20 @@ import request from "@/utils/request";
//查询编号类型下拉框(去除已存在的没有子类的类型)
export
async
function
bmNoType
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmNoType/querySelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmNoType/querySelect`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//查询编号类型下拉框全部
export
async
function
bmNoTypeAll
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmNoType/querySelectAll`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmNoType/querySelectAll`
,
{
method
:
"POST"
,
data
:
params
,
});
}
export
async
function
bmNoRule
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmNoRule/querySelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmNoRule/querySelect`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -23,7 +23,7 @@ export async function bmNoRule(params) {
//根据表单id查询条件下拉框
export
async
function
paFormConditionSelect
(
params
)
{
return
request
(
`/wms/ngic-base-business/paFormCondition/querySelectByFormId`
,
`/wms
pro
/ngic-base-business/paFormCondition/querySelectByFormId`
,
{
method
:
"POST"
,
data
:
params
,
...
...
@@ -33,7 +33,7 @@ export async function paFormConditionSelect(params) {
//根据条件id查询条件值的下拉框
export
async
function
queryConValueSelect
(
params
)
{
return
request
(
`/wms/ngic-base-business/paFormCondition/queryConValueSelectByconId`
,
`/wms
pro
/ngic-base-business/paFormCondition/queryConValueSelectByconId`
,
{
method
:
"POST"
,
data
:
params
,
...
...
@@ -42,7 +42,7 @@ export async function queryConValueSelect(params) {
}
//标签模板
export
async
function
bmTableFileSelect
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmTableFile/querySelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmTableFile/querySelect`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -50,14 +50,14 @@ export async function bmTableFileSelect(params) {
//推送类型下拉
export
async
function
paBusinessMsgScene
(
params
)
{
return
request
(
`/wms/ngic-base-business/paBusinessMsgScene/queryAllForSelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/paBusinessMsgScene/queryAllForSelect`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//推送配置
export
async
function
paBusinessMsgOption
(
params
)
{
return
request
(
`/wms/ngic-base-business/paBusinessMsgOption/queryById`
,
{
return
request
(
`/wms
pro
/ngic-base-business/paBusinessMsgOption/queryById`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
This diff is collapsed.
Click to expand it.
src/services/system.js
View file @
598e9a60
...
...
@@ -2,21 +2,21 @@ import request from "@/utils/request";
//工厂下拉框
export
async
function
factorySelect
(
params
)
{
return
request
(
`/wms/ngic-auth/sysFactory/selectionBox`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysFactory/selectionBox`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//查询个人所属工厂下拉框
export
async
function
factorySelectByuser
(
params
)
{
return
request
(
`/wms/ngic-auth/sysFactory/selectionBoxU`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysFactory/selectionBoxU`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//查询工厂下拉框---注册
export
async
function
factorySelectRegister
(
params
)
{
return
request
(
`/wms/ngic-auth/sysFactory/selectionBoxAll`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysFactory/selectionBoxAll`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -24,28 +24,28 @@ export async function factorySelectRegister(params) {
//全部车间下拉框
export
async
function
shopSelect
(
params
)
{
return
request
(
`/wms/ngic-auth/sysShop/selectionBox`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysShop/selectionBox`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//仓库下拉
export
async
function
storeselectionBoxAll
(
params
)
{
return
request
(
`/wms/ngic-auth/sysStore/selectionBox`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysStore/selectionBox`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//根据工厂id查询车间下拉
export
async
function
storeselectionBox
(
params
)
{
return
request
(
`/wms/ngic-auth/sysStore/selectionBox`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysStore/selectionBox`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//全部组织下拉
export
async
function
allDepartment
(
params
)
{
return
request
(
`/wms/ngic-auth/sysDepartment/query/selectbox/depart`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysDepartment/query/selectbox/depart`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -53,77 +53,77 @@ export async function allDepartment(params) {
//根据工厂id查询车间下拉
export
async
function
shopSelectByFactory
(
params
)
{
return
request
(
`/wms/ngic-auth/sysShop/query/selectbox/factory`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysShop/query/selectbox/factory`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//根据车间id查询产线下拉
export
async
function
productionLineSelectByShop
(
params
)
{
return
request
(
`/wms/ngic-auth/sysProductionLine/query/selectbox/shopId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysProductionLine/query/selectbox/shopId`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//根据车间id集合查询产线下拉
export
async
function
productionLineSelectByShops
(
params
)
{
return
request
(
`/wms/ngic-auth/sysProductionLine/query/selectbox/shopIds`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysProductionLine/query/selectbox/shopIds`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//根据车间id查询工段下拉
export
async
function
sectionSelectByShop
(
params
)
{
return
request
(
`/wms/ngic-auth/sysSection/query/selectbox/shopId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysSection/query/selectbox/shopId`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//根据车间id集合查询工段下拉
export
async
function
sectionSelectByShops
(
params
)
{
return
request
(
`/wms/ngic-auth/sysSection/query/selectbox/shopIds`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysSection/query/selectbox/shopIds`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//授权前查询权限树
export
async
function
roleTree
(
params
)
{
return
request
(
`/wms/ngic-auth/sysRolePermission/queryAll`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysRolePermission/queryAll`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//角色下权限数据
export
async
function
adminDataqueryAll
(
params
)
{
return
request
(
`/wms/ngic-auth/sysRoleDataPermission/queryAll`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysRoleDataPermission/queryAll`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//不包含自己在内的全部用户下拉框
export
async
function
userSelect
(
params
)
{
return
request
(
`/wms/ngic-auth/sysUser/queryParentSelectionByUserId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysUser/queryParentSelectionByUserId`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//全部用户下拉框
export
async
function
allUserSelect
(
params
)
{
return
request
(
`/wms/ngic-auth/sysUser/query/selectbox/company`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysUser/query/selectbox/company`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//根据工厂id查询树结构
export
async
function
departmentTree
(
params
)
{
return
request
(
`/wms/ngic-auth/sysDepartment/query/tree`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysDepartment/query/tree`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//查询角色下拉框
export
async
function
roleSelect
(
params
)
{
return
request
(
`/wms/ngic-auth/sysRole/queryAllSelectList`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysRole/queryAllSelectList`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -131,14 +131,14 @@ export async function roleSelect(params) {
//查询角色下拉框---注册
export
async
function
roleSelectRegister
(
params
)
{
return
request
(
`/wms/ngic-auth/sysRole/queryAllSelectByComId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysRole/queryAllSelectByComId`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//查询全部编号类型下拉框(登录人公司)
export
async
function
bmNoRule
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmNoRule/querySelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmNoRule/querySelect`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -146,7 +146,7 @@ export async function bmNoRule(params) {
//根据物料查询产线下拉框
export
async
function
productionLineSelectByMaterieId
(
params
)
{
return
request
(
`/wms/ngic-auth/sysProductionLine/query/selectbox/materieId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysProductionLine/query/selectbox/materieId`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -154,7 +154,7 @@ export async function productionLineSelectByMaterieId(params) {
//根据物料查询班组下拉框
export
async
function
groupSelectByMaterieId
(
params
)
{
return
request
(
`/wms/ngic-auth/sysGroup/query/selectbox/materieId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysGroup/query/selectbox/materieId`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -162,7 +162,7 @@ export async function groupSelectByMaterieId(params) {
//根据物料查询班次下拉框
export
async
function
shiftSelectByMaterieId
(
params
)
{
return
request
(
`/wms/ngic-auth/sysShift/query/selectbox/materieId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysShift/query/selectbox/materieId`
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
@@ -170,21 +170,21 @@ export async function shiftSelectByMaterieId(params) {
//根据车间id查询班次下拉框
export
async
function
shiftSelectByShopId
(
params
)
{
return
request
(
`/wms/ngic-auth/sysShift/query/selectbox/shopId`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysShift/query/selectbox/shopId`
,
{
method
:
"POST"
,
data
:
params
,
});
}
//角色下拉框
export
async
function
roleList
(
params
)
{
return
request
(
`/wms/ngic-auth/sysRole/queryAllSelectList`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysRole/queryAllSelectList`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//集团下拉框
export
async
function
factory
(
params
)
{
return
request
(
`/wms/ngic-auth/sysDepartment/query/selectbox/factory`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysDepartment/query/selectbox/factory`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -193,21 +193,21 @@ export async function factory(params) {
// 4 :
//集团下拉框
export
async
function
zuzhi
(
params
)
{
return
request
(
`/wms/ngic-auth/sysDepartment/query/tree`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysDepartment/query/tree`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//集团下拉框
export
async
function
depart
(
params
)
{
return
request
(
`/wms/ngic-auth/sysDepartment/query/selectbox/depart`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysDepartment/query/selectbox/depart`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//集团下拉框
export
async
function
selectionBoxAll
(
params
)
{
return
request
(
`/wms/ngic-auth/sysStore/selectionBoxAll`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysStore/selectionBoxAll`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -216,21 +216,21 @@ export async function selectionBoxAll(params) {
//下拉框---当前公司下
export
async
function
currentUserList
(
params
)
{
return
request
(
`/wms/ngic-auth/sysUser/query/selectbox/current/company`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysUser/query/selectbox/current/company`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//当前公司所有工厂下拉
export
async
function
allShop
(
params
)
{
return
request
(
`/wms/ngic-auth/sysShop/query/selectbox/current/company`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysShop/query/selectbox/current/company`
,
{
method
:
'POST'
,
data
:
params
,
});
}
//当前公司所有车间下拉
export
async
function
allSection
(
params
)
{
return
request
(
`/wms/ngic-auth/sysSection/query/selectbox`
,
{
return
request
(
`/wms
pro
/ngic-auth/sysSection/query/selectbox`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -238,7 +238,7 @@ export async function allSection(params) {
//查询全部编号类型下拉框(登录人公司)
export
async
function
bmNoTypeadd
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmNoType/querySelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmNoType/querySelect`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
@@ -246,7 +246,7 @@ export async function bmNoTypeadd(params) {
//查询全部编号类型下拉框(登录人公司)
export
async
function
bmNoType
(
params
)
{
return
request
(
`/wms/ngic-base-business/bmNoType/queryAllSelect`
,
{
return
request
(
`/wms
pro
/ngic-base-business/bmNoType/queryAllSelect`
,
{
method
:
'POST'
,
data
:
params
,
});
...
...
This diff is collapsed.
Click to expand it.
src/utils/doFetch.js
View file @
598e9a60
...
...
@@ -11,7 +11,7 @@ export async function doFetch({ url, params }) {
if
(
!
url
){
return
}
return
request
(
"/wms"
+
url
,
{
return
request
(
"/wms
pro
"
+
url
,
{
method
:
"POST"
,
data
:
params
,
});
...
...
This diff is collapsed.
Click to expand it.
src/utils/request.js
View file @
598e9a60
...
...
@@ -5,9 +5,10 @@
import
{
extend
}
from
"umi-request"
;
import
{
message
,
notification
,
Modal
}
from
"antd"
;
import
{
history
}
from
"umi"
;
const
{
NODE_ENV
}
=
process
.
env
;
const
baseUrl
=
NODE_ENV
==
"development"
?
"/wmspro"
:
""
;
const
codeMessage
=
{
200
:
"服务器成功返回请求的数据。"
,
//
200: "服务器成功返回请求的数据。",
201
:
"新建或修改数据成功。"
,
202
:
"一个请求已经进入后台排队(异步任务)。"
,
204
:
"删除数据成功。"
,
...
...
@@ -29,8 +30,12 @@ const codeMessage = {
const
errorHandler
=
(
error
)
=>
{
const
{
response
}
=
error
;
console
.
log
(
"异常处理"
,
error
);
if
(
response
.
status
===
200
)
{
return
;
}
if
(
response
&&
response
.
status
)
{
const
errorText
=
codeMessage
[
response
.
status
]
||
response
.
statusText
;
const
errorText
=
codeMessage
?.
[
response
.
status
]
||
response
.
statusText
;
const
{
status
,
url
}
=
response
;
if
(
response
?.
url
.
indexOf
(
"api/user_token"
)
==
-
1
)
{
notification
.
error
({
...
...
@@ -61,28 +66,67 @@ const request = extend({
// request拦截器, 改变url 或 options.
request
.
interceptors
.
request
.
use
(
async
(
url
,
options
)
=>
{
let
token
=
localStorage
.
getItem
(
"TOKEN_MES"
)
??
"9410b3f7de5d63f2be42d80ec8241d2d"
;
if
(
token
)
{
const
headers
=
let
token
=
localStorage
.
getItem
(
"TOKEN_MES"
)
??
""
,
headers
=
{};
if
(
NODE_ENV
==
"development"
&&
token
)
{
headers
=
options
.
type
==
"form"
?
{
token
:
token
,
Authorization
:
"Bearer "
+
token
,
}
:
{
"Content-Type"
:
"application/json"
,
Accept
:
"application/json"
,
token
:
token
,
Authorization
:
"Bearer "
+
token
,
};
}
else
{
headers
=
options
.
type
==
"form"
?
{}
:
{
"Content-Type"
:
"application/json"
,
Accept
:
"application/json"
,
};
return
{
url
:
url
,
options
:
{
...
options
,
headers
:
headers
},
};
}
return
{
url
:
baseUrl
+
url
,
options
:
{
...
options
,
headers
},
};
});
// response拦截器, 处理response
request
.
interceptors
.
response
.
use
(
async
(
response
,
options
)
=>
{
if
(
response
&&
response
.
status
)
{
const
errorText
=
codeMessage
[
response
.
status
]
||
response
.
statusText
;
const
{
status
,
url
}
=
response
;
if
(
response
?.
url
.
indexOf
(
"api/user_token"
)
==
-
1
&&
Object
.
keys
(
codeMessage
).
indexOf
(
String
(
response
.
status
))
>
-
1
)
{
notification
.
error
({
// message: `请求错误 ${status}: ${url}`,
description
:
errorText
,
});
}
if
(
status
==
"401"
)
{
clearCookie
();
}
if
(
status
==
"401"
||
status
==
"302"
||
status
==
"400"
)
{
if
(
NODE_ENV
==
"development"
)
{
}
else
{
window
.
location
.
href
=
"/"
;
}
}
}
else
if
(
!
response
)
{
if
(
response
?.
url
.
indexOf
(
"api/user_token"
)
==
-
1
)
{
notification
.
error
({
description
:
"您的网络发生异常,无法连接服务器"
,
message
:
"网络异常"
,
});
}
}
if
(
options
.
responseType
==
"blob"
)
{
const
data
=
await
response
.
clone
().
blob
();
let
blobUrl
=
window
.
URL
.
createObjectURL
(
data
);
...
...
@@ -102,9 +146,12 @@ request.interceptors.response.use(async (response, options) => {
}
else
{
const
data
=
await
response
.
clone
().
json
();
// 详情返回的response处理
if
(
data
?.
code
!=
"0000"
)
{
message
.
destroy
();
message
.
warn
(
data
?.
msg
);
if
(
data
?.
code
==
"9999"
||
data
?.
code
==
"0003"
)
{
message
.
warn
(
data
?.
msg
);
}
if
(
data
?.
code
==
"0001"
&&
window
.
location
.
href
.
indexOf
(
"login"
)
==
-
1
)
{
localStorage
.
clear
();
history
.
replace
(
"/user/login"
);
...
...
This diff is collapsed.
Click to expand it.