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
9c532ada
Commit
9c532ada
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resourceMangement/productionResources
parent
7176f54e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
465 additions
and
433 deletions
+465
-433
index.vue
pages/resourceManagement/productionResources/index.vue
+319
-290
set.vue
pages/resourceManagement/productionResources/set.vue
+146
-143
No files found.
pages/resourceManagement/productionResources/index.vue
View file @
9c532ada
<
template
>
<div
class=
"resources-p h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
@
on-selection-change=
"onSelect"
>
<div
class=
"resources-p h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:high=
"false"
@
on-selection-change=
"onSelect"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
...
...
@@ -43,15 +37,16 @@
</
template
>
</DataGrid>
<Modal
v-model=
"editModal"
title=
"设置日历"
footer-hide
>
<Modal
v-model=
"editModal"
title=
"设置日历"
footer-hide
width=
"1000"
>
<Set
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"addOk"
/>
</Modal>
<Modal
v-model=
"deletelModal"
title=
"删除"
@
on-ok=
"removeOk"
@
on-cancel=
"cancel"
>
<p>
确定删除?
</p>
</Modal>
</div>
</div>
</template>
<
script
>
import
Api
from
"./api"
;
...
...
@@ -66,7 +61,10 @@ export default {
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title,code,type,departTitle"
,
value
:
null
},
keys
:
{
op
:
"title,code,type,departTitle"
,
value
:
null
},
},
entity
:
{
isimportant
:
"1"
,
...
...
@@ -77,11 +75,23 @@ export default {
deletelModal
:
false
,
curId
:
0
,
rules
:
{
isimportant
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
capabilityValue
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
isimportant
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
capabilityValue
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
columns
:
[{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
columns
:
[
{
key
:
"id"
,
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
type
:
"selection"
,
width
:
70
,
...
...
@@ -185,20 +195,29 @@ export default {
width
:
140
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
},
"设置"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"remove"
,
title
:
"删除"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
"op"
,
{
attrs
:
{
oprate
:
"remove"
,
title
:
"删除"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
},
"删除"
),
...
...
@@ -211,7 +230,10 @@ export default {
mounted
()
{
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
...
...
@@ -234,7 +256,9 @@ export default {
this
.
curId
=
id
;
},
removeOk
()
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
Api
.
delete
({
id
:
this
.
curId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
;
...
...
@@ -300,20 +324,25 @@ export default {
},
};
</
script
>
<
style
lang=
"less"
>
@import "../../../assets/css/custom.less";
.resources-p {
.form-row {
width: 600px;
margin-left: 50px;
.ivu-form-item-label {
color: @form-color;
}
}
.ivu-footer-toolbar-right {
width: 1100px;
position: relative !important;
}
.btn {
position: absolute !important;
top: 12px !important;
...
...
pages/resourceManagement/productionResources/set.vue
View file @
9c532ada
<
template
>
<Form
ref=
"form"
:model=
"formItem"
:rules=
"rules"
:label-width=
"9
0"
>
<Form
ref=
"form"
:model=
"formItem"
:rules=
"rules"
:label-width=
"11
0"
>
<Row>
<Col
span=
"12"
>
<FormItem
label=
"资源名称"
prop=
"equip_name"
>
...
...
@@ -13,19 +13,15 @@
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"工作日历"
prop=
"work"
>
<Select
v-model=
"formItem1.calendarwork_pk"
clearable
placeholder=
"请选择..."
>
<Select
v-model=
"formItem1.calendarwork_pk"
filterable
clearable
placeholder=
"请选择..."
>
<Option
v-for=
"item in workList"
:value=
"item.id"
:key=
"item.calName"
>
{{
item
.
calName
}}
</Option>
</Select>
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
label=
"加班日历"
prop=
"overtime"
>
<Select
v-model=
"formItem2.calendarovertime_pk"
clearable
placeholder=
"请选择..."
>
<Option
v-for=
"item in overtimeList"
:value=
"item.id"
:key=
"item.holidayCalName"
>
{{
item
.
holidayCalName
}}
</Option>
<Select
v-model=
"formItem2.calendarovertime_pk"
filterable
clearable
placeholder=
"请选择..."
>
<Option
v-for=
"item in overtimeList"
:value=
"item.id"
:key=
"item.holidayCalName"
>
{{
item
.
holidayCalName
}}
</Option>
</Select>
</FormItem>
</Col>
...
...
@@ -48,8 +44,9 @@
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
...
...
@@ -76,7 +73,11 @@ export default {
},
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
};
},
...
...
@@ -109,7 +110,9 @@ export default {
});
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
formItem
.
equip_name
=
r
.
result
.
title
;
this
.
formItem
.
equip_id
=
r
.
result
.
code
;
this
.
formItem
.
capabilityValue
=
r
.
result
.
capabilityValue
;
...
...
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