提交 cc29572f 编写于 作者: 钟一霄's avatar 钟一霄

签到列表、值班安排页面更新:默认查询当月数据、每页查询条数更新。20231130

上级 5b2ca756
......@@ -41,7 +41,7 @@
<div style="display: flex; justify-content: center;align-items: center">
<span>值班日期:&nbsp;</span>
<DatePicker type="daterange" @on-change="dutyDateSelect" placeholder="请选择值班日期"
<DatePicker v-model="dutyDateX" type="daterange" @on-change="dutyDateSelect" placeholder="请选择值班日期"
style="width: 10vw"/>
</div>
</Col>
......@@ -93,6 +93,7 @@
<Table
:columns="columns"
:data="data"
:height="tableHeightCal"
@on-select="onSelect"
@on-select-cancel="onSelectCancel"
@on-select-all="onSelectAll"
......@@ -512,10 +513,18 @@
exportModalShow: false,
// 模板导出选择年月
tempYearMonth: '',
// 默认查询条件值班日期
dutyDateX: [],
};
},
//监听属性 类似于data概念",
computed: {
// table高度计算
tableHeightCal() {
return document.documentElement.clientHeight - 360
},
util() {
return util
}
......@@ -959,6 +968,16 @@
//生命周期 - 挂载完成(可以访问DOM元素)",html模板已渲染
mounted() {
// 默认查询当前月条件初始化
let nowDate = new Date()
let startTime = dayjs(nowDate).format('YYYY-MM-') + dayjs(nowDate).startOf('month').format('DD')
let endTime = dayjs(nowDate).format('YYYY-MM-') + dayjs(nowDate).endOf('month').format('DD')
this.cityListAllObject.startTimeFlag = startTime
this.cityListAllObject.endtTimeFlag = endTime
this.cityListAlltSearchFlagObject.startTimeSearch = startTime
this.cityListAlltSearchFlagObject.endTimeSearch = endTime
this.dutyDateX = [new Date(startTime), new Date(endTime)]
this.addDutySearchSelectList()
this.getWatchList() // 初始化值班列表
this.getSearchSelectList() // 初始化搜索select
......
......@@ -40,7 +40,7 @@
<div style="display: flex; justify-content: center;align-items: center">
<span>值班日期:&nbsp;</span>
<DatePicker type="daterange" @on-change="signDateSelect" placeholder="请选择值班日期"
<DatePicker v-model="dutyDateX" type="daterange" @on-change="signDateSelect" placeholder="请选择值班日期"
style="width: 10vw"/>
</div>
</Col>
......@@ -83,7 +83,7 @@
</ButtonGroup>
</template>
<Table :columns="column" :data="data" :loading="loading" @on-select="radioSelection"
<Table :columns="column" :data="data" :height="tableHeightCal" :loading="loading" @on-select="radioSelection"
@on-select-cancel="cancelSelection"
@on-select-all="allSelection" @on-select-all-cancel="cancelSelectionAll">
<template #sign_set="{row}">
......@@ -134,6 +134,7 @@
show-elevator
:total="total"
:page-size="page_size"
:page-size-opts="[100, 200, 500, 1000]"
model-value="page_index"
@on-change="currentPage"
@on-page-size-change="currentPageCount"
......@@ -193,6 +194,7 @@
//例如:import 《组件名称》 from '《组件路径》';
import * as api from '../../api/lezRequest'
import error from "@/plugins/error";
import dayjs from 'dayjs'
export default {
//import引入的组件需要注入到对象中才能使用",
......@@ -263,7 +265,7 @@
},
page_index: 1,
page_size: 10,
page_size: 100,
total: 0,
column: [
{
......@@ -313,10 +315,18 @@
}
],
data: [],
// 默认查询条件值班日期
dutyDateX: [],
};
},
//监听属性 类似于data概念",
computed: {},
computed: {
// table高度计算
tableHeightCal() {
return document.documentElement.clientHeight - 360
},
},
//监控data中的数据变化",
watch: {
// signArray(newValue ,oldValue){
......@@ -427,7 +437,7 @@
signDataInputDateSelect(e) {
this.signyDataInputObject.watch_date = e[0] + '-' + e[1]
this.signyDataInputObject.startTime = e[0]
this.signyDataInputObject.startTime = e[1]
this.signyDataInputObject.endTime = e[1]
console.log("🚀🚀🚀,")
},
signCancel() {
......@@ -623,6 +633,18 @@
//生命周期 - 挂载完成(可以访问DOM元素)",html模板已渲染
mounted() {
// 默认查询当前月条件初始化
let nowDate = new Date()
let startTime = dayjs(nowDate).format('YYYY-MM-') + dayjs(nowDate).startOf('month').format('DD')
let endTime = dayjs(nowDate).format('YYYY-MM-') + dayjs(nowDate).endOf('month').format('DD')
this.signyDataInputObject.startTime = startTime
this.signyDataInputObject.endTime = endTime
this.selectObject.startTimeSearch = startTime
this.selectObject.endTimeSearch = endTime
this.selectObject.startTime = startTime
this.selectObject.endTime = endTime
this.dutyDateX = [new Date(startTime), new Date(endTime)]
this.GetSignRecordList() // 初始化
this.addDutySearchSelectList() // 获取四个select
this.addDutySearchSelectList1() // 获取四个select
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或