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
cac7d2ee
Commit
cac7d2ee
authored
Oct 28, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
record
parent
7ff949c1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
87 deletions
+66
-87
zh-CN.js
i18n/locale/zh-CN.js
+1
-1
add.vue
pages/project/record/add.vue
+0
-1
detail.vue
pages/project/record/detail.vue
+7
-17
edit.vue
pages/project/record/edit.vue
+32
-61
index.vue
pages/project/record/index.vue
+26
-7
No files found.
i18n/locale/zh-CN.js
View file @
cac7d2ee
...
...
@@ -1876,7 +1876,7 @@ export default {
deleterUserId
:
'删除人'
,
projectId
:
'项目id'
,
planId
:
'计划id'
,
workHour
:
'工
作时间
'
,
workHour
:
'工
时
'
,
status
:
'状态'
,
title
:
'标题'
,
note
:
'备注'
,
...
...
pages/project/record/add.vue
View file @
cac7d2ee
<
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 @
cac7d2ee
<
template
>
<div
class=
"detail"
>
<Row>
<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>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
></User>
</Filed>
</Row>
</div>
...
...
@@ -46,10 +36,10 @@ export default {
}
},
props
:
{
eid
:
Number
eid
:
String
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
!=
''
&&
this
.
eid
!=
null
)
{
this
.
load
(
this
.
eid
);
}
},
...
...
@@ -72,7 +62,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
if
(
v
!=
''
&&
v
!=
null
)
{
this
.
load
(
v
);
}
}
...
...
pages/project/record/edit.vue
View file @
cac7d2ee
<
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
)
{
...
...
@@ -142,7 +113,7 @@ export default {
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
''
&&
v
!=
null
)
{
this
.
load
(
v
);
}
}
...
...
pages/project/record/index.vue
View file @
cac7d2ee
...
...
@@ -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