修改 海南测试bug

This commit is contained in:
GGJ
2024-12-11 16:14:08 +08:00
parent 9b952f2016
commit 16c25ddf6b
28 changed files with 338 additions and 220 deletions

View File

@@ -62,7 +62,7 @@ const initChart = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
confine: true, confine: true,
...(props.options?.tooltip || null) ...(props.options?.tooltip || null)
@@ -74,15 +74,15 @@ const initChart = () => {
saveAsImage: { saveAsImage: {
title: '保存图片', title: '保存图片',
}, },
...(props.options?.toolbox?.featureProps || null) ...(props.options?.toolbox?.featureProps || null)
}, },
emphasis: { emphasis: {
iconStyle: { iconStyle: {
borderColor: config.layout.elementUiPrimary[0], // 鼠标悬停时的边框颜色 borderColor: config.layout.elementUiPrimary[0], // 鼠标悬停时的边框颜色
color: config.layout.elementUiPrimary[0] // 鼠标悬停时的图标颜色 color: config.layout.elementUiPrimary[0] // 鼠标悬停时的图标颜色
} }
}, },
// }, // },
...(props.options?.toolbox || null) ...(props.options?.toolbox || null)
}, },

View File

@@ -26,7 +26,7 @@ const fetchConfig = async (name: string) => {
// fetchConfig() // fetchConfig()
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap']) const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
onMounted(() => {}) onMounted(() => { })
const GetEchar = async (name: string) => { const GetEchar = async (name: string) => {
let chartDom = document.getElementById('chartMap') let chartDom = document.getElementById('chartMap')
@@ -57,7 +57,7 @@ const GetEchar = async (name: string) => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
...(props.options.tooltip || null) ...(props.options.tooltip || null)
}, },
@@ -187,7 +187,7 @@ const GetEchar = async (name: string) => {
} }
} }
}) })
} }
const MapReturn = (name: string) => { const MapReturn = (name: string) => {
@@ -232,6 +232,7 @@ watch(
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.iconfont { .iconfont {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;

View File

@@ -6,14 +6,8 @@
</div> </div>
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh"> <el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
<el-table <el-table stripe :data="Data" :height="height" border style="width: 100%"
stripe header-cell-class-name="table_header">
:data="Data"
:height="height"
border
style="width: 100%"
header-cell-class-name="table_header"
>
<el-table-column align="center" prop="number" label="事件段"></el-table-column> <el-table-column align="center" prop="number" label="事件段"></el-table-column>
<el-table-column align="center" prop="number" label="波形起始点相位(°)"> <el-table-column align="center" prop="number" label="波形起始点相位(°)">
<el-table-column align="center" prop="number" label="A相"></el-table-column> <el-table-column align="center" prop="number" label="A相"></el-table-column>
@@ -31,12 +25,7 @@
<el-table-column align="center" prop="number" label="C相"></el-table-column> <el-table-column align="center" prop="number" label="C相"></el-table-column>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column> <el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
<el-table-column <el-table-column align="center" prop="number" label="三相电压不平衡度(%)" width="180"></el-table-column>
align="center"
prop="number"
label="三相电压不平衡度(%)"
width="180"
></el-table-column>
<el-table-column align="center" prop="number" label="暂降类型"></el-table-column> <el-table-column align="center" prop="number" label="暂降类型"></el-table-column>
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column> <el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
</el-table> </el-table>
@@ -99,7 +88,7 @@ export default {
zoom: '' zoom: ''
} }
}, },
created() {}, created() { },
watch: { watch: {
value: function (a, b) { value: function (a, b) {
if (a == 2) { if (a == 2) {
@@ -244,10 +233,10 @@ export default {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
title: { title: {
left: 'center', left: 'center',
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName, text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,

View File

@@ -118,7 +118,7 @@ export default {
backbxlb() { backbxlb() {
if (this.echartlist.length > 0) { if (this.echartlist.length > 0) {
this.waveDatas = [] this.waveDatas = []
this.echartlist.forEach(item => { this.echartlist.forEach(item => {
item.dispose(); // 销毁echarts实例 item.dispose(); // 销毁echarts实例
@@ -205,7 +205,7 @@ export default {
" 发生时刻:" + " 发生时刻:" +
this.boxoList.startTime + this.boxoList.startTime +
" 暂降(骤升)幅值:" + " 暂降(骤升)幅值:" +
(this.boxoList.featureAmplitude * 100).toFixed(0) + (this.boxoList.featureAmplitude * 1).toFixed(0) +
"% 持续时间:" + "% 持续时间:" +
this.boxoList.duration + this.boxoList.duration +
"s"; "s";
@@ -231,7 +231,7 @@ export default {
" 发生时刻:" + " 发生时刻:" +
this.boxoList.startTime + this.boxoList.startTime +
" 暂降(骤升)幅值:" + " 暂降(骤升)幅值:" +
(this.boxoList.featureAmplitude * 100).toFixed(0) + (this.boxoList.featureAmplitude * 1).toFixed(0) +
"% 持续时间:" + "% 持续时间:" +
this.boxoList.duration + this.boxoList.duration +
"s"; "s";
@@ -672,10 +672,10 @@ export default {
let cu = null, let cu = null,
rmscu = null, rmscu = null,
rmscm = null, rmscm = null,
title =null, title = null,
unit =null, unit = null,
max =null, max = null,
min=null; min = null;
let a = null, let a = null,
b = "", b = "",
c = ""; c = "";
@@ -871,7 +871,7 @@ export default {
" 发生时刻:" + " 发生时刻:" +
this.time + this.time +
" 暂降(骤升)幅值:" + " 暂降(骤升)幅值:" +
(this.eventValue * 100).toFixed(0) + (this.eventValue * 1).toFixed(0) +
"% 持续时间:" + "% 持续时间:" +
this.persistTime + this.persistTime +
"s"; "s";
@@ -920,7 +920,7 @@ export default {
opacity: 0.35, opacity: 0.35,
fontSize: 14, fontSize: 14,
}, },
backgroundColor: "rgba(0,0,0,0.35)", backgroundColor: "rgba(0,0,0,0.55)",
borderWidth: 0, borderWidth: 0,
}, },
title: { title: {
@@ -1191,13 +1191,13 @@ export default {
b = "", b = "",
c = ""; c = "";
let max, min, unit; let max, min, unit;
let adata =null, let adata = null,
bdata =null, bdata = null,
cdata =null; cdata = null;
let radata =null, let radata = null,
rbdata =null, rbdata = null,
rcdata =null; rcdata = null;
let colors =[]; let colors = [];
switch (this.iphasic) { switch (this.iphasic) {
case 1: case 1:
a = waveDataTemp.title.aTitle; a = waveDataTemp.title.aTitle;
@@ -1255,12 +1255,12 @@ export default {
let myChartes = echarts.init(document.getElementById(rmsId)); let myChartes = echarts.init(document.getElementById(rmsId));
//debugger //debugger
let titlename = '' let titlename = ''
if (this.boxoList.systemType == "ZL") { if (this.boxoList.systemType == "ZL") {
let str = [] let str = []
str = rmsId.split('s') str = rmsId.split('s')
let str1 = Number(str[1]) let str1 = Number(str[1])
this.wp.channelNames.forEach((element, i) => { this.wp.channelNames.forEach((element, i) => {
if (i == 4 || i == 7 || i == 10) { if (i == 4 || i == 7 || i == 10) {
if (str1 == 1 && i == 4) { if (str1 == 1 && i == 4) {
@@ -1341,7 +1341,7 @@ export default {
opacity: 0.35, opacity: 0.35,
fontSize: 14, fontSize: 14,
}, },
backgroundColor: "rgba(0,0,0,0.35)", backgroundColor: "rgba(0,0,0,0.55)",
borderWidth: 0, borderWidth: 0,
}, },
title: { title: {

View File

@@ -106,19 +106,19 @@ export default {
methods: { methods: {
backbxlb() { backbxlb() {
if (this.echartlist.length>0) { if (this.echartlist.length > 0) {
console.log(123111); console.log(123111);
this.waveDatas = [] this.waveDatas = []
this.echartlist.forEach(item => { this.echartlist.forEach(item => {
item.dispose(); // 销毁echarts实例 item.dispose(); // 销毁echarts实例
}) })
} }
}, },
download() { download() {
// 转换成canvas // 转换成canvas
html2canvas(document.getElementById('boxsj'), { html2canvas(document.getElementById('boxsj'), {
scale: 2 scale: 2
@@ -163,7 +163,7 @@ export default {
' 发生时刻:' + ' 发生时刻:' +
this.boxoList.startTime + this.boxoList.startTime +
' 暂降(骤升)幅值:' + ' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude * 100).toFixed(0) + (this.boxoList.featureAmplitude * 1).toFixed(0) +
'% 持续时间:' + '% 持续时间:' +
this.boxoList.duration + this.boxoList.duration +
's' 's'
@@ -189,7 +189,7 @@ export default {
' 发生时刻:' + ' 发生时刻:' +
this.boxoList.startTime + this.boxoList.startTime +
' 暂降(骤升)幅值:' + ' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude * 100).toFixed(0) + (this.boxoList.featureAmplitude * 1).toFixed(0) +
'% 持续时间:' + '% 持续时间:' +
this.boxoList.duration + this.boxoList.duration +
's' 's'
@@ -406,7 +406,7 @@ export default {
}, },
//开始画图 //开始画图
initWave(waveDatas, time, type, severity, isOpen) { initWave(waveDatas, time, type, severity, isOpen) {
this.echartlist=[] this.echartlist = []
//清除之前增加的div //清除之前增加的div
// $("#wave ~ .bx1").remove(); // $("#wave ~ .bx1").remove();
$('div.bx1').remove() $('div.bx1').remove()
@@ -539,7 +539,7 @@ export default {
' 发生时刻:' + ' 发生时刻:' +
this.time + this.time +
' 暂降(骤升)幅值:' + ' 暂降(骤升)幅值:' +
(this.eventValue * 100).toFixed(0) + (this.eventValue * 1).toFixed(0) +
'% 持续时间:' + '% 持续时间:' +
this.persistTime + this.persistTime +
's' 's'
@@ -592,7 +592,7 @@ export default {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
title: { title: {
@@ -946,7 +946,7 @@ export default {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
title: { title: {

67
src/utils/echartMethod.ts Normal file
View File

@@ -0,0 +1,67 @@
const dataProcessing = (arr: any[]) => {
return arr
.filter(item => typeof item === 'number' || (typeof item === 'string' && !isNaN(parseFloat(item))))
.map(item => (typeof item === 'number' ? item : parseFloat(item)))
}
// 处理y轴最大最小值
export const yMethod = (arr: any) => {
let numList = dataProcessing(arr)
let maxValue = 0
let minValue = 0
let max = 0
let min = 0
maxValue = Math.max(...numList)
minValue = Math.min(...numList)
if (maxValue > 1000 || minValue < -1000) {
max = Math.ceil(maxValue / 100) * 100
if (minValue == 0) {
min = 0
} else {
min = Math.floor(minValue / 100) * 100
}
} else if (maxValue == minValue && maxValue < 10 && minValue > 0) {
max = Math.ceil(maxValue / 10) * 10
min = Math.floor(minValue / 10) * 10
} else if (maxValue == minValue && maxValue != 0 && minValue != 0) {
max = Math.ceil(maxValue / 10 + 1) * 10
min = Math.floor(minValue / 10 - 1) * 10
} else {
max = Math.ceil(maxValue / 10) * 10
min = Math.floor(minValue / 10) * 10
}
if (maxValue > 0 && maxValue < 1) {
max = 1
} else if (max == 0 && minValue > -1 && minValue < 0) {
min = -1
}
return [min, max]
}
/**
* title['A相','B相',]
* data[[1,2],[3,4]]
*/
// 导出csv文件
const convertToCSV = (title: object, data: any) => {
console.log('🚀 ~ convertToCSV ~ data:', data)
let csv = ''
// 添加列头
csv += ',' + title.join(',') + '\n'
// 遍历数据并添加到CSV字符串中
data?.map(item => {
csv += item.join(',') + '\n'
})
return csv
}
export const exportCSV = (title: object, data: any, filename: string) => {
const csv = convertToCSV(title, data)
const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' })
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
link.download = filename
link.click()
// 释放URL对象
URL.revokeObjectURL(link.href)
}

View File

@@ -369,7 +369,7 @@ const rendering = (row: any) => {
yAxis: { yAxis: {
show: false show: false
}, },
color: ['#77DA63', '#00BFF5', '#FFBF00', '#Ff6600', '#ff0000', '#07CCCA'], color: ['#339966', '#00BFF5', '#FFBF00', '#Ff6600', '#ff0000', '#07CCCA'],
dataZoom: { show: false }, dataZoom: { show: false },
series: [ series: [
{ {

View File

@@ -15,7 +15,8 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-Search" @click="onSubmit">查询</el-button> <el-button type="primary" icon="el-icon-Search" @click="onSubmit">查询</el-button>
<el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出模板</el-button> <el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出模板</el-button>
<el-upload action="" accept=".xlsx" :show-file-list="false" :auto-upload="false" :on-change="choose"> <el-upload action="" accept=".xlsx" :show-file-list="false" :auto-upload="false"
:on-change="choose">
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button> <el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
</el-upload> </el-upload>
<!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain"> <!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain">
@@ -51,13 +52,14 @@
<MyEChart :options="options2" /> <MyEChart :options="options2" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="谐波电流幅值" name="3" class="mt10" style="position: relative;"> <el-tab-pane label="谐波电流幅值" name="3" class="mt10" style="position: relative;">
<el-select v-model="harmonicValue" style="position: absolute;z-index:99;top:-10px; right: 185px; width: 80px" <el-select v-model="harmonicValue"
placeholder="请选择谐波" @change="onSubmit"> style="position: absolute;z-index:99;top:-10px; right: 185px; width: 80px"
<el-option v-for="item in harmonic" :key="item.value" :label="item.label" placeholder="请选择谐波" @change="onSubmit">
:value="item.value"></el-option> <el-option v-for="item in harmonic" :key="item.value" :label="item.label"
</el-select> :value="item.value"></el-option>
</el-select>
<MyEChart :options="options3" /> <MyEChart :options="options3" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="首端电压模型参数" name="4"> <el-tab-pane label="首端电压模型参数" name="4">
@@ -66,9 +68,10 @@
<vxe-colgroup field="group0" title="模型参数"> <vxe-colgroup field="group0" title="模型参数">
<vxe-column field="name" width="180" title="相别"></vxe-column> <vxe-column field="name" width="180" title="相别"></vxe-column>
</vxe-colgroup> </vxe-colgroup>
<vxe-column field="c" title="C"></vxe-column>
<vxe-column field="a" title="a"></vxe-column> <vxe-column field="a" title="a"></vxe-column>
<vxe-column field="b" title="b"></vxe-column> <vxe-column field="b" title="b"></vxe-column>
<vxe-column field="c" title="c"></vxe-column>
</vxe-table> </vxe-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@@ -148,6 +151,7 @@ import {
getLineDetailData, getLineDetailData,
modelTraining modelTraining
} from '@/api/advance-boot/bearingCapacity' } from '@/api/advance-boot/bearingCapacity'
import { yMethod } from '@/utils/echartMethod'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
const props = defineProps(['rowList']) const props = defineProps(['rowList'])
const harmonic = harmonicOptions.filter(item => item.value < 26) const harmonic = harmonicOptions.filter(item => item.value < 26)
@@ -281,7 +285,7 @@ const onSubmit = async () => {
}) })
} }
setEChart(1, res[0].data.data, '有功功率', 'w') setEChart(1, res[0].data.data, '有功功率', 'w')
setEChart(2, res[1].data.data, '无功功率', 'w') setEChart(2, res[1].data.data, '无功功率', 'Var')
setEChart(3, res[2].data.data, '谐波电流幅值', 'A') setEChart(3, res[2].data.data, '谐波电流幅值', 'A')
showBtn.value = true showBtn.value = true
loading.value = false loading.value = false
@@ -307,24 +311,55 @@ const modelTrain = () => {
} }
const setEChart = (val: any, data: any, text: string, name: string) => { const setEChart = (val: any, data: any, text: string, name: string) => {
// console.log("🚀 ~ setEChart ~ data:", data.map(item => item.value))
let [min, max] = yMethod(data.map(item => item.value))
let options = { let options = {
title: { title: {
text: text, text: text,
x: 'center', x: 'center',
textStyle: { // textStyle: {
fontWeight: 'normal' // fontWeight: 'normal'
} // }
}, },
tooltip: {
axisPointer: {
type: 'cross',
label: {
color: '#fff',
fontSize: 16
}
},
textStyle: {
color: '#fff',
fontStyle: 'normal',
opacity: 0.35,
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0,
},
xAxis: { xAxis: {
data: data.filter(item => item.phaseType == 'A').map(item => item.time),
// data: data.filter(item => item.phaseType == 'A').map(item => item.time),
name: '时间', name: '时间',
position: 'bottom' // 设置 x 轴在底部 type: 'time',
axisLabel: {
formatter: {
day: '{MM}-{dd}',
month: '{MM}',
year: '{yyyy}'
}
}
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: name, name: name,
max: Math.ceil(Math.max(...data.map(item => item.value))), max: max,
min: Math.floor(Math.min(...data.map(item => item.value))) min: min
// max: Math.ceil(Math.max(...data.map(item => item.value))),
// min: Math.floor(Math.min(...data.map(item => item.value)))
}, },
// legend: { // legend: {
// data: ['A', 'B', 'C'] // data: ['A', 'B', 'C']
@@ -341,9 +376,10 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
type: 'line', type: 'line',
// smooth: true, // smooth: true,
symbol: 'none', symbol: 'none',
data: data data:
.filter(item => item.phaseType == 'A') data
.map(item => (item.value == 3.1415926 ? '' : item.value.toFixed(3))) .filter(item => item.phaseType == 'A')
.map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
}, },
{ {
name: 'B相', name: 'B相',
@@ -352,7 +388,7 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
symbol: 'none', symbol: 'none',
data: data data: data
.filter(item => item.phaseType == 'B') .filter(item => item.phaseType == 'B')
.map(item => (item.value == 3.1415926 ? '' : item.value.toFixed(3))) .map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
}, },
{ {
name: 'C相', name: 'C相',
@@ -361,9 +397,24 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
symbol: 'none', symbol: 'none',
data: data data: data
.filter(item => item.phaseType == 'C') .filter(item => item.phaseType == 'C')
.map(item => (item.value == 3.1415926 ? '' : item.value.toFixed(3))) .map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
} }
] ],
options: {
dataZoom: [{
type: 'inside',
height: 13,
start: 0,
bottom: '20px',
end: 10
},
{
start: 0,
height: 13,
bottom: '20px',
end: 10
}]
}
} }
val == 1 val == 1
? (options1.value = options) ? (options1.value = options)
@@ -579,6 +630,7 @@ const handleNodeClick = (data: any, node: any) => {
margin-top: 5px; margin-top: 5px;
color: blue; color: blue;
} }
.el-select { .el-select {
min-width: 80px; min-width: 80px;
} }

View File

@@ -89,8 +89,8 @@
<el-radio v-for="item in sign" :label="item.name">{{ item.name }}</el-radio> <el-radio v-for="item in sign" :label="item.name">{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="用户名称"> <el-form-item label="数量">
<el-input-number v-model="form.count" :disabled="disabled" :min="0" style="width: 100%" /> <el-input-number v-model="form.count" :disabled="disabled" :min="0" :precision="0" :max="10000000" style="width: 100%" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>

View File

@@ -4,11 +4,7 @@
<TableHeader datePicker ref="TableHeaderRef"> <TableHeader datePicker ref="TableHeaderRef">
<template #select> <template #select>
<el-form-item label="评估类型"> <el-form-item label="评估类型">
<el-select <el-select v-model="tableStore.table.params.evaluateType" clearable placeholder="请选择评估类型">
v-model="tableStore.table.params.evaluateType"
clearable
placeholder="请选择评估类型"
>
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -30,11 +26,7 @@
<el-tab-pane label="光伏电站承载能力评估" name="1" v-if="code == null || code == 1"> <el-tab-pane label="光伏电站承载能力评估" name="1" v-if="code == null || code == 1">
<photovoltaic :rowList="rowList" /> <photovoltaic :rowList="rowList" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="充电站、电加热负荷、电气化铁路承载能力评估" name="2" v-if="code == null || code == 2">
label="充电站、电加热负荷、电气化铁路承载能力评估"
name="2"
v-if="code == null || code == 2"
>
<charge :rowList="rowList" /> <charge :rowList="rowList" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@@ -75,7 +67,7 @@ const tableStore: any = new TableStore({
method: 'POST', method: 'POST',
column: [ column: [
{ {
title: '序号', title: '序号',
width: '80', width: '80',
formatter: (row: any) => { formatter: (row: any) => {
@@ -102,22 +94,36 @@ const tableStore: any = new TableStore({
{ {
field: 'reslutLevel', field: 'reslutLevel',
title: '评估结果', title: '评估结果',
type: 'html',
formatter: (row: any) => { formatter: (row: any) => {
// 1-安全2-III级预警3-II级预警4-I 级预警,5-禁止接入 // 1-安全2-III级预警3-II级预警4-I 级预警,5-禁止接入
return `<span style="color: ${row.cellValue == 1
return row.cellValue == 1 ? '#339966'
? '合格'
: row.cellValue == 2 : row.cellValue == 2
? 'III级预警' ? '#00BFF5'
: row.cellValue == 3 : row.cellValue == 3
? 'II级预警' ? '#FFBF00'
: row.cellValue == 4 : row.cellValue == 4
? 'I 级预警' ? '#Ff6600'
: row.cellValue == 5 : row.cellValue == 5
? '禁止接入' ? '#ff0000'
: row.cellValue == 6 : row.cellValue == 6
? '允许接入' ? '#07CCCA'
: '' : ''
}">${row.cellValue == 1
? '安全'
: row.cellValue == 2
? 'III级预警'
: row.cellValue == 3
? 'II级预警'
: row.cellValue == 4
? 'I 级预警'
: row.cellValue == 5
? '禁止接入'
: row.cellValue == 6
? '允许接入'
: ''}</span>`
} }
}, },
{ field: 'evaluateDate', title: '评估日期' }, { field: 'evaluateDate', title: '评估日期' },
@@ -165,7 +171,7 @@ const tableStore: any = new TableStore({
} }
], ],
loadCallback: () => {} loadCallback: () => { }
}) })
tableStore.table.params.evaluateType = '' tableStore.table.params.evaluateType = ''
tableStore.table.params.id = dictData.state.area[0].id tableStore.table.params.id = dictData.state.area[0].id
@@ -179,10 +185,10 @@ const quit = () => {
onMounted(() => { onMounted(() => {
tableStore.index() tableStore.index()
}) })
const addAssess=()=>{ const addAssess = () => {
addedShow.value = false addedShow.value = false
code.value = null code.value = null
activeName.value='1' activeName.value = '1'
} }
// 配置 // 配置
const configuration = () => { const configuration = () => {

View File

@@ -15,9 +15,9 @@
</TableHeader> </TableHeader>
<Table ref="tableRef" /> <Table ref="tableRef" />
<el-dialog draggable v-model="dialogVisible" :title="title" width="600" :before-close="handleClose"> <el-dialog draggable v-model="dialogVisible" :title="title" width="600" :before-close="handleClose">
<el-form ref="ruleFormRef" :model="form" label-width="180px" :disabled="disabled" :rules="rules"> <el-form ref="ruleFormRef" :model="form" label-width="auto" :disabled="disabled" :rules="rules">
<el-form-item label="用户名称:" prop="userName"> <el-form-item label="用户名称:" prop="userName">
<el-input v-model.trim="form.userName" clearable placeholder="请输入用户名称" /> <el-input v-model.trim="form.userName" clearable placeholder="请输入用户名称" maxlength="32" show-word-limit/>
</el-form-item> </el-form-item>
<el-form-item label="用户类型:" prop="userType"> <el-form-item label="用户类型:" prop="userType">
<el-select v-model="form.userType" clearable placeholder="请选择用户类型" @change="useChange"> <el-select v-model="form.userType" clearable placeholder="请选择用户类型" @change="useChange">
@@ -39,6 +39,8 @@
style="width: 100%" style="width: 100%"
v-model="form.protocolCapacity" v-model="form.protocolCapacity"
:min="0" :min="0"
:precision="4"
:max="10000000"
placeholder="请输入用容量" placeholder="请输入用容量"
/> />
</el-form-item> </el-form-item>
@@ -51,6 +53,7 @@
clearable clearable
v-model="form.area" v-model="form.area"
:autosize="{ minRows: 2, maxRows: 4 }" :autosize="{ minRows: 2, maxRows: 4 }"
maxlength="300" show-word-limit
type="textarea" type="textarea"
placeholder="请输入详细地址" placeholder="请输入详细地址"
/> />
@@ -271,12 +274,14 @@ const onSubmit = () => {
ElMessage.success('新增成功!') ElMessage.success('新增成功!')
dialogVisible.value = false dialogVisible.value = false
tableStore.index() tableStore.index()
handleClose()
}) })
} else if (title.value == '编辑承载能力预评估用户') { } else if (title.value == '编辑承载能力预评估用户') {
updateUse(form.value).then(res => { updateUse(form.value).then(res => {
ElMessage.success('修改成功!') ElMessage.success('修改成功!')
dialogVisible.value = false dialogVisible.value = false
tableStore.index() tableStore.index()
handleClose()
}) })
} }
} }

View File

@@ -158,7 +158,7 @@ const tableStore = new TableStore({
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
confine: true, confine: true,
formatter: function (param) { formatter: function (param) {

View File

@@ -79,7 +79,7 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
calculable: true, calculable: true,

View File

@@ -1119,7 +1119,7 @@ const rendering = () => {
smooth: true, smooth: true,
itemStyle: { itemStyle: {
normal: { normal: {
color: '#339900' color: '#009900'
} }
}, },
@@ -1136,7 +1136,7 @@ const rendering = () => {
barWidth: 22, barWidth: 22,
itemStyle: { itemStyle: {
normal: { normal: {
color: '#FF3300' color: '#CC0000'
} }
}, },
data: item.cvalue data: item.cvalue
@@ -1317,7 +1317,7 @@ const getEcharts = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function (params: any) { formatter: function (params: any) {
let tips = '' let tips = ''
@@ -1546,7 +1546,7 @@ const getEcharts = () => {
symbolSize: 0, symbolSize: 0,
itemStyle: { itemStyle: {
normal: { normal: {
color: '#FF3300' color: '#CC0000'
} }
} }
}, },

View File

@@ -6,12 +6,8 @@
</el-form-item> </el-form-item>
<el-form-item label="对比"> <el-form-item label="对比">
<el-select v-model="searchType" clearable placeholder="可选择同比、环比"> <el-select v-model="searchType" clearable placeholder="可选择同比、环比">
<el-option <el-option v-for="item in searchTypeOptions" :key="item.value" :label="item.label"
v-for="item in searchTypeOptions" :value="item.value" />
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@@ -215,7 +211,7 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function (params: any) { formatter: function (params: any) {
//console.log(params) //console.log(params)
let msg = '' let msg = ''
@@ -231,7 +227,7 @@ const init = () => {
} }
}, },
xAxis: { xAxis: {
name:'指标类型', name: '指标类型',
type: 'category', type: 'category',
axisLine: { axisLine: {
lineStyle: { lineStyle: {

View File

@@ -77,7 +77,7 @@ const init = () => {
fontSize: 14 fontSize: 14
}, },
borderColor: '#fff', borderColor: '#fff',
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function (params: any) { formatter: function (params: any) {
if (params.value >= 5) { if (params.value >= 5) {
return params.name + ' : ' + '优质' return params.name + ' : ' + '优质'
@@ -178,17 +178,17 @@ const init = () => {
} }
}) })
}, },
itemStyle:{ itemStyle: {
color: (params: any) => { color: (params: any) => {
if(params.value > 5){ if (params.value > 5) {
return gradeColor5[0] return gradeColor5[0]
}else if(params.value > 4){ } else if (params.value > 4) {
return gradeColor5[1] return gradeColor5[1]
}else if(params.value > 3){ } else if (params.value > 3) {
return gradeColor5[2] return gradeColor5[2]
}else if(params.value > 2){ } else if (params.value > 2) {
return gradeColor5[3] return gradeColor5[3]
}else{ } else {
return gradeColor5[4] return gradeColor5[4]
} }
} }

View File

@@ -10,11 +10,8 @@
<div class="boxSteps"> <div class="boxSteps">
<el-steps> <el-steps>
<template v-for="(item, i) in Voltage"> <template v-for="(item, i) in Voltage">
<el-step <el-step :class="active == i ? 'highlight' : ''" :title="item.name"
:class="active == i ? 'highlight' : ''" @click="handleClick(i)"></el-step>
:title="item.name"
@click="handleClick(i)"
></el-step>
</template> </template>
</el-steps> </el-steps>
</div> </div>
@@ -106,7 +103,7 @@ const echart = (row: any) => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
legend: { legend: {
@@ -205,19 +202,23 @@ defineExpose({ open })
:deep(.el-select) { :deep(.el-select) {
min-width: 80px; min-width: 80px;
} }
.title { .title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 10px; margin: 10px;
span { span {
font-weight: 550; font-weight: 550;
font-size: 18px; font-size: 18px;
} }
} }
.pie { .pie {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.evaluationData { .evaluationData {
height: 40px; height: 40px;
margin: 8px 30px; margin: 8px 30px;
@@ -226,6 +227,7 @@ defineExpose({ open })
display: flex; display: flex;
font-size: 18px; font-size: 18px;
line-height: 40px; line-height: 40px;
img { img {
height: 30px; height: 30px;
width: 30px; width: 30px;
@@ -236,6 +238,7 @@ defineExpose({ open })
.el-steps { .el-steps {
margin-top: 5px; margin-top: 5px;
} }
:deep(.el-step__icon) { :deep(.el-step__icon) {
border: none; border: none;
background: #ccc; background: #ccc;
@@ -243,15 +246,18 @@ defineExpose({ open })
width: 15px; width: 15px;
height: 15px; height: 15px;
} }
:deep(.el-step__icon-inner) { :deep(.el-step__icon-inner) {
display: none; display: none;
} }
:deep(.boxSteps) { :deep(.boxSteps) {
border-radius: 50px; border-radius: 50px;
width: 60%; width: 60%;
height: 25px; height: 25px;
margin: auto; margin: auto;
margin-top: 30px; margin-top: 30px;
.el-step__title { .el-step__title {
line-height: 18px; line-height: 18px;
font-size: 16px; font-size: 16px;
@@ -262,14 +268,17 @@ defineExpose({ open })
top: -50px; top: -50px;
} }
} }
:deep(.highlight) { :deep(.highlight) {
.el-step__icon { .el-step__icon {
background: var(--el-color-primary); background: var(--el-color-primary);
} }
.el-step__title { .el-step__title {
font-weight: 700 !important; font-weight: 700 !important;
color: var(--el-color-primary) !important; color: var(--el-color-primary) !important;
} }
// .is-wait { // .is-wait {
// color: var(--el-color-primary) !important; // color: var(--el-color-primary) !important;
// } // }

View File

@@ -10,11 +10,8 @@
<div class="boxSteps"> <div class="boxSteps">
<el-steps> <el-steps>
<template v-for="(item, i) in Voltage"> <template v-for="(item, i) in Voltage">
<el-step <el-step :class="active == i ? 'highlight' : ''" :title="item.name"
:class="active == i ? 'highlight' : ''" @click="handleClick(i)"></el-step>
:title="item.name"
@click="handleClick(i)"
></el-step>
</template> </template>
</el-steps> </el-steps>
</div> </div>
@@ -111,7 +108,7 @@ const echart = (row: any) => {
let chart = echarts.init(chartRef.value as HTMLDivElement) let chart = echarts.init(chartRef.value as HTMLDivElement)
let dataname = [ '频率偏差(Hz)', let dataname = ['频率偏差(Hz)',
'电压偏差(%)', '电压偏差(%)',
'电压总谐波畸变率(%)', '电压总谐波畸变率(%)',
'三相电压不平衡度(%)', '三相电压不平衡度(%)',
@@ -145,9 +142,9 @@ const echart = (row: any) => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
position:'bottom' position: 'bottom'
}, },
legend: { legend: {
data: row.map((item: any) => item.time), data: row.map((item: any) => item.time),
@@ -253,19 +250,23 @@ defineExpose({ open })
:deep(.el-select) { :deep(.el-select) {
min-width: 80px; min-width: 80px;
} }
.title { .title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin: 10px; margin: 10px;
span { span {
font-weight: 550; font-weight: 550;
font-size: 18px; font-size: 18px;
} }
} }
.pie { .pie {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.evaluationData { .evaluationData {
height: 33px; height: 33px;
margin: 8px 30px; margin: 8px 30px;
@@ -274,6 +275,7 @@ defineExpose({ open })
display: flex; display: flex;
font-size: 18px; font-size: 18px;
line-height: 35px; line-height: 35px;
img { img {
height: 25px; height: 25px;
width: 25px; width: 25px;
@@ -284,6 +286,7 @@ defineExpose({ open })
.el-steps { .el-steps {
margin-top: 5px; margin-top: 5px;
} }
:deep(.el-step__icon) { :deep(.el-step__icon) {
border: none; border: none;
background: #ccc; background: #ccc;
@@ -291,15 +294,18 @@ defineExpose({ open })
width: 15px; width: 15px;
height: 15px; height: 15px;
} }
:deep(.el-step__icon-inner) { :deep(.el-step__icon-inner) {
display: none; display: none;
} }
:deep(.boxSteps) { :deep(.boxSteps) {
border-radius: 50px; border-radius: 50px;
width: 60%; width: 60%;
height: 25px; height: 25px;
margin: auto; margin: auto;
margin-top: 30px; margin-top: 30px;
.el-step__title { .el-step__title {
line-height: 18px; line-height: 18px;
font-size: 16px; font-size: 16px;
@@ -310,18 +316,22 @@ defineExpose({ open })
top: -50px; top: -50px;
} }
} }
:deep(.highlight) { :deep(.highlight) {
.el-step__icon { .el-step__icon {
background: var(--el-color-primary); background: var(--el-color-primary);
} }
.el-step__title { .el-step__title {
font-weight: 700 !important; font-weight: 700 !important;
color: var(--el-color-primary) !important; color: var(--el-color-primary) !important;
} }
// .is-wait { // .is-wait {
// color: var(--el-color-primary) !important; // color: var(--el-color-primary) !important;
// } // }
} }
:deep(.el-dialog__body) { :deep(.el-dialog__body) {
max-height: none !important; max-height: none !important;
} }

View File

@@ -1,19 +1,10 @@
<template> <template>
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime/> <DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
<el-select <el-select class="conditions" v-model="formData.conditions" placeholder="请选择指标" style="width: 200px"
class="conditions" @change="History">
v-model="formData.conditions"
placeholder="请选择指标"
style="width: 200px"
@change="History"
>
<el-option-group v-for="group in indexOptions" :key="group.label" :label="group.label"> <el-option-group v-for="group in indexOptions" :key="group.label" :label="group.label">
<el-option <el-option v-for="item in group.options" :key="item.value" :label="item.label"
v-for="item in group.options" :value="item.value"></el-option>
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-option-group> </el-option-group>
</el-select> </el-select>
<MyEChart v-loading="loading" :options="list[0]?.option" :style="`height: calc(${rowHeight} - 31px)`" /> <MyEChart v-loading="loading" :options="list[0]?.option" :style="`height: calc(${rowHeight} - 31px)`" />
@@ -1077,7 +1068,7 @@ const rendering = () => {
barWidth: 22, barWidth: 22,
itemStyle: { itemStyle: {
normal: { normal: {
color: '#FF3300' color: '#CC0000'
} }
}, },
data: item.cvalue data: item.cvalue
@@ -1258,7 +1249,7 @@ const getEcharts = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function (params: any) { formatter: function (params: any) {
let tips = '' let tips = ''
@@ -1273,29 +1264,29 @@ const getEcharts = () => {
params[i].value[1] > 0 params[i].value[1] > 0
? 'A相谐波电流方向:流入<br/>' ? 'A相谐波电流方向:流入<br/>'
: params[i].value[1] == 0 : params[i].value[1] == 0
? 'A相谐波电流方向:无<br/>' ? 'A相谐波电流方向:无<br/>'
: 'A相谐波电流方向:流出<br/>' : 'A相谐波电流方向:流出<br/>'
} else if (params[i].seriesName == 'B相谐波电流方向') { } else if (params[i].seriesName == 'B相谐波电流方向') {
tips += tips +=
params[i].value[1] > 0 params[i].value[1] > 0
? 'B相谐波电流方向:流入<br/>' ? 'B相谐波电流方向:流入<br/>'
: params[i].value[1] == 0 : params[i].value[1] == 0
? 'B相谐波电流方向:无<br/>' ? 'B相谐波电流方向:无<br/>'
: 'B相谐波电流方向:流出<br/>' : 'B相谐波电流方向:流出<br/>'
} else if (params[i].seriesName == 'C相谐波电流方向') { } else if (params[i].seriesName == 'C相谐波电流方向') {
tips += tips +=
params[i].value[1] > 0 params[i].value[1] > 0
? 'C相谐波电流方向:流入<br/>' ? 'C相谐波电流方向:流入<br/>'
: params[i].value[1] == 0 : params[i].value[1] == 0
? 'C相谐波电流方向:无<br/>' ? 'C相谐波电流方向:无<br/>'
: 'C相谐波电流方向:流出<br/>' : 'C相谐波电流方向:流出<br/>'
} else if (params[i].seriesName == '总谐波电流方向') { } else if (params[i].seriesName == '总谐波电流方向') {
tips += tips +=
params[i].value[1] > 0 params[i].value[1] > 0
? '总谐波电流方向:流入<br/>' ? '总谐波电流方向:流入<br/>'
: params[i].value[1] == 0 : params[i].value[1] == 0
? '总谐波电流方向:无<br/>' ? '总谐波电流方向:无<br/>'
: '总谐波电流方向:流出<br/>' : '总谐波电流方向:流出<br/>'
} else if (params[i].seriesName == '正序电压') { } else if (params[i].seriesName == '正序电压') {
let str = (params[i].value[1] * 1).toString() let str = (params[i].value[1] * 1).toString()
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g

View File

@@ -516,16 +516,16 @@ const open = async (id: string) => {
TargetData.value = res.data TargetData.value = res.data
let num = 0 let num = 0
let flag = 0 let flag = 0
let judgment=true let judgment = true
for (let k in res.data) { for (let k in res.data) {
if (k != 'lineId') { if (k != 'lineId') {
if(res.data[k] != '/'){ if (res.data[k] != '/') {
judgment=false judgment = false
} }
flag += (res.data[k] == '/' ? 0 : res.data[k]) flag += (res.data[k] == '/' ? 0 : res.data[k])
} }
} }
if (IntegrityNum.value == 0) { if (IntegrityNum.value == 0) {
num = 2 //完整性告警 num = 2 //完整性告警
} else { } else {
@@ -534,7 +534,7 @@ const open = async (id: string) => {
} else { } else {
num = 0 //无告警 num = 0 //无告警
} }
if(judgment){ if (judgment) {
num = 3 num = 3
} }
} }
@@ -581,7 +581,7 @@ const echart = (row: any) => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
legend: { legend: {

View File

@@ -8,12 +8,7 @@
<el-button type='primary' @click='init'>查询</el-button> <el-button type='primary' @click='init'>查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-descriptions <el-descriptions class='mt2' direction='vertical' :column='4' border>
class='mt2'
direction='vertical'
:column='4'
border
>
<el-descriptions-item align='center' label='名称'>{{ data.name }}</el-descriptions-item> <el-descriptions-item align='center' label='名称'>{{ data.name }}</el-descriptions-item>
<el-descriptions-item align='center' label='事件总数'>{{ data.gs }}</el-descriptions-item> <el-descriptions-item align='center' label='事件总数'>{{ data.gs }}</el-descriptions-item>
<el-descriptions-item align='center' label='可容忍'>{{ data.krr }}</el-descriptions-item> <el-descriptions-item align='center' label='可容忍'>{{ data.krr }}</el-descriptions-item>
@@ -85,9 +80,9 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
formatter: function(a: any) { formatter: function (a: any) {
var relVal = '' var relVal = ''
relVal = relVal =
'<font style=\'color:' + '<font style=\'color:' +

View File

@@ -8,12 +8,7 @@
<el-button type='primary' @click='init'>查询</el-button> <el-button type='primary' @click='init'>查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-descriptions <el-descriptions class='mt2' direction='vertical' :column='4' border>
class='mt2'
direction='vertical'
:column='4'
border
>
<el-descriptions-item align='center' label='名称'>{{ data.name }}</el-descriptions-item> <el-descriptions-item align='center' label='名称'>{{ data.name }}</el-descriptions-item>
<el-descriptions-item align='center' label='事件总数'>{{ data.gs }}</el-descriptions-item> <el-descriptions-item align='center' label='事件总数'>{{ data.gs }}</el-descriptions-item>
<el-descriptions-item align='center' label='可容忍'>{{ data.krr }}</el-descriptions-item> <el-descriptions-item align='center' label='可容忍'>{{ data.krr }}</el-descriptions-item>
@@ -84,9 +79,9 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
formatter: function(a: any) { formatter: function (a: any) {
var relVal = '' var relVal = ''
relVal = relVal =
'<font style=\'color:' + '<font style=\'color:' +
@@ -120,7 +115,7 @@ const init = () => {
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
max: function(value: any) { max: function (value: any) {
return value.max + 20 return value.max + 20
}, },
splitNumber: 10, splitNumber: 10,

View File

@@ -79,7 +79,7 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
calculable: true, calculable: true,

View File

@@ -107,8 +107,8 @@ const initFirst = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function(params: any) { formatter: function (params: any) {
let tips = '' let tips = ''
tips += '<font>时间:' + params[0].name + '</font><br/>' tips += '<font>时间:' + params[0].name + '</font><br/>'
tips += '<font>暂降次数:' + params[0].data + '</font>' tips += '<font>暂降次数:' + params[0].data + '</font>'
@@ -140,7 +140,7 @@ const initFirst = () => {
barMinHeight: 10, barMinHeight: 10,
itemStyle: { itemStyle: {
normal: { normal: {
color: function(params: any) { color: function (params: any) {
if (params.data == 0) { if (params.data == 0) {
return '#ccc' return '#ccc'
} else { } else {
@@ -193,7 +193,7 @@ const initSecond = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: '{a} <br/>{b} : {c} ({d}%)' formatter: '{a} <br/>{b} : {c} ({d}%)'
}, },
legend: { legend: {
@@ -241,9 +241,9 @@ const initThird = () => {
for (let i = 0; i < thirdData.value.length; i++) { for (let i = 0; i < thirdData.value.length; i++) {
typeArray.push(thirdData.value[i].type) typeArray.push(thirdData.value[i].type)
valueArray.push({ valueArray.push({
name: thirdData.value[i].type, name: thirdData.value[i].type,
value: thirdData.value[i].times value: thirdData.value[i].times
} }
) )
} }
thirdOptions.value = { thirdOptions.value = {
@@ -269,7 +269,7 @@ const initThird = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: '{a} <br/>{b} : {c} ({d}%)' formatter: '{a} <br/>{b} : {c} ({d}%)'
}, },
legend: { legend: {

View File

@@ -79,7 +79,7 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0 borderWidth: 0
}, },
calculable: true, calculable: true,

View File

@@ -11,12 +11,14 @@
<div style='flex: 1;' class='mt10 zanjiangfenbutongji'> <div style='flex: 1;' class='mt10 zanjiangfenbutongji'>
<div <div
style='position: absolute; right: 10px; top: 10px; z-index: 2;display: flex;align-items: center;font-size: 12px'> style='position: absolute; right: 10px; top: 10px; z-index: 2;display: flex;align-items: center;font-size: 12px'>
<el-tag style='width: 20px;height: 12px' :style='{background: gradeColor3[2]}'></el-tag> <el-tag style='width: 20px;height: 12px' :style='{ background: gradeColor3[2] }'></el-tag>
<span class='ml2' :style='{color: gradeColor3[2]}'> {{ 'X<60%' }} </span> <span class='ml2' :style='{ color: gradeColor3[2] }'> {{ 'X<60%' }} </span>
<el-tag class='ml10' style='width: 20px;height: 12px' :style='{background: gradeColor3[1]}'></el-tag> <el-tag class='ml10' style='width: 20px;height: 12px'
<span class='ml2' :style='{color: gradeColor3[1]}'>{{ '60%≤X<90%' }} </span> :style='{ background: gradeColor3[1] }'></el-tag>
<el-tag class='ml10' style='width: 20px;height: 12px' :style='{background: gradeColor3[0]}'></el-tag> <span class='ml2' :style='{ color: gradeColor3[1] }'>{{ '60%≤X<90%' }} </span>
<span class='ml2' :style='{color: gradeColor3[0]}'> {{ 'X≥90 %' }}</span> <el-tag class='ml10' style='width: 20px;height: 12px'
:style='{ background: gradeColor3[0] }'></el-tag>
<span class='ml2' :style='{ color: gradeColor3[0] }'> {{ 'X≥90 %' }}</span>
</div> </div>
<my-echart :options='secondOptions' style='flex: 1;height: 100%' /> <my-echart :options='secondOptions' style='flex: 1;height: 100%' />
<my-echart :options='firstOptions' style='flex: 1;height: 100%' /> <my-echart :options='firstOptions' style='flex: 1;height: 100%' />
@@ -97,8 +99,8 @@ const initFirst = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function(params: any) { formatter: function (params: any) {
let tips = '' let tips = ''
tips += '时间:' + year + '-' + params[0].name + '</br/>' tips += '时间:' + year + '-' + params[0].name + '</br/>'
for (let i = 0; i < params.length; i++) { for (let i = 0; i < params.length; i++) {
@@ -237,8 +239,8 @@ const initSecond = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
formatter: function(params: any) { formatter: function (params: any) {
let res = '时间: ' + params[0].name + '<br/>运行状态:' let res = '时间: ' + params[0].name + '<br/>运行状态:'
let texts = '' let texts = ''
if (params[0].value === 2 || params[0].value === '2') { if (params[0].value === 2 || params[0].value === '2') {
@@ -283,7 +285,7 @@ const initSecond = () => {
color: 'blue' color: 'blue'
}, },
// 这里重新定义就可以 // 这里重新定义就可以
formatter: function(value: number) { formatter: function (value: number) {
let texts = [] let texts = []
if (value === 2) { if (value === 2) {
texts.push('退出') texts.push('退出')

View File

@@ -174,9 +174,9 @@ const initEchart = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.35)', backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0, borderWidth: 0,
formatter: function(params: any) { formatter: function (params: any) {
let tips = '' let tips = ''
tips += '<font>暂降幅值(p.u.):' + apiData.value.amplitudes[params.value[0]] + '</font><br/>' tips += '<font>暂降幅值(p.u.):' + apiData.value.amplitudes[params.value[0]] + '</font><br/>'
tips += '<font>持续时间(s):' + apiData.value.durations[params.value[1]] + '</font><br/>' tips += '<font>持续时间(s):' + apiData.value.durations[params.value[1]] + '</font><br/>'

View File

@@ -2,7 +2,7 @@
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title"> <el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title">
<el-scrollbar> <el-scrollbar>
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef"> <el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
<el-form-item label="部门编号:" prop="code"> <el-form-item label="部门编号:">
<el-input v-model="form.code" placeholder="请输入部门编号"></el-input> <el-input v-model="form.code" placeholder="请输入部门编号"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="top" label="部门名称:" prop="name"> <el-form-item class="top" label="部门名称:" prop="name">
@@ -18,7 +18,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="top" label="子类型:" prop="specialType"> <el-form-item class="top" label="子类型:" >
<el-select v-model="form.specialType" placeholder="选择子类型" style="width: 100%"> <el-select v-model="form.specialType" placeholder="选择子类型" style="width: 100%">
<el-option <el-option
v-for="item in ziDeptOption" v-for="item in ziDeptOption"