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
9d9aafa5
Commit
9d9aafa5
authored
Nov 06, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
a3f9bc47
654eec09
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
519 additions
and
59 deletions
+519
-59
routerMain.png
assets/images/home/router/routerMain.png
+0
-0
index.vue
pages/account/login/index.vue
+2
-1
api.js
pages/project/plan/api.js
+7
-3
importTemplate.vue
pages/project/plan/importTemplate.vue
+134
-0
index.vue
pages/project/plan/index.vue
+7
-0
saveTemplate.vue
pages/project/plan/saveTemplate.vue
+1
-5
index.vue
pages/project/resources/templates/index.vue
+24
-20
index.vue
pages/welcome/index.vue
+310
-0
dashboard.js
router/modules/dashboard.js
+12
-13
routes.js
router/routes.js
+22
-17
No files found.
assets/images/home/router/routerMain.png
0 → 100644
View file @
9d9aafa5
606 KB
pages/account/login/index.vue
View file @
9d9aafa5
...
...
@@ -128,7 +128,8 @@ export default {
});
// setUserInfo
this
.
$store
.
commit
(
"setUserInfo"
,
info
);
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/"
);
this
.
$router
.
replace
(
'/welcome'
)
// this.$router.replace(this.$route.query.redirect || "/");
}
else
{
this
.
$Message
.
error
(
"用户信息22查询失败!"
);
}
...
...
pages/project/plan/api.js
View file @
9d9aafa5
...
...
@@ -26,13 +26,17 @@ export default {
}
});
},
///projecttemplate/list
templates
(
params
){
return
Api
.
post
(
`
${
material
}
/projecttemplate/list`
,
params
)
},
saveTemplate
(
params
){
return
Api
.
post
(
'projecttemplate/create'
,
params
)
return
Api
.
post
(
`
${
material
}
/projectplan/createtemplate`
,
params
)
},
useTemplate
(
params
){
return
Api
.
post
(
'projecttemplate/usetemplate'
,
params
)
return
Api
.
post
(
`
${
material
}
/projectplan/usetemplate`
,
params
)
},
deletes
(
params
)
{
return
Api
.
post
(
`
${
material
}
/projectplan/
batchdele
te`
,
params
);
return
Api
.
post
(
`
${
material
}
/projectplan/
usetempla
te`
,
params
);
}
}
pages/project/plan/importTemplate.vue
0 → 100644
View file @
9d9aafa5
<
template
>
<div>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
</EditGrid>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"list"
,
head
:
{
title
:
""
,
author
:
"henq"
,
description
:
"project_template 10/29/2020 5:40:26 PM"
,
},
data
()
{
return
{
curId
:
0
,
list
:[],
columns
:
[
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"type"
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
high
:
true
,
code
:
"project.task.Type"
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
on
:
{
click
:
()
=>
this
.
useTemplate
(
params
.
row
.
id
)
},
},
"导入"
),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
]);
},
},
],
};
},
mounted
()
{
this
.
load
();
},
props
:
{
v
:
Object
,
eid
:
String
,
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
""
;
},
load
()
{
Api
.
templates
({
}).
then
(
r
=>
{
this
.
list
=
r
.
result
;
})
},
useTemplate
(
id
)
{
Api
.
useTemplate
({
id
:
id
,
projectId
:
this
.
eid
}).
then
(
r
=>
{
if
(
r
.
success
){
this
.
$Message
.
success
(
"导入成功"
);
this
.
$emit
(
"on-load"
)
}
})
},
l
(
key
)
{
let
vkey
=
"project_template"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/project/plan/index.vue
View file @
9d9aafa5
...
...
@@ -397,6 +397,13 @@ export default {
that
.
title
=
"保存模版"
;
that
.
detail
=
()
=>
import
(
"./saveTemplate"
);
that
.
modal
=
true
;
},
useTemplate
(
name
){
that
.
curId
=
that
.
eid
;
that
.
row
=
that
.
data
;
that
.
title
=
"导入模版"
;
that
.
detail
=
()
=>
import
(
"./importTemplate"
);
that
.
modal
=
true
;
}
}
m
[
name
]
&&
m
[
name
](
name
);
...
...
pages/project/plan/saveTemplate.vue
View file @
9d9aafa5
...
...
@@ -47,19 +47,15 @@ export default {
eid
:
String
,
},
mounted
()
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
Api
.
cre
ate
(
this
.
entity
)
Api
.
saveTempl
ate
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
...
...
pages/project/resources/templates/index.vue
View file @
9d9aafa5
...
...
@@ -107,8 +107,8 @@ export default {
high
:
true
,
},
{
key
:
"
attachment
"
,
title
:
this
.
l
(
"
attachment
"
),
key
:
"
note
"
,
title
:
this
.
l
(
"
note
"
),
align
:
"left"
,
high
:
true
,
},
...
...
@@ -117,9 +117,29 @@ export default {
title
:
this
.
l
(
"type"
),
align
:
"left"
,
high
:
true
,
code
:
"project.task.level"
// code: "mes.project_template.Type",
code
:
"project.task.level"
,
// code: "mes.project_template.Type",
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
,
},
// {
// key: "attachment",
// title: this.l("attachment"),
// align: "left",
// high: true,
// },
{
title
:
"操作"
,
key
:
"action"
,
...
...
@@ -210,22 +230,6 @@ export default {
this
.
modal
=
false
;
},
l
(
key
)
{
/*
project_template:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'标题',
note:'请注意',
template:'模板',
attachment:'附件',
type:'模版类型',
}
*/
let
vkey
=
"project_template"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
...
...
pages/welcome/index.vue
0 → 100644
View file @
9d9aafa5
<
template
>
<div
class=
"router-main flex fc-m fa-m"
>
<div
class=
"bdImg pr"
@
click=
"pageClick"
>
<div
class=
"one pa cursor"
:class=
"
{ oneHover: oneShow
&&
isIndex == index }"
v-for="(item, index) in arrList"
:key="index"
v-bind:style="item.style"
@mouseenter="getPosition(item, index)"
>
</div>
<div
class=
"pa menu"
v-bind:style=
"menuPos"
v-show=
"menu"
>
<ul
class=
"bdTitleBox"
@
mouseleave=
"leavePosition"
>
<li
class=
"lh40 f14 tc testBtn cursor fw5"
v-for=
"(v, i) in list"
:key=
"i"
@
click=
"clickLi(v)"
>
{{
v
.
name
}}
</li>
</ul>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
isInteger
}
from
"lodash"
;
export
default
{
layout
:
"empty"
,
data
()
{
return
{
list
:
[],
arrList
:
[],
// arrList: [
// {
// name: "设计区",
// style: {
// top: "247px",
// left: "280px",
// height: "40px",
// width: "80px",
// // border: " 1px solid red",
// transform: " rotate(-13deg) skew(-74deg, 42deg)",
// },
// list: [
// { name: "物料编码" },
// { name: "物料分类" },
// { name: "物料管理" },
// ],
// },
// {
// name: "工艺区",
// style: {
// top: "319px",
// left: "405px",
// height: "40px",
// width: "80px",
// // border: " 1px solid red",
// transform: " rotate(-13deg) skew(-74deg, 42deg)",
// },
// list: [
// { name: "产品管理" },
// { name: "工艺规程" },
// { name: "工艺设置" },
// ],
// },
// {
// name: "市场处",
// style: {
// top: "570px",
// left: "293px",
// height: "40px",
// width: "80px",
// // border: " 1px solid red",
// transform: " rotate(-13deg) skew(-74deg, 42deg)",
// },
// list: [
// { name: "客户管理" },
// { name: "项目管理" },
// { name: "销售管理" },
// { name: "合同管理" },
// ],
// },
// // {
// // name: "管理区",
// // style: {
// // top: "677px",
// // left: "102px",
// // height: "40px",
// // width: "80px",
// // // border: " 1px solid red",
// // transform: " rotate(-13deg) skew(-74deg, 42deg)",
// // },
// // list: [
// // { name: "设备类型" },
// // { name: "设备管理" },
// // { name: "排产资源" },
// // ],
// // },
// {
// name: "综合生产处",
// style: {
// top: "467px",
// left: "440px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [
// { name: "订单管理" },
// { name: "订单监控" },
// { name: "订单报价" },
// ],
// },
// {
// name: "生产班组派工",
// style: {
// top: "513px",
// left: "757px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [{ name: "班组派工" }],
// },
// {
// name: "设备管理",
// style: {
// top: "638px",
// left: "947px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [
// { name: "设备类型" },
// { name: "设备管理" },
// { name: "排产资源" },
// ],
// },
// {
// name: "质检",
// style: {
// top: "186px",
// left: "1304px",
// height: "33px",
// width: "75px",
// // border: " 1px solid red",
// transform: " rotate(197deg) skew(77deg,134deg)",
// },
// list: [
// { name: "原材料复检" },
// { name: "质量检验" },
// { name: "数据包追溯" },
// { name: "产品合格证" },
// ],
// },
// {
// name: "原料仓库",
// style: {
// top: "216px",
// left: "646px",
// height: "79px",
// width: "175px",
// // border: " 1px solid red",
// transform: " rotate(-11deg) skew(-72deg, 41deg)",
// },
// list: [
// { name: "库房位置" },
// { name: "物料管理" },
// { name: "料单配套" },
// { name: "制造资源" },
// ],
// },
// {
// name: "车间计调",
// style: {
// top: "380px",
// left: "553px",
// height: "33px",
// width: "81px",
// // border: " 1px solid red",
// transform: " rotate(-12deg) skew(-72deg, 41deg)",
// },
// list: [
// { name: "计划管理" },
// { name: "排产结果" },
// ],
// },
// {
// name: "组件区",
// style: {
// top: "293px",
// left: "949px",
// height: "144px",
// width: "232px",
// // border: " 1px solid red",
// transform: " rotate(-11deg) skew(-71deg, 40deg)",
// },
// list: [{ name: "工单执行" }, { name: "转序交接" }],
// },
// ],
isIndex
:
-
1
,
oneShow
:
false
,
menu
:
false
,
menuPos
:
{
top
:
"0"
,
left
:
"0"
,
},
};
},
mounted
()
{
this
.
load
();
},
methods
:
{
load
()
{
this
.
$api
.
get
(
`
${
systemUrl
}
/menu/getusermenu?id=mes_roter`
).
then
((
r
)
=>
{
if
(
r
.
result
)
{
let
arr
=
r
.
result
[
0
].
children
.
map
((
l
)
=>
{
if
(
!
this
.
$u
.
isNull
(
l
.
description
)
&&
l
.
description
.
indexOf
(
"{"
)
>
-
1
)
{
l
.
style
=
eval
(
"("
+
l
.
description
+
")"
);
}
return
l
;
});
console
.
log
(
"arr"
,
arr
);
this
.
arrList
=
arr
;
}
});
},
pageClick
()
{
this
.
menu
=
false
;
this
.
oneShow
=
false
;
},
clickLi
(
v
)
{
if
(
v
)
{
this
.
$router
.
push
(
v
.
url
);
}
this
.
menu
=
false
;
},
getPosition
(
item
,
index
)
{
if
(
item
)
{
this
.
isIndex
=
index
;
this
.
oneShow
=
true
;
this
.
list
=
item
.
children
;
this
.
menu
=
true
;
var
{
left
,
top
}
=
item
.
style
;
this
.
menuPos
=
{
left
,
top
};
}
},
leavePosition
()
{
this
.
oneShow
=
false
;
this
.
menu
=
false
;
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.router-main {
height: 100%;
.oneHover {
border: 2px dotted #0868da;
}
.bdImg {
height: 822px;
width: 1700px;
background: url("../../assets/images/home/router/routerMain.png") no-repeat;
}
.menu {
width: 100px;
z-index: 999;
transform: translateX(-100px);
border-radius: 4px;
}
.bdTitleBox {
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.5);
li {
color: #232323;
height: 32px;
line-height: 32px;
width: 100px;
}
li:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
li:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
}
}
.testBtn {
background: rgba(255, 255, 255, 0.8);
}
.testBtn:hover {
background: rgba(38, 128, 235, 0.4);
}
</
style
>
\ No newline at end of file
router/modules/dashboard.js
View file @
9d9aafa5
...
...
@@ -14,16 +14,15 @@ export default {
},
meta
,
component
:
BasicLayout
,
children
:
[
{
path
:
'console'
,
name
:
`
${
pre
}
console`
,
meta
:
{
...
meta
,
title
:
'主控台'
,
closable
:
false
},
component
:
()
=>
import
(
'@/pages/dashboard/console'
)
}
]
};
children
:
[{
path
:
'console'
,
name
:
`
${
pre
}
console`
,
meta
:
{
...
meta
,
title
:
'主控台'
,
closable
:
false
},
component
:
()
=>
import
(
'@/pages/dashboard/console'
)
}]
};
\ No newline at end of file
router/routes.js
View file @
9d9aafa5
...
...
@@ -5,16 +5,14 @@ import BasicLayout from '@/layouts/basic-layout';
* 在主框架内显示22222222222222
*/
const
frameIn
=
[
{
const
frameIn
=
[{
path
:
'/'
,
// redirect: {
// name: ''
// // name: 'dashboard-console'
// },
component
:
BasicLayout
,
children
:
[
{
children
:
[{
path
:
'index'
,
name
:
'index'
,
meta
:
{
...
...
@@ -32,7 +30,8 @@ const frameIn = [
title
:
'前端日志'
,
auth
:
true
},
component
:
()
=>
import
(
'@/pages/system/log'
)
component
:
()
=>
import
(
'@/pages/system/log'
)
},
{
path
:
'/hello'
,
...
...
@@ -41,7 +40,8 @@ const frameIn = [
title
:
'hello'
,
auth
:
true
},
component
:
()
=>
import
(
'@/pages/system/log'
)
component
:
()
=>
import
(
'@/pages/system/log'
)
},
// 刷新页面 必须保留
{
...
...
@@ -49,7 +49,7 @@ const frameIn = [
name
:
'refresh'
,
hidden
:
true
,
component
:
{
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
instance
=>
instance
.
$router
.
replace
(
from
.
fullPath
));
},
render
:
h
=>
h
()
...
...
@@ -61,7 +61,7 @@ const frameIn = [
name
:
'redirect'
,
hidden
:
true
,
component
:
{
beforeRouteEnter
(
to
,
from
,
next
)
{
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
instance
=>
instance
.
$router
.
replace
(
JSON
.
parse
(
from
.
params
.
route
)));
},
render
:
h
=>
h
()
...
...
@@ -84,7 +84,8 @@ const frameOut = [
meta
:
{
title
:
'$t:page.login.title'
},
component
:
()
=>
import
(
'@/pages/account/login'
)
component
:
()
=>
import
(
'@/pages/account/login'
)
},
// 注册
{
...
...
@@ -93,7 +94,8 @@ const frameOut = [
meta
:
{
title
:
'$t:page.register.title'
},
component
:
()
=>
import
(
'@/pages/account/register'
)
component
:
()
=>
import
(
'@/pages/account/register'
)
},
// 注册结果
{
...
...
@@ -103,7 +105,8 @@ const frameOut = [
auth
:
true
,
title
:
'注册结果'
},
component
:
()
=>
import
(
'@/pages/account/register/result'
)
component
:
()
=>
import
(
'@/pages/account/register/result'
)
}
];
...
...
@@ -111,14 +114,14 @@ const frameOut = [
* 错误页面
*/
const
errorPage
=
[
{
const
errorPage
=
[{
path
:
'/403'
,
name
:
'403'
,
meta
:
{
title
:
'403'
},
component
:
()
=>
import
(
'@/pages/system/error/403'
)
component
:
()
=>
import
(
'@/pages/system/error/403'
)
},
{
path
:
'/500'
,
...
...
@@ -126,7 +129,8 @@ const errorPage = [
meta
:
{
title
:
'500'
},
component
:
()
=>
import
(
'@/pages/system/error/500'
)
component
:
()
=>
import
(
'@/pages/system/error/500'
)
},
{
path
:
'*'
,
...
...
@@ -134,7 +138,8 @@ const errorPage = [
meta
:
{
title
:
'404'
},
component
:
()
=>
import
(
'@/pages/system/error/404'
)
component
:
()
=>
import
(
'@/pages/system/error/404'
)
}
];
...
...
@@ -146,4 +151,4 @@ export default [
...
frameIn
,
...
frameOut
,
...
errorPage
];
];
\ No newline at end of file
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