|
@@ -39,11 +39,11 @@
|
|
|
<span>关闭</span>
|
|
|
</div>
|
|
|
<el-divider></el-divider>
|
|
|
- <div class="cy-chart-div" @click="templateEvent()">
|
|
|
+ <div class="cy-chart-div" @click="templateEvent()" v-if="templateReportType != 2">
|
|
|
<svg-icon icon-class="report_template" style="width: 35px;"/>
|
|
|
<span>模板库</span>
|
|
|
</div>
|
|
|
- <div class="cy-chart-div" @click="dataEvent(1)">
|
|
|
+ <div class="cy-chart-div" @click="dataEvent(1)" v-if="templateReportType != 2">
|
|
|
<svg-icon icon-class="report_basedata" style="width: 35px;"/>
|
|
|
<span>基础数据项</span>
|
|
|
</div>
|
|
@@ -316,7 +316,6 @@
|
|
|
</el-select>
|
|
|
<el-button size="mini" @click="addDataItem" style="width: 100px;margin-top: 4px; margin-left: 10px;">选择数据项</el-button>
|
|
|
<el-button size="mini" type="primary" @click="multipleDataItemEvent"
|
|
|
- v-if="templateReportType != 2"
|
|
|
style="width: 100px;margin-top: 4px;">设置数据条件</el-button>
|
|
|
</div>
|
|
|
<div style="height: 30vh; margin-top: 10px; overflow: auto;">
|
|
@@ -338,19 +337,24 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="itemName" label="数据项名称" align="center">
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="templateReportType != 2" prop="valueTakingMode" label="取值模式" align="center">
|
|
|
+ <el-table-column prop="valueType" label="取值类型" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getValByProp(valueTypeList, scope.row.valueType) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="templateReportType == 1" prop="valueTakingMode" label="取值模式" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ getValByProp(valueTakingModeList, scope.row.valueTakingMode) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="templateReportType != 2" prop="bucketType" label="取值时间单位" align="center">
|
|
|
+ <el-table-column v-if="templateReportType == 1" prop="bucketType" label="取值时间单位" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ getValByProp(bucketTypeList, scope.row.bucketType) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="templateReportType != 2" prop="bucketValue" label="取值时段间隔" align="center">
|
|
|
+ <el-table-column v-if="templateReportType == 1" prop="bucketValue" label="取值时段间隔" align="center">
|
|
|
</el-table-column>
|
|
|
- <template v-if="templateReportType == 0">
|
|
|
+ <template v-if="false">
|
|
|
<el-table-column prop="startTime" label="取值时段范围" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.startTime }}
|
|
@@ -424,23 +428,23 @@
|
|
|
v-model="itemConditionForm.valueType"
|
|
|
:label="item.value">{{ item.label }}</el-radio>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="取值模式:" prop="valueTakingMode">
|
|
|
+ <el-form-item label="取值模式:" prop="valueTakingMode" v-if="templateReportType == 1">
|
|
|
<el-radio v-for="item in valueTakingModeList"
|
|
|
v-model="itemConditionForm.valueTakingMode"
|
|
|
:label="item.value">{{ item.label }}</el-radio>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="时间单位:" prop="bucketType">
|
|
|
+ <el-form-item label="时间单位:" prop="bucketType" v-if="templateReportType == 1">
|
|
|
<el-radio v-for="item in bucketTypeList"
|
|
|
v-model="itemConditionForm.bucketType"
|
|
|
:label="item.value">{{ item.label }}</el-radio>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="时段间隔:" prop="bucketValue">
|
|
|
+ <el-form-item label="时段间隔:" prop="bucketValue" v-if="templateReportType == 1">
|
|
|
<el-input-number label="请输入时段值"
|
|
|
v-model="itemConditionForm.bucketValue"
|
|
|
:min="1"
|
|
|
:max="100"></el-input-number>
|
|
|
</el-form-item>
|
|
|
- <template v-if="templateReportType == 0">
|
|
|
+ <template v-if="false">
|
|
|
<el-form-item label="取值时间:" prop="dateRange">
|
|
|
<el-date-picker
|
|
|
v-model="itemConditionForm.dateRange"
|
|
@@ -575,10 +579,10 @@ export default {
|
|
|
],
|
|
|
// 数据项取值条件
|
|
|
itemConditionForm: {
|
|
|
- valueType: null, // 0原始值1计算值
|
|
|
- valueTakingMode: null, // 取值模式0平均值,1最大值,2最小值,3瞬时值
|
|
|
- bucketType: null, // 时段类型0天,1时,2分,3秒
|
|
|
- bucketValue: null, // 时段值
|
|
|
+ valueType: 0, // 0原始值1计算值
|
|
|
+ valueTakingMode: 0, // 取值模式0平均值,1最大值,2最小值,3瞬时值
|
|
|
+ bucketType: 1, // 时段类型0天,1时,2分,3秒
|
|
|
+ bucketValue: 1, // 时段值
|
|
|
dateRange: [], // 取值时间范围,手动报表必填
|
|
|
},
|
|
|
itemConditionFormRules: {
|
|
@@ -631,6 +635,7 @@ export default {
|
|
|
reportTemplateItem: this.$store.getters.sessionName.REPORT_TEMPLATE_ITEM,
|
|
|
reportInterval: null,
|
|
|
toolChart: [],
|
|
|
+ toolItemChart: [],
|
|
|
toolItemTable: [],
|
|
|
luckysheetOption: {
|
|
|
container: 'luckysheet', // 设定 DOM 容器的 id
|
|
@@ -777,6 +782,7 @@ export default {
|
|
|
this.templateVersion = null
|
|
|
this.templateName = ''
|
|
|
this.toolChart = []
|
|
|
+ this.toolItemChart = []
|
|
|
this.toolItemTable = []
|
|
|
luckysheet.destroy()
|
|
|
let locItem = localStorage.getItem(_this.reportTemplateItem)
|
|
@@ -845,10 +851,10 @@ export default {
|
|
|
/** 多选事件 */
|
|
|
multipleDataItemEvent() {
|
|
|
// 事件驱动报表
|
|
|
- if (this.templateReportType == 2) {
|
|
|
- showAlertMsgWin(this, null, '事件驱动报表不需要设置取值条件!')
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (this.templateReportType == 2) {
|
|
|
+ // showAlertMsgWin(this, null, '事件驱动报表不需要设置取值条件!')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
if (!this.selectionDataItems || this.selectionDataItems.length == 0) {
|
|
|
showAlertMsgWin(this, null, '请至少选择一项数据!')
|
|
|
return
|
|
@@ -857,10 +863,10 @@ export default {
|
|
|
},
|
|
|
/** 数据项配置结果集事件 */
|
|
|
chooseDataItemConfigEvent() {
|
|
|
- if (this.templateReportType == 0 && (!this.itemConditionForm.dateRange || this.itemConditionForm.dateRange.length == 0)) {
|
|
|
- showAlertMsgWin(this, null, '取值时间范围不能为空!')
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (this.templateReportType == 0 && (!this.itemConditionForm.dateRange || this.itemConditionForm.dateRange.length == 0)) {
|
|
|
+ // showAlertMsgWin(this, null, '取值时间范围不能为空!')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
this.$refs['itemConditionForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.$nextTick(() => {
|
|
@@ -1931,10 +1937,10 @@ export default {
|
|
|
/** 数据项取值配置弹出层关闭事件 */
|
|
|
dialogDataItemConfigClose(done) {
|
|
|
this.itemConditionForm = {
|
|
|
- valueType: null, // 取值模式0平均值,1最大值,2最小值,3瞬时值
|
|
|
- valueTakingMode: null, // 取值模式0平均值,1最大值,2最小值,3瞬时值
|
|
|
- bucketType: null, // 时段类型0天,1时,2分,3秒
|
|
|
- bucketValue: null, // 时段值
|
|
|
+ valueType: 0, // 0原始值1计算值
|
|
|
+ valueTakingMode: 0, // 取值模式0平均值,1最大值,2最小值,3瞬时值
|
|
|
+ bucketType: 1, // 时段类型0天,1时,2分,3秒
|
|
|
+ bucketValue: 1, // 时段值
|
|
|
dateRange: [], // 取值时间范围,手动报表必填
|
|
|
}
|
|
|
if (typeof(done) === 'function') {
|