This commit is contained in:
aihe 2025-01-16 10:50:01 +08:00
parent cf12994c36
commit 5a6dbb3329
4 changed files with 15 additions and 11 deletions

View File

@ -1,7 +1,8 @@
import getCdnUrl, { getCdnRoot } from "./getCdnUrl.js"
import { authCodeEnum } from "./authCode"
import dayjs from "dayjs"
const formatStr = 'YYYY-MM-DD'
const formatStr = 'YYYY-MM-DD'
const formatDateTimeStr = 'YYYY-MM-DD HH:mm:ss'
let curMonth = dayjs().month() + 1
let curMYush = curMonth % 3
// 如果被整除,diff就要设置成被除以的数
@ -12,8 +13,8 @@ if(curMYush == 0) {
const dateRangeList = [
{ title: '今天', val: 1,
range: [
dayjs().format(formatStr),
dayjs().format(formatStr)
dayjs().startOf('day').format(formatDateTimeStr),
dayjs().endOf('day').format(formatDateTimeStr)
],
},
{ title: '本周', val: 2,

View File

@ -16,7 +16,7 @@ export const createSocketMessage = ({ userInfo })=> {
const url = curEnvConf.socketHost
let comReqData = getCommonReqData()
const socketTask = uni.connectSocket({
let socketTask = uni.connectSocket({
url: `${url}/ws/${userInfo?.userId}`,
// method: 'GET',
header: {

View File

@ -135,8 +135,13 @@
rangeVal: ''
}
},
created() {
created() {
// 初始化默认选中的效果
this.toolsRangesList?.map?.(t=> {
if(t?.range?.join?.(",") == this?.value?.join?.(",")) {
this.rangeVal = t.val
}
})
},
onHide() {
@ -186,7 +191,8 @@
},
handleClearVal(){
let emptVal = Array.isArray(this.proxyValue) ? [] : ''
this.handleChange(emptVal)
this.handleChange(emptVal)
this.rangeVal = ''
}
}
}

View File

@ -91,10 +91,7 @@
return {
dateRangeList,
searchParam: {
_date: [
`${dayjs().format('YYYY-MM-DD')} 00:00:00`,
`${dayjs().format('YYYY-MM-DD')} 23:59:59`
],
_date: dateRangeList[0].range,
},
queryOption: {
},