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
d2eb068e
Commit
d2eb068e
authored
Oct 28, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
ff5044ec
c9950444
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
605 additions
and
141 deletions
+605
-141
base.less
assets/css/base.less
+3
-2
filesViewer.vue
components/page/filesViewer.vue
+456
-0
opration.vue
components/page/opration.vue
+11
-12
zh-CN.js
i18n/locale/zh-CN.js
+1
-0
detail.vue
pages/project/project/detail.vue
+11
-11
details.vue
pages/project/project/details.vue
+2
-2
index.vue
pages/project/project/index.vue
+4
-2
add.vue
pages/project/record/add.vue
+2
-2
index.vue
pages/project/record/index.vue
+55
-86
index.vue
pages/project/task/index.vue
+58
-23
iview.js
plugins/iview.js
+2
-1
No files found.
assets/css/base.less
View file @
d2eb068e
...
...
@@ -1085,6 +1085,7 @@ html [type=button] {
}
i {
font-size: 16px;
padding: 4px;
border-radius: 3px;
}
...
...
@@ -1126,13 +1127,13 @@ html [type=button] {
width: 22px;
height: 22px;
line-height: 22px;
margin: 0px
0
0 0;
margin: 0px
5px
0 0;
border-radius: 50%;
color: #515A6E;
background: #F5F6FA;
.ivu-icon {
font-weight: bold;
font-size:
20
px;
font-size:
18
px;
}
}
a.disable {
...
...
components/page/filesViewer.vue
0 → 100644
View file @
d2eb068e
<
template
>
<div
class=
"files-viewer"
>
<Card
class=
"card1"
:style=
"card1New"
>
<div
class=
"icon-click"
>
<!--
<a><Icon
type=
"ios-add-circle-outline"
@
click=
"magnify"
/></a>
<a><Icon
type=
"ios-remove-circle-outline"
@
click=
"shrink"
/>
</a>
<a><Icon
type=
"ios-power"
/>
</a>
-->
<a>
<Icon
type=
"md-undo"
@
click=
"rotate"
/></a>
<!--
<a>
<Icon
type=
"ios-print-outline"
/></a>
-->
<a><Icon
type=
"md-arrow-down"
@
click=
"download"
/>
</a>
</div>
<div
class=
"body-img"
>
<Icon
type=
"ios-arrow-back"
class=
"bg-b"
@
click=
"leftIcon"
:class=
"isactive == 0 ? 'bg-b' : 'bg-b1'"
/>
<div
class=
"list-shoucang"
>
<img
:src=
"avatorPath"
v-if=
"downloadPath"
:style=
"styleObj"
/>
<div
class=
"files-list"
v-else
>
<p>
文件名称
</p>
<p>
{{
imgObj
.
filsesName
}}
</p>
<p><a
@
click=
"download"
>
下载查看文件
</a></p>
</div>
</div>
<Icon
type=
"ios-arrow-forward"
@
click=
"rightIcon"
:class=
"isactive == listTask.length ? 'bg-l' : 'bg-l1'"
/>
</div>
</Card>
<div
class=
"show-list-img"
>
<div
@
click=
"showList"
>
<Icon
type=
"md-arrow-dropdown"
v-show=
"showIcon"
/>
<Icon
type=
"md-arrow-dropup"
v-show=
"!showIcon"
/>
</div>
</div>
<Card
class=
"card-list"
v-show=
"showIcon"
>
<Icon
type=
"ios-arrow-back"
:class=
"num
<
0
?
'
bg-b1
'
:
'
bg-b
'"
@
click=
"leftmove"
/>
<div
class=
"ying-cang"
>
<div
class=
"list-c"
:style=
"
{ width: '100%', 'margin-left': num * 227 + 'px' }"
>
<div
v-for=
"(item, index) in listTask"
:key=
"index"
:name=
"item.id"
>
<div
class=
"img-list"
@
click=
"clickItem(item, index)"
:class=
"isactive == index ? 'addclass' : ''"
>
<img
v-if=
"
item.fileType == 'jpg' ||
item.fileType == 'gif' ||
item.fileType == 'png'
"
:src=
"downUrl + item.downloadPath"
width=
"100%"
height=
"100%"
/>
<div
class=
"files-list"
v-else
>
<p>
文件类型
</p>
<p>
{{
item
.
fileType
}}
</p>
<p>
文件名称
</p>
<p>
{{
item
.
newName
}}
</p>
</div>
</div>
</div>
</div>
</div>
<Icon
type=
"ios-arrow-forward"
:class=
"listTask.length > 16 && showArrow ? 'bg-l1' : 'bg-l'"
@
click=
"rightmove"
/>
</Card>
</div>
</
template
>
<
script
>
export
default
{
name
:
""
,
data
()
{
return
{
downUrl
:
fileUrlDown
,
//附件路径
downloadPath
:
""
,
//附件地址
card1New
:
{
height
:
""
,
},
listTask
:
[],
imgObj
:
{
filesPath
:
""
,
filsesName
:
""
,
},
isactive
:
0
,
avatorPath
:
""
,
num
:
0
,
num1
:
0
,
showIcon
:
true
,
showArrow
:
true
,
multiples
:
1
,
// 放大或者缩小
deg
:
0
,
// 旋转的角度
styleObj
:
null
,
// 拖拽时修改图片的样式
isDrag
:
false
,
// 是否开始拖拽
startX
:
0
,
// 鼠标的点击X轴
startY
:
0
,
// 鼠标的点击Y轴
moveX
:
0
,
// 鼠标移动的X轴
moveY
:
0
,
// 鼠标移动的Y轴
endX
:
0
,
endY
:
0
,
};
},
props
:
{
parms
:
{
type
:
[
String
,
Object
],
default
:
""
,
},
},
mounted
()
{
if
(
this
.
parms
.
eid
)
{
this
.
filesList
();
}
},
methods
:
{
// // 放大
// magnify() {
// if (this.multiples >= 10) {
// return;
// }
// this.multiples += 0.25;
// this.styleObj = `transform: scale(${this.multiples}); rotateZ(${this.deg}deg);left:${this.endX}px;top:${this.endY}px`;
// },
// // 缩小
// shrink() {
// if (this.multiples
<=
0
)
{
// return;
// }
// this.multiples -= 0.25;
// this.styleObj = `transform: scale(${this.multiples}) rotateZ(${this.deg}deg);left:${this.endX}px;top:${this.endY}px`;
// },
// 旋转
rotate
()
{
this
.
deg
+=
90
;
if
(
this
.
deg
>=
360
)
{
this
.
deg
=
0
;
}
this
.
styleObj
=
`transform: scale(
${
this
.
multiples
}
) rotateZ(
${
this
.
deg
}
deg);left:
${
this
.
endX
}
px;top:
${
this
.
endY
}
px`
;
},
showList
()
{
this
.
showIcon
=
!
this
.
showIcon
;
if
(
this
.
showIcon
==
true
)
{
this
.
card1New
.
height
=
"72vh"
;
}
else
{
this
.
card1New
.
height
=
"90vh"
;
}
},
leftIcon
()
{
if
(
this
.
isactive
==
0
)
{
return
false
;
// this.$Message.error("已是第一个一个");
}
this
.
isactive
=
this
.
isactive
-
1
;
},
rightIcon
()
{
if
(
this
.
isactive
==
this
.
listTask
.
length
)
{
return
false
;
// this.$Message.error("已是最后一个");
}
this
.
isactive
=
this
.
isactive
+
1
;
},
clickItem
(
item
,
index
)
{
this
.
isactive
=
index
;
if
(
item
.
fileType
==
"jpg"
||
item
.
fileType
==
"gif"
||
item
.
fileType
==
"png"
)
{
this
.
downloadPath
=
item
.
downloadPath
;
}
else
{
this
.
downloadPath
=
""
;
}
this
.
imgObj
.
id
=
item
.
id
;
this
.
imgObj
.
filesPath
=
item
.
downloadPath
;
this
.
imgObj
.
filsesName
=
item
.
newName
;
},
download
()
{
window
.
open
(
this
.
downUrl
+
this
.
imgObj
.
filesPath
,
"_blank"
);
},
leftmove
()
{
if
(
this
.
num
<
0
)
{
this
.
num
+=
1
;
if
(
this
.
num
==
0
)
{
this
.
showArrow
=
true
;
}
}
},
rightmove
()
{
if
(
this
.
num
+
this
.
listTask
.
length
>
16
)
{
this
.
num
-=
1
;
if
(
this
.
num
+
this
.
listTask
.
length
==
16
)
{
this
.
showArrow
=
false
;
}
}
else
{
this
.
showArrow
=
false
;
}
},
filesList
()
{
//查询上传到文件服务器上的文件
this
.
$http
.
sysUser
.
getFile
(
this
.
parms
).
then
((
res
)
=>
{
if
(
res
.
data
!=
[]
&&
res
.
data
.
length
>
0
)
{
var
items
=
[];
res
.
data
.
forEach
((
data
)
=>
{
let
objImag
=
{};
objImag
.
newName
=
data
.
newName
;
objImag
.
downloadPath
=
data
.
downloadPath
;
objImag
.
id
=
data
.
id
;
objImag
.
fileType
=
data
.
fileType
;
items
.
push
(
objImag
);
});
this
.
listTask
=
items
;
if
(
this
.
listTask
[
0
].
fileType
==
"jpg"
||
this
.
listTask
[
0
].
fileType
==
"gif"
||
this
.
listTask
[
0
].
fileType
==
"png"
)
{
// this.avatorPath = this.downUrl + this.listTask[0].downloadPath;
this
.
downloadPath
=
this
.
listTask
[
0
].
downloadPath
;
}
}
});
},
},
watch
:
{
"parms.eid"
(
v
)
{
if
(
v
)
{
this
.
filesList
();
}
},
downloadPath
(
v
)
{
if
(
v
)
{
this
.
avatorPath
=
this
.
downUrl
+
v
;
}
},
isactive
(
v
)
{
if
(
v
)
{
this
.
listTask
.
map
((
item
,
index
)
=>
{
if
(
v
==
index
)
{
if
(
item
.
fileType
==
"jpg"
||
item
.
fileType
==
"gif"
||
item
.
fileType
==
"png"
)
{
this
.
downloadPath
=
item
.
downloadPath
;
}
else
{
this
.
downloadPath
=
""
;
}
this
.
imgObj
.
id
=
item
.
id
;
this
.
imgObj
.
filesPath
=
item
.
downloadPath
;
this
.
imgObj
.
filsesName
=
item
.
newName
;
}
});
}
},
},
};
</
script
>
<
style
lang=
"less"
>
// @import "../../assets/css/custom.less";
.files-viewer {
.card1 {
height: 72vh;
.icon-click {
text-align: center;
font-size: 17px;
a {
border: 1px dashed #999;
}
}
.body-img {
height: 100%;
display: flex;
display: -webkit-flex;
// flex-direction:column;
justify-content: center; /*定义body的里的元素水平居中*/
.bg-b {
width: 40px;
height: 40px;
padding: 5px 0 0 -4px;
font-size: 40px;
color: #515a6e;
opacity: 0.2;
margin-top: 15%;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.bg-b1 {
width: 40px;
height: 40px;
padding: 5px 0 0 -4px;
font-size: 40px;
color: #515a6e;
opacity: 0.6;
margin-top: 15%;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.bg-l {
width: 40px;
height: 40px;
padding: 1px 0 0 4px;
margin-top: 15%;
font-size: 40px;
opacity: 0.2;
color: #515a6e;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.bg-l1 {
width: 40px;
height: 40px;
padding: 1px 0 0 4px;
margin-top: 15%;
font-size: 40px;
color: #515a6e;
opacity: 0.6;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.list-shoucang {
width: 96%;
text-align: center;
img {
padding-top: 10%;
}
.files-list {
width: 500px;
height: 300px;
margin: 10% auto;
border: 1px dashed #999;
padding-top: 90px;
p {
height: 50px;
}
}
}
}
}
.show-list-img {
width: 100%;
height: 25px;
font-size: 30px;
margin-top: -18px;
text-align: center;
div {
cursor: pointer;
}
}
.card-list {
width: 100%;
height: 160px;
margin-top: 15px;
position: relative;
padding-top: 5px;
.bg-b {
font-size: 30px;
color: #515a6e;
opacity: 0.2;
position: absolute;
top: 55px;
left: 0;
cursor: pointer;
}
.bg-b1 {
font-size: 30px;
color: #515a6e;
opacity: 0.6;
position: absolute;
top: 55px;
left: 0;
cursor: pointer;
}
.bg-l {
font-size: 30px;
color: #515a6e;
opacity: 0.2;
position: absolute;
top: 55px;
right: 0;
cursor: pointer;
}
.bg-l1 {
font-size: 30px;
color: #515a6e;
opacity: 0.6;
position: absolute;
top: 55px;
right: 0;
cursor: pointer;
}
.ivu-card-body {
width: 100%;
display: flex;
display: -webkit-flex;
text-align: center;
padding: 15px 37px;
overflow: hidden;
}
.ying-cang {
width: 100%;
overflow: hidden;
.list-c {
width: 100%;
text-align: center;
margin: 0 auto;
display: -webkit-inline-box;
display: inline-box;
.img-list {
width: 101px;
height: 101px;
margin: 10px 6px;
border: 1px dashed #999;
padding: 1px;
cursor: pointer;
}
.img-list:hover {
box-shadow: darkgrey 3px 3px 12px 3px; //边框阴影
}
.files-list {
overflow: hidden;
text-align: center;
p {
height: 25px;
}
}
}
}
}
.addclass {
border: 2px solid #2680eb !important;
}
}
// .files-view .ivu-card > .ivu-card-body {
// padding: 14px 0 0 5px;
// }
</
style
>
components/page/opration.vue
View file @
d2eb068e
...
...
@@ -81,18 +81,17 @@ export default {
},
methods
:
{
handler
()
{
if
(
!
this
.
disable
)
{
if
(
this
.
oprate
==
"delete"
||
this
.
oprate
==
"remove"
)
{
this
.
$Modal
.
confirm
({
title
:
this
.
title
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
);
}
});
}
else
{
this
.
$emit
(
"click"
,
event
);
}
if
(
this
.
oprate
==
"delete"
||
this
.
oprate
==
"remove"
)
{
this
.
$Modal
.
confirm
({
title
:
this
.
title
,
content
:
"<p>"
+
this
.
msg
+
"</p>"
,
onOk
:
()
=>
{
this
.
$emit
(
"click"
,
event
);
}
});
}
else
{
this
.
$emit
(
"click"
,
event
);
}
}
},
...
...
i18n/locale/zh-CN.js
View file @
d2eb068e
...
...
@@ -1863,6 +1863,7 @@ export default {
plansToEndTime
:
'计划结束时间'
,
completePercentage
:
'完成百分比'
,
upTaskId
:
'上级任务Id'
,
workHour
:
'工时'
},
//工资记录
project_plan_record
:
{
...
...
pages/project/project/detail.vue
View file @
d2eb068e
...
...
@@ -123,23 +123,23 @@ export default {
this
.
detail
=
()
=>
import
(
"../plan"
);
},
task
()
{
this
.
curId
=
this
.
eid
;
//
this.curId = this.eid;
this
.
title
=
"任务"
;
//
this.detail = () => import("../task/index");
this
.
$router
.
push
({
name
:
"project-task"
,
params
:
{
id
:
this
.
curId
}
});
this
.
detail
=
()
=>
import
(
"../task/index"
);
//
this.$router.push({
//
name: "project-task",
//
params: {
//
id: this.curId
//
}
//
});
},
group
()
{
this
.
title
=
"项目成员"
;
this
.
detail
=
()
=>
import
(
"../groupUser/index1"
);
this
.
detail
=
()
=>
import
(
"../groupUser/index1"
);
},
log
()
{
log
()
{
this
.
title
=
"项目动态"
;
this
.
detail
=
()
=>
import
(
"../record/index1"
);
this
.
detail
=
()
=>
import
(
"../record/index1"
);
},
l
(
key
)
{
key
=
"project_main"
+
"."
+
key
;
...
...
pages/project/project/details.vue
View file @
d2eb068e
...
...
@@ -15,7 +15,7 @@
<state
code=
"project.main.type"
:value=
"entity.type"
/>
</Filed>
<Filed
:span=
"24"
:name=
"l('note') + ':'"
>
{{
entity
.
note
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('attachment')
+ ':'
"
>
<Filed
:span=
"24"
:name=
"l('attachment')"
>
<FilesView
ref=
"refFile"
:parms=
"parms"
/>
<!--
<files
ref=
"refFile"
...
...
@@ -48,7 +48,7 @@ export default {
data
()
{
return
{
avatorPath
:
""
,
entity
:
this
.
row
,
entity
:
{}
,
parms
:
{
app
:
"material"
,
eid
:
null
,
...
...
pages/project/project/index.vue
View file @
d2eb068e
...
...
@@ -123,14 +123,16 @@
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<!-- width="800" -->
<Modal
v-model=
"modal1"
title=
"查看附件"
width=
"800"
fullscreen
footer-hide
:mask-closable=
"false"
>
<FilesView
ref=
"refFile"
:parms=
"parms"
/>
<FilesViewer
:parms=
"parms"
/>
<!-- <FilesView ref="refFile" :parms="parms" /> -->
</Modal>
</div>
</template>
...
...
pages/project/record/add.vue
View file @
d2eb068e
...
...
@@ -4,7 +4,7 @@
<Col
:span=
"12"
>
<FormItem
:label=
"l('workHour')"
prop=
"workHour"
>
<InputNumber
v-model=
"entity.workHour"
></InputNumber>
<InputNumber
v-model=
"entity.workHour"
:min=
"0"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
...
...
@@ -51,7 +51,7 @@ export default {
deleterUserId
:
null
,
projectId
:
""
,
planId
:
""
,
workHour
:
null
,
workHour
:
0
,
status
:
null
,
title
:
""
,
note
:
""
,
...
...
pages/project/record/index.vue
View file @
d2eb068e
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:
action=
"action
"
><template
slot=
"easySearch"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:
data=
"recordList"
:easy=
"false"
:set=
"false"
:height=
"400
"
><template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
...
...
@@ -32,6 +32,9 @@ export default {
author
:
"henq"
,
description
:
"project_plan_record 10/20/2020 2:55:13 PM"
,
},
props
:
{
eid
:
String
},
data
()
{
return
{
action
:
Api
.
index
,
...
...
@@ -46,78 +49,11 @@ export default {
detail
:
null
,
curId
:
0
,
columns
:
[{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
high
:
true
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
align
:
"left"
,
high
:
true
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
align
:
"left"
,
high
:
true
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
align
:
"left"
,
high
:
true
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"projectId"
,
title
:
this
.
l
(
"projectId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"planId"
,
title
:
this
.
l
(
"planId"
),
align
:
"left"
,
high
:
true
},
{
key
:
"workHour"
,
title
:
this
.
l
(
"workHour"
),
align
:
"left"
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"left"
,
align
:
"right"
,
high
:
true
,
code
:
'mes.project_plan_record.Status'
width
:
120
,
},
{
key
:
"title"
,
...
...
@@ -126,23 +62,21 @@ export default {
easy
:
true
,
high
:
true
},
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
align
:
"left"
,
high
:
true
},
{
key
:
"attachment"
,
title
:
this
.
l
(
"attachment"
),
align
:
"left"
,
high
:
true
},
{
key
:
"taskId"
,
title
:
this
.
l
(
"taskId"
),
align
:
"left"
,
high
:
true
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"a"
,
{
on
:
{
click
:
()
=>
this
.
viewFiles
(
params
.
row
)
},
},
"查看附件"
);
},
},
{
title
:
'操作'
,
...
...
@@ -181,11 +115,14 @@ export default {
])
}
},
]
],
recordList
:
[]
}
},
mounted
()
{
console
.
log
(
this
);
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
}
},
async
fetch
({
store
,
...
...
@@ -194,6 +131,23 @@ export default {
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:
{
load
(
v
)
{
let
params
=
{
conditions
:
[{
fieldName
:
"taskId"
,
fieldValue
:
v
,
conditionalType
:
"Equal"
,
}],
sortBy
:
"creationTime"
,
isDesc
:
false
,
}
Api
.
list
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
recordList
=
r
.
result
}
})
},
ok
()
{
this
.
$refs
.
grid
.
load
()
this
.
modal
=
false
...
...
@@ -234,6 +188,14 @@ export default {
}
})
},
viewFiles
(
row
)
{
if
(
row
.
attachment
)
{
this
.
parms
.
eid
=
row
.
attachment
;
this
.
modal1
=
true
;
}
else
{
this
.
$Message
.
error
(
"暂没上传附件"
);
}
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
...
...
@@ -242,6 +204,13 @@ export default {
let
vkey
=
"project_plan_record"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
''
&&
v
!=
null
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
...
...
pages/project/task/index.vue
View file @
d2eb068e
...
...
@@ -9,7 +9,7 @@
</a>
</div>
<Content
class=
"content"
:class=
"!showMenu?'con_bord':''"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:lazy=
"true"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:lazy=
"true"
:set=
"false"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
inline
>
<FormItem>
...
...
@@ -56,11 +56,13 @@
</FormItem>
<FormItem
prop=
"keys"
><Input
placeholder=
"请输入项目标题/计划名称/任务标题"
v-model=
"easySearch.keys.value"
v-width=
"240"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
<!--
<FormItem>
<Button @click="highSearch" type="text">
<Icon type="md-search" />高级
</Button>
</FormItem>
-->
</Form>
</template>
<
template
slot=
"buttons"
>
...
...
@@ -198,6 +200,22 @@ export default {
align
:
"center"
,
high
:
true
,
},
{
key
:
"workHour"
,
title
:
this
.
l
(
"workHour"
),
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
'a'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
viewWork
(
params
.
row
.
id
)
}
},
params
.
row
.
workHour
)
}
},
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
...
...
@@ -227,14 +245,14 @@ export default {
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action
actionCur
"
class
:
"action"
},
[
h
(
'op'
,
{
attrs
:
{
icon
:
"
ios-play
"
,
icon
:
"
md-arrow-dropright-circle
"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
params
.
row
.
status
==
0
?
"开始"
:
params
.
row
.
status
==
2
?
"继续"
:
''
,
// color: "#19be6b",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on
:
{
...
...
@@ -246,7 +264,6 @@ export default {
// icon: "ios-pause",
// type: "icon",
// title: "暂停",
// //color: "#19be6b",
// //disable: params.row.status == 1 ? false : true
// },
// on: {
...
...
@@ -255,10 +272,10 @@ export default {
// }),
h
(
'op'
,
{
attrs
:
{
icon
:
"
md-checkbox-outline
"
,
icon
:
"
ios-alarm
"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
"完成"
,
//color: "#19be6b",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
},
on
:
{
...
...
@@ -269,8 +286,8 @@ export default {
attrs
:
{
icon
:
"md-add"
,
type
:
"icon"
,
oprate
:
"add"
,
title
:
"新增记录"
,
//color: "#19be6b",
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true
},
on
:
{
...
...
@@ -279,10 +296,10 @@ export default {
}),
h
(
'op'
,
{
attrs
:
{
icon
:
"
ios-create-outlin
e"
,
icon
:
"
md-creat
e"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
"修改"
,
// color: "#2b85e4",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on
:
{
...
...
@@ -291,11 +308,10 @@ export default {
}),
h
(
'op'
,
{
attrs
:
{
icon
:
"
ios-trash-outline
"
,
icon
:
"
md-trash
"
,
type
:
"icon"
,
title
:
"删除"
,
oprate
:
'delete'
,
//color: "#ed4014",
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true
},
on
:
{
...
...
@@ -315,6 +331,9 @@ export default {
planIdsCur
:
[]
}
},
props
:
{
eid
:
String
},
async
fetch
({
store
,
params
...
...
@@ -322,15 +341,18 @@ export default {
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
created
()
{
if
(
this
.
$route
.
params
.
id
!=
''
)
{
this
.
projectId
=
this
.
$route
.
params
.
id
this
.
easySearch
.
projectId
.
value
=
this
.
$route
.
params
.
id
if
(
this
.
e
id
!=
''
)
{
this
.
projectId
=
this
.
e
id
this
.
easySearch
.
projectId
.
value
=
this
.
e
id
}
this
.
treeHeight
=
window
.
innerHeight
-
150
;
},
mounted
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
console
.
log
(
this
.
easySearch
);
if
(
this
.
eid
!=
""
)
{
this
.
easySearch
.
projectId
.
value
=
this
.
eid
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
}
},
methods
:
{
ok
()
{
...
...
@@ -407,18 +429,17 @@ export default {
},
projectId
:
{
op
:
"Equal"
,
value
:
this
.
$route
.
params
.
id
value
:
this
.
e
id
},
};
this
.
$refs
.
grid
.
reload
(
where
);
},
update
status
(
valId
,
valStatus
)
{
update
part
(
valId
,
valStatus
)
{
let
params
=
{
id
:
valId
,
status
:
valStatus
,
detail
:
''
status
:
valStatus
}
Api
.
update
status
(
params
).
then
(
r
=>
{
Api
.
update
part
(
params
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
'操作成功'
)
...
...
@@ -441,10 +462,17 @@ export default {
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
viewWork
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"查看工时"
;
this
.
fullScreen
=
false
;
this
.
detail
=
()
=>
import
(
'../record'
)
this
.
modal
=
true
;
},
addRecord
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"新增记录"
;
this
.
fullScreen
=
tru
e
;
this
.
fullScreen
=
fals
e
;
this
.
detail
=
()
=>
import
(
'../record/add'
)
this
.
modal
=
true
;
},
...
...
@@ -452,6 +480,13 @@ export default {
let
vkey
=
"project_task"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
""
)
{
this
.
eid
=
v
}
}
}
}
</
script
>
...
...
plugins/iview.js
View file @
d2eb068e
...
...
@@ -77,6 +77,7 @@ import Pictrue from '@/components/page/pictrue.vue'
import
WordTree
from
'@/components/page/wordTree.vue'
import
Actions
from
'@/components/page/actions.vue'
import
TimeDifference
from
'@/components/page/timeDifference.vue'
import
FilesViewer
from
'@/components/page/filesViewer.vue'
...
...
@@ -159,7 +160,7 @@ Vue.component("WordTree", WordTree)
Vue
.
component
(
"Actions"
,
Actions
)
Vue
.
component
(
"TimeDifference"
,
TimeDifference
)
Vue
.
component
(
"Life"
,
Life
)
Vue
.
component
(
"FilesViewer"
,
FilesViewer
)
//注入mock
...
...
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