优化表格
This commit is contained in:
@@ -141,9 +141,10 @@ const tableStore = new TableStore({
|
||||
{ title: '暂降(聚升)幅值(%)', minWidth: 100, field: 'evtParamVVaDepth', align: 'center', sortable: true },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
@@ -165,9 +166,10 @@ const tableStore = new TableStore({
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
boxoList.value.persistTime = row.evtParamTm
|
||||
boxoList.value.featureAmplitude =
|
||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.systemType = 'ZL'
|
||||
row.evtParamVVaDepth != '-' ? (row.evtParamVVaDepth - 0) / 100 : null
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
}
|
||||
loading.value = false
|
||||
|
||||
@@ -136,6 +136,14 @@ const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '事件描述', field: 'showName', minWidth: 150 },
|
||||
{ title: '发生位置', field: 'evtParamPosition', minWidth: 150 },
|
||||
{
|
||||
@@ -160,6 +168,7 @@ const tableStore = new TableStore({
|
||||
{ title: '发生时刻', field: 'startTime', sortable: true, minWidth: 180 },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
@@ -184,8 +193,11 @@ const tableStore = new TableStore({
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
boxoList.value.featureAmplitude =
|
||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth.split('%')[0] / 100 : null
|
||||
boxoList.value.persistTime =
|
||||
row.evtParamTm != '-' ? Math.floor(row.evtParamTm * 10000) / 100 : null
|
||||
// boxoList.value.systemType = 'WX'
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
}
|
||||
loading.value = false
|
||||
|
||||
@@ -82,7 +82,7 @@ const tableStore: any = new TableStore({
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -1,123 +1,123 @@
|
||||
<!-- 解析列表 -->
|
||||
<template>
|
||||
<el-dialog v-model.trim="dialogVisible" title="详情" width="70%" draggable @closed="close">
|
||||
<div :style="tableHeight">
|
||||
<vxe-table border auto-resize height="auto" :data="tableData" v-bind="defaultAttribute">
|
||||
<vxe-column field="name" align="center" title="文件名称"></vxe-column>
|
||||
<vxe-column field="createTime" align="center" title="导入时间"></vxe-column>
|
||||
<vxe-column field="allCount" align="center" title="数据总数(条)" width="120"></vxe-column>
|
||||
<vxe-column field="realCount" align="center" title="已入库总数(条)" width="120"></vxe-column>
|
||||
<vxe-column field="state" align="center" title="解析状态" width="100">
|
||||
<template v-slot:default="scoped">
|
||||
<el-tag type="warning" v-if="scoped.row.state == 0">未解析</el-tag>
|
||||
<el-tag type="success" v-if="scoped.row.state == 1">解析成功</el-tag>
|
||||
<el-tag type="danger" v-if="scoped.row.state == 2">解析失败</el-tag>
|
||||
<el-tag type="primary" v-if="scoped.row.state == 3">文件不存在</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const emit = defineEmits(['back'])
|
||||
const dialogVisible = ref(false)
|
||||
const tableHeight = mainHeight(440)
|
||||
const height = ref(0)
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '',
|
||||
// publicHeight: height.value,
|
||||
showPage: false,
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox', fixed: 'left' },
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'name', title: '文件名称', minWidth: 170 },
|
||||
{ field: 'createTime', title: '导入时间', minWidth: 170 , sortable: true},
|
||||
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 , sortable: true},
|
||||
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170, sortable: true },
|
||||
{
|
||||
title: '解析状态',
|
||||
field: 'state',
|
||||
width: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success',
|
||||
2: 'danger',
|
||||
3: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解析',
|
||||
1: '解析成功',
|
||||
2: '解析失败',
|
||||
3: '文件不存在'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
// console.log(row.portableOfflLogList)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
//返回
|
||||
const handleBack = () => {
|
||||
emit('back')
|
||||
}
|
||||
const tableData: any = ref()
|
||||
const open = (val: any) => {
|
||||
dialogVisible.value = true
|
||||
tableData.value = val
|
||||
setTimeout(() => {
|
||||
tableStore.index()
|
||||
}, 10)
|
||||
}
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const updateViewportHeight = async () => {
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
tableStore.table.publicHeight = height.value
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
updateViewportHeight() // 初始化视口高度
|
||||
window.addEventListener('resize', updateViewportHeight) // 监听窗口大小变化
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('resize', updateViewportHeight) // 移除监听
|
||||
})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
overflow-y: none !important;
|
||||
max-height: 70vh !important;
|
||||
}
|
||||
</style>
|
||||
<!-- 解析列表 -->
|
||||
<template>
|
||||
<el-dialog v-model.trim="dialogVisible" title="详情" width="70%" draggable @closed="close">
|
||||
<div :style="tableHeight">
|
||||
<vxe-table border auto-resize height="auto" :data="tableData" v-bind="defaultAttribute">
|
||||
<vxe-column field="name" align="center" title="文件名称"></vxe-column>
|
||||
<vxe-column field="createTime" align="center" title="导入时间"></vxe-column>
|
||||
<vxe-column field="allCount" align="center" title="数据总数(条)" width="120"></vxe-column>
|
||||
<vxe-column field="realCount" align="center" title="已入库总数(条)" width="120"></vxe-column>
|
||||
<vxe-column field="state" align="center" title="解析状态" width="100">
|
||||
<template v-slot:default="scoped">
|
||||
<el-tag type="warning" v-if="scoped.row.state == 0">未解析</el-tag>
|
||||
<el-tag type="success" v-if="scoped.row.state == 1">解析成功</el-tag>
|
||||
<el-tag type="danger" v-if="scoped.row.state == 2">解析失败</el-tag>
|
||||
<el-tag type="primary" v-if="scoped.row.state == 3">文件不存在</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const emit = defineEmits(['back'])
|
||||
const dialogVisible = ref(false)
|
||||
const tableHeight = mainHeight(440)
|
||||
const height = ref(0)
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
|
||||
const tableStore: any = new TableStore({
|
||||
url: '',
|
||||
// publicHeight: height.value,
|
||||
showPage: false,
|
||||
column: [
|
||||
{ width: '60', type: 'checkbox', fixed: 'left' },
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'name', title: '文件名称', minWidth: 170 },
|
||||
{ field: 'createTime', title: '导入时间', minWidth: 170 , sortable: true},
|
||||
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 , sortable: true},
|
||||
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170, sortable: true },
|
||||
{
|
||||
title: '解析状态',
|
||||
field: 'state',
|
||||
width: 100,
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success',
|
||||
2: 'danger',
|
||||
3: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未解析',
|
||||
1: '解析成功',
|
||||
2: '解析失败',
|
||||
3: '文件不存在'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作', fixed: 'right',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
// console.log(row.portableOfflLogList)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = []
|
||||
}
|
||||
})
|
||||
//返回
|
||||
const handleBack = () => {
|
||||
emit('back')
|
||||
}
|
||||
const tableData: any = ref()
|
||||
const open = (val: any) => {
|
||||
dialogVisible.value = true
|
||||
tableData.value = val
|
||||
setTimeout(() => {
|
||||
tableStore.index()
|
||||
}, 10)
|
||||
}
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const updateViewportHeight = async () => {
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
tableStore.table.publicHeight = height.value
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
updateViewportHeight() // 初始化视口高度
|
||||
window.addEventListener('resize', updateViewportHeight) // 监听窗口大小变化
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener('resize', updateViewportHeight) // 移除监听
|
||||
})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
overflow-y: none !important;
|
||||
max-height: 70vh !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -50,10 +50,18 @@
|
||||
</el-descriptions-item> -->
|
||||
|
||||
<el-descriptions-item label="PT变比" width="160">
|
||||
{{ devData.ptRatio || '/' }}
|
||||
{{
|
||||
devData.ptRatio == null
|
||||
? '/'
|
||||
: devData.ptRatio + (devData.pt2Ratio == null ? '' : ':' + devData.pt2Ratio)
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="CT变比" width="160">
|
||||
{{ devData.ctRatio || '/' }}
|
||||
{{
|
||||
devData.ctRatio == null
|
||||
? '/'
|
||||
: devData.ctRatio + (devData.ct2Ratio == null ? '' : ':' + devData.ct2Ratio)
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<!-- <el-descriptions-item label="名称">
|
||||
|
||||
@@ -236,7 +236,7 @@ const tableStore = new TableStore({
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -56,11 +56,11 @@ const tableStore: any = new TableStore({
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '发生时刻', minWidth: 170, sortable: true },
|
||||
{ field: 'showName', title: '事件描述', minWidth: 170 },
|
||||
{ field: 'showName', title: '事件描述', minWidth: 120 },
|
||||
{
|
||||
field: 'phaseType',
|
||||
title: '相别',
|
||||
minWidth: 100,
|
||||
minWidth: 80,
|
||||
formatter: (row: any) => {
|
||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||
return row.cellValue
|
||||
@@ -69,7 +69,7 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
field: 'persistTime',
|
||||
title: '持续时间(s)',
|
||||
minWidth: 100,
|
||||
minWidth: 110,
|
||||
formatter: (row: any) => {
|
||||
console.log('row.cellValue', row.cellValue)
|
||||
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
|
||||
@@ -80,7 +80,7 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(聚升)幅值(%)',
|
||||
width: 100,
|
||||
minWidth: 130,
|
||||
formatter: (row: any) => {
|
||||
//row.cellValue = row.cellValue + '' ? row.cellValue.toFixed(2) : '/'
|
||||
row.cellValue = row.cellValue != null ? Number(row.cellValue).toFixed(2) : '/'
|
||||
@@ -91,10 +91,10 @@ const tableStore: any = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
width: 180,
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
@@ -118,7 +118,9 @@ const tableStore: any = new TableStore({
|
||||
boxoList.value = row
|
||||
boxoList.value.systemType = 'YPT'
|
||||
boxoList.value.engineeringName = tableParams.value.engineeringName
|
||||
console.log("🚀 ~ tableParams.value.engineeringName:", tableParams.value.engineeringName)
|
||||
boxoList.value.featureAmplitude =
|
||||
row.featureAmplitude != null ? Number(row.featureAmplitude / 100) : '-'
|
||||
boxoList.value.persistTime = row.persistTime ? row.persistTime.toFixed(2) : '-'
|
||||
wp.value = res.data
|
||||
view.value = false
|
||||
view2.value = true
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
v-bind="defaultAttribute"
|
||||
>
|
||||
<vxe-column type="seq" title="序号" width="80"></vxe-column>
|
||||
<vxe-column field="prjDataPath" align="center" title="名称" #default="{ row }">
|
||||
<vxe-column field="prjDataPath" align="center" title="名称" minWidth="180" #default="{ row }">
|
||||
<span
|
||||
style="cursor: pointer; color: #551a8b"
|
||||
:style="{
|
||||
@@ -91,15 +91,15 @@
|
||||
</span>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="startTime" align="center" title="文件时间" width="240" #default="{ row }">
|
||||
<vxe-column field="startTime" align="center" title="文件时间" minWidth="140" #default="{ row }">
|
||||
{{ row.startTime ? row.startTime : '/' }}
|
||||
</vxe-column>
|
||||
<vxe-column field="type" align="center" title="类型" width="120" #default="{ row }">
|
||||
<vxe-column field="type" align="center" title="类型" minWidth="100" #default="{ row }">
|
||||
<span>
|
||||
{{ row.type == 'dir' ? '文件夹' : row.type == 'file' ? '文件' : '/' }}
|
||||
</span>
|
||||
</vxe-column>
|
||||
<vxe-column field="size" align="center" width="120" title="大小" #default="{ row }">
|
||||
<vxe-column field="size" align="center" minWidth="100" title="大小" #default="{ row }">
|
||||
<span>
|
||||
{{ row.size && row.type == 'file' ? row.size + 'KB' : '/' }}
|
||||
</span>
|
||||
@@ -107,7 +107,7 @@
|
||||
<!--<vxe-column field="fileCheck" align="center" title="文件校验码" width="100" #default="{ row }">
|
||||
{{ row.fileCheck ? row.fileCheck : '/' }}
|
||||
</vxe-column> -->
|
||||
<vxe-column title="操作" width="200px">
|
||||
<vxe-column title="操作" width="120px" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link size="small" type="danger" @click="handleDelDirOrFile(row)">删除</el-button>
|
||||
<el-button
|
||||
@@ -596,10 +596,10 @@ mqttRef.value.on('connect', (e: any) => {
|
||||
})
|
||||
const mqttMessage = ref<any>({})
|
||||
const status: any = ref()
|
||||
function parseStringToObject(str:string) {
|
||||
function parseStringToObject(str: string) {
|
||||
const content = str.replace(/^{|}$/g, '')
|
||||
const pairs = content.split(',')
|
||||
const result:any = {}
|
||||
const result: any = {}
|
||||
pairs.forEach(pair => {
|
||||
const [key, value] = pair.split(':')
|
||||
// 尝试将数字转换为Number类型
|
||||
@@ -612,7 +612,6 @@ mqttRef.value.on('message', (topic: any, message: any) => {
|
||||
|
||||
let str = JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||
|
||||
|
||||
let regex = /fileName:(.*?),allStep/
|
||||
let regex1 = /allStep:(.*?),nowStep/
|
||||
let regex2 = /nowStep:(.*?),userId/
|
||||
|
||||
@@ -77,10 +77,10 @@ const tableStore = new TableStore({
|
||||
}, sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
width: 180,
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
|
||||
@@ -1,61 +1,69 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :isGroup="true" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/log/debug'
|
||||
})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/process/queryPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '设备名称', field: 'devName', align: 'center' },
|
||||
{ title: '操作用户', field: 'operatorName', align: 'center' },
|
||||
{
|
||||
title: '操作内容', field: 'process', align: 'center', formatter: (row: any) => {
|
||||
return row.cellValue == 1 ? '设备登记' : row.cellValue == 2 ? '功能调试' : row.cellValue == 3 ? '出厂调试' : row.cellValue == 4 ? '设备投运' : ''
|
||||
}
|
||||
},
|
||||
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
|
||||
{ title: '结束时间', field: 'endTime', align: 'center', sortable: true }
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.result = item.result === 1 ? '成功' : '失败'
|
||||
for (let key in item) {
|
||||
if (typeof item[key] !== 'number') {
|
||||
item[key] = item[key] || '/'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchState = 0
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="设备名称">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" :isGroup="true" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/log/debug'
|
||||
})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/process/queryPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '设备名称', field: 'devName', align: 'center' },
|
||||
{ title: '操作用户', field: 'operatorName', align: 'center' },
|
||||
{
|
||||
title: '操作内容', field: 'process', align: 'center', formatter: (row: any) => {
|
||||
return row.cellValue == 1 ? '设备登记' : row.cellValue == 2 ? '功能调试' : row.cellValue == 3 ? '出厂调试' : row.cellValue == 4 ? '设备投运' : ''
|
||||
}
|
||||
},
|
||||
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
|
||||
{ title: '结束时间', field: 'endTime', align: 'center', sortable: true }
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.result = item.result === 1 ? '成功' : '失败'
|
||||
for (let key in item) {
|
||||
if (typeof item[key] !== 'number') {
|
||||
item[key] = item[key] || '/'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchState = 0
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
|
||||
@@ -17,7 +17,14 @@ defineOptions({
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/cslog/queryLog',
|
||||
method: 'POST',
|
||||
column: [
|
||||
column: [ {
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '操作日期', field: 'createTime', align: 'center', sortable: true, minWidth: '150' },
|
||||
{ title: '操作描述', field: 'operate', align: 'center', minWidth: '300' },
|
||||
{ title: '用户名称', field: 'userName', align: 'center', minWidth: '130' },
|
||||
|
||||
@@ -111,10 +111,10 @@ const tableStore = new TableStore({
|
||||
{ title: '数据存储', field: 'classIdName', minWidth: 120 },
|
||||
{ title: '数据来源', field: 'resourcesIdName', minWidth: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -63,12 +63,20 @@ const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/devmodel/queryDevModelPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '装置型号', field: 'devTypeName' },
|
||||
{ title: '模板名称', field: 'name' },
|
||||
{ title: '版本号', field: 'versionNo' },
|
||||
{ title: '版本时间', field: 'versionDate', sortable: true },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -47,16 +47,25 @@ const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/edData/queryEdDataPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '装置型号', field: 'devTypeName' },
|
||||
{ title: '版本号', field: 'versionNo' },
|
||||
{ title: '版本协议', field: 'versionAgreement' },
|
||||
{ title: '版本日期', field: 'versionDate' },
|
||||
{ title: '归档日期', field: 'updateTime' },
|
||||
{ title: '描述', field: 'description' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '装置型号', field: 'devTypeName' ,minWidth: '100'},
|
||||
{ title: '版本号', field: 'versionNo' ,minWidth: '100'},
|
||||
{ title: '版本协议', field: 'versionAgreement' ,minWidth: '100'},
|
||||
{ title: '版本日期', field: 'versionDate' ,minWidth: '100'},
|
||||
{ title: '归档日期', field: 'updateTime',minWidth: '150' },
|
||||
{ title: '描述', field: 'description',minWidth: '200' },
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
render: 'tag',
|
||||
minWidth: '80',
|
||||
custom: {
|
||||
0: 'error',
|
||||
1: 'success'
|
||||
@@ -67,7 +76,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -488,7 +488,7 @@ const tableStore = new TableStore({
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: 220,
|
||||
render: 'buttons',
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable placeholder="请输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { auditFeedBack } from '@/api/cs-system-boot/manage'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/manage/feedback'
|
||||
})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-system-boot/feedback/queryFeedBackPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '标题', field: 'title', align: 'center' },
|
||||
{ title: '描述', field: 'description', align: 'center' },
|
||||
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
width: '100',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '已解决',
|
||||
1: '待处理',
|
||||
2: '处理中'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'Finished',
|
||||
title: '解决',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Finished',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return row.status == 0
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '该问题是否已解决?'
|
||||
},
|
||||
click: row => {
|
||||
auditFeedBack({
|
||||
id: row.id,
|
||||
status: 0
|
||||
}).then(res => {
|
||||
tableStore.onTableAction('search', {})
|
||||
ElMessage.success('操作成功!')
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => { }
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchState = 0
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable placeholder="请输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { auditFeedBack } from '@/api/cs-system-boot/manage'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/manage/feedback'
|
||||
})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-system-boot/feedback/queryFeedBackPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '标题', field: 'title', align: 'center' },
|
||||
{ title: '描述', field: 'description', align: 'center' },
|
||||
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
width: '100',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '已解决',
|
||||
1: '待处理',
|
||||
2: '处理中'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'Finished',
|
||||
title: '解决',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Finished',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return row.status == 0
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '该问题是否已解决?'
|
||||
},
|
||||
click: row => {
|
||||
auditFeedBack({
|
||||
id: row.id,
|
||||
status: 0
|
||||
}).then(res => {
|
||||
tableStore.onTableAction('search', {})
|
||||
ElMessage.success('操作成功!')
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => { }
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchState = 0
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
|
||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
||||
{ title: '监测点数量', field: 'pointNum', align: 'center' },
|
||||
{ title: '拓扑图', field: 'filePath', align: 'center', render: 'image' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -69,7 +69,7 @@ const tableStore: any = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -47,7 +47,7 @@ const tableStore: any = new TableStore({
|
||||
{ field: 'createTime', title: '创建时间' , sortable: true},
|
||||
{ field: 'updateTime', title: '更新时间', sortable: true },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
width: '220',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
|
||||
@@ -52,10 +52,10 @@ const tableStore: any = new TableStore({
|
||||
{ title: '用户协议容量(MVA)', field: 'userAgreementCapacity', minWidth: 100 },
|
||||
{ title: '装机容量(MW)', field: 'installedCapacity', minWidth: 100 },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div class="default">
|
||||
<div style="flex: 1">
|
||||
<div style="width: calc(100% - 300px);">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="前置等级">
|
||||
@@ -39,7 +39,7 @@
|
||||
@current-change="currentChangeEvent"
|
||||
></Table>
|
||||
</div>
|
||||
<div class="pd10" style="width: 400px" v-loading="loading">
|
||||
<div class="pd10" style="width: 300px" v-loading="loading">
|
||||
<el-input v-model="filterText" placeholder="请输入内容" clearable show-word-limit @input="change">
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
@@ -301,12 +301,21 @@ const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/node/nodeList',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '名称', field: 'name' },
|
||||
{ title: 'IP', field: 'ip' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '名称', field: 'name', minWidth: '110' },
|
||||
{ title: 'IP', field: 'ip', minWidth: '110' },
|
||||
{
|
||||
title: '等级',
|
||||
field: 'nodeGrade',
|
||||
render: 'tag',
|
||||
minWidth: '80',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
@@ -320,20 +329,24 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
title: '最大监测点数量',
|
||||
field: 'nodeDevNum'
|
||||
field: 'nodeDevNum',
|
||||
minWidth: '80',
|
||||
},
|
||||
{
|
||||
title: '最大进程数',
|
||||
field: 'maxProcessNum'
|
||||
field: 'maxProcessNum',
|
||||
minWidth: '80',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
field: 'sort'
|
||||
field: 'sort',
|
||||
minWidth: '80'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
render: 'tag',
|
||||
minWidth: '80',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
@@ -343,11 +356,12 @@ const tableStore = new TableStore({
|
||||
1: '启用'
|
||||
}
|
||||
},
|
||||
{ title: '描述', field: 'remark' },
|
||||
{ title: '描述', field: 'remark', minWidth: '200', },
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
@@ -626,7 +640,7 @@ onMounted(() => {
|
||||
height: 140px;
|
||||
}
|
||||
}
|
||||
:deep(.default) {
|
||||
.default {
|
||||
display: flex;
|
||||
}
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -66,7 +66,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '200',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -227,7 +227,7 @@ const tableStore = new TableStore({
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -228,7 +228,7 @@ const tableStore = new TableStore({
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
Reference in New Issue
Block a user