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
38e881c9
Commit
38e881c9
authored
Nov 03, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
cfed2bdb
438f3eb4
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
279 additions
and
333 deletions
+279
-333
default.less
assets/css/themes/default.less
+1
-1
dateRange.vue
components/page/dateRange.vue
+4
-2
EditGrid.vue
components/page/treeGrid/EditGrid.vue
+193
-266
user.vue
components/page/user.vue
+10
-1
zh-CN.js
i18n/locale/zh-CN.js
+2
-0
henq.js
libs/henq.js
+38
-20
index.vue
pages/produce/execute/judgment/index.vue
+0
-26
index.vue
pages/project/plan/index.vue
+22
-9
detail.vue
pages/project/project/detail.vue
+9
-8
No files found.
assets/css/themes/default.less
View file @
38e881c9
//-------------蓝色-----------
//-------------蓝色-----------
@Theme: rgba(38, 128, 235, 1);
//滚动条颜色
//滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
...
...
components/page/dateRange.vue
View file @
38e881c9
...
@@ -87,8 +87,10 @@ export default {
...
@@ -87,8 +87,10 @@ export default {
handleChange
(
date
,
t
)
{
handleChange
(
date
,
t
)
{
if
(
date
.
length
==
2
)
{
if
(
date
.
length
==
2
)
{
this
.
value3
=
date
;
this
.
value3
=
date
;
this
.
value
[
this
.
start
]
=
date
[
0
];
// this.value[this.start] = date[0];
this
.
value
[
this
.
end
]
=
dayjs
(
date
[
1
]).
format
(
"YYYY-MM-DD 23:59:59"
);
// this.value[this.end] = dayjs(date[1]).format("YYYY-MM-DD 23:59:59");
this
.
$set
(
this
.
value
,
this
.
start
,
date
[
0
])
this
.
$set
(
this
.
value
,
this
.
end
,
dayjs
(
date
[
1
]).
format
(
"YYYY-MM-DD 23:59:59"
))
this
.
$emit
(
"on-change"
,
this
.
value
);
this
.
$emit
(
"on-change"
,
this
.
value
);
}
}
this
.
open
=
false
;
this
.
open
=
false
;
...
...
components/page/treeGrid/EditGrid.vue
View file @
38e881c9
...
@@ -14,9 +14,17 @@
...
@@ -14,9 +14,17 @@
<table>
<table>
<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=
"all"
></Checkbox>
<Checkbox
v-model=
"checkAll"
@
on-change=
"checked"
:indeterminate=
"indeterminate"
></Checkbox>
</label>
</label>
<label
v-else
>
<label
v-else
>
{{
renderHeader
(
column
,
index
)
}}
{{
renderHeader
(
column
,
index
)
}}
...
@@ -40,9 +48,9 @@
...
@@ -40,9 +48,9 @@
<tr
<tr
v-for=
"(item, index) in trs"
v-for=
"(item, index) in trs"
:key=
"item.id"
:key=
"item.id"
v-show=
"show(item)"
class=
"treetr"
class=
"treetr"
:id=
"'tr' + index"
:id=
"'tr' + index"
v-show=
"show(item)"
:draggable=
"drag && !item._drag"
:draggable=
"drag && !item._drag"
@
dragstart=
"dragstart($event, index, item)"
@
dragstart=
"dragstart($event, index, item)"
@
drop=
"dragdrop($event, index, item)"
@
drop=
"dragdrop($event, index, item)"
...
@@ -50,6 +58,7 @@
...
@@ -50,6 +58,7 @@
@
dragover=
"dragover($event, index, item)"
@
dragover=
"dragover($event, index, item)"
@
dragleave=
"dragleave($event, index, item)"
@
dragleave=
"dragleave($event, index, item)"
>
>
<!-- -->
<td
<td
v-for=
"(column, snum) in columns"
v-for=
"(column, snum) in columns"
:key=
"column.key"
:key=
"column.key"
...
@@ -58,35 +67,32 @@
...
@@ -58,35 +67,32 @@
<!-- 多选 -->
<!-- 多选 -->
<label
<label
v-if=
"column.type === 'selection'"
v-if=
"column.type === 'selection'"
@
click=
"
handleCheckClick(item, $event, index
)"
@
click=
"
rowChecked(item, index, $event
)"
>
>
<Checkbox
v-model=
"item.checked"
></Checkbox>
<Checkbox
v-model=
"item._checked"
:indeterminate=
"item._indeterminate"
></Checkbox>
</label>
</label>
<!-- 图标 -->
<div
v-if=
"column.type === 'icon'"
>
<Icon
v-if=
"column.type === 'drag'"
type=
"md-more"
class=
"drag"
/>
<i
<DTSpan
v-if=
"column.type == 'date'"
:value=
"item[column.key]"
/>
class=
"icon-set"
<div
v-if=
"column.type == 'user'"
>
size=
"small"
<User
:value=
"item[column.key]"
/>
@
click=
"RowClick(item, $event, index, action.text)"
</div>
v-for=
"action in column.actions"
<div
:key=
"action.text"
v-if=
"
column.type == 'users' &&
item[column.key] &&
item[column.key].length > 0
"
>
>
<Icon
<User
:type=
"action.type"
v-for=
"li in item[column.key]"
:title=
"action.text"
:value=
"li"
:style=
"action.style"
:key=
"li"
class=
"ml10"
/>
/>
</i>
</div>
<div
v-if=
"column.type === 'icons'"
>
<Icon
:type=
"item[column.key]"
size=
"20"
/>
</div>
<DTSpan
v-if=
"column.type=='date'"
:value=
"item[column.key]"
/>
<div
v-if=
"column.type=='user'"
>
<User
:value=
"item[column.key]"
/>
</div>
<div
v-if=
"column.type=='users'&&item[column.key]&&item[column.key].length>0"
>
<User
v-for=
"li in item[column.key]"
:value=
"li"
:key=
"li"
class=
"ml10"
/>
</div>
</div>
<state
<state
v-if=
"column.code"
v-if=
"column.code"
...
@@ -94,17 +100,13 @@
...
@@ -94,17 +100,13 @@
:value=
"item[column.key]"
:value=
"item[column.key]"
/>
/>
<!-- 树图标 -->
<!-- 树图标 -->
<span
@
click=
"toggle(index, item)"
v-if=
"snum == iconRow()"
>
<span
@
click=
"toggle(index, item)"
v-if=
"snum == treeColumn()"
>
<span
v-html=
"item.spaceHtml"
></span>
<span
class=
"ib"
v-width=
"spaceWidth * item._level"
></span>
<a
v-if=
"item.children && item.children.length > 0"
>
<a
v-if=
"item._count > 0"
class=
"expand"
<i
><Icon
:type=
"!item._expanded ? 'ios-add' : 'ios-remove'"
/>
</a
class=
"ivu-icon"
><i
v-else
class=
"ms-tree-space"
></i>
{{
item
.
_level
}}
v
{{
:class=
"
{
item
.
_count
'ivu-icon-ios-arrow-forward': !item.expanded,
}}
:
{{
show
(
item
)
}}
'ivu-icon-ios-arrow-down': item.expanded,
}"
>
</i>
</a
><i
v-else
class=
"ms-tree-space"
></i>
</span>
</span>
<!-- 菜单名称、排序、请求地址 -->
<!-- 菜单名称、排序、请求地址 -->
<label
<label
...
@@ -115,7 +117,7 @@
...
@@ -115,7 +117,7 @@
{{
renderBody
(
item
,
column
)
}}
{{
renderBody
(
item
,
column
)
}}
</label>
</label>
<table-expand
<table-expand
v-if=
"column.render && !column.type
&&
!column.solt"
v-if=
"column.render && !column.type
&&
!column.solt"
:row=
"item"
:row=
"item"
:column=
"column"
:column=
"column"
:index=
"snum"
:index=
"snum"
...
@@ -159,7 +161,7 @@ export default {
...
@@ -159,7 +161,7 @@ export default {
level
:
{
level
:
{
//展开层级
//展开层级
type
:
Number
,
type
:
Number
,
default
:
0
,
default
:
1
,
},
},
query
:
{
query
:
{
//参数
//参数
...
@@ -184,21 +186,22 @@ export default {
...
@@ -184,21 +186,22 @@ export default {
return
[];
return
[];
},
},
},
},
rowKey
:
{
keyname
:
{
//默认行主键
//默认行主键
type
:
[
String
],
type
:
[
String
],
default
:
"id"
,
default
:
"id"
,
},
},
upname
:
{
// 父级字段名称
type
:
String
,
default
:
"upId"
,
},
root
:
{
root
:
{
// 根级UpId的值.
// 根级UpId的值.
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
0
,
default
:
0
,
},
},
parent
:
{
// 父级字段名称
type
:
String
,
default
:
"upId"
,
},
iconName
:
false
,
iconName
:
false
,
drag
:
{
drag
:
{
//拖拽
//拖拽
...
@@ -219,7 +222,7 @@ export default {
...
@@ -219,7 +222,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
color
:
"#19be6b"
,
color
:
"#19be6b"
,
all
:
tru
e
,
checkAll
:
fals
e
,
logs
:
[],
logs
:
[],
trs
:
[],
// 处理后数据数组
trs
:
[],
// 处理后数据数组
cloneColumns
:
[],
// 处理后的表头数据
cloneColumns
:
[],
// 处理后的表头数据
...
@@ -231,13 +234,18 @@ export default {
...
@@ -231,13 +234,18 @@ export default {
dragIndex
:
-
1
,
//拖拽开始的序号
dragIndex
:
-
1
,
//拖拽开始的序号
};
};
},
},
computed
:
{},
computed
:
{
indeterminate
()
{
var
checkeds
=
this
.
trs
.
filter
(
u
=>
{
return
u
.
_checked
;
}).
length
;
return
0
<
checkeds
&&
checkeds
<
this
.
trs
.
length
;
},
},
watch
:
{
watch
:
{
items
()
{
items
()
{
if
(
this
.
items
)
{
if
(
this
.
items
)
{
this
.
trs
=
[];
this
.
trs
=
this
.
treeToList
(
this
.
items
);
this
.
dataLength
=
this
.
Length
(
this
.
items
);
this
.
initData
(
this
.
deepCopy
(
this
.
items
),
1
,
null
);
this
.
checkGroup
=
this
.
renderCheck
(
this
.
items
);
this
.
checkGroup
=
this
.
renderCheck
(
this
.
items
);
if
(
this
.
checkGroup
.
length
==
this
.
dataLength
)
{
if
(
this
.
checkGroup
.
length
==
this
.
dataLength
)
{
this
.
checks
=
true
;
this
.
checks
=
true
;
...
@@ -246,6 +254,7 @@ export default {
...
@@ -246,6 +254,7 @@ export default {
}
}
}
}
},
},
data
(
v
)
{},
columns
:
{
columns
:
{
handler
()
{
handler
()
{
this
.
cloneColumns
=
this
.
makeColumns
();
this
.
cloneColumns
=
this
.
makeColumns
();
...
@@ -258,8 +267,7 @@ export default {
...
@@ -258,8 +267,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
if
(
this
.
items
&&
this
.
items
.
length
>
0
)
{
if
(
this
.
items
&&
this
.
items
.
length
>
0
)
{
this
.
dataLength
=
this
.
Length
(
this
.
items
);
this
.
trs
=
this
.
treeToList
(
this
.
items
);
this
.
initData
(
this
.
deepCopy
(
this
.
items
),
1
,
null
);
this
.
cloneColumns
=
this
.
makeColumns
();
this
.
cloneColumns
=
this
.
makeColumns
();
this
.
checkGroup
=
this
.
renderCheck
(
this
.
items
);
this
.
checkGroup
=
this
.
renderCheck
(
this
.
items
);
if
(
this
.
checkGroup
.
length
==
this
.
dataLength
)
{
if
(
this
.
checkGroup
.
length
==
this
.
dataLength
)
{
...
@@ -268,10 +276,8 @@ export default {
...
@@ -268,10 +276,8 @@ export default {
this
.
checks
=
false
;
this
.
checks
=
false
;
}
}
}
}
//this.initData();
},
},
methods
:
{
methods
:
{
initData
()
{},
slots
()
{
slots
()
{
return
this
.
$scopedSlots
;
return
this
.
$scopedSlots
;
},
},
...
@@ -288,21 +294,18 @@ export default {
...
@@ -288,21 +294,18 @@ export default {
}
else
if
(
this
.
dragIndex
<
index
)
{
}
else
if
(
this
.
dragIndex
<
index
)
{
tr
.
className
+=
" sort"
;
tr
.
className
+=
" sort"
;
}
}
// console.warn("进入",e, e.clientY,tr.clientTop, tr.className);
},
},
// 悬浮
// 悬浮
dragover
(
e
,
index
,
row
)
{
dragover
(
e
,
index
,
row
)
{
// console.warn("悬浮",e)
e
.
preventDefault
();
e
.
preventDefault
();
// 鼠标Y
// 鼠标Y
var
my
=
e
.
offsetY
;
var
my
=
e
.
offsetY
;
var
h
=
e
.
toElement
.
clientHeight
;
var
h
=
e
.
toElement
.
clientHeight
;
var
tr
=
document
.
getElementById
(
"tr"
+
index
);
var
tr
=
document
.
getElementById
(
"tr"
+
index
);
if
(
this
.
dragIndex
>
index
&&
my
/
h
<
0.5
)
{
if
(
this
.
dragIndex
>
index
&&
my
/
h
<
0.5
)
{
tr
.
className
=
tr
.
className
.
replace
(
" move"
,
" sort"
);
tr
.
className
=
tr
.
className
.
replace
(
" move"
,
" sort"
);
}
}
if
(
this
.
dragIndex
<
index
&&
my
/
h
>
0.5
)
{
if
(
this
.
dragIndex
<
index
&&
my
/
h
>
0.5
)
{
tr
.
className
=
tr
.
className
.
replace
(
" sort"
,
" move"
);
tr
.
className
=
tr
.
className
.
replace
(
" sort"
,
" move"
);
}
}
},
},
...
@@ -319,14 +322,13 @@ export default {
...
@@ -319,14 +322,13 @@ export default {
if
(
index
!=
this
.
dragIndex
)
{
if
(
index
!=
this
.
dragIndex
)
{
this
.
$emit
(
"on-drag-drop"
,
this
.
dragIndex
,
index
,
this
.
trs
,
e
);
this
.
$emit
(
"on-drag-drop"
,
this
.
dragIndex
,
index
,
this
.
trs
,
e
);
}
}
console
.
log
(
e
.
offsetY
/
e
.
toElement
.
clientHeight
);
},
},
/**
/**
* @dragover="dragover($event, index, item)"
* @dragover="dragover($event, index, item)"
@dragleave="dragleave($event,index,item)"
@dragleave="dragleave($event,index,item)"
*/
*/
// 有无多选框折叠位置优化
// 有无多选框折叠位置优化
iconRow
()
{
treeColumn
()
{
var
num
=
0
;
var
num
=
0
;
for
(
let
i
=
0
,
len
=
this
.
columns
.
length
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
,
len
=
this
.
columns
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
columns
[
i
].
tree
)
{
if
(
this
.
columns
[
i
].
tree
)
{
...
@@ -347,7 +349,6 @@ export default {
...
@@ -347,7 +349,6 @@ export default {
}
}
return
style
;
return
style
;
},
},
// 排序事件
// 排序事件
handleSort
(
index
,
type
)
{
handleSort
(
index
,
type
)
{
this
.
cloneColumns
.
forEach
((
col
)
=>
(
col
.
_sortType
=
"normal"
));
this
.
cloneColumns
.
forEach
((
col
)
=>
(
col
.
_sortType
=
"normal"
));
...
@@ -364,50 +365,12 @@ export default {
...
@@ -364,50 +365,12 @@ export default {
},
},
// 点击某一行事件
// 点击某一行事件
RowClick
(
data
,
event
,
index
,
text
)
{
RowClick
(
data
,
event
,
index
,
text
)
{
// this.iconName = true;
this
.
$emit
(
"on-row-click"
,
data
,
event
,
index
,
text
);
const
result
=
this
.
makeData
(
data
);
this
.
$emit
(
"on-row-click"
,
result
,
event
,
index
,
text
);
},
},
//点击图标
RowClickIcon
(
event
,
index
,
text
)
{
this
.
$emit
(
"on-icon-click"
,
event
,
index
,
text
);
},
// 点击事件 返回数据处理
// 点击事件 返回数据处理
makeData
(
data
)
{
const
t
=
this
.
type
(
data
);
let
o
;
if
(
t
===
"array"
)
{
o
=
[];
}
else
if
(
t
===
"object"
)
{
o
=
{};
}
else
{
return
data
;
}
if
(
t
===
"array"
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
o
.
push
(
this
.
makeData
(
data
[
i
]));
}
}
else
if
(
t
===
"object"
)
{
for
(
const
i
in
data
)
{
if
(
i
!=
"spaceHtml"
&&
i
!=
"parent"
&&
i
!=
"level"
&&
i
!=
"expanded"
&&
i
!=
"isShow"
&&
i
!=
"load"
)
{
o
[
i
]
=
this
.
makeData
(
data
[
i
]);
}
}
}
return
o
;
},
// 处理表头数据
// 处理表头数据
makeColumns
()
{
makeColumns
()
{
const
columns
=
this
.
deepCopy
(
this
.
columns
);
const
columns
=
this
.
$u
.
clone
(
this
.
columns
);
this
.
tdsWidth
=
0
;
this
.
tdsWidth
=
0
;
columns
.
forEach
((
column
,
index
)
=>
{
columns
.
forEach
((
column
,
index
)
=>
{
column
.
_index
=
index
;
column
.
_index
=
index
;
...
@@ -417,82 +380,43 @@ export default {
...
@@ -417,82 +380,43 @@ export default {
});
});
return
columns
;
return
columns
;
},
},
// 数据处理 增加自定义属性监听
// // 隐藏显示
initData
(
items
,
level
,
parent
)
{
// this.trs = []
toggle
(
index
,
item
)
{
let
spaceHtml
=
""
;
if
(
item
.
_count
>
0
)
{
for
(
let
i
=
1
;
i
<
level
;
i
++
)
{
this
.
$set
(
this
.
trs
[
index
],
"_expanded"
,
!
item
.
_expanded
);
spaceHtml
+=
"<i class='ms-tree-space'></i>"
;
this
.
trs
.
forEach
((
u
,
i
)
=>
{
}
if
(
u
[
this
.
upname
]
===
item
.
id
)
{
items
.
forEach
((
item
,
index
)
=>
{
this
.
$set
(
this
.
trs
[
i
],
"_show"
,
!
item
.
_expanded
);
item
=
Object
.
assign
({},
item
,
{
parent
,
level
,
spaceHtml
,
});
if
(
typeof
item
.
expanded
===
"undefined"
)
{
item
=
Object
.
assign
({},
item
,
{
expanded
:
true
,
});
}
if
(
typeof
item
.
show
===
"undefined"
)
{
item
=
Object
.
assign
({},
item
,
{
isShow
:
true
,
});
}
if
(
typeof
item
.
isChecked
===
"undefined"
)
{
item
=
Object
.
assign
({},
item
,
{
isChecked
:
false
,
});
}
}
item
=
Object
.
assign
({},
item
,
{
load
:
!!
item
.
expanded
,
});
});
this
.
trs
.
push
(
item
);
if
(
item
.
children
&&
item
.
expanded
)
{
this
.
initData
(
item
.
children
,
level
+
1
,
item
);
}
}
items
.
splice
(
index
,
1
,
item
);
console
.
warn
(
index
,
item
.
_expanded
,
item
);
});
},
},
// 隐藏显示
show
(
item
)
{
show
(
item
)
{
if
(
item
.
_level
==
0
)
{
return
true
;
}
else
{
var
parents
=
this
.
getRoots
(
item
);
return
(
return
(
item
.
level
==
1
||
(
item
.
parent
&&
item
.
parent
.
expanded
&&
item
.
isShow
)
parents
.
filter
((
u
)
=>
{
return
!
u
.
_expanded
;
}).
length
==
0
);
);
},
toggle
(
index
,
item
)
{
const
level
=
item
.
level
+
1
;
let
spaceHtml
=
""
;
for
(
let
i
=
1
;
i
<
level
;
i
++
)
{
spaceHtml
+=
"<i class='ms-tree-space'></i>"
;
}
}
if
(
item
.
children
)
{
},
if
(
item
.
expanded
)
{
getRoots
(
item
)
{
item
.
expanded
=
!
item
.
expanded
;
var
parents
=
[];
this
.
close
(
index
,
item
);
var
root
=
this
.
trs
.
filter
((
u
)
=>
{
}
else
{
return
u
[
this
.
keyname
]
==
item
[
this
.
upname
];
item
.
expanded
=
!
item
.
expanded
;
});
if
(
item
.
load
)
{
while
(
root
.
length
==
1
)
{
this
.
open
(
index
,
item
);
parents
.
push
(
root
[
0
]);
}
else
{
root
=
this
.
trs
.
filter
((
u
)
=>
{
item
.
load
=
true
;
return
u
[
this
.
keyname
]
===
root
[
0
][
this
.
upname
];
item
.
children
.
forEach
((
child
,
childIndex
)
=>
{
this
.
trs
.
splice
(
index
+
childIndex
+
1
,
0
,
child
);
// 设置监听属性
this
.
$set
(
this
.
trs
[
index
+
childIndex
+
1
],
"parent"
,
item
);
this
.
$set
(
this
.
trs
[
index
+
childIndex
+
1
],
"level"
,
level
);
this
.
$set
(
this
.
trs
[
index
+
childIndex
+
1
],
"spaceHtml"
,
spaceHtml
);
this
.
$set
(
this
.
trs
[
index
+
childIndex
+
1
],
"isShow"
,
true
);
this
.
$set
(
this
.
trs
[
index
+
childIndex
+
1
],
"expanded"
,
false
);
});
});
}
}
}
return
parents
;
}
},
},
open
(
index
,
item
)
{
open
(
index
,
item
)
{
if
(
item
.
children
)
{
if
(
item
.
children
)
{
...
@@ -516,39 +440,39 @@ export default {
...
@@ -516,39 +440,39 @@ export default {
}
}
},
},
// 点击check勾选框,判断是否有children节点 如果有就一并勾选
// 点击check勾选框,判断是否有children节点 如果有就一并勾选
handleCheckClick
(
data
,
event
,
index
)
{
rowChecked
(
data
,
index
,
event
)
{
data
.
isChecked
=
!
data
.
isChecked
;
var
boys
=
this
.
getChildrens
(
data
);
const
arr
=
data
.
children
;
this
.
trs
.
forEach
((
u
,
i
)
=>
{
if
(
arr
)
{
var
items
=
boys
.
filter
((
b
)
=>
{
if
(
data
.
isChecked
)
{
return
b
[
this
.
keyname
]
==
u
[
this
.
keyname
];
this
.
checkGroup
.
push
(
data
.
id
);
});
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
items
.
length
==
1
)
{
this
.
checkGroup
.
push
(
arr
[
i
].
id
);
this
.
$set
(
this
.
trs
[
i
],
"_checked"
,
!
data
.
_checked
);
}
}
else
{
for
(
let
i
=
0
;
i
<
this
.
checkGroup
.
length
;
i
++
)
{
if
(
this
.
checkGroup
[
i
]
==
data
.
id
)
{
this
.
checkGroup
.
splice
(
i
,
1
);
}
for
(
let
j
=
0
;
j
<
arr
.
length
;
j
++
)
{
if
(
this
.
checkGroup
[
i
]
==
arr
[
j
].
id
)
{
this
.
checkGroup
.
splice
(
i
,
1
);
}
}
}
}
});
this
.
checkAll
=
this
.
trs
.
length
>
this
.
trs
.
filter
(
u
=>
{
return
!
u
.
_checked
;
}).
length
},
getChildrens
(
data
)
{
var
childrens
=
[];
var
that
=
this
;
getChildren
(
data
);
function
getChildren
(
f
)
{
that
.
trs
.
forEach
(
u
=>
{
if
(
u
[
that
.
upname
]
==
f
[
that
.
keyname
]){
childrens
.
push
(
u
);
getChildren
(
u
);
}
}
})
}
}
return
childrens
;
},
},
// checkbox 全选 选择事件
// checkbox 全选 选择事件
handleCheckAll
()
{
checked
(
v
)
{
this
.
checks
=
!
this
.
checks
;
this
.
trs
.
forEach
((
u
,
i
)
=>
{
if
(
this
.
checks
)
{
this
.
$set
(
this
.
trs
[
i
],
"_checked"
,
v
);
this
.
checkGroup
=
this
.
getArray
(
});
this
.
checkGroup
.
concat
(
this
.
All
(
this
.
items
))
);
}
else
{
this
.
checkGroup
=
[];
}
// this.$emit('on-selection-change', this.checkGroup)
// this.$emit('on-selection-change', this.checkGroup)
},
},
// 数组去重
// 数组去重
...
@@ -582,16 +506,7 @@ export default {
...
@@ -582,16 +506,7 @@ export default {
});
});
return
arr
;
return
arr
;
},
},
// 返回树形数据长度
Length
(
data
)
{
let
{
length
}
=
data
;
data
.
forEach
((
child
)
=>
{
if
(
child
.
children
)
{
length
+=
this
.
Length
(
child
.
children
);
}
});
return
length
;
},
// 返回表头
// 返回表头
renderHeader
(
column
,
$index
)
{
renderHeader
(
column
,
$index
)
{
if
(
"renderHeader"
in
this
.
columns
[
$index
])
{
if
(
"renderHeader"
in
this
.
columns
[
$index
])
{
...
@@ -599,6 +514,30 @@ export default {
...
@@ -599,6 +514,30 @@ export default {
}
}
return
column
.
title
||
"#"
;
return
column
.
title
||
"#"
;
},
},
treeToList
(
tree
)
{
var
that
=
this
;
let
list
=
[];
function
treeToList
(
data
,
level
)
{
data
.
map
((
u
)
=>
{
let
copy
=
that
.
$u
.
clone
(
u
);
copy
.
_count
=
0
;
copy
.
_level
=
level
;
copy
.
_expanded
=
copy
.
_expanded
||
that
.
level
>
level
;
copy
.
_show
=
true
;
copy
.
_indeterminate
=
false
;
copy
.
_checked
=
copy
.
_checked
||
false
;
list
.
push
(
copy
);
if
(
u
.
children
)
{
treeToList
(
u
.
children
,
level
+
1
);
copy
.
_count
=
u
.
children
.
length
;
delete
copy
.
children
;
}
});
}
treeToList
(
tree
,
0
);
return
list
;
},
// 返回内容
// 返回内容
renderBody
(
row
,
column
,
index
)
{
renderBody
(
row
,
column
,
index
)
{
...
@@ -617,57 +556,16 @@ export default {
...
@@ -617,57 +556,16 @@ export default {
});
});
return
arr
;
return
arr
;
},
},
// 深度拷贝函数
deepCopy
(
data
)
{
const
t
=
this
.
type
(
data
);
let
o
;
let
i
;
let
ni
;
if
(
t
===
"array"
)
{
o
=
[];
}
else
if
(
t
===
"object"
)
{
o
=
{};
}
else
{
return
data
;
}
if
(
t
===
"array"
)
{
for
(
i
=
0
,
ni
=
data
.
length
;
i
<
ni
;
i
++
)
{
o
.
push
(
this
.
deepCopy
(
data
[
i
]));
}
return
o
;
}
if
(
t
===
"object"
)
{
for
(
i
in
data
)
{
o
[
i
]
=
this
.
deepCopy
(
data
[
i
]);
}
return
o
;
}
},
type
(
obj
)
{
const
{
toString
}
=
Object
.
prototype
;
const
map
=
{
"[object Boolean]"
:
"boolean"
,
"[object Number]"
:
"number"
,
"[object String]"
:
"string"
,
"[object Function]"
:
"function"
,
"[object Array]"
:
"array"
,
"[object Date]"
:
"date"
,
"[object RegExp]"
:
"regExp"
,
"[object Undefined]"
:
"undefined"
,
"[object Null]"
:
"null"
,
"[object Object]"
:
"object"
,
};
return
map
[
toString
.
call
(
obj
)];
},
},
},
beforeDestroy
()
{
window
.
onresize
=
null
;
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../../assets/css/custom.less";
@import "../../../assets/css/custom.less";
@table_theme: #2680eb;
@table_head: #e9f2fd;
@table_line_height: 50px;
@table_hover: #f2f8fe;
@table_border: #accef7;
.treeTbale {
.treeTbale {
overflow: 0 auto;
overflow: 0 auto;
width: 100% !important;
width: 100% !important;
...
@@ -701,27 +599,56 @@ export default {
...
@@ -701,27 +599,56 @@ export default {
border-collapse: collapse;
border-collapse: collapse;
margin: 0 auto;
margin: 0 auto;
width: 100%;
width: 100%;
border: 1px solid @table_border;
th {
th {
background:
#f8f8f9
;
background:
@table_head
;
}
}
td,
td,
th {
th {
border: #dcdee2 solid 1px;
border-left: @table_border solid 1px;
line-height: 40px;
border-right: @table_border solid 1px;
border-bottom: #e8e9eb solid 1px;
line-height: 50px;
padding: 0 5px;
padding: 0 5px;
.drag:hover {
cursor: move;
}
.expand {
width: 18px;
height: 18px;
border: 1px solid @table_border;
text-align: center;
padding: 0 1px;
font-size: 14px;
font-weight: bold;
}
.expand:hover {
background: @table_theme;
color: white;
}
.ib {
display: inline-block;
}
}
th {
border-top: @table_border solid 1px;
}
}
tr.treetr:hover td {
tr.treetr:hover td {
background:
#f7f7f7
;
background:
@table_hover
;
}
}
tr.move {
tr.move {
td {
td {
background-color:
blue
;
background-color:
#d3e6fb
;
}
}
}
}
tr.sort {
tr.sort {
td {
td {
border-top: 2px solid blue;
border-top: 2px solid #3b8ded;
}
}
}
tbody {
border-bottom: @table_border solid 1px;
}
}
.ms-tree-space {
.ms-tree-space {
position: relative;
position: relative;
...
...
components/page/user.vue
View file @
38e881c9
<
template
>
<
template
>
<Poptip
placement=
"bottom-start"
trigger=
"hover"
width=
"240"
transfer
>
<Poptip
placement=
"bottom-start"
trigger=
"hover"
width=
"240"
transfer
>
<label
:class=
"css"
>
{{
user
.
name
}}
</label>
<label
v-if=
"mode=='text'"
:class=
"css"
>
{{
user
.
name
}}
</label>
<Avatar
v-else
:style=
"
{background:user.gender=='男'?'#1479D7':'red'}"
:icon="user.gender=='男'?'md-person':'md-woman'" shape="square" :src="img">
{{
user
.
name
}}
</Avatar>
<div
slot=
"content"
>
<div
slot=
"content"
>
<Avatar
v-if=
"user.face"
size=
"large"
:src=
"img"
></Avatar>
<Avatar
v-if=
"user.face"
size=
"large"
:src=
"img"
></Avatar>
<Avatar
<Avatar
...
@@ -31,6 +33,13 @@ export default {
...
@@ -31,6 +33,13 @@ export default {
type
:
[
Number
,
String
],
type
:
[
Number
,
String
],
default
:
0
,
default
:
0
,
},
},
mode
:{
type
:
String
,
default
:
"text"
,
validator
:(
v
)
=>
{
return
[
"text"
,
"face"
].
indexOf
(
v
)
>-
1
}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
...
i18n/locale/zh-CN.js
View file @
38e881c9
...
@@ -2042,6 +2042,8 @@ document_category: {
...
@@ -2042,6 +2042,8 @@ document_category: {
startDate
:
'开始日期'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
endDate
:
'结束日期'
,
businessUnits
:
'业务单位'
,
businessUnits
:
'业务单位'
,
date
:
'计划日期'
,
users
:
'成员'
,
},
},
//项目任务
//项目任务
project_task
:
{
project_task
:
{
...
...
libs/henq.js
View file @
38e881c9
...
@@ -2,30 +2,48 @@ import XLSX from 'xlsx';
...
@@ -2,30 +2,48 @@ import XLSX from 'xlsx';
import
Api
from
'@/plugins/request'
import
Api
from
'@/plugins/request'
let
henq
=
{};
let
henq
=
{};
let
pdfInfo
=
''
let
pdfInfo
=
''
henq
.
clone
=
(
obj
)
=>
{
henq
.
clone
=
(
data
)
=>
{
var
that
=
henq
var
that
=
henq
var
o
const
t
=
that
.
type
(
data
);
if
(
typeof
obj
===
'object'
)
{
let
o
;
if
(
obj
===
null
)
{
let
i
;
o
=
null
let
ni
;
if
(
t
===
"array"
)
{
o
=
[];
}
else
if
(
t
===
"object"
)
{
o
=
{};
}
else
{
}
else
{
if
(
obj
instanceof
Array
)
{
return
data
;
o
=
[]
for
(
var
i
=
0
,
len
=
obj
.
length
;
i
<
len
;
i
++
)
{
o
.
push
(
that
.
clone
(
obj
[
i
]))
}
}
}
else
{
if
(
t
===
"array"
)
{
o
=
{}
for
(
i
=
0
,
ni
=
data
.
length
;
i
<
ni
;
i
++
)
{
for
(
var
j
in
obj
)
{
o
.
push
(
that
.
clone
(
data
[
i
]));
o
[
j
]
=
that
.
clone
(
obj
[
j
])
}
}
return
o
;
}
}
if
(
t
===
"object"
)
{
for
(
i
in
data
)
{
o
[
i
]
=
that
.
clone
(
data
[
i
]);
}
}
}
else
{
return
o
;
o
=
obj
}
}
return
o
}
}
henq
.
type
=
(
obj
)
=>
{
const
{
toString
}
=
Object
.
prototype
;
const
map
=
{
"[object Boolean]"
:
"boolean"
,
"[object Number]"
:
"number"
,
"[object String]"
:
"string"
,
"[object Function]"
:
"function"
,
"[object Array]"
:
"array"
,
"[object Date]"
:
"date"
,
"[object RegExp]"
:
"regExp"
,
"[object Undefined]"
:
"undefined"
,
"[object Null]"
:
"null"
,
"[object Object]"
:
"object"
,
};
return
map
[
toString
.
call
(
obj
)];
},
henq
.
merge
=
()
=>
{
henq
.
merge
=
()
=>
{
Object
.
assign
(
argments
)
Object
.
assign
(
argments
)
}
}
...
...
pages/produce/execute/judgment/index.vue
View file @
38e881c9
...
@@ -134,32 +134,6 @@ export default {
...
@@ -134,32 +134,6 @@ export default {
fanlist
:
[],
fanlist
:
[],
feilist
:
[],
feilist
:
[],
titleCode
:
''
,
//送审单号
titleCode
:
''
,
//送审单号
problemList
:
[{
problem
:
"问题描述01"
,
id
:
1
},
{
problem
:
"问题描述02"
,
id
:
2
},
{
problem
:
"问题描述03"
,
id
:
3
}
],
blameList
:
[{
user
:
"责任人01"
,
id
:
1
},
{
user
:
"责任人02"
,
id
:
2
},
{
user
:
"责任人03"
,
id
:
3
}
]
};
};
},
},
created
()
{
created
()
{
...
...
pages/project/plan/index.vue
View file @
38e881c9
<
template
>
<
template
>
<div>
<div>
<Card>
<Card>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
>
<EditGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
:level=
"8"
:drag=
"true"
>
<template
slot=
"easySearch"
<template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><FormItem
prop=
"keys"
...
@@ -86,6 +86,26 @@ export default {
...
@@ -86,6 +86,26 @@ export default {
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
// { type: "selection", width: 80, align: "center" },
// { type: "selection", width: 80, align: "center" },
{
key
:
"drag"
,
type
:
"drag"
,
width
:
50
,
align
:
'center'
},
{
key
:
"upId"
,
width
:
50
,
type
:
"selection"
,
align
:
'center'
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
tree
:
true
,
easy
:
true
,
high
:
true
,
},
{
{
key
:
"type"
,
key
:
"type"
,
width
:
90
,
width
:
90
,
...
@@ -106,14 +126,7 @@ export default {
...
@@ -106,14 +126,7 @@ export default {
easy
:
true
,
easy
:
true
,
high
:
true
,
high
:
true
,
},
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
tree
:
true
,
easy
:
true
,
high
:
true
,
},
{
{
key
:
"status"
,
key
:
"status"
,
title
:
this
.
l
(
"status"
),
title
:
this
.
l
(
"status"
),
...
...
pages/project/project/detail.vue
View file @
38e881c9
...
@@ -3,17 +3,18 @@
...
@@ -3,17 +3,18 @@
<div
class=
"top-title"
>
<div
class=
"top-title"
>
<div
class=
"new-detail row-left"
>
<div
class=
"new-detail row-left"
>
<Row>
<Row>
<Filed
:span=
"
12
"
:name=
"l('title') + ':'"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"
6
"
:name=
"l('title') + ':'"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"
12
"
:name=
"l('state') + ':'"
>
<Filed
:span=
"
6
"
:name=
"l('state') + ':'"
>
<state
code=
"project.main.state"
:value=
"entity.state"
/>
<state
code=
"project.main.state"
:value=
"entity.state"
/>
</Filed>
</Filed>
<!--
<Filed
:span=
"12"
:name=
"l('phase')"
>
{{
entity
.
phase
}}
</Filed>
-->
<!--
<Filed
:span=
"12"
:name=
"l('phase')"
>
{{
entity
.
phase
}}
</Filed>
-->
<Filed
:span=
"12"
:name=
"l('startDate') + ':'"
>
{{
<Filed
:span=
"12"
:name=
"l('date') + ':'"
>
entity
.
startDate
<DateRange
v-model=
"entity"
/>
}}
</Filed>
</Filed>
<Filed
:span=
"12"
:name=
"l('endDate') + ':'"
>
{{
<Filed
:span=
"24"
:name=
"l('users')+ ':'"
>
entity
.
endDate
<User
:value=
"1"
mode=
"face"
/>
}}
</Filed>
<a><Avatar
icon=
"md-add"
size=
"24"
/></a>
</Filed>
</Row>
</Row>
</div>
</div>
<ul>
<ul>
...
...
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