修改测试bug
This commit is contained in:
@@ -48,13 +48,13 @@ const initChart = () => {
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
label: {
|
||||
color: '#fff',
|
||||
fontSize: 16
|
||||
}
|
||||
},
|
||||
// axisPointer: {
|
||||
// type: 'shadow',
|
||||
// label: {
|
||||
// color: '#fff',
|
||||
// fontSize: 16
|
||||
// }
|
||||
// },
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
@@ -67,7 +67,10 @@ const initChart = () => {
|
||||
formatter: function (params: any) {
|
||||
let tips = `<strong>${params[0]?.name}</strong></br>` // 标题加粗
|
||||
params?.forEach((item: any) => {
|
||||
const value = item.value === 3.14159 ? '暂无数据' : Math.round(item.value * 100) / 100 // 处理特殊值
|
||||
const value =
|
||||
item.value === 3.14159 || item.value === 0.14159
|
||||
? '暂无数据'
|
||||
: Math.round(item.value * 100) / 100 // 处理特殊值
|
||||
tips += `<div style=" display: flex;justify-content: space-between;">
|
||||
<span>${item.marker}
|
||||
${item.seriesName}:
|
||||
@@ -164,7 +167,7 @@ const handlerBar = (options: any) => {
|
||||
item.itemStyle = Object.assign(
|
||||
{
|
||||
color: (params: any) => {
|
||||
if (params.value == 0 || params.value == 3.14159) {
|
||||
if (params.value == 0 || params.value == 3.14159 || params.value == 0.14159) {
|
||||
return '#ccc'
|
||||
} else {
|
||||
return props.options?.color
|
||||
|
||||
@@ -87,8 +87,8 @@ const GetEchar = async (name: string) => {
|
||||
|
||||
geo: {
|
||||
map: name,
|
||||
zoom: 1.2,
|
||||
// top: 0,
|
||||
zoom: 1.1,
|
||||
// top: 10,
|
||||
// bottom: 0,
|
||||
roam: true,
|
||||
label: {
|
||||
@@ -187,6 +187,12 @@ const GetEchar = async (name: string) => {
|
||||
}
|
||||
}
|
||||
})
|
||||
myCharts.value.on('datarangeselected', function (params: any) {
|
||||
// 手动调用restore方法恢复地图的默认颜色映射
|
||||
myCharts.value.dispatchAction({
|
||||
type: 'restore'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const MapReturn = (name: string) => {
|
||||
|
||||
@@ -4,9 +4,20 @@
|
||||
<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" :disabled="disabledPicker" :disabled-date="isFutureDate"
|
||||
style="width: 220px; margin-right: 10px" unlink-panels :clearable="false" range-separator="至"
|
||||
start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD" :shortcuts="shortcuts" />
|
||||
<el-date-picker
|
||||
v-model="timeValue"
|
||||
type="daterange"
|
||||
:disabled="disabledPicker"
|
||||
:disabled-date="isFutureDate"
|
||||
style="width: 220px; margin-right: 10px"
|
||||
unlink-panels
|
||||
:clearable="false"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
:shortcuts="shortcuts"
|
||||
/>
|
||||
<el-button :disabled="backDisabled" type="primary" :icon="DArrowLeft" @click="preClick"></el-button>
|
||||
<el-button type="primary" :icon="VideoPause" @click="nowTime">当前</el-button>
|
||||
<el-button :disabled="preDisabled" type="primary" :icon="DArrowRight" @click="next"></el-button>
|
||||
@@ -70,9 +81,9 @@ const shortcuts = [
|
||||
}
|
||||
}
|
||||
]
|
||||
const isFutureDate = (time) => {
|
||||
return time && time > Date.now();
|
||||
};
|
||||
const isFutureDate = time => {
|
||||
return time && time > Date.now()
|
||||
}
|
||||
onMounted(() => {
|
||||
timeChange(3)
|
||||
})
|
||||
@@ -385,7 +396,6 @@ const next = () => {
|
||||
if (year >= presentY && !props.nextFlag) {
|
||||
startTime = presentY + '-01-01'
|
||||
if (presentM < 10) {
|
||||
|
||||
if (presentD < 10) {
|
||||
endTime = presentY + '-0' + presentM + '-0' + presentD
|
||||
} else {
|
||||
@@ -402,15 +412,16 @@ const next = () => {
|
||||
startTime = year + '-01-01'
|
||||
endTime = year + '-12-31'
|
||||
}
|
||||
|
||||
}
|
||||
if (!props.nextFlag) {
|
||||
if (new Date(endTime + ' 00:00:00').getTime() >= new Date(window.XEUtils.toDateString(new Date(), 'yyyy-MM-dd ') + ' 00:00:00').getTime()) {
|
||||
if (
|
||||
new Date(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]
|
||||
}
|
||||
|
||||
@@ -419,7 +430,7 @@ const setTime = (flag = 0, e = 0) => {
|
||||
|
||||
let data = ''
|
||||
|
||||
if ((dd < 4 || dd == 0) && interval.value != 4 && !props.theCurrentTime) {
|
||||
if ((dd < 2 || dd == 0) && interval.value != 4 && !props.theCurrentTime) {
|
||||
data = window.XEUtils.toDateString(new Date().getTime() - (e + dd) * 3600 * 1000 * 24, 'yyyy-MM-dd')
|
||||
} else {
|
||||
data = window.XEUtils.toDateString(new Date().getTime() - e * 3600 * 1000 * 24, 'yyyy-MM-dd')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div ref="tableHeader" class="cn-table-header">
|
||||
<div class="table-header ba-scroll-style">
|
||||
<el-form
|
||||
style="flex: 1; height: 28px; display: flex; flex-wrap: wrap"
|
||||
style="flex: 1; height: 32px; display: flex; flex-wrap: wrap"
|
||||
ref="headerForm"
|
||||
@submit.prevent=""
|
||||
@keyup.enter="onComSearch"
|
||||
@@ -155,6 +155,7 @@ onMounted(() => {
|
||||
tableStore.table.params.startTime = datePickerRef.value.timeValue[0]
|
||||
tableStore.table.params.endTime = datePickerRef.value.timeValue[1]
|
||||
tableStore.table.params.timeFlag = datePickerRef.value.timeFlag
|
||||
tableStore.table.params.interval = datePickerRef.value.interval
|
||||
}
|
||||
if (props.area) {
|
||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||
@@ -215,6 +216,7 @@ const onComSearch = async () => {
|
||||
tableStore.table.params.startTime = datePickerRef.value.timeValue[0]
|
||||
tableStore.table.params.endTime = datePickerRef.value.timeValue[1]
|
||||
tableStore.table.params.timeFlag = datePickerRef.value.timeFlag
|
||||
tableStore.table.params.interval = datePickerRef.value.interval
|
||||
}
|
||||
|
||||
await tableStore.onTableAction('search', {})
|
||||
@@ -242,6 +244,7 @@ defineExpose({
|
||||
setTheDate,
|
||||
datePickerRef,
|
||||
showSelectChange,
|
||||
showSelect,
|
||||
computedSearchRow,
|
||||
onExport
|
||||
})
|
||||
|
||||
@@ -72,7 +72,7 @@ const loadData = () => {
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item.children.forEach((item2: any) => {
|
||||
item2.icon = 'el-icon-CollectionTag'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item2.color = config.getColorVal('elementUiPrimary')
|
||||
item2.children.forEach((item3: any) => {
|
||||
item3.icon = 'el-icon-Flag'
|
||||
item3.color = config.getColorVal('elementUiPrimary')
|
||||
|
||||
@@ -79,7 +79,7 @@ const loadData = () => {
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item.children.forEach((item2: any) => {
|
||||
item2.icon = 'el-icon-CollectionTag'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item2.color = config.getColorVal('elementUiPrimary')
|
||||
item2.children.forEach((item3: any) => {
|
||||
item3.icon = 'el-icon-Flag'
|
||||
item3.color = config.getColorVal('elementUiPrimary')
|
||||
|
||||
Reference in New Issue
Block a user