uu
This commit is contained in:
parent
cf12994c36
commit
5a6dbb3329
@ -1,7 +1,8 @@
|
|||||||
import getCdnUrl, { getCdnRoot } from "./getCdnUrl.js"
|
import getCdnUrl, { getCdnRoot } from "./getCdnUrl.js"
|
||||||
import { authCodeEnum } from "./authCode"
|
import { authCodeEnum } from "./authCode"
|
||||||
import dayjs from "dayjs"
|
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 curMonth = dayjs().month() + 1
|
||||||
let curMYush = curMonth % 3
|
let curMYush = curMonth % 3
|
||||||
// 如果被整除,diff就要设置成被除以的数
|
// 如果被整除,diff就要设置成被除以的数
|
||||||
@ -12,8 +13,8 @@ if(curMYush == 0) {
|
|||||||
const dateRangeList = [
|
const dateRangeList = [
|
||||||
{ title: '今天', val: 1,
|
{ title: '今天', val: 1,
|
||||||
range: [
|
range: [
|
||||||
dayjs().format(formatStr),
|
dayjs().startOf('day').format(formatDateTimeStr),
|
||||||
dayjs().format(formatStr)
|
dayjs().endOf('day').format(formatDateTimeStr)
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ title: '本周', val: 2,
|
{ title: '本周', val: 2,
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export const createSocketMessage = ({ userInfo })=> {
|
|||||||
|
|
||||||
const url = curEnvConf.socketHost
|
const url = curEnvConf.socketHost
|
||||||
let comReqData = getCommonReqData()
|
let comReqData = getCommonReqData()
|
||||||
const socketTask = uni.connectSocket({
|
let socketTask = uni.connectSocket({
|
||||||
url: `${url}/ws/${userInfo?.userId}`,
|
url: `${url}/ws/${userInfo?.userId}`,
|
||||||
// method: 'GET',
|
// method: 'GET',
|
||||||
header: {
|
header: {
|
||||||
|
|||||||
@ -135,8 +135,13 @@
|
|||||||
rangeVal: ''
|
rangeVal: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// 初始化默认选中的效果
|
||||||
|
this.toolsRangesList?.map?.(t=> {
|
||||||
|
if(t?.range?.join?.(",") == this?.value?.join?.(",")) {
|
||||||
|
this.rangeVal = t.val
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
|
|
||||||
@ -186,7 +191,8 @@
|
|||||||
},
|
},
|
||||||
handleClearVal(){
|
handleClearVal(){
|
||||||
let emptVal = Array.isArray(this.proxyValue) ? [] : ''
|
let emptVal = Array.isArray(this.proxyValue) ? [] : ''
|
||||||
this.handleChange(emptVal)
|
this.handleChange(emptVal)
|
||||||
|
this.rangeVal = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,10 +91,7 @@
|
|||||||
return {
|
return {
|
||||||
dateRangeList,
|
dateRangeList,
|
||||||
searchParam: {
|
searchParam: {
|
||||||
_date: [
|
_date: dateRangeList[0].range,
|
||||||
`${dayjs().format('YYYY-MM-DD')} 00:00:00`,
|
|
||||||
`${dayjs().format('YYYY-MM-DD')} 23:59:59`
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
queryOption: {
|
queryOption: {
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user