This commit is contained in:
sjl
2024-11-14 18:26:34 +08:00
parent 65cb7826d3
commit 87fe66da3e
42 changed files with 188 additions and 204 deletions

View File

@@ -27,14 +27,13 @@ const dialogVisible = ref<Boolean>(false);
const dialogTitle = ref<string>("");
const openDialog = (title: string) => {
dialogTitle.value = title;
console.log(dialogVisible.value);
dialogVisible.value = true;
};
defineExpose({
openDialog,
});
onMounted(() => {
console.log();
});
</script>
<style lang="scss" scoped></style>

View File

@@ -112,7 +112,7 @@ const findIndex = () => {
}, 0)
if (!find) hiddenIndex.value = -1
} catch (e) {
// console.warn(e);
}
}

View File

@@ -55,7 +55,7 @@
})
// 证明在开始阶段
if (input.selectionStart == 0) {
//console.log('鼠标设置了,', index)
markFlag.value[index].left = true
} else {
markFlag.value[index].left = false
@@ -111,7 +111,7 @@
// 检查ip输入
const checkIpVal = (item: any) => {
let val = item.value;
//console.log(val, '===========')
// 处理非数字
val = val.toString().replace(/[^0-9]/g, "");
val = parseInt(val, 10);
@@ -130,7 +130,7 @@
}
}
item.value = val;
//console.log(item.value, '=========')
}
// 判断光标左右移动位置
@@ -147,7 +147,7 @@
markFlag.value[index].left = false
markFlag.value[index].right = false
} else {
console.log('左键设置了,', index)
markFlag.value[index].left = true
}
} else {
@@ -170,19 +170,19 @@
markFlag.value[index].right = false
}
} else if (e.keyCode === 8) {
//console.log('删除键把当前数据删除完毕后会跳转到前一个input')
// 删除键把当前数据删除完毕后会跳转到前一个input左一不做任何处理
if (index !== 0 && e.currentTarget.selectionStart === 0) {
if (markFlag.value[index].left) {
ipInputRefs.value[index - 1].focus();
markFlag.value[index].left = false
} else {
//console.log('左键设置了删除,', index)
markFlag.value[index].left = true
}
}
} else if (e.keyCode === 13 || e.keyCode === 32) {
//console.log('回车键、空格键、冒号均向右跳转,右一不做任何措施')
// 回车键、空格键、冒号均向右跳转,右一不做任何措施
if (index !== 3) {
ipInputRefs.value[index + 1].focus();
@@ -190,7 +190,7 @@
}
else if (e.keyCode === 110 || e.keyCode === 190) {
// 点 . 向右跳转,右一不做任何措施
// console.log('点击')
if (item.value == '') {
return
}
@@ -199,7 +199,7 @@
}
}
else if (item.value.toString().length === 3) {
//console.log('满3位光标自动向下一个文本框')
// 满3位光标自动向下一个文本框.
if (index !== 3) {
//ipInputRefs.value[index + 1].setSelectionRange(0, 0)
@@ -221,7 +221,7 @@
} else {
if (direction == 'toRight') {
// 可以直接跳回
//console.log('右键focus,', index)
markFlag.value[index].left = true
// 设置光标为左边第一个
ipInputRefs.value[index].setSelectionRange(0, 0)
@@ -252,7 +252,7 @@
// 监听数据变化,并初始化显示四个数据
watch(() => props.value, () => {
//console.log('变化了~', props.value);
if(flag.value){
}else{
@@ -317,7 +317,9 @@
height: 35px;
padding-inline-start: 0px;
padding-left: 10px;
padding-right: 10px;
padding-right: 20px;
padding-top: 0px;
padding-bottom: 0px;;
box-sizing: border-box;
margin: 0;
}

View File

@@ -109,7 +109,7 @@ const timeUnits = ref<TimeUnit[]>(
// 发出日期变化事件
const emitDateChange = () => {
emit('update-dates', formatDate(startDate.value), formatDate(endDate.value))
//console.log('emitDateChange', startDate.value, endDate.value)
}
// 在组件挂载时更新日期范围
@@ -138,7 +138,7 @@ const updateDateRange = () => {
} else if (timeUnit.value === '周') {
startDate.value = getStartOfWeek(today.value)
endDate.value = getEndOfWeek(today.value)
//console.log(endDate.value.toLocaleDateString())
} else if (timeUnit.value === '月') {
// 获取本月的开始和结束日期
startDate.value = new Date(today.value.getFullYear(), today.value.getMonth(), 1);
@@ -167,7 +167,7 @@ const updateDateRange = () => {
// // 确保结束日期不超过今天
// if (endDate.value > today.value) {
// console.log("1111")
// endDate.value = new Date(today.value);
// endDate.value.setHours(23, 59, 59, 999); // 设置结束时间为今天的23:59:59.999
// }
@@ -258,7 +258,7 @@ const nextPeriod = () => {
updateNextButtonStatus()
}
const updateNextButtonStatus = () => {
//console.log(endDate.value)
// 更新下一个按钮的禁用状态
const maxDate = new Date() // 假设最新日期为今天
// 将 maxDate 设置为当天的开始时间

View File

@@ -99,7 +99,7 @@ const init = () => {
}, 0);
};
const resizeCharts = () => {
console.log(77777);
if (chart.value) {
chart.value.resize();
}