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
a744d2d4
Commit
a744d2d4
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
a68d5a4b
3173b979
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
94 deletions
+114
-94
zh-CN.js
i18n/locale/zh-CN.js
+1
-1
index.vue
pages/project/plan/index.vue
+6
-6
add.vue
pages/project/record/add.vue
+0
-1
detail.vue
pages/project/record/detail.vue
+28
-18
edit.vue
pages/project/record/edit.vue
+53
-61
index.vue
pages/project/record/index.vue
+26
-7
No files found.
i18n/locale/zh-CN.js
View file @
a744d2d4
...
...
@@ -1876,7 +1876,7 @@ export default {
deleterUserId
:
'删除人'
,
projectId
:
'项目id'
,
planId
:
'计划id'
,
workHour
:
'工
作时间
'
,
workHour
:
'工
时
'
,
status
:
'状态'
,
title
:
'标题'
,
note
:
'备注'
,
...
...
pages/project/plan/index.vue
View file @
a744d2d4
...
...
@@ -259,17 +259,17 @@ export default {
this
.
$Message
.
error
(
"未设置结束时间"
);
return
}
if
(
!
row
.
executor
){
this
.
$Message
.
error
(
"
为
设置执行人"
);
if
(
row
.
executor
.
length
==
0
){
this
.
$Message
.
error
(
"
请
设置执行人"
);
return
}
delete
row
.
chlidren
;
delete
row
.
parent
;
console
.
warn
(
row
)
var
data
=
JSON
.
parse
(
JSON
.
stringify
(
row
));
data
.
status
=
1
;
Api
.
sendtask
(
data
).
then
(
r
=>
{
if
(
r
.
result
){
row
.
status
=
1
;
Api
.
sendtask
(
row
).
then
(
r
=>
{
if
(
r
.
success
){
this
.
$Message
.
info
(
"任务派发成功!"
);
this
.
search
();
}
...
...
pages/project/record/add.vue
View file @
a744d2d4
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('workHour')"
prop=
"workHour"
>
<InputNumber
v-model=
"entity.workHour"
:min=
"0"
></InputNumber>
...
...
pages/project/record/detail.vue
View file @
a744d2d4
<
template
>
<div
class=
"detail"
>
<div
class=
"detail"
style=
"width:100%"
>
<Row>
<Filed
:span=
"12"
:name=
"l('workHour')"
>
{{
entity
.
workHour
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('note')"
>
<div
style=
"height:200px"
v-html=
"entity.note"
class=
"tex_in10"
></div>
</Filed>
<Filed
:span=
"24"
:name=
"l('attachment')"
><a
@
click=
"viewFiles"
>
查看附件
</a></Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
></User>
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
{{
entity
.
lastModifierUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('isDeleted')"
>
{{
entity
.
isDeleted
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deletionTime')"
>
{{
entity
.
deletionTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('projectId')"
>
{{
entity
.
projectId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('planId')"
>
{{
entity
.
planId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('workHour')"
>
{{
entity
.
workHour
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
{{
entity
.
status
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('note')"
>
{{
entity
.
note
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('attachment')"
>
{{
entity
.
attachment
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('taskId')"
>
{{
entity
.
taskId
}}
</Filed>
</Row>
<Modal
v-model=
"modalFiles"
title=
"查看附件"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<FilesView
ref=
"refFile"
:parms=
"parms"
/>
</Modal>
</div>
</
template
>
...
...
@@ -31,6 +26,13 @@ export default {
data
()
{
return
{
entity
:
{},
modalFiles
:
false
,
parms
:
{
app
:
"taskRecord"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
rules
:
{
name
:
[{
required
:
true
,
...
...
@@ -46,10 +48,10 @@ export default {
}
},
props
:
{
eid
:
Number
eid
:
String
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
}
},
...
...
@@ -65,6 +67,14 @@ export default {
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
viewFiles
()
{
if
(
this
.
entity
.
attachment
)
{
this
.
parms
.
eid
=
this
.
entity
.
attachment
;
this
.
modalFiles
=
true
;
}
else
{
this
.
$Message
.
error
(
"暂没上传附件"
);
}
},
l
(
key
)
{
key
=
"project_plan_record"
+
"."
+
key
;
return
this
.
$t
(
key
)
...
...
@@ -72,7 +82,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
if
(
v
!=
''
&&
v
!=
null
)
{
this
.
load
(
v
);
}
}
...
...
pages/project/record/edit.vue
View file @
a744d2d4
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('projectId')"
prop=
"projectId"
>
<Input
v-model=
"entity.projectId"
>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('planId')"
prop=
"planId"
>
<Input
v-model=
"entity.planId"
>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('workHour')"
prop=
"workHour"
>
<InputNumber
v-model=
"entity.workHour"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"mes.project_plan_record.Status"
v-model=
"entity.status"
></Dictionary>
<InputNumber
v-model=
"entity.workHour"
:min=
"0"
></InputNumber>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('note')"
prop=
"note"
>
<Input
v-model=
"entity.note"
>
</Input>
<Col
:span=
"24"
>
<FormItem
:label=
"l('note')"
prop=
"note"
>
<i-quill
v-model=
"entity.note"
:height=
"300"
v-paste=
"handleImg"
/></Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<Input
v-model=
"entity.attachment"
>
</Input>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('taskId')"
prop=
"taskId"
>
<InputNumber
v-model=
"entity.taskId"
></InputNumber>
<FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</Input>
</FormItem>
</Col>
</Row>
...
...
@@ -81,8 +31,12 @@
<
script
>
import
Api
from
'./api'
import
iQuill
from
'@/components/quill'
export
default
{
name
:
'Edit'
,
components
:
{
iQuill
},
data
()
{
return
{
disabled
:
false
,
...
...
@@ -93,14 +47,20 @@ export default {
message
:
'必填'
,
trigger
:
'blur'
}]
}
},
parms
:
{
app
:
"taskRecord"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
}
},
props
:
{
eid
:
Number
eid
:
String
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
!=
""
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
}
},
...
...
@@ -110,12 +70,23 @@ export default {
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
if
(
r
.
result
.
attachment
&&
r
.
result
.
attachment
!=
""
)
{
this
.
parms
.
eid
=
r
.
result
.
attachment
;
}
else
{
this
.
parms
.
eid
=
this
.
$u
.
guid
();
}
this
.
entity
.
attachment
=
this
.
parms
.
eid
;
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
attachment
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
attachment
=
""
;
}
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
...
...
@@ -132,6 +103,27 @@ export default {
}
})
},
handleImg
(
e
)
{
console
.
warn
(
e
)
let
file
=
null
if
(
e
.
clipboardData
&&
e
.
clipboardData
.
items
[
0
]
&&
e
.
clipboardData
.
items
[
0
].
type
&&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
'image'
)
>
-
1
)
{
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
()
let
reader
=
new
FileReader
()
reader
.
readAsDataURL
(
file
)
setTimeout
(()
=>
{
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
this
.
entity
.
note
+=
img
},
1000
)
// new R
}
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
...
...
@@ -142,7 +134,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
''
&&
v
!=
null
)
{
this
.
load
(
v
);
}
}
...
...
pages/project/record/index.vue
View file @
a744d2d4
...
...
@@ -16,6 +16,9 @@
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<Modal
v-model=
"modalFiles"
title=
"查看附件"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<FilesView
ref=
"refFile"
:parms=
"parms"
/>
</Modal>
</div>
</template>
...
...
@@ -45,6 +48,13 @@ export default {
}
},
modal
:
false
,
modalFiles
:
false
,
parms
:
{
app
:
"taskRecord"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
...
...
@@ -89,29 +99,38 @@ export default {
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
oprate
:
'detail'
,
icon
:
"md-eye"
,
type
:
"icon"
,
title
:
"查看"
,
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
}
}
,
'查看'
),
}),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
icon
:
"md-create"
,
type
:
"icon"
,
oprate
:
"edit"
,
title
:
"编辑"
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
}
,
'编辑'
),
}),
h
(
'op'
,
{
attrs
:
{
oprate
:
'delete'
icon
:
"md-trash"
,
type
:
"icon"
,
title
:
"删除"
,
oprate
:
'delete'
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
}
,
'删除'
)
})
])
}
},
...
...
@@ -191,7 +210,7 @@ export default {
viewFiles
(
row
)
{
if
(
row
.
attachment
)
{
this
.
parms
.
eid
=
row
.
attachment
;
this
.
modal
1
=
true
;
this
.
modal
Files
=
true
;
}
else
{
this
.
$Message
.
error
(
"暂没上传附件"
);
}
...
...
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