mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
perf: 优化导出统计
This commit is contained in:
parent
3e149ed3c2
commit
945e8607b6
@ -15,7 +15,7 @@
|
|||||||
format="yyyy/MM/dd"
|
format="yyyy/MM/dd"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:placeholder="$L('请选择签到日期')"/>
|
:placeholder="$L('请选择签到日期')"/>
|
||||||
<div class="form-tip page-setting-checkin-export-common">
|
<div class="form-tip checkin-export-quick-select">
|
||||||
{{$L('快捷选择')}}:
|
{{$L('快捷选择')}}:
|
||||||
<em @click="formData.date=dateShortcuts('prev')">{{$L('上个月')}}</em>
|
<em @click="formData.date=dateShortcuts('prev')">{{$L('上个月')}}</em>
|
||||||
<em @click="formData.date=dateShortcuts('this')">{{$L('这个月')}}</em>
|
<em @click="formData.date=dateShortcuts('this')">{{$L('这个月')}}</em>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
format="HH:mm"
|
format="HH:mm"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:placeholder="$L('请选择班次时间')"/>
|
:placeholder="$L('请选择班次时间')"/>
|
||||||
<div class="form-tip page-setting-checkin-export-common">
|
<div class="form-tip checkin-export-quick-select">
|
||||||
{{$L('快捷选择')}}:
|
{{$L('快捷选择')}}:
|
||||||
<em @click="formData.time=['8:30', '18:00']">8:30-18:00</em>
|
<em @click="formData.time=['8:30', '18:00']">8:30-18:00</em>
|
||||||
<em @click="formData.time=['9:00', '18:00']">9:00-18:00</em>
|
<em @click="formData.time=['9:00', '18:00']">9:00-18:00</em>
|
||||||
@ -43,6 +43,21 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.checkin-export-quick-select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> em {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #2b85e4;
|
||||||
|
margin-left: 8px;
|
||||||
|
font-style: normal;
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import UserInput from "../../../components/UserInput";
|
import UserInput from "../../../components/UserInput";
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
<Form ref="exportTask" :model="formData" label-width="auto" @submit.native.prevent>
|
<Form ref="exportTask" :model="formData" label-width="auto" @submit.native.prevent>
|
||||||
<FormItem :label="$L('导出成员')">
|
<FormItem :label="$L('导出成员')">
|
||||||
<UserInput v-model="formData.userid" :multiple-max="20" :placeholder="$L('请选择成员')"/>
|
<UserInput v-model="formData.userid" :multiple-max="20" :placeholder="$L('请选择成员')"/>
|
||||||
|
<div class="form-tip">{{$L('每次最多选择导出20个成员')}}</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem :label="$L('时间范围')">
|
<FormItem :label="$L('时间范围')">
|
||||||
<DatePicker
|
<DatePicker
|
||||||
@ -14,6 +15,11 @@
|
|||||||
format="yyyy/MM/dd"
|
format="yyyy/MM/dd"
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:placeholder="$L('请选择时间')"/>
|
:placeholder="$L('请选择时间')"/>
|
||||||
|
<div class="form-tip checkin-export-quick-select">
|
||||||
|
{{$L('快捷选择')}}:
|
||||||
|
<em @click="formData.time=dateShortcuts('prev')">{{$L('上个月')}}</em>
|
||||||
|
<em @click="formData.time=dateShortcuts('this')">{{$L('这个月')}}</em>
|
||||||
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem prop="type" :label="$L('导出时间类型')">
|
<FormItem prop="type" :label="$L('导出时间类型')">
|
||||||
<RadioGroup v-model="formData.type">
|
<RadioGroup v-model="formData.type">
|
||||||
@ -29,6 +35,21 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.checkin-export-quick-select {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> em {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #2b85e4;
|
||||||
|
margin-left: 8px;
|
||||||
|
font-style: normal;
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import UserInput from "../../../components/UserInput";
|
import UserInput from "../../../components/UserInput";
|
||||||
export default {
|
export default {
|
||||||
@ -62,6 +83,17 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
dateShortcuts(act) {
|
||||||
|
const lastSecond = (e) => {
|
||||||
|
return $A.Date($A.formatDate("Y-m-d 23:59:29", Math.round(e / 1000)))
|
||||||
|
};
|
||||||
|
if (act === 'prev') {
|
||||||
|
return [$A.getData('上个月', true), lastSecond($A.getData('上个月结束', true))];
|
||||||
|
} else if (act === 'this') {
|
||||||
|
return [$A.getData('本月', true), lastSecond($A.getData('本月结束', true))]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
onExport() {
|
onExport() {
|
||||||
if (this.loadIng > 0) {
|
if (this.loadIng > 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
14
resources/assets/sass/pages/page-setting.scss
vendored
14
resources/assets/sass/pages/page-setting.scss
vendored
@ -307,20 +307,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-setting-checkin-export-common {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
> em {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #2b85e4;
|
|
||||||
margin-left: 8px;
|
|
||||||
font-style: normal;
|
|
||||||
&:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.page-setting {
|
.page-setting {
|
||||||
.setting-head {
|
.setting-head {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user