CN-599 fix: 新报告功能问题修复
This commit is contained in:
@@ -123,6 +123,11 @@
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
}
|
||||
.table-operation-item--disabled {
|
||||
cursor: not-allowed;
|
||||
filter: grayscale(1);
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-form ref="userForm" :model="editObject" :rules="rules" label-position="top" label-width="120px">
|
||||
<!--name-->
|
||||
<el-form-item :label="$t('report.name')" prop="name">
|
||||
<el-input id="account-input-name" v-model="editObject.name" maxlength="64" placeholder="" show-word-limit size="small" type="text"></el-input>
|
||||
<el-input id="account-input-name" v-model="editObject.name" maxlength="64" placeholder=" " show-word-limit size="small" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<!--time limit-->
|
||||
<el-form-item :label="$t('report.timeLimit')" prop="timeLimit">
|
||||
@@ -20,7 +20,7 @@
|
||||
class="right-box__select"
|
||||
collapse-tags
|
||||
:disabled="!!editObject.id"
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
popper-class="right-box-select-dropdown right-box-select-report "
|
||||
size="small"
|
||||
@change="timeConfigTypeChange"
|
||||
@@ -34,9 +34,8 @@
|
||||
:disabled="!!editObject.id"
|
||||
v-model="editObject.config.timeConfig.unit"
|
||||
class="right-box__select"
|
||||
clearable
|
||||
collapse-tags
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
popper-class="right-box-select-dropdown right-box-select-report "
|
||||
size="small"
|
||||
@change="()=>{ this.$forceUpdate() }">
|
||||
@@ -46,17 +45,16 @@
|
||||
</el-select>
|
||||
</template>
|
||||
<div v-else-if="editObject.config.timeConfig.type === 'last' || editObject.config.timeConfig.type === 'previous'" style="display: flex;">
|
||||
<el-input v-model.number="editObject.config.timeConfig.offset" size="small" class="el-input-single" placeholder="" :disabled="!!editObject.id">
|
||||
<el-input v-model.number="editObject.config.timeConfig.offset" size="small" class="el-input-single" placeholder=" " :disabled="!!editObject.id">
|
||||
<template #prepend><i @click="timeOffsetHandle('m')" class="cn-icon cn-icon-a-"></i></template>
|
||||
<template #append><i @click="timeOffsetHandle('p')" class="cn-icon cn-icon-a-1"></i></template>
|
||||
</el-input>
|
||||
<el-select id="reportBoxTimeUnitSelect"
|
||||
v-model="editObject.config.timeConfig.unit"
|
||||
class="right-box__select right-box__select-single"
|
||||
clearable
|
||||
collapse-tags
|
||||
:disabled="!!editObject.id"
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
popper-class="right-box-select-dropdown el-select-last"
|
||||
size="small"
|
||||
@change="()=>{ this.$forceUpdate() }">
|
||||
@@ -78,7 +76,7 @@
|
||||
:disabled="!!editObject.id"
|
||||
prefix-icon="cn-icon cn-icon-shijian"
|
||||
type="datetime"
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,7 +93,7 @@
|
||||
:disabled="!!editObject.id"
|
||||
prefix-icon="cn-icon cn-icon-shijian"
|
||||
type="datetime"
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,7 +108,7 @@
|
||||
</div>
|
||||
<div class="enable-tabs-daily" v-if="scheduleType === scheduleTypeList[0].value">
|
||||
<div class="enable-tabs-custom">{{$t('report.customEvery')}}</div>
|
||||
<el-input v-model.number="editObject.config.schedulerConfig.interval" size="small" placeholder="" style="margin-top: 0.3125rem;" :disabled="!!editObject.id">
|
||||
<el-input v-model.number="editObject.config.schedulerConfig.interval" size="small" placeholder=" " style="margin-top: 0.3125rem;" :disabled="!!editObject.id">
|
||||
<template #append>{{$t('report.day')}}</template>
|
||||
</el-input>
|
||||
</div>
|
||||
@@ -135,7 +133,7 @@
|
||||
<!-- 自定义月,循环 -->
|
||||
<template v-if="monthIsCycle">
|
||||
<div class="enable-tabs-custom">{{$t('report.customEvery')}}</div>
|
||||
<el-input v-model="editObject.config.schedulerConfig.interval" size="small" placeholder="" style="margin-top: 0.3125rem;" :disabled="!!editObject.id">
|
||||
<el-input v-model="editObject.config.schedulerConfig.interval" size="small" placeholder=" " style="margin-top: 0.3125rem;" :disabled="!!editObject.id">
|
||||
<template #append>{{$t('report.moon')}}</template>
|
||||
</el-input>
|
||||
</template>
|
||||
@@ -165,7 +163,7 @@
|
||||
v-model="editObject.config.schedulerConfig.monthWeekDates"
|
||||
class="right-box__select"
|
||||
multiple
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
:disabled="!!editObject.id"
|
||||
popper-class="right-box-select-dropdown right-box-select-report "
|
||||
size="small"
|
||||
@@ -195,7 +193,7 @@
|
||||
:format="dateFormat"
|
||||
prefix-icon="cn-icon cn-icon-shijian"
|
||||
type="datetime"
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,7 +209,7 @@
|
||||
:format="dateFormat"
|
||||
prefix-icon="cn-icon cn-icon-shijian"
|
||||
type="datetime"
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,9 +219,8 @@
|
||||
<el-select id="account-input-roleIds"
|
||||
v-model="editObject.categoryId"
|
||||
class="right-box__select"
|
||||
clearable
|
||||
collapse-tags
|
||||
placeholder=""
|
||||
placeholder=" "
|
||||
:disabled="!!editObject.id"
|
||||
popper-class="right-box-select-dropdown right-box-select-report "
|
||||
size="small"
|
||||
@@ -235,7 +232,7 @@
|
||||
</el-form-item>
|
||||
<!-- 参数 -->
|
||||
<el-form-item :label="$t('config.operationlog.params')" prop="params" v-if="categoryParams.length > 0">
|
||||
<el-input v-model="param.value" placeholder="" v-for="(param, index) in categoryParams" :key="index" size="small" style="vertical-align: unset;" :disabled="!!editObject.id">
|
||||
<el-input v-model="param.value" placeholder=" " v-for="(param, index) in categoryParams" :key="index" size="small" style="vertical-align: unset;" :disabled="!!editObject.id">
|
||||
<template #prepend>{{param.key}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<loading :loading="loadingDown"></loading>
|
||||
<div class="block drop-down-time">
|
||||
<el-date-picker
|
||||
v-model="value"
|
||||
v-model="timeRange"
|
||||
size="small"
|
||||
:format="format"
|
||||
type="datetimerange"
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="expand-cell" v-for="(item, index) in downDataList" :key="index">
|
||||
<div class="expand-right">
|
||||
<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 }">
|
||||
<span style="font-size: 0.875rem;">{{ percentage }}%</span>
|
||||
</template>
|
||||
@@ -47,13 +47,13 @@
|
||||
<div>{{dateFormatByAppearance(item.ctime)}}</div>
|
||||
</div>
|
||||
<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>
|
||||
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingTableId}">
|
||||
<use xlink:href="#cn-icon-download2"></use>
|
||||
</svg>
|
||||
</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>
|
||||
<svg class="icon" aria-hidden="true" :class="{'table-operation-all-loading': loadingPreviewId}">
|
||||
<use xlink:href="#cn-icon-preview"></use>
|
||||
@@ -151,7 +151,7 @@ import { del, get } from '@/utils/http'
|
||||
import { api } from '@/utils/api'
|
||||
import { storageKey } from '@/utils/constants'
|
||||
import { ref } from 'vue'
|
||||
import { dateFormatToUTC } from '@/utils/date-util'
|
||||
import {dateFormatToUTC, getNowTime} from '@/utils/date-util'
|
||||
import chartDetectionPagination from '@/views/charts/charts/chartDetectionPagination'
|
||||
export default {
|
||||
name: 'builtinReportTable',
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
let str = ''
|
||||
if (row.config && row.config.timeConfig && 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}`
|
||||
}
|
||||
}
|
||||
@@ -246,6 +246,11 @@ export default {
|
||||
return this.$t('overall.inProgress')
|
||||
}
|
||||
},
|
||||
reportOperation (arr) {
|
||||
if (arr[1].percent === 1) {
|
||||
this.tableOperation(arr)
|
||||
}
|
||||
},
|
||||
selectionChange (objs) {
|
||||
this.$emit('selectionChange', objs)
|
||||
this.checkboxIds = objs.map(item => { return item.id }).join(',')
|
||||
@@ -271,8 +276,8 @@ export default {
|
||||
datePickerChange (row) {
|
||||
const param = {
|
||||
tempId: row.id,
|
||||
startTime: dateFormatToUTC(this.value[0]),
|
||||
endTime: dateFormatToUTC(this.value[1]),
|
||||
startTime: dateFormatToUTC(this.timeRange[0]),
|
||||
endTime: dateFormatToUTC(this.timeRange[1]),
|
||||
...this.pageObj
|
||||
}
|
||||
this.dropDownQueryChange(param)
|
||||
@@ -316,9 +321,10 @@ export default {
|
||||
}
|
||||
},
|
||||
setup () {
|
||||
const value = ref('')
|
||||
const { startTime, endTime } = getNowTime(60 * 24 * 30)
|
||||
const timeRange = ref([startTime, endTime])
|
||||
return {
|
||||
value
|
||||
timeRange
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user