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
9971fe60
Commit
9971fe60
authored
Nov 05, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workHourManage/index detail...
parent
d0db7270
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
257 additions
and
0 deletions
+257
-0
api.js
pages/produce/workHourManage/api.js
+10
-0
detail.vue
pages/produce/workHourManage/detail.vue
+85
-0
index.vue
pages/produce/workHourManage/index.vue
+162
-0
No files found.
pages/produce/workHourManage/api.js
0 → 100644
View file @
9971fe60
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
systemUrl
}
/importcenter/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
systemUrl
}
/importcenter/paged`
,
params
);
},
get
(
params
)
{
return
Api
.
get
(
`
${
systemUrl
}
/importcenter/get`
,
params
);
}
}
pages/produce/workHourManage/detail.vue
0 → 100644
View file @
9971fe60
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('name')"
>
{{
entity
.
name
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('file')"
>
<a
@
click=
"downFile(entity.path)"
>
{{
entity
.
file
}}
</a>
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
<state
code=
"improt.im.status"
:value=
"entity.status"
type=
"text"
></state>
</Filed>
<Filed
:span=
"24"
:name=
"l('remark')"
>
{{
entity
.
remark
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
<User
:value=
"entity.creatorUserId"
></User>
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
entity
:
{},
downUrl
:
fileUrlDown
,
fileUrlPath
:
""
,
};
},
props
:
{
eid
:
Number
,
row
:
{}
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
,
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
downFile
(
path
)
{
//alert(path)
let
truePath
=
path
;
if
(
truePath
.
length
>
2
)
{
if
(
truePath
.
substring
(
0
,
7
).
toLowerCase
()
==
"http://"
||
truePath
.
substring
(
0
,
8
).
toLowerCase
()
==
"https://"
)
{
window
.
open
(
truePath
,
"_blank"
);
}
else
{
this
.
fileUrlPath
=
this
.
downUrl
+
path
;
window
.
open
(
this
.
fileUrlPath
,
"_blank"
);
}
}
},
l
(
key
)
{
key
=
"import_center"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
row
(
v
)
{
if
(
v
!=
null
&&
v
!=
{})
{
this
.
load
(
v
);
}
},
},
};
</
script
>
pages/produce/workHourManage/index.vue
0 → 100644
View file @
9971fe60
<
template
>
<div
class=
"h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<Input
placeholder=
"请输入员工姓名或员工编号"
v-width=
"260"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
:fullscreen=
"full"
:footer-hide=
"initBtn"
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"index"
,
head
:
{
title
:
"工时统计"
,
author
:
"henq"
,
description
:
"import_center 8/20/2020 3:45:58 PM"
,
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"name,file"
,
value
:
null
},
},
modal
:
false
,
full
:
false
,
initBtn
:
true
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
columns
:
[{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
},
{
key
:
"name"
,
title
:
this
.
l
(
"name"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"file"
,
title
:
this
.
l
(
"file"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"center"
,
width
:
"180"
,
high
:
true
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
align
:
"left"
,
high
:
true
,
type
:
"user"
,
width
:
"180"
,
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
),
align
:
"center"
,
high
:
true
,
code
:
"improt.im.status"
,
width
:
"150"
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
},
},
"详情"
),
]);
},
},
],
};
},
mounted
()
{
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
full
=
false
;
this
.
initBtn
=
false
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
let
vkey
=
"import_center"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
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