优化表格
This commit is contained in:
@@ -229,9 +229,8 @@ const tableStore: any = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: 150,
|
width: 150,
|
||||||
// fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '类型', field: 'casualUserName' },
|
{ title: '类型', field: 'casualUserName' },
|
||||||
{ title: '状态', field: 'stateName' },
|
{ title: '状态', field: 'stateName' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,116 +1,134 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="custom-table-header">
|
<div class="custom-table-header">
|
||||||
<div class="title">接口权限列表</div>
|
<div class="title">接口权限列表</div>
|
||||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
<el-input
|
||||||
style="width: 240px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
|
maxlength="32"
|
||||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10" :disabled="!props.id">新增</el-button>
|
show-word-limit
|
||||||
</div>
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
<Table ref="tableRef" />
|
style="width: 240px"
|
||||||
<popupApi ref="popupRef" @init="tableStore.index()"></popupApi>
|
placeholder="请输入菜单名称"
|
||||||
</div>
|
class="ml10"
|
||||||
</template>
|
clearable
|
||||||
<script setup lang="ts">
|
@input="search"
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
/>
|
||||||
import { ref, Ref, inject, provide, watch } from 'vue'
|
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10" :disabled="!props.id">新增</el-button>
|
||||||
import TableStore from '@/utils/tableStore'
|
</div>
|
||||||
import Table from '@/components/table/index.vue'
|
<Table ref="tableRef" />
|
||||||
import popupApi from './popupApi.vue'
|
<popupApi ref="popupRef" @init="tableStore.index()"></popupApi>
|
||||||
import { deleteMenu } from '@/api/user-boot/function'
|
</div>
|
||||||
|
</template>
|
||||||
defineOptions({
|
<script setup lang="ts">
|
||||||
name: 'auth/menu/api'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
})
|
import { ref, Ref, inject, provide, watch } from 'vue'
|
||||||
const emits = defineEmits<{
|
import TableStore from '@/utils/tableStore'
|
||||||
(e: 'init'): void
|
import Table from '@/components/table/index.vue'
|
||||||
}>()
|
import popupApi from './popupApi.vue'
|
||||||
const props = defineProps({
|
import { deleteMenu } from '@/api/user-boot/function'
|
||||||
id: {
|
|
||||||
type: String,
|
defineOptions({
|
||||||
default: ''
|
name: 'auth/menu/api'
|
||||||
}
|
})
|
||||||
})
|
const emits = defineEmits<{
|
||||||
const tableRef = ref()
|
(e: 'init'): void
|
||||||
const popupRef = ref()
|
}>()
|
||||||
const apiList = ref([])
|
const props = defineProps({
|
||||||
const tableStore = new TableStore({
|
id: {
|
||||||
showPage: false,
|
type: String,
|
||||||
url: '/user-boot/function/getButtonById',
|
default: ''
|
||||||
publicHeight: 60,
|
}
|
||||||
column: [
|
})
|
||||||
{ title: '普通接口/接口名称', field: 'name' },
|
const tableRef = ref()
|
||||||
{
|
const popupRef = ref()
|
||||||
title: '接口类型',
|
const apiList = ref([])
|
||||||
field: 'type',
|
const tableStore = new TableStore({
|
||||||
formatter: row => {
|
showPage: false,
|
||||||
return row.cellValue == 1 ? '普通接口' : '公用接口'
|
url: '/user-boot/function/getButtonById',
|
||||||
}
|
publicHeight: 60,
|
||||||
},
|
column: [
|
||||||
{ title: 'URL接口路径', field: 'path' },
|
{
|
||||||
{
|
field: 'index',
|
||||||
title: '操作',
|
title: '序号',
|
||||||
align: 'center',
|
width: '80',
|
||||||
width: '180',
|
formatter: (row: any) => {
|
||||||
render: 'buttons',
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
buttons: [
|
}
|
||||||
{
|
},
|
||||||
name: 'edit',
|
{ title: '普通接口/接口名称', field: 'name', minWidth: '180' },
|
||||||
title: '编辑',
|
{
|
||||||
type: 'primary',
|
title: '接口类型',
|
||||||
icon: 'el-icon-EditPen',
|
field: 'type',
|
||||||
render: 'basicButton',
|
minWidth: '140',
|
||||||
click: row => {
|
formatter: row => {
|
||||||
popupRef.value.open('编辑接口权限', row)
|
return row.cellValue == 1 ? '普通接口' : '公用接口'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{ title: 'URL接口路径', field: 'path', minWidth: '200' },
|
||||||
name: 'del',
|
{
|
||||||
title: '删除',
|
title: '操作',
|
||||||
type: 'danger',
|
fixed: 'right',
|
||||||
icon: 'el-icon-Delete',
|
align: 'center',
|
||||||
render: 'confirmButton',
|
width: '140',
|
||||||
popconfirm: {
|
render: 'buttons',
|
||||||
confirmButtonText: '确认',
|
buttons: [
|
||||||
cancelButtonText: '取消',
|
{
|
||||||
confirmButtonType: 'danger',
|
name: 'edit',
|
||||||
title: '确定删除该菜单吗?'
|
title: '编辑',
|
||||||
},
|
type: 'primary',
|
||||||
click: row => {
|
icon: 'el-icon-EditPen',
|
||||||
deleteMenu(row.id).then(() => {
|
render: 'basicButton',
|
||||||
tableStore.index()
|
click: row => {
|
||||||
})
|
popupRef.value.open('编辑接口权限', row)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
]
|
{
|
||||||
}
|
name: 'del',
|
||||||
],
|
title: '删除',
|
||||||
loadCallback: () => {
|
type: 'danger',
|
||||||
apiList.value = tableStore.table.data
|
icon: 'el-icon-Delete',
|
||||||
search()
|
render: 'confirmButton',
|
||||||
}
|
popconfirm: {
|
||||||
})
|
confirmButtonText: '确认',
|
||||||
tableStore.table.loading = false
|
cancelButtonText: '取消',
|
||||||
watch(
|
confirmButtonType: 'danger',
|
||||||
() => props.id,
|
title: '确定删除该菜单吗?'
|
||||||
() => {
|
},
|
||||||
tableStore.table.params.id = props.id
|
click: row => {
|
||||||
tableStore.index()
|
deleteMenu(row.id).then(() => {
|
||||||
}
|
tableStore.index()
|
||||||
)
|
})
|
||||||
provide('tableStore', tableStore)
|
}
|
||||||
|
}
|
||||||
const addMenu = () => {
|
]
|
||||||
console.log(popupRef)
|
}
|
||||||
popupRef.value.open('新增接口权限', {
|
],
|
||||||
pid: props.id
|
loadCallback: () => {
|
||||||
})
|
apiList.value = tableStore.table.data
|
||||||
}
|
search()
|
||||||
const search = () => {
|
}
|
||||||
tableStore.table.data = apiList.value.filter(
|
})
|
||||||
(item: any) =>
|
tableStore.table.loading = false
|
||||||
!tableStore.table.params.searchValue ||
|
watch(
|
||||||
item.name.indexOf(tableStore.table.params.searchValue) !== -1 ||
|
() => props.id,
|
||||||
item.path.indexOf(tableStore.table.params.searchValue) !== -1
|
() => {
|
||||||
)
|
tableStore.table.params.id = props.id
|
||||||
}
|
tableStore.index()
|
||||||
</script>
|
}
|
||||||
|
)
|
||||||
|
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>
|
||||||
|
|||||||
@@ -1,140 +1,140 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="custom-table-header">
|
<div class="custom-table-header">
|
||||||
<div class="title">菜单列表</div>
|
<div class="title">菜单列表</div>
|
||||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||||
style="width: 310px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
|
style="width: 310px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
|
||||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<Table @currentChange="currentChange" />
|
<Table @currentChange="currentChange" />
|
||||||
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
|
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, nextTick, inject, provide, watch } from 'vue'
|
import { ref, nextTick, inject, provide, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import popupMenu from './popupMenu.vue'
|
import popupMenu from './popupMenu.vue'
|
||||||
import { delMenu } from '@/api/systerm'
|
import { delMenu } from '@/api/systerm'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'auth/menu/menu'
|
name: 'auth/menu/menu'
|
||||||
})
|
})
|
||||||
const emits = defineEmits<{
|
const emits = defineEmits<{
|
||||||
(e: 'init'): void
|
(e: 'init'): void
|
||||||
(e: 'select', row: any): void
|
(e: 'select', row: any): void
|
||||||
}>()
|
}>()
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
menuData: treeData[]
|
menuData: treeData[]
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
menuData: () => {
|
menuData: () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const popupRef = ref()
|
const popupRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
showPage: false,
|
showPage: false,
|
||||||
url: '/user-boot/function/functionTree',
|
url: '/user-boot/function/functionTree',
|
||||||
publicHeight: 60,
|
publicHeight: 60,
|
||||||
column: [
|
column: [
|
||||||
{ title: '菜单名称', field: 'title', align: 'left', treeNode: true },
|
{ title: '菜单名称', field: 'title', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
title: '图标',
|
title: '图标',
|
||||||
field: 'icon',
|
field: 'icon',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '60',
|
width: '60',
|
||||||
render: 'icon'
|
render: 'icon'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
text: '新增',
|
text: '新增',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupRef.value.open('新增菜单', { pid: row.id })
|
popupRef.value.open('新增菜单', { pid: row.id })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
text: '编辑',
|
text: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupRef.value.open('编辑菜单', row)
|
popupRef.value.open('编辑菜单', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除该菜单吗?'
|
title: '确定删除该菜单吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
delMenu(row.id).then(() => {
|
delMenu(row.id).then(() => {
|
||||||
emits('init')
|
emits('init')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
tableStore.table.loading = false
|
tableStore.table.loading = false
|
||||||
watch(
|
watch(
|
||||||
() => props.menuData,
|
() => props.menuData,
|
||||||
() => {
|
() => {
|
||||||
search()
|
search()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const addMenu = () => {
|
const addMenu = () => {
|
||||||
popupRef.value.open('新增菜单', {})
|
popupRef.value.open('新增菜单', {})
|
||||||
}
|
}
|
||||||
const currentChange = (newValue: any) => {
|
const currentChange = (newValue: any) => {
|
||||||
emits('select', newValue.row.id)
|
emits('select', newValue.row.id)
|
||||||
}
|
}
|
||||||
const search = () => {
|
const search = () => {
|
||||||
tableStore.table.data = filterData(JSON.parse(JSON.stringify(props.menuData)))
|
tableStore.table.data = filterData(JSON.parse(JSON.stringify(props.menuData)))
|
||||||
if (tableStore.table.params.searchValue) {
|
if (tableStore.table.params.searchValue) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableStore.table.ref?.setAllTreeExpand(true)
|
tableStore.table.ref?.setAllTreeExpand(true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 过滤
|
// 过滤
|
||||||
const filterData = (arr: treeData[]): treeData[] => {
|
const filterData = (arr: treeData[]): treeData[] => {
|
||||||
if (!tableStore.table.params.searchValue) {
|
if (!tableStore.table.params.searchValue) {
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
return arr.filter((item: treeData) => {
|
return arr.filter((item: treeData) => {
|
||||||
if (item.title.includes(tableStore.table.params.searchValue)) {
|
if (item.title.includes(tableStore.table.params.searchValue)) {
|
||||||
return true
|
return true
|
||||||
} else if (item.children?.length > 0) {
|
} else if (item.children?.length > 0) {
|
||||||
item.children = filterData(item.children)
|
item.children = filterData(item.children)
|
||||||
return item.children.length > 0
|
return item.children.length > 0
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -79,10 +79,10 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -141,9 +141,10 @@ const tableStore = new TableStore({
|
|||||||
{ title: '暂降(聚升)幅值(%)', minWidth: 100, field: 'evtParamVVaDepth', align: 'center', sortable: true },
|
{ title: '暂降(聚升)幅值(%)', minWidth: 100, field: 'evtParamVVaDepth', align: 'center', sortable: true },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
@@ -165,9 +166,10 @@ const tableStore = new TableStore({
|
|||||||
row.loading1 = false
|
row.loading1 = false
|
||||||
if (res != undefined) {
|
if (res != undefined) {
|
||||||
boxoList.value = row
|
boxoList.value = row
|
||||||
|
boxoList.value.persistTime = row.evtParamTm
|
||||||
boxoList.value.featureAmplitude =
|
boxoList.value.featureAmplitude =
|
||||||
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
row.evtParamVVaDepth != '-' ? (row.evtParamVVaDepth - 0) / 100 : null
|
||||||
boxoList.value.systemType = 'ZL'
|
boxoList.value.systemType = 'YPT'
|
||||||
wp.value = res.data
|
wp.value = res.data
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@@ -136,6 +136,14 @@ const tableStore = new TableStore({
|
|||||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||||
method: 'POST',
|
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: 'showName', minWidth: 150 },
|
{ title: '事件描述', field: 'showName', minWidth: 150 },
|
||||||
{ title: '发生位置', field: 'evtParamPosition', minWidth: 150 },
|
{ title: '发生位置', field: 'evtParamPosition', minWidth: 150 },
|
||||||
{
|
{
|
||||||
@@ -160,6 +168,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '发生时刻', field: 'startTime', sortable: true, minWidth: 180 },
|
{ title: '发生时刻', field: 'startTime', sortable: true, minWidth: 180 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
@@ -184,8 +193,11 @@ const tableStore = new TableStore({
|
|||||||
if (res != undefined) {
|
if (res != undefined) {
|
||||||
boxoList.value = row
|
boxoList.value = row
|
||||||
boxoList.value.featureAmplitude =
|
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 = 'WX'
|
||||||
|
boxoList.value.systemType = 'YPT'
|
||||||
wp.value = res.data
|
wp.value = res.data
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const tableStore: any = new TableStore({
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '100',
|
width: '100',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,123 +1,123 @@
|
|||||||
<!-- 解析列表 -->
|
<!-- 解析列表 -->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-model.trim="dialogVisible" title="详情" width="70%" draggable @closed="close">
|
<el-dialog v-model.trim="dialogVisible" title="详情" width="70%" draggable @closed="close">
|
||||||
<div :style="tableHeight">
|
<div :style="tableHeight">
|
||||||
<vxe-table border auto-resize height="auto" :data="tableData" v-bind="defaultAttribute">
|
<vxe-table border auto-resize height="auto" :data="tableData" v-bind="defaultAttribute">
|
||||||
<vxe-column field="name" align="center" title="文件名称"></vxe-column>
|
<vxe-column field="name" align="center" title="文件名称"></vxe-column>
|
||||||
<vxe-column field="createTime" 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="allCount" align="center" title="数据总数(条)" width="120"></vxe-column>
|
||||||
<vxe-column field="realCount" 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">
|
<vxe-column field="state" align="center" title="解析状态" width="100">
|
||||||
<template v-slot:default="scoped">
|
<template v-slot:default="scoped">
|
||||||
<el-tag type="warning" v-if="scoped.row.state == 0">未解析</el-tag>
|
<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="success" v-if="scoped.row.state == 1">解析成功</el-tag>
|
||||||
<el-tag type="danger" v-if="scoped.row.state == 2">解析失败</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>
|
<el-tag type="primary" v-if="scoped.row.state == 3">文件不存在</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
const emit = defineEmits(['back'])
|
const emit = defineEmits(['back'])
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableHeight = mainHeight(440)
|
const tableHeight = mainHeight(440)
|
||||||
const height = ref(0)
|
const height = ref(0)
|
||||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||||
|
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '',
|
url: '',
|
||||||
// publicHeight: height.value,
|
// publicHeight: height.value,
|
||||||
showPage: false,
|
showPage: false,
|
||||||
column: [
|
column: [
|
||||||
{ width: '60', type: 'checkbox', fixed: 'left' },
|
{ width: '60', type: 'checkbox', fixed: 'left' },
|
||||||
{
|
{
|
||||||
title: '序号', width: 80, formatter: (row: any) => {
|
title: '序号', width: 80, formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'name', title: '文件名称', minWidth: 170 },
|
{ field: 'name', title: '文件名称', minWidth: 170 },
|
||||||
{ field: 'createTime', title: '导入时间', minWidth: 170 , sortable: true},
|
{ field: 'createTime', title: '导入时间', minWidth: 170 , sortable: true},
|
||||||
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 , sortable: true},
|
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 , sortable: true},
|
||||||
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170, sortable: true },
|
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170, sortable: true },
|
||||||
{
|
{
|
||||||
title: '解析状态',
|
title: '解析状态',
|
||||||
field: 'state',
|
field: 'state',
|
||||||
width: 100,
|
width: 100,
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'success',
|
1: 'success',
|
||||||
2: 'danger',
|
2: 'danger',
|
||||||
3: 'primary'
|
3: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '未解析',
|
0: '未解析',
|
||||||
1: '解析成功',
|
1: '解析成功',
|
||||||
2: '解析失败',
|
2: '解析失败',
|
||||||
3: '文件不存在'
|
3: '文件不存在'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '详情',
|
title: '详情',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
// console.log(row.portableOfflLogList)
|
// console.log(row.portableOfflLogList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = []
|
tableStore.table.data = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//返回
|
//返回
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
emit('back')
|
emit('back')
|
||||||
}
|
}
|
||||||
const tableData: any = ref()
|
const tableData: any = ref()
|
||||||
const open = (val: any) => {
|
const open = (val: any) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
tableData.value = val
|
tableData.value = val
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
const updateViewportHeight = async () => {
|
const updateViewportHeight = async () => {
|
||||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||||
tableStore.table.publicHeight = height.value
|
tableStore.table.publicHeight = height.value
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
updateViewportHeight() // 初始化视口高度
|
updateViewportHeight() // 初始化视口高度
|
||||||
window.addEventListener('resize', updateViewportHeight) // 监听窗口大小变化
|
window.addEventListener('resize', updateViewportHeight) // 监听窗口大小变化
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
window.removeEventListener('resize', updateViewportHeight) // 移除监听
|
window.removeEventListener('resize', updateViewportHeight) // 移除监听
|
||||||
})
|
})
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .el-dialog__body {
|
::v-deep .el-dialog__body {
|
||||||
overflow-y: none !important;
|
overflow-y: none !important;
|
||||||
max-height: 70vh !important;
|
max-height: 70vh !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -50,10 +50,18 @@
|
|||||||
</el-descriptions-item> -->
|
</el-descriptions-item> -->
|
||||||
|
|
||||||
<el-descriptions-item label="PT变比" width="160">
|
<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>
|
||||||
<el-descriptions-item label="CT变比" width="160">
|
<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>
|
||||||
|
|
||||||
<!-- <el-descriptions-item label="名称">
|
<!-- <el-descriptions-item label="名称">
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ const tableStore = new TableStore({
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ const tableStore: any = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'startTime', title: '发生时刻', minWidth: 170, sortable: true },
|
{ field: 'startTime', title: '发生时刻', minWidth: 170, sortable: true },
|
||||||
{ field: 'showName', title: '事件描述', minWidth: 170 },
|
{ field: 'showName', title: '事件描述', minWidth: 120 },
|
||||||
{
|
{
|
||||||
field: 'phaseType',
|
field: 'phaseType',
|
||||||
title: '相别',
|
title: '相别',
|
||||||
minWidth: 100,
|
minWidth: 80,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
row.cellValue = row.cellValue ? row.cellValue : '/'
|
row.cellValue = row.cellValue ? row.cellValue : '/'
|
||||||
return row.cellValue
|
return row.cellValue
|
||||||
@@ -69,7 +69,7 @@ const tableStore: any = new TableStore({
|
|||||||
{
|
{
|
||||||
field: 'persistTime',
|
field: 'persistTime',
|
||||||
title: '持续时间(s)',
|
title: '持续时间(s)',
|
||||||
minWidth: 100,
|
minWidth: 110,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
console.log('row.cellValue', row.cellValue)
|
console.log('row.cellValue', row.cellValue)
|
||||||
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
|
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
|
||||||
@@ -80,7 +80,7 @@ const tableStore: any = new TableStore({
|
|||||||
{
|
{
|
||||||
field: 'featureAmplitude',
|
field: 'featureAmplitude',
|
||||||
title: '暂降(聚升)幅值(%)',
|
title: '暂降(聚升)幅值(%)',
|
||||||
width: 100,
|
minWidth: 130,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
//row.cellValue = row.cellValue + '' ? row.cellValue.toFixed(2) : '/'
|
//row.cellValue = row.cellValue + '' ? row.cellValue.toFixed(2) : '/'
|
||||||
row.cellValue = row.cellValue != null ? Number(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,
|
width: 180,
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
@@ -118,7 +118,9 @@ const tableStore: any = new TableStore({
|
|||||||
boxoList.value = row
|
boxoList.value = row
|
||||||
boxoList.value.systemType = 'YPT'
|
boxoList.value.systemType = 'YPT'
|
||||||
boxoList.value.engineeringName = tableParams.value.engineeringName
|
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
|
wp.value = res.data
|
||||||
view.value = false
|
view.value = false
|
||||||
view2.value = true
|
view2.value = true
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="80"></vxe-column>
|
<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
|
<span
|
||||||
style="cursor: pointer; color: #551a8b"
|
style="cursor: pointer; color: #551a8b"
|
||||||
:style="{
|
:style="{
|
||||||
@@ -91,15 +91,15 @@
|
|||||||
</span>
|
</span>
|
||||||
</vxe-column>
|
</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 : '/' }}
|
{{ row.startTime ? row.startTime : '/' }}
|
||||||
</vxe-column>
|
</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>
|
<span>
|
||||||
{{ row.type == 'dir' ? '文件夹' : row.type == 'file' ? '文件' : '/' }}
|
{{ row.type == 'dir' ? '文件夹' : row.type == 'file' ? '文件' : '/' }}
|
||||||
</span>
|
</span>
|
||||||
</vxe-column>
|
</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>
|
<span>
|
||||||
{{ row.size && row.type == 'file' ? row.size + 'KB' : '/' }}
|
{{ row.size && row.type == 'file' ? row.size + 'KB' : '/' }}
|
||||||
</span>
|
</span>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
<!--<vxe-column field="fileCheck" align="center" title="文件校验码" width="100" #default="{ row }">
|
<!--<vxe-column field="fileCheck" align="center" title="文件校验码" width="100" #default="{ row }">
|
||||||
{{ row.fileCheck ? row.fileCheck : '/' }}
|
{{ row.fileCheck ? row.fileCheck : '/' }}
|
||||||
</vxe-column> -->
|
</vxe-column> -->
|
||||||
<vxe-column title="操作" width="200px">
|
<vxe-column title="操作" width="120px" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button link size="small" type="danger" @click="handleDelDirOrFile(row)">删除</el-button>
|
<el-button link size="small" type="danger" @click="handleDelDirOrFile(row)">删除</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -596,10 +596,10 @@ mqttRef.value.on('connect', (e: any) => {
|
|||||||
})
|
})
|
||||||
const mqttMessage = ref<any>({})
|
const mqttMessage = ref<any>({})
|
||||||
const status: any = ref()
|
const status: any = ref()
|
||||||
function parseStringToObject(str:string) {
|
function parseStringToObject(str: string) {
|
||||||
const content = str.replace(/^{|}$/g, '')
|
const content = str.replace(/^{|}$/g, '')
|
||||||
const pairs = content.split(',')
|
const pairs = content.split(',')
|
||||||
const result:any = {}
|
const result: any = {}
|
||||||
pairs.forEach(pair => {
|
pairs.forEach(pair => {
|
||||||
const [key, value] = pair.split(':')
|
const [key, value] = pair.split(':')
|
||||||
// 尝试将数字转换为Number类型
|
// 尝试将数字转换为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 str = JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||||
|
|
||||||
|
|
||||||
let regex = /fileName:(.*?),allStep/
|
let regex = /fileName:(.*?),allStep/
|
||||||
let regex1 = /allStep:(.*?),nowStep/
|
let regex1 = /allStep:(.*?),nowStep/
|
||||||
let regex2 = /nowStep:(.*?),userId/
|
let regex2 = /nowStep:(.*?),userId/
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ const tableStore = new TableStore({
|
|||||||
}, sortable: true
|
}, sortable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: 180,
|
width: 180,
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -1,61 +1,69 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader datePicker>
|
<TableHeader datePicker>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="设备名称">
|
<el-form-item label="设备名称">
|
||||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||||
placeholder="请输入设备名称" />
|
placeholder="请输入设备名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :isGroup="true" />
|
<Table ref="tableRef" :isGroup="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/log/debug'
|
name: 'govern/log/debug'
|
||||||
})
|
})
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-device-boot/process/queryPage',
|
url: '/cs-device-boot/process/queryPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '设备名称', field: 'devName', align: 'center' },
|
{
|
||||||
{ title: '操作用户', field: 'operatorName', align: 'center' },
|
field: 'index',
|
||||||
{
|
title: '序号',
|
||||||
title: '操作内容', field: 'process', align: 'center', formatter: (row: any) => {
|
width: '80',
|
||||||
return row.cellValue == 1 ? '设备登记' : row.cellValue == 2 ? '功能调试' : row.cellValue == 3 ? '出厂调试' : row.cellValue == 4 ? '设备投运' : ''
|
formatter: (row: any) => {
|
||||||
}
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
},
|
}
|
||||||
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
|
},
|
||||||
{ title: '结束时间', field: 'endTime', align: 'center', sortable: true }
|
{ title: '设备名称', field: 'devName', align: 'center' },
|
||||||
],
|
{ title: '操作用户', field: 'operatorName', align: 'center' },
|
||||||
|
{
|
||||||
loadCallback: () => {
|
title: '操作内容', field: 'process', align: 'center', formatter: (row: any) => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
return row.cellValue == 1 ? '设备登记' : row.cellValue == 2 ? '功能调试' : row.cellValue == 3 ? '出厂调试' : row.cellValue == 4 ? '设备投运' : ''
|
||||||
item.result = item.result === 1 ? '成功' : '失败'
|
}
|
||||||
for (let key in item) {
|
},
|
||||||
if (typeof item[key] !== 'number') {
|
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
|
||||||
item[key] = item[key] || '/'
|
{ title: '结束时间', field: 'endTime', align: 'center', sortable: true }
|
||||||
}
|
],
|
||||||
}
|
|
||||||
})
|
loadCallback: () => {
|
||||||
}
|
tableStore.table.data.forEach((item: any) => {
|
||||||
})
|
item.result = item.result === 1 ? '成功' : '失败'
|
||||||
|
for (let key in item) {
|
||||||
provide('tableStore', tableStore)
|
if (typeof item[key] !== 'number') {
|
||||||
tableStore.table.params.searchState = 0
|
item[key] = item[key] || '/'
|
||||||
tableStore.table.params.sortBy = ''
|
}
|
||||||
tableStore.table.params.orderBy = ''
|
}
|
||||||
tableStore.table.params.searchValue = ''
|
})
|
||||||
onMounted(() => {
|
}
|
||||||
tableStore.index()
|
})
|
||||||
})
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
const addMenu = () => { }
|
tableStore.table.params.searchState = 0
|
||||||
</script>
|
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({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-device-boot/cslog/queryLog',
|
url: '/cs-device-boot/cslog/queryLog',
|
||||||
method: 'POST',
|
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: 'createTime', align: 'center', sortable: true, minWidth: '150' },
|
||||||
{ title: '操作描述', field: 'operate', align: 'center', minWidth: '300' },
|
{ title: '操作描述', field: 'operate', align: 'center', minWidth: '300' },
|
||||||
{ title: '用户名称', field: 'userName', align: 'center', minWidth: '130' },
|
{ title: '用户名称', field: 'userName', align: 'center', minWidth: '130' },
|
||||||
|
|||||||
@@ -111,10 +111,10 @@ const tableStore = new TableStore({
|
|||||||
{ title: '数据存储', field: 'classIdName', minWidth: 120 },
|
{ title: '数据存储', field: 'classIdName', minWidth: 120 },
|
||||||
{ title: '数据来源', field: 'resourcesIdName', minWidth: 120 },
|
{ title: '数据来源', field: 'resourcesIdName', minWidth: 120 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,12 +63,20 @@ const tableStore = new TableStore({
|
|||||||
url: '/cs-device-boot/devmodel/queryDevModelPage',
|
url: '/cs-device-boot/devmodel/queryDevModelPage',
|
||||||
method: 'POST',
|
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: 'devTypeName' },
|
{ title: '装置型号', field: 'devTypeName' },
|
||||||
{ title: '模板名称', field: 'name' },
|
{ title: '模板名称', field: 'name' },
|
||||||
{ title: '版本号', field: 'versionNo' },
|
{ title: '版本号', field: 'versionNo' },
|
||||||
{ title: '版本时间', field: 'versionDate', sortable: true },
|
{ title: '版本时间', field: 'versionDate', sortable: true },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -47,16 +47,25 @@ const tableStore = new TableStore({
|
|||||||
url: '/cs-device-boot/edData/queryEdDataPage',
|
url: '/cs-device-boot/edData/queryEdDataPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '装置型号', field: 'devTypeName' },
|
{
|
||||||
{ title: '版本号', field: 'versionNo' },
|
field: 'index',
|
||||||
{ title: '版本协议', field: 'versionAgreement' },
|
title: '序号',
|
||||||
{ title: '版本日期', field: 'versionDate' },
|
width: '80',
|
||||||
{ title: '归档日期', field: 'updateTime' },
|
formatter: (row: any) => {
|
||||||
{ title: '描述', field: 'description' },
|
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: '状态',
|
title: '状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
|
minWidth: '80',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'error',
|
0: 'error',
|
||||||
1: 'success'
|
1: 'success'
|
||||||
@@ -67,7 +76,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 80
|
minWidth: 80
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 220,
|
width: 220,
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -1,97 +1,97 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader datePicker>
|
<TableHeader datePicker>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="关键字筛选">
|
<el-form-item label="关键字筛选">
|
||||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||||
clearable placeholder="请输入关键字筛选" />
|
clearable placeholder="请输入关键字筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef"></Table>
|
<Table ref="tableRef"></Table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { auditFeedBack } from '@/api/cs-system-boot/manage'
|
import { auditFeedBack } from '@/api/cs-system-boot/manage'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/manage/feedback'
|
name: 'govern/manage/feedback'
|
||||||
})
|
})
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/cs-system-boot/feedback/queryFeedBackPage',
|
url: '/cs-system-boot/feedback/queryFeedBackPage',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '标题', field: 'title', align: 'center' },
|
{ title: '标题', field: 'title', align: 'center' },
|
||||||
{ title: '描述', field: 'description', align: 'center' },
|
{ title: '描述', field: 'description', align: 'center' },
|
||||||
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
|
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
width: '100',
|
width: '100',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'primary'
|
2: 'primary'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '已解决',
|
0: '已解决',
|
||||||
1: '待处理',
|
1: '待处理',
|
||||||
2: '处理中'
|
2: '处理中'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'Finished',
|
name: 'Finished',
|
||||||
title: '解决',
|
title: '解决',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Finished',
|
icon: 'el-icon-Finished',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.status == 0
|
return row.status == 0
|
||||||
},
|
},
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '该问题是否已解决?'
|
title: '该问题是否已解决?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
auditFeedBack({
|
auditFeedBack({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
status: 0
|
status: 0
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
tableStore.onTableAction('search', {})
|
tableStore.onTableAction('search', {})
|
||||||
ElMessage.success('操作成功!')
|
ElMessage.success('操作成功!')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => { }
|
loadCallback: () => { }
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.searchState = 0
|
tableStore.table.params.searchState = 0
|
||||||
tableStore.table.params.sortBy = ''
|
tableStore.table.params.sortBy = ''
|
||||||
tableStore.table.params.orderBy = ''
|
tableStore.table.params.orderBy = ''
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
const addMenu = () => { }
|
const addMenu = () => { }
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '监测点数量', field: 'pointNum', align: 'center' },
|
{ title: '监测点数量', field: 'pointNum', align: 'center' },
|
||||||
{ title: '拓扑图', field: 'filePath', align: 'center', render: 'image' },
|
{ title: '拓扑图', field: 'filePath', align: 'center', render: 'image' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const tableStore: any = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '100',
|
width: '100',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'createTime', title: '创建时间' , sortable: true},
|
{ field: 'createTime', title: '创建时间' , sortable: true},
|
||||||
{ field: 'updateTime', title: '更新时间', sortable: true },
|
{ field: 'updateTime', title: '更新时间', sortable: true },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '220',
|
width: '220',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ const tableStore: any = new TableStore({
|
|||||||
{ title: '用户协议容量(MVA)', field: 'userAgreementCapacity', minWidth: 100 },
|
{ title: '用户协议容量(MVA)', field: 'userAgreementCapacity', minWidth: 100 },
|
||||||
{ title: '装机容量(MW)', field: 'installedCapacity', minWidth: 100 },
|
{ title: '装机容量(MW)', field: 'installedCapacity', minWidth: 100 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<div class="default">
|
<div class="default">
|
||||||
<div style="flex: 1">
|
<div style="width: calc(100% - 300px);">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="前置等级">
|
<el-form-item label="前置等级">
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
@current-change="currentChangeEvent"
|
@current-change="currentChangeEvent"
|
||||||
></Table>
|
></Table>
|
||||||
</div>
|
</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">
|
<el-input v-model="filterText" placeholder="请输入内容" clearable show-word-limit @input="change">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
@@ -301,12 +301,21 @@ const tableStore = new TableStore({
|
|||||||
url: '/cs-device-boot/node/nodeList',
|
url: '/cs-device-boot/node/nodeList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
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: '等级',
|
title: '等级',
|
||||||
field: 'nodeGrade',
|
field: 'nodeGrade',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
|
minWidth: '80',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
@@ -320,20 +329,24 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '最大监测点数量',
|
title: '最大监测点数量',
|
||||||
field: 'nodeDevNum'
|
field: 'nodeDevNum',
|
||||||
|
minWidth: '80',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '最大进程数',
|
title: '最大进程数',
|
||||||
field: 'maxProcessNum'
|
field: 'maxProcessNum',
|
||||||
|
minWidth: '80',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '排序',
|
title: '排序',
|
||||||
field: 'sort'
|
field: 'sort',
|
||||||
|
minWidth: '80'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'state',
|
field: 'state',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
|
minWidth: '80',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'warning',
|
0: 'warning',
|
||||||
1: 'success'
|
1: 'success'
|
||||||
@@ -343,11 +356,12 @@ const tableStore = new TableStore({
|
|||||||
1: '启用'
|
1: '启用'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '描述', field: 'remark' },
|
{ title: '描述', field: 'remark', minWidth: '200', },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '100',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
@@ -626,7 +640,7 @@ onMounted(() => {
|
|||||||
height: 140px;
|
height: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:deep(.default) {
|
.default {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.custom-tree-node {
|
.custom-tree-node {
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '200',
|
width: '200',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ const tableStore = new TableStore({
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ const tableStore = new TableStore({
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'path', title: '组件路径' },
|
{ field: 'path', title: '组件路径' },
|
||||||
{ field: 'image', title: '组件展示', render: 'image' },
|
{ field: 'image', title: '组件展示', render: 'image' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
width: '150',
|
width: '150',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,149 +1,149 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dictiontary-list-detail child-router">
|
<div class="dictiontary-list-detail child-router">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-page-header @back="$emit('close')">
|
<el-page-header @back="$emit('close')">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600 mr-3">{{ props.detail.name }}详情信息</span>
|
<span class="text-large font-600 mr-3">{{ props.detail.name }}详情信息</span>
|
||||||
</template>
|
</template>
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键字筛选">
|
<el-form-item label="关键字筛选">
|
||||||
<el-input maxlength="32" show-word-limit style="width: 240px"
|
<el-input maxlength="32" show-word-limit style="width: 240px"
|
||||||
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
|
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button :icon="Plus" type="primary" @click="add">新增</el-button>
|
<el-button :icon="Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<PopupDetailEdit ref="popupEditRef"></PopupDetailEdit>
|
<PopupDetailEdit ref="popupEditRef"></PopupDetailEdit>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import PopupDetailEdit from './popupDetailEdit.vue'
|
import PopupDetailEdit from './popupDetailEdit.vue'
|
||||||
import { dictDataDelete } from '@/api/system-boot/dicData'
|
import { dictDataDelete } from '@/api/system-boot/dicData'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'setting/dictionary/list/detail'
|
name: 'setting/dictionary/list/detail'
|
||||||
})
|
})
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
detail: anyObj
|
detail: anyObj
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
detail: () => {
|
detail: () => {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const popupEditRef = ref()
|
const popupEditRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/dictData/getTypeIdData',
|
url: '/system-boot/dictData/getTypeIdData',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '名称', field: 'name' },
|
{ title: '名称', field: 'name' },
|
||||||
{ title: '编码', field: 'code' },
|
{ title: '编码', field: 'code' },
|
||||||
{ title: '排序', field: 'sort' },
|
{ title: '排序', field: 'sort' },
|
||||||
{ title: '计算值', field: 'value' },
|
{ title: '计算值', field: 'value' },
|
||||||
{ title: '事件等级', field: 'levelName' },
|
{ title: '事件等级', field: 'levelName' },
|
||||||
{ title: '算法描述', field: 'algoDescribe' },
|
{ title: '算法描述', field: 'algoDescribe' },
|
||||||
{ title: '状态', field: 'stateName' },
|
{ title: '状态', field: 'stateName' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupEditRef.value.open('编辑', {
|
popupEditRef.value.open('编辑', {
|
||||||
...row,
|
...row,
|
||||||
openDescribe: props.detail.openDescribe,
|
openDescribe: props.detail.openDescribe,
|
||||||
openLevel: props.detail.openLevel,
|
openLevel: props.detail.openLevel,
|
||||||
typeName: props.detail.name + row.name,
|
typeName: props.detail.name + row.name,
|
||||||
typeId: props.detail.id
|
typeId: props.detail.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除该字典类型吗?'
|
title: '确定删除该字典类型吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
dictDataDelete([row.id]).then(() => {
|
dictDataDelete([row.id]).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
item.stateName = item.state === 1 ? '正常' : '删除'
|
item.stateName = item.state === 1 ? '正常' : '删除'
|
||||||
switch (item.level) {
|
switch (item.level) {
|
||||||
case 0:
|
case 0:
|
||||||
item.levelName = '普通'
|
item.levelName = '普通'
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
item.levelName = '中等'
|
item.levelName = '中等'
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
item.levelName = '严重'
|
item.levelName = '严重'
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
item.levelName = '未知'
|
item.levelName = '未知'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
for (let key in item) {
|
for (let key in item) {
|
||||||
if (typeof item[key] !== 'number') {
|
if (typeof item[key] !== 'number') {
|
||||||
item[key] = item[key] || '/'
|
item[key] = item[key] || '/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.searchState = 0
|
tableStore.table.params.searchState = 0
|
||||||
tableStore.table.params.typeId = props.detail.id
|
tableStore.table.params.typeId = props.detail.id
|
||||||
if (props.detail.openLevel !== 1) {
|
if (props.detail.openLevel !== 1) {
|
||||||
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'levelName')
|
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'levelName')
|
||||||
}
|
}
|
||||||
if (props.detail.openDescribe !== 1) {
|
if (props.detail.openDescribe !== 1) {
|
||||||
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'algoDescribe')
|
tableStore.table.column = tableStore.table.column.filter((item: any) => item.field !== 'algoDescribe')
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const add = () => {
|
const add = () => {
|
||||||
popupEditRef.value.open('新增', {
|
popupEditRef.value.open('新增', {
|
||||||
openLevel: props.detail.openLevel,
|
openLevel: props.detail.openLevel,
|
||||||
openDescribe: props.detail.openDescribe,
|
openDescribe: props.detail.openDescribe,
|
||||||
typeName: props.detail.name,
|
typeName: props.detail.name,
|
||||||
typeId: props.detail.id
|
typeId: props.detail.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,124 +1,124 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" style="position: relative">
|
<div class="default-main" style="position: relative">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="关键字筛选">
|
<el-form-item label="关键字筛选">
|
||||||
<el-input maxlength="32" show-word-limit style="width: 240px"
|
<el-input maxlength="32" show-word-limit style="width: 240px"
|
||||||
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
|
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入名称或编码筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button :icon="Plus" type="primary" @click="add">新增字典类型</el-button>
|
<el-button :icon="Plus" type="primary" @click="add">新增字典类型</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<PopupEdit ref="popupEditRef"></PopupEdit>
|
<PopupEdit ref="popupEditRef"></PopupEdit>
|
||||||
<Detail ref="detailRef" :detail="detail" @close="detail = null" v-if="detail"></Detail>
|
<Detail ref="detailRef" :detail="detail" @close="detail = null" v-if="detail"></Detail>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import PopupEdit from './popupEdit.vue'
|
import PopupEdit from './popupEdit.vue'
|
||||||
import { dictTypeDelete } from '@/api/system-boot/dictType'
|
import { dictTypeDelete } from '@/api/system-boot/dictType'
|
||||||
import Detail from './detail.vue'
|
import Detail from './detail.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'system-boot/dictType/list'
|
name: 'system-boot/dictType/list'
|
||||||
})
|
})
|
||||||
const popupEditRef = ref()
|
const popupEditRef = ref()
|
||||||
const detail = ref<anyObj | null>(null)
|
const detail = ref<anyObj | null>(null)
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/dictType/list',
|
url: '/system-boot/dictType/list',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号', width: 80, formatter: (row: any) => {
|
title: '序号', width: 80, formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '名称', field: 'name' },
|
{ title: '名称', field: 'name' },
|
||||||
{ title: '编码', field: 'code' },
|
{ title: '编码', field: 'code' },
|
||||||
{ title: '开启等级', field: 'openLevelName' },
|
{ title: '开启等级', field: 'openLevelName' },
|
||||||
{ title: '开启算法', field: 'openDescribeName' },
|
{ title: '开启算法', field: 'openDescribeName' },
|
||||||
{ title: '字典描述', field: 'remark' },
|
{ title: '字典描述', field: 'remark' },
|
||||||
{ title: '创建时间', field: 'createTime', sortable: true },
|
{ title: '创建时间', field: 'createTime', sortable: true },
|
||||||
{ title: '更新时间', field: 'updateTime', sortable: true},
|
{ title: '更新时间', field: 'updateTime', sortable: true},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'stateName',
|
field: 'stateName',
|
||||||
width: '80',
|
width: '80',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
'正常': 'success',
|
'正常': 'success',
|
||||||
'删除': 'danger'
|
'删除': 'danger'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
title: '查看',
|
title: '查看',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-ZoomIn',
|
icon: 'el-icon-ZoomIn',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
detail.value = row
|
detail.value = row
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupEditRef.value.open('编辑字典类型', row)
|
popupEditRef.value.open('编辑字典类型', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除该字典类型吗?'
|
title: '确定删除该字典类型吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
dictTypeDelete([row.id]).then(() => {
|
dictTypeDelete([row.id]).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
item.stateName = item.state === 1 ? '正常' : '删除'
|
item.stateName = item.state === 1 ? '正常' : '删除'
|
||||||
item.openLevelName = item.openLevel === 1 ? '开启' : '不开启'
|
item.openLevelName = item.openLevel === 1 ? '开启' : '不开启'
|
||||||
item.openDescribeName = item.openDescribe === 1 ? '开启' : '不开启'
|
item.openDescribeName = item.openDescribe === 1 ? '开启' : '不开启'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.searchState = 0
|
tableStore.table.params.searchState = 0
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const add = () => {
|
const add = () => {
|
||||||
popupEditRef.value.open('新增字典类型')
|
popupEditRef.value.open('新增字典类型')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,113 +1,113 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<div class='custom-table-header'>
|
<div class='custom-table-header'>
|
||||||
<div class="title">字典树列表</div>
|
<div class="title">字典树列表</div>
|
||||||
<el-button :icon='Plus' type='primary' @click='addMenu'>新增字典类型</el-button>
|
<el-button :icon='Plus' type='primary' @click='addMenu'>新增字典类型</el-button>
|
||||||
</div>
|
</div>
|
||||||
<Table ref='tableRef' />
|
<Table ref='tableRef' />
|
||||||
<PopupForm ref='popupFormRef'></PopupForm>
|
<PopupForm ref='popupFormRef'></PopupForm>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import PopupForm from './popupForm.vue'
|
import PopupForm from './popupForm.vue'
|
||||||
import { dicDelete } from '@/api/system-boot/dic'
|
import { dicDelete } from '@/api/system-boot/dic'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'setting/dictionary/tree'
|
name: 'setting/dictionary/tree'
|
||||||
})
|
})
|
||||||
|
|
||||||
const popupFormRef = ref()
|
const popupFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
showPage:false,
|
showPage:false,
|
||||||
url: '/system-boot/dictTree/queryTree',
|
url: '/system-boot/dictTree/queryTree',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
column: [
|
column: [
|
||||||
{ title: '字典名称', field: 'name', treeNode: true, align: 'left' },
|
{ title: '字典名称', field: 'name', treeNode: true, align: 'left' },
|
||||||
// { title: '排序', field: 'sort',width:'80' },
|
// { title: '排序', field: 'sort',width:'80' },
|
||||||
{ title: '编码', field: 'code' },
|
{ title: '编码', field: 'code' },
|
||||||
{ title: '描述', field: 'remark' },
|
{ title: '描述', field: 'remark' },
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
field: 'status',
|
field: 'status',
|
||||||
width: '80',
|
width: '80',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'success',
|
0: 'success',
|
||||||
1: 'warning',
|
1: 'warning',
|
||||||
2: 'danger'
|
2: 'danger'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '正常',
|
0: '正常',
|
||||||
1: '禁用',
|
1: '禁用',
|
||||||
2: '删除'
|
2: '删除'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
title: '新增',
|
title: '新增',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupFormRef.value.open('新增字典类型', {
|
popupFormRef.value.open('新增字典类型', {
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
type: 0,
|
type: 0,
|
||||||
pid: row.id,
|
pid: row.id,
|
||||||
id: ''
|
id: ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
popupFormRef.value.open('编辑字典类型', row)
|
popupFormRef.value.open('编辑字典类型', row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除该字典类型吗?'
|
title: '确定删除该字典类型吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
dicDelete(row.id).then(() => {
|
dicDelete(row.id).then(() => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.searchState = 0
|
tableStore.table.params.searchState = 0
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const addMenu = () => {
|
const addMenu = () => {
|
||||||
popupFormRef.value.open('新增字典类型')
|
popupFormRef.value.open('新增字典类型')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'createTime', title: '创建时间', sortable: true },
|
{ field: 'createTime', title: '创建时间', sortable: true },
|
||||||
{ field: 'updateTime', title: '更新时间', sortable: true },
|
{ field: 'updateTime', title: '更新时间', sortable: true },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '220',
|
width: '220',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -66,10 +66,18 @@ const tableStore: any = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
isWebPaging: true,
|
isWebPaging: true,
|
||||||
column: [
|
column: [
|
||||||
{ field: 'timerName', title: '任务名称' },
|
{
|
||||||
{ field: 'actionClass', title: '任务执行器' },
|
field: 'index',
|
||||||
{ field: 'cron', title: '定时任务表达式' },
|
title: '序号',
|
||||||
{ field: 'remark', 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',
|
// field: 'jobStatus', title: '状态', width: '100',
|
||||||
// render: 'tag',
|
// render: 'tag',
|
||||||
@@ -87,7 +95,7 @@ const tableStore: any = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
render: 'switch',
|
render: 'switch',
|
||||||
width: 100,
|
minWidth: 100,
|
||||||
field: 'jobStatus',
|
field: 'jobStatus',
|
||||||
activeText: '运行中',
|
activeText: '运行中',
|
||||||
activeValue: '1',
|
activeValue: '1',
|
||||||
@@ -107,9 +115,10 @@ const tableStore: any = new TableStore({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'sort', title: '排序', width: '80' },
|
{ field: 'sort', title: '排序', minWidth: '80' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
width: '220',
|
width: '220',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -1,150 +1,150 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader select ref="TableHeaderRef">
|
<TableHeader select ref="TableHeaderRef">
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<formTab ref="formTabRef" v-if="show" @Cancels=";(show = false), tableStore.index()" />
|
<formTab ref="formTabRef" v-if="show" @Cancels=";(show = false), tableStore.index()" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { activateTheme, deleteTheme } from '@/api/system/subject/index'
|
import { activateTheme, deleteTheme } from '@/api/system/subject/index'
|
||||||
import formTab from './form/index.vue'
|
import formTab from './form/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
import { getTheme } from '@/api/systerm'
|
import { getTheme } from '@/api/systerm'
|
||||||
const configStore = useConfig()
|
const configStore = useConfig()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'user-boot/function/functionTree'
|
name: 'user-boot/function/functionTree'
|
||||||
})
|
})
|
||||||
|
|
||||||
const formTabRef = ref()
|
const formTabRef = ref()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '/system-boot/theme/getAllThemes',
|
url: '/system-boot/theme/getAllThemes',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'name', title: '主题名称' },
|
{ field: 'name', title: '主题名称' },
|
||||||
{ field: 'remark', title: '描述' },
|
{ field: 'remark', title: '描述' },
|
||||||
{ field: 'logoUrl', title: '主题图标', render: 'image' },
|
{ field: 'logoUrl', title: '主题图标', render: 'image' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作', fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '激活 ',
|
title: '激活 ',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.active == 1
|
return row.active == 1
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
activateTheme({ id: row.id }).then(res => {
|
activateTheme({ id: row.id }).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '激活成功!',
|
message: '激活成功!',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '修改 ',
|
title: '修改 ',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
show.value = true
|
show.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
formTabRef.value.open({
|
formTabRef.value.open({
|
||||||
text: '修改主题',
|
text: '修改主题',
|
||||||
row: row
|
row: row
|
||||||
})
|
})
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteTheme({ id: row.id }).then(res => {
|
deleteTheme({ id: row.id }).then(res => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '删除成功!',
|
message: '删除成功!',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
getTheme().then(res => {
|
getTheme().then(res => {
|
||||||
let list: any = [
|
let list: any = [
|
||||||
'elementUiPrimary',
|
'elementUiPrimary',
|
||||||
'tableHeaderBackground',
|
'tableHeaderBackground',
|
||||||
'tableHeaderColor',
|
'tableHeaderColor',
|
||||||
'tableCurrent',
|
'tableCurrent',
|
||||||
'menuBackground',
|
'menuBackground',
|
||||||
'menuColor',
|
'menuColor',
|
||||||
'menuTopBarBackground',
|
'menuTopBarBackground',
|
||||||
'menuActiveBackground',
|
'menuActiveBackground',
|
||||||
'menuActiveColor',
|
'menuActiveColor',
|
||||||
'headerBarTabColor',
|
'headerBarTabColor',
|
||||||
'headerBarBackground'
|
'headerBarBackground'
|
||||||
]
|
]
|
||||||
|
|
||||||
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
|
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
|
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
|
||||||
}
|
}
|
||||||
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
|
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// 新增主题
|
// 新增主题
|
||||||
const add = () => {
|
const add = () => {
|
||||||
show.value = true
|
show.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
formTabRef.value.open({
|
formTabRef.value.open({
|
||||||
text: '新增主题'
|
text: '新增主题'
|
||||||
})
|
})
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user