微调
This commit is contained in:
@@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref ,onMounted, defineProps, defineEmits } from 'vue';
|
import { ref ,onMounted, defineProps, defineEmits } from 'vue';
|
||||||
|
|
||||||
// 定义时间单位的类型
|
// 定义时间单位的类型
|
||||||
interface TimeUnit {
|
interface TimeUnit {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<ProTable
|
<ProTable
|
||||||
ref='proTable'
|
ref='proTable'
|
||||||
:columns='columns'
|
:columns='columns'
|
||||||
|
:init-param="initParam"
|
||||||
:request-api='getPqDevList'
|
:request-api='getPqDevList'
|
||||||
>
|
>
|
||||||
<!-- :requestApi="getRoleList" -->
|
<!-- :requestApi="getRoleList" -->
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
const includedUnits = ['日', '周', '月', '自定义']; // 可以根据需要包含的单位
|
const includedUnits = ['日', '周', '月', '自定义']; // 可以根据需要包含的单位
|
||||||
const excludedUnits = ['季度','年']; // 要排除的单位
|
const excludedUnits = ['季度','年']; // 要排除的单位
|
||||||
const defaultUnits = '日'; // 默认的单位
|
const defaultUnits = '日'; // 默认的单位
|
||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||||
{ type: 'selection', fixed: 'left', width: 70 },
|
{ type: 'selection', fixed: 'left', width: 70 },
|
||||||
@@ -100,6 +102,7 @@ const defaultUnits = '日'; // 默认的单位
|
|||||||
include={includedUnits}
|
include={includedUnits}
|
||||||
exclude={excludedUnits}
|
exclude={excludedUnits}
|
||||||
default={defaultUnits}
|
default={defaultUnits}
|
||||||
|
onUpdate-dates={handleDateChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@@ -109,6 +112,15 @@ const defaultUnits = '日'; // 默认的单位
|
|||||||
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
{ prop: 'operation', label: '操作', fixed: 'right', width: 200 },
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 处理日期变化的回调函数
|
||||||
|
const handleDateChange = (startDate: Date, endDate: Date) => {
|
||||||
|
console.log('Start Date:', startDate)
|
||||||
|
console.log('End Date:', endDate)
|
||||||
|
// 这里可以添加更多的逻辑处理
|
||||||
|
}
|
||||||
// 打开 drawer(新增、编辑)
|
// 打开 drawer(新增、编辑)
|
||||||
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
const openDialog = (titleType: string, row: Partial<Device.ResPqDev> = {}) => {
|
||||||
devicePopup.value?.open(titleType, row)
|
devicePopup.value?.open(titleType, row)
|
||||||
|
|||||||
Reference in New Issue
Block a user