downClockDialog.vue
3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!-- 下载对账单 -->
<template>
<d2-dialog title="绩效统计导出" :is-visible="clockVisible" class="accountDailog" width="688px" btn-ok-label="下载" @closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<el-form ref="accountForm" :model="searchForm" :rules="formRules" label-width="120px">
<el-form-item label="绩效月份:" prop="appealMonth">
<el-date-picker
v-model="searchForm.appealMonth"
type="month"
placeholder="请选择生效月份"
size="small"
:clearable="false"
value-format="yyyy-MM"
>
</el-date-picker>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import {
Util
} from "@/common/util"
import {
rangePickerOptions
} from '@/common/constants.js'
import dayjs from 'dayjs'
import { deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
export default {
name: 'DownClcokDialog',
data() {
return {
searchForm: {
appealMonth: dayjs().subtract(1, "month").format("YYYY-MM")
},
formRules: {
appealMonth: [{ required: true, message: '请选择生效月份', trigger: 'change' }]
}
}
},
props: {
clockVisible: {
type: Boolean,
default: false
}
},
watch: {
},
created() {
},
components: {},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
handleAddConfirm() {
this.$refs.accountForm.validate(valid => {
if (valid) {
this.dowloadApi()
}
})
},
getParams(){
let params = deepClone(this.searchForm)
if (params.appealMonth.length) {
params.appealMonthStart = Util.dateFormate( params.appealMonth, "YYYY-MM")
params.appealMonthEnd = Util.dateFormate( params.appealMonth, "YYYY-MM")
}
delete params.appealMonth
return params
},
dowloadApi() {
var params = this.getParams()
params.evaluationMonth = params.appealMonthStart
params.moduleName = "STAFF"
params.pageNum = 1
params.method = "dj.staff.api.perf.rule.export"
delete params.appealMonthStart
const list = [
...this.dowloadList,
{
name: "考勤/工资申诉列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
this.handleClose()
},
handleClose() {
this.$emit('clcokClose', true)
}
}
}
</script>
<style lang="scss" scoped>
.dateItem {
display: flex;
}
::v-deep .dateItem .el-form-item__content {
display: flex;
margin-left: 0 !important;
}
::v-deep .accountDailog {
/*下拉选择框-多选-内容过长-用...代替 begin */
.el-tag.el-tag--info {
background-color: #f4f4f5;
border-color: #e9e9eb;
color: #909399;
max-width: calc(100% - 50px);
/* white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;*/
}
.el-tag.el-tag--info {
width: calc(100% - 200px);
}
.el-tag.el-tag--info .el-select__tags-text {
width: calc(100% - 20px);
float: left;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
/*下拉选择框-多选-内容过长-用...代替 end */
.accountDailog .el-dialog {
min-width: 700px;
}
.accountDailog .el-select-dropdown__item {
width: 395px !important;
}
}
.tmpl-box {
display: flex;
}
.fields-txt {
width: 305px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-right: 8px;
}
</style>