修改辽宁反馈问题

This commit is contained in:
guanj
2026-06-23 21:27:15 +08:00
parent ed60e2b7f3
commit 070e404bbb
20 changed files with 2369 additions and 2260 deletions

View File

@@ -126,7 +126,8 @@ const prop = defineProps({
width: { type: [String, Number] },
height: { type: [String, Number] },
timeKey: { type: [String, Number] },
timeValue: { type: Object }
timeValue: { type: Object },
searchKey: { type: [String, Number] }
})
const headerHeight = ref(57)
@@ -347,22 +348,22 @@ onMounted(() => {
tableStore.index()
})
watch(
() => prop.timeKey,
() => prop.searchKey,
val => {
tableStore.index()
}
)
watch(
() => prop.timeValue,
// watch(
// () => prop.timeValue,
val => {
tableStore.index()
},
// val => {
// tableStore.index()
// },
{
deep: true
}
)
// {
// deep: true
// }
// )
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';

View File

@@ -122,7 +122,8 @@ const prop = defineProps({
width: { type: [String, Number] },
height: { type: [String, Number] },
timeKey: { type: [String, Number] },
timeValue: { type: Object }
timeValue: { type: Object },
searchKey: { type: [String, Number] }
})
const headerHeight = ref(57)
@@ -329,22 +330,22 @@ onMounted(() => {
tableStore.index()
})
watch(
() => prop.timeKey,
() => prop.searchKey,
val => {
tableStore.index()
}
)
watch(
() => prop.timeValue,
// watch(
// () => prop.timeValue,
val => {
tableStore.index()
},
// val => {
// tableStore.index()
// },
{
deep: true
}
)
// {
// deep: true
// }
// )
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';

View File

@@ -7,7 +7,8 @@
@selectChange="selectChange"
datePicker
v-if="fullscreen"
></TableHeader>
>
</TableHeader>
<div
class="monitoringPoints"
:style="{
@@ -120,7 +121,8 @@ const prop = defineProps({
width: { type: [String, Number] },
height: { type: [String, Number] },
timeKey: { type: [String, Number] },
timeValue: { type: Object }
timeValue: { type: Object },
searchKey: { type: [String, Number] }
})
const headerHeight = ref(57)
@@ -328,22 +330,22 @@ onMounted(() => {
tableStore.index()
})
watch(
() => prop.timeKey,
() => prop.searchKey,
val => {
tableStore.index()
}
)
watch(
() => prop.timeValue,
// watch(
// () => prop.timeValue,
val => {
tableStore.index()
},
// val => {
// tableStore.index()
// },
{
deep: true
}
)
// {
// deep: true
// }
// )
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';

View File

@@ -150,7 +150,8 @@ const prop = defineProps({
width: { type: [String, Number] },
height: { type: [String, Number] },
timeKey: { type: [String, Number] },
timeValue: { type: Object }
timeValue: { type: Object },
searchKey: { type: [String, Number] }
})
const headerHeight = ref(57)
@@ -233,7 +234,7 @@ const tableStore: any = new TableStore({
if (tableStore.table.params.statisticalType.name == '终端厂家') {
return k.count != 0
} else {
return !k.citName.includes('上送')
return !k.name.includes('上送')
}
})
}
@@ -246,22 +247,28 @@ onMounted(() => {
tableStore.index()
})
watch(
() => prop.timeKey,
() => prop.searchKey,
val => {
tableStore.index()
}
)
watch(
() => prop.timeValue,
// watch(
// () => prop.timeKey,
// val => {
// tableStore.index()
// }
// )
// watch(
// () => prop.timeValue,
val => {
tableStore.index()
},
// val => {
// tableStore.index()
// },
{
deep: true
}
)
// {
// deep: true
// }
// )
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';

View File

