CN-599 fix: 新报告功能问题修复
This commit is contained in:
@@ -123,6 +123,11 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
.table-operation-item--disabled {
|
||||||
|
cursor: not-allowed;
|
||||||
|
filter: grayscale(1);
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
:disabled="!!editObject.id"
|
:disabled="!!editObject.id"
|
||||||
v-model="editObject.config.timeConfig.unit"
|
v-model="editObject.config.timeConfig.unit"
|
||||||
class="right-box__select"
|
class="right-box__select"
|
||||||
clearable
|
|
||||||
collapse-tags
|
collapse-tags
|
||||||
placeholder=" "
|
placeholder=" "
|
||||||
popper-class="right-box-select-dropdown right-box-select-report "
|
popper-class="right-box-select-dropdown right-box-select-report "
|
||||||
@@ -53,7 +52,6 @@
|
|||||||
<el-select id="reportBoxTimeUnitSelect"
|
<el-select id="reportBoxTimeUnitSelect"
|
||||||
v-model="editObject.config.timeConfig.unit"
|
v-model="editObject.config.timeConfig.unit"
|
||||||
class="right-box__select right-box__select-single"
|
class="right-box__select right-box__select-single"
|
||||||
clearable
|
|
||||||
collapse-tags
|
collapse-tags
|
||||||
:disabled="!!editObject.id"
|
:disabled="!!editObject.id"
|
||||||
placeholder=" "
|
placeholder=" "
|
||||||
@@ -221,7 +219,6 @@
|
|||||||
<el-select id="account-input-roleIds"
|
<el-select id="account-input-roleIds"
|
||||||
v-model="editObject.categoryId"
|
v-model="editObject.categoryId"
|
||||||
class="right-box__select"
|
class="right-box__select"
|
||||||
clearable
|
|
||||||
collapse-tags
|
collapse-tags
|
||||||
placeholder=" "
|
placeholder=" "
|
||||||
:disabled="!!editObject.id"
|
:disabled="!!editObject.id"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<loading :loading="loadingDown"></loading>
|
<loading :loading="loadingDown"></loading>
|
||||||
<div class="block drop-down-time">
|
<div class="block drop-down-time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="value"
|
v-model="timeRange"
|
||||||
size="small"
|
size="small"
|
||||||
:format="format"
|
:format="format"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<div class="expand-cell" v-for="(item, index) in downDataList" :key="index">
|
<div class="expand-cell" v-for="(item, index) in downDataList" :key="index">
|
||||||
<div class="expand-right">
|
<div class="expand-right">
|
||||||
<div class="demo-progress">
|
<div class="demo-progress">
|
||||||
<el-progress type="circle" :percentage="item.percent * 100" :color="item.percent === 1 ? '#21bf9a' : '#50b3ef'">
|
<el-progress type="circle" :percentage="item.percent === 1 ? 100 : parseFloat(item.percent * 100).toFixed(2)" :color="item.percent === 1 ? '#21bf9a' : '#50b3ef'">
|
||||||
<template #default="{ percentage }">
|
<template #default="{ percentage }">
|
||||||
<span style="font-size: 0.875rem;">{{ percentage }}%</span>
|
<span style="font-size: 0.875rem;">{{ percentage }}%</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -47,13 +47,13 @@
|
|||||||
<div>{{dateFormatByAppearance(item.ctime)}}</div>
|
<div>{{dateFormatByAppearance(item.ctime)}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="expand-icon">
|
<div class="expand-icon">
|
||||||
<div class="table-operation-item--no-border" @click="tableOperation(['download', item])">
|
<div class="table-operation-item--no-border" :class="{'table-operation-item--disabled': item.percent < 1}" @click="reportOperation(['download', item])">
|
||||||
<loading :loading="loadingTableId === item.id"></loading>
|
<loading :loading="loadingTableId === item.id"></loading>
|
||||||
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingTableId}">
|
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingTableId}">
|
||||||
<use xlink:href="#cn-icon-download2"></use>
|
<use xlink:href="#cn-icon-download2"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operation-item--no-border" @click="tableOperation(['preview', item])">
|
<div class="table-operation-item--no-border" :class="{'table-operation-item--disabled': item.percent < 1}" @click="reportOperation(['preview', item])">
|
||||||
<loading :loading="loadingPreviewId === item.id"></loading>
|
<loading :loading="loadingPreviewId === item.id"></loading>
|
||||||
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingPreviewId}">
|
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingPreviewId}">
|
||||||
<use xlink:href="#cn-icon-preview"></use>
|
<use xlink:href="#cn-icon-preview"></use>
|
||||||
@@ -151,7 +151,7 @@ import { del, get } from '@/utils/http'
|
|||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { storageKey } from '@/utils/constants'
|
import { storageKey } from '@/utils/constants'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { dateFormatToUTC } from '@/utils/date-util'
|
import {dateFormatToUTC, getNowTime} from '@/utils/date-util'
|
||||||
import chartDetectionPagination from '@/views/charts/charts/chartDetectionPagination'
|
import chartDetectionPagination from '@/views/charts/charts/chartDetectionPagination'
|
||||||
export default {
|
export default {
|
||||||
name: 'builtinReportTable',
|
name: 'builtinReportTable',
|
||||||
@@ -230,7 +230,7 @@ export default {
|
|||||||
let str = ''
|
let str = ''
|
||||||
if (row.config && row.config.timeConfig && row.config.timeConfig.type) {
|
if (row.config && row.config.timeConfig && row.config.timeConfig.type) {
|
||||||
str += row.config.timeConfig.type
|
str += row.config.timeConfig.type
|
||||||
if (row.config.timeConfig.offset) {
|
if (['today', 'yesterday', 'this', 'customize'].indexOf(row.config.timeConfig.type) === -1 && row.config.timeConfig.offset) {
|
||||||
str += ` ${row.config.timeConfig.offset} ${row.config.timeConfig.unit}`
|
str += ` ${row.config.timeConfig.offset} ${row.config.timeConfig.unit}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,6 +246,11 @@ export default {
|
|||||||
return this.$t('overall.inProgress')
|
return this.$t('overall.inProgress')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
reportOperation (arr) {
|
||||||
|
if (arr[1].percent === 1) {
|
||||||
|
this.tableOperation(arr)
|
||||||
|
}
|
||||||
|
},
|
||||||
selectionChange (objs) {
|
selectionChange (objs) {
|
||||||
this.$emit('selectionChange', objs)
|
this.$emit('selectionChange', objs)
|
||||||
this.checkboxIds = objs.map(item => { return item.id }).join(',')
|
this.checkboxIds = objs.map(item => { return item.id }).join(',')
|
||||||
@@ -271,8 +276,8 @@ export default {
|
|||||||
datePickerChange (row) {
|
datePickerChange (row) {
|
||||||
const param = {
|
const param = {
|
||||||
tempId: row.id,
|
tempId: row.id,
|
||||||
startTime: dateFormatToUTC(this.value[0]),
|
startTime: dateFormatToUTC(this.timeRange[0]),
|
||||||
endTime: dateFormatToUTC(this.value[1]),
|
endTime: dateFormatToUTC(this.timeRange[1]),
|
||||||
...this.pageObj
|
...this.pageObj
|
||||||
}
|
}
|
||||||
this.dropDownQueryChange(param)
|
this.dropDownQueryChange(param)
|
||||||
@@ -316,9 +321,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup () {
|
setup () {
|
||||||
const value = ref('')
|
const { startTime, endTime } = getNowTime(60 * 24 * 30)
|
||||||
|
const timeRange = ref([startTime, endTime])
|
||||||
return {
|
return {
|
||||||
value
|
timeRange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user