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
Show 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,
...
@@ -21,7 +21,9 @@ ul,
li {
li {
list-style: none;
list-style: none;
}
}
.ivu-drawer-wrap{
z-index: 12000;
}
div::-webkit-scrollbar {
div::-webkit-scrollbar {
width: 10px;
width: 10px;
height: 10px;
height: 10px;
...
...
assets/css/iview-reset.less
View file @
15a0c384
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
box-sizing: border-box;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
-webkit-tap-highlight-color: transparent;
}
}
.ivu-btn-primary {
.ivu-btn-primary {
color: #fff;
color: #fff;
background-color: @primary-color;
background-color: @primary-color;
...
...
components/page/bmenu/components/Submenu.vue
View file @
15a0c384
<
template
>
<
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
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"
>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
item.divided?'menu_item__divided':null
item.divided?'menu_item__divided':null
]"
:key=
"index"
v-if=
"item.disabled"
>
]"
:key=
"index"
v-if=
"item.disabled"
>
<div
class=
"menu_item_icon"
v-if=
"hasIcon"
>
<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>
</div>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<div
class=
"menu_item_expand_icon"
></div>
<div
class=
"menu_item_expand_icon"
></div>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
item.divided?'menu_item__divided':null
item.divided?'menu_item__divided':null
]"
:key=
"index"
@
mouseenter=
"($event)=>enterItem($event,item,index)"
v-else-if=
"item.children"
>
]"
:key=
"index"
@
mouseenter=
"($event)=>enterItem($event,item,index)"
v-else-if=
"item.children"
>
<div
class=
"menu_item_icon"
v-if=
"hasIcon"
>
<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>
</div>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<div
class=
"menu_item_expand_icon"
>
▶
</div>
<div
class=
"menu_item_expand_icon"
>
▶
</div>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
item.divided?'menu_item__divided':null
item.divided?'menu_item__divided':null
]"
:key=
"index"
@
mouseenter=
"($event)=>enterItem($event,item,index)"
@
click=
"itemClick(item)"
v-else
>
]"
:key=
"index"
@
mouseenter=
"($event)=>enterItem($event,item,index)"
@
click=
"itemClick(item)"
v-else
>
<div
class=
"menu_item_icon"
v-if=
"hasIcon"
>
<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>
</div>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<span
class=
"menu_item_label"
>
{{
item
.
label
}}
</span>
<div
class=
"menu_item_expand_icon"
></div>
<div
class=
"menu_item_expand_icon"
></div>
...
@@ -54,6 +54,9 @@ import {
...
@@ -54,6 +54,9 @@ import {
SUBMENU_OPEN_TREND_RIGHT
,
SUBMENU_OPEN_TREND_RIGHT
,
COMPONENT_NAME
COMPONENT_NAME
}
from
"../constant"
;
}
from
"../constant"
;
import
{
getElementsByClassName
}
from
"../util"
;
export
default
{
export
default
{
name
:
"Submenu"
,
name
:
"Submenu"
,
data
()
{
data
()
{
...
@@ -78,13 +81,15 @@ export default {
...
@@ -78,13 +81,15 @@ export default {
style
:
{
style
:
{
left
:
0
,
left
:
0
,
top
:
0
,
top
:
0
,
zIndex
:
2
,
zIndex
:
3
,
minWidth
:
150
minWidth
:
150
},
},
customClass
:
null
,
customClass
:
null
,
visible
:
false
,
visible
:
false
,
hasIcon
:
false
,
hasIcon
:
false
,
openTrend
:
SUBMENU_OPEN_TREND_RIGHT
openTrend
:
SUBMENU_OPEN_TREND_RIGHT
,
mouseListening
:
false
,
mainMenuInstance
:
null
,
};
};
},
},
props
:
{
props
:
{
...
@@ -104,8 +109,12 @@ export default {
...
@@ -104,8 +109,12 @@ export default {
mounted
()
{
mounted
()
{
if
(
this
.
data
!=
[])
{
if
(
this
.
data
!=
[])
{
this
.
load
(
this
.
data
)
this
.
load
(
this
.
data
)
this
.
addListener
();
}
}
},
},
destroyed
()
{
this
.
removeListener
();
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
this
.
visible
=
true
;
this
.
visible
=
true
;
...
@@ -194,13 +203,14 @@ export default {
...
@@ -194,13 +203,14 @@ export default {
};
};
this
.
activeSubmenu
.
instance
.
style
.
minWidth
=
this
.
activeSubmenu
.
instance
.
style
.
minWidth
=
typeof
item
.
minWidth
===
"number"
?
item
.
minWidth
:
this
.
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
=
this
.
activeSubmenu
.
instance
.
customClass
=
typeof
item
.
customClass
===
"string"
?
typeof
item
.
customClass
===
"string"
?
item
.
customClass
:
item
.
customClass
:
this
.
customClass
;
this
.
customClass
;
this
.
activeSubmenu
.
instance
.
$mount
();
this
.
activeSubmenu
.
instance
.
$mount
();
document
.
body
.
appendChild
(
this
.
activeSubmenu
.
instance
.
$el
);
document
.
body
.
appendChild
(
this
.
activeSubmenu
.
instance
.
$el
);
},
},
itemClick
(
item
)
{
itemClick
(
item
)
{
if
(
!
this
.
visible
)
{
if
(
!
this
.
visible
)
{
...
@@ -220,9 +230,34 @@ export default {
...
@@ -220,9 +230,34 @@ export default {
if
(
this
.
activeSubmenu
.
instance
)
{
if
(
this
.
activeSubmenu
.
instance
)
{
this
.
activeSubmenu
.
instance
.
close
();
this
.
activeSubmenu
.
instance
.
close
();
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{});
this
.
$destroy
();
},
});
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
:
{
watch
:
{
...
@@ -232,6 +267,9 @@ export default {
...
@@ -232,6 +267,9 @@ export default {
this
.
load
(
this
.
data
)
this
.
load
(
this
.
data
)
}
}
},
},
show
(
v
)
{
this
.
visible
=
v
}
},
},
};
};
</
script
>
</
script
>
...
...
components/page/import/process.vue
View file @
15a0c384
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
<
script
>
<
script
>
import
XLSX
from
"xlsx"
;
import
XLSX
from
"xlsx"
;
import
Api
from
'@/plugins/request'
import
{
import
{
Switch
Switch
}
from
"view-design"
;
}
from
"view-design"
;
...
@@ -82,6 +83,7 @@ export default {
...
@@ -82,6 +83,7 @@ export default {
formatList
:
[
"xlsx"
],
formatList
:
[
"xlsx"
],
columnsImport
:
[],
columnsImport
:
[],
departArr
:
[],
//部门list
departArr
:
[],
//部门list
usersArr
:
[],
sheetNames
:
[],
//excel的表明
sheetNames
:
[],
//excel的表明
workBook
:
{},
workBook
:
{},
openDatas
:
[],
openDatas
:
[],
...
@@ -129,9 +131,21 @@ export default {
...
@@ -129,9 +131,21 @@ export default {
this
.
$api
.
get
(
`
${
systemUrl
}
/Department/GetDepartments`
).
then
((
r
)
=>
{
this
.
$api
.
get
(
`
${
systemUrl
}
/Department/GetDepartments`
).
then
((
r
)
=>
{
this
.
departArr
=
r
.
result
.
items
;
this
.
departArr
=
r
.
result
.
items
;
});
});
this
.
$api
.
get
(
`
${
systemUrl
}
/user/getuserlist`
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
usersArr
=
r
.
result
}
})
//导出对列表头进行预加载end
//导出对列表头进行预加载end
},
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadUsers"
);
// 加载数据字典
},
mounted
()
{
mounted
()
{
//if (this.eid > 0) {
//if (this.eid > 0) {
// this.load(this.eid);
// this.load(this.eid);
...
@@ -144,6 +158,7 @@ export default {
...
@@ -144,6 +158,7 @@ export default {
this
.
tdHeightExcel
=
window
.
screenHeight
-
180
;
this
.
tdHeightExcel
=
window
.
screenHeight
-
180
;
})();
})();
};
};
},
},
methods
:
{
methods
:
{
//重新处理colum
//重新处理colum
...
@@ -198,6 +213,8 @@ export default {
...
@@ -198,6 +213,8 @@ export default {
temData
=
this
.
$u
.
clone
(
this
.
$refs
.
comExcel
.
excelData
);
temData
=
this
.
$u
.
clone
(
this
.
$refs
.
comExcel
.
excelData
);
}
}
let
arrTitleUse
=
[];
////使用数据字典的字段
let
arrTitleUse
=
[];
////使用数据字典的字段
let
arrUseName
=
[];
////使用单个用户字段
let
arrUseNames
=
[];
////使用多用户字段
temColPage
.
forEach
((
elCode
)
=>
{
temColPage
.
forEach
((
elCode
)
=>
{
if
(
elCode
.
code
)
{
if
(
elCode
.
code
)
{
arrTitleUse
.
push
({
arrTitleUse
.
push
({
...
@@ -205,6 +222,18 @@ export default {
...
@@ -205,6 +222,18 @@ export default {
code
:
elCode
.
code
,
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列表数据
let
useData
=
[];
//重新组织list列表数据
temData
.
forEach
((
elData
,
index
)
=>
{
temData
.
forEach
((
elData
,
index
)
=>
{
...
@@ -215,7 +244,7 @@ export default {
...
@@ -215,7 +244,7 @@ export default {
useData
.
push
(
objTm
);
useData
.
push
(
objTm
);
});
});
//对列表里的部门及数据字典项进行处理
//对列表里的部门及数据字典项
、用户等
进行处理
useData
.
forEach
((
eles
)
=>
{
useData
.
forEach
((
eles
)
=>
{
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
//如果导入文件没有departmentid,但存在departmentTitle的话,通过title获取id
if
(
if
(
...
@@ -247,7 +276,32 @@ export default {
...
@@ -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
)
=>
{
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
if
(
eles
[
elem
.
key
]
&&
eles
[
elem
.
key
]
&&
...
@@ -436,6 +490,7 @@ export default {
...
@@ -436,6 +490,7 @@ export default {
this
.
dataIm
=
formatList
;
this
.
dataIm
=
formatList
;
this
.
batchImportUrl
=
url
;
this
.
batchImportUrl
=
url
;
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"user"
+
"."
+
key
;
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
...
...
components/page/treeGrid/EditGrid.vue
View file @
15a0c384
<
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>
</div>
</div>
<div
class=
"btns"
>
<div
class=
"btns"
>
<slot
name=
"buttons"
></slot>
<slot
name=
"buttons"
></slot>
<!--
<Button
@
click=
"config=
!config"
>
<Button
@
click=
"config =
!config"
>
<Icon
type=
"md-build"
class=
"table-set"
size=
"14"
title=
"列设置"
/>
<Icon
type=
"md-build"
class=
"table-set"
size=
"14"
title=
"列设置"
/>
</Button>
-->
</Button>
</div>
</div>
</div>
</div>
<div
class=
"table-main"
ref=
"main"
>
<div
class=
"table-main"
ref=
"main"
>
...
@@ -16,60 +16,132 @@
...
@@ -16,60 +16,132 @@
<table
class=
"table-head"
>
<table
class=
"table-head"
>
<thead>
<thead>
<tr>
<tr>
<th
v-for=
"(column, index) in columns"
:key=
"index"
:style=
"tdStyle(column)"
>
<th
v-for=
"(column, index) in columns"
:key=
"index"
:style=
"tdStyle(column)"
>
<label
v-if=
"column.type === 'selection'"
>
<label
v-if=
"column.type === 'selection'"
>
<Checkbox
v-model=
"checkAll"
@
on-change=
"checked"
:indeterminate=
"indeterminate"
></Checkbox>
<Checkbox
v-model=
"checkAll"
@
on-change=
"allChecked"
: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
type=
"arrow-up-b"
:class=
"
{ on: column._sortType === 'asc' }" @click.native="handleSort(index, 'asc')" />
<Icon
<Icon
type=
"arrow-down-b"
:class=
"
{ on: column._sortType === 'desc' }" @click.native="handleSort(index, 'desc')" />
type=
"arrow-up-b"
: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
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)"
>
<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)"
>
<!-- -->
<!-- -->
<td
v-for=
"(column, snum) in columns"
:key=
"column.key"
:style=
"tdStyle(column)"
>
<td
v-for=
"(column, snum) in columns"
:key=
"column.key"
:style=
"tdStyle(column)"
>
<!-- 多选 -->
<!-- 多选 -->
<label
v-if=
"column.type === 'selection'"
@
click=
"rowChecked(item, index, $event)"
>
<label
<Checkbox
v-model=
"item._checked"
:indeterminate=
"item._indeterminate"
></Checkbox>
v-if=
"column.type === 'selection'"
@
click=
"rowChecked(item, index, $event)"
>
<Checkbox
v-model=
"item._checked"
:indeterminate=
"item._indeterminate"
></Checkbox>
{{
item
.
_checked
}}
</label>
</label>
<Icon
v-if=
"column.type === 'drag'"
type=
"md-more"
class=
"drag"
/>
<Icon
<DTSpan
v-if=
"column.type == 'date'"
:value=
"item[column.key]"
/>
v-if=
"column.type === 'drag'"
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
v-if=
"
<div
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
v-if=
"column.code"
:code=
"column.code"
:value=
"item[column.key]"
/>
<state
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
:type=
"!item._expanded ? 'ios-add' : 'ios-remove'"
/>
<Icon
</a><i
v-else
class=
"ms-tree-space"
></i>
:type=
"!item._expanded ? 'ios-add' : 'ios-remove'"
/>
</a
><i
v-else
class=
"ms-tree-space"
></i>
</span>
</span>
<!-- 菜单名称、排序、请求地址 -->
<!-- 菜单名称、排序、请求地址 -->
<label
v-if=
"
<label
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
v-if=
"column.render && !column.type && !column.solt"
:row=
"item"
:column=
"column"
:index=
"snum"
:render=
"column.render"
></table-expand>
<table-expand
<column-slot
v-if=
"column.slot"
:row=
"item"
:column=
"column"
:index=
"snum"
></column-slot>
v-if=
"column.render && !column.type && !column.solt"
: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>
...
@@ -79,16 +151,43 @@
...
@@ -79,16 +151,43 @@
<div
class=
"table-footer"
>
<div
class=
"table-footer"
>
<slot
name=
"footer"
></slot>
<slot
name=
"footer"
></slot>
<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"
/>
<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"
/>
</div>
</div>
<Modal
v-if=
"high"
v-model=
"modalSearch"
title=
"高级搜索"
draggable
width=
"800"
ref=
"search"
>
<Modal
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
title=
"列设置"
v-if=
"set"
v-model=
"config"
:scrollable=
"true"
placement=
"left"
:mask=
"false"
>
<Drawer
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"
>
...
@@ -96,9 +195,17 @@
...
@@ -96,9 +195,17 @@
</a>
</a>
</div>
</div>
<ul
class=
"table-columns"
>
<ul
class=
"table-columns"
>
<li
v-for=
"(li, index) in columnsCur"
:key=
"index"
v-dragging=
"
{ item: li, list: columnsCur, group: 'li' }">
<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
:type=
"li.hide ? 'md-eye-off' : 'md-eye'"
size=
"16"
class=
"mr10"
/>
<Icon
: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"
/>
...
@@ -106,11 +213,11 @@
...
@@ -106,11 +213,11 @@
</ul>
</ul>
</Drawer>
</Drawer>
<FooterToolbar
v-if=
"batch"
v-show=
"footerToolbar"
class=
"ftball"
>
<FooterToolbar
v-if=
"batch"
v-show=
"footerToolbar"
class=
"ftball"
>
<div
class=
"tip
"
>
已选
{{
selectItems
.
length
}}
项
</div>
<div
class=
"ib
"
>
已选
{{
selectItems
.
length
}}
项
</div>
<slot
name=
"batch"
></slot>
<slot
name=
"batch"
></slot>
<Button
@
click=
"cancelBatch"
>
取消
</Button>
<Button
@
click=
"cancelBatch"
>
取消
</Button>
</FooterToolbar>
</FooterToolbar>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -120,7 +227,7 @@ export default {
...
@@ -120,7 +227,7 @@ export default {
name
:
"treeGrid"
,
name
:
"treeGrid"
,
components
:
{
components
:
{
TableExpand
,
TableExpand
,
ColumnSlot
ColumnSlot
,
},
},
props
:
{
props
:
{
mode
:
{
mode
:
{
...
@@ -199,14 +306,14 @@ export default {
...
@@ -199,14 +306,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
[];
},
},
},
},
...
@@ -308,12 +415,6 @@ export default {
...
@@ -308,12 +415,6 @@ export default {
items
()
{
items
()
{
if
(
this
.
items
)
{
if
(
this
.
items
)
{
this
.
trs
=
this
.
treeToList
(
this
.
items
);
this
.
trs
=
this
.
treeToList
(
this
.
items
);
this
.
checkGroup
=
this
.
renderCheck
(
this
.
items
);
if
(
this
.
checkGroup
.
length
==
this
.
dataLength
)
{
this
.
checks
=
true
;
}
else
{
this
.
checks
=
false
;
}
}
}
},
},
data
(
v
)
{},
data
(
v
)
{},
...
@@ -323,24 +424,15 @@ export default {
...
@@ -323,24 +424,15 @@ export default {
},
},
deep
:
true
,
deep
:
true
,
},
},
checkGroup
(
data
)
{
this
.
checkAllGroupChange
(
data
);
},
exportTitle
(
v
)
{
exportTitle
(
v
)
{
this
.
exportTitle
=
v
this
.
exportTitle
=
v
;
}
},
},
},
mounted
()
{
mounted
()
{
this
.
getAllUser
();
//获取所有用户
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
();
this
.
checkGroup
=
this
.
renderCheck
(
this
.
items
);
if
(
this
.
checkGroup
.
length
==
this
.
dataLength
)
{
this
.
checks
=
true
;
}
else
{
this
.
checks
=
false
;
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -470,7 +562,6 @@ export default {
...
@@ -470,7 +562,6 @@ export default {
}
}
});
});
}
}
console
.
warn
(
index
,
item
.
_expanded
,
item
);
},
},
show
(
item
)
{
show
(
item
)
{
if
(
item
.
_level
==
0
)
{
if
(
item
.
_level
==
0
)
{
...
@@ -520,7 +611,11 @@ export default {
...
@@ -520,7 +611,11 @@ export default {
},
},
// 点击check勾选框,判断是否有children节点 如果有就一并勾选
// 点击check勾选框,判断是否有children节点 如果有就一并勾选
rowChecked
(
data
,
index
,
event
)
{
rowChecked
(
data
,
index
,
event
)
{
// this.$set(this.trs, index, data);
var
boys
=
this
.
getChildrens
(
data
);
var
boys
=
this
.
getChildrens
(
data
);
if
(
boys
.
length
){
}
this
.
trs
.
forEach
((
u
,
i
)
=>
{
this
.
trs
.
forEach
((
u
,
i
)
=>
{
var
items
=
boys
.
filter
((
b
)
=>
{
var
items
=
boys
.
filter
((
b
)
=>
{
return
b
[
this
.
keyname
]
==
u
[
this
.
keyname
];
return
b
[
this
.
keyname
]
==
u
[
this
.
keyname
];
...
@@ -534,12 +629,14 @@ export default {
...
@@ -534,12 +629,14 @@ export default {
this
.
trs
.
filter
((
u
)
=>
{
this
.
trs
.
filter
((
u
)
=>
{
return
!
u
.
_checked
;
return
!
u
.
_checked
;
}).
length
;
}).
length
;
this
.
$nextTick
(()
=>
{
this
.
selectionChange
();
});
},
},
getChildrens
(
data
)
{
getChildrens
(
data
)
{
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
])
{
...
@@ -551,11 +648,22 @@ export default {
...
@@ -551,11 +648,22 @@ export default {
return
childrens
;
return
childrens
;
},
},
// checkbox 全选 选择事件
// checkbox 全选 选择事件
c
hecked
(
v
)
{
allC
hecked
(
v
)
{
this
.
trs
.
forEach
((
u
,
i
)
=>
{
this
.
trs
.
forEach
((
u
,
i
)
=>
{
this
.
$set
(
this
.
trs
[
i
],
"_checked"
,
v
);
this
.
$set
(
this
.
trs
[
i
],
"_checked"
,
v
);
});
});
// this.$emit('on-selection-change', this.checkGroup)
this
.
$nextTick
(()
=>
{
this
.
selectionChange
();
});
},
selectionChange
()
{
var
items
=
this
.
trs
.
filter
((
u
)
=>
{
return
u
.
_checked
===
true
;
});
this
.
selectItems
=
items
;
this
.
$emit
(
"on-selection-change"
,
items
,
this
.
trs
);
this
.
footerToolbar
=
items
.
length
>
0
;
console
.
log
(
"footerToolbar"
,
items
,
this
.
trs
);
},
},
// 数组去重
// 数组去重
getArray
(
a
)
{
getArray
(
a
)
{
...
@@ -570,14 +678,6 @@ export default {
...
@@ -570,14 +678,6 @@ export default {
}
}
return
result
;
return
result
;
},
},
checkAllGroupChange
(
data
)
{
if
(
this
.
dataLength
>
0
&&
data
.
length
===
this
.
dataLength
)
{
this
.
checks
=
true
;
}
else
{
this
.
checks
=
false
;
}
this
.
$emit
(
"on-selection-change"
,
this
.
checkGroup
);
},
All
(
data
)
{
All
(
data
)
{
let
arr
=
[];
let
arr
=
[];
data
.
forEach
((
item
)
=>
{
data
.
forEach
((
item
)
=>
{
...
@@ -626,19 +726,6 @@ export default {
...
@@ -626,19 +726,6 @@ export default {
renderBody
(
row
,
column
,
index
)
{
renderBody
(
row
,
column
,
index
)
{
return
row
[
column
.
key
];
return
row
[
column
.
key
];
},
},
// 默认选中
renderCheck
(
data
)
{
let
arr
=
[];
data
.
forEach
((
item
)
=>
{
if
(
item
.
_checked
)
{
arr
.
push
(
item
.
id
);
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
arr
=
arr
.
concat
(
this
.
renderCheck
(
item
.
children
));
}
});
return
arr
;
},
//分页选择
//分页选择
pageChange
(
page
)
{
pageChange
(
page
)
{
this
.
search
.
page
=
page
;
this
.
search
.
page
=
page
;
...
@@ -655,11 +742,7 @@ export default {
...
@@ -655,11 +742,7 @@ export default {
this
.
$set
(
this
.
columnsCur
,
item
,
i
);
this
.
$set
(
this
.
columnsCur
,
item
,
i
);
this
.
saveUserconfig
();
this
.
saveUserconfig
();
},
},
selectionChange
(
items
)
{
this
.
$emit
(
"on-selection-change"
,
items
);
this
.
selectItems
=
items
;
this
.
footerToolbar
=
items
.
length
>
0
;
},
onSelect
(
rows
,
row
)
{
onSelect
(
rows
,
row
)
{
this
.
$emit
(
"on-change"
,
rows
,
row
);
this
.
$emit
(
"on-change"
,
rows
,
row
);
},
},
...
@@ -674,7 +757,7 @@ export default {
...
@@ -674,7 +757,7 @@ export default {
//批量取消
//批量取消
cancelBatch
()
{
cancelBatch
()
{
this
.
footerToolbar
=
false
;
this
.
footerToolbar
=
false
;
this
.
$refs
.
table
.
selectAll
(
false
);
//
this.$refs.table.selectAll(false);
},
},
//导出excel
//导出excel
export2Excel
()
{
export2Excel
()
{
...
@@ -727,8 +810,10 @@ export default {
...
@@ -727,8 +810,10 @@ export default {
});
});
list
.
forEach
((
e
)
=>
{
list
.
forEach
((
e
)
=>
{
tempCol
.
forEach
((
elem
)
=>
{
tempCol
.
forEach
((
elem
)
=>
{
if
(
if
((
e
[
elem
.
key
]
&&
e
[
elem
.
key
]
!=
""
&&
e
[
elem
.
key
]
!=
null
)
||
e
[
elem
.
key
]
==
0
)
{
(
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
];
...
@@ -785,25 +870,30 @@ export default {
...
@@ -785,25 +870,30 @@ export default {
//导出username相关信息
//导出username相关信息
tempColUser
.
forEach
((
eluser
)
=>
{
tempColUser
.
forEach
((
eluser
)
=>
{
if
(
Array
.
isArray
(
e
[
eluser
.
key
])
&&
e
[
eluser
.
key
].
length
>
0
)
{
if
(
Array
.
isArray
(
e
[
eluser
.
key
])
&&
e
[
eluser
.
key
].
length
>
0
)
{
let
temUsers
=
this
.
$u
.
clone
(
e
[
eluser
.
key
])
let
temUsers
=
this
.
$u
.
clone
(
e
[
eluser
.
key
]);
let
temUserName
=
''
let
temUserName
=
""
;
temUsers
.
forEach
(
u
=>
{
temUsers
.
forEach
((
u
)
=>
{
temUserName
=
temUserName
+
this
.
getUserName
(
u
);
temUserName
=
temUserName
+
this
.
getUserName
(
u
);
})
});
e
[
eluser
.
key
]
=
temUserName
e
[
eluser
.
key
]
=
temUserName
;
}
}
if
(
e
[
eluser
.
key
]
&&
typeof
(
e
[
eluser
.
key
])
==
'string'
&&
e
[
eluser
.
key
]
!=
""
&&
e
[
eluser
.
key
]
!=
null
)
{
if
(
e
[
eluser
.
key
]
&&
typeof
e
[
eluser
.
key
]
==
"string"
&&
e
[
eluser
.
key
]
!=
""
&&
e
[
eluser
.
key
]
!=
null
)
{
e
[
eluser
.
key
]
=
this
.
getUserName
(
e
[
eluser
.
key
]);
e
[
eluser
.
key
]
=
this
.
getUserName
(
e
[
eluser
.
key
]);
}
}
});
});
tempColUsers
.
forEach
((
elusers
)
=>
{
tempColUsers
.
forEach
((
elusers
)
=>
{
if
(
e
[
elusers
.
key
].
length
>
0
)
{
if
(
e
[
elusers
.
key
].
length
>
0
)
{
let
temUsers
=
this
.
$u
.
clone
(
e
[
elusers
.
key
])
let
temUsers
=
this
.
$u
.
clone
(
e
[
elusers
.
key
]);
let
temUserName
=
''
let
temUserName
=
""
;
temUsers
.
forEach
(
u
=>
{
temUsers
.
forEach
((
u
)
=>
{
temUserName
=
temUserName
+
this
.
getUserName
(
u
)
+
','
;
temUserName
=
temUserName
+
this
.
getUserName
(
u
)
+
","
;
})
});
e
[
elusers
.
key
]
=
temUserName
.
substr
(
0
,
temUserName
.
length
-
1
)
e
[
elusers
.
key
]
=
temUserName
.
substr
(
0
,
temUserName
.
length
-
1
);
}
}
});
});
});
});
...
@@ -818,8 +908,7 @@ export default {
...
@@ -818,8 +908,7 @@ export default {
filterVal
,
filterVal
,
list
list
);
);
})
});
},
},
//获取所有用户信息
//获取所有用户信息
getAllUser
()
{
getAllUser
()
{
...
@@ -858,11 +947,15 @@ export default {
...
@@ -858,11 +947,15 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../../assets/css/custom.less";
@import "../../../assets/css/custom.less";
@table_theme: #2680eb;
@table_theme: #2680eb;
@table_head: #
e9f2fd
;
@table_head: #
f5f6fa
;
@table_line_height: 50px;
@table_line_height: 50px;
@table_hover: #f2f8fe;
@table_hover: #f2f8fe;
@table_border: #accef7;
@table_border: #e8e9eb;
// @table_theme: #2680eb;
// @table_head: #e9f2fd;
// @table_line_height: 50px;
// @table_hover: #f2f8fe;
// @table_border: #accef7;
.table-content1 {
.table-content1 {
position: relative;
position: relative;
height: 100%;
height: 100%;
...
@@ -912,10 +1005,8 @@ export default {
...
@@ -912,10 +1005,8 @@ export default {
td,
td,
th {
th {
border-left: @table_border solid 1px;
border: @table_border solid 1px;
border-right: @table_border solid 1px;
line-height: 40px;
border-bottom: #e8e9eb solid 1px;
line-height: 50px;
padding: 0 5px;
padding: 0 5px;
.drag:hover {
.drag:hover {
...
...
i18n/locale/zh-CN.js
View file @
15a0c384
...
@@ -946,7 +946,7 @@ export default {
...
@@ -946,7 +946,7 @@ export default {
taskCode
:
'甲方任务号'
,
taskCode
:
'甲方任务号'
,
putintDocmentCode
:
'甲方投产输入文件(编号)'
,
putintDocmentCode
:
'甲方投产输入文件(编号)'
,
technologyDocmentCode
:
'甲方技术输入文件(编号)'
,
technologyDocmentCode
:
'甲方技术输入文件(编号)'
,
productionType
:
'生产类型'
productionType
:
'生产类型'
},
},
mes_part_task_plan_simulate
:
{
mes_part_task_plan_simulate
:
{
id
:
''
,
id
:
''
,
...
@@ -1137,8 +1137,8 @@ export default {
...
@@ -1137,8 +1137,8 @@ export default {
multipleEquip
:
"是否多台安排设备"
,
// 否 是
multipleEquip
:
"是否多台安排设备"
,
// 否 是
multipleEquipIds
:
"设备id"
,
//用英文逗号分隔
multipleEquipIds
:
"设备id"
,
//用英文逗号分隔
discrete
:
'离散值'
,
discrete
:
'离散值'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
,
routingHeaderName
:
'工艺名称'
,
},
},
routing_header
:
{
routing_header
:
{
id
:
''
,
id
:
''
,
...
@@ -1489,9 +1489,9 @@ export default {
...
@@ -1489,9 +1489,9 @@ export default {
endTime
:
'结束时间'
,
endTime
:
'结束时间'
,
planEndTime
:
'计划结束时间'
,
planEndTime
:
'计划结束时间'
,
action
:
'操作'
,
action
:
'操作'
,
subWorkHourStatus
:
'工时状态'
,
subWorkHourStatus
:
'工时状态'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderCode
:
'工艺编号'
,
routingHeaderName
:
'工艺名称'
routingHeaderName
:
'工艺名称'
},
},
product_level
:
{
product_level
:
{
name
:
'名称'
,
name
:
'名称'
,
...
@@ -1824,6 +1824,8 @@ export default {
...
@@ -1824,6 +1824,8 @@ export default {
type
:
'类型'
,
type
:
'类型'
,
attachment
:
'附件'
,
attachment
:
'附件'
,
executor
:
'执行人'
,
executor
:
'执行人'
,
upTitle
:
'上级名称'
,
deliverable
:
"交付物"
,
},
},
project_main
:
{
project_main
:
{
creationTime
:
'创建时间'
,
creationTime
:
'创建时间'
,
...
@@ -1922,10 +1924,9 @@ export default {
...
@@ -1922,10 +1924,9 @@ export default {
whour
:
'可用工日'
,
whour
:
'可用工日'
,
whourpd
:
'可用工时/天'
,
whourpd
:
'可用工时/天'
,
joindate
:
'加入日期'
joindate
:
'加入日期'
}
},
,
//文档分类
//文档分类
document_category
:
{
document_category
:
{
creationTime
:
'创建时间'
,
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModificationTime
:
'更新时间'
,
...
@@ -2017,10 +2018,11 @@ document_category: {
...
@@ -2017,10 +2018,11 @@ document_category: {
deletionTime
:
'删除时间'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
deleterUserId
:
'删除人'
,
projectId
:
'项目id'
,
projectId
:
'项目id'
,
direction
:
"方向"
,
direction
:
"方向"
,
deliverable
:
"交付物"
,
deliverable
:
"交付物"
,
upId
:
'父级'
,
upId
:
'父级'
,
title
:
'标题'
,
title
:
'标题'
,
upTitle
:
'上级名称'
,
status
:
'状态'
,
status
:
'状态'
,
note
:
'描述'
,
note
:
'描述'
,
startDate
:
'开始日期'
,
startDate
:
'开始日期'
,
...
@@ -2159,6 +2161,15 @@ document_category: {
...
@@ -2159,6 +2161,15 @@ document_category: {
template
:
'模板'
,
template
:
'模板'
,
attachment
:
'附件'
,
attachment
:
'附件'
,
type
:
'模版类型'
,
type
:
'模版类型'
,
direction
:
'方向'
,
projectId
:
'项目id'
,
upId
:
'父级'
,
status
:
'状态'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
executor
:
'执行人'
,
deliverable
:
'交付物'
},
},
workHour
:
{
workHour
:
{
userTitle
:
'员工姓名'
,
userTitle
:
'员工姓名'
,
...
...
libs/henq.js
View file @
15a0c384
...
@@ -133,6 +133,10 @@ henq.toTree = (list, rootId, format, parentFiledName) => {
...
@@ -133,6 +133,10 @@ henq.toTree = (list, rootId, format, parentFiledName) => {
function
toTree
(
data
,
parentId
,
level
)
{
function
toTree
(
data
,
parentId
,
level
)
{
let
parents
=
data
.
filter
(
u
=>
{
let
parents
=
data
.
filter
(
u
=>
{
if
(
u
[
upId
]
==
''
)
{
u
[
upId
]
=
null
}
return
u
[
upId
]
==
parentId
return
u
[
upId
]
==
parentId
})
})
...
...
npm-shrinkwrap.json
View file @
15a0c384
...
@@ -4938,7 +4938,7 @@
...
@@ -4938,7 +4938,7 @@
"dependencies"
:
{
"dependencies"
:
{
"commander"
:
{
"commander"
:
{
"version"
:
"2.14.1"
,
"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="
"integrity"
:
"sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
}
}
}
}
...
@@ -5472,7 +5472,7 @@
...
@@ -5472,7 +5472,7 @@
},
},
"crc-32"
:
{
"crc-32"
:
{
"version"
:
"1.2.0"
,
"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="
,
"integrity"
:
"sha1-yy224puIUI4y2d0OwWk+e0Ghggg="
,
"requires"
:
{
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
"exit-on-epipe"
:
"~1.0.1"
,
...
@@ -7369,7 +7369,7 @@
...
@@ -7369,7 +7369,7 @@
},
},
"exit-on-epipe"
:
{
"exit-on-epipe"
:
{
"version"
:
"1.0.1"
,
"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="
"integrity"
:
"sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
},
},
"expand-brackets"
:
{
"expand-brackets"
:
{
...
@@ -8020,7 +8020,7 @@
...
@@ -8020,7 +8020,7 @@
},
},
"frac"
:
{
"frac"
:
{
"version"
:
"1.1.2"
,
"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="
"integrity"
:
"sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
},
},
"fragment-cache"
:
{
"fragment-cache"
:
{
...
@@ -15092,7 +15092,7 @@
...
@@ -15092,7 +15092,7 @@
},
},
"printj"
:
{
"printj"
:
{
"version"
:
"1.1.2"
,
"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="
"integrity"
:
"sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
},
},
"private"
:
{
"private"
:
{
...
@@ -20545,7 +20545,7 @@
...
@@ -20545,7 +20545,7 @@
},
},
"script-loader"
:
{
"script-loader"
:
{
"version"
:
"0.7.2"
,
"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="
,
"integrity"
:
"sha1-IBbbb4byX1z1baOJFdgzeLsWa6c="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
...
@@ -21133,7 +21133,7 @@
...
@@ -21133,7 +21133,7 @@
},
},
"ssf"
:
{
"ssf"
:
{
"version"
:
"0.10.3"
,
"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="
,
"integrity"
:
"sha1-jq4fwpyQpVLnkhII+BiS1vd6yys="
,
"requires"
:
{
"requires"
:
{
"frac"
:
"~1.1.2"
"frac"
:
"~1.1.2"
...
@@ -23788,7 +23788,7 @@
...
@@ -23788,7 +23788,7 @@
},
},
"wmf"
:
{
"wmf"
:
{
"version"
:
"1.0.2"
,
"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="
"integrity"
:
"sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
},
},
"word-wrap"
:
{
"word-wrap"
:
{
...
@@ -23943,7 +23943,7 @@
...
@@ -23943,7 +23943,7 @@
},
},
"xlsx"
:
{
"xlsx"
:
{
"version"
:
"0.15.6"
,
"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="
,
"integrity"
:
"sha1-Rh+EHW2eoag3XizSRr8jrs4IodU="
,
"requires"
:
{
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
"adler-32"
:
"~1.2.0"
,
...
@@ -23958,7 +23958,7 @@
...
@@ -23958,7 +23958,7 @@
"dependencies"
:
{
"dependencies"
:
{
"commander"
:
{
"commander"
:
{
"version"
:
"2.17.1"
,
"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="
"integrity"
:
"sha1-vXerfebelCBc6sxy8XFtKfIKd78="
}
}
}
}
...
...
pages/aps/aps/index.vue
View file @
15a0c384
<
template
>
<
template
>
<div>
<div>
<DataGrid
<DataGrid
:columns=
"columns"
ref=
"grid"
:draggable=
"true"
:data=
"list"
:high=
"false"
@
on-drag-drop=
"onDragDrop"
:page=
"false"
@
on-selection-change=
"onSelect"
:batch=
"true"
:border=
"true"
:easy=
"true"
>
:columns=
"columns"
ref=
"grid"
:draggable=
"true"
:data=
"list"
:high=
"false"
@
on-drag-drop=
"onDragDrop"
:page=
"false"
@
on-change=
"onSelect"
:batch=
"true"
:border=
"true"
:easy=
"true"
>
<template
slot=
"easySearch"
>
<template
slot=
"easySearch"
>
<div>
<div>
<Select
<Select
placeholder=
"选择排序优先级"
v-model=
"tempValue"
style=
"width: 150px;"
@
on-change=
"tempValueChange"
clearable
>
placeholder=
"选择排序优先级"
<Option
v-for=
"(item,index) in listTemp"
:key=
"index"
:value=
"item.id"
:label=
"item.name"
></Option>
v-model=
"tempValue"
style=
"width: 150px;"
@
on-change=
"tempValueChange"
clearable
>
<Option
v-for=
"(item,index) in listTemp"
:key=
"index"
:value=
"item.id"
:label=
"item.name"
></Option>
</Select>
</Select>
<a
style=
"font-weight: bold;"
@
click=
"openaddModalTemp"
>
<a
style=
"font-weight: bold;"
@
click=
"openaddModalTemp"
>
<Icon
type=
"md-color-palette"
size=
"14"
/>
自定义排序模板
<Icon
type=
"md-color-palette"
size=
"14"
/>
自定义排序模板
...
@@ -43,21 +20,11 @@
...
@@ -43,21 +20,11 @@
<Search
/>
<Search
/>
</
template
>
</
template
>
<
template
slot=
"buttons"
>
<
template
slot=
"buttons"
>
<DatePicker
<DatePicker
type=
"date"
placeholder=
"设置基准日期"
style=
"width: 150px;"
v-model=
"entity.setTime"
@
on-change=
"getTime"
></DatePicker>
type=
"date"
placeholder=
"设置基准日期"
style=
"width: 150px;"
v-model=
"entity.setTime"
@
on-change=
"getTime"
></DatePicker>
<a
style=
"font-weight: bold;"
@
click=
"openAddModel(1)"
>
<a
style=
"font-weight: bold;"
@
click=
"openAddModel(1)"
>
<Icon
type=
"ios-options"
size=
"14"
/>
工序参数调整
<Icon
type=
"ios-options"
size=
"14"
/>
工序参数调整
</a>
</a>
<Button
<Button
type=
"primary"
@
click=
"goResults"
style=
"background:#515A6E;border:solid 1px #515A6E"
>
历史方案
</Button>
type=
"primary"
@
click=
"goResults"
style=
"background:#515A6E;border:solid 1px #515A6E"
>
历史方案
</Button>
<Button
type=
"primary"
@
click=
"openApsModal"
>
APS排产
</Button>
<Button
type=
"primary"
@
click=
"openApsModal"
>
APS排产
</Button>
</
template
>
</
template
>
<
template
slot=
"batch"
>
<
template
slot=
"batch"
>
...
@@ -71,14 +38,7 @@
...
@@ -71,14 +38,7 @@
<Duration
ref=
"durationRef"
></Duration>
<Duration
ref=
"durationRef"
></Duration>
</Modal>
</Modal>
<Modal
v-model=
"addModal"
title=
"工序参数设置"
footer-hide
width=
"1000"
>
<Modal
v-model=
"addModal"
title=
"工序参数设置"
footer-hide
width=
"1000"
>
<Add
<Add
@
on-close=
"cancel"
@
on-parameter-ok=
"addOk"
:opTaskPk=
"setParams.opTaskPk"
:partTaskPk=
"setParams.partTaskPk"
:taskSeq=
"setParams.taskSeq"
:count=
"setParams.count"
/>
@
on-close=
"cancel"
@
on-parameter-ok=
"addOk"
:opTaskPk=
"setParams.opTaskPk"
:partTaskPk=
"setParams.partTaskPk"
:taskSeq=
"setParams.taskSeq"
:count=
"setParams.count"
/>
</Modal>
</Modal>
<Modal
v-model=
"apsModal"
title=
"确定APS排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"apsModal"
title=
"确定APS排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<p>
确定进行APS排产?
</p>
<p>
确定进行APS排产?
</p>
...
@@ -106,8 +66,9 @@
...
@@ -106,8 +66,9 @@
<Modal
v-model=
"insertlModal1"
:title=
"insertTItle1"
@
on-ok=
"insertOk1"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"insertlModal1"
:title=
"insertTItle1"
@
on-ok=
"insertOk1"
@
on-cancel=
"cancel"
>
<p>
确定进行 {{ insertTItle1 }} 操作?
</p>
<p>
确定进行 {{ insertTItle1 }} 操作?
</p>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
var
myDate
=
new
Date
();
var
myDate
=
new
Date
();
var
nowDate
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
+
"-"
+
myDate
.
getDate
();
var
nowDate
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
+
"-"
+
myDate
.
getDate
();
...
@@ -130,7 +91,10 @@ export default {
...
@@ -130,7 +91,10 @@ export default {
return
{
return
{
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:
{
op
:
"notes"
,
value
:
null
}
keys
:
{
op
:
"notes"
,
value
:
null
}
},
},
result
:
{
result
:
{
res
:
true
,
res
:
true
,
...
@@ -138,7 +102,7 @@ export default {
...
@@ -138,7 +102,7 @@ export default {
},
},
resultModal
:
false
,
resultModal
:
false
,
entity
:
{
entity
:
{
setTime
:
this
.
getFormatDate
(
nowDate
)
setTime
:
this
.
getFormatDate
(
nowDate
)
},
},
addModal
:
false
,
addModal
:
false
,
editModal
:
false
,
editModal
:
false
,
...
@@ -154,8 +118,7 @@ export default {
...
@@ -154,8 +118,7 @@ export default {
rowIndex1
:
null
,
rowIndex1
:
null
,
list
:
[],
list
:
[],
curId
:
0
,
curId
:
0
,
columns
:
[
columns
:
[{
{
key
:
"move"
,
key
:
"move"
,
title
:
" "
,
title
:
" "
,
hide
:
false
,
hide
:
false
,
...
@@ -204,11 +167,9 @@ export default {
...
@@ -204,11 +167,9 @@ export default {
high
:
true
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
return
h
(
"Tooltip"
,
"Tooltip"
,
{
{
props
:
{
props
:
{
content
:
content
:
params
.
row
.
insert_flag
==
1
?
"取消插单"
:
"进行插单"
,
params
.
row
.
insert_flag
==
1
?
"取消插单"
:
"进行插单"
,
placement
:
"top"
placement
:
"top"
},
},
class
:
"ico"
class
:
"ico"
...
@@ -216,10 +177,8 @@ export default {
...
@@ -216,10 +177,8 @@ export default {
[
[
h
(
"Icon"
,
{
h
(
"Icon"
,
{
attrs
:
{
attrs
:
{
type
:
type
:
params
.
row
.
insert_flag
==
1
?
params
.
row
.
insert_flag
==
1
"ios-water"
:
"ios-water-outline"
,
?
"ios-water"
:
"ios-water-outline"
,
size
:
20
,
size
:
20
,
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
color
:
params
.
row
.
insert_flag
==
1
?
"#2680EB"
:
"#aaa"
},
},
...
@@ -354,7 +313,9 @@ export default {
...
@@ -354,7 +313,9 @@ export default {
align
:
"center"
,
align
:
"center"
,
// fixed:"right",
// fixed:"right",
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
icon
:
"md-options"
,
icon
:
"md-options"
,
...
@@ -362,7 +323,9 @@ export default {
...
@@ -362,7 +323,9 @@ export default {
title
:
"工序参数设置"
,
title
:
"工序参数设置"
,
oprate
:
"edit"
oprate
:
"edit"
},
},
on
:
{
click
:
()
=>
this
.
openAddModel
(
2
,
params
.
row
)
}
on
:
{
click
:
()
=>
this
.
openAddModel
(
2
,
params
.
row
)
}
}),
}),
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
...
@@ -372,7 +335,9 @@ export default {
...
@@ -372,7 +335,9 @@ export default {
oprate
:
"edit"
,
oprate
:
"edit"
,
msg
:
"确认要恢复工序吗?"
msg
:
"确认要恢复工序吗?"
},
},
on
:
{
click
:
()
=>
this
.
refresh
(
params
.
row
.
part_task_pk
)
}
on
:
{
click
:
()
=>
this
.
refresh
(
params
.
row
.
part_task_pk
)
}
}),
}),
h
(
"op"
,
{
h
(
"op"
,
{
attrs
:
{
attrs
:
{
...
@@ -382,7 +347,9 @@ export default {
...
@@ -382,7 +347,9 @@ export default {
oprate
:
"delete"
,
oprate
:
"delete"
,
msg
:
"确认要移出排产吗?"
msg
:
"确认要移出排产吗?"
},
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
part_task_pk
)
}
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
part_task_pk
)
}
})
})
]);
]);
}
}
...
@@ -407,7 +374,10 @@ export default {
...
@@ -407,7 +374,10 @@ export default {
this
.
loadList
();
this
.
loadList
();
this
.
loadTemp
();
this
.
loadTemp
();
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
methods
:
{
methods
:
{
...
@@ -577,7 +547,9 @@ export default {
...
@@ -577,7 +547,9 @@ export default {
apsOk
()
{
apsOk
()
{
this
.
circleModal
=
true
;
this
.
circleModal
=
true
;
//APS排产前订单优先级功能
//APS排产前订单优先级功能
let
parmsOrderpriority
=
{
alls
:
[]
};
let
parmsOrderpriority
=
{
alls
:
[]
};
let
arryIds
=
[];
let
arryIds
=
[];
this
.
list
.
forEach
((
e
,
index
)
=>
{
this
.
list
.
forEach
((
e
,
index
)
=>
{
let
objIds
=
{};
let
objIds
=
{};
...
@@ -601,12 +573,12 @@ export default {
...
@@ -601,12 +573,12 @@ export default {
}
else
{
}
else
{
// this.circleModal = false;
// this.circleModal = false;
// this.$Message.error("操作失败:数据校验");
// this.$Message.error("操作失败:数据校验");
this
.
result
=
res1
.
result
;
this
.
result
=
res1
.
result
;
this
.
resultModal
=
true
;
this
.
resultModal
=
true
;
}
}
})
})
.
catch
(
.
catch
(
function
(
err
)
{
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
}.
bind
(
this
)
...
@@ -621,7 +593,7 @@ export default {
...
@@ -621,7 +593,7 @@ export default {
}
}
})
})
.
catch
(
.
catch
(
function
(
err
)
{
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
}.
bind
(
this
)
...
@@ -652,7 +624,7 @@ export default {
...
@@ -652,7 +624,7 @@ export default {
}
}
})
})
.
catch
(
.
catch
(
function
(
err
)
{
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
}.
bind
(
this
)
...
@@ -776,29 +748,36 @@ export default {
...
@@ -776,29 +748,36 @@ export default {
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.drag {
.drag {
cursor: move;
cursor: move;
}
}
.demo-spin-icon-load {
.demo-spin-icon-load {
animation: ani-demo-spin 1s linear infinite;
animation: ani-demo-spin 1s linear infinite;
}
}
@keyframes ani-demo-spin {
@keyframes ani-demo-spin {
from {
from {
transform: rotate(0deg);
transform: rotate(0deg);
}
}
50% {
50% {
transform: rotate(180deg);
transform: rotate(180deg);
}
}
to {
to {
transform: rotate(360deg);
transform: rotate(360deg);
}
}
}
}
.demo-spin-col {
.demo-spin-col {
height: 100px;
height: 100px;
position: relative;
position: relative;
border: 0px solid #eee;
border: 0px solid #eee;
}
}
.vertical-center-modal {
.vertical-center-modal {
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -808,6 +787,7 @@ export default {
...
@@ -808,6 +787,7 @@ export default {
top: 0;
top: 0;
}
}
}
}
.tempModal {
.tempModal {
.ivu-modal-body {
.ivu-modal-body {
padding: 16px;
padding: 16px;
...
@@ -816,6 +796,7 @@ export default {
...
@@ -816,6 +796,7 @@ export default {
padding-top: 2px;
padding-top: 2px;
padding-bottom: 0px;
padding-bottom: 0px;
}
}
.ivu-modal-footer {
.ivu-modal-footer {
border-top: none;
border-top: none;
padding: 12px 18px 12px 18px;
padding: 12px 18px 12px 18px;
...
...
pages/aps/plan/index.vue
View file @
15a0c384
<
template
>
<
template
>
<div
class=
"h100"
>
<div
class=
"h100"
>
<DataGrid
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
@
on-selection-change=
"selectInfo"
:batch=
"false"
>
:columns=
"columns"
ref=
"grid"
:action=
"action"
@
on-selection-change=
"selectInfo"
:batch=
"false"
>
<template
slot=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<FormItem
prop=
"keys"
>
<Input
<Input
search
enter-button
placeholder=
"请输入关键字订单编号/项目名称"
v-model=
"easySearch.keys.value"
v-width=
"300"
@
on-search=
"search"
/>
search
enter-button
placeholder=
"请输入关键字订单编号/项目名称"
v-model=
"easySearch.keys.value"
v-width=
"300"
@
on-search=
"search"
/>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
template
slot=
"searchBack"
>
<
template
slot=
"searchBack"
>
<Badge
<Badge
:count=
"this.$store.state.countAps"
overflow-count=
"99"
style=
"margin-right: 15px"
type=
"info"
v-if=
"showAps"
>
:count=
"this.$store.state.countAps"
overflow-count=
"99"
style=
"margin-right: 15px"
type=
"info"
v-if=
"showAps"
>
<a
href=
"javascript:;"
@
click=
"goAps"
>
APS排产
</a>
<a
href=
"javascript:;"
@
click=
"goAps"
>
APS排产
</a>
</Badge>
</Badge>
<Badge
<Badge
:count=
"this.$store.state.countAi"
overflow-count=
"99"
style=
"margin-right: 15px"
type=
"info"
v-if=
"showAi"
>
:count=
"this.$store.state.countAi"
overflow-count=
"99"
style=
"margin-right: 15px"
type=
"info"
v-if=
"showAi"
>
<a
href=
"javascript:;"
@
click=
"goAi"
>
智能排产
</a>
<a
href=
"javascript:;"
@
click=
"goAi"
>
智能排产
</a>
</Badge>
</Badge>
<Badge
<Badge
:count=
"this.$store.state.countAll"
overflow-count=
"99"
style=
"margin-right: 15px"
type=
"info"
v-if=
"showAll"
>
:count=
"this.$store.state.countAll"
overflow-count=
"99"
style=
"margin-right: 15px"
type=
"info"
v-if=
"showAll"
>
<a
@
click=
"goCemplate"
>
整机排产
</a>
<a
@
click=
"goCemplate"
>
整机排产
</a>
</Badge>
</Badge>
<Badge
<Badge
:count=
"this.$store.state.countRun"
overflow-count=
"99"
type=
"info"
v-if=
"showRun"
>
:count=
"this.$store.state.countRun"
overflow-count=
"99"
type=
"info"
v-if=
"showRun"
>
<a
@
click=
"goStream"
>
流水排产
</a>
<a
@
click=
"goStream"
>
流水排产
</a>
</Badge>
</Badge>
</
template
>
</
template
>
...
@@ -65,15 +29,11 @@
...
@@ -65,15 +29,11 @@
</DataGrid>
</DataGrid>
<FooterToolbar
extra
v-if=
"footerBar"
class=
"ftball"
>
<FooterToolbar
extra
v-if=
"footerBar"
class=
"ftball"
>
<Row>
<Row>
<Checkbox
@
on-change=
"handleSelectAll(single)"
v-model=
"single"
<Checkbox
@
on-change=
"handleSelectAll(single)"
v-model=
"single"
>
全选
</Checkbox>
>
全选
</Checkbox
>
<span
class=
"footerSpan"
>
已选 {{ selectCount }} 项
</span>
<span
class=
"footerSpan"
>
已选 {{ selectCount }} 项
</span>
<Button
type=
"primary"
@
click=
"modalDispatch"
>
工艺派发
</Button
<Button
type=
"primary"
@
click=
"modalDispatch"
>
工艺派发
</Button>
>
<Button
type=
"primary"
@
click=
"modalSchedule"
>
移入排产
</Button>
<Button
type=
"primary"
@
click=
"modalSchedule"
>
移入排产
</Button
>
<Button
@
click=
"canselFooter"
>
取消
</Button>
<Button
@
click=
"canselFooter"
>
取消
</Button>
</Row>
</Row>
</FooterToolbar>
</FooterToolbar>
...
@@ -86,12 +46,7 @@
...
@@ -86,12 +46,7 @@
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Modal
v-model=
"detailModal"
title=
"详情"
>
<Detail
:eid=
"curId"
/>
<Detail
:eid=
"curId"
/>
</Modal>
</Modal>
<Modal
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
</Modal>
<Modal
v-model=
"dispatchModal"
title=
"工艺派发"
footer-hide
width=
"800"
>
<Modal
v-model=
"dispatchModal"
title=
"工艺派发"
footer-hide
width=
"800"
>
...
@@ -110,11 +65,7 @@
...
@@ -110,11 +65,7 @@
@on-change="onchangeScheduleType"
@on-change="onchangeScheduleType"
></Dictionary>
></Dictionary>
-->
-->
<RadioGroup
<RadioGroup
v-model=
"scheduleType"
class=
"radioList"
@
on-change=
"onchangeScheduleType"
>
v-model=
"scheduleType"
class=
"radioList"
@
on-change=
"onchangeScheduleType"
>
<Radio
:label=
"1"
border
:disabled=
"this.$store.state.countAi > 0"
>
<Radio
:label=
"1"
border
:disabled=
"this.$store.state.countAi > 0"
>
<span>
Aps排产
</span>
<span>
Aps排产
</span>
</Radio>
</Radio>
...
@@ -131,8 +82,7 @@
...
@@ -131,8 +82,7 @@
<p
class=
"pl30 pt10"
v-show=
"scheduleType != null"
>
<p
class=
"pl30 pt10"
v-show=
"scheduleType != null"
>
确定将订单
确定将订单
<span
class=
"fwBold"
>
{{ resultsOrderList }}
</span>
移入
<span
class=
"fwBold"
>
{{ resultsOrderList }}
</span>
移入
<span
class=
"red fwBold"
>
{{ scheduleTypeName }}
</span
<span
class=
"red fwBold"
>
{{ scheduleTypeName }}
</span>
?
>
?
</p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
...
@@ -141,28 +91,13 @@
...
@@ -141,28 +91,13 @@
<Button
type=
"primary"
@
click=
"scheduleOk"
>
确定
</Button>
<Button
type=
"primary"
@
click=
"scheduleOk"
>
确定
</Button>
</div>
</div>
</Modal>
</Modal>
<Modal
<Modal
v-model=
"orderSupportModal"
title=
"配套下发"
footer-hide
width=
"1300"
>
v-model=
"orderSupportModal"
title=
"配套下发"
footer-hide
width=
"1300"
>
<orderSupport
ref=
"orderSupport"
></orderSupport>
<orderSupport
ref=
"orderSupport"
></orderSupport>
</Modal>
</Modal>
<Modal
v-model=
"modalAccessory"
:title=
"title"
fullscreen
footer-hide
>
<Modal
v-model=
"modalAccessory"
:title=
"title"
fullscreen
footer-hide
>
<component
<component
:is=
"details"
:eid=
"orderId"
:mesCode=
"mesCode"
:productName=
"productName"
:drawnNumber=
"drawnNumber"
:productingPreparationPeople=
"productingPreparationPeople"
:count=
"count"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
:is=
"details"
:eid=
"orderId"
:mesCode=
"mesCode"
:productName=
"productName"
:drawnNumber=
"drawnNumber"
:productingPreparationPeople=
"productingPreparationPeople"
:count=
"count"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -201,8 +136,7 @@ export default {
...
@@ -201,8 +136,7 @@ export default {
scheduleModal
:
false
,
scheduleModal
:
false
,
orderSupportModal
:
false
,
orderSupportModal
:
false
,
curId
:
0
,
curId
:
0
,
statuList
:
statuList
:
this
.
$store
.
getters
.
dictionaryByKey
(
"aps.plan.supportingStatus"
)
||
[],
this
.
$store
.
getters
.
dictionaryByKey
(
"aps.plan.supportingStatus"
)
||
[],
name
:
""
,
name
:
""
,
items
:
null
,
items
:
null
,
title
:
""
,
title
:
""
,
...
@@ -215,8 +149,7 @@ export default {
...
@@ -215,8 +149,7 @@ export default {
drawnNumber
:
""
,
drawnNumber
:
""
,
count
:
0
,
count
:
0
,
modalAccessory
:
false
,
modalAccessory
:
false
,
columns
:
[
columns
:
[{
{
key
:
"selection"
,
key
:
"selection"
,
title
:
"多选"
,
title
:
"多选"
,
type
:
"selection"
,
type
:
"selection"
,
...
@@ -258,8 +191,7 @@ export default {
...
@@ -258,8 +191,7 @@ export default {
align
:
"center"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
return
h
(
"op"
,
"op"
,
{
{
attrs
:
{
attrs
:
{
oprate
:
"detail"
,
oprate
:
"detail"
,
},
},
...
@@ -426,20 +358,17 @@ export default {
...
@@ -426,20 +358,17 @@ export default {
align
:
"center"
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
return
h
(
"div"
,
"div"
,
{
{
class
:
"action"
,
class
:
"action"
,
},
},
[
[
h
(
h
(
"op"
,
"op"
,
{
{
attrs
:
{
attrs
:
{
oprate
:
"detail"
,
oprate
:
"detail"
,
title
:
title
:
params
.
row
.
mainRoutingSetStatus
==
0
?
params
.
row
.
mainRoutingSetStatus
==
0
"工艺派发"
:
?
"工艺派发"
"移入排产"
,
:
"移入排产"
,
},
},
style
:
{
style
:
{
color
:
params
.
row
.
mainRoutingSetStatus
==
0
?
"red"
:
""
,
color
:
params
.
row
.
mainRoutingSetStatus
==
0
?
"red"
:
""
,
...
@@ -447,46 +376,46 @@ export default {
...
@@ -447,46 +376,46 @@ export default {
on
:
{
on
:
{
click
:
()
=>
click
:
()
=>
params
.
row
.
mainRoutingSetStatus
==
0
||
params
.
row
.
mainRoutingSetStatus
==
0
||
params
.
row
.
mainRoutingSetStatus
==
1
params
.
row
.
mainRoutingSetStatus
==
1
?
?
this
.
goMethod
(
params
.
row
)
this
.
goMethod
(
params
.
row
)
:
:
null
,
null
,
},
},
},
},
params
.
row
.
mainRoutingSetStatus
==
0
&&
params
.
row
.
mainRoutingSetStatus
==
0
&&
params
.
row
.
isPreschedule
==
0
params
.
row
.
isPreschedule
==
0
?
?
"工艺派发"
"工艺派发"
:
:
params
.
row
.
mainRoutingSetStatus
==
1
&&
params
.
row
.
mainRoutingSetStatus
==
1
&&
params
.
row
.
isPreschedule
==
0
params
.
row
.
isPreschedule
==
0
?
?
"移入排产"
"移入排产"
:
:
""
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
title
:
params
.
row
.
isSupportingFinish
==
2
||
params
.
row
.
isSupportingFinish
==
3
?
"配套派发"
:
""
,
},
style
:
{
color
:
params
.
row
.
mainRoutingSetStatus
==
0
?
"red"
:
""
,
},
on
:
{
click
:
()
=>
params
.
row
.
isSupportingFinish
==
2
||
params
.
row
.
isSupportingFinish
==
3
?
this
.
supportDis
(
params
.
row
)
:
null
,
},
},
params
.
row
.
isSupportingFinish
==
2
||
params
.
row
.
isSupportingFinish
==
3
?
"配套派发"
:
""
),
),
// h(
// "op",
// {
// attrs: {
// oprate: "detail",
// title:
// params.row.isSupportingFinish == 2 ||
// params.row.isSupportingFinish == 3
// ? "配套派发"
// : "",
// },
// style: {
// color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
// },
// on: {
// click: () =>
// params.row.isSupportingFinish == 2 ||
// params.row.isSupportingFinish == 3
// ? this.supportDis(params.row)
// : null,
// },
// },
// params.row.isSupportingFinish == 2 ||
// params.row.isSupportingFinish == 3
// ? "配套派发"
// : ""
// ),
]
]
);
);
},
},
...
@@ -516,7 +445,10 @@ export default {
...
@@ -516,7 +445,10 @@ export default {
mounted
()
{
mounted
()
{
this
.
loadInitCount
();
this
.
loadInitCount
();
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
methods
:
{
methods
:
{
...
...
pages/project/groupUser/list.vue
View file @
15a0c384
...
@@ -533,9 +533,9 @@ export default {
...
@@ -533,9 +533,9 @@ export default {
},
},
//新增时取消
//新增时取消
remove
(
row
,
index
)
{
remove
(
row
,
index
)
{
if
(
!
row
.
id
||
!
row
.
groupId
)
{
//
if (!row.id || !row.groupId) {
this
.
list
.
pop
();
//
this.list.pop();
}
//
}
this
.
edit
=
-
1
;
this
.
edit
=
-
1
;
},
},
//新增保存或修改保存
//新增保存或修改保存
...
...
pages/project/plan/importTemplate.vue
View file @
15a0c384
<
template
>
<
template
>
<div>
<div>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
</EditGrid>
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
fullscreen
>
</EditGrid>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
/>
</Modal>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -16,8 +21,12 @@ export default {
...
@@ -16,8 +21,12 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
title
:
''
,
modal
:
false
,
curId
:
0
,
curId
:
0
,
list
:[],
row
:
null
,
list
:
[],
detail
:
null
,
columns
:
[
columns
:
[
{
{
key
:
"id"
,
key
:
"id"
,
...
@@ -32,7 +41,24 @@ export default {
...
@@ -32,7 +41,24 @@ export default {
align
:
"left"
,
align
:
"left"
,
easy
:
true
,
easy
:
true
,
high
:
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"
,
key
:
"note"
,
title
:
this
.
l
(
"note"
),
title
:
this
.
l
(
"note"
),
...
@@ -69,7 +95,7 @@ export default {
...
@@ -69,7 +95,7 @@ export default {
h
(
h
(
"op"
,
"op"
,
{
{
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
attrs
:
{
oprate
:
"remove"
,
msg
:
"确定要导入模版吗?"
},
on
:
{
click
:
()
=>
this
.
useTemplate
(
params
.
row
.
id
)
},
on
:
{
click
:
()
=>
this
.
useTemplate
(
params
.
row
.
id
)
},
},
},
"导入"
"导入"
...
@@ -105,24 +131,30 @@ export default {
...
@@ -105,24 +131,30 @@ export default {
this
.
curId
=
""
;
this
.
curId
=
""
;
},
},
load
()
{
load
()
{
Api
.
templates
({
Api
.
templates
({}).
then
((
r
)
=>
{
this
.
list
=
r
.
result
;
}).
then
(
r
=>
{
});
this
.
list
=
r
.
result
;
})
},
},
useTemplate
(
id
)
{
useTemplate
(
id
)
{
Api
.
useTemplate
({
Api
.
useTemplate
({
id
:
id
,
id
:
id
,
projectId
:
this
.
eid
projectId
:
this
.
eid
,
}).
then
(
r
=>
{
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"导入成功"
);
this
.
$Message
.
success
(
"导入成功"
);
this
.
$emit
(
"on-load"
)
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
)
{
l
(
key
)
{
let
vkey
=
"project_template"
+
"."
+
key
;
let
vkey
=
"project_template"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/project/plan/index.vue
View file @
15a0c384
<
template
>
<
template
>
<div>
<div>
<Card>
<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"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
</template> -->
</template> -->
<
template
slot=
"buttons"
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add(null)"
>
新增
</Button>
<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>
<Button
shape=
"circle"
icon=
"md-settings"
></Button>
<DropdownMenu
slot=
"list"
>
<DropdownMenu
slot=
"list"
>
<DropdownItem
name=
"saveTemplate"
>
存为模版
</DropdownItem>
<DropdownItem
name=
"saveTemplate"
>
存为模版
</DropdownItem>
...
@@ -31,9 +32,11 @@
...
@@ -31,9 +32,11 @@
</
template
>
</
template
>
</EditGrid>
</EditGrid>
</Card>
</Card>
<Submenus
:show=
"showStatu"
:data=
"tempItems"
:params=
"params"
></Submenus>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Modal>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</div>
</template>
</template>
...
@@ -77,7 +80,6 @@ export default {
...
@@ -77,7 +80,6 @@ export default {
},
},
modal
:
false
,
modal
:
false
,
title
:
"新增"
,
title
:
"新增"
,
exportTl
:
'项目目录'
,
detail
:
null
,
detail
:
null
,
curId
:
null
,
curId
:
null
,
list
:
[],
list
:
[],
...
@@ -93,6 +95,12 @@ export default {
...
@@ -93,6 +95,12 @@ export default {
type
:
"selection"
,
type
:
"selection"
,
align
:
'center'
align
:
'center'
},
},
{
key
:
"upTitle"
,
title
:
this
.
l
(
"upTitle"
),
hide
:
true
,
export
:
true
,
},
{
{
key
:
"title"
,
key
:
"title"
,
title
:
this
.
l
(
"title"
),
title
:
this
.
l
(
"title"
),
...
@@ -238,6 +246,14 @@ export default {
...
@@ -238,6 +246,14 @@ export default {
},
},
},
},
],
],
//setButon
showStatu
:
false
,
//控件是否显示
tempItems
:
[],
//控件数据
params
:
{},
//控件坐标位置
//导出导入
exportTl
:
'项目目录'
,
ModalIm
:
false
,
temTitle
:
"项目目录"
,
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -376,13 +392,118 @@ export default {
...
@@ -376,13 +392,118 @@ export default {
that
.
modal
=
true
;
that
.
modal
=
true
;
},
},
}
}
//导出excel
if
(
name
==
'down'
)
{
if
(
name
==
'down'
)
{
this
.
exportTl
=
'项目目录-'
+
this
.
data
.
title
;
this
.
exportTl
=
'项目目录-'
+
this
.
data
.
title
;
this
.
$refs
.
grid
.
export2Excel
()
this
.
$refs
.
grid
.
export2Excel
()
}
}
if
(
name
==
'importExcel'
)
{
this
.
openModalIm
()
}
m
[
name
]
&&
m
[
name
](
name
);
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
)
{
l
(
key
)
{
let
vkey
=
"project_plan"
+
"."
+
key
;
let
vkey
=
"project_plan"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
return
this
.
$t
(
vkey
)
||
key
;
...
...
pages/project/project/add.vue
View file @
15a0c384
...
@@ -79,8 +79,7 @@
...
@@ -79,8 +79,7 @@
></Col>
></Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"开始结束时间"
prop=
"date"
>
<FormItem
label=
"开始结束时间"
prop=
"date"
>
<DateRange
v-model=
"entity"
edit
></DateRange>
<DateRange
v-model=
"entity"
edit
></DateRange>
</FormItem
</FormItem
></Col>
></Col>
<Col
:span=
"12"
<Col
:span=
"12"
...
@@ -200,8 +199,23 @@ export default {
...
@@ -200,8 +199,23 @@ export default {
}
}
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
debugger
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
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"
);
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
...
...
pages/project/project/api.js
View file @
15a0c384
...
@@ -16,6 +16,10 @@ export default {
...
@@ -16,6 +16,10 @@ export default {
update
(
params
){
update
(
params
){
return
Api
.
post
(
`
${
material
}
/projectmain/update`
,
params
);
return
Api
.
post
(
`
${
material
}
/projectmain/update`
,
params
);
},
},
addMaster
(
params
)
{
return
Api
.
post
(
`
${
material
}
/projectgroupuser/create`
,
params
);
},
delete
(
id
)
{
delete
(
id
)
{
return
Api
.
delete
(
`
${
material
}
/projectmain/delete`
,{
params
:{
id
:
id
}});
return
Api
.
delete
(
`
${
material
}
/projectmain/delete`
,{
params
:{
id
:
id
}});
},
},
...
...
pages/project/resources/templates/detail.vue
View file @
15a0c384
...
@@ -19,13 +19,21 @@
...
@@ -19,13 +19,21 @@
}}
</Filed>
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
entity
.
deleterUserId
}}
</Filed>
-->
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('template')"
>
{{
entity
.
template
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('template')"
>
{{
entity
.
template
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('attachment')"
>
{{
entity
.
attachment
}}
</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>
<Filed
:span=
"24"
:name=
"l('note')"
>
{{
entity
.
note
}}
</Filed>
</Row>
</Row>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
:level=
"8"
>
</EditGrid>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -39,20 +47,124 @@ export default {
...
@@ -39,20 +47,124 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
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
:
{
props
:
{
eid
:
String
,
eid
:
String
,
},
},
mounted
()
{
mounted
()
{
if
(
this
.
eid
)
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
this
.
load
(
this
.
eid
);
}
}
},
},
async
fetch
({
store
,
params
})
{
// await store.dispatch("loadDictionary"); // 加载数据字典
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
console
.
log
(
this
.
$store
.
state
.
dictionary
)
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
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"
);
this
.
$emit
(
"on-load"
);
});
});
},
},
...
@@ -66,7 +178,7 @@ export default {
...
@@ -66,7 +178,7 @@ export default {
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
""
)
{
if
(
v
!=
""
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
},
},
...
@@ -74,7 +186,10 @@ export default {
...
@@ -74,7 +186,10 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.detail{
.detail
{
width: 100%;
width: 100%;
}
}
.detail .ivu-row{
height: auto;
}
</
style
>
style>
</
style
>
style>
\ No newline at end of file
pages/project/resources/templates/index.vue
View file @
15a0c384
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</
template
>
</DataGrid>
</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"
/>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Modal>
</div>
</div>
...
@@ -41,6 +41,7 @@ export default {
...
@@ -41,6 +41,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
fullscreen
:
false
,
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
keys
:
{
op
:
"title"
,
value
:
null
},
...
@@ -180,6 +181,7 @@ export default {
...
@@ -180,6 +181,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
);
console
.
log
(
this
);
console
.
log
(
"dictionary"
,
this
.
$store
.
state
.
dictionary
)
},
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
@@ -206,6 +208,7 @@ export default {
...
@@ -206,6 +208,7 @@ export default {
this
.
modal
=
true
;
this
.
modal
=
true
;
},
},
view
(
id
)
{
view
(
id
)
{
this
.
fullscreen
=
true
;
this
.
curId
=
id
;
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
detail
=
()
=>
import
(
"./detail"
);
...
...
pages/test/example/components/jcTreeGrid.vue
View file @
15a0c384
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"example_split"
></div>
<div
class=
"example_split"
></div>
<div
class=
"example-code"
:style=
"styleH"
>
<div
class=
"example-code"
:style=
"styleH"
>
<div
:style=
'opacity'
>
<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"
>
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"
>
template
</span>
>
</span>
<span
class=
"hljs-tag"
><<span
class=
"hljs-title"
>
script
</span>
>
</span><span
class=
"javascript"
>
<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 @@
...
@@ -9,6 +9,14 @@
<h2>
Bmenu
</h2>
<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
@
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
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>
</div>
</
template
>
</
template
>
...
@@ -43,13 +51,13 @@ export default {
...
@@ -43,13 +51,13 @@ export default {
this
.
tempItems
=
[{
this
.
tempItems
=
[{
label
:
"返回(B)"
,
label
:
"返回(B)"
,
onClick
:
()
=>
{
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"tttt"
)
},
},
},
{
},
{
label
:
"前进(F)"
,
label
:
"前进(F)"
,
disabled
:
true
,
disabled
:
true
,
onClick
:
()
=>
{
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"11"
)
},
},
},
},
{
{
...
@@ -57,13 +65,13 @@ export default {
...
@@ -57,13 +65,13 @@ export default {
divided
:
true
,
divided
:
true
,
icon
:
"el-icon-refresh"
,
icon
:
"el-icon-refresh"
,
onClick
:
()
=>
{
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"222"
)
},
},
},
},
{
{
label
:
"另存为(A)..."
,
label
:
"另存为(A)..."
,
onClick
:
()
=>
{
onClick
:
()
=>
{
this
.
showStatu
=
false
;
alert
(
"333"
)
},
},
},
},
{
{
...
@@ -223,6 +231,79 @@ export default {
...
@@ -223,6 +231,79 @@ export default {
});
});
event
.
preventDefault
();
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
>
</
script
>
...
...
pages/welcome/index.vue
View file @
15a0c384
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
:key=
"index"
:key=
"index"
@
mouseenter=
"navClick(item,index)"
@
mouseenter=
"navClick(item,index)"
>
>
<Icon
type=
"ios-stat
s"
class=
"f16"
/>
{{
item
.
name
}}
<Icon
:type=
"item.icon
s"
class=
"f16"
/>
{{
item
.
name
}}
</li>
</li>
</ul>
</ul>
...
@@ -42,149 +42,7 @@ import viewerVue from "../test/viewer.vue";
...
@@ -42,149 +42,7 @@ import viewerVue from "../test/viewer.vue";
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
navMenus
:
false
,
menus
:
[],
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
,
...
@@ -204,16 +62,25 @@ export default {
...
@@ -204,16 +62,25 @@ export default {
this
.
$api
.
get
(
`
${
systemUrl
}
/menu/getusermenu?id=mes_roter`
).
then
((
r
)
=>
{
this
.
$api
.
get
(
`
${
systemUrl
}
/menu/getusermenu?id=mes_roter`
).
then
((
r
)
=>
{
if
(
r
.
result
)
{
if
(
r
.
result
)
{
let
arr
=
r
.
result
[
0
].
children
.
map
((
l
)
=>
{
let
arr
=
r
.
result
[
0
].
children
.
map
((
l
)
=>
{
if
(
if
(
!
this
.
$u
.
isNull
(
l
.
description
)
&&
l
.
description
.
indexOf
(
"{"
)
>
-
1
)
{
!
this
.
$u
.
isNull
(
l
.
description
)
&&
l
.
description
.
indexOf
(
"{"
)
>
-
1
)
{
l
.
style
=
eval
(
"("
+
l
.
description
+
")"
);
l
.
style
=
eval
(
"("
+
l
.
description
+
")"
);
}
}
return
l
;
return
l
;
});
});
console
.
log
(
"arr"
,
arr
);
this
.
arrList
=
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
)
}
}
});
});
},
},
...
@@ -238,7 +105,6 @@ export default {
...
@@ -238,7 +105,6 @@ export default {
}
}
},
},
navClick
(
v
,
index
)
{
navClick
(
v
,
index
)
{
if
(
v
.
children
&&
v
.
children
.
length
>
0
)
{
if
(
v
.
children
&&
v
.
children
.
length
>
0
)
{
var
{
left
,
top
}
=
v
.
style
;
var
{
left
,
top
}
=
v
.
style
;
this
.
list
=
v
.
children
;
this
.
list
=
v
.
children
;
...
...
store/index.js
View file @
15a0c384
...
@@ -10,10 +10,10 @@ export const state = () => ({
...
@@ -10,10 +10,10 @@ export const state = () => ({
userId
:
0
,
userId
:
0
,
userName
:
""
userName
:
""
},
},
messages
:
[],
messages
:
[],
departments
:{},
//部门列表
departments
:
{},
//部门列表
cart
:
[],
cart
:
[],
collect
:[],
//用户收藏
collect
:
[],
//用户收藏
count
:
0
,
count
:
0
,
countAps
:
0
,
//aps排产
countAps
:
0
,
//aps排产
countAi
:
0
,
//智能排产
countAi
:
0
,
//智能排产
...
@@ -23,20 +23,23 @@ export const state = () => ({
...
@@ -23,20 +23,23 @@ export const state = () => ({
export
const
getters
=
{
export
const
getters
=
{
dictionaryByKey
:
(
state
)
=>
(
key
)
=>
{
dictionaryByKey
:
(
state
)
=>
(
key
)
=>
{
let
result
=
[];
let
result
=
[];
if
(
state
&&
state
.
dictionary
)
{
let
items
=
state
.
dictionary
.
get
(
key
);
let
items
=
state
.
dictionary
.
get
(
key
);
if
(
items
)
{
if
(
items
)
{
// console.info("items",items)
// console.info("items",items)
return
items
;
return
items
;
}
}
}
return
result
;
return
result
;
},
},
dictionaryByCode
:
(
state
)
=>
(
key
,
code
)
=>
{
dictionaryByCode
:
(
state
)
=>
(
key
,
code
)
=>
{
let
result
=
null
;
let
result
=
null
;
let
items
=
state
.
dictionary
.
get
(
key
);
let
items
=
state
.
dictionary
.
get
(
key
);
if
(
items
)
{
if
(
items
)
{
// console.info("items",items)
// console.info("items",items)
return
items
.
filter
(
u
=>
{
return
items
.
filter
(
u
=>
{
return
u
.
code
==
code
return
u
.
code
==
code
})[
0
];
})[
0
];
}
}
return
result
;
return
result
;
...
@@ -94,21 +97,21 @@ export const mutations = {
...
@@ -94,21 +97,21 @@ export const mutations = {
setCountRun
(
state
,
count
)
{
//设置流水排产数量
setCountRun
(
state
,
count
)
{
//设置流水排产数量
state
.
countRun
=
count
;
state
.
countRun
=
count
;
},
},
setDepartments
(
state
,
departmentsMap
)
setDepartments
(
state
,
departmentsMap
)
{
{
state
.
departmentsMap
=
departmentsMap
;
state
.
departmentsMap
=
departmentsMap
;
},
},
setMessages
(
state
,
list
)
{
setMessages
(
state
,
list
)
{
state
.
messages
=
list
;
state
.
messages
=
list
;
}
}
}
}
export
const
actions
=
{
export
const
actions
=
{
async
loadMessages
({
commit
})
{
async
loadMessages
({
commit
})
{
let
{
let
{
result
result
}
=
await
Api
.
get
(
`
${
systemUrl
}
/usermessage/getusermesssage`
,
{
}
=
await
Api
.
get
(
`
${
systemUrl
}
/usermessage/getusermesssage`
,
{
status
:
0
,
userId
:
this
.
state
.
userInfo
.
userId
status
:
0
,
userId
:
this
.
state
.
userInfo
.
userId
});
});
// console.warn("getusermesssage---", result)
// console.warn("getusermesssage---", result)
commit
(
"setMessages"
,
result
);
commit
(
"setMessages"
,
result
);
...
@@ -206,6 +209,6 @@ export const plugins = [
...
@@ -206,6 +209,6 @@ export const plugins = [
list
:
[
"hyhmes.session"
],
list
:
[
"hyhmes.session"
],
},
},
}),
}),
]
]
//设置 strict 为不严格模式,即可在actions中修改state
//设置 strict 为不严格模式,即可在actions中修改state
export
const
strict
=
false
;
export
const
strict
=
false
;
\ 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