Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
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
ems3.3
Commits
ab6d67e8
Commit
ab6d67e8
authored
Dec 08, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12081548
parent
905daa97
Changes
37
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
548 additions
and
419 deletions
+548
-419
config.js
config/config.js
+1
-1
proxy.js
config/proxy.js
+3
-2
routes.js
config/routes.js
+1
-1
app.jsx
src/app.jsx
+2
-2
index.jsx
src/components/Addform/index.jsx
+3
-3
mtable.jsx
src/components/AutoTable/mtable.jsx
+1
-1
index.jsx
src/components/DetailPro/index.jsx
+5
-5
index.jsx
src/components/InitForm/Diyrule/index.jsx
+1
-1
index.jsx
src/components/InitForm/EditTable/index.jsx
+1
-1
FormItems.jsx
src/components/InitForm/FormItems.jsx
+6
-6
index.jsx
src/components/InitForm/index.jsx
+10
-10
AvatarDropdown.jsx
src/components/RightContent/AvatarDropdown.jsx
+1
-1
index.jsx
src/components/TagView/index.jsx
+1
-1
index.jsx
src/components/TreeRender/index.jsx
+1
-1
index.md
src/components/index.md
+1
-1
index.jsx
src/pages/device/account/index.jsx
+20
-20
index.jsx
src/pages/device/model/index.jsx
+3
-3
columns.js
src/pages/device/supplier/columns.js
+1
-1
index.jsx
src/pages/device/supplier/index.jsx
+7
-7
index.jsx
src/pages/device/type/index.jsx
+6
-6
index.jsx
src/pages/repair/fault/index.jsx
+49
-29
index.jsx
src/pages/repair/order/index.jsx
+5
-4
index.jsx
src/pages/repair/outsourcing/index.jsx
+77
-33
RepairOrderHandle.jsx
src/pages/repair/platform/RepairOrderHandle.jsx
+105
-47
columns.js
src/pages/repair/platform/columns.js
+177
-179
index.jsx
src/pages/repair/platform/index.jsx
+8
-7
index.jsx
src/pages/repair/track/index.jsx
+20
-14
index.jsx
src/pages/setting/factory/index.jsx
+2
-2
index.jsx
src/pages/setting/organization/index.jsx
+2
-2
index.jsx
src/pages/setting/role/index.jsx
+5
-5
columns.js
src/pages/setting/users/columns.js
+1
-1
index.jsx
src/pages/setting/users/index.jsx
+3
-3
index.jsx
src/pages/system/dictionary/index.jsx
+4
-4
index.jsx
src/pages/system/field/index.jsx
+5
-5
index.jsx
src/pages/system/rules/index.jsx
+4
-4
fieldsDetail.js
src/utils/fieldsDetail.js
+1
-1
run-tests.js
tests/run-tests.js
+5
-5
No files found.
config/config.js
View file @
ab6d67e8
...
@@ -25,7 +25,7 @@ const keepalive = getList(authRoutes)
...
@@ -25,7 +25,7 @@ const keepalive = getList(authRoutes)
})
})
.
map
((
it
)
=>
it
.
path
);
.
map
((
it
)
=>
it
.
path
);
console
.
log
(
keepalive
);
//
console.log(keepalive);
export
default
defineConfig
({
export
default
defineConfig
({
outputPath
:
'package'
,
outputPath
:
'package'
,
...
...
config/proxy.js
View file @
ab6d67e8
...
@@ -13,12 +13,13 @@ export default {
...
@@ -13,12 +13,13 @@ export default {
dev
:
{
dev
:
{
[
defaultSetting
.
proxypath
]:
{
[
defaultSetting
.
proxypath
]:
{
// 要代理的地址
// 要代理的地址
target
:
'http://192.168.40.117:8000'
,
// target: 'http://192.168.40.117:8000', //jf哥
target
:
'http://192.168.40.203:8000'
,
//dj哥
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
'/token'
:
{
'/token'
:
{
// 要代理的地址
// 要代理的地址
target
:
'http://192.168.40.
117
:8000'
,
target
:
'http://192.168.40.
203
:8000'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
},
},
'/staticfile/'
:
{
'/staticfile/'
:
{
...
...
config/routes.js
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
let
allauth
=
authRoutes
;
// .map((it) => ({ ...it, wrappers: ['@/wrappers/auth'] }));
let
allauth
=
authRoutes
;
// .map((it) => ({ ...it, wrappers: ['@/wrappers/auth'] }));
console
.
log
(
allauth
);
//
console.log(allauth);
export
default
[
export
default
[
{
{
...
...
src/app.jsx
View file @
ab6d67e8
...
@@ -13,7 +13,7 @@ import routes from '../config/authRoutes';
...
@@ -13,7 +13,7 @@ import routes from '../config/authRoutes';
const
{
LinkOutlined
}
=
Ant4Icons
;
const
{
LinkOutlined
}
=
Ant4Icons
;
// const isDev = process.env.NODE_ENV === 'development';
// const isDev = process.env.NODE_ENV === 'development';
const
isDev
=
true
;
const
isDev
=
true
;
console
.
log
(
isDev
);
//
console.log(isDev);
const
loginPath
=
'/user/login'
;
const
loginPath
=
'/user/login'
;
/**
/**
...
@@ -141,7 +141,7 @@ export const layout = ({ initialState, setInitialState }) => {
...
@@ -141,7 +141,7 @@ export const layout = ({ initialState, setInitialState }) => {
userId
:
initialState
?.
currentUser
?.
id
,
userId
:
initialState
?.
currentUser
?.
id
,
},
},
request
:
(
params
,
defaultMenuData
)
=>
{
request
:
(
params
,
defaultMenuData
)
=>
{
console
.
log
(
initialState
);
//
console.log(initialState);
let
lastArr
=
initialState
?.
newMenu
?.
userHavePermList
let
lastArr
=
initialState
?.
newMenu
?.
userHavePermList
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
))
?
JSON
.
parse
(
JSON
.
stringify
(
initialState
?.
newMenu
?.
userHavePermList
))
:
[],
:
[],
...
...
src/components/Addform/index.jsx
View file @
ab6d67e8
...
@@ -109,7 +109,7 @@ const App = ({ url, actionRef, setdrawer }) => {
...
@@ -109,7 +109,7 @@ const App = ({ url, actionRef, setdrawer }) => {
formRef=
{
formRef
}
formRef=
{
formRef
}
fields=
{
columns
}
fields=
{
columns
}
onValuesChange=
{
(
changedValues
,
allValues
)
=>
{
onValuesChange=
{
(
changedValues
,
allValues
)
=>
{
console
.
log
(
changedValues
,
allValues
);
//
console.log(changedValues, allValues);
if
(
Object
.
keys
(
changedValues
)[
0
]
==
'faultDetailId'
)
{
if
(
Object
.
keys
(
changedValues
)[
0
]
==
'faultDetailId'
)
{
doFetch
({
doFetch
({
url
:
'/repair/umFaultSettingDetail/queryById'
,
url
:
'/repair/umFaultSettingDetail/queryById'
,
...
@@ -117,7 +117,7 @@ const App = ({ url, actionRef, setdrawer }) => {
...
@@ -117,7 +117,7 @@ const App = ({ url, actionRef, setdrawer }) => {
id
:
changedValues
?.
faultDetailId
,
id
:
changedValues
?.
faultDetailId
,
},
},
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
console
.
log
(
res
);
//
console.log(res);
formRef
?.
current
?.
setFieldsValue
({
formRef
?.
current
?.
setFieldsValue
({
faultDescription
:
res
?.
data
?.
data
.
faultPhenomenon
,
faultDescription
:
res
?.
data
?.
data
.
faultPhenomenon
,
});
});
...
@@ -125,7 +125,7 @@ const App = ({ url, actionRef, setdrawer }) => {
...
@@ -125,7 +125,7 @@ const App = ({ url, actionRef, setdrawer }) => {
}
}
}
}
}
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
};
};
...
...
src/components/AutoTable/mtable.jsx
View file @
ab6d67e8
...
@@ -349,7 +349,7 @@ const Mtable = (props) => {
...
@@ -349,7 +349,7 @@ const Mtable = (props) => {
{
...
components
}
{
...
components
}
size=
{
size
}
size=
{
size
}
onSubmit=
{
(
params
)
=>
{
onSubmit=
{
(
params
)
=>
{
//console.log(params, 'onSubmit');
//
//
console.log(params, 'onSubmit');
let
newparams
=
{};
let
newparams
=
{};
columns
.
map
((
it
,
i
)
=>
{
columns
.
map
((
it
,
i
)
=>
{
if
(
if
(
...
...
src/components/DetailPro/index.jsx
View file @
ab6d67e8
...
@@ -25,15 +25,15 @@ function DetailPro(props) {
...
@@ -25,15 +25,15 @@ function DetailPro(props) {
res
?.
data
?.
data
[
props
.
extendField
]?.
forEach
((
it
)
=>
{
res
?.
data
?.
data
[
props
.
extendField
]?.
forEach
((
it
)
=>
{
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
});
});
console
.
log
(
'extendField:'
,
obj
);
//
console.log('extendField:', obj);
setcuritem
({
setcuritem
({
...(
res
?.
data
?.
data
??
{}),
...(
res
?.
data
?.
data
??
{}),
...
obj
,
...
obj
,
});
});
console
.
log
(
'drawerpro:'
,
{
//
console.log('drawerpro:', {
...(
res
?.
data
?.
data
??
{}),
//
...(res?.data?.data ?? {}),
...
obj
,
//
...obj,
});
//
});
return
{
return
{
success
:
res
?.
code
==
'0000'
,
success
:
res
?.
code
==
'0000'
,
...
...
src/components/InitForm/Diyrule/index.jsx
View file @
ab6d67e8
...
@@ -31,7 +31,7 @@ let Diyrule = (props) => {
...
@@ -31,7 +31,7 @@ let Diyrule = (props) => {
);
);
},
[
defval
?.
other
]);
},
[
defval
?.
other
]);
console
.
log
(
other
);
//
console.log(other);
let
{
data
,
loading
}
=
useRequest
(()
=>
{
let
{
data
,
loading
}
=
useRequest
(()
=>
{
return
doFetch
({
url
:
'/base/bmNoRule/querySelect'
,
params
:
{}
});
return
doFetch
({
url
:
'/base/bmNoRule/querySelect'
,
params
:
{}
});
...
...
src/components/InitForm/EditTable/index.jsx
View file @
ab6d67e8
...
@@ -119,7 +119,7 @@ const EditTable = (props) => {
...
@@ -119,7 +119,7 @@ const EditTable = (props) => {
recordCreatorProps=
{
false
}
recordCreatorProps=
{
false
}
size=
{
size
}
size=
{
size
}
onSubmit=
{
(
params
)
=>
{
onSubmit=
{
(
params
)
=>
{
console
.
log
(
params
,
'onSubmit'
);
//
console.log(params, 'onSubmit');
}
}
}
}
onSizeChange=
{
(
size
)
=>
{
onSizeChange=
{
(
size
)
=>
{
localStorage
.
setItem
(
'size'
,
size
);
//设置全局表格规格缓存
localStorage
.
setItem
(
'size'
,
size
);
//设置全局表格规格缓存
...
...
src/components/InitForm/FormItems.jsx
View file @
ab6d67e8
...
@@ -497,11 +497,11 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
...
@@ -497,11 +497,11 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
}
else
{
}
else
{
ifclean
=
res
?.
data
?.
dataList
.
filter
((
it
)
=>
it
.
value
==
curval
)?.[
0
]?.
value
;
ifclean
=
res
?.
data
?.
dataList
.
filter
((
it
)
=>
it
.
value
==
curval
)?.[
0
]?.
value
;
}
}
console
.
log
(
//
console.log(
curval
,
//
curval,
res
?.
data
?.
dataList
?.
map
((
it
)
=>
it
.
value
),
//
res?.data?.dataList?.map((it) => it.value),
curkey
,
//
curkey,
);
//
);
formRef
?.
current
?.
setFieldsValue
({
[
curkey
]:
ifclean
});
formRef
?.
current
?.
setFieldsValue
({
[
curkey
]:
ifclean
});
}
}
...
@@ -1179,7 +1179,7 @@ function UploadImg({ value, onChange, fieldProps }) {
...
@@ -1179,7 +1179,7 @@ function UploadImg({ value, onChange, fieldProps }) {
<
div
style=
{
{
marginTop
:
8
}
}
>
上传图片
</
div
>
<
div
style=
{
{
marginTop
:
8
}
}
>
上传图片
</
div
>
</
div
>
</
div
>
);
);
console
.
log
(
value
?.
length
,
fieldProps
.
limit
);
//
console.log(value?.length, fieldProps.limit);
return
(
return
(
<>
<>
<
Image
<
Image
...
...
src/components/InitForm/index.jsx
View file @
ab6d67e8
...
@@ -86,7 +86,7 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
...
@@ -86,7 +86,7 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
function
InitForm
({
function
InitForm
({
formRef
,
formRef
,
onFinish
=
(
vals
)
=>
{
onFinish
=
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
},
},
formKey
,
formKey
,
params
=
{},
params
=
{},
...
@@ -97,7 +97,7 @@ function InitForm({
...
@@ -97,7 +97,7 @@ function InitForm({
extendField
=
''
,
extendField
=
''
,
colProps
=
{
xs
:
24
,
sm
:
24
,
md
:
12
,
lg
:
12
,
xl
:
12
,
xxl
:
12
},
colProps
=
{
xs
:
24
,
sm
:
24
,
md
:
12
,
lg
:
12
,
xl
:
12
,
xxl
:
12
},
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
onValuesChange
=
(
changedValues
,
allValues
)
=>
{
console
.
log
(
changedValues
,
allValues
);
//
console.log(changedValues, allValues);
},
},
})
{
})
{
let
proformRef
=
useRef
();
let
proformRef
=
useRef
();
...
@@ -118,16 +118,16 @@ function InitForm({
...
@@ -118,16 +118,16 @@ function InitForm({
request=
{
async
(
params
)
=>
{
request=
{
async
(
params
)
=>
{
if
(
detailpath
)
{
if
(
detailpath
)
{
let
res
=
await
doFetch
({
url
:
detailpath
,
params
});
let
res
=
await
doFetch
({
url
:
detailpath
,
params
});
console
.
log
({
//
console.log(
{
...(
res
?.
data
?.
data
??
{}),
//
...(res?.data?.data ??
{}),
...
defaultFormValue
,
//
...defaultFormValue,
});
//
});
if
(
extendField
)
{
if
(
extendField
)
{
let
obj
=
{};
let
obj
=
{};
res
?.
data
?.
data
[
extendField
]?.
forEach
((
it
)
=>
{
res
?.
data
?.
data
[
extendField
]?.
forEach
((
it
)
=>
{
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
});
});
console
.
log
(
'extendField:'
,
obj
);
//
console.log('extendField:', obj);
return
{
return
{
...(
res
?.
data
?.
data
??
{}),
...(
res
?.
data
?.
data
??
{}),
...
obj
,
...
obj
,
...
@@ -139,9 +139,9 @@ function InitForm({
...
@@ -139,9 +139,9 @@ function InitForm({
...
defaultFormValue
,
...
defaultFormValue
,
};
};
}
else
{
}
else
{
console
.
log
({
//
console.log(
{
...
defaultFormValue
,
//
...defaultFormValue,
});
//
});
return
{
return
{
...
defaultFormValue
,
...
defaultFormValue
,
};
};
...
...
src/components/RightContent/AvatarDropdown.jsx
View file @
ab6d67e8
...
@@ -30,7 +30,7 @@ const loginOut = async () => {
...
@@ -30,7 +30,7 @@ const loginOut = async () => {
const
AvatarDropdown
=
({
menu
})
=>
{
const
AvatarDropdown
=
({
menu
})
=>
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
console
.
log
(
'initialState,'
,
initialState
);
//
console.log('initialState,', initialState);
const
[
visible
,
cv
]
=
useState
(
false
),
const
[
visible
,
cv
]
=
useState
(
false
),
[
formRef
]
=
Form
.
useForm
(),
[
formRef
]
=
Form
.
useForm
(),
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
...
src/components/TagView/index.jsx
View file @
ab6d67e8
...
@@ -55,7 +55,7 @@ const TagView = ({ children, home }) => {
...
@@ -55,7 +55,7 @@ const TagView = ({ children, home }) => {
if
(
currentMenu
.
path
)
{
if
(
currentMenu
.
path
)
{
const
tagsCopy
=
tagList
.
map
((
item
)
=>
{
const
tagsCopy
=
tagList
.
map
((
item
)
=>
{
if
(
currentMenu
?.
path
===
item
.
path
)
{
if
(
currentMenu
?.
path
===
item
.
path
)
{
console
.
log
(
item
);
//
console.log(item);
hasOpen
=
true
;
hasOpen
=
true
;
// 刷新浏览器时,重新覆盖当前 path 的 children
// 刷新浏览器时,重新覆盖当前 path 的 children
return
{
...
item
,
active
:
true
,
children
:
item
.
children
};
return
{
...
item
,
active
:
true
,
children
:
item
.
children
};
...
...
src/components/TreeRender/index.jsx
View file @
ab6d67e8
...
@@ -422,7 +422,7 @@ function TreeRender({ url, deleteurl, saveurl, onselected, params, noaction, max
...
@@ -422,7 +422,7 @@ function TreeRender({ url, deleteurl, saveurl, onselected, params, noaction, max
<
Tree
<
Tree
onSelect=
{
(
selectedKeys
,
e
)
=>
{
onSelect=
{
(
selectedKeys
,
e
)
=>
{
// console.log(selectedKeys);
//
//
console.log(selectedKeys);
onselected
?.(
selectedKeys
,
e
,
alldata
);
onselected
?.(
selectedKeys
,
e
,
alldata
);
}
}
}
}
autoExpandParent=
{
autoExpandParent
}
autoExpandParent=
{
autoExpandParent
}
...
...
src/components/index.md
View file @
ab6d67e8
...
@@ -81,7 +81,7 @@ export default () => {
...
@@ -81,7 +81,7 @@ export default () => {
},
},
]
}
]
}
onSearch=
{
(
value
)
=>
{
onSearch=
{
(
value
)
=>
{
console
.
log
(
'input'
,
value
);
//
console.log('input', value);
}
}
}
}
/>
/>
);
);
...
...
src/pages/device/account/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
7 13:43:37
* @Last Modified time: 2022-12-0
8 15:08:04
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -481,9 +481,9 @@ function Model(props) {
...
@@ -481,9 +481,9 @@ function Model(props) {
// detailpath: urlParams.detail,
// detailpath: urlParams.detail,
// params:
{
id
:
row
.
id
},
// params:
{
id
:
row
.
id
},
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// console.log(1);
//
//
console.log(1);
// let equipmentCharList = [];
// let equipmentCharList = [];
// console.log('id:', row.id);
//
//
console.log('id:', row.id);
// for (let i in vals)
{
// for (let i in vals)
{
// if (!isNaN(Number(i)))
{
// if (!isNaN(Number(i)))
{
// equipmentCharList.push(
{
// equipmentCharList.push(
{
...
@@ -567,7 +567,7 @@ function Model(props) {
...
@@ -567,7 +567,7 @@ function Model(props) {
val
:
'only'
,
val
:
'only'
,
title
:
'编辑子设备'
,
title
:
'编辑子设备'
,
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// console.log(1);
//
//
console.log(1);
// let params =
{
// let params =
{
// ...vals,
// ...vals,
// id: row.id,
// id: row.id,
...
@@ -607,7 +607,7 @@ function Model(props) {
...
@@ -607,7 +607,7 @@ function Model(props) {
val
:
'only'
,
val
:
'only'
,
title
:
'履历登记'
,
title
:
'履历登记'
,
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// console.log(1);
//
//
console.log(1);
// let params =
{
// let params =
{
// ...vals,
// ...vals,
// id: row.id,
// id: row.id,
...
@@ -799,7 +799,7 @@ function Model(props) {
...
@@ -799,7 +799,7 @@ function Model(props) {
url
:
urlParams
.
detail
,
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
params
:
{
id
:
drawer
?.
item
?.
id
},
});
});
console
.
log
(
res
?.
data
?.
data
);
//
console.log(res?.data?.data);
let
obj
=
{};
let
obj
=
{};
res
?.
data
?.
data
[
'equipmentCharList'
]?.
forEach
((
it
)
=>
{
res
?.
data
?.
data
[
'equipmentCharList'
]?.
forEach
((
it
)
=>
{
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
...
@@ -1191,7 +1191,7 @@ function Model(props) {
...
@@ -1191,7 +1191,7 @@ function Model(props) {
url
:
'/asset/equipment/children/selected/queryList'
,
url
:
'/asset/equipment/children/selected/queryList'
,
params
:
{
id
:
drawer
?.
item
?.
id
},
params
:
{
id
:
drawer
?.
item
?.
id
},
});
});
// console.log(result);
//
//
console.log(result);
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
setSelectArr
(
result
?.
data
?.
dataList
.
map
((
it
)
=>
it
.
id
));
setSelectArr
(
result
?.
data
?.
dataList
.
map
((
it
)
=>
it
.
id
));
}
}
...
@@ -1365,13 +1365,13 @@ function Model(props) {
...
@@ -1365,13 +1365,13 @@ function Model(props) {
selectedRowKeys
:
selectArr
,
selectedRowKeys
:
selectArr
,
// defaultSelectedRowKeys: ,
// defaultSelectedRowKeys: ,
onSelect
:
(
record
,
selected
,
selectedRows
,
nativeEvent
)
=>
{
onSelect
:
(
record
,
selected
,
selectedRows
,
nativeEvent
)
=>
{
console
.
log
(
'selectedRowKeys changed: '
,
record
,
selected
,
selectedRows
);
//
console.log('selectedRowKeys changed: ', record, selected, selectedRows);
setSelectArr
(()
=>
{
setSelectArr
(()
=>
{
return
selectedRows
.
map
((
it
)
=>
it
.
id
);
return
selectedRows
.
map
((
it
)
=>
it
.
id
);
});
});
},
},
onSelectAll
:
(
selected
,
selectedRows
,
changeRows
)
=>
{
onSelectAll
:
(
selected
,
selectedRows
,
changeRows
)
=>
{
console
.
log
(
selected
,
selectedRows
,
changeRows
);
//
console.log(selected, selectedRows, changeRows);
if
(
selected
)
{
if
(
selected
)
{
let
arr
=
selectArr
.
concat
(
changeRows
.
map
((
it
)
=>
it
.
id
));
let
arr
=
selectArr
.
concat
(
changeRows
.
map
((
it
)
=>
it
.
id
));
setSelectArr
(
arr
);
setSelectArr
(
arr
);
...
@@ -1380,7 +1380,7 @@ function Model(props) {
...
@@ -1380,7 +1380,7 @@ function Model(props) {
}
}
},
},
onSelectNone
:
()
=>
{
onSelectNone
:
()
=>
{
console
.
log
(
11
);
//
console.log(11);
setSelectArr
([]);
setSelectArr
([]);
},
},
}
}
}
}
...
@@ -1388,7 +1388,7 @@ function Model(props) {
...
@@ -1388,7 +1388,7 @@ function Model(props) {
<
Space
style=
{
{
marginTop
:
16
}
}
>
<
Space
style=
{
{
marginTop
:
16
}
}
>
<
Button
<
Button
onClick=
{
()
=>
{
onClick=
{
()
=>
{
console
.
log
(
drawer
);
//
console.log(drawer);
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
visible
:
false
,
...
@@ -1406,7 +1406,7 @@ function Model(props) {
...
@@ -1406,7 +1406,7 @@ function Model(props) {
<
Button
<
Button
type=
"primary"
type=
"primary"
onClick=
{
async
()
=>
{
onClick=
{
async
()
=>
{
console
.
log
(
selectArr
);
//
console.log(selectArr);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams_childEquipment
.
save
,
url
:
urlParams_childEquipment
.
save
,
params
:
{
params
:
{
...
@@ -1444,7 +1444,7 @@ function Model(props) {
...
@@ -1444,7 +1444,7 @@ function Model(props) {
url
:
'/asset/equipment/children/selected/queryList'
,
url
:
'/asset/equipment/children/selected/queryList'
,
params
:
{
id
:
drawer
?.
item
?.
id
},
params
:
{
id
:
drawer
?.
item
?.
id
},
});
});
// console.log(result);
//
//
console.log(result);
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
setSelectArr
(
result
?.
data
?.
dataList
.
map
((
it
)
=>
it
.
id
));
setSelectArr
(
result
?.
data
?.
dataList
.
map
((
it
)
=>
it
.
id
));
}
}
...
@@ -1891,7 +1891,7 @@ function Model(props) {
...
@@ -1891,7 +1891,7 @@ function Model(props) {
<
InitForm
<
InitForm
fields=
{
fields
[
activeTab
]
}
fields=
{
fields
[
activeTab
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams_resume
.
save
,
url
:
urlParams_resume
.
save
,
params
:
{
...
vals
,
type
:
'1'
,
equipmentId
:
drawer
?.
item
?.
id
},
params
:
{
...
vals
,
type
:
'1'
,
equipmentId
:
drawer
?.
item
?.
id
},
...
@@ -1916,7 +1916,7 @@ function Model(props) {
...
@@ -1916,7 +1916,7 @@ function Model(props) {
<
InitForm
<
InitForm
fields=
{
fields
[
activeTab
]
}
fields=
{
fields
[
activeTab
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams_resume
.
save
,
url
:
urlParams_resume
.
save
,
params
:
{
...
vals
,
type
:
'2'
,
equipmentId
:
drawer
?.
item
?.
id
},
params
:
{
...
vals
,
type
:
'2'
,
equipmentId
:
drawer
?.
item
?.
id
},
...
@@ -1941,7 +1941,7 @@ function Model(props) {
...
@@ -1941,7 +1941,7 @@ function Model(props) {
<
InitForm
<
InitForm
fields=
{
fields
[
activeTab
]
}
fields=
{
fields
[
activeTab
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams_resume
.
save
,
url
:
urlParams_resume
.
save
,
params
:
{
...
vals
,
type
:
'3'
,
equipmentId
:
drawer
?.
item
?.
id
},
params
:
{
...
vals
,
type
:
'3'
,
equipmentId
:
drawer
?.
item
?.
id
},
...
@@ -1966,7 +1966,7 @@ function Model(props) {
...
@@ -1966,7 +1966,7 @@ function Model(props) {
<
InitForm
<
InitForm
fields=
{
fields
[
activeTab
]
}
fields=
{
fields
[
activeTab
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams_resume
.
save
,
url
:
urlParams_resume
.
save
,
params
:
{
...
vals
,
type
:
'4'
,
equipmentId
:
drawer
?.
item
?.
id
},
params
:
{
...
vals
,
type
:
'4'
,
equipmentId
:
drawer
?.
item
?.
id
},
...
@@ -1991,7 +1991,7 @@ function Model(props) {
...
@@ -1991,7 +1991,7 @@ function Model(props) {
<
InitForm
<
InitForm
fields=
{
fields
[
activeTab
]
}
fields=
{
fields
[
activeTab
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams_resume
.
save
,
url
:
urlParams_resume
.
save
,
params
:
{
...
vals
,
type
:
'5'
,
equipmentId
:
drawer
?.
item
?.
id
},
params
:
{
...
vals
,
type
:
'5'
,
equipmentId
:
drawer
?.
item
?.
id
},
...
@@ -2089,7 +2089,7 @@ function Model(props) {
...
@@ -2089,7 +2089,7 @@ function Model(props) {
id
:
drawer
?.
title
==
'编辑'
?
drawer
?.
item
?.
id
:
''
,
id
:
drawer
?.
title
==
'编辑'
?
drawer
?.
item
?.
id
:
''
,
equipmentCharReqList
,
equipmentCharReqList
,
};
};
console
.
log
(
params
,
'!!!!'
);
//
console.log(params, '!!!!');
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
...
@@ -2150,7 +2150,7 @@ function Model(props) {
...
@@ -2150,7 +2150,7 @@ function Model(props) {
val
:
'only'
,
val
:
'only'
,
type
:
'add'
,
type
:
'add'
,
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// console.log(vals);
//
//
console.log(vals);
// let params =
{
// let params =
{
// ...vals,
// ...vals,
//
};
//
};
...
...
src/pages/device/model/index.jsx
View file @
ab6d67e8
...
@@ -65,7 +65,7 @@ function Model(props) {
...
@@ -65,7 +65,7 @@ function Model(props) {
detailpath
:
urlParams
.
detail
,
detailpath
:
urlParams
.
detail
,
params
:
{
id
:
row
.
id
},
params
:
{
id
:
row
.
id
},
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
id
,
id
:
row
.
id
,
...
@@ -154,8 +154,8 @@ function Model(props) {
...
@@ -154,8 +154,8 @@ function Model(props) {
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
// console.log(1);
//
//
console.log(1);
console
.
log
(
drawer
);
//
console.log(drawer);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
};
};
...
...
src/pages/device/supplier/columns.js
View file @
ab6d67e8
...
@@ -109,7 +109,7 @@ function getcolumns(setdrawer) {
...
@@ -109,7 +109,7 @@ function getcolumns(setdrawer) {
unCheckedChildren
=
"禁用"
unCheckedChildren
=
"禁用"
defaultChecked
=
{
row
.
status
==
1
}
defaultChecked
=
{
row
.
status
==
1
}
onChange
=
{(
flag
)
=>
{
onChange
=
{(
flag
)
=>
{
// console.log(e);
//
//
console.log(e);
if
(
flag
)
{
if
(
flag
)
{
doFetch
({
doFetch
({
url
:
'/asset/equipmentSupplier/update/status'
,
url
:
'/asset/equipmentSupplier/update/status'
,
...
...
src/pages/device/supplier/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
1 17:13:05
* @Last Modified time: 2022-12-0
8 15:09:50
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -48,7 +48,7 @@ function Supplier(props) {
...
@@ -48,7 +48,7 @@ function Supplier(props) {
type
:
'add'
,
type
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
let
equipmentSupplierCharReqList
=
[];
let
equipmentSupplierCharReqList
=
[];
console
.
log
(
'id:'
,
row
.
id
);
//
console.log('id:', row.id);
for
(
let
i
in
vals
)
{
for
(
let
i
in
vals
)
{
if
(
!
isNaN
(
Number
(
i
)))
{
if
(
!
isNaN
(
Number
(
i
)))
{
equipmentSupplierCharReqList
.
push
({
equipmentSupplierCharReqList
.
push
({
...
@@ -213,15 +213,15 @@ function Supplier(props) {
...
@@ -213,15 +213,15 @@ function Supplier(props) {
url
:
urlParams
.
detail
,
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
params
:
{
id
:
drawer
?.
item
?.
id
},
});
});
console
.
log
(
res
?.
data
?.
data
);
//
console.log(res?.data?.data);
let
obj
=
{};
let
obj
=
{};
res
?.
data
?.
data
[
'equipmentSupplierCharReqList'
]?.
forEach
((
it
)
=>
{
res
?.
data
?.
data
[
'equipmentSupplierCharReqList'
]?.
forEach
((
it
)
=>
{
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
obj
[
it
?.
fieldId
]
=
it
?.
fieldRealValue
;
});
});
console
.
log
(
'drawerpro:'
,
{
//
console.log('drawerpro:', {
...(
res
?.
data
?.
data
??
{}),
//
...(res?.data?.data ?? {}),
...
obj
,
//
...obj,
});
//
});
setrequest
(
setrequest
(
{
{
...(
res
?.
data
?.
data
??
{}),
...(
res
?.
data
?.
data
??
{}),
...
...
src/pages/device/type/index.jsx
View file @
ab6d67e8
...
@@ -65,7 +65,7 @@ function Type(props) {
...
@@ -65,7 +65,7 @@ function Type(props) {
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
key
,
id
:
row
.
key
,
...
@@ -73,7 +73,7 @@ function Type(props) {
...
@@ -73,7 +73,7 @@ function Type(props) {
equipmentTypeName
:
vals
.
title
,
equipmentTypeName
:
vals
.
title
,
};
};
delete
params
.
title
;
delete
params
.
title
;
console
.
log
(
params
);
//
console.log(params);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
...
@@ -88,7 +88,7 @@ function Type(props) {
...
@@ -88,7 +88,7 @@ function Type(props) {
}
}
},
},
}));
}));
console
.
log
(
row
);
//
console.log(row);
},
},
}
}
}
}
>
>
...
@@ -113,7 +113,7 @@ function Type(props) {
...
@@ -113,7 +113,7 @@ function Type(props) {
title
:
'新增子级'
,
title
:
'新增子级'
,
val
:
'addChild'
,
val
:
'addChild'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
parentId
:
row
.
key
,
parentId
:
row
.
key
,
...
@@ -135,7 +135,7 @@ function Type(props) {
...
@@ -135,7 +135,7 @@ function Type(props) {
}
}
},
},
}));
}));
console
.
log
(
drawer
.
item
);
//
console.log(drawer.item);
},
},
}
}
}
}
>
>
...
@@ -217,7 +217,7 @@ function Type(props) {
...
@@ -217,7 +217,7 @@ function Type(props) {
params
:
{},
params
:
{},
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
drawer
);
//
console.log(drawer);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
parentId
:
0
,
parentId
:
0
,
...
...
src/pages/repair/fault/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-07 11:19:30
* @Date: 2022-12-07 11:19:30
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
7 15:12:48
* @Last Modified time: 2022-12-0
8 15:48:49
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -34,7 +34,9 @@ function Fault(props) {
...
@@ -34,7 +34,9 @@ function Fault(props) {
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
open
:
false
,
});
});
const
[
drawergz
,
setdrawergz
]
=
useState
({
open
:
false
,
});
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
onSuccess
:
(
res
,
params
)
=>
{
...
@@ -131,24 +133,11 @@ function Fault(props) {
...
@@ -131,24 +133,11 @@ function Fault(props) {
}
}
},
[
drawer
?.
type
]);
},
[
drawer
?.
type
]);
const
FaultName
=
()
=>
{
const
FaultName
=
(
props
)
=>
{
const
[
request
,
setrequest
]
=
useState
();
const
[
request
,
setrequest
]
=
useState
();
const
[
drawergz
,
setdrawergz
]
=
useState
({
const
gzmcref
=
useRef
();
open
:
false
,
const
columns
=
useMemo
(()
=>
{
});
return
[
useEffect
(()
=>
{
const
fn
=
async
()
=>
{
let
params
=
{
id
:
drawer
?.
item
?.
id
};
let
res
=
await
doFetch
({
url
:
'/repair/umFaultSetting/queryById'
,
params
});
setrequest
(
res
?.
data
.
data
);
};
fn
();
},
[]);
return
(
<>
<
ProDescriptions
dataSource=
{
request
}
columns=
{
columns
}
/>
<
AutoTable
columns=
{
[
{
{
title
:
'故障名称'
,
title
:
'故障名称'
,
dataIndex
:
'faultDetailName'
,
dataIndex
:
'faultDetailName'
,
...
@@ -170,7 +159,21 @@ function Fault(props) {
...
@@ -170,7 +159,21 @@ function Fault(props) {
key
:
'faultSolution'
,
key
:
'faultSolution'
,
search
:
false
,
search
:
false
,
},
},
]
}
];
},
[]);
useEffect
(()
=>
{
const
fn
=
async
()
=>
{
let
params
=
{
id
:
drawer
?.
item
?.
id
};
let
res
=
await
doFetch
({
url
:
'/repair/umFaultSetting/queryById'
,
params
});
setrequest
(
res
?.
data
.
data
);
};
fn
();
},
[]);
return
(
<>
<
ProDescriptions
dataSource=
{
request
}
columns=
{
columns
}
/>
<
AutoTable
columns=
{
columns
}
path=
"/repair/umFaultSettingDetail/queryById"
path=
"/repair/umFaultSettingDetail/queryById"
params=
{
{
id
:
drawer
?.
item
.
id
}
}
params=
{
{
id
:
drawer
?.
item
.
id
}
}
pageextra=
{
'add'
}
pageextra=
{
'add'
}
...
@@ -194,6 +197,23 @@ function Fault(props) {
...
@@ -194,6 +197,23 @@ function Fault(props) {
},
},
}
}
}
}
/>
/>
<
DrawerPro
placement=
"right"
fields=
{
columns
}
actionRef=
{
gzmcref
}
style=
{
{
transform
:
'translateX(180px)'
}
}
width=
{
'100%'
}
defaultFormValue=
{
drawergz
?.
item
}
onClose=
{
()
=>
{
setdrawergz
((
s
)
=>
({
...
s
,
open
:
false
,
type
:
null
,
item
:
null
,
}));
}
}
{
...
drawergz
}
/>
</>
</>
);
);
};
};
...
...
src/pages/repair/order/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
6 13:28:43
* @Last Modified time: 2022-12-0
8 09:02:50
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -119,7 +119,7 @@ function Failure(props) {
...
@@ -119,7 +119,7 @@ function Failure(props) {
val
:
'only'
,
val
:
'only'
,
title
:
'编辑子设备'
,
title
:
'编辑子设备'
,
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// console.log(1);
//
//
console.log(1);
// let params =
{
// let params =
{
// ...vals,
// ...vals,
// id: row.id,
// id: row.id,
...
@@ -159,7 +159,7 @@ function Failure(props) {
...
@@ -159,7 +159,7 @@ function Failure(props) {
val
:
'only'
,
val
:
'only'
,
title
:
'履历登记'
,
title
:
'履历登记'
,
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// console.log(1);
//
//
console.log(1);
// let params =
{
// let params =
{
// ...vals,
// ...vals,
// id: row.id,
// id: row.id,
...
@@ -256,8 +256,9 @@ function Failure(props) {
...
@@ -256,8 +256,9 @@ function Failure(props) {
break
;
break
;
}
}
};
};
const
containderef
=
useRef
();
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
ref=
{
containderef
}
>
<
AutoTable
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
维修工单
</
h3
>
}
pagetitle=
{
<
h3
className=
"page-title"
>
维修工单
</
h3
>
}
columns=
{
columns
}
columns=
{
columns
}
...
...
src/pages/repair/outsourcing/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
6 19:43:22
* @Last Modified time: 2022-12-0
8 14:35:09
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -142,10 +142,10 @@ function Failure(props) {
...
@@ -142,10 +142,10 @@ function Failure(props) {
fields=
{
[
fields=
{
[
{
{
title
:
'最新外协人员'
,
title
:
'最新外协人员'
,
dataIndex
:
'causeFailure'
,
dataIndex
:
'newRepairUserName'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
key
:
'causeFailure'
,
fieldProps
:
{
disabled
:
true
},
key
:
'newRepairUserName'
,
},
},
{
{
title
:
'外协人员'
,
title
:
'外协人员'
,
...
@@ -155,13 +155,13 @@ function Failure(props) {
...
@@ -155,13 +155,13 @@ function Failure(props) {
valueType
:
'select'
,
valueType
:
'select'
,
options
:
{
options
:
{
path
:
'/repair/umOtherUnitsOrder/selectionAgain'
,
path
:
'/repair/umOtherUnitsOrder/selectionAgain'
,
params
:
{
otherUnitsOrderI
d
:
drawer
?.
item
.
id
},
params
:
{
i
d
:
drawer
?.
item
.
id
},
},
},
},
},
]
}
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
let
params
=
{
let
params
=
{
otherUnits
Finish
:
vals
,
otherUnits
AssistList
:
vals
?.
otherUnitsAssistList
.
map
((
it
)
=>
({
assistUserId
:
it
}))
,
id
:
drawer
?.
item
?.
id
,
id
:
drawer
?.
item
?.
id
,
};
};
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
...
@@ -182,6 +182,45 @@ function Failure(props) {
...
@@ -182,6 +182,45 @@ function Failure(props) {
);
);
};
};
// 外协派单
const
Wxpd
=
()
=>
{
const
columns
=
[
{
title
:
'外协人员'
,
dataIndex
:
'otherUnitsAssistList'
,
key
:
'otherUnitsAssistList'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umOtherUnitsOrder/selection'
,
params
:
{
id
:
drawer
?.
item
.
id
}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
];
return
(
<>
<
InitForm
fields=
{
columns
}
onFinish=
{
async
(
vals
)
=>
{
let
params
=
{
otherUnitsAssistList
:
[{
assistUserId
:
vals
?.
otherUnitsAssistList
}],
id
:
drawer
?.
item
.
id
,
};
let
res
=
await
doFetch
({
url
:
'/repair/umOtherUnitsOrder/dispatchById'
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'派单成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
actionRef
.
current
.
reload
();
}
}
}
/>
</>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -235,21 +274,14 @@ function Failure(props) {
...
@@ -235,21 +274,14 @@ function Failure(props) {
)
:
(
)
:
(
<
a
<
a
onClick=
{
async
()
=>
{
onClick=
{
async
()
=>
{
let
params
=
{
id
:
row
?.
id
,
};
let
res
=
await
doFetch
({
url
:
'/repair/umOtherUnitsOrder/dispatchById'
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'派单成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
open
:
false
,
open
:
true
,
type
:
'wxpd'
,
item
:
row
,
val
:
'only'
,
title
:
'派单'
,
}));
}));
actionRef
.
current
.
reload
();
}
}
}
}
}
>
>
派单
派单
...
@@ -295,7 +327,7 @@ function Failure(props) {
...
@@ -295,7 +327,7 @@ function Failure(props) {
};
};
// 未完成按钮
// 未完成按钮
const
unfinishBtn
=
(
text
,
row
,
_
,
action
)
=>
{
const
unfinishBtn
=
(
text
,
row
,
_
,
action
)
=>
{
if
(
row
?.
status
==
1
)
{
if
(
row
?.
status
==
1
||
row
?.
status
==
2
)
{
return
(
return
(
<
PremButton
<
PremButton
pop=
{
{
pop=
{
{
...
@@ -314,19 +346,23 @@ function Failure(props) {
...
@@ -314,19 +346,23 @@ function Failure(props) {
删除
删除
</
PremButton
>
</
PremButton
>
);
);
}
else
if
(
row
?.
status
==
2
)
{
}
else
{
return
(
return
(
<
PremButton
<
PremButton
onClick=
{
()
=>
{
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
item
:
row
,
item
:
{
...
row
,
trackAssistList
:
row
?.
trackAssistList
?
row
?.
trackAssistList
:
[],
},
title
:
'重新指派'
,
type
:
'Reassig'
,
type
:
'Reassig'
,
open
:
true
,
open
:
true
,
}));
}));
}
}
},
btn=
{
{
size
:
'small'
,
}
}
}
}
>
>
重新指派
重新指派
...
@@ -337,7 +373,7 @@ function Failure(props) {
...
@@ -337,7 +373,7 @@ function Failure(props) {
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
console
.
log
(
defcolumn
);
//
console.log(defcolumn);
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
if
(
activeTabKey
==
'1'
)
{
if
(
activeTabKey
==
'1'
)
{
...
@@ -371,11 +407,19 @@ function Failure(props) {
...
@@ -371,11 +407,19 @@ function Failure(props) {
const
selectType
=
(
type
)
=>
{
const
selectType
=
(
type
)
=>
{
switch
(
type
)
{
switch
(
type
)
{
case
'add'
:
case
'add'
:
return
<
Addform
/>;
return
(
<
Addform
url=
{
'/repair/umOtherUnitsOrder/save'
}
setdrawer=
{
setdrawer
}
actionRef=
{
actionRef
}
/>
);
case
'comouts'
:
case
'comouts'
:
return
<
CompleteOuts
/>;
return
<
CompleteOuts
/>;
case
'Reassig'
:
case
'Reassig'
:
return
<
Reassig
/>;
return
<
Reassig
/>;
case
'wxpd'
:
return
<
Wxpd
/>;
default
:
default
:
break
;
break
;
}
}
...
...
src/pages/repair/platform/RepairOrderHandle.jsx
View file @
ab6d67e8
...
@@ -2,16 +2,16 @@
...
@@ -2,16 +2,16 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
5 16:31:25
* @Last Modified time: 2022-12-0
8 15:07:19
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
InitForm
from
'@/components/InitForm'
;
import
InitForm
from
'@/components/InitForm'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
message
}
from
'antd'
;
const
App
=
({
type
,
id
,
actionRef
,
url
,
setdrawer
})
=>
{
const
App
=
({
type
,
id
,
actionRef
,
url
,
setdrawer
})
=>
{
let
columns
=
[];
const
columns
=
{
if
(
type
==
'wxjd'
)
{
wxjd
:
[
columns
=
[
{
{
title
:
'协助维修人员'
,
title
:
'协助维修人员'
,
dataIndex
:
'repairAssistList'
,
dataIndex
:
'repairAssistList'
,
...
@@ -24,21 +24,20 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
...
@@ -24,21 +24,20 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
mode
:
'multiple'
,
mode
:
'multiple'
,
},
},
},
},
];
],
}
else
if
(
type
==
'wxpd'
)
{
wxpd
:
[
columns
=
[
{
{
title
:
'维修人员'
,
title
:
'维修人员'
,
dataIndex
:
'
faultDescription
'
,
dataIndex
:
'
repairId
'
,
key
:
'
faultDescription
'
,
key
:
'
repairId
'
,
valueType
:
'select'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysUser/selection'
},
options
:
{
path
:
'/auth/sysUser/selection'
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
{
{
title
:
'协助维修人员'
,
title
:
'协助维修人员'
,
dataIndex
:
'
faultDescription
'
,
dataIndex
:
'
repairAssistList
'
,
key
:
'
faultDescription
'
,
key
:
'
repairAssistList
'
,
valueType
:
'select'
,
valueType
:
'select'
,
options
:
{
path
:
'/repair/umRepairOrder/selection'
,
params
:
{
id
}
},
options
:
{
path
:
'/repair/umRepairOrder/selection'
,
params
:
{
id
}
},
fieldProps
:
{
fieldProps
:
{
...
@@ -47,9 +46,8 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
...
@@ -47,9 +46,8 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
mode
:
'multiple'
,
mode
:
'multiple'
,
},
},
},
},
];
],
}
else
if
(
type
==
'zzpd'
)
{
zzpd
:
[
columns
=
[
{
{
title
:
'追踪人员'
,
title
:
'追踪人员'
,
dataIndex
:
'trackAssistList'
,
dataIndex
:
'trackAssistList'
,
...
@@ -58,25 +56,43 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
...
@@ -58,25 +56,43 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
options
:
{
path
:
'/auth/sysUser/selection'
},
options
:
{
path
:
'/auth/sysUser/selection'
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
];
],
}
else
if
(
type
==
'wpd'
)
{
wpd
:
[
columns
=
[
{
{
title
:
'外协人员'
,
title
:
'外协人员'
,
dataIndex
:
'otherUnitsAssistList'
,
dataIndex
:
'otherUnitsAssistList'
,
key
:
'otherUnitsAssistList'
,
key
:
'otherUnitsAssistList'
,
valueType
:
'select'
,
valueType
:
'select'
,
options
:
{
path
:
'/
auth/sysUs
er/selection'
},
options
:
{
path
:
'/
repair/umOtherUnitsOrd
er/selection'
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
];
],
};
const
finishHandle
=
{
wxjd
:
async
(
vals
)
=>
{
//console.log(vals);
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
({
assistUserId
:
it
,
}));
let
params
=
{
...
vals
,
id
,
};
let
res
=
await
doFetch
({
url
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
actionRef
.
current
.
reload
();
}
}
return
(
},
<>
wxpd
:
async
(
vals
)
=>
{
<
InitForm
//console.log(vals);
fields=
{
columns
}
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
{
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
{
return
{
return
{
assistUserId
:
it
,
assistUserId
:
it
,
...
@@ -94,12 +110,54 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
...
@@ -94,12 +110,54 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
message
.
success
(
'操作成功!'
);
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
open
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
zzpd
:
async
(
vals
)
=>
{
//console.log(vals);
let
params
=
{
trackAssistList
:
[{
assistUserId
:
vals
?.
trackAssistList
}],
id
,
};
//console.log(params);
let
res
=
await
doFetch
({
url
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}));
actionRef
.
current
.
reload
();
actionRef
.
current
.
reload
();
}
}
}
}
},
/>
wpd
:
async
(
vals
)
=>
{
let
params
=
{
otherUnitsAssistList
:
[{
assistUserId
:
vals
?.
otherUnitsAssistList
}],
id
,
};
let
res
=
await
doFetch
({
url
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
actionRef
.
current
.
reload
();
}
},
};
return
(
<>
<
InitForm
fields=
{
columns
[
type
]
}
onFinish=
{
finishHandle
[
type
]
}
/>
</>
</>
);
);
};
};
...
...
src/pages/repair/platform/columns.js
View file @
ab6d67e8
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
[
return
[
{
{
"tab"
:
"维修工单"
,
tab
:
'维修工单'
,
"key"
:
"1"
,
key
:
'1'
,
"columns"
:
[
columns
:
[
{
{
"title"
:
"维修单号"
,
title
:
'维修单号'
,
"dataIndex"
:
"repairOrderNo"
,
dataIndex
:
'repairOrderNo'
,
"key"
:
"repairOrderNo"
key
:
'repairOrderNo'
,
},
},
{
{
"title"
:
"设备编号"
,
title
:
'设备编号'
,
"dataIndex"
:
"equipmentNo"
,
dataIndex
:
'equipmentNo'
,
"key"
:
"equipmentNo"
key
:
'equipmentNo'
,
},
},
{
{
"title"
:
"设备名称"
,
title
:
'设备名称'
,
"dataIndex"
:
"equipmentName"
,
dataIndex
:
'equipmentName'
,
"key"
:
"equipmentName"
key
:
'equipmentName'
,
},
},
{
{
"title"
:
"故障描述"
,
title
:
'故障描述'
,
"dataIndex"
:
"faultDescription"
,
dataIndex
:
'faultDescription'
,
"key"
:
"faultDescription"
key
:
'faultDescription'
,
},
},
{
{
"title"
:
"报修人员"
,
title
:
'报修人员'
,
"dataIndex"
:
"repairUserName"
,
dataIndex
:
'repairUserName'
,
"key"
:
"repairUserName"
key
:
'repairUserName'
,
},
},
{
{
"title"
:
"报修时间"
,
title
:
'报修时间'
,
"dataIndex"
:
"repairTime"
,
dataIndex
:
'repairTime'
,
"key"
:
"repairTimeList"
,
key
:
'repairTimeList'
,
"valueType"
:
"dateTimeRange"
valueType
:
'dateTimeRange'
,
},
},
{
{
"title"
:
"报修单号"
,
title
:
'报修单号'
,
"dataIndex"
:
"repairNo"
,
dataIndex
:
'repairNo'
,
"key"
:
"repairNo"
key
:
'repairNo'
,
},
},
{
{
"title"
:
"工单状态"
,
title
:
'工单状态'
,
"dataIndex"
:
"statusName"
,
dataIndex
:
'statusName'
,
"key"
:
"statusName"
key
:
'statusName'
,
}
},
],
],
"pathconfig"
:
{
pathconfig
:
{
"enableadd"
:
false
,
enableadd
:
false
,
"enableedit"
:
false
,
enableedit
:
false
,
"enabledelete"
:
false
,
enabledelete
:
false
,
"enabledetail"
:
false
,
enabledetail
:
false
,
"add"
:
""
,
add
:
''
,
"edit"
:
""
,
edit
:
''
,
"list"
:
"/repair/umRepairOrder/queryRepairOrderList"
,
list
:
'/repair/umRepairOrder/queryRepairOrderList'
,
"delete"
:
""
,
delete
:
''
,
"detail"
:
""
detail
:
''
,
}
},
},
},
{
{
"tab"
:
"追踪工单"
,
tab
:
'追踪工单'
,
"key"
:
"2"
,
key
:
'2'
,
"columns"
:
[
columns
:
[
{
{
"title"
:
"追踪单号"
,
title
:
'追踪单号'
,
"dataIndex"
:
"taskOrderNo"
,
dataIndex
:
'taskOrderNo'
,
"key"
:
"taskOrderNo"
key
:
'taskOrderNo'
,
},
},
{
{
"title"
:
"设备编号"
,
title
:
'设备编号'
,
"dataIndex"
:
"equipmentNo"
,
dataIndex
:
'equipmentNo'
,
"key"
:
"equipmentNo"
key
:
'equipmentNo'
,
},
},
{
{
"title"
:
"设备名称"
,
title
:
'设备名称'
,
"dataIndex"
:
"equipmentName"
,
dataIndex
:
'equipmentName'
,
"key"
:
"equipmentName"
key
:
'equipmentName'
,
},
},
{
{
"title"
:
"故障描述"
,
title
:
'故障描述'
,
"dataIndex"
:
"faultDescription"
,
dataIndex
:
'faultDescription'
,
"key"
:
"faultDescription"
key
:
'faultDescription'
,
},
},
{
{
"title"
:
"创建时间"
,
title
:
'创建时间'
,
"dataIndex"
:
"createTime"
,
dataIndex
:
'createTime'
,
"key"
:
"createTime"
key
:
'createTime'
,
},
},
{
{
"title"
:
"创建人员"
,
title
:
'创建人员'
,
"dataIndex"
:
"createUserName"
,
dataIndex
:
'createUserName'
,
"key"
:
"createUserName"
key
:
'createUserName'
,
},
},
{
{
"title"
:
"来源单号"
,
title
:
'来源单号'
,
"dataIndex"
:
"dataSourcesNo"
,
dataIndex
:
'dataSourcesNo'
,
"key"
:
"dataSourcesNo"
key
:
'dataSourcesNo'
,
},
},
{
{
"title"
:
"工单状态"
,
title
:
'工单状态'
,
"dataIndex"
:
"statusName"
,
dataIndex
:
'statusName'
,
"key"
:
"statusName"
key
:
'statusName'
,
}
},
],
],
"pathconfig"
:
{
pathconfig
:
{
"enableadd"
:
false
,
enableadd
:
false
,
"enableedit"
:
false
,
enableedit
:
false
,
"enabledelete"
:
false
,
enabledelete
:
false
,
"enabledetail"
:
false
,
enabledetail
:
false
,
"add"
:
""
,
add
:
''
,
"edit"
:
""
,
edit
:
''
,
"list"
:
"/repair/umTrackOrder/queryTrackOrderList"
,
list
:
'/repair/umTrackOrder/queryTrackOrderList'
,
"delete"
:
""
,
delete
:
''
,
"detail"
:
""
detail
:
''
,
}
},
},
},
{
{
"tab"
:
"外协工单"
,
tab
:
'外协工单'
,
"key"
:
"3"
,
key
:
'3'
,
"columns"
:
[
columns
:
[
{
{
"title"
:
"维修单号"
,
title
:
'维修单号'
,
"dataIndex"
:
"repairOrderNo"
,
dataIndex
:
'repairOrderNo'
,
"key"
:
"repairOrderNo"
key
:
'repairOrderNo'
,
},
},
{
{
"title"
:
"设备编号"
,
title
:
'设备编号'
,
"dataIndex"
:
"equipmentNo"
,
dataIndex
:
'equipmentNo'
,
"key"
:
"equipmentNo"
key
:
'equipmentNo'
,
},
},
{
{
"title"
:
"设备名称"
,
title
:
'设备名称'
,
"dataIndex"
:
"equipmentName"
,
dataIndex
:
'equipmentName'
,
"key"
:
"equipmentName"
key
:
'equipmentName'
,
},
},
{
{
"title"
:
"故障描述"
,
title
:
'故障描述'
,
"dataIndex"
:
"faultDescription"
,
dataIndex
:
'faultDescription'
,
"key"
:
"faultDescription"
key
:
'faultDescription'
,
},
},
{
{
"title"
:
"报修人员"
,
title
:
'报修人员'
,
"dataIndex"
:
"repairUserName"
,
dataIndex
:
'repairUserName'
,
"key"
:
"repairUserName"
key
:
'repairUserName'
,
},
},
{
{
"title"
:
"报修时间"
,
title
:
'报修时间'
,
"dataIndex"
:
"repairTime"
,
dataIndex
:
'repairTime'
,
"key"
:
"repairTimeList"
,
key
:
'repairTimeList'
,
"valueType"
:
"dateTimeRange"
valueType
:
'dateTimeRange'
,
},
},
{
{
"title"
:
"报修单号"
,
title
:
'报修单号'
,
"dataIndex"
:
"repairNo"
,
dataIndex
:
'repairNo'
,
"key"
:
"repairNo"
key
:
'repairNo'
,
},
},
{
{
"title"
:
"工单状态"
,
title
:
'工单状态'
,
"dataIndex"
:
"statusName"
,
dataIndex
:
'statusName'
,
"key"
:
"statusName"
key
:
'statusName'
,
}
},
],
],
"pathconfig"
:
{
pathconfig
:
{
"enableadd"
:
true
,
enableadd
:
true
,
"enableedit"
:
true
,
enableedit
:
true
,
"enabledelete"
:
true
,
enabledelete
:
true
,
"enabledetail"
:
true
,
enabledetail
:
true
,
"add"
:
""
,
add
:
''
,
"edit"
:
""
,
edit
:
''
,
"list"
:
""
,
list
:
'/repair/umOtherUnitsOrder/queryOtherUnitsOrderList'
,
"delete"
:
""
,
delete
:
''
,
"detail"
:
""
detail
:
''
,
}
},
}
},
];
];
}
}
export
default
getcolumns
;
export
default
getcolumns
;
\ No newline at end of file
src/pages/repair/platform/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-05 10:13:42
* @Date: 2022-12-05 10:13:42
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
6 16:41:48
* @Last Modified time: 2022-12-0
8 13:47:55
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -14,6 +14,7 @@ import getcolumns from './columns';
...
@@ -14,6 +14,7 @@ import getcolumns from './columns';
import
{
useRequest
}
from
'ahooks'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
OrderHandle
from
'./RepairOrderHandle'
;
import
OrderHandle
from
'./RepairOrderHandle'
;
import
{
message
}
from
'antd'
;
function
Platform
(
props
)
{
function
Platform
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
...
@@ -75,7 +76,7 @@ function Platform(props) {
...
@@ -75,7 +76,7 @@ function Platform(props) {
// ...s,
// ...s,
// type: null,
// type: null,
//
}));
//
}));
console
.
log
(
'zzjd'
);
//
console.log('zzjd');
let
params
=
{
let
params
=
{
id
:
row
?.
id
,
id
:
row
?.
id
,
};
};
...
@@ -87,14 +88,14 @@ function Platform(props) {
...
@@ -87,14 +88,14 @@ function Platform(props) {
message
.
success
(
'操作成功!'
);
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
open
:
false
,
}));
}));
actionRef
.
current
.
reload
();
actionRef
.
current
.
reload
();
}
}
},
},
}
}
}
}
>
>
接单
2
接单
</
PremButton
>
</
PremButton
>
);
);
}
else
if
(
activeTab
==
'3'
)
{
}
else
if
(
activeTab
==
'3'
)
{
...
@@ -116,14 +117,14 @@ function Platform(props) {
...
@@ -116,14 +117,14 @@ function Platform(props) {
message
.
success
(
'操作成功!'
);
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
false
,
open
:
false
,
}));
}));
actionRef
.
current
.
reload
();
actionRef
.
current
.
reload
();
}
}
},
},
}
}
}
}
>
>
接单
3
接单
</
PremButton
>
</
PremButton
>
);
);
}
else
if
(
activeTab
==
'1'
)
{
}
else
if
(
activeTab
==
'1'
)
{
...
@@ -145,7 +146,7 @@ function Platform(props) {
...
@@ -145,7 +146,7 @@ function Platform(props) {
},
},
}
}
}
}
>
>
接单
1
接单
</
PremButton
>
</
PremButton
>
);
);
}
}
...
...
src/pages/repair/track/index.jsx
View file @
ab6d67e8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
7 19:10:04
* @Last Modified time: 2022-12-0
8 14:03:22
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -109,6 +109,7 @@ function Failure(props) {
...
@@ -109,6 +109,7 @@ function Failure(props) {
actionRef
.
current
.
reload
();
actionRef
.
current
.
reload
();
}
}
}
}
}
}
defaultFormValue=
{
drawer
?.
item
}
{
...
drawer
}
{
...
drawer
}
/>
/>
</>
</>
...
@@ -125,9 +126,8 @@ function Failure(props) {
...
@@ -125,9 +126,8 @@ function Failure(props) {
title
:
'计划追踪日期'
,
title
:
'计划追踪日期'
,
dataIndex
:
'planTrackTime'
,
dataIndex
:
'planTrackTime'
,
formItemProps
:
{
rules
:
[{
required
:
false
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
false
,
message
:
'此项为必填项'
}]
},
key
:
'
planTrackTim
e'
,
key
:
'
nextTrackDat
e'
,
fieldProps
:
{
fieldProps
:
{
placeholder
:
'请选择'
,
disabled
:
true
,
disabled
:
true
,
},
},
},
},
...
@@ -172,7 +172,6 @@ function Failure(props) {
...
@@ -172,7 +172,6 @@ function Failure(props) {
dataIndex
:
'trackCycle'
,
dataIndex
:
'trackCycle'
,
key
:
'trackCycle'
,
key
:
'trackCycle'
,
fieldProps
:
{
fieldProps
:
{
placeholder
:
'请选择'
,
disabled
:
true
,
disabled
:
true
,
},
},
},
},
...
@@ -186,9 +185,12 @@ function Failure(props) {
...
@@ -186,9 +185,12 @@ function Failure(props) {
]
}
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
let
params
=
{
let
params
=
{
trackTraceinfo
:
vals
,
trackTraceinfo
:
{
...
vals
,
planTrackTime
:
vals
.
nextTrackDate
}
,
id
:
drawer
?.
item
?.
id
,
id
:
drawer
?.
item
?.
id
,
};
};
delete
params
.
trackTraceinfo
.
nextTrackDate
;
//console.log(params);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
'/repair/umTrackOrder/trackById'
,
url
:
'/repair/umTrackOrder/trackById'
,
params
,
params
,
...
@@ -203,6 +205,7 @@ function Failure(props) {
...
@@ -203,6 +205,7 @@ function Failure(props) {
}
}
}
}
}
}
{
...
drawer
}
{
...
drawer
}
defaultFormValue=
{
drawer
?.
item
}
/>
/>
</>
</>
);
);
...
@@ -217,7 +220,7 @@ function Failure(props) {
...
@@ -217,7 +220,7 @@ function Failure(props) {
{
{
title
:
'追踪人员'
,
title
:
'追踪人员'
,
dataIndex
:
'trackerName'
,
dataIndex
:
'trackerName'
,
formItemProps
:
{
rules
:
[{
required
:
tru
e
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
fals
e
,
message
:
'此项为必填项'
}]
},
key
:
'trackerName'
,
key
:
'trackerName'
,
fieldProps
:
{
fieldProps
:
{
placeholder
:
'请选择'
,
placeholder
:
'请选择'
,
...
@@ -306,6 +309,7 @@ function Failure(props) {
...
@@ -306,6 +309,7 @@ function Failure(props) {
actionRef
.
current
.
reload
();
actionRef
.
current
.
reload
();
}
}
}
}
}
}
defaultFormValue=
{
drawer
?.
item
}
{
...
drawer
}
{
...
drawer
}
/>
/>
</>
</>
...
@@ -396,11 +400,9 @@ function Failure(props) {
...
@@ -396,11 +400,9 @@ function Failure(props) {
...
s
,
...
s
,
open
:
true
,
open
:
true
,
type
:
'track'
,
type
:
'track'
,
item
:
{
item
:
{
...
row
,
trackCycle
:
String
(
row
?.
trackCycle
)
},
id
:
row
.
id
,
// detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
},
// params:
{
trackOrderId
:
row
?.
id
},
detailpath
:
'/repair/umTrackTraceinfo/queryByTrackOrderId'
,
params
:
{
trackOrderId
:
row
?.
id
},
val
:
'only'
,
val
:
'only'
,
title
:
'追踪信息'
,
title
:
'追踪信息'
,
}));
}));
...
@@ -420,6 +422,7 @@ function Failure(props) {
...
@@ -420,6 +422,7 @@ function Failure(props) {
open
:
true
,
open
:
true
,
val
:
'only'
,
val
:
'only'
,
title
:
'验证'
,
title
:
'验证'
,
item
:
row
,
detailpath
:
'/repair/umTrackTraceinfo/queryByTrackOrderId'
,
detailpath
:
'/repair/umTrackTraceinfo/queryByTrackOrderId'
,
params
:
{
trackOrderId
:
row
?.
id
},
params
:
{
trackOrderId
:
row
?.
id
},
type
:
'check'
,
type
:
'check'
,
...
@@ -474,12 +477,15 @@ function Failure(props) {
...
@@ -474,12 +477,15 @@ function Failure(props) {
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
item
:
row
,
item
:
{
...
row
,
trackAssistList
:
row
?.
trackAssistList
?
row
?.
trackAssistList
:
[],
},
type
:
'Reassig'
,
type
:
'Reassig'
,
open
:
true
,
open
:
true
,
val
:
'only'
,
val
:
'only'
,
}));
}));
console
.
log
(
drawer
);
//
console.log(drawer);
},
},
}
}
}
}
>
>
...
@@ -491,7 +497,7 @@ function Failure(props) {
...
@@ -491,7 +497,7 @@ function Failure(props) {
const
columns
=
useMemo
(()
=>
{
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
console
.
log
(
defcolumn
);
//
console.log(defcolumn);
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
if
(
activeTabKey
==
'1'
)
{
if
(
activeTabKey
==
'1'
)
{
...
...
src/pages/setting/factory/index.jsx
View file @
ab6d67e8
...
@@ -64,7 +64,7 @@ function Factory(props) {
...
@@ -64,7 +64,7 @@ function Factory(props) {
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
id
,
id
:
row
.
id
,
...
@@ -153,7 +153,7 @@ function Factory(props) {
...
@@ -153,7 +153,7 @@ function Factory(props) {
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
};
};
...
...
src/pages/setting/organization/index.jsx
View file @
ab6d67e8
...
@@ -68,14 +68,14 @@ function Type(props) {
...
@@ -68,14 +68,14 @@ function Type(props) {
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
key
,
id
:
row
.
key
,
parentId
:
row
.
parentKey
,
parentId
:
row
.
parentKey
,
departmentType
:
row
.
departmentType
,
departmentType
:
row
.
departmentType
,
};
};
console
.
log
(
params
);
//
console.log(params);
delete
params
.
title
;
delete
params
.
title
;
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
...
...
src/pages/setting/role/index.jsx
View file @
ab6d67e8
...
@@ -135,19 +135,19 @@ function Role(props) {
...
@@ -135,19 +135,19 @@ function Role(props) {
// url: '/sysRolePermission/queryAll',
// url: '/sysRolePermission/queryAll',
// params:
{
roleId
:
row
.
id
},
// params:
{
roleId
:
row
.
id
},
//
});
//
});
// console.log(data);
//
//
console.log(data);
console
.
log
(
row
);
//
console.log(row);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
authorityOpen
:
true
,
authorityOpen
:
true
,
item
:
row
,
item
:
row
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
'/sysEnterprise/save'
,
url
:
'/sysEnterprise/save'
,
params
:
{
...
vals
},
params
:
{
...
vals
},
});
});
console
.
log
(
res
);
//
console.log(res);
if
(
res
.
code
===
'0000'
)
{
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'修改成功!'
);
message
.
success
(
'修改成功!'
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
@@ -266,7 +266,7 @@ function Role(props) {
...
@@ -266,7 +266,7 @@ function Role(props) {
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
};
};
...
...
src/pages/setting/users/columns.js
View file @
ab6d67e8
...
@@ -133,7 +133,7 @@ function getcolumns(setdrawer) {
...
@@ -133,7 +133,7 @@ function getcolumns(setdrawer) {
// });
// });
// });
// });
// newfieldscolumns = fieldscolumns.concat(column);
// newfieldscolumns = fieldscolumns.concat(column);
// console.log('fieldscolumns', newfieldscolumns);
//
//
console.log('fieldscolumns', newfieldscolumns);
// }
// }
// setdrawer((s) => ({
// setdrawer((s) => ({
// ...s,
// ...s,
...
...
src/pages/setting/users/index.jsx
View file @
ab6d67e8
...
@@ -68,7 +68,7 @@ function User(props) {
...
@@ -68,7 +68,7 @@ function User(props) {
val
:
'only'
,
val
:
'only'
,
// onFinish: async (vals) =>
{
// onFinish: async (vals) =>
{
// let userCharReqList = [];
// let userCharReqList = [];
// console.log('id:', row.id);
//
//
console.log('id:', row.id);
// for (let i in vals)
{
// for (let i in vals)
{
// if (!isNaN(Number(i)))
{
// if (!isNaN(Number(i)))
{
// userCharReqList.push(
{
// userCharReqList.push(
{
...
@@ -174,7 +174,7 @@ function User(props) {
...
@@ -174,7 +174,7 @@ function User(props) {
userCharReqList
,
userCharReqList
,
};
};
delete
params
.
shopId
;
delete
params
.
shopId
;
console
.
log
(
params
,
'!!!!'
);
//
console.log(params, '!!!!');
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
...
@@ -221,7 +221,7 @@ function User(props) {
...
@@ -221,7 +221,7 @@ function User(props) {
userCharReqList
,
userCharReqList
,
};
};
delete
params
.
shopId
;
delete
params
.
shopId
;
console
.
log
(
params
,
'!!!!'
);
//
console.log(params, '!!!!');
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
...
...
src/pages/system/dictionary/index.jsx
View file @
ab6d67e8
...
@@ -57,7 +57,7 @@ function Type(props) {
...
@@ -57,7 +57,7 @@ function Type(props) {
size
:
'small'
,
size
:
'small'
,
disabled
:
row
?.
dataType
==
1
?
true
:
false
,
disabled
:
row
?.
dataType
==
1
?
true
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
console
.
log
(
row
);
//
console.log(row);
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
...
@@ -69,13 +69,13 @@ function Type(props) {
...
@@ -69,13 +69,13 @@ function Type(props) {
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
key
,
id
:
row
.
key
,
parentId
:
row
.
parentKey
,
parentId
:
row
.
parentKey
,
};
};
console
.
log
(
params
);
//
console.log(params);
delete
params
.
title
;
delete
params
.
title
;
delete
params
.
dataType
;
delete
params
.
dataType
;
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
...
@@ -117,7 +117,7 @@ function Type(props) {
...
@@ -117,7 +117,7 @@ function Type(props) {
title
:
'新增数据'
,
title
:
'新增数据'
,
val
:
'addChild'
,
val
:
'addChild'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
parentId
:
row
.
key
,
parentId
:
row
.
key
,
...
...
src/pages/system/field/index.jsx
View file @
ab6d67e8
...
@@ -41,7 +41,7 @@ function Field(props) {
...
@@ -41,7 +41,7 @@ function Field(props) {
url
:
urlParams
.
formList
,
url
:
urlParams
.
formList
,
params
:
{},
params
:
{},
});
});
console
.
log
(
result
);
//
console.log(result);
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
if
(
!
result
?.
data
?.
dataList
.
length
==
0
)
{
setitems
(
setitems
(
result
?.
data
?.
dataList
.
map
((
it
,
index
)
=>
{
result
?.
data
?.
dataList
.
map
((
it
,
index
)
=>
{
...
@@ -81,7 +81,7 @@ function Field(props) {
...
@@ -81,7 +81,7 @@ function Field(props) {
formId
:
drawer
?.
formId
,
formId
:
drawer
?.
formId
,
},
},
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
id
,
id
:
row
.
id
,
...
@@ -174,7 +174,7 @@ function Field(props) {
...
@@ -174,7 +174,7 @@ function Field(props) {
</
h3
>
</
h3
>
<
Menu
<
Menu
onClick=
{
async
(
e
)
=>
{
onClick=
{
async
(
e
)
=>
{
// console.log(e);
//
//
console.log(e);
setextraparams
({
setextraparams
({
formId
:
e
?.
key
,
formId
:
e
?.
key
,
});
});
...
@@ -208,7 +208,7 @@ function Field(props) {
...
@@ -208,7 +208,7 @@ function Field(props) {
disabled
:
false
,
disabled
:
false
,
type
:
'primary'
,
type
:
'primary'
,
onClick
:
()
=>
{
onClick
:
()
=>
{
console
.
log
(
drawer
);
//
console.log(drawer);
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
...
@@ -220,7 +220,7 @@ function Field(props) {
...
@@ -220,7 +220,7 @@ function Field(props) {
title
:
'新增'
,
title
:
'新增'
,
val
:
'add'
,
val
:
'add'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
vals
);
//
console.log(vals);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
formId
:
drawer
?.
formId
,
formId
:
drawer
?.
formId
,
...
...
src/pages/system/rules/index.jsx
View file @
ab6d67e8
...
@@ -65,7 +65,7 @@ function Rules(props) {
...
@@ -65,7 +65,7 @@ function Rules(props) {
title
:
'编辑'
,
title
:
'编辑'
,
val
:
'edit'
,
val
:
'edit'
,
onFinish
:
async
(
vals
)
=>
{
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
1
);
//
console.log(1);
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
id
:
row
.
id
,
id
:
row
.
id
,
...
@@ -158,7 +158,7 @@ function Rules(props) {
...
@@ -158,7 +158,7 @@ function Rules(props) {
let
params
=
{
let
params
=
{
...
vals
,
...
vals
,
};
};
console
.
log
(
'vals:'
,
vals
);
//
console.log('vals:', vals);
// for (let i in vals)
{
// for (let i in vals)
{
// if (i == 'nrList')
{
// if (i == 'nrList')
{
// let reshow =
{
// let reshow =
{
...
@@ -170,7 +170,7 @@ function Rules(props) {
...
@@ -170,7 +170,7 @@ function Rules(props) {
//
});
//
});
// reshow.other.sort =
// reshow.other.sort =
// reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1;
// reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1;
// console.log('reshow', reshow);
//
//
console.log('reshow', reshow);
//
}
//
}
//
}
//
}
params
.
nrList
=
[];
params
.
nrList
=
[];
...
@@ -188,7 +188,7 @@ function Rules(props) {
...
@@ -188,7 +188,7 @@ function Rules(props) {
message
.
warning
(
'请选择顺序递增规则的位置!'
);
message
.
warning
(
'请选择顺序递增规则的位置!'
);
return
;
return
;
}
}
console
.
log
(
'11111'
,
params
);
//
console.log('11111', params);
let
res
=
await
doFetch
({
let
res
=
await
doFetch
({
url
:
urlParams
.
save
,
url
:
urlParams
.
save
,
params
,
params
,
...
...
src/utils/fieldsDetail.js
View file @
ab6d67e8
...
@@ -62,7 +62,7 @@ export default async (fieldscolumns, setdrawer, row, formId, detailpath) => {
...
@@ -62,7 +62,7 @@ export default async (fieldscolumns, setdrawer, row, formId, detailpath) => {
});
});
});
});
newfieldscolumns
=
fieldscolumns
.
concat
(
column
);
newfieldscolumns
=
fieldscolumns
.
concat
(
column
);
console
.
log
(
'fieldscolumns'
,
newfieldscolumns
);
//
console.log('fieldscolumns', newfieldscolumns);
}
}
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
...
...
tests/run-tests.js
View file @
ab6d67e8
...
@@ -16,21 +16,21 @@ const startServer = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['r
...
@@ -16,21 +16,21 @@ const startServer = spawn(/^win/.test(process.platform) ? 'npm.cmd' : 'npm', ['r
startServer
.
stderr
.
on
(
'data'
,
(
data
)
=>
{
startServer
.
stderr
.
on
(
'data'
,
(
data
)
=>
{
// eslint-disable-next-line
// eslint-disable-next-line
console
.
log
(
data
.
toString
());
//
console.log(data.toString());
});
});
startServer
.
on
(
'exit'
,
()
=>
{
startServer
.
on
(
'exit'
,
()
=>
{
kill
(
process
.
env
.
PORT
||
8000
);
kill
(
process
.
env
.
PORT
||
8000
);
});
});
console
.
log
(
'Starting development server for e2e tests...'
);
//
console.log('Starting development server for e2e tests...');
startServer
.
stdout
.
on
(
'data'
,
(
data
)
=>
{
startServer
.
stdout
.
on
(
'data'
,
(
data
)
=>
{
console
.
log
(
data
.
toString
());
//
console.log(data.toString());
// hack code , wait umi
// hack code , wait umi
if
(
!
once
&&
data
.
toString
().
indexOf
(
'Serving your umi project!'
)
>=
0
)
{
if
(
!
once
&&
data
.
toString
().
indexOf
(
'Serving your umi project!'
)
>=
0
)
{
// eslint-disable-next-line
// eslint-disable-next-line
once
=
true
;
once
=
true
;
console
.
log
(
'Development server is started, ready to run tests.'
);
//
console.log('Development server is started, ready to run tests.');
const
testCmd
=
spawn
(
const
testCmd
=
spawn
(
/^win/
.
test
(
process
.
platform
)
?
'npm.cmd'
:
'npm'
,
/^win/
.
test
(
process
.
platform
)
?
'npm.cmd'
:
'npm'
,
[
'run'
,
'playwright'
],
[
'run'
,
'playwright'
],
...
@@ -39,7 +39,7 @@ startServer.stdout.on('data', (data) => {
...
@@ -39,7 +39,7 @@ startServer.stdout.on('data', (data) => {
},
},
);
);
testCmd
.
on
(
'exit'
,
(
code
)
=>
{
testCmd
.
on
(
'exit'
,
(
code
)
=>
{
console
.
log
(
'服务已经退出,退出码:'
,
code
);
//
console.log('服务已经退出,退出码:', code);
startServer
.
kill
();
startServer
.
kill
();
process
.
exit
(
code
);
process
.
exit
(
code
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment