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
2e121744
Commit
2e121744
authored
Oct 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'portal' of git.mes123.com:zhouyx/mes-ui into portal
parents
0099d2fb
65b2e67c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
309 additions
and
263 deletions
+309
-263
index.vue
pages/basicData/calendar/overtime/index.vue
+153
-134
add.vue
pages/basicData/calendar/work/add.vue
+2
-0
index.vue
pages/basicData/calendar/work/index.vue
+154
-129
No files found.
pages/basicData/calendar/overtime/index.vue
View file @
2e121744
...
@@ -154,17 +154,36 @@ export default {
...
@@ -154,17 +154,36 @@ export default {
]
]
}
}
},
},
created
()
{
//获取公休日数组
this
.
getWeekTypeListFn
()
getweekList
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
let
parmse
=
{
conditions
:
[],
isDesc
:
true
,
pageSize
:
10
}
Api
.
getWeekTypeList
(
parmse
).
then
((
res
)
=>
{
console
.
log
(
res
.
result
)
this
.
weekTypeList
=
res
.
result
})
},
},
mounted
()
{
//设置公休日
window
.
onresize
=
()
=>
{
radioChange
(
a
)
{
///浏览器窗口大小变化
console
.
log
(
a
)
return
(()
=>
{
let
datArray
=
this
.
weekTypeList
window
.
screenHeight
=
window
.
innerHeight
datArray
.
map
(
u
=>
{
this
.
tableHeight
=
window
.
screenHeight
-
230
if
(
a
==
u
.
weekendTypeName
)
{
})()
this
.
weekTypeid
=
u
.
id
}
})
let
id
=
this
.
weekTypeid
Api
.
setweek
({
id
:
id
}).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
weekFlag
=
true
}
else
{
this
.
weekFlag
=
false
console
.
log
(
'设置失败'
)
}
}
},
},
async
fetch
({
async
fetch
({
...
@@ -299,7 +318,7 @@ export default {
...
@@ -299,7 +318,7 @@ export default {
return
this
.
$t
(
vkey
)
||
key
return
this
.
$t
(
vkey
)
||
key
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
...
...
pages/basicData/calendar/work/add.vue
View file @
2e121744
...
@@ -149,7 +149,9 @@ export default {
...
@@ -149,7 +149,9 @@ export default {
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
console
.
log
(
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
selectAry
();
},
},
},
},
};
};
...
...
pages/basicData/calendar/work/index.vue
View file @
2e121744
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<div
class=
"footer02"
v-if=
"footerModel"
>
<div
class=
"footer02"
v-if=
"footerModel"
>
<span
class=
"span"
>
<span
class=
"span"
>
已选择
已选择
<b
class=
"span02"
>
{{
selectedRows.length
}}
</b>
项
<b
class=
"span02"
>
{{
selectedRows.length
}}
</b>
项
</span>
</span>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Button
@
click=
"deleteMore"
class=
"span ml20"
>
<Icon
type=
"md-close"
/>
批量删除
<Icon
type=
"md-close"
/>
批量删除
...
@@ -37,141 +37,166 @@
...
@@ -37,141 +37,166 @@
<p>
确定删除?
</p>
<p>
确定删除?
</p>
</Modal>
</Modal>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<Modal
v-model=
"deletelMore"
title=
"批量删除"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<p>
确定删除这{{
selectedRows.length
}}项么?
</p>
<p>
确定删除这{{
selectedRows.length
}}项么?
</p>
</Modal>
</Modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
import
Add
from
'./add'
import
Add
from
"./add"
;
import
Edit
from
'./edit'
import
Edit
from
"./edit"
;
import
Detail
from
'./detail'
import
Detail
from
"./detail"
;
import
Search
from
'./search'
import
Search
from
"./search"
;
export
default
{
export
default
{
name
:
'list'
,
name
:
"list"
,
components
:
{
components
:
{
Add
,
Add
,
Edit
,
Edit
,
Detail
,
Detail
,
Search
Search
,
},
},
data
()
{
data
()
{
return
{
return
{
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:
{
keys
:
{
op
:
'title,calendarClassTitle'
,
op
:
"title,calendarClassTitle"
,
value
:
null
value
:
null
}
}
,
},
},
addModal
:
false
,
addModal
:
false
,
editModal
:
false
,
editModal
:
false
,
deletelModal
:
false
,
deletelModal
:
false
,
selectedRows
:
[],
//表格选中项
selectedRows
:
[],
//表格选中项
tableHeight
:
''
,
tableHeight
:
""
,
footerModel
:
false
,
footerModel
:
false
,
deletelMore
:
false
,
deletelMore
:
false
,
curId
:
0
,
curId
:
0
,
columns
:
[
columns
:
[
// { type: 'selection', width: 70, align: 'center'},
// { type: 'selection', width: 70, align: 'center'},
{
{
key
:
'calId'
,
key
:
"id"
,
title
:
this
.
l
(
'calId'
),
title
:
this
.
l
(
"id"
),
hide
:
true
,
align
:
"left"
},
{
key
:
"calId"
,
title
:
this
.
l
(
"calId"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'calName'
,
key
:
"calName"
,
title
:
this
.
l
(
'calName'
),
title
:
this
.
l
(
"calName"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'shiftName'
,
key
:
"shiftName"
,
title
:
this
.
l
(
'shiftName'
),
title
:
this
.
l
(
"shiftName"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'mesShiftWorkSchedIds'
,
key
:
"mesShiftWorkSchedIds"
,
title
:
this
.
l
(
'mesShiftWorkSchedIds'
),
title
:
this
.
l
(
"mesShiftWorkSchedIds"
),
hide
:
true
,
hide
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'workingLong'
,
key
:
"workingLong"
,
title
:
this
.
l
(
'workingLong'
),
title
:
this
.
l
(
"workingLong"
),
high
:
true
,
high
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'creationTime'
,
key
:
"creationTime"
,
title
:
this
.
l
(
'creationTime'
),
title
:
this
.
l
(
"creationTime"
),
hide
:
true
,
hide
:
true
,
align
:
'left'
align
:
"left"
,
},
},
{
{
key
:
'creatorUserId'
,
key
:
"creatorUserId"
,
title
:
this
.
l
(
'creatorUserId'
),
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
hide
:
true
,
align
:
'left'
,
align
:
"left"
,
type
:
'user'
},
},
{
{
title
:
'操作'
,
title
:
"操作"
,
key
:
'id'
,
key
:
"id"
,
width
:
140
,
width
:
140
,
align
:
'center'
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
return
h
(
"div"
,
{
class
:
'action'
class
:
"action"
},
[
},
[
h
(
h
(
'op'
,
{
"op"
,
{
attrs
:
{
attrs
:
{
oprate
:
'edit'
oprate
:
"edit"
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
},
'编辑'
},
"编辑"
),
),
h
(
h
(
'op'
,
{
"op"
,
{
attrs
:
{
attrs
:
{
oprate
:
'remove'
oprate
:
"remove"
},
},
on
:
{
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
},
'删除'
},
)
"删除"
])
),
}
]);
}
},
]
},
}
],
};
},
},
created
()
{
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
230
this
.
tableHeight
=
window
.
innerHeight
-
230
;
// this.$refs.addModal.entity = {}
},
},
mounted
()
{
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tableHeight
=
window
.
screenHeight
-
230
this
.
tableHeight
=
window
.
screenHeight
-
230
;
})()
})()
;
}
}
;
},
},
async
fetch
({
async
fetch
({
store
,
store
,
params
params
})
{
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
addOk
()
{
this
.
$refs
.
grid
.
load
();
this
.
addModal
=
false
;
this
.
$refs
.
addModal
.
entity
=
{};
this
.
editModal
=
false
;
this
.
curId
=
0
;
},
addFn
()
{
this
.
addModal
=
true
;
this
.
$refs
.
addmodal
.
entity
=
{};
this
.
$refs
.
addModal
.
selectAry
();
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
edit
(
id
)
{
this
.
editModal
=
true
;
this
.
curId
=
id
;
},
},
methods
:
{
methods
:
{
addOk
()
{
addOk
()
{
...
@@ -194,39 +219,39 @@ export default {
...
@@ -194,39 +219,39 @@ export default {
},
},
remove
(
id
)
{
remove
(
id
)
{
this
.
deletelModal
=
true
this
.
deletelModal
=
true
;
this
.
curId
=
id
this
.
curId
=
id
;
},
},
removeOk
()
{
removeOk
()
{
Api
.
delete
({
Api
.
delete
({
id
:
this
.
curId
id
:
this
.
curId
}).
then
((
r
)
=>
{
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
()
this
.
$refs
.
grid
.
load
();
this
.
deletelModal
=
false
this
.
deletelModal
=
false
;
this
.
$Message
.
success
(
'删除成功'
)
this
.
$Message
.
success
(
"删除成功"
);
}
}
})
});
},
},
removeCancel
()
{
removeCancel
()
{
this
.
deletelModal
=
false
this
.
deletelModal
=
false
;
},
},
cancel
()
{
cancel
()
{
this
.
curId
=
0
this
.
curId
=
0
;
this
.
addModal
=
false
this
.
addModal
=
false
;
this
.
$refs
.
addModal
.
entity
=
{}
this
.
$refs
.
addModal
.
entity
=
{};
this
.
detailModal
=
false
this
.
detailModal
=
false
;
this
.
editModal
=
false
this
.
editModal
=
false
;
this
.
deletedlModal
=
false
this
.
deletedlModal
=
false
;
this
.
deletelMore
=
false
this
.
deletelMore
=
false
;
},
},
//多选处理--表格选择项变化方法
//多选处理--表格选择项变化方法
selectionChange
(
selection
)
{
selectionChange
(
selection
)
{
this
.
selectedRows
=
selection
this
.
selectedRows
=
selection
;
this
.
footerModel
=
selection
.
length
>
0
this
.
footerModel
=
selection
.
length
>
0
;
},
},
deleteMore
()
{
deleteMore
()
{
this
.
deletelMore
=
true
this
.
deletelMore
=
true
;
},
},
l
(
key
)
{
l
(
key
)
{
/*
/*
...
@@ -247,11 +272,11 @@ export default {
...
@@ -247,11 +272,11 @@ export default {
workHours:'工作时长',
workHours:'工作时长',
}
}
*/
*/
let
vkey
=
'calendar_work'
+
'.'
+
key
let
vkey
=
"calendar_work"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
return
this
.
$t
(
vkey
)
||
key
;
}
},
}
},
}
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
...
...
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