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
15a0c384
Commit
15a0c384
authored
Nov 13, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.mes123.com/zhouyx/mes-ui
parents
51599112
96de0e7d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
3273 additions
and
2921 deletions
+3273
-2921
base.less
assets/css/base.less
+3
-1
iview-reset.less
assets/css/iview-reset.less
+0
-1
Submenu.vue
components/page/bmenu/components/Submenu.vue
+48
-10
process.vue
components/page/import/process.vue
+57
-2
EditGrid.vue
components/page/treeGrid/EditGrid.vue
+996
-905
zh-CN.js
i18n/locale/zh-CN.js
+23
-12
henq.js
libs/henq.js
+4
-0
npm-shrinkwrap.json
npm-shrinkwrap.json
+10
-10
index.vue
pages/aps/aps/index.vue
+725
-744
index.vue
pages/aps/plan/index.vue
+773
-841
list.vue
pages/project/groupUser/list.vue
+3
-3
importTemplate.vue
pages/project/plan/importTemplate.vue
+61
-29
index.vue
pages/project/plan/index.vue
+124
-3
add.vue
pages/project/project/add.vue
+17
-3
api.js
pages/project/project/api.js
+4
-0
detail.vue
pages/project/resources/templates/detail.vue
+122
-7
index.vue
pages/project/resources/templates/index.vue
+4
-1
jcTreeGrid.vue
pages/test/example/components/jcTreeGrid.vue
+1
-1
test2.vue
pages/test/test2.vue
+85
-4
index.vue
pages/welcome/index.vue
+17
-151
index.js
store/index.js
+196
-193
No files found.
assets/css/base.less
View file @
15a0c384
...
...
@@ -21,7 +21,9 @@ ul,
li {
list-style: none;
}
.ivu-drawer-wrap{
z-index: 12000;
}
div::-webkit-scrollbar {
width: 10px;
height: 10px;
...
...
assets/css/iview-reset.less
View file @
15a0c384
...
...
@@ -18,7 +18,6 @@
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
.ivu-btn-primary {
color: #fff;
background-color: @primary-color;
...
...
components/page/bmenu/components/Submenu.vue
View file @
15a0c384
<
template
>
<transition
name=
"contextmenu-submenu-fade"
v-if=
"show"
>
<transition
name=
"contextmenu-submenu-fade"
>
<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"
>
<template
v-for=
"(item,index) of items"
>
...
...
@@ -10,7 +10,7 @@
item.divided?'menu_item__divided':null
]"
:key=
"index"
v-if=
"item.disabled"
>
<div
class=
"menu_item_icon"
v-if=
"hasIcon"
>
<
i
:class=
"item.icon"
v-if=
"item.icon"
></i
>
<
Icon
v-if=
"item.icon"
:type=
"item.icon"
/
>
</div>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<div
class=
"menu_item_expand_icon"
></div>
...
...
@@ -22,7 +22,7 @@
item.divided?'menu_item__divided':null
]"
:key=
"index"
@
mouseenter=
"($event)=>enterItem($event,item,index)"
v-else-if=
"item.children"
>
<div
class=
"menu_item_icon"
v-if=
"hasIcon"
>
<
i
:class=
"item.icon"
v-if=
"item.icon"
></i
>
<
Icon
v-if=
"item.icon"
:type=
"item.icon"
/
>
</div>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<div
class=
"menu_item_expand_icon"
>
▶
</div>
...
...
@@ -33,7 +33,7 @@
item.divided?'menu_item__divided':null
]"
:key=
"index"
@
mouseenter=
"($event)=>enterItem($event,item,index)"
@
click=
"itemClick(item)"
v-else
>
<div
class=
"menu_item_icon"
v-if=
"hasIcon"
>
<
i
:class=
"item.icon"
v-if=
"item.icon"
></i
>
<
Icon
v-if=
"item.icon"
:type=
"item.icon"
/
>
</div>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<div
class=
"menu_item_expand_icon"
></div>
...
...
@@ -54,6 +54,9 @@ import {
SUBMENU_OPEN_TREND_RIGHT
,
COMPONENT_NAME
}
from
"../constant"
;
import
{
getElementsByClassName
}
from
"../util"
;
export
default
{
name
:
"Submenu"
,
data
()
{
...
...
@@ -78,13 +81,15 @@ export default {
style
:
{
left
:
0
,
top
:
0
,
zIndex
:
2
,
zIndex
:
3
,
minWidth
:
150
},
customClass
:
null
,
visible
:
false
,
hasIcon
:
false
,
openTrend
:
SUBMENU_OPEN_TREND_RIGHT
openTrend
:
SUBMENU_OPEN_TREND_RIGHT
,
mouseListening
:
false
,
mainMenuInstance
:
null
,
};
},
props
:
{
...
...
@@ -104,8 +109,12 @@ export default {
mounted
()
{
if
(
this
.
data
!=
[])
{
this
.
load
(
this
.
data
)
this
.
addListener
();
}
},
destroyed
()
{
this
.
removeListener
();
},
methods
:
{
load
(
v
)
{
this
.
visible
=
true
;
...
...
@@ -194,13 +203,14 @@ export default {
};
this
.
activeSubmenu
.
instance
.
style
.
minWidth
=
typeof
item
.
minWidth
===
"number"
?
item
.
minWidth
:
this
.
style
.
minWidth
;
this
.
activeSubmenu
.
instance
.
style
.
zIndex
=
this
.
style
.
zIndex
;
this
.
activeSubmenu
.
instance
.
style
.
zIndex
=
'9999'
;
this
.
activeSubmenu
.
instance
.
customClass
=
typeof
item
.
customClass
===
"string"
?
item
.
customClass
:
this
.
customClass
;
this
.
activeSubmenu
.
instance
.
$mount
();
document
.
body
.
appendChild
(
this
.
activeSubmenu
.
instance
.
$el
);
},
itemClick
(
item
)
{
if
(
!
this
.
visible
)
{
...
...
@@ -220,9 +230,34 @@ export default {
if
(
this
.
activeSubmenu
.
instance
)
{
this
.
activeSubmenu
.
instance
.
close
();
}
this
.
$nextTick
(()
=>
{
this
.
$destroy
();
});
this
.
$nextTick
(()
=>
{});
},
showBm
()
{
this
.
visible
=
true
;
},
leaveBm
()
{
this
.
visible
=
false
;
},
mouseClickListener
(
e
)
{
//左键点击
this
.
close
();
},
addListener
()
{
if
(
!
this
.
mouseListening
)
{
document
.
addEventListener
(
"click"
,
this
.
mouseClickListener
);
//document.addEventListener("mousedown", this.mouseDownListener);
//document.addEventListener("mousewheel", this.mousewheelListener);
this
.
mouseListening
=
true
;
}
},
removeListener
()
{
if
(
this
.
mouseListening
)
{
document
.
removeEventListener
(
"click"
,
this
.
mouseClickListener
);
//document.removeEventListener("mousedown", this.mouseDownListener);
//document.removeEventListener("mousewheel", this.mousewheelListener);
this
.
mouseListening
=
false
;
}
}
},
watch
:
{
...
...
@@ -232,6 +267,9 @@ export default {
this
.
load
(
this
.
data
)
}
},
show
(
v
)
{
this
.
visible
=
v
}
},
};
</
script
>
...
...
components/page/import/process.vue
View file @
15a0c384
...
...
@@ -61,6 +61,7 @@
<
script
>
import
XLSX
from
"xlsx"
;
import
Api
from
'@/plugins/request'
import
{
Switch
}
from
"view-design"
;
...
...
@@ -82,6 +83,7 @@ export default {
formatList
:
[
"xlsx"
],
columnsImport
:
[],
departArr
:
[],
//部门list
usersArr
:
[],
sheetNames
:
[],
//excel的表明
workBook
:
{},
openDatas
:
[],
...
...
@@ -129,9 +131,21 @@ export default {
this
.
$api
.
get
(
`
${
systemUrl
}
/Department/GetDepartments`
).
then
((
r
)
=>
{
this
.
departArr
=
r
.
result
.
items
;
});
this
.
$api
.
get
(
`
${
systemUrl
}
/user/getuserlist`
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
usersArr
=
r
.
result
}
})
//导出对列表头进行预加载end
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadUsers"
);
// 加载数据字典
},
mounted
()
{
//if (this.eid > 0) {
// this.load(this.eid);
...
...
@@ -144,6 +158,7 @@ export default {
this
.
tdHeightExcel
=
window
.
screenHeight
-
180
;
})();
};
},
methods
:
{
//重新处理colum
...
...
@@ -198,6 +213,8 @@ export default {
temData
=
this
.
$u
.
clone
(
this
.
$refs
.
comExcel
.
excelData
);
}
let
arrTitleUse
=
[];
////使用数据字典的字段
let
arrUseName
=
[];
////使用单个用户字段
let
arrUseNames
=
[];
////使用多用户字段
temColPage
.
forEach
((
elCode
)
=>
{
if
(
elCode
.
code
)
{
arrTitleUse
.
push
({
...
...
@@ -205,6 +222,18 @@ export default {
code
:
elCode
.
code
,
});
}
if
(
elCode
.
type
==
"user"
)
{
arrUseName
.
push
({
key
:
elCode
.
key
,
code
:
elCode
.
type
,
});
}
if
(
elCode
.
type
==
"users"
)
{
arrUseNames
.
push
({
key
:
elCode
.
key
,
code
:
elCode
.
type
,
});
}
});
let
useData
=
[];
//重新组织list列表数据
temData
.
forEach
((
elData
,
index
)
=>
{
...
...
@@ -215,7 +244,7 @@ export default {
useData
.
push
(
objTm
);
});
//对列表里的部门及数据字典项进行处理
//对列表里的部门及数据字典项
、用户等
进行处理
useData
.
forEach
((
eles
)
=>
{
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if
(
...
...
@@ -247,7 +276,32 @@ export default {
}
});
}
//人员名称转换为userid,如果查不到此人员,则为空
arrUseName
.
forEach
((
euser
)
=>
{
if
(
eles
[
euser
.
key
]
&&
eles
[
euser
.
key
]
!=
""
&&
eles
[
euser
.
key
]
!=
null
)
{
this
.
usersArr
.
forEach
(
eluser
=>
{
if
(
eles
[
euser
.
key
]
==
eluser
.
name
)
{
eles
[
euser
.
key
]
=
eluser
.
id
}
})
}
});
//多个名称转换为数组
arrUseNames
.
forEach
((
eusers
)
=>
{
if
(
eles
[
eusers
.
key
]
&&
eles
[
eusers
.
key
]
!=
""
&&
eles
[
eusers
.
key
]
!=
null
)
{
let
arruserstemp
=
this
.
$u
.
clone
(
eles
[
eusers
.
key
].
split
(
','
)
||
eles
[
eusers
.
key
].
split
(
','
))
let
tempUserIds
=
[]
arruserstemp
.
forEach
(
eltempUsers
=>
{
this
.
usersArr
.
forEach
(
elusers
=>
{
if
(
eltempUsers
==
elusers
.
name
)
{
tempUserIds
.
push
(
elusers
.
id
)
}
})
})
eles
[
eusers
.
key
]
=
tempUserIds
}
});
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
eles
[
elem
.
key
]
&&
...
...
@@ -436,6 +490,7 @@ export default {
this
.
dataIm
=
formatList
;
this
.
batchImportUrl
=
url
;
},
l
(
key
)
{
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
components/page/treeGrid/EditGrid.vue
View file @
15a0c384
This diff is collapsed.
Click to expand it.
i18n/locale/zh-CN.js
View file @
15a0c384
...
...
@@ -946,7 +946,7 @@ export default {
taskCode
:
'甲方任务号'
,
putintDocmentCode
:
'甲方投产输入文件(编号)'
,
technologyDocmentCode
:
'甲方技术输入文件(编号)'
,
productionType
:
'生产类型'
productionType
:
'生产类型'
},
mes_part_task_plan_simulate
:
{
id
:
''
,
...
...
@@ -1137,8 +1137,8 @@ export default {
multipleEquip
:
"是否多台安排设备"
,
// 否 是
multipleEquipIds
:
"设备id"
,
//用英文逗号分隔
discrete
:
'离散值'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
,
},
routing_header
:
{
id
:
''
,
...
...
@@ -1489,9 +1489,9 @@ export default {
endTime
:
'结束时间'
,
planEndTime
:
'计划结束时间'
,
action
:
'操作'
,
subWorkHourStatus
:
'工时状态'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
subWorkHourStatus
:
'工时状态'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
},
product_level
:
{
name
:
'名称'
,
...
...
@@ -1824,6 +1824,8 @@ export default {
type
:
'类型'
,
attachment
:
'附件'
,
executor
:
'执行人'
,
upTitle
:
'上级名称'
,
deliverable
:
"交付物"
,
},
project_main
:
{
creationTime
:
'创建时间'
,
...
...
@@ -1922,10 +1924,9 @@ export default {
whour
:
'可用工日'
,
whourpd
:
'可用工时/天'
,
joindate
:
'加入日期'
}
,
//文档分类
document_category
:
{
},
//文档分类
document_category
:
{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
...
...
@@ -2017,10 +2018,11 @@ document_category: {
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
projectId
:
'项目id'
,
direction
:
"方向"
,
deliverable
:
"交付物"
,
direction
:
"方向"
,
deliverable
:
"交付物"
,
upId
:
'父级'
,
title
:
'标题'
,
upTitle
:
'上级名称'
,
status
:
'状态'
,
note
:
'描述'
,
startDate
:
'开始日期'
,
...
...
@@ -2159,6 +2161,15 @@ document_category: {
template
:
'模板'
,
attachment
:
'附件'
,
type
:
'模版类型'
,
direction
:
'方向'
,
projectId
:
'项目id'
,
upId
:
'父级'
,
status
:
'状态'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
executor
:
'执行人'
,
deliverable
:
'交付物'
},
workHour
:
{
userTitle
:
'员工姓名'
,
...
...
libs/henq.js
View file @
15a0c384
...
...
@@ -133,6 +133,10 @@ henq.toTree = (list, rootId, format, parentFiledName) => {
function
toTree
(
data
,
parentId
,
level
)
{
let
parents
=
data
.
filter
(
u
=>
{
if
(
u
[
upId
]
==
''
)
{
u
[
upId
]
=
null
}
return
u
[
upId
]
==
parentId
})
...
...
npm-shrinkwrap.json
View file @
15a0c384
...
...
@@ -4938,7 +4938,7 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.14.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.14.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.14.1.tgz"
,
"integrity"
:
"sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
}
}
...
...
@@ -5472,7 +5472,7 @@
},
"crc-32"
:
{
"version"
:
"1.2.0"
,
"resolved"
:
"http
://r.cnpmjs
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"integrity"
:
"sha1-yy224puIUI4y2d0OwWk+e0Ghggg="
,
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
...
...
@@ -7369,7 +7369,7 @@
},
"exit-on-epipe"
:
{
"version"
:
"1.0.1"
,
"resolved"
:
"http
://r.cnpmjs
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"integrity"
:
"sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
},
"expand-brackets"
:
{
...
...
@@ -8020,7 +8020,7 @@
},
"frac"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/frac/download/frac-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/frac/download/frac-1.1.2.tgz"
,
"integrity"
:
"sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
},
"fragment-cache"
:
{
...
...
@@ -15092,7 +15092,7 @@
},
"printj"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/printj/download/printj-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/printj/download/printj-1.1.2.tgz"
,
"integrity"
:
"sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
},
"private"
:
{
...
...
@@ -20545,7 +20545,7 @@
},
"script-loader"
:
{
"version"
:
"0.7.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"integrity"
:
"sha1-IBbbb4byX1z1baOJFdgzeLsWa6c="
,
"dev"
:
true
,
"requires"
:
{
...
...
@@ -21133,7 +21133,7 @@
},
"ssf"
:
{
"version"
:
"0.10.3"
,
"resolved"
:
"http
://r.cnpmjs
.org/ssf/download/ssf-0.10.3.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/ssf/download/ssf-0.10.3.tgz"
,
"integrity"
:
"sha1-jq4fwpyQpVLnkhII+BiS1vd6yys="
,
"requires"
:
{
"frac"
:
"~1.1.2"
...
...
@@ -23788,7 +23788,7 @@
},
"wmf"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/wmf/download/wmf-1.0.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/wmf/download/wmf-1.0.2.tgz"
,
"integrity"
:
"sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
},
"word-wrap"
:
{
...
...
@@ -23943,7 +23943,7 @@
},
"xlsx"
:
{
"version"
:
"0.15.6"
,
"resolved"
:
"http
://r.cnpmjs.org/xlsx/download/
xlsx-0.15.6.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/xlsx/download/xlsx-0.15.6.tgz?cache=0&sync_timestamp=1597272342311&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxlsx%2Fdownload%2F
xlsx-0.15.6.tgz"
,
"integrity"
:
"sha1-Rh+EHW2eoag3XizSRr8jrs4IodU="
,
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
...
...
@@ -23958,7 +23958,7 @@
"dependencies"
:
{
"commander"
:
{
"version"
:
"2.17.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.17.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.17.1.tgz"
,
"integrity"
:
"sha1-vXerfebelCBc6sxy8XFtKfIKd78="
}
}
...
...
pages/aps/aps/index.vue
View file @
15a0c384
This diff is collapsed.
Click to expand it.
pages/aps/plan/index.vue
View file @
15a0c384
This diff is collapsed.
Click to expand it.
pages/project/groupUser/list.vue
View file @
15a0c384
...
...
@@ -533,9 +533,9 @@ export default {
},
//新增时取消
remove
(
row
,
index
)
{
if
(
!
row
.
id
||
!
row
.
groupId
)
{
this
.
list
.
pop
();
}
//
if (!row.id || !row.groupId) {
//
this.list.pop();
//
}
this
.
edit
=
-
1
;
},
//新增保存或修改保存
...
...
pages/project/plan/importTemplate.vue
View file @
15a0c384
<
template
>
<div>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
</EditGrid>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
</EditGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
fullscreen
>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
/>
</Modal>
</div>
</
template
>
<
script
>
...
...
@@ -16,8 +21,12 @@ export default {
},
data
()
{
return
{
title
:
''
,
modal
:
false
,
curId
:
0
,
list
:[],
row
:
null
,
list
:
[],
detail
:
null
,
columns
:
[
{
key
:
"id"
,
...
...
@@ -32,7 +41,24 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
)
},
},
params
.
row
.
title
);
},
},
// {
// key: "title",
// title: this.l("title"),
// align: "left",
// easy: true,
// high: true,
// },
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
...
...
@@ -69,19 +95,19 @@ export default {
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
on
:
{
click
:
()
=>
this
.
useTemplate
(
params
.
row
.
id
)
},
},
"导入"
),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
]);
},
},
...
...
@@ -91,7 +117,7 @@ export default {
mounted
()
{
this
.
load
();
},
props
:
{
props
:
{
v
:
Object
,
eid
:
String
,
},
...
...
@@ -105,24 +131,30 @@ export default {
this
.
curId
=
""
;
},
load
()
{
Api
.
templates
({
}).
then
(
r
=>
{
this
.
list
=
r
.
result
;
})
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"
)
}
})
Api
.
useTemplate
({
id
:
id
,
projectId
:
this
.
eid
,
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"导入成功"
);
this
.
$emit
(
"on-load"
);
}
});
},
view
(
row
)
{
console
.
log
(
"111"
);
console
.
log
(
row
);
this
.
title
=
"查看"
;
this
.
modal
=
true
;
this
.
row
=
row
;
this
.
curId
=
row
.
id
;
this
.
detail
=
()
=>
import
(
"../resources/templates/detail.vue"
);
},
l
(
key
)
{
let
vkey
=
"project_template"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/project/plan/index.vue
View file @
15a0c384
<
template
>
<div>
<Card>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
:level=
"8"
:drag=
"true"
:exportTitle=
"exportTl"
>
<EditGrid
:columns=
"columns"
ref=
"grid"
:
batch=
"true"
:
items=
"list"
:level=
"8"
:drag=
"true"
:exportTitle=
"exportTl"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
...
...
@@ -15,7 +15,8 @@
</template> -->
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add(null)"
>
新增
</Button>
<Dropdown
@
on-click=
"show"
>
<Button
@
mouseenter
.
native=
"showBm"
ref=
"showBtn"
shape=
"circle"
icon=
"md-settings"
></Button>
<Dropdown
@
on-click=
"show"
v-if=
"false"
>
<Button
shape=
"circle"
icon=
"md-settings"
></Button>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"saveTemplate"
>
存为模版
</DropdownItem>
...
...
@@ -31,9 +32,11 @@
</
template
>
</EditGrid>
</Card>
<Submenus
:show=
"showStatu"
:data=
"tempItems"
:params=
"params"
></Submenus>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</template>
...
...
@@ -77,7 +80,6 @@ export default {
},
modal
:
false
,
title
:
"新增"
,
exportTl
:
'项目目录'
,
detail
:
null
,
curId
:
null
,
list
:
[],
...
...
@@ -93,6 +95,12 @@ export default {
type
:
"selection"
,
align
:
'center'
},
{
key
:
"upTitle"
,
title
:
this
.
l
(
"upTitle"
),
hide
:
true
,
export
:
true
,
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
...
...
@@ -238,6 +246,14 @@ export default {
},
},
],
//setButon
showStatu
:
false
,
//控件是否显示
tempItems
:
[],
//控件数据
params
:
{},
//控件坐标位置
//导出导入
exportTl
:
'项目目录'
,
ModalIm
:
false
,
temTitle
:
"项目目录"
,
};
},
mounted
()
{
...
...
@@ -376,13 +392,118 @@ export default {
that
.
modal
=
true
;
},
}
//导出excel
if
(
name
==
'down'
)
{
this
.
exportTl
=
'项目目录-'
+
this
.
data
.
title
;
this
.
$refs
.
grid
.
export2Excel
()
}
if
(
name
==
'importExcel'
)
{
this
.
openModalIm
()
}
m
[
name
]
&&
m
[
name
](
name
);
},
saveTemplate
()
{
var
that
=
this
;
that
.
curId
=
that
.
eid
;
that
.
row
=
that
.
data
;
that
.
title
=
"保存模版"
;
that
.
detail
=
()
=>
import
(
"./saveTemplate"
);
that
.
modal
=
true
;
},
useTemplate
()
{
var
that
=
this
;
that
.
curId
=
that
.
eid
;
that
.
row
=
that
.
data
;
that
.
title
=
"导入模版"
;
that
.
detail
=
()
=>
import
(
"./importTemplate"
);
that
.
modal
=
true
;
},
down
()
{
this
.
exportTl
=
'项目目录-'
+
this
.
data
.
title
;
this
.
$refs
.
grid
.
export2Excel
()
},
importExcel
()
{
this
.
openModalIm
()
},
showBm
(
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
:
"存为模版"
,
onClick
:
()
=>
{
this
.
saveTemplate
()
},
},
{
label
:
"导入模版"
,
divided
:
true
,
onClick
:
()
=>
{
this
.
useTemplate
()
},
},
{
label
:
"导出Excel"
,
icon
:
"md-cloud-download"
,
onClick
:
()
=>
{
this
.
down
()
},
},
{
label
:
"导入Excel"
,
icon
:
"md-cloud-upload"
,
onClick
:
()
=>
{
this
.
importExcel
()
},
}
];
},
//批量导入start
//导入功能
openModalIm
()
{
this
.
ModalIm
=
true
},
ModalImCancel
()
{
this
.
ModalIm
=
false
},
getData
(
val
)
{
let
url
=
`
${
material
}
/projectplan/importplans`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
columns
,
this
.
formatMethod
(
val
))
},
//根据页面二次处理数据
formatMethod
(
val
)
{
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
projectId
:
this
.
eid
,
upTitle
:
ele
.
upTitle
?
ele
.
upTitle
:
null
,
title
:
ele
.
title
?
ele
.
title
:
''
,
status
:
0
,
type
:
ele
.
type
?
ele
.
type
:
0
,
//?
startDate
:
ele
.
startDate
?
ele
.
startDate
:
""
,
//?
endDate
:
ele
.
endDate
?
ele
.
endDate
:
""
,
//?
direction
:
ele
.
direction
?
ele
.
direction
:
0
,
executor
:
ele
.
executor
?
ele
.
executor
:
[],
//?
deliverable
:
ele
.
deliverable
?
ele
.
deliverable
:
0
};
if
(
ele
.
title
&&
ele
.
title
!=
''
)
{
obj
.
ico
=
false
}
else
{
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
});
return
tempList
},
//批量导入end
l
(
key
)
{
let
vkey
=
"project_plan"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/project/project/add.vue
View file @
15a0c384
...
...
@@ -79,10 +79,9 @@
></Col>
<Col
:span=
"12"
>
<FormItem
label=
"开始结束时间"
prop=
"date"
>
<DateRange
v-model=
"entity"
edit
></DateRange>
</FormItem
<DateRange
v-model=
"entity"
edit
></DateRange>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
...
...
@@ -200,8 +199,23 @@ export default {
}
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
debugger
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
//添加当前登陆人为项目经理
var
user
=
this
.
$store
.
state
.
userInfo
;
var
entity
=
{
userId
:
user
.
id
,
role
:
0
,
status
:
1
,
joindate
:
""
,
whour
:
14
,
whourpd
:
7.0
,
authority
:
2
,
projectId
:
r
.
result
.
id
,
note
:
user
.
name
,
};
Api
.
addMaster
(
entity
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
...
...
pages/project/project/api.js
View file @
15a0c384
...
...
@@ -16,6 +16,10 @@ export default {
update
(
params
){
return
Api
.
post
(
`
${
material
}
/projectmain/update`
,
params
);
},
addMaster
(
params
)
{
return
Api
.
post
(
`
${
material
}
/projectgroupuser/create`
,
params
);
},
delete
(
id
)
{
return
Api
.
delete
(
`
${
material
}
/projectmain/delete`
,{
params
:{
id
:
id
}});
},
...
...
pages/project/resources/templates/detail.vue
View file @
15a0c384
...
...
@@ -19,13 +19,21 @@
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('template')"
>
{{
entity
.
template
}}
</Filed>
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('template')"
>
{{
entity
.
template
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('attachment')"
>
{{
entity
.
attachment
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
{{
entity
.
type
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
{{
entity
.
type
}}
</Filed>
-->
<Filed
:span=
"8"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"8"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
/>
</Filed>
<Filed
:span=
"24"
:name=
"l('note')"
>
{{
entity
.
note
}}
</Filed>
</Row>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
:level=
"8"
>
</EditGrid>
</div>
</
template
>
<
script
>
...
...
@@ -39,20 +47,124 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
exportTl
:
"项目目录"
,
list
:
[],
columns
:
[
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
tree
:
true
,
easy
:
true
,
high
:
true
,
export
:
true
,
},
{
key
:
"type"
,
width
:
90
,
title
:
this
.
l
(
"type"
),
align
:
"center"
,
high
:
true
,
code
:
"mes.project_plan.Type"
,
attr
:
{
type
:
"icon"
,
},
export
:
true
,
},
{
key
:
"direction"
,
title
:
this
.
l
(
"direction"
),
align
:
"center"
,
// code: "mes.project_plan.direction",
width
:
80
,
easy
:
true
,
high
:
true
,
export
:
true
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
width
:
80
,
high
:
true
,
// code: "mes.project_plan.Status",
export
:
true
,
},
{
key
:
"startDate"
,
title
:
"计划开始日期"
,
hide
:
true
,
export
:
true
,
},
{
key
:
"endDate"
,
title
:
"计划结束日期"
,
hide
:
true
,
export
:
true
,
},
{
key
:
"dateRange"
,
width
:
250
,
title
:
"计划日期"
,
align
:
"center"
,
render
(
h
,
param
)
{
return
h
(
"DateRange"
,
{
attrs
:
{
value
:
param
.
row
,
},
});
},
},
{
key
:
"executor"
,
title
:
this
.
l
(
"executor"
),
align
:
"left"
,
high
:
true
,
type
:
"users"
,
export
:
true
,
},
{
key
:
"deliverable"
,
title
:
this
.
l
(
"deliverable"
),
// code: "mes.project_plan.deliverable",
width
:
80
,
align
:
"center"
,
easy
:
true
,
high
:
true
,
export
:
true
,
},
],
};
},
props
:
{
eid
:
String
,
},
mounted
()
{
if
(
this
.
eid
)
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
},
async
fetch
({
store
,
params
})
{
// await store.dispatch("loadDictionary"); // 加载数据字典
},
methods
:
{
load
(
v
)
{
console
.
log
(
this
.
$store
.
state
.
dictionary
)
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
console
.
log
(
JSON
.
parse
(
this
.
entity
.
template
));
var
data
=
this
.
$u
.
toTree
(
JSON
.
parse
(
this
.
entity
.
template
),
null
,
(
u
)
=>
{
// console.log(u);
// u.expanded = true;
// u.selected = false;
// u.checked = false;
},
"upId"
);
this
.
list
=
data
;
this
.
$emit
(
"on-load"
);
});
},
...
...
@@ -66,7 +178,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
""
)
{
if
(
v
!=
""
)
{
this
.
load
(
v
);
}
},
...
...
@@ -74,7 +186,10 @@ export default {
};
</
script
>
<
style
lang=
"less"
scoped
>
.detail{
.detail
{
width: 100%;
}
.detail .ivu-row{
height: auto;
}
</
style
>
style>
\ No newline at end of file
pages/project/resources/templates/index.vue
View file @
15a0c384
...
...
@@ -21,7 +21,7 @@
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
'fullscreen'
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
...
...
@@ -41,6 +41,7 @@ export default {
},
data
()
{
return
{
fullscreen
:
false
,
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
...
...
@@ -180,6 +181,7 @@ export default {
},
mounted
()
{
console
.
log
(
this
);
console
.
log
(
"dictionary"
,
this
.
$store
.
state
.
dictionary
)
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
...
@@ -206,6 +208,7 @@ export default {
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
...
...
pages/test/example/components/jcTreeGrid.vue
View file @
15a0c384
...
...
@@ -5,7 +5,7 @@
<div
class=
"example_split"
></div>
<div
class=
"example-code"
:style=
"styleH"
>
<div
:style=
'opacity'
>
<pre><code
class=
"hljs"
><span
class=
"hljs-tag"
><
<
span
class=
"hljs-title"
>
template
</span>
>
</span>
<pre><code
class=
"hljs"
><span
class=
"hljs-tag"
><span
class=
"hljs-title"
>
template
</span>
>
</span>
<span
class=
"hljs-tag"
><<span
class=
"hljs-title"
>
Table
</span>
<span
class=
"hljs-attribute"
>
:columns
</span>
=
<span
class=
"hljs-value"
>
"columns1"
</span>
<span
class=
"hljs-attribute"
>
:data
</span>
=
<span
class=
"hljs-value"
>
"data1"
</span>
>
</span><span
class=
"hljs-tag"
></<span
class=
"hljs-title"
>
Table
</span>
>
</span>
<span
class=
"hljs-tag"
></<span
class=
"hljs-title"
>
template
</span>
>
</span>
<span
class=
"hljs-tag"
><<span
class=
"hljs-title"
>
script
</span>
>
</span><span
class=
"javascript"
>
...
...
pages/test/test2.vue
View file @
15a0c384
...
...
@@ -9,6 +9,14 @@
<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
class=
"mt50 pl10"
>
<h2>
mouseenter
</h2>
<p>
<Button
@
mouseenter
.
native=
"showBm"
ref=
"showBtn"
shape=
"circle"
icon=
"ios-settings"
></Button>
<div
@
mouseover=
"showBm"
v-if=
"false"
ref=
"showB"
class=
"tc"
style=
"width:120px;height:40px;line-height:40px;background:#f5f5f5;border:#ccc solid 1px; border-radius: 5px;"
>
mouseenter打开菜单
</div>
</p>
</div>
</div>
</
template
>
...
...
@@ -43,13 +51,13 @@ export default {
this
.
tempItems
=
[{
label
:
"返回(B)"
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"tttt"
)
},
},
{
label
:
"前进(F)"
,
disabled
:
true
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"11"
)
},
},
{
...
...
@@ -57,13 +65,13 @@ export default {
divided
:
true
,
icon
:
"el-icon-refresh"
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"222"
)
},
},
{
label
:
"另存为(A)..."
,
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"333"
)
},
},
{
...
...
@@ -223,6 +231,79 @@ export default {
});
event
.
preventDefault
();
},
showBm
(
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
:
()
=>
{
alert
(
"11"
)
},
},
{
label
:
"前进(F)"
,
disabled
:
true
,
onClick
:
()
=>
{
alert
(
"222"
)
},
},
{
label
:
"重新加载(R)"
,
divided
:
true
,
icon
:
"el-icon-refresh"
,
onClick
:
()
=>
{
alert
(
"33"
)
},
},
{
label
:
"另存为(A)..."
,
onClick
:
()
=>
{
alert
(
"44"
)
},
},
{
label
:
"打印(P)..."
,
icon
:
"el-icon-printer"
,
onClick
:
()
=>
{
alert
(
"55"
)
},
},
{
label
:
"投射(C)..."
,
divided
:
true
,
onClick
:
()
=>
{
alert
(
"66"
)
},
},
{
label
:
"使用网页翻译(T)"
,
divided
:
true
,
minWidth
:
0
,
children
:
[{
label
:
"翻译成简体中文"
,
onClick
:
()
=>
{
alert
(
"77"
)
},
},
{
label
:
"翻译成繁体中文"
,
onClick
:
()
=>
{
alert
(
"88"
)
},
},
],
},
];
event
.
preventDefault
();
},
leaveBm
(
event
)
{
this
.
showStatu
=
false
;
}
},
};
</
script
>
...
...
pages/welcome/index.vue
View file @
15a0c384
...
...
@@ -7,7 +7,7 @@
:key=
"index"
@
mouseenter=
"navClick(item,index)"
>
<Icon
type=
"ios-stat
s"
class=
"f16"
/>
{{
item
.
name
}}
<Icon
:type=
"item.icon
s"
class=
"f16"
/>
{{
item
.
name
}}
</li>
</ul>
...
...
@@ -42,149 +42,7 @@ import viewerVue from "../test/viewer.vue";
export
default
{
data
()
{
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
:
"大屏展示"
},
],
menus
:
[],
list
:
[],
arrList
:
[],
isIndex
:
-
1
,
...
...
@@ -204,16 +62,25 @@ export default {
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
)
{
if
(
!
this
.
$u
.
isNull
(
l
.
description
)
&&
l
.
description
.
indexOf
(
"{"
)
>
-
1
)
{
l
.
style
=
eval
(
"("
+
l
.
description
+
")"
);
}
return
l
;
});
console
.
log
(
"arr"
,
arr
);
this
.
arrList
=
arr
;
this
.
arrList
.
map
(
v
=>
{
if
(
v
.
name
==
'项目管理'
){
this
.
menus
[
0
]
=
v
;
this
.
menus
[
0
].
icons
=
'ios-list-box-outline'
;
}
else
if
(
v
.
name
==
'文档管理'
){
this
.
menus
[
1
]
=
v
;
this
.
menus
[
1
].
icons
=
'md-document'
;
}
else
if
(
v
.
name
==
'大屏展示'
){
this
.
menus
[
2
]
=
v
;
this
.
menus
[
2
].
icons
=
'ios-stats'
;
}
})
console
.
log
(
this
.
menus
)
}
});
},
...
...
@@ -237,8 +104,7 @@ export default {
this
.
menuPos
=
{
left
,
top
};
}
},
navClick
(
v
,
index
)
{
navClick
(
v
,
index
)
{
if
(
v
.
children
&&
v
.
children
.
length
>
0
)
{
var
{
left
,
top
}
=
v
.
style
;
this
.
list
=
v
.
children
;
...
...
store/index.js
View file @
15a0c384
This diff is collapsed.
Click to expand it.
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