Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录
切换导航
日
日程管理
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
刘英杰
日程管理
提交
c3fbdad6
提交
c3fbdad6
编写于
10月 27, 2024
作者:
刘英杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V20240923 保存
上级
0fdfbe21
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
41 行增加
和
35 行删除
+41
-35
index.vue
src/pages/arrangement/index.vue
+41
-35
未找到文件。
src/pages/arrangement/index.vue
浏览文件 @
c3fbdad6
...
...
@@ -5,13 +5,12 @@
<Spin
v-if=
"loading"
fix
></Spin>
<!-- 表标题 -->
<div
class=
"table-heard"
>
<div
>
<div>
<Tag
size=
'large'
>
{{
this
.
currentWeekRange
[
0
]
+
'
至
'
+
this
.
currentWeekRange
[
1
]
}}
</Tag>
</div>
<div
class=
"center"
>
<Button
size=
"default"
@
click=
"weekPre"
>
<Icon
type=
"ios-arrow-back"
/>
...
...
@@ -27,9 +26,11 @@
</div>
</div>
<div
style=
"width: 100%;display: flex;"
>
<Button
style=
"margin:0 5px 0 0;"
icon=
"ios-download-outline"
@
click=
"importDuty.show = true"
>
导出值班日志
</Button>
<Button
style=
"margin:0 5px;"
icon=
"ios-download-outline"
@
click=
"importDutySheet.show = true"
>
导出值班表
</Button>
<Upload
style=
"margin:0 5px;"
action=
"#"
:before-upload=
"uploadFile"
>
<Button
icon=
"ios-download-outline"
style=
"margin:0 5px 0 0;"
@
click=
"importDuty.show = true"
>
导出值班日志
</Button>
<Button
icon=
"ios-download-outline"
style=
"margin:0 5px;"
@
click=
"importDutySheet.show = true"
>
导出值班表
</Button>
<Upload
:before-upload=
"uploadFile"
action=
"#"
style=
"margin:0 5px;"
>
<Button
icon=
"ios-cloud-upload-outline"
>
导入值班表
</Button>
</Upload>
</div>
...
...
@@ -66,7 +67,7 @@
</tr>
</table>
</Card>
<!-- 值班安排 -->
<!-- 值班安排 -->
<Modal
v-model=
"showModal"
:loading=
'modalLoading'
class=
"add-modal"
title=
"值班安排"
width=
"50%"
@
on-ok=
"handleConfirm"
@
on-cancel=
'handleClose'
>
<Form
ref=
"form"
:label-width=
"150"
:model=
"formData"
:rules=
"formRule"
>
...
...
@@ -113,14 +114,16 @@
</p>
</
template
>
<div
style=
"text-align:center"
>
<Form
:label-width=
"80"
>
<Form
:label-width=
"80"
>
<FormItem
label=
"值班日期"
prop=
"user"
>
<DatePicker
v-model=
"importDuty.date"
style=
"width: 100%"
type=
"daterange"
placement=
"bottom-end"
placeholder=
"请选择值班日期"
/>
<DatePicker
v-model=
"importDuty.date"
placeholder=
"请选择值班日期"
placement=
"bottom-end"
style=
"width: 100%"
type=
"daterange"
/>
</FormItem>
</Form>
</div>
<
template
#footer
>
<Button
type=
"primary"
size=
"large"
:loading=
"importDuty.loading"
long
@
click=
"importDutyFun"
>
导出值班日志
</Button>
<Button
:loading=
"importDuty.loading"
long
size=
"large"
type=
"primary"
@
click=
"importDutyFun"
>
导出值班日志
</Button>
</
template
>
</Modal>
...
...
@@ -134,14 +137,17 @@
</p>
</
template
>
<div
style=
"text-align:center"
>
<Form
:label-width=
"80"
>
<Form
:label-width=
"80"
>
<FormItem
label=
"值班日期"
prop=
"user"
>
<DatePicker
v-model=
"importDutySheet.date"
style=
"width: 100%"
type=
"daterange"
placement=
"bottom-end"
placeholder=
"请选择值班日期"
/>
<DatePicker
v-model=
"importDutySheet.date"
placeholder=
"请选择值班日期"
placement=
"bottom-end"
style=
"width: 100%"
type=
"daterange"
/>
</FormItem>
</Form>
</div>
<
template
#footer
>
<Button
type=
"primary"
size=
"large"
:loading=
"importDutySheet.loading"
long
@
click=
"importDutySheetFun"
>
导出值班表
</Button>
<Button
:loading=
"importDutySheet.loading"
long
size=
"large"
type=
"primary"
@
click=
"importDutySheetFun"
>
导出值班表
</Button>
</
template
>
</Modal>
</div>
...
...
@@ -153,23 +159,24 @@ import * as hooks from '@/hook/index'
import
*
as
api
from
'
@/api/controller/index
'
import
dayjs
from
"
dayjs
"
;
import
{
blobFileDown
}
from
"
@/hook/index
"
;
export
default
{
props
:
{},
data
()
{
return
{
importDutySheet
:
{
loading
:
false
,
loading
:
false
,
show
:
false
,
date
:
[
dayjs
().
format
(
'
YYYY-MM-DD
'
),
dayjs
().
format
(
'
YYYY-MM-DD
'
)],
date
:
[
dayjs
().
format
(
'
YYYY-MM-DD
'
),
dayjs
().
format
(
'
YYYY-MM-DD
'
)],
formData
:
{
begin_time
:
''
,
end_time
:
''
}
},
importDuty
:
{
loading
:
false
,
loading
:
false
,
show
:
false
,
date
:
[
dayjs
().
format
(
'
YYYY-MM-DD
'
),
dayjs
().
format
(
'
YYYY-MM-DD
'
)],
date
:
[
dayjs
().
format
(
'
YYYY-MM-DD
'
),
dayjs
().
format
(
'
YYYY-MM-DD
'
)],
formData
:
{
begin_time
:
''
,
end_time
:
''
...
...
@@ -231,41 +238,41 @@ export default {
this
.
GetPersonByCondiction
();
},
methods
:
{
uploadFile
(
file
){
uploadFile
(
file
)
{
//值班表导入
let
fd
=
new
FormData
()
fd
.
append
(
'
file
'
,
file
)
return
api
.
postApiDutyRecordImportDutyTable
(
fd
).
then
(
res
=>
{
return
api
.
postApiDutyRecordImportDutyTable
(
fd
).
then
(
res
=>
{
this
.
$Message
.
success
(
'
导入成功
'
)
})
return
false
},
importDutySheetFun
(){
importDutySheetFun
()
{
//值班表导出
this
.
importDutySheet
.
loading
=
true
this
.
importDutySheet
.
loading
=
true
this
.
importDutySheet
.
formData
=
{
begin
:
dayjs
(
this
.
importDutySheet
.
date
[
0
]).
format
(
'
YYYY-MM-DD
'
),
end
:
dayjs
(
this
.
importDutySheet
.
date
[
1
]).
format
(
'
YYYY-MM-DD
'
),
}
return
api
.
getApiDutyRecordExportDutyTable
(
this
.
importDutySheet
.
formData
).
then
(
res
=>
{
if
(
res
)
window
.
location
.
href
=
res
this
.
importDutySheet
.
loading
=
false
}).
finally
(()
=>
{
this
.
importDutySheet
.
loading
=
false
return
api
.
getApiDutyRecordExportDutyTable
(
this
.
importDutySheet
.
formData
).
then
(
res
=>
{
if
(
res
)
window
.
location
.
href
=
res
this
.
importDutySheet
.
loading
=
false
}).
finally
(()
=>
{
this
.
importDutySheet
.
loading
=
false
})
},
importDutyFun
(){
importDutyFun
()
{
//值班附件导出
this
.
importDuty
.
loading
=
true
this
.
importDuty
.
loading
=
true
this
.
importDuty
.
formData
=
{
begin_time
:
dayjs
(
this
.
importDuty
.
date
[
0
]).
format
(
'
YYYY-MM-DD
'
),
end_time
:
dayjs
(
this
.
importDuty
.
date
[
1
]).
format
(
'
YYYY-MM-DD
'
),
}
return
api
.
getApiDutyRecordDutyRecordAllExportByAdmin
(
this
.
importDuty
.
formData
,
{
responseType
:
'
blob
'
}).
then
(
res
=>
{
hooks
.
blobFileDown
(
res
,
`
${
this
.
importDuty
.
formData
.
begin_time
+
'
至
'
+
this
.
importDuty
.
formData
.
end_time
}
值班数据`
)
this
.
importDuty
.
loading
=
false
}).
finally
(()
=>
{
this
.
importDuty
.
loading
=
false
return
api
.
getApiDutyRecordDutyRecordAllExportByAdmin
(
this
.
importDuty
.
formData
,
{
responseType
:
'
blob
'
}).
then
(
res
=>
{
hooks
.
blobFileDown
(
res
,
`
${
this
.
importDuty
.
formData
.
begin_time
+
'
至
'
+
this
.
importDuty
.
formData
.
end_time
}
值班数据`
)
this
.
importDuty
.
loading
=
false
}).
finally
(()
=>
{
this
.
importDuty
.
loading
=
false
})
},
getData
()
{
...
...
@@ -283,7 +290,6 @@ export default {
this
.
timeGround
.
push
({
id
:
item
.
duty_type_id
,
typeName
:
item
.
duty_type_name
});
});
})
},
formatDate
(
year
,
month
,
day
)
{
const
y
=
year
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录