Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
4cac4f17
Commit
4cac4f17
authored
Jul 30, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
c6e8e85a
87cb5021
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
31 deletions
+35
-31
bom.vue
pages/technology/productMix/product/bom.vue
+33
-29
index.js
plugins/request/index.js
+2
-2
No files found.
pages/technology/productMix/product/bom.vue
View file @
4cac4f17
...
...
@@ -58,20 +58,20 @@ export default {
levelId
:
0
,
levelTitle
:
""
,
bomId
:
0
,
version
:
""
version
:
""
,
},
parms
:
{
app
:
"technology"
,
eid
:
""
,
name
:
""
,
field
:
""
field
:
""
,
},
treeData
:
[],
columns
:
[
{
key
:
"name"
,
align
:
"left"
,
high
:
true
high
:
true
,
},
{
key
:
"type"
,
...
...
@@ -84,13 +84,13 @@ export default {
return
h
(
"op"
,
{
props
:
{
icon
:
params
.
row
.
type
==
1
?
"md-git-merge"
:
""
,
type
:
"icon"
type
:
"icon"
,
},
on
:
{
click
:
()
=>
this
.
bom
(
params
.
row
)
}
click
:
()
=>
this
.
bom
(
params
.
row
)
,
}
,
});
}
}
,
},
{
key
:
"mmcode"
,
...
...
@@ -102,34 +102,34 @@ export default {
{
props
:
{},
on
:
{
click
:
()
=>
this
.
details
(
params
.
row
)
}
click
:
()
=>
this
.
details
(
params
.
row
)
,
}
,
},
params
.
row
.
mmcode
);
}
}
,
},
{
key
:
"drawingNo"
,
title
:
this
.
l
(
"drawingNo"
),
high
:
true
high
:
true
,
},
{
key
:
"count"
,
title
:
this
.
l
(
"count"
),
high
:
true
high
:
true
,
},
{
key
:
"postion"
,
title
:
this
.
l
(
"postion"
),
high
:
true
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
easy
:
true
,
high
:
true
high
:
true
,
},
{
...
...
@@ -143,7 +143,7 @@ export default {
"op"
,
{
attrs
:
{
oprate
:
"add"
},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
}
,
},
params
.
row
.
type
==
1
?
""
:
"新增"
),
...
...
@@ -151,7 +151,7 @@ export default {
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
,
},
"编辑"
),
...
...
@@ -159,15 +159,15 @@ export default {
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
)
}
,
},
"删除"
)
)
,
];
return
h
(
"div"
,
{
class
:
"action"
},
actions
);
}
}
]
}
,
}
,
]
,
};
},
async
fetch
({
store
,
params
})
{
...
...
@@ -179,8 +179,8 @@ export default {
id
:
Number
,
parentName
:
String
,
ids
:
String
,
bomId
:
Number
}
bomId
:
Number
,
}
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
...
...
@@ -198,7 +198,7 @@ export default {
this
.
modal
=
true
;
},
init
()
{
Api
.
alltree
({
id
:
this
.
bomId
,
levelId
:
this
.
parents
.
id
}).
then
(
r
=>
{
Api
.
alltree
({
id
:
this
.
bomId
,
levelId
:
this
.
parents
.
id
}).
then
(
(
r
)
=>
{
this
.
treeData
=
r
.
result
;
});
},
...
...
@@ -210,6 +210,7 @@ export default {
this
.
parents
.
rootProductId
=
row
.
rootProductId
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./bomAdd"
);
this
.
fullscreen
=
false
;
this
.
modal
=
true
;
},
addBom
()
{
...
...
@@ -221,6 +222,7 @@ export default {
this
.
parents
.
rootProductId
=
this
.
entity
.
rootProductId
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./bomAdd"
);
this
.
fullscreen
=
false
;
this
.
modal
=
true
;
},
edit
(
row
)
{
...
...
@@ -230,6 +232,7 @@ export default {
this
.
parents
.
rootProductId
=
row
.
rootProductId
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./bomEdit"
);
this
.
fullscreen
=
false
;
this
.
modal
=
true
;
},
bom
(
row
)
{
...
...
@@ -238,10 +241,11 @@ export default {
this
.
parents
.
bomId
=
row
.
bomId
;
this
.
title
=
"bom"
;
this
.
detail
=
()
=>
import
(
"./bomDetail"
);
this
.
fullscreen
=
false
;
this
.
modal
=
true
;
},
remove
(
row
)
{
Api
.
deleteBom
(
row
.
bomId
,
row
.
levelId
,
row
.
rootProductId
).
then
(
r
=>
{
Api
.
deleteBom
(
row
.
bomId
,
row
.
levelId
,
row
.
rootProductId
).
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
init
();
this
.
$Message
.
success
(
"删除成功"
);
...
...
@@ -249,7 +253,7 @@ export default {
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
,
levelId
:
this
.
parents
.
id
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
,
levelId
:
this
.
parents
.
id
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
version
=
parseInt
(
r
.
result
.
version
);
this
.
parms
.
eid
=
r
.
result
.
productUrlList
;
...
...
@@ -282,15 +286,15 @@ export default {
l
(
key
)
{
key
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
key
);
}
}
,
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"less"
>
...
...
plugins/request/index.js
View file @
4cac4f17
...
...
@@ -87,8 +87,8 @@ service.defaults.headers.put['Content-Type'] = 'application/json';
service
.
interceptors
.
request
.
use
(
config
=>
{
// 在请求发送之前做一些处理
//
const token = util.cookies.get('token');
const
token
=
sessionStorage
.
getItem
(
'token'
);
const
token
=
util
.
cookies
.
get
(
'token'
);
//
const token = sessionStorage.getItem('token');
if
(
token
)
{
// 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改
config
.
headers
[
'Authorization'
]
=
'Bearer '
+
token
;
...
...
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