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
e375268a
Commit
e375268a
authored
Nov 11, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.mes123.com/zhouyx/mes-ui
parents
156e4b72
cd900c8b
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1713 additions
and
1295 deletions
+1713
-1295
one.png
assets/images/home/router/one.png
+0
-0
routerMain1.png
assets/images/home/router/routerMain1.png
+0
-0
three.png
assets/images/home/router/three.png
+0
-0
two.png
assets/images/home/router/two.png
+0
-0
Submenu.vue
components/page/bmenu/components/Submenu.vue
+39
-28
index.vue
components/page/bmenu/index.vue
+1
-5
dataGrid.vue
components/page/dataGrid.vue
+1
-1
EditGrid.vue
components/page/treeGrid/EditGrid.vue
+924
-824
index.vue
pages/project/plan/index.vue
+362
-389
test.vue
pages/test.vue
+1
-0
test2.vue
pages/test/test2.vue
+185
-47
index.vue
pages/welcome/index.vue
+200
-1
No files found.
assets/images/home/router/one.png
0 → 100644
View file @
e375268a
9.76 KB
assets/images/home/router/routerMain1.png
0 → 100644
View file @
e375268a
654 KB
assets/images/home/router/three.png
0 → 100644
View file @
e375268a
9.82 KB
assets/images/home/router/two.png
0 → 100644
View file @
e375268a
9.56 KB
components/page/bmenu/components/Submenu.vue
View file @
e375268a
<
template
>
<
template
>
<transition
name=
"contextmenu-submenu-fade"
>
<transition
name=
"contextmenu-submenu-fade"
v-if=
"show"
>
<div
ref=
"menu"
:class=
"[commonClass.menu, 'menu', customClass]"
:style=
"
{left: style.left + 'px', top: style.top + 'px', minWidth: style.minWidth + 'px', zIndex: style.zIndex}" v-if="visible" @contextmenu="(e)=>e.preventDefault()">
<div
ref=
"menu"
:class=
"[commonClass.menu, 'menu', customClass]"
:style=
"
{left: style.left + 'px', top: style.top + 'px', minWidth: style.minWidth + 'px', zIndex: style.zIndex}" v-if="visible" @contextmenu="(e)=>e.preventDefault()">
<div
class=
"menu_body"
>
<div
class=
"menu_body"
>
<template
v-for=
"(item,index) of items"
>
<template
v-for=
"(item,index) of items"
>
...
@@ -95,18 +95,29 @@ export default {
...
@@ -95,18 +95,29 @@ export default {
data
:
{
data
:
{
type
:
Array
,
type
:
Array
,
default
:
[]
default
:
[]
},
params
:
{
type
:
Object
,
default
:
null
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
data
!=
[])
{
this
.
load
(
this
.
data
)
}
},
methods
:
{
load
(
v
)
{
this
.
visible
=
true
;
this
.
visible
=
true
;
this
.
items
=
this
.
data
this
.
items
=
this
.
data
alert
(
JSON
.
stringify
(
this
.
items
))
for
(
let
item
of
this
.
items
)
{
for
(
let
item
of
this
.
items
)
{
if
(
item
.
icon
)
{
if
(
item
.
icon
)
{
this
.
hasIcon
=
true
;
this
.
hasIcon
=
true
;
break
;
break
;
}
}
}
}
this
.
position
.
x
=
this
.
params
.
x
this
.
position
.
y
=
this
.
params
.
y
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
windowWidth
=
document
.
documentElement
.
clientWidth
;
const
windowWidth
=
document
.
documentElement
.
clientWidth
;
const
windowHeight
=
document
.
documentElement
.
clientHeight
;
const
windowHeight
=
document
.
documentElement
.
clientHeight
;
...
@@ -128,7 +139,6 @@ export default {
...
@@ -128,7 +139,6 @@ export default {
}
}
});
});
},
},
methods
:
{
leftOpen
(
windowWidth
,
windowHeight
,
menuWidth
)
{
leftOpen
(
windowWidth
,
windowHeight
,
menuWidth
)
{
this
.
style
.
left
=
this
.
position
.
x
-
menuWidth
;
this
.
style
.
left
=
this
.
position
.
x
-
menuWidth
;
this
.
openTrend
=
SUBMENU_OPEN_TREND_LEFT
;
this
.
openTrend
=
SUBMENU_OPEN_TREND_LEFT
;
...
@@ -219,6 +229,7 @@ export default {
...
@@ -219,6 +229,7 @@ export default {
data
(
v
)
{
data
(
v
)
{
if
(
v
!=
[])
{
if
(
v
!=
[])
{
this
.
data
=
v
;
this
.
data
=
v
;
this
.
load
(
this
.
data
)
}
}
},
},
},
},
...
...
components/page/bmenu/index.vue
View file @
e375268a
<
template
>
<
template
>
<div
class=
"ib"
>
<div></div>
<template>
右键菜单
</
template
>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
...
components/page/dataGrid.vue
View file @
e375268a
...
@@ -653,7 +653,7 @@ export default {
...
@@ -653,7 +653,7 @@ export default {
// );
// );
// });
// });
tempCol
.
forEach
((
elem
)
=>
{
tempCol
.
forEach
((
elem
)
=>
{
if
(
e
[
elem
.
key
]
&&
e
[
elem
.
key
]
!=
""
&&
e
[
elem
.
key
]
!=
null
)
{
if
(
(
e
[
elem
.
key
]
&&
e
[
elem
.
key
]
!=
""
&&
e
[
elem
.
key
]
!=
null
)
||
e
[
elem
.
key
]
==
0
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值。
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值。
let
codeArr
=
[];
let
codeArr
=
[];
let
keyValue
=
e
[
elem
.
key
];
let
keyValue
=
e
[
elem
.
key
];
...
...
components/page/treeGrid/EditGrid.vue
View file @
e375268a
<
template
>
<
template
>
<div
class=
"table-content1"
>
<div
class=
"table-content1"
>
<div
class=
"table-tools"
>
<div
class=
"table-tools"
>
<div
class=
"table-search"
>
<div
class=
"table-search"
>
<slot
name=
"easySearch"
></slot>
<slot
name=
"easySearch"
></slot>
...
@@ -16,131 +16,60 @@
...
@@ -16,131 +16,60 @@
<table
class=
"table-head"
>
<table
class=
"table-head"
>
<thead>
<thead>
<tr>
<tr>
<th
<th
v-for=
"(column, index) in columns"
:key=
"index"
:style=
"tdStyle(column)"
>
v-for=
"(column, index) in columns"
:key=
"index"
:style=
"tdStyle(column)"
>
<label
v-if=
"column.type === 'selection'"
>
<label
v-if=
"column.type === 'selection'"
>
<Checkbox
<Checkbox
v-model=
"checkAll"
@
on-change=
"checked"
:indeterminate=
"indeterminate"
></Checkbox>
v-model=
"checkAll"
@
on-change=
"checked"
:indeterminate=
"indeterminate"
></Checkbox>
</label>
</label>
<label
v-else
>
<label
v-else
>
{{
renderHeader
(
column
,
index
)
}}
{{
renderHeader
(
column
,
index
)
}}
<span
class=
"ivu-table-sort"
v-if=
"column.sortable"
>
<span
class=
"ivu-table-sort"
v-if=
"column.sortable"
>
<Icon
<Icon
type=
"arrow-up-b"
:class=
"
{ on: column._sortType === 'asc' }" @click.native="handleSort(index, 'asc')" />
type=
"arrow-up-b"
<Icon
type=
"arrow-down-b"
:class=
"
{ on: column._sortType === 'desc' }" @click.native="handleSort(index, 'desc')" />
:class=
"
{ on: column._sortType === 'asc' }"
@click.native="handleSort(index, 'asc')"
/>
<Icon
type=
"arrow-down-b"
:class=
"
{ on: column._sortType === 'desc' }"
@click.native="handleSort(index, 'desc')"
/>
</span>
</span>
</label>
</label>
</th>
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
<tr
v-for=
"(item, index) in trs"
:key=
"item.id"
class=
"treetr"
:id=
"'tr' + index"
v-show=
"show(item)"
:draggable=
"drag && !item._drag"
@
dragstart=
"dragstart($event, index, item)"
@
drop=
"dragdrop($event, index, item)"
@
dragenter=
"dragenter($event, index, item)"
@
dragover=
"dragover($event, index, item)"
@
dragleave=
"dragleave($event, index, item)"
>
v-for=
"(item, index) in trs"
:key=
"item.id"
class=
"treetr"
:id=
"'tr' + index"
v-show=
"show(item)"
:draggable=
"drag && !item._drag"
@
dragstart=
"dragstart($event, index, item)"
@
drop=
"dragdrop($event, index, item)"
@
dragenter=
"dragenter($event, index, item)"
@
dragover=
"dragover($event, index, item)"
@
dragleave=
"dragleave($event, index, item)"
>
<!-- -->
<!-- -->
<td
<td
v-for=
"(column, snum) in columns"
:key=
"column.key"
:style=
"tdStyle(column)"
>
v-for=
"(column, snum) in columns"
:key=
"column.key"
:style=
"tdStyle(column)"
>
<!-- 多选 -->
<!-- 多选 -->
<label
<label
v-if=
"column.type === 'selection'"
@
click=
"rowChecked(item, index, $event)"
>
v-if=
"column.type === 'selection'"
<Checkbox
v-model=
"item._checked"
:indeterminate=
"item._indeterminate"
></Checkbox>
@
click=
"rowChecked(item, index, $event)"
>
<Checkbox
v-model=
"item._checked"
:indeterminate=
"item._indeterminate"
></Checkbox>
</label>
</label>
<Icon
<Icon
v-if=
"column.type === 'drag'"
type=
"md-more"
class=
"drag"
/>
v-if=
"column.type === 'drag'"
<DTSpan
v-if=
"column.type == 'date'"
:value=
"item[column.key]"
/>
type=
"md-more"
class=
"drag"
/>
<DTSpan
v-if=
"column.type == 'date'"
:value=
"item[column.key]"
/>
<div
v-if=
"column.type == 'user'"
>
<div
v-if=
"column.type == 'user'"
>
<User
:value=
"item[column.key]"
/>
<User
:value=
"item[column.key]"
/>
</div>
</div>
<div
<div
v-if=
"
v-if=
"
column.type == 'users' &&
column.type == 'users' &&
item[column.key] &&
item[column.key] &&
item[column.key].length > 0
item[column.key].length > 0
"
"
>
>
<User
v-for=
"li in item[column.key]"
:value=
"li"
:key=
"li"
class=
"ml10"
/>
<User
v-for=
"li in item[column.key]"
:value=
"li"
:key=
"li"
class=
"ml10"
/>
</div>
</div>
<state
<state
v-if=
"column.code"
:code=
"column.code"
:value=
"item[column.key]"
/>
v-if=
"column.code"
:code=
"column.code"
:value=
"item[column.key]"
/>
<!-- 树图标 -->
<!-- 树图标 -->
<span
@
click=
"toggle(index, item)"
v-if=
"snum == treeColumn()"
>
<span
@
click=
"toggle(index, item)"
v-if=
"snum == treeColumn()"
>
<span
class=
"ib"
v-width=
"spaceWidth * item._level"
></span>
<span
class=
"ib"
v-width=
"spaceWidth * item._level"
></span>
<a
v-if=
"item._count > 0"
class=
"expand"
<a
v-if=
"item._count > 0"
class=
"expand"
>
><Icon
<Icon
:type=
"!item._expanded ? 'ios-add' : 'ios-remove'"
/>
:type=
"!item._expanded ? 'ios-add' : 'ios-remove'"
</a><i
v-else
class=
"ms-tree-space"
></i>
/>
</a
><i
v-else
class=
"ms-tree-space"
></i>
</span>
</span>
<!-- 菜单名称、排序、请求地址 -->
<!-- 菜单名称、排序、请求地址 -->
<label
<label
v-if=
"
v-if=
"
!column.type &&
!column.type &&
!column.code &&
!column.code &&
!column.render &&
!column.render &&
!column.slot
!column.slot
"
"
>
>
{{
renderBody
(
item
,
column
)
}}
{{
renderBody
(
item
,
column
)
}}
</label>
</label>
<table-expand
<table-expand
v-if=
"column.render && !column.type && !column.solt"
:row=
"item"
:column=
"column"
:index=
"snum"
:render=
"column.render"
></table-expand>
v-if=
"column.render && !column.type && !column.solt"
<column-slot
v-if=
"column.slot"
:row=
"item"
:column=
"column"
:index=
"snum"
></column-slot>
:row=
"item"
:column=
"column"
:index=
"snum"
:render=
"column.render"
></table-expand>
<column-slot
v-if=
"column.slot"
:row=
"item"
:column=
"column"
:index=
"snum"
></column-slot>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
...
@@ -150,43 +79,16 @@
...
@@ -150,43 +79,16 @@
<div
class=
"table-footer"
>
<div
class=
"table-footer"
>
<slot
name=
"footer"
></slot>
<slot
name=
"footer"
></slot>
<Page
<Page
v-if=
"page"
:total=
"search.total"
:current=
"search.page"
class=
"fr"
show-total
size=
"small"
show-elevator
show-sizer
:page-size=
"search.pageSize"
:page-size-opts=
"pageSizeOpts"
@
on-change=
"pageChange"
@
on-page-size-change=
"pageSizeChange"
/>
v-if=
"page"
:total=
"search.total"
:current=
"search.page"
class=
"fr"
show-total
size=
"small"
show-elevator
show-sizer
:page-size=
"search.pageSize"
:page-size-opts=
"pageSizeOpts"
@
on-change=
"pageChange"
@
on-page-size-change=
"pageSizeChange"
/>
</div>
</div>
<Modal
<Modal
v-if=
"high"
v-model=
"modalSearch"
title=
"高级搜索"
draggable
width=
"800"
ref=
"search"
>
v-if=
"high"
v-model=
"modalSearch"
title=
"高级搜索"
draggable
width=
"800"
ref=
"search"
>
<slot
name=
"searchForm"
></slot>
<slot
name=
"searchForm"
></slot>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<Button
@
click=
"modalSearch = false"
class=
"mr20"
>
取消
</Button>
<Button
@
click=
"modalSearch = false"
class=
"mr20"
>
取消
</Button>
<Button
@
click=
"complexSearch"
type=
"primary"
class=
"mr20"
>
查询
</Button>
<Button
@
click=
"complexSearch"
type=
"primary"
class=
"mr20"
>
查询
</Button>
</div>
</div>
</Modal>
</Modal>
<Drawer
<Drawer
title=
"列设置"
v-if=
"set"
v-model=
"config"
:scrollable=
"true"
placement=
"left"
:mask=
"false"
>
title=
"列设置"
v-if=
"set"
v-model=
"config"
:scrollable=
"true"
placement=
"left"
:mask=
"false"
>
<div
slot=
"header"
>
<div
slot=
"header"
>
列设置
列设置
<a
@
click=
"undoConfig"
class=
"ml50"
>
<a
@
click=
"undoConfig"
class=
"ml50"
>
...
@@ -194,17 +96,9 @@
...
@@ -194,17 +96,9 @@
</a>
</a>
</div>
</div>
<ul
class=
"table-columns"
>
<ul
class=
"table-columns"
>
<li
<li
v-for=
"(li, index) in columnsCur"
:key=
"index"
v-dragging=
"
{ item: li, list: columnsCur, group: 'li' }">
v-for=
"(li, index) in columnsCur"
:key=
"index"
v-dragging=
"
{ item: li, list: columnsCur, group: 'li' }"
>
<label
@
click=
"columnChange(li, index)"
:class=
"
{ dis: li.hide }">
<label
@
click=
"columnChange(li, index)"
:class=
"
{ dis: li.hide }">
<Icon
<Icon
:type=
"li.hide ? 'md-eye-off' : 'md-eye'"
size=
"16"
class=
"mr10"
/>
:type=
"li.hide ? 'md-eye-off' : 'md-eye'"
size=
"16"
class=
"mr10"
/>
<span>
{{
li
.
title
}}
</span>
<span>
{{
li
.
title
}}
</span>
</label>
</label>
<Icon
type=
"ios-move"
class=
"move"
size=
"18"
/>
<Icon
type=
"ios-move"
class=
"move"
size=
"18"
/>
...
@@ -216,14 +110,18 @@
...
@@ -216,14 +110,18 @@
<slot
name=
"batch"
></slot>
<slot
name=
"batch"
></slot>
<Button
@
click=
"cancelBatch"
>
取消
</Button>
<Button
@
click=
"cancelBatch"
>
取消
</Button>
</FooterToolbar>
</FooterToolbar>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
TableExpand
from
"./expand"
;
import
TableExpand
from
"./expand"
;
import
ColumnSlot
from
"./columnSolt"
;
import
ColumnSlot
from
"./columnSolt"
;
export
default
{
export
default
{
name
:
"treeGrid"
,
name
:
"treeGrid"
,
components
:
{
TableExpand
,
ColumnSlot
},
components
:
{
TableExpand
,
ColumnSlot
},
props
:
{
props
:
{
mode
:
{
mode
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
...
@@ -301,14 +199,14 @@ export default {
...
@@ -301,14 +199,14 @@ export default {
items
:
{
items
:
{
//接收树形数据
//接收树形数据
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
return
[];
return
[];
},
},
},
},
data
:
{
data
:
{
//接收UpId型数据
//接收UpId型数据
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
return
[];
return
[];
},
},
},
},
...
@@ -395,6 +293,7 @@ export default {
...
@@ -395,6 +293,7 @@ export default {
timer
:
false
,
// 控制监听时长
timer
:
false
,
// 控制监听时长
dataLength
:
0
,
// 树形数据长度
dataLength
:
0
,
// 树形数据长度
dragIndex
:
-
1
,
//拖拽开始的序号
dragIndex
:
-
1
,
//拖拽开始的序号
allUser
:
[],
//所有user
};
};
},
},
computed
:
{
computed
:
{
...
@@ -427,8 +326,12 @@ export default {
...
@@ -427,8 +326,12 @@ export default {
checkGroup
(
data
)
{
checkGroup
(
data
)
{
this
.
checkAllGroupChange
(
data
);
this
.
checkAllGroupChange
(
data
);
},
},
exportTitle
(
v
)
{
this
.
exportTitle
=
v
}
},
},
mounted
()
{
mounted
()
{
this
.
getAllUser
();
//获取所有用户
if
(
this
.
items
&&
this
.
items
.
length
>
0
)
{
if
(
this
.
items
&&
this
.
items
.
length
>
0
)
{
this
.
trs
=
this
.
treeToList
(
this
.
items
);
this
.
trs
=
this
.
treeToList
(
this
.
items
);
this
.
columnsCur
=
this
.
makeColumns
();
this
.
columnsCur
=
this
.
makeColumns
();
...
@@ -520,6 +423,9 @@ export default {
...
@@ -520,6 +423,9 @@ export default {
if
(
column
.
width
)
{
if
(
column
.
width
)
{
style
[
"width"
]
=
`
${
column
.
width
}
px`
;
style
[
"width"
]
=
`
${
column
.
width
}
px`
;
}
}
if
(
column
.
hide
)
{
style
[
"display"
]
=
`none`
;
}
return
style
;
return
style
;
},
},
// 排序事件
// 排序事件
...
@@ -633,6 +539,7 @@ export default {
...
@@ -633,6 +539,7 @@ export default {
var
childrens
=
[];
var
childrens
=
[];
var
that
=
this
;
var
that
=
this
;
getChildren
(
data
);
getChildren
(
data
);
function
getChildren
(
f
)
{
function
getChildren
(
f
)
{
that
.
trs
.
forEach
((
u
)
=>
{
that
.
trs
.
forEach
((
u
)
=>
{
if
(
u
[
that
.
upname
]
==
f
[
that
.
keyname
])
{
if
(
u
[
that
.
upname
]
==
f
[
that
.
keyname
])
{
...
@@ -692,6 +599,7 @@ export default {
...
@@ -692,6 +599,7 @@ export default {
treeToList
(
tree
)
{
treeToList
(
tree
)
{
var
that
=
this
;
var
that
=
this
;
let
list
=
[];
let
list
=
[];
function
treeToList
(
data
,
level
)
{
function
treeToList
(
data
,
level
)
{
data
.
map
((
u
)
=>
{
data
.
map
((
u
)
=>
{
let
copy
=
that
.
$u
.
clone
(
u
);
let
copy
=
that
.
$u
.
clone
(
u
);
...
@@ -768,10 +676,185 @@ export default {
...
@@ -768,10 +676,185 @@ export default {
this
.
footerToolbar
=
false
;
this
.
footerToolbar
=
false
;
this
.
$refs
.
table
.
selectAll
(
false
);
this
.
$refs
.
table
.
selectAll
(
false
);
},
},
//导出excel
export2Excel
()
{
//当前显示数据
let
list
=
[];
list
=
this
.
trs
;
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
tempCol1
=
[];
//存放物料相关表头
var
tempCol2
=
[];
//存放工艺规程相关表头
var
tempColUser
=
[];
//存放type=user的表头
var
tempColUsers
=
[];
//存放type=users的表头
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columns
);
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
if
(
el
.
export
)
{
if
(
el
.
code
)
{
tempCol
.
push
({
key
:
el
.
key
,
code
:
el
.
code
,
});
//临时存放code数据字典的字段及对应的数据字典code
}
if
(
el
.
materialKey
)
{
tempCol1
.
push
({
key
:
el
.
key
,
code
:
el
.
materialKey
,
});
//临时存放物料管理大类和子类列表
}
if
(
el
.
techKey
)
{
tempCol2
.
push
({
key
:
el
.
key
,
code
:
el
.
techKey
,
});
//临时存放工艺规程相关转换
}
if
(
el
.
type
&&
el
.
type
==
"user"
)
{
tempColUser
.
push
({
key
:
el
.
key
,
code
:
el
.
type
,
});
//临时存放user列
}
if
(
el
.
type
&&
el
.
type
==
"users"
)
{
tempColUsers
.
push
({
key
:
el
.
key
,
code
:
el
.
type
,
});
//临时存放user列
}
tHeader
.
push
(
el
.
title
);
filterVal
.
push
(
el
.
key
);
}
});
list
.
forEach
((
e
)
=>
{
tempCol
.
forEach
((
elem
)
=>
{
if
((
e
[
elem
.
key
]
&&
e
[
elem
.
key
]
!=
""
&&
e
[
elem
.
key
]
!=
null
)
||
e
[
elem
.
key
]
==
0
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值。
let
codeArr
=
[];
let
keyValue
=
e
[
elem
.
key
];
if
(
keyValue
.
length
>
0
&&
(
keyValue
.
indexOf
(
","
)
>
-
1
||
keyValue
.
indexOf
(
","
)
>
-
1
)
)
{
//如果对应的数据包含多个数据字典项,比如包含“,”或“,”
if
(
keyValue
.
indexOf
(
","
)
>
-
1
)
{
codeArr
=
keyValue
.
split
(
","
);
}
if
(
keyValue
.
indexOf
>
-
1
)
{
codeArr
=
keyValue
.
split
(
","
);
}
}
if
(
codeArr
.
length
<=
1
)
{
//对应的数据包含一个数据字典项
e
[
elem
.
key
]
=
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
e
[
elem
.
key
]
);
}
else
{
//对应的数据包含多个数据字典项
let
codeInfo
=
""
;
codeArr
.
forEach
((
el
)
=>
{
codeInfo
=
codeInfo
+
this
.
$u
.
dirName
(
this
.
$store
.
getters
.
dictionaryByKey
(
elem
.
code
),
el
)
+
","
;
});
e
[
elem
.
key
]
=
codeInfo
.
substr
(
0
,
codeInfo
.
length
-
1
);
}
}
});
//导出数据增加对应的物料管理信息 code: 1【rootCategoryId 大类】 2【categoryId 大类】 3【codeRuleId 编码名称】
tempCol1
.
forEach
((
elcol1
)
=>
{
if
(
elcol1
.
code
==
1
)
{
e
[
elcol1
.
key
]
=
this
.
getType1
(
e
[
elcol1
.
key
]);
}
else
if
(
elcol1
.
code
==
2
)
{
e
[
elcol1
.
key
]
=
this
.
getType2
(
e
[
elcol1
.
key
]);
}
else
if
(
elcol1
.
code
==
3
)
{
e
[
elcol1
.
key
]
=
this
.
getType3
(
e
[
elcol1
.
key
]);
}
});
//导出工艺规程相关转换表头信息
tempCol2
.
forEach
((
elcol2
)
=>
{
if
(
elcol2
.
code
==
1
)
{
e
[
elcol2
.
key
]
=
this
.
getRoutingHeaderName
(
e
[
elcol2
.
key
]);
}
});
//导出username相关信息
tempColUser
.
forEach
((
eluser
)
=>
{
if
(
Array
.
isArray
(
e
[
eluser
.
key
])
&&
e
[
eluser
.
key
].
length
>
0
)
{
let
temUsers
=
this
.
$u
.
clone
(
e
[
eluser
.
key
])
let
temUserName
=
''
temUsers
.
forEach
(
u
=>
{
temUserName
=
temUserName
+
this
.
getUserName
(
u
);
})
e
[
eluser
.
key
]
=
temUserName
}
if
(
e
[
eluser
.
key
]
&&
typeof
(
e
[
eluser
.
key
])
==
'string'
&&
e
[
eluser
.
key
]
!=
""
&&
e
[
eluser
.
key
]
!=
null
)
{
e
[
eluser
.
key
]
=
this
.
getUserName
(
e
[
eluser
.
key
]);
}
});
tempColUsers
.
forEach
((
elusers
)
=>
{
if
(
e
[
elusers
.
key
].
length
>
0
)
{
let
temUsers
=
this
.
$u
.
clone
(
e
[
elusers
.
key
])
let
temUserName
=
''
temUsers
.
forEach
(
u
=>
{
temUserName
=
temUserName
+
this
.
getUserName
(
u
)
+
','
;
})
e
[
elusers
.
key
]
=
temUserName
.
substr
(
0
,
temUserName
.
length
-
1
)
}
});
});
let
nowDate
=
this
.
$u
.
getNowTime
();
//年月日时分秒yyyyMMddhhmmss
//获取导出数据结束
this
.
$nextTick
(()
=>
{
this
.
$u
.
outExcel
(
this
.
exportTitle
+
"("
+
nowDate
+
")"
,
tHeader
,
filterVal
,
list
);
})
},
},
//获取所有用户信息
getAllUser
()
{
this
.
$api
.
post
(
`
${
systemUrl
}
/user/paged`
,
{
conditions
:
[],
pageIndex
:
1
,
pageSize
:
100000
,
})
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
let
tempUserInfo
=
r
.
result
.
items
;
tempUserInfo
.
forEach
((
ele
)
=>
{
let
temObj
=
{
userId
:
ele
.
id
,
name
:
ele
.
userName
,
};
this
.
allUser
.
push
(
temObj
);
});
}
});
},
getUserName
(
id
)
{
let
name
=
""
;
this
.
allUser
.
forEach
((
ele
)
=>
{
if
(
id
==
ele
.
userId
)
{
name
=
ele
.
name
;
}
});
return
name
;
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../../assets/css/custom.less";
@import "../../../assets/css/custom.less";
@table_theme: #2680eb;
@table_theme: #2680eb;
...
@@ -779,6 +862,7 @@ export default {
...
@@ -779,6 +862,7 @@ export default {
@table_line_height: 50px;
@table_line_height: 50px;
@table_hover: #f2f8fe;
@table_hover: #f2f8fe;
@table_border: #accef7;
@table_border: #accef7;
.table-content1 {
.table-content1 {
position: relative;
position: relative;
height: 100%;
height: 100%;
...
@@ -788,19 +872,23 @@ export default {
...
@@ -788,19 +872,23 @@ export default {
.table-tools {
.table-tools {
line-height: 40px;
line-height: 40px;
background: @right-header-bg;
background: @right-header-bg;
.table-search {
.table-search {
float: left;
float: left;
line-height: 40px;
line-height: 40px;
min-width: 300px;
min-width: 300px;
}
}
.btns {
.btns {
float: right;
float: right;
line-height: 40px;
line-height: 40px;
}
}
tr:hover {
tr:hover {
background: #f7f7f7;
background: #f7f7f7;
}
}
}
}
.icon-set {
.icon-set {
font-size: 17px;
font-size: 17px;
margin-left: 5px;
margin-left: 5px;
...
@@ -810,15 +898,18 @@ export default {
...
@@ -810,15 +898,18 @@ export default {
.icon-set .ivu-icon {
.icon-set .ivu-icon {
cursor: pointer;
cursor: pointer;
}
}
table {
table {
border-spacing: 0;
border-spacing: 0;
border-collapse: collapse;
border-collapse: collapse;
margin: 0 auto;
margin: 0 auto;
width: 100%;
width: 100%;
border: 1px solid @table_border;
border: 1px solid @table_border;
th {
th {
background: @table_head;
background: @table_head;
}
}
td,
td,
th {
th {
border-left: @table_border solid 1px;
border-left: @table_border solid 1px;
...
@@ -830,6 +921,7 @@ export default {
...
@@ -830,6 +921,7 @@ export default {
.drag:hover {
.drag:hover {
cursor: move;
cursor: move;
}
}
.expand {
.expand {
width: 18px;
width: 18px;
height: 18px;
height: 18px;
...
@@ -839,33 +931,41 @@ export default {
...
@@ -839,33 +931,41 @@ export default {
font-size: 14px;
font-size: 14px;
font-weight: bold;
font-weight: bold;
}
}
.expand:hover {
.expand:hover {
background: @table_theme;
background: @table_theme;
color: white;
color: white;
}
}
.ib {
.ib {
display: inline-block;
display: inline-block;
}
}
}
}
th {
th {
border-top: @table_border solid 1px;
border-top: @table_border solid 1px;
}
}
tr.treetr:hover td {
tr.treetr:hover td {
background: @table_hover;
background: @table_hover;
}
}
tr.move {
tr.move {
td {
td {
background-color: #d3e6fb;
background-color: #d3e6fb;
}
}
}
}
tr.sort {
tr.sort {
td {
td {
border-top: 2px solid #3b8ded;
border-top: 2px solid #3b8ded;
}
}
}
}
tbody {
tbody {
border-bottom: @table_border solid 1px;
border-bottom: @table_border solid 1px;
}
}
.ms-tree-space {
.ms-tree-space {
position: relative;
position: relative;
top: 1px;
top: 1px;
...
...
pages/project/plan/index.vue
View file @
e375268a
<
template
>
<
template
>
<div>
<div>
<Card>
<Card>
<EditGrid
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
:level=
"8"
:drag=
"true"
:exportTitle=
"exportTl"
>
:columns=
"columns"
<template
slot=
"easySearch"
>
ref=
"grid"
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
:items=
"list"
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
:level=
"8"
:drag=
"true"
>
<template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
</FormItem>
<FormItem
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
><Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</FormItem>
</Form></
template
</Form>
>
</
template
>
<!-- <template slot="searchForm">
<!-- <template slot="searchForm">
<Search />
<Search />
</template> -->
</template> -->
...
@@ -31,36 +20,23 @@
...
@@ -31,36 +20,23 @@
<DropdownMenu
slot=
"list"
>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"saveTemplate"
>
存为模版
</DropdownItem>
<DropdownItem
name=
"saveTemplate"
>
存为模版
</DropdownItem>
<DropdownItem
name=
"useTemplate"
>
导入模版
</DropdownItem>
<DropdownItem
name=
"useTemplate"
>
导入模版
</DropdownItem>
<DropdownItem
name=
"down"
disabled
>
<DropdownItem
name=
"down"
>
<Icon
<Icon
type=
"md-cloud-download"
class=
"mr10"
/>
导出Excel
type=
"md-cloud-download"
</DropdownItem>
class=
"mr10"
<DropdownItem
name=
"importExcel"
disabled
>
<Icon
type=
"md-cloud-upload"
class=
"mr10"
/>
导入Excel
/>
导出Excel
</DropdownItem
</DropdownItem>
>
<DropdownItem
name=
"importExcel"
disabled
><Icon
type=
"md-cloud-upload"
class=
"mr10"
/>
导入Excel
</DropdownItem
>
</DropdownMenu>
</DropdownMenu>
</Dropdown>
</Dropdown>
</
template
>
</
template
>
</EditGrid>
</EditGrid>
</Card>
</Card>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
Search
from
"./search"
;
import
Search
from
"./search"
;
...
@@ -94,36 +70,28 @@ export default {
...
@@ -94,36 +70,28 @@ export default {
row
:
{},
row
:
{},
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
keys
:
{
op
:
"title"
,
value
:
null
},
},
},
modal
:
false
,
modal
:
false
,
title
:
"新增"
,
title
:
"新增"
,
exportTl
:
'项目目录'
,
detail
:
null
,
detail
:
null
,
curId
:
null
,
curId
:
null
,
list
:
[],
list
:
[],
columns
:
[
columns
:
[{
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
key
:
"drag"
,
// { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true },
type
:
"drag"
,
// { key:"creatorUserId",title:this.l("creatorUserId") ,align:"left" ,high:true },
width
:
50
,
// { key:"lastModificationTime",title:this.l("lastModificationTime") ,align:"left" ,high:true },
align
:
'center'
// { key:"lastModifierUserId",title:this.l("lastModifierUserId") ,align:"left" ,high:true },
// { key:"isDeleted",title:this.l("isDeleted") ,align:"left" ,high:true },
// { key:"deletionTime",title:this.l("deletionTime") ,align:"left" ,high:true },
// { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true },
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { type: "selection", width: 80, align: "center" },
{
key
:
"drag"
,
type
:
"drag"
,
width
:
50
,
align
:
'center'
},
},
{
{
key
:
"upId"
,
key
:
"upId"
,
width
:
50
,
width
:
50
,
type
:
"selection"
,
type
:
"selection"
,
align
:
'center'
align
:
'center'
},
},
{
{
key
:
"title"
,
key
:
"title"
,
...
@@ -132,6 +100,7 @@ export default {
...
@@ -132,6 +100,7 @@ export default {
tree
:
true
,
tree
:
true
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
export
:
true
,
},
},
{
{
key
:
"type"
,
key
:
"type"
,
...
@@ -143,6 +112,7 @@ export default {
...
@@ -143,6 +112,7 @@ export default {
attr
:
{
attr
:
{
type
:
"icon"
,
type
:
"icon"
,
},
},
export
:
true
,
},
},
{
{
key
:
"direction"
,
key
:
"direction"
,
...
@@ -152,8 +122,8 @@ export default {
...
@@ -152,8 +122,8 @@ export default {
width
:
80
,
width
:
80
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
export
:
true
,
},
},
{
{
key
:
"status"
,
key
:
"status"
,
title
:
this
.
l
(
"status"
),
title
:
this
.
l
(
"status"
),
...
@@ -161,17 +131,22 @@ export default {
...
@@ -161,17 +131,22 @@ export default {
width
:
80
,
width
:
80
,
high
:
true
,
high
:
true
,
code
:
"mes.project_plan.Status"
,
code
:
"mes.project_plan.Status"
,
export
:
true
,
},
{
key
:
"startDate"
,
title
:
"计划开始日期"
,
hide
:
true
,
export
:
true
,
},
},
// {
// key: "startDate",
// title: this.l("startDate"),
// align: "left",
// high: true
// ,type:"date"
// },
// { key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" },
{
{
key
:
"endDate"
,
key
:
"endDate"
,
title
:
"计划结束日期"
,
hide
:
true
,
export
:
true
,
},
{
key
:
"dateRange"
,
width
:
250
,
width
:
250
,
title
:
"计划日期"
,
title
:
"计划日期"
,
align
:
"center"
,
align
:
"center"
,
...
@@ -183,18 +158,13 @@ export default {
...
@@ -183,18 +158,13 @@ export default {
});
});
},
},
},
},
// {
// key: "attachment",
// title: this.l("attachment"),
// align: "left",
// high: true,
// },
{
{
key
:
"executor"
,
key
:
"executor"
,
title
:
this
.
l
(
"executor"
),
title
:
this
.
l
(
"executor"
),
align
:
"left"
,
align
:
"left"
,
high
:
true
,
high
:
true
,
type
:
"users"
,
type
:
"users"
,
export
:
true
,
},
},
{
{
key
:
"deliverable"
,
key
:
"deliverable"
,
...
@@ -204,28 +174,17 @@ export default {
...
@@ -204,28 +174,17 @@ export default {
align
:
"center"
,
align
:
"center"
,
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
export
:
true
,
},
},
{
{
title
:
"操作"
,
title
:
"操作"
,
key
:
"action"
,
key
:
"action"
,
width
:
150
,
width
:
150
,
align
:
"center"
,
align
:
"center"
,
// render:(h,params)=>{
// return h("Actions"
// ,{
// attrs:{
// row:params,
// },
// on:{
// 'on-click':this.rowclick
// }
// }
// )
// }
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
icon
:
"md-arrow-dropright-circle"
,
icon
:
"md-arrow-dropright-circle"
,
...
@@ -234,7 +193,9 @@ export default {
...
@@ -234,7 +193,9 @@ export default {
oprate
:
"edit"
,
oprate
:
"edit"
,
disable
:
params
.
row
.
status
!=
0
,
disable
:
params
.
row
.
status
!=
0
,
},
},
on
:
{
click
:
()
=>
this
.
send
(
params
.
row
)
},
on
:
{
click
:
()
=>
this
.
send
(
params
.
row
)
},
}),
}),
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
...
@@ -244,7 +205,9 @@ export default {
...
@@ -244,7 +205,9 @@ export default {
disable
:
params
.
row
.
status
>
1
,
disable
:
params
.
row
.
status
>
1
,
oprate
:
"edit"
,
oprate
:
"edit"
,
},
},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
},
}),
}),
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
...
@@ -254,7 +217,9 @@ export default {
...
@@ -254,7 +217,9 @@ export default {
oprate
:
"edit"
,
oprate
:
"edit"
,
disable
:
params
.
row
.
status
!==
0
,
disable
:
params
.
row
.
status
!==
0
,
},
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
},
}),
}),
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
...
@@ -265,7 +230,9 @@ export default {
...
@@ -265,7 +230,9 @@ export default {
disable
:
params
.
row
.
status
!==
0
,
disable
:
params
.
row
.
status
!==
0
,
msg
:
"确认要删除吗?"
,
msg
:
"确认要删除吗?"
,
},
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
}),
}),
]);
]);
},
},
...
@@ -277,7 +244,10 @@ export default {
...
@@ -277,7 +244,10 @@ export default {
console
.
log
(
this
);
console
.
log
(
this
);
this
.
search
();
this
.
search
();
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
methods
:
{
methods
:
{
...
@@ -289,13 +259,11 @@ export default {
...
@@ -289,13 +259,11 @@ export default {
search
()
{
search
()
{
// this.$refs.grid.reload(this.easySearch);
// this.$refs.grid.reload(this.easySearch);
var
params
=
{
var
params
=
{
conditions
:
[
conditions
:
[{
{
fieldName
:
"projectId"
,
fieldName
:
"projectId"
,
conditionalType
:
"Equal"
,
conditionalType
:
"Equal"
,
fieldValue
:
this
.
eid
,
fieldValue
:
this
.
eid
,
},
},
],
],
// conditions: []
// conditions: []
};
};
Api
.
list
(
params
).
then
((
r
)
=>
{
Api
.
list
(
params
).
then
((
r
)
=>
{
...
@@ -390,25 +358,29 @@ export default {
...
@@ -390,25 +358,29 @@ export default {
this
.
curId
=
null
;
this
.
curId
=
null
;
this
.
modal
=
false
;
this
.
modal
=
false
;
},
},
show
(
name
)
{
show
(
name
)
{
var
that
=
this
;
var
that
=
this
;
var
m
=
{
var
m
=
{
saveTemplate
(
name
)
{
saveTemplate
(
name
)
{
that
.
curId
=
that
.
eid
;
that
.
curId
=
that
.
eid
;
that
.
row
=
that
.
data
;
that
.
row
=
that
.
data
;
that
.
title
=
"保存模版"
;
that
.
title
=
"保存模版"
;
that
.
detail
=
()
=>
import
(
"./saveTemplate"
);
that
.
detail
=
()
=>
import
(
"./saveTemplate"
);
that
.
modal
=
true
;
that
.
modal
=
true
;
},
},
useTemplate
(
name
)
{
useTemplate
(
name
)
{
that
.
curId
=
that
.
eid
;
that
.
curId
=
that
.
eid
;
that
.
row
=
that
.
data
;
that
.
row
=
that
.
data
;
that
.
title
=
"导入模版"
;
that
.
title
=
"导入模版"
;
that
.
detail
=
()
=>
import
(
"./importTemplate"
);
that
.
detail
=
()
=>
import
(
"./importTemplate"
);
that
.
modal
=
true
;
that
.
modal
=
true
;
},
}
}
if
(
name
==
'down'
)
{
this
.
exportTl
=
'项目目录-'
+
this
.
data
.
title
;
this
.
$refs
.
grid
.
export2Excel
()
}
}
m
[
name
]
&&
m
[
name
](
name
);
m
[
name
]
&&
m
[
name
](
name
);
},
},
l
(
key
)
{
l
(
key
)
{
...
@@ -418,5 +390,6 @@ export default {
...
@@ -418,5 +390,6 @@ export default {
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
</
style
>
</
style
>
pages/test.vue
View file @
e375268a
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<MenuItem
name=
"a4"
to=
"/test/resource"
>
资源选择
</MenuItem>
<MenuItem
name=
"a4"
to=
"/test/resource"
>
资源选择
</MenuItem>
<MenuItem
name=
"a3"
to=
"/test/view"
>
详情拖拽排版
</MenuItem>
<MenuItem
name=
"a3"
to=
"/test/view"
>
详情拖拽排版
</MenuItem>
<MenuItem
name=
"a5"
to=
"/test/test1"
>
colum验证
</MenuItem>
<MenuItem
name=
"a5"
to=
"/test/test1"
>
colum验证
</MenuItem>
<MenuItem
name=
"a6"
to=
"/test/test2"
>
右键点击/点击
</MenuItem>
</div>
</div>
</Menu>
</Menu>
</div>
</div>
...
...
pages/test/test2.vue
View file @
e375268a
<
template
>
<
template
>
<div
style=
"width:100%;"
>
<div
style=
"width:100%;"
>
<div
class=
"mt50 pl10"
>
<h2>
SubMenu
</h2>
<h2>
SubMenu
</h2>
<p><Button
@
click=
"showBmenu"
>
showMenu
</Button></p>
<p><Button
@
click=
"showBmenu"
ref=
"showBtn"
>
左键打开菜单
</Button></p>
<Submenus
:show=
"showStatu"
:data=
"tempItems"
></Submenus>
<Submenus
:show=
"showStatu"
:data=
"tempItems"
:params=
"params"
></Submenus>
</div>
<div
class=
"mt50 pl10"
>
<h2>
Bmenu
</h2>
<div
@
contextmenu=
"onCon"
class=
"tc"
style=
"width:120px;height:40px;line-height:40px;background:#f5f5f5;border:#ccc solid 1px; border-radius: 5px;"
>
{{
message
}}
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -13,8 +19,98 @@ export default {
...
@@ -13,8 +19,98 @@ export default {
data
()
{
data
()
{
return
{
return
{
//submenu
//submenu
showStatu
:
false
,
showStatu
:
false
,
//控件是否显示
tempItems
:
[{
tempItems
:
[],
//控件数据
params
:
{},
//控件坐标位置
message
:
"右键打开菜单"
,
useCustomClass
:
false
,
};
},
mounted
()
{
},
methods
:
{
showBmenu
(
event
)
{
let
obj
=
event
.
target
let
objSet
=
obj
.
getBoundingClientRect
()
this
.
showStatu
=
true
;
this
.
params
=
{
x
:
objSet
.
x
,
y
:
objSet
.
bottom
};
console
.
log
(
event
)
this
.
tempItems
=
[{
label
:
"返回(B)"
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
},
},
{
label
:
"前进(F)"
,
disabled
:
true
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
},
},
{
label
:
"重新加载(R)"
,
divided
:
true
,
icon
:
"el-icon-refresh"
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
},
},
{
label
:
"另存为(A)..."
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
},
},
{
label
:
"打印(P)..."
,
icon
:
"el-icon-printer"
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
},
},
{
label
:
"投射(C)..."
,
divided
:
true
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
},
},
{
label
:
"使用网页翻译(T)"
,
divided
:
true
,
minWidth
:
0
,
children
:
[{
label
:
"翻译成简体中文"
},
{
label
:
"翻译成繁体中文"
},
],
},
];
event
.
preventDefault
();
},
onCon
(
event
)
{
this
.
$contextmenu
({
items
:
[{
label
:
`自定义样式(
${
this
.
useCustomClass
?
"开"
:
"关"
}
)`
,
onClick
:
()
=>
{
this
.
useCustomClass
=
!
this
.
useCustomClass
;
},
},
{
label
:
"返回(B)"
,
onClick
:
()
=>
{
this
.
message
=
"返回(B)"
;
console
.
log
(
"返回(B)"
);
},
},
{
label
:
"前进(F)"
,
label
:
"前进(F)"
,
disabled
:
true
disabled
:
true
},
},
...
@@ -46,19 +142,17 @@ export default {
...
@@ -46,19 +142,17 @@ export default {
},
},
],
],
},
},
],
{
useCustomClass
:
false
,
label
:
"截取网页(R)"
,
nametitle
:
'contextmenu-submenu'
,
minWidth
:
0
,
level
:
''
,
children
:
[{
};
label
:
"返回(B)"
,
onClick
:
()
=>
{
this
.
message
=
"返回(B)"
;
console
.
log
(
"返回(B)"
);
},
},
mounted
()
{
},
},
methods
:
{
{
showBmenu
()
{
this
.
showStatu
=
true
;
this
.
tempItems
=
[{
label
:
"前进(F)"
,
label
:
"前进(F)"
,
disabled
:
true
disabled
:
true
},
},
...
@@ -90,8 +184,52 @@ export default {
...
@@ -90,8 +184,52 @@ export default {
},
},
],
],
},
},
]
{
}
label
:
"截取网页(R)"
,
minWidth
:
0
,
children
:
[{
label
:
"截取可视化区域"
,
onClick
:
()
=>
{
this
.
message
=
"截取可视化区域"
;
console
.
log
(
"截取可视化区域"
);
},
},
{
label
:
"截取全屏"
},
],
},
{
label
:
"查看网页源代码(V)"
,
icon
:
"el-icon-view"
},
{
label
:
"检查(N)"
},
],
},
{
label
:
"查看网页源代码(V)"
,
icon
:
"el-icon-view"
},
{
label
:
"检查(N)"
},
],
event
,
customClass
:
this
.
useCustomClass
?
"custom-class"
:
""
,
zIndex
:
3
,
minWidth
:
230
,
});
event
.
preventDefault
();
},
},
},
};
};
</
script
>
</
script
>
<
style
>
.custom-class
.menu_item__available
:hover
{
background
:
#ffecf2
!important
;
color
:
#ff4050
!important
;
}
</
style
>
pages/welcome/index.vue
View file @
e375268a
<
template
>
<
template
>
<div
class=
"router-main flex fc-m fa-m"
>
<div
class=
"router-main flex fc-m fa-m pr"
>
<ul
class=
"pa navMenu"
>
<li
class=
"navMenuLi flex fc-m fa-m pr"
v-for=
"(item, index) in menus"
:key=
"index"
@
mouseenter=
"navClick(item,index)"
>
<Icon
type=
"ios-stats"
class=
"f16"
/>
{{
item
.
name
}}
</li>
</ul>
<div
class=
"bdImg pr"
@
click=
"pageClick"
>
<div
class=
"bdImg pr"
@
click=
"pageClick"
>
<div
<div
class=
"one pa cursor"
class=
"one pa cursor"
...
@@ -27,9 +38,153 @@
...
@@ -27,9 +38,153 @@
<
script
>
<
script
>
import
{
isInteger
}
from
"lodash"
;
import
{
isInteger
}
from
"lodash"
;
import
viewerVue
from
"../test/viewer.vue"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
navMenus
:
false
,
onetest
:
"0"
,
menus
:
[
{
name
:
"项目管理"
,
style
:{
left
:
'260px'
,
top
:
"100px"
},
children
:
[
{
name
:
"项目管理"
,
type
:
2
,
code
:
""
,
icon
:
""
,
target
:
0
,
url
:
"/project/project"
,
status
:
1
,
description
:
""
,
source
:
0
,
app
:
"mes_roter"
,
priority
:
0
,
id
:
541
,
title
:
"项目管理"
,
expand
:
true
,
upId
:
537
,
lay
:
2
,
children
:
null
,
data
:
null
,
},
{
name
:
"任务中心"
,
type
:
2
,
code
:
""
,
icon
:
""
,
target
:
0
,
url
:
"/project/task"
,
status
:
1
,
description
:
""
,
source
:
0
,
app
:
"mes_roter"
,
priority
:
0
,
id
:
542
,
title
:
"任务中心"
,
expand
:
true
,
upId
:
537
,
lay
:
2
,
children
:
null
,
data
:
null
,
},
{
name
:
"项目资源"
,
type
:
2
,
code
:
""
,
icon
:
""
,
target
:
0
,
url
:
"/project/resources"
,
status
:
1
,
description
:
""
,
source
:
0
,
app
:
"mes_roter"
,
priority
:
0
,
id
:
543
,
title
:
"项目资源"
,
expand
:
true
,
upId
:
537
,
lay
:
2
,
children
:
null
,
data
:
null
,
},
],
},
{
name
:
"文档管理"
,
style
:{
left
:
'260px'
,
top
:
"190px"
},
children
:
[
{
name
:
"文档分类"
,
type
:
2
,
code
:
""
,
icon
:
""
,
target
:
0
,
url
:
"/word/classification"
,
status
:
1
,
description
:
""
,
source
:
0
,
app
:
"mes_roter"
,
priority
:
0
,
id
:
544
,
title
:
"文档分类"
,
expand
:
true
,
upId
:
539
,
lay
:
2
,
children
:
null
,
data
:
null
,
},
{
name
:
"文档管理"
,
type
:
2
,
code
:
""
,
icon
:
""
,
target
:
0
,
url
:
"/word/document"
,
status
:
1
,
description
:
""
,
source
:
0
,
app
:
"mes_roter"
,
priority
:
0
,
id
:
545
,
title
:
"文档管理"
,
expand
:
true
,
upId
:
539
,
lay
:
2
,
children
:
null
,
data
:
null
,
},
{
name
:
"模板类型"
,
type
:
2
,
code
:
""
,
icon
:
""
,
target
:
0
,
url
:
"/word/template"
,
status
:
1
,
description
:
""
,
source
:
0
,
app
:
"mes_roter"
,
priority
:
0
,
id
:
546
,
title
:
"模板类型"
,
expand
:
true
,
upId
:
539
,
lay
:
2
,
children
:
null
,
data
:
null
,
},
],
},
{
name
:
"大屏展示"
},
],
list
:
[],
list
:
[],
arrList
:
[],
arrList
:
[],
isIndex
:
-
1
,
isIndex
:
-
1
,
...
@@ -81,6 +236,17 @@ export default {
...
@@ -81,6 +236,17 @@ export default {
var
{
left
,
top
}
=
item
.
style
;
var
{
left
,
top
}
=
item
.
style
;
this
.
menuPos
=
{
left
,
top
};
this
.
menuPos
=
{
left
,
top
};
}
}
},
navClick
(
v
,
index
)
{
if
(
v
.
children
&&
v
.
children
.
length
>
0
)
{
var
{
left
,
top
}
=
v
.
style
;
this
.
list
=
v
.
children
;
this
.
menuPos
=
{
left
,
top
};
this
.
menu
=
true
;
}
else
{
this
.
menu
=
false
;
}
},
},
leavePosition
()
{
leavePosition
()
{
this
.
oneShow
=
false
;
this
.
oneShow
=
false
;
...
@@ -93,6 +259,39 @@ export default {
...
@@ -93,6 +259,39 @@ export default {
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.router-main {
.router-main {
height: 100%;
height: 100%;
.navMenu {
z-index: 999;
top: 90px;
left: 95px;
.navMenuLi {
cursor: pointer;
width: 185px;
height: 99px;
color: #ffffff;
.ivu-icon {
margin-right: 18px;
}
}
.navMenuLi:nth-child(1) {
background: url("../../assets/images/home/router/one.png") no-repeat;
background-size: contain;
}
.navMenuLi:nth-child(2) {
background: url("../../assets/images/home/router/two.png") no-repeat;
background-size: contain;
}
.navMenuLi:nth-child(3) {
background: url("../../assets/images/home/router/three.png") no-repeat;
background-size: contain;
}
.navMenuLi:hover {
transform: scale(1.1);
}
.navChild {
cursor: pointer;
left: 167px;
}
}
.oneHover {
.oneHover {
border: 2px dotted #0868da;
border: 2px dotted #0868da;
}
}
...
...
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