优化表格

This commit is contained in:
guanj
2026-01-14 13:30:23 +08:00
parent 63433aa6dc
commit 054d84778b
37 changed files with 1237 additions and 1142 deletions

View File

@@ -229,9 +229,8 @@ const tableStore: any = new TableStore({
}
},
{
title: '操作',
title: '操作', fixed: 'right',
width: 150,
// fixed: 'right',
render: 'buttons',
buttons: [
{

View File

@@ -33,7 +33,7 @@ const tableStore = new TableStore({
{ title: '类型', field: 'casualUserName' },
{ title: '状态', field: 'stateName' },
{
title: '操作',
title: '操作', fixed: 'right',
width: '180',
render: 'buttons',
buttons: [

View File

@@ -1,116 +1,134 @@
<template>
<div>
<div class="custom-table-header">
<div class="title">接口权限列表</div>
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
style="width: 240px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10" :disabled="!props.id">新增</el-button>
</div>
<Table ref="tableRef" />
<popupApi ref="popupRef" @init="tableStore.index()"></popupApi>
</div>
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import { ref, Ref, inject, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import popupApi from './popupApi.vue'
import { deleteMenu } from '@/api/user-boot/function'
defineOptions({
name: 'auth/menu/api'
})
const emits = defineEmits<{
(e: 'init'): void
}>()
const props = defineProps({
id: {
type: String,
default: ''
}
})
const tableRef = ref()
const popupRef = ref()
const apiList = ref([])
const tableStore = new TableStore({
showPage: false,
url: '/user-boot/function/getButtonById',
publicHeight: 60,
column: [
{ title: '普通接口/接口名称', field: 'name' },
{
title: '接口类型',
field: 'type',
formatter: row => {
return row.cellValue == 1 ? '普通接口' : '公用接口'
}
},
{ title: 'URL接口路径', field: 'path' },
{
title: '操作',
align: 'center',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupRef.value.open('编辑接口权限', row)
}
},
{
name: 'del',
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该菜单吗?'
},
click: row => {
deleteMenu(row.id).then(() => {
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
apiList.value = tableStore.table.data
search()
}
})
tableStore.table.loading = false
watch(
() => props.id,
() => {
tableStore.table.params.id = props.id
tableStore.index()
}
)
provide('tableStore', tableStore)
const addMenu = () => {
console.log(popupRef)
popupRef.value.open('新增接口权限', {
pid: props.id
})
}
const search = () => {
tableStore.table.data = apiList.value.filter(
(item: any) =>
!tableStore.table.params.searchValue ||
item.name.indexOf(tableStore.table.params.searchValue) !== -1 ||
item.path.indexOf(tableStore.table.params.searchValue) !== -1
)
}
</script>
<template>
<div>
<div class="custom-table-header">
<div class="title">接口权限列表</div>
<el-input
maxlength="32"
show-word-limit
v-model.trim="tableStore.table.params.searchValue"
style="width: 240px"
placeholder="请输入菜单名称"
class="ml10"
clearable
@input="search"
/>
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10" :disabled="!props.id">新增</el-button>
</div>
<Table ref="tableRef" />
<popupApi ref="popupRef" @init="tableStore.index()"></popupApi>
</div>
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import { ref, Ref, inject, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import popupApi from './popupApi.vue'
import { deleteMenu } from '@/api/user-boot/function'
defineOptions({
name: 'auth/menu/api'
})
const emits = defineEmits<{
(e: 'init'): void
}>()
const props = defineProps({
id: {
type: String,
default: ''
}
})
const tableRef = ref()
const popupRef = ref()
const apiList = ref([])
const tableStore = new TableStore({
showPage: false,
url: '/user-boot/function/getButtonById',
publicHeight: 60,
column: [
{
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: '180' },
{
title: '接口类型',
field: 'type',
minWidth: '140',
formatter: row => {
return row.cellValue == 1 ? '普通接口' : '公用接口'
}
},
{ title: 'URL接口路径', field: 'path', minWidth: '200' },
{
title: '操作',
fixed: 'right',
align: 'center',
width: '140',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupRef.value.open('编辑接口权限', row)
}
},
{
name: 'del',
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该菜单吗?'
},
click: row => {
deleteMenu(row.id).then(() => {
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
apiList.value = tableStore.table.data
search()
}
})
tableStore.table.loading = false
watch(
() => props.id,
() => {
tableStore.table.params.id = props.id
tableStore.index()
}
)
provide('tableStore', tableStore)
const addMenu = () => {
console.log(popupRef)
popupRef.value.open('新增接口权限', {
pid: props.id
})
}
const search = () => {
tableStore.table.data = apiList.value.filter(
(item: any) =>
!tableStore.table.params.searchValue ||
item.name.indexOf(tableStore.table.params.searchValue) !== -1 ||
item.path.indexOf(tableStore.table.params.searchValue) !== -1
)
}
</script>

View File

@@ -1,140 +1,140 @@
<template>
<div>
<div class="custom-table-header">
<div class="title">菜单列表</div>
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
style="width: 310px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
</div>
<Table @currentChange="currentChange" />
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
</div>
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import { ref, nextTick, inject, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import popupMenu from './popupMenu.vue'
import { delMenu } from '@/api/systerm'
defineOptions({
name: 'auth/menu/menu'
})
const emits = defineEmits<{
(e: 'init'): void
(e: 'select', row: any): void
}>()
const props = withDefaults(
defineProps<{
menuData: treeData[]
}>(),
{
menuData: () => {
return []
}
}
)
const popupRef = ref()
const tableStore = new TableStore({
showPage: false,
url: '/user-boot/function/functionTree',
publicHeight: 60,
column: [
{ title: '菜单名称', field: 'title', align: 'left', treeNode: true },
{
title: '图标',
field: 'icon',
align: 'center',
width: '60',
render: 'icon'
},
{
title: '操作',
align: 'center',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
text: '新增',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
popupRef.value.open('新增菜单', { pid: row.id })
}
},
{
name: 'edit',
text: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupRef.value.open('编辑菜单', row)
}
},
{
name: 'del',
text: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该菜单吗?'
},
click: row => {
delMenu(row.id).then(() => {
emits('init')
})
}
}
]
}
]
})
tableStore.table.loading = false
watch(
() => props.menuData,
() => {
search()
}
)
provide('tableStore', tableStore)
const addMenu = () => {
popupRef.value.open('新增菜单', {})
}
const currentChange = (newValue: any) => {
emits('select', newValue.row.id)
}
const search = () => {
tableStore.table.data = filterData(JSON.parse(JSON.stringify(props.menuData)))
if (tableStore.table.params.searchValue) {
nextTick(() => {
tableStore.table.ref?.setAllTreeExpand(true)
})
}
}
// 过滤
const filterData = (arr: treeData[]): treeData[] => {
if (!tableStore.table.params.searchValue) {
return arr
}
return arr.filter((item: treeData) => {
if (item.title.includes(tableStore.table.params.searchValue)) {
return true
} else if (item.children?.length > 0) {
item.children = filterData(item.children)
return item.children.length > 0
} else {
return false
}
})
}
</script>
<template>
<div>
<div class="custom-table-header">
<div class="title">菜单列表</div>
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
style="width: 310px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
</div>
<Table @currentChange="currentChange" />
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
</div>
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import { ref, nextTick, inject, provide, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import popupMenu from './popupMenu.vue'
import { delMenu } from '@/api/systerm'
defineOptions({
name: 'auth/menu/menu'
})
const emits = defineEmits<{
(e: 'init'): void
(e: 'select', row: any): void
}>()
const props = withDefaults(
defineProps<{
menuData: treeData[]
}>(),
{
menuData: () => {
return []
}
}
)
const popupRef = ref()
const tableStore = new TableStore({
showPage: false,
url: '/user-boot/function/functionTree',
publicHeight: 60,
column: [
{ title: '菜单名称', field: 'title', align: 'left', treeNode: true },
{
title: '图标',
field: 'icon',
align: 'center',
width: '60',
render: 'icon'
},
{
title: '操作', fixed: 'right',
align: 'center',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
text: '新增',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
popupRef.value.open('新增菜单', { pid: row.id })
}
},
{
name: 'edit',
text: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupRef.value.open('编辑菜单', row)
}
},
{
name: 'del',
text: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该菜单吗?'
},
click: row => {
delMenu(row.id).then(() => {
emits('init')
})
}
}
]
}
]
})
tableStore.table.loading = false
watch(
() => props.menuData,
() => {
search()
}
)
provide('tableStore', tableStore)
const addMenu = () => {
popupRef.value.open('新增菜单', {})
}
const currentChange = (newValue: any) => {
emits('select', newValue.row.id)
}
const search = () => {
tableStore.table.data = filterData(JSON.parse(JSON.stringify(props.menuData)))
if (tableStore.table.params.searchValue) {
nextTick(() => {
tableStore.table.ref?.setAllTreeExpand(true)
})
}
}
// 过滤
const filterData = (arr: treeData[]): treeData[] => {
if (!tableStore.table.params.searchValue) {
return arr
}
return arr.filter((item: treeData) => {
if (item.title.includes(tableStore.table.params.searchValue)) {
return true
} else if (item.children?.length > 0) {
item.children = filterData(item.children)
return item.children.length > 0
} else {
return false
}
})
}
</script>

View File

@@ -90,7 +90,7 @@ const tableStore = new TableStore({
}
},
{
title: '操作',
title: '操作', fixed: 'right',
align: 'center',
width: '180',
render: 'buttons',

View File

@@ -79,10 +79,10 @@ const tableStore = new TableStore({
}
},
{
title: '操作',
title: '操作', fixed: 'right',
width: '180',
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'edit',

View File

@@ -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

View File

@@ -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

View File

@@ -82,7 +82,7 @@ const tableStore: any = new TableStore({
// },
},
{
title: '操作',
title: '操作', fixed: 'right',
width: '100',
render: 'buttons',
buttons: [

View File

@@ -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>

View File

@@ -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="名称">

View File

@@ -236,7 +236,7 @@ const tableStore = new TableStore({
// },
},
{
title: '操作',
title: '操作', fixed: 'right',
align: 'center',
width: '180',
render: 'buttons',

View File

@@ -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

View File

@@ -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/

View File

@@ -77,10 +77,10 @@ const tableStore = new TableStore({
}, sortable: true
},
{
title: '操作',
title: '操作', fixed: 'right',
width: 180,
render: 'buttons',
fixed: 'right',
buttons: [
{
name: 'edit',

View File

@@ -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>

View File

@@ -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' },

View File

@@ -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: [
{

View File

@@ -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',

View File

@@ -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',

View File

@@ -488,7 +488,7 @@ const tableStore = new TableStore({
minWidth: 80
},
{
title: '操作',
title: '操作', fixed: 'right',
align: 'center',
width: 220,
render: 'buttons',

View File

@@ -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>

View File

@@ -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',

View File

@@ -69,7 +69,7 @@ const tableStore: any = new TableStore({
}
},
{
title: '操作',
title: '操作', fixed: 'right',
width: '100',
render: 'buttons',
buttons: [

View File

@@ -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: [

View File

@@ -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: [
{

View File

@@ -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 {

View File

@@ -66,7 +66,7 @@ const tableStore = new TableStore({
}
},
{
title: '操作',
title: '操作', fixed: 'right',
align: 'center',
width: '200',
render: 'buttons',

View File

@@ -227,7 +227,7 @@ const tableStore = new TableStore({
// },
},
{
title: '操作',
title: '操作', fixed: 'right',
align: 'center',
width: '180',
render: 'buttons',

View File

@@ -228,7 +228,7 @@ const tableStore = new TableStore({
// },
},
{
title: '操作',
title: '操作', fixed: 'right',
align: 'center',
width: '180',
render: 'buttons',

View File

@@ -127,7 +127,7 @@ const tableStore = new TableStore({
{ field: 'path', title: '组件路径' },
{ field: 'image', title: '组件展示', render: 'image' },
{
title: '操作',
title: '操作', fixed: 'right',
render: 'buttons',
width: '150',
buttons: [

View File

@@ -1,149 +1,149 @@
<template>
<div class="dictiontary-list-detail child-router">
<TableHeader>
<template #select>
<el-form-item label="">
<el-page-header @back="$emit('close')">
<template #content>
<span class="text-large font-600 mr-3">{{ props.detail.name }}详情信息</span>
</template>
</el-page-header>
</el-form-item>
<el-form-item label="关键字筛选">
<el-input maxlength="32" show-word-limit style="width: 240px"
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
</el-form-item>
</template>
<template #operation>
<el-button :icon="Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<PopupDetailEdit ref="popupEditRef"></PopupDetailEdit>
</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'
import { ElMessage } from 'element-plus'
import PopupDetailEdit from './popupDetailEdit.vue'
import { dictDataDelete } from '@/api/system-boot/dicData'
defineOptions({
name: 'setting/dictionary/list/detail'
})
interface Props {
detail: anyObj
}
const props = withDefaults(defineProps<Props>(), {
detail: () => {
return {}
}
})
const popupEditRef = ref()
const tableStore = new TableStore({
url: '/system-boot/dictData/getTypeIdData',
method: 'POST',
column: [
{ title: '名称', field: 'name' },
{ title: '编码', field: 'code' },
{ title: '排序', field: 'sort' },
{ title: '计算值', field: 'value' },
{ title: '事件等级', field: 'levelName' },
{ title: '算法描述', field: 'algoDescribe' },
{ title: '状态', field: 'stateName' },
{
title: '操作',
width: '180',
render: 'buttons',
fixed: 'right',
buttons: [
{
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupEditRef.value.open('编辑', {
...row,
openDescribe: props.detail.openDescribe,
openLevel: props.detail.openLevel,
typeName: props.detail.name + row.name,
typeId: props.detail.id
})
}
},
{
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该字典类型吗?'
},
click: row => {
dictDataDelete([row.id]).then(() => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.stateName = item.state === 1 ? '正常' : '删除'
switch (item.level) {
case 0:
item.levelName = '普通'
break
case 1:
item.levelName = '中等'
break
case 2:
item.levelName = '严重'
break
default:
item.levelName = '未知'
break
}
for (let key in item) {
if (typeof item[key] !== 'number') {
item[key] = item[key] || '/'
}
}
})
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
tableStore.table.params.typeId = props.detail.id
if (props.detail.openLevel !== 1) {
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'levelName')
}
if (props.detail.openDescribe !== 1) {
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'algoDescribe')
}
onMounted(() => {
tableStore.index()
})
const add = () => {
popupEditRef.value.open('新增', {
openLevel: props.detail.openLevel,
openDescribe: props.detail.openDescribe,
typeName: props.detail.name,
typeId: props.detail.id
})
}
</script>
<template>
<div class="dictiontary-list-detail child-router">
<TableHeader>
<template #select>
<el-form-item label="">
<el-page-header @back="$emit('close')">
<template #content>
<span class="text-large font-600 mr-3">{{ props.detail.name }}详情信息</span>
</template>
</el-page-header>
</el-form-item>
<el-form-item label="关键字筛选">
<el-input maxlength="32" show-word-limit style="width: 240px"
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
</el-form-item>
</template>
<template #operation>
<el-button :icon="Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<PopupDetailEdit ref="popupEditRef"></PopupDetailEdit>
</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'
import { ElMessage } from 'element-plus'
import PopupDetailEdit from './popupDetailEdit.vue'
import { dictDataDelete } from '@/api/system-boot/dicData'
defineOptions({
name: 'setting/dictionary/list/detail'
})
interface Props {
detail: anyObj
}
const props = withDefaults(defineProps<Props>(), {
detail: () => {
return {}
}
})
const popupEditRef = ref()
const tableStore = new TableStore({
url: '/system-boot/dictData/getTypeIdData',
method: 'POST',
column: [
{ title: '名称', field: 'name' },
{ title: '编码', field: 'code' },
{ title: '排序', field: 'sort' },
{ title: '计算值', field: 'value' },
{ title: '事件等级', field: 'levelName' },
{ title: '算法描述', field: 'algoDescribe' },
{ title: '状态', field: 'stateName' },
{
title: '操作', fixed: 'right',
width: '180',
render: 'buttons',
buttons: [
{
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupEditRef.value.open('编辑', {
...row,
openDescribe: props.detail.openDescribe,
openLevel: props.detail.openLevel,
typeName: props.detail.name + row.name,
typeId: props.detail.id
})
}
},
{
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该字典类型吗?'
},
click: row => {
dictDataDelete([row.id]).then(() => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.stateName = item.state === 1 ? '正常' : '删除'
switch (item.level) {
case 0:
item.levelName = '普通'
break
case 1:
item.levelName = '中等'
break
case 2:
item.levelName = '严重'
break
default:
item.levelName = '未知'
break
}
for (let key in item) {
if (typeof item[key] !== 'number') {
item[key] = item[key] || '/'
}
}
})
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
tableStore.table.params.typeId = props.detail.id
if (props.detail.openLevel !== 1) {
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'levelName')
}
if (props.detail.openDescribe !== 1) {
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'algoDescribe')
}
onMounted(() => {
tableStore.index()
})
const add = () => {
popupEditRef.value.open('新增', {
openLevel: props.detail.openLevel,
openDescribe: props.detail.openDescribe,
typeName: props.detail.name,
typeId: props.detail.id
})
}
</script>

View File

@@ -1,124 +1,124 @@
<template>
<div class="default-main" style="position: relative">
<TableHeader>
<template #select>
<el-form-item label="关键字筛选">
<el-input maxlength="32" show-word-limit style="width: 240px"
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
</el-form-item>
</template>
<template #operation>
<el-button :icon="Plus" type="primary" @click="add">新增字典类型</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<PopupEdit ref="popupEditRef"></PopupEdit>
<Detail ref="detailRef" :detail="detail" @close="detail = null" v-if="detail"></Detail>
</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'
import { ElMessage } from 'element-plus'
import PopupEdit from './popupEdit.vue'
import { dictTypeDelete } from '@/api/system-boot/dictType'
import Detail from './detail.vue'
defineOptions({
name: 'system-boot/dictType/list'
})
const popupEditRef = ref()
const detail = ref<anyObj | null>(null)
const tableStore = new TableStore({
url: '/system-boot/dictType/list',
method: 'POST',
column: [
{
title: '序号', width: 80, formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '名称', field: 'name' },
{ title: '编码', field: 'code' },
{ title: '开启等级', field: 'openLevelName' },
{ title: '开启算法', field: 'openDescribeName' },
{ title: '字典描述', field: 'remark' },
{ title: '创建时间', field: 'createTime', sortable: true },
{ title: '更新时间', field: 'updateTime', sortable: true},
{
title: '状态',
field: 'stateName',
width: '80',
render: 'tag',
custom: {
'正常': 'success',
'删除': 'danger'
},
},
{
title: '操作',
width: '180',
render: 'buttons',
fixed: 'right',
buttons: [
{
title: '查看',
type: 'primary',
icon: 'el-icon-ZoomIn',
render: 'basicButton',
click: row => {
detail.value = row
}
},
{
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupEditRef.value.open('编辑字典类型', row)
}
},
{
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该字典类型吗?'
},
click: row => {
dictTypeDelete([row.id]).then(() => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.stateName = item.state === 1 ? '正常' : '删除'
item.openLevelName = item.openLevel === 1 ? '开启' : '不开启'
item.openDescribeName = item.openDescribe === 1 ? '开启' : '不开启'
})
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
onMounted(() => {
tableStore.index()
})
const add = () => {
popupEditRef.value.open('新增字典类型')
}
</script>
<template>
<div class="default-main" style="position: relative">
<TableHeader>
<template #select>
<el-form-item label="关键字筛选">
<el-input maxlength="32" show-word-limit style="width: 240px"
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
</el-form-item>
</template>
<template #operation>
<el-button :icon="Plus" type="primary" @click="add">新增字典类型</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<PopupEdit ref="popupEditRef"></PopupEdit>
<Detail ref="detailRef" :detail="detail" @close="detail = null" v-if="detail"></Detail>
</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'
import { ElMessage } from 'element-plus'
import PopupEdit from './popupEdit.vue'
import { dictTypeDelete } from '@/api/system-boot/dictType'
import Detail from './detail.vue'
defineOptions({
name: 'system-boot/dictType/list'
})
const popupEditRef = ref()
const detail = ref<anyObj | null>(null)
const tableStore = new TableStore({
url: '/system-boot/dictType/list',
method: 'POST',
column: [
{
title: '序号', width: 80, formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '名称', field: 'name' },
{ title: '编码', field: 'code' },
{ title: '开启等级', field: 'openLevelName' },
{ title: '开启算法', field: 'openDescribeName' },
{ title: '字典描述', field: 'remark' },
{ title: '创建时间', field: 'createTime', sortable: true },
{ title: '更新时间', field: 'updateTime', sortable: true},
{
title: '状态',
field: 'stateName',
width: '80',
render: 'tag',
custom: {
'正常': 'success',
'删除': 'danger'
},
},
{
title: '操作', fixed: 'right',
width: '180',
render: 'buttons',
buttons: [
{
title: '查看',
type: 'primary',
icon: 'el-icon-ZoomIn',
render: 'basicButton',
click: row => {
detail.value = row
}
},
{
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupEditRef.value.open('编辑字典类型', row)
}
},
{
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该字典类型吗?'
},
click: row => {
dictTypeDelete([row.id]).then(() => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.stateName = item.state === 1 ? '正常' : '删除'
item.openLevelName = item.openLevel === 1 ? '开启' : '不开启'
item.openDescribeName = item.openDescribe === 1 ? '开启' : '不开启'
})
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
onMounted(() => {
tableStore.index()
})
const add = () => {
popupEditRef.value.open('新增字典类型')
}
</script>

View File

@@ -1,113 +1,113 @@
<template>
<div class='default-main'>
<div class='custom-table-header'>
<div class="title">字典树列表</div>
<el-button :icon='Plus' type='primary' @click='addMenu'>新增字典类型</el-button>
</div>
<Table ref='tableRef' />
<PopupForm ref='popupFormRef'></PopupForm>
</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 { ElMessage } from 'element-plus'
import PopupForm from './popupForm.vue'
import { dicDelete } from '@/api/system-boot/dic'
defineOptions({
name: 'setting/dictionary/tree'
})
const popupFormRef = ref()
const tableStore = new TableStore({
showPage:false,
url: '/system-boot/dictTree/queryTree',
method: 'GET',
column: [
{ title: '字典名称', field: 'name', treeNode: true, align: 'left' },
// { title: '排序', field: 'sort',width:'80' },
{ title: '编码', field: 'code' },
{ title: '描述', field: 'remark' },
{
title: '状态',
field: 'status',
width: '80',
render: 'tag',
custom: {
0: 'success',
1: 'warning',
2: 'danger'
},
replaceValue: {
0: '正常',
1: '禁用',
2: '删除'
}
},
{
title: '操作',
width: '180',
render: 'buttons',
fixed: 'right',
buttons: [
{
title: '新增',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
popupFormRef.value.open('新增字典类型', {
name: '',
code: '',
remark: '',
sort: 100,
type: 0,
pid: row.id,
id: ''
})
}
},
{
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupFormRef.value.open('编辑字典类型', row)
}
},
{
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该字典类型吗?'
},
click: row => {
dicDelete(row.id).then(() => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
]
})
provide('tableStore', tableStore)
tableStore.table.params.searchState = 0
onMounted(() => {
tableStore.index()
})
const addMenu = () => {
popupFormRef.value.open('新增字典类型')
}
</script>
<template>
<div class='default-main'>
<div class='custom-table-header'>
<div class="title">字典树列表</div>
<el-button :icon='Plus' type='primary' @click='addMenu'>新增字典类型</el-button>
</div>
<Table ref='tableRef' />
<PopupForm ref='popupFormRef'></PopupForm>
</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 { ElMessage } from 'element-plus'
import PopupForm from './popupForm.vue'
import { dicDelete } from '@/api/system-boot/dic'
defineOptions({
name: 'setting/dictionary/tree'
})
const popupFormRef = ref()
const tableStore = new TableStore({
showPage:false,
url: '/system-boot/dictTree/queryTree',
method: 'GET',
column: [
{ title: '字典名称', field: 'name', treeNode: true, align: 'left' },
// { title: '排序', field: 'sort',width:'80' },
{ title: '编码', field: 'code' },
{ title: '描述', field: 'remark' },
{
title: '状态',
field: 'status',
width: '80',
render: 'tag',
custom: {
0: 'success',
1: 'warning',
2: 'danger'
},
replaceValue: {
0: '正常',
1: '禁用',
2: '删除'
}
},
{
title: '操作', fixed: 'right',
width: '180',
render: 'buttons',
buttons: [
{
title: '新增',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
popupFormRef.value.open('新增字典类型', {
name: '',
code: '',
remark: '',
sort: 100,
type: 0,
pid: row.id,
id: ''
})
}
},
{
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
popupFormRef.value.open('编辑字典类型', row)
}
},
{
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除该字典类型吗?'
},
click: row => {
dicDelete(row.id).then(() => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
]
})
provide('tableStore', tableStore)
tableStore.table.params.searchState = 0
onMounted(() => {
tableStore.index()
})
const addMenu = () => {
popupFormRef.value.open('新增字典类型')
}
</script>

View File

@@ -45,7 +45,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: [

View File

@@ -66,10 +66,18 @@ const tableStore: any = new TableStore({
method: 'POST',
isWebPaging: true,
column: [
{ field: 'timerName', title: '任务名称' },
{ field: 'actionClass', title: '任务执行器' },
{ field: 'cron', title: '定时任务表达式' },
{ field: 'remark', title: '备注' },
{
field: 'index',
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'timerName', title: '任务名称' ,minWidth: '180'},
{ field: 'actionClass', title: '任务执行器' ,minWidth: '300'},
{ field: 'cron', title: '定时任务表达式',minWidth: '140' },
{ field: 'remark', title: '备注' ,minWidth: '180'},
// {
// field: 'jobStatus', title: '状态', width: '100',
// render: 'tag',
@@ -87,7 +95,7 @@ const tableStore: any = new TableStore({
{
title: '状态',
render: 'switch',
width: 100,
minWidth: 100,
field: 'jobStatus',
activeText: '运行中',
activeValue: '1',
@@ -107,9 +115,10 @@ const tableStore: any = new TableStore({
}
}
},
{ field: 'sort', title: '排序', width: '80' },
{ field: 'sort', title: '排序', minWidth: '80' },
{
title: '操作',
fixed: 'right',
width: '220',
render: 'buttons',
buttons: [

View File

@@ -1,150 +1,150 @@
<template>
<div class="default-main">
<TableHeader select ref="TableHeaderRef">
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<formTab ref="formTabRef" v-if="show" @Cancels=";(show = false), tableStore.index()" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { activateTheme, deleteTheme } from '@/api/system/subject/index'
import formTab from './form/index.vue'
import { ElMessage } from 'element-plus'
import { useConfig } from '@/stores/config'
import { getTheme } from '@/api/systerm'
const configStore = useConfig()
defineOptions({
name: 'user-boot/function/functionTree'
})
const formTabRef = ref()
const TableHeaderRef = ref()
const show = ref(false)
const tableStore: any = new TableStore({
url: '/system-boot/theme/getAllThemes',
method: 'GET',
column: [
{
field: 'index',
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'name', title: '主题名称' },
{ field: 'remark', title: '描述' },
{ field: 'logoUrl', title: '主题图标', render: 'image' },
{
title: '操作',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '激活 ',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
disabled: row => {
return row.active == 1
},
click: row => {
activateTheme({ id: row.id }).then(res => {
ElMessage({
message: '激活成功!',
type: 'success'
})
tableStore.index()
})
}
},
{
name: 'edit',
title: '修改 ',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
show.value = true
setTimeout(() => {
formTabRef.value.open({
text: '修改主题',
row: row
})
}, 10)
}
},
{
name: 'edit',
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除吗?'
},
click: row => {
deleteTheme({ id: row.id }).then(res => {
ElMessage({
message: '删除成功!',
type: 'success'
})
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
getTheme().then(res => {
let list: any = [
'elementUiPrimary',
'tableHeaderBackground',
'tableHeaderColor',
'tableCurrent',
'menuBackground',
'menuColor',
'menuTopBarBackground',
'menuActiveBackground',
'menuActiveColor',
'headerBarTabColor',
'headerBarBackground'
]
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
for (let i = 0; i < list.length; i++) {
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
}
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
})
}
})
provide('tableStore', tableStore)
// 新增主题
const add = () => {
show.value = true
setTimeout(() => {
formTabRef.value.open({
text: '新增主题'
})
}, 10)
}
onMounted(() => {
tableStore.index()
})
</script>
<template>
<div class="default-main">
<TableHeader select ref="TableHeaderRef">
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<formTab ref="formTabRef" v-if="show" @Cancels=";(show = false), tableStore.index()" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { activateTheme, deleteTheme } from '@/api/system/subject/index'
import formTab from './form/index.vue'
import { ElMessage } from 'element-plus'
import { useConfig } from '@/stores/config'
import { getTheme } from '@/api/systerm'
const configStore = useConfig()
defineOptions({
name: 'user-boot/function/functionTree'
})
const formTabRef = ref()
const TableHeaderRef = ref()
const show = ref(false)
const tableStore: any = new TableStore({
url: '/system-boot/theme/getAllThemes',
method: 'GET',
column: [
{
field: 'index',
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'name', title: '主题名称' },
{ field: 'remark', title: '描述' },
{ field: 'logoUrl', title: '主题图标', render: 'image' },
{
title: '操作', fixed: 'right',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '激活 ',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
disabled: row => {
return row.active == 1
},
click: row => {
activateTheme({ id: row.id }).then(res => {
ElMessage({
message: '激活成功!',
type: 'success'
})
tableStore.index()
})
}
},
{
name: 'edit',
title: '修改 ',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
show.value = true
setTimeout(() => {
formTabRef.value.open({
text: '修改主题',
row: row
})
}, 10)
}
},
{
name: 'edit',
title: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除吗?'
},
click: row => {
deleteTheme({ id: row.id }).then(res => {
ElMessage({
message: '删除成功!',
type: 'success'
})
tableStore.index()
})
}
}
]
}
],
loadCallback: () => {
getTheme().then(res => {
let list: any = [
'elementUiPrimary',
'tableHeaderBackground',
'tableHeaderColor',
'tableCurrent',
'menuBackground',
'menuColor',
'menuTopBarBackground',
'menuActiveBackground',
'menuActiveColor',
'headerBarTabColor',
'headerBarBackground'
]
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
for (let i = 0; i < list.length; i++) {
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
}
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
})
}
})
provide('tableStore', tableStore)
// 新增主题
const add = () => {
show.value = true
setTimeout(() => {
formTabRef.value.open({
text: '新增主题'
})
}, 10)
}
onMounted(() => {
tableStore.index()
})
</script>