886 lines
31 KiB
Vue
886 lines
31 KiB
Vue
<template>
|
|
<div class="theoreticalpowerCurve">
|
|
<el-container class="mainContainer">
|
|
<el-card class="box-card1">
|
|
<div class="mainHeader">
|
|
<el-text class="mx-1 title">风机规格型号列表</el-text>
|
|
<el-button :icon="CirclePlusFilled" type="primary" @click="addItem">新增</el-button>
|
|
</div>
|
|
<div class="tabsPart">
|
|
<el-table :data="theoreticalTableData" class="tablePart" @current-change="handleCurrentChange" :row-class-name="rowClassName">
|
|
<el-table-column prop="index" :label="theoreticalEnums['index']" align="center"> </el-table-column>
|
|
<el-table-column prop="madeinfactory" :label="theoreticalEnums['madeinfactory']" align="center"> </el-table-column>
|
|
<el-table-column prop="model" :label="theoreticalEnums['model']" align="center"> </el-table-column>
|
|
<el-table-column prop="nominalCapacity" :label="theoreticalEnums['nominalCapacity']" align="center"> </el-table-column>
|
|
<el-table-column label="操作" width="400" align="center">
|
|
<template #default="scope">
|
|
<div class="tableOperate">
|
|
<a @click="viewDetails(scope.row)">查看 </a>
|
|
<a @click="deleteDetails(scope.row)">删除</a>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div class="mainFooter">
|
|
<el-pagination
|
|
v-model:current-page="paginationOptions.current"
|
|
v-model:page-size="paginationOptions.pageSize"
|
|
:total="paginationOptions.total"
|
|
:page-sizes="paginationOptions.pageSizes"
|
|
background
|
|
:pager-count="7"
|
|
layout="prev, pager, next"
|
|
@change="getcurrentPage"
|
|
></el-pagination>
|
|
</div>
|
|
</el-card>
|
|
<div class="bottom">
|
|
<el-card class="box-card2 bottom-left">
|
|
<div class="mainHeader">
|
|
<el-text class="mx-1 title">理论功率曲线</el-text>
|
|
<div class="right">
|
|
<el-upload :show-file-list="false" :http-request="update">
|
|
<template #trigger>
|
|
<el-button :icon="Refresh" type="primary">更新</el-button>
|
|
</template>
|
|
</el-upload>
|
|
<el-button :icon="Download" type="primary" @click="download">下载</el-button>
|
|
</div>
|
|
</div>
|
|
<div ref="chartContainer" class="chartContainer"></div>
|
|
</el-card>
|
|
<el-card class="box-card3">
|
|
<div>
|
|
<div class="mainHeader">
|
|
<el-text class="mx-1 title">故障码字典</el-text>
|
|
<div class="right">
|
|
<el-upload :show-file-list="false" :http-request="update3">
|
|
<template #trigger>
|
|
<el-button :icon="Refresh" type="primary">更新</el-button>
|
|
</template>
|
|
</el-upload>
|
|
<el-button :icon="Download" type="primary" @click="download3">下载</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="tabsPart">
|
|
<el-table :data="faultCodeDictpageData" class="tablePart">
|
|
<el-table-column prop="code" label="编码" align="center"> </el-table-column>
|
|
<el-table-column prop="description" label="描述" align="center"> </el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div class="mainFooter">
|
|
<el-pagination
|
|
v-model:current-page="paginationOptions3.current"
|
|
v-model:page-size="paginationOptions3.pageSize"
|
|
:total="paginationOptions3.total"
|
|
:page-sizes="paginationOptions3.pageSizes"
|
|
background
|
|
:pager-count="5"
|
|
layout="prev, pager, next"
|
|
@size-change="handleSizeChange3"
|
|
@current-change="handleCurrentChange3"
|
|
></el-pagination>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</div>
|
|
|
|
<div class="bottom">
|
|
<el-card class="box-card3 bottom-left">
|
|
<div>
|
|
<div class="mainHeader">
|
|
<el-text class="mx-1 title">故障录波变量描述</el-text>
|
|
<div class="right">
|
|
<el-upload :show-file-list="false" :http-request="update1">
|
|
<template #trigger>
|
|
<el-button :icon="Refresh" type="primary">更新</el-button>
|
|
</template>
|
|
</el-upload>
|
|
<el-button :icon="Download" type="primary" @click="download1">下载</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="tabsPart">
|
|
<el-table :data="faultRecordingpageData" class="tablePart">
|
|
<el-table-column prop="variable" label="变量" align="center"> </el-table-column>
|
|
<el-table-column prop="description" label="中文" align="center"> </el-table-column>
|
|
<el-table-column prop="unit" label="单位" align="center"> </el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div class="mainFooter">
|
|
<el-pagination
|
|
v-model:current-page="paginationOptions1.current"
|
|
v-model:page-size="paginationOptions1.pageSize"
|
|
:total="paginationOptions1.total"
|
|
:page-sizes="paginationOptions1.pageSizes"
|
|
background
|
|
:pager-count="5"
|
|
layout="prev, pager, next"
|
|
@size-change="handleSizeChange1"
|
|
@current-change="handleCurrentChange1"
|
|
></el-pagination>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
<el-card class="box-card3">
|
|
<div>
|
|
<div class="mainHeader">
|
|
<el-text class="mx-1 title">运行日志变量描述</el-text>
|
|
<div class="right">
|
|
<el-upload :show-file-list="false" :http-request="update2">
|
|
<template #trigger>
|
|
<el-button :icon="Refresh" type="primary">更新</el-button>
|
|
</template>
|
|
</el-upload>
|
|
<el-button :icon="Download" type="primary" @click="download2">下载</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="tabsPart">
|
|
<el-table :data="runLogpageData" class="tablePart">
|
|
<el-table-column prop="variable" label="变量" align="center"> </el-table-column>
|
|
<el-table-column prop="description" label="中文" align="center"> </el-table-column>
|
|
<el-table-column prop="unit" label="单位" align="center"> </el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div class="mainFooter">
|
|
<el-pagination
|
|
v-model:current-page="paginationOptions2.current"
|
|
v-model:page-size="paginationOptions2.pageSize"
|
|
:total="paginationOptions2.total"
|
|
:page-sizes="paginationOptions2.pageSizes"
|
|
background
|
|
:pager-count="5"
|
|
layout="prev, pager, next"
|
|
@size-change="handleSizeChange2"
|
|
@current-change="handleCurrentChange2"
|
|
></el-pagination>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</div>
|
|
</el-container>
|
|
<el-dialog v-model="dialogOpen" :title="dialogTitle" width="720">
|
|
<el-form
|
|
ref="factoryDetails"
|
|
:inline="true"
|
|
label-width="auto"
|
|
:model="factoryData"
|
|
:rules="factoryRules"
|
|
style="padding: 5px 15px; font-size: 14px; line-height: 1.5; word-wrap: break-word; font-size: 20px"
|
|
>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-form-item :label="theoreticalEnums['madeinfactory']" prop="madeinfactory">
|
|
<el-input v-model="factoryData.madeinfactory" placeholder="请输入生产厂家" clearable />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item :label="theoreticalEnums['model']" prop="model">
|
|
<el-input v-model="factoryData.model" placeholder="请输入规格型号" clearable />
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item :label="theoreticalEnums['nominalCapacity']">
|
|
<el-input v-model="factoryData.nominalCapacity" placeholder="请输入额定容量" clearable />
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
|
|
<template #footer>
|
|
<div class="dialog-footer">
|
|
<el-button type="primary" @click="saveFactory">保存</el-button>
|
|
<el-button @click="dialogOpen = false">取消</el-button>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { reactive, ref, onMounted, markRaw } from 'vue'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { Refresh, CirclePlusFilled, Download } from '@element-plus/icons-vue'
|
|
import { encrypt_aes, generateRandomNumber } from '/@/utils/crypto'
|
|
import { theoreticalEnums } from './type'
|
|
import {
|
|
theoreticalpowerCurveList,
|
|
saveData,
|
|
updateData,
|
|
deleteData,
|
|
importData,
|
|
exportData,
|
|
powerCurveQuery,
|
|
importfdrData,
|
|
exportfdrData,
|
|
importplcData,
|
|
exportplcData,
|
|
queryFdrDesc,
|
|
queryplcDesc,
|
|
importfaultCodeDict,
|
|
exportfaultCodeDict,
|
|
queryfaultCodeDict,
|
|
} from '/@/api/backend/theoreticalpowerCurve/request'
|
|
import * as echarts from 'echarts'
|
|
// 导入
|
|
const update = (file: any) => {
|
|
const formData = new FormData()
|
|
formData.append('file', file.file)
|
|
const v = generateRandomNumber(16)
|
|
const id = encrypt_aes(currentRow.value.id, v)
|
|
formData.append('id', id)
|
|
return importData(formData, v)
|
|
.then((res: any) => {
|
|
if (res.success) {
|
|
ElMessage.success('更新成功')
|
|
getpowerCurve()
|
|
getFaultRecording()
|
|
getRunLog()
|
|
} else {
|
|
ElMessage.error(res.msg)
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '更新失败')
|
|
})
|
|
}
|
|
|
|
// 导出
|
|
const download = () => {
|
|
console.log(currentRow)
|
|
exportData({ id: currentRow.value.id }).then((res: any) => {
|
|
const downloadUrl = window.URL.createObjectURL(res)
|
|
const a = document.createElement('a')
|
|
a.href = downloadUrl
|
|
a.download = '理论风速曲线' + new Date().getTime()
|
|
document.body.appendChild(a)
|
|
a.click()
|
|
window.URL.revokeObjectURL(downloadUrl)
|
|
document.body.removeChild(a)
|
|
})
|
|
}
|
|
|
|
// 导入
|
|
const update1 = (file: any) => {
|
|
const formData = new FormData()
|
|
formData.append('file', file.file)
|
|
const v = generateRandomNumber(16)
|
|
const id = encrypt_aes(currentRow.value.id, v)
|
|
formData.append('id', id)
|
|
return importfdrData(formData, v)
|
|
.then((res: any) => {
|
|
if (res.success) {
|
|
ElMessage.success('更新成功')
|
|
getFaultRecording()
|
|
} else {
|
|
ElMessage.error(res.msg)
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '更新失败')
|
|
})
|
|
}
|
|
|
|
// 导出
|
|
const download1 = () => {
|
|
console.log(currentRow)
|
|
exportfdrData({ id: currentRow.value.id }).then((res: any) => {
|
|
const downloadUrl = window.URL.createObjectURL(res)
|
|
const a = document.createElement('a')
|
|
a.href = downloadUrl
|
|
a.download = '故障录波变量' + new Date().getTime()
|
|
document.body.appendChild(a)
|
|
a.click()
|
|
window.URL.revokeObjectURL(downloadUrl)
|
|
document.body.removeChild(a)
|
|
})
|
|
}
|
|
|
|
// 导入
|
|
const update2 = (file: any) => {
|
|
const formData = new FormData()
|
|
formData.append('file', file.file)
|
|
const v = generateRandomNumber(16)
|
|
const id = encrypt_aes(currentRow.value.id, v)
|
|
formData.append('id', id)
|
|
return importplcData(formData, v)
|
|
.then((res: any) => {
|
|
if (res.success) {
|
|
ElMessage.success('更新成功')
|
|
getRunLog()
|
|
} else {
|
|
ElMessage.error(res.msg)
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '更新失败')
|
|
})
|
|
}
|
|
|
|
// 导出
|
|
const download2 = () => {
|
|
console.log(currentRow)
|
|
exportplcData({ id: currentRow.value.id }).then((res: any) => {
|
|
const downloadUrl = window.URL.createObjectURL(res)
|
|
const a = document.createElement('a')
|
|
a.href = downloadUrl
|
|
a.download = '运行日志变量' + new Date().getTime()
|
|
document.body.appendChild(a)
|
|
a.click()
|
|
window.URL.revokeObjectURL(downloadUrl)
|
|
document.body.removeChild(a)
|
|
})
|
|
}
|
|
|
|
// 导入
|
|
const update3 = (file: any) => {
|
|
const formData = new FormData()
|
|
formData.append('file', file.file)
|
|
const v = generateRandomNumber(16)
|
|
const id = encrypt_aes(currentRow.value.id, v)
|
|
formData.append('id', id)
|
|
return importfaultCodeDict(formData, v)
|
|
.then((res: any) => {
|
|
if (res.success) {
|
|
ElMessage.success('更新成功')
|
|
getfaultCodeDict()
|
|
} else {
|
|
ElMessage.error(res.msg)
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '更新失败')
|
|
})
|
|
}
|
|
|
|
// 导出
|
|
const download3 = () => {
|
|
console.log(currentRow)
|
|
console.log('🚀 ~ download3 ~ currentRow:', currentRow)
|
|
exportfaultCodeDict({ id: currentRow.value.id }).then((res: any) => {
|
|
const downloadUrl = window.URL.createObjectURL(res)
|
|
const a = document.createElement('a')
|
|
a.href = downloadUrl
|
|
a.download = '故障码字典' + new Date().getTime()
|
|
document.body.appendChild(a)
|
|
a.click()
|
|
window.URL.revokeObjectURL(downloadUrl)
|
|
document.body.removeChild(a)
|
|
})
|
|
}
|
|
|
|
const rowClassName = ({ row, rowIndex }: any) => {
|
|
if (currentRow.value === row) {
|
|
return 'current-row'
|
|
} else {
|
|
return ''
|
|
}
|
|
}
|
|
const option: any = reactive({
|
|
tooltip: {
|
|
formatter: function (params: any) {
|
|
return '风速:' + params.value[0] + 'm/s ' + ' <br/>' + '功率:' + params.value[1] + 'KW'
|
|
},
|
|
},
|
|
legend: {
|
|
show: true,
|
|
icon: 'circle',
|
|
itemGap: 20,
|
|
itemWidth: 8,
|
|
itemHeight: 8,
|
|
data: [],
|
|
},
|
|
xAxis: {
|
|
type: 'value',
|
|
name: 'm/s',
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLine: {
|
|
show: true,
|
|
},
|
|
axisTick: {
|
|
show: true,
|
|
},
|
|
},
|
|
yAxis: {
|
|
name: 'KW',
|
|
splitLine: {
|
|
show: false,
|
|
},
|
|
axisLine: {
|
|
show: false,
|
|
},
|
|
axisTick: {
|
|
show: false,
|
|
},
|
|
},
|
|
series: [],
|
|
})
|
|
const chart: any = ref(null)
|
|
const chartContainer = ref<HTMLElement | null>(null)
|
|
const dialogOpen = ref(false)
|
|
const dialogTitle = ref('新增厂家')
|
|
const factoryDetails = ref()
|
|
const factoryData: any = ref({})
|
|
const factoryRules = ref({
|
|
madeinfactory: [{ required: true, message: '请输入生产厂家', trigger: 'blur' }],
|
|
model: [
|
|
{
|
|
required: true,
|
|
message: '请输入规格型号',
|
|
trigger: 'blur',
|
|
},
|
|
],
|
|
})
|
|
const actionFlag = ref(1)
|
|
|
|
const addItem = () => {
|
|
factoryData.value = {
|
|
madeinfactory: '',
|
|
model: '',
|
|
nominalCapacity: '',
|
|
}
|
|
dialogTitle.value = '新增厂家'
|
|
actionFlag.value = 1
|
|
dialogOpen.value = true
|
|
}
|
|
|
|
const saveFactory = () => {
|
|
factoryDetails.value.validate((valid: any, fields: any) => {
|
|
if (valid) {
|
|
if (actionFlag.value == 1) {
|
|
saveData(factoryData.value)
|
|
.then((res: any) => {
|
|
if (res.code == 200) {
|
|
getList()
|
|
ElMessage.success(res.msg ?? '新增成功')
|
|
dialogOpen.value = false
|
|
} else {
|
|
ElMessage.error(res.msg ?? '新增失败')
|
|
dialogOpen.value = false
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '新增失败')
|
|
dialogOpen.value = false
|
|
})
|
|
} else if (actionFlag.value == 2) {
|
|
updateData(factoryData.value)
|
|
.then((res: any) => {
|
|
if (res.code == 200) {
|
|
getList()
|
|
ElMessage.success(res.msg ?? '修改成功')
|
|
dialogOpen.value = false
|
|
} else {
|
|
ElMessage.error(res.msg ?? '修改失败')
|
|
dialogOpen.value = false
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '修改失败')
|
|
dialogOpen.value = false
|
|
})
|
|
}
|
|
} else {
|
|
console.log('error submit!', fields)
|
|
}
|
|
})
|
|
}
|
|
|
|
const viewDetails = (val: any) => {
|
|
dialogTitle.value = '编辑厂家'
|
|
actionFlag.value = 2
|
|
dialogOpen.value = true
|
|
factoryData.value = { ...val }
|
|
}
|
|
|
|
const deleteDetails = (val: any) => {
|
|
const id = val.id
|
|
ElMessageBox.confirm('是否确认删除?', '提示', {
|
|
confirmButtonText: '确认',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
})
|
|
.then(() => {
|
|
deleteData({ id })
|
|
.then((res: any) => {
|
|
if (res.code == 200) {
|
|
ElMessage.success(res.msg ?? '删除成功')
|
|
currentRow.value = null
|
|
getList()
|
|
} else {
|
|
ElMessage.error(res.msg ?? '删除失败')
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '删除失败')
|
|
})
|
|
})
|
|
.catch(() => {
|
|
ElMessage({
|
|
type: 'info',
|
|
message: '取消确认',
|
|
})
|
|
})
|
|
}
|
|
|
|
const theoreticalTableData: any = ref([])
|
|
const faultRecordingData: any = ref([])
|
|
const faultRecordingpageData: any = ref([])
|
|
const runLogData: any = ref([])
|
|
const runLogpageData: any = ref([])
|
|
const faultCodeDictData: any = ref([])
|
|
const faultCodeDictpageData: any = ref([])
|
|
|
|
const handleSizeChange1 = (val: any) => {
|
|
paginationOptions1.pageSize = val
|
|
paginationOptions1.current = 1
|
|
faultRecordingpageData.value = faultRecordingData.value.slice(0, paginationOptions1.pageSize)
|
|
}
|
|
// 当前页改变时触发
|
|
const handleCurrentChange1 = (val: any) => {
|
|
paginationOptions1.current = val
|
|
const start = (paginationOptions1.current - 1) * paginationOptions1.pageSize
|
|
const end = start + paginationOptions1.pageSize
|
|
faultRecordingpageData.value = faultRecordingData.value.slice(start, end)
|
|
}
|
|
|
|
const handleSizeChange2 = (val: any) => {
|
|
paginationOptions2.pageSize = val
|
|
paginationOptions2.current = 1
|
|
runLogpageData.value = runLogData.value.slice(0, paginationOptions1.pageSize)
|
|
}
|
|
// 当前页改变时触发
|
|
const handleCurrentChange2 = (val: any) => {
|
|
paginationOptions2.current = val
|
|
const start = (paginationOptions2.current - 1) * paginationOptions2.pageSize
|
|
const end = start + paginationOptions2.pageSize
|
|
runLogpageData.value = runLogData.value.slice(start, end)
|
|
}
|
|
|
|
const handleSizeChange3 = (val: any) => {
|
|
paginationOptions3.pageSize = val
|
|
paginationOptions3.current = 1
|
|
faultCodeDictpageData.value = faultCodeDictData.value.slice(0, paginationOptions3.pageSize)
|
|
}
|
|
// 当前页改变时触发
|
|
const handleCurrentChange3 = (val: any) => {
|
|
paginationOptions3.current = val
|
|
const start = (paginationOptions3.current - 1) * paginationOptions3.pageSize
|
|
const end = start + paginationOptions3.pageSize
|
|
faultCodeDictpageData.value = faultCodeDictData.value.slice(start, end)
|
|
}
|
|
|
|
const getList = () => {
|
|
const transparams = searchParams()
|
|
theoreticalpowerCurveList(transparams)
|
|
.then((res: any) => {
|
|
if (res.code == 200) {
|
|
paginationOptions.total = res.total
|
|
theoreticalTableData.value = res.rows.map((item: any, index: number) => {
|
|
return {
|
|
...item,
|
|
index: index + 1,
|
|
}
|
|
})
|
|
getpowerCurve()
|
|
getFaultRecording()
|
|
getRunLog()
|
|
getfaultCodeDict()
|
|
} else {
|
|
ElMessage.error(res.msg ?? '查询失败')
|
|
}
|
|
})
|
|
.catch((err) => {
|
|
ElMessage.error(err?.response?.data?.msg ?? '查询失败')
|
|
})
|
|
}
|
|
|
|
const searchParams = (): any => {
|
|
return {
|
|
pageNum: paginationOptions.current,
|
|
pageSize: paginationOptions.pageSize,
|
|
}
|
|
}
|
|
const currentRow = ref()
|
|
|
|
const handleCurrentChange = (val: any) => {
|
|
currentRow.value = val
|
|
chart.value.clear()
|
|
paginationOptions1.current = 1
|
|
paginationOptions2.current = 1
|
|
getpowerCurve()
|
|
getFaultRecording()
|
|
getRunLog()
|
|
getfaultCodeDict()
|
|
}
|
|
const getpowerCurve = () => {
|
|
currentRow.value = currentRow.value ?? theoreticalTableData.value[0]
|
|
powerCurveQuery(currentRow.value.madeinfactory, currentRow.value.model).then((res) => {
|
|
if (res.code == 200) {
|
|
const resData = res.data
|
|
if (resData) {
|
|
const seriesData = resData.map((item: any) => {
|
|
return [item.speed, item.power]
|
|
})
|
|
const series = {
|
|
type: 'line',
|
|
data: seriesData,
|
|
name: currentRow.value.madeinfactory + currentRow.value.model,
|
|
smooth: true,
|
|
}
|
|
option.series = series
|
|
option.legend.data = [currentRow.value.madeinfactory + currentRow.value.model]
|
|
chart.value.setOption(option)
|
|
}
|
|
} else {
|
|
ElMessage.warning('查询失败')
|
|
}
|
|
})
|
|
}
|
|
|
|
const getFaultRecording = () => {
|
|
currentRow.value = currentRow.value ?? theoreticalTableData.value[0]
|
|
queryFdrDesc({ madeinfactory: currentRow.value.madeinfactory, model: currentRow.value.model }).then((res) => {
|
|
if (res.code == 200) {
|
|
faultRecordingData.value = [...res.data]
|
|
paginationOptions1.total = faultRecordingData.value.length
|
|
faultRecordingpageData.value = faultRecordingData.value.slice(0, paginationOptions1.pageSize)
|
|
} else {
|
|
ElMessage.warning('查询失败')
|
|
}
|
|
})
|
|
}
|
|
const getRunLog = () => {
|
|
currentRow.value = currentRow.value ?? theoreticalTableData.value[0]
|
|
queryplcDesc({ madeinfactory: currentRow.value.madeinfactory, model: currentRow.value.model }).then((res) => {
|
|
if (res.code == 200) {
|
|
runLogData.value = [...res.data]
|
|
paginationOptions2.total = runLogData.value.length
|
|
runLogpageData.value = runLogData.value.slice(0, paginationOptions2.pageSize)
|
|
} else {
|
|
ElMessage.warning('查询失败')
|
|
}
|
|
})
|
|
}
|
|
|
|
const getfaultCodeDict = () => {
|
|
currentRow.value = currentRow.value ?? theoreticalTableData.value[0]
|
|
queryfaultCodeDict({ madeinfactory: currentRow.value.madeinfactory, model: currentRow.value.model }).then((res) => {
|
|
if (res.code == 200) {
|
|
faultCodeDictData.value = [...res.data]
|
|
paginationOptions3.total = faultCodeDictData.value.length
|
|
faultCodeDictpageData.value = faultCodeDictData.value.slice(0, paginationOptions3.pageSize)
|
|
} else {
|
|
ElMessage.warning('查询失败')
|
|
}
|
|
})
|
|
}
|
|
|
|
const paginationOptions = reactive({
|
|
current: 1,
|
|
pageSize: 5,
|
|
total: 0,
|
|
pageSizes: [5],
|
|
})
|
|
const paginationOptions1 = reactive({
|
|
current: 1,
|
|
pageSize: 5,
|
|
total: 0,
|
|
pageSizes: [5, 50, 100],
|
|
})
|
|
const paginationOptions2 = reactive({
|
|
current: 1,
|
|
pageSize: 5,
|
|
total: 0,
|
|
pageSizes: [5, 50, 100],
|
|
})
|
|
|
|
const paginationOptions3 = reactive({
|
|
current: 1,
|
|
pageSize: 5,
|
|
total: 0,
|
|
pageSizes: [5, 50, 100],
|
|
})
|
|
const getcurrentPage = () => {
|
|
getList()
|
|
}
|
|
window.onresize = () => {
|
|
chart.value.resize()
|
|
}
|
|
onMounted(() => {
|
|
if (chartContainer.value) {
|
|
chart.value = markRaw(echarts.init(chartContainer.value))
|
|
chart.value.setOption({ option })
|
|
}
|
|
|
|
getList()
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
$headerHeight: 60px;
|
|
$defaultBackgroundColor: #fff;
|
|
$defaultAsideWidth: 260px;
|
|
$paginationHeight: 32px;
|
|
.theoreticalpowerCurve {
|
|
position: relative;
|
|
width: 100%;
|
|
background-color: #f2f3f5;
|
|
// background: transparent;
|
|
.mainContainer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
.mainHeader {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
height: $headerHeight;
|
|
padding: 0 20px;
|
|
.title {
|
|
border-left: 4px solid rgb(77, 147, 196);
|
|
border-bottom: 4px solid transparent;
|
|
border-right: 4px solid transparent;
|
|
border-top: 4px solid transparent;
|
|
padding: 4px;
|
|
}
|
|
.right {
|
|
display: flex;
|
|
flex-direction: row;
|
|
:deep(div) {
|
|
margin-right: 2px;
|
|
}
|
|
}
|
|
}
|
|
.mainFooter {
|
|
display: flex;
|
|
justify-content: right;
|
|
background-color: #fff;
|
|
}
|
|
.tabsPart {
|
|
height: 300px;
|
|
padding-bottom: 5px;
|
|
:deep(.el-tabs__content) {
|
|
height: 100%;
|
|
.el-tab-pane {
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
.box-card1 {
|
|
width: 100%;
|
|
margin-bottom: 20px;
|
|
.tablePart {
|
|
.alarm {
|
|
border: 1px solid rgb(228, 161, 18);
|
|
width: fit-content;
|
|
margin: 0 auto;
|
|
padding: 5px;
|
|
border-radius: 6px;
|
|
color: rgb(228, 161, 18);
|
|
}
|
|
.fault {
|
|
border: 1px solid #a03b1d;
|
|
width: fit-content;
|
|
margin: 0 auto;
|
|
padding: 5px;
|
|
border-radius: 6px;
|
|
color: #a03b1d;
|
|
}
|
|
}
|
|
.tableOperate {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
a {
|
|
margin: 5px;
|
|
color: #0064aa;
|
|
font-weight: 600;
|
|
&:hover {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
|
|
.chartContainer {
|
|
width: 50%;
|
|
height: 240px;
|
|
border: 1px solid rgb(217, 217, 217);
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.current-row {
|
|
background-color: #f0f9eb !important;
|
|
}
|
|
}
|
|
.box-card2 {
|
|
width: 50%;
|
|
.chartContainer {
|
|
width: 100%;
|
|
height: 200px;
|
|
border: 1px solid rgb(217, 217, 217);
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
|
|
.bottom {
|
|
display: flex;
|
|
flex-direction: row;
|
|
margin-bottom: 20px;
|
|
.bottom-left {
|
|
margin-right: 20px;
|
|
}
|
|
.tabsPart {
|
|
height: 240px;
|
|
padding-bottom: 5px;
|
|
:deep(.el-table .cell) {
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
.box-card3 {
|
|
width: 50%;
|
|
}
|
|
}
|
|
}
|
|
.modelOperate {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
width: 80px;
|
|
height: 150px;
|
|
.el-button {
|
|
margin: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
// 状态
|
|
.status-container {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.status-dot-online,
|
|
.status-dot-offline {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.status-dot-online {
|
|
background-color: #06b429;
|
|
}
|
|
|
|
.status-dot-offline {
|
|
background-color: red;
|
|
}
|
|
.highlight {
|
|
background-color: yellow; /* 高亮背景颜色 */
|
|
color: red; /* 字体颜色 */
|
|
font-weight: bold; /* 加粗字体 */
|
|
}
|
|
</style>
|