@@ -1,22 +1,22 @@
<template>
<div style="width: 540px">
<div :style="{ width: isMinuteData ? '750px' : '610px' }">
<el-select v-model="interval" style="min-width: 90px; width: 90px; margin-right: 10px" @change="timeChange">
<el-option v-for="item in timeOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-date-picker
v-model="timeValue"
type="daterange"
:type="pickerType"
:disabled="disabledPicker"
:disabled-date="isFutureDate"
style="width: 220px; margin-right: 10px"
:style="{ width: isMinuteData ? '360px' : '220px', marginRight: '10px' }"
unlink-panels
:clearable="false"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD"
:shortcuts="shortcuts"
:start-placeholder="isMinuteData ? '开始时间' : '开始日期'"
:end-placeholder="isMinuteData ? '结束时间' : '结束日期'"
:value-format="pickerValueFormat"
:shortcuts="isMinuteData ? undefined : shortcuts"
/>
<el-button :disabled="backDisabled" type="primary" :icon="DArrowLeft" @click="preClick"></el-button>
<el-button type="primary" :icon="VideoPause" @click="nowTime">当前</el-button>
@@ -26,18 +26,41 @@
<script lang="ts" setup>
import { DArrowLeft, VideoPause, DArrowRight } from '@element-plus/icons-vue'
import { ref, onMounted, nextTick, watch } from 'vue'
import { ref, onMounted, computed, watch } from 'vue'
interface Props {
nextFlag?: boolean
theCurrentTime?: boolean
isStatisticData?: number | string
}
const props = withDefaults(defineProps<Props>(), {
nextFlag: false,
theCurrentTime: false
theCurrentTime: false,
isStatisticData: 1
})
const isMinuteData = computed(() => Number(props.isStatisticData) === 0)
const pickerType = computed(() => (isMinuteData.value ? 'datetimerange' : 'daterange'))
const pickerValueFormat = computed(() => (isMinuteData.value ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))
const toDatePart = (value: string) => (value?.includes(' ') ? value.split(' ')[0] : value)
const toMinuteStart = (date: string) => `${toDatePart(date)} 00:00:00`
const toMinuteEnd = (date: string) => `${toDatePart(date)} 23:59:59`
const normalizeRange = (start: string, end: string) => {
if (!isMinuteData.value) {
return [toDatePart(start), toDatePart(end)]
}
return [toMinuteStart(start), toMinuteEnd(end)]
}
const setRangeValue = (start: string, end: string) => {
timeValue.value = normalizeRange(start, end)
}
const interval = ref(3)
const timeFlag = ref(1)
const count = ref(0)
@@ -95,13 +118,13 @@ const timeChange = (e: number) => {
if (e == 1) {
disabledPicker.value = true
timeValue.value = [setTime(1), setTime()]
setRangeValue(setTime(1), setTime())
} else if (e == 2) {
disabledPicker.value = true
timeValue.value = [setTime(2), setTime()]
setRangeValue(setTime(2), setTime())
} else if (e == 3) {
disabledPicker.value = true
timeValue.value = [setTime(3), setTime()]
setRangeValue(setTime(3), setTime())
} else if (e == 4) {
let year = parseInt(setTime().substring(0, 4))
let month = parseInt(setTime().substring(5, 7))
@@ -111,12 +134,12 @@ const timeChange = (e: number) => {
var dayOfWeek = start.getDay() == 0 ? 7 : start.getDay() - 1 // 如果为周日则置为7天
disabledPicker.value = true
timeValue.value = [setTime(0, dayOfWeek), setTime(0, -6 + dayOfWeek)]
setRangeValue(setTime(0, dayOfWeek), setTime(0, -6 + dayOfWeek))
} else if (e == 5) {
disabledPicker.value = false
backDisabled.value = true
preDisabled.value = props.nextFlag ? false : true
timeValue.value = [setTime(), setTime()]
setRangeValue(setTime(), setTime())
}
if (e == 1 || e == 2) {
timeFlag.value = 0
@@ -186,7 +209,7 @@ const preClick = () => {
startTime = year + '-01-01'
endTime = year + '-12-31'
}
timeValue.value = [startTime, endTime]
setRangeValue(startTime, endTime)
// 判断向后键的状态
// var temp = NowgetEndTime()
@@ -415,16 +438,27 @@ const next = () => {
}
if (!props.nextFlag) {
if (
new Date(endTime + ' 00:00:00').getTime() >=
new Date(toDatePart(endTime) + ' 00:00:00').getTime() >=
new Date(window.XEUtils.toDateString(new Date(), 'yyyy-MM-dd ') + ' 00:00:00').getTime()
) {
preDisabled.value = props.nextFlag ? false : true
}
}
timeValue.value = [startTime, endTime]
setRangeValue(startTime, endTime)
}
watch(
() => props.isStatisticData,
() => {
if (timeValue.value?.length === 2) {
setRangeValue(timeValue.value[0], timeValue.value[1])
} else {
timeChange(interval.value)
}
}
)
const setTime = (flag = 0, e = 0) => {
let dd = window.XEUtils.toDateString(new Date().getTime() - e * 3600 * 1000 * 24, 'dd')

View File

@@ -3,13 +3,14 @@
<div class="table-header ba-scroll-style">
<el-form style="flex: 1; height: 32px; display: flex; flex-wrap: wrap" ref="headerForm" @submit.prevent=""
@keyup.enter="onComSearch" label-position="left" :inline="true">
<el-form-item v-if="datePicker" style="grid-column: span 2; max-width: 630px">
<el-form-item v-if="datePicker" style="grid-column: span 2; "
:style="{ maxWidth: isStatisticData == 0 ? '750px' : '610px' }">
<template #label>
<el-checkbox v-if="showTimeAll" v-model="timeAll" label="统计时间" />
<span v-else>{{ dateLabel }}</span>
</template>
<DatePicker ref="datePickerRef" v-if="timeAll" :nextFlag="nextFlag"
:theCurrentTime="theCurrentTime"></DatePicker>
<DatePicker ref="datePickerRef" v-if="timeAll" :nextFlag="nextFlag" :theCurrentTime="theCurrentTime"
:isStatisticData="isStatisticData"></DatePicker>
</el-form-item>
<el-form-item label="区域" v-if="area">
@@ -72,6 +73,7 @@ interface Props {
showExport?: boolean //导出控制
showTimeAll?: boolean //控制时间是否显示
dateLabel?: string //设置时间名称
isStatisticData?: number | string // 0分钟数据 1统计数据
}
const props = withDefaults(defineProps<Props>(), {
@@ -83,7 +85,8 @@ const props = withDefaults(defineProps<Props>(), {
showReset: true,
showExport: false,
showTimeAll: false,
dateLabel: '统计日期'
dateLabel: '统计日期',
isStatisticData: 1
})
// 动态计算table高度
const resizeObserver = new ResizeObserver(entries => {