优化表格
This commit is contained in:
@@ -111,10 +111,10 @@ const tableStore = new TableStore({
|
||||
{ title: '数据存储', field: 'classIdName', minWidth: 120 },
|
||||
{ title: '数据来源', field: 'resourcesIdName', minWidth: 120 },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
fixed: 'right',
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
|
||||
@@ -63,12 +63,20 @@ const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/devmodel/queryDevModelPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '装置型号', field: 'devTypeName' },
|
||||
{ title: '模板名称', field: 'name' },
|
||||
{ title: '版本号', field: 'versionNo' },
|
||||
{ title: '版本时间', field: 'versionDate', sortable: true },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -47,16 +47,25 @@ const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/edData/queryEdDataPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '装置型号', field: 'devTypeName' },
|
||||
{ title: '版本号', field: 'versionNo' },
|
||||
{ title: '版本协议', field: 'versionAgreement' },
|
||||
{ title: '版本日期', field: 'versionDate' },
|
||||
{ title: '归档日期', field: 'updateTime' },
|
||||
{ title: '描述', field: 'description' },
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ title: '装置型号', field: 'devTypeName' ,minWidth: '100'},
|
||||
{ title: '版本号', field: 'versionNo' ,minWidth: '100'},
|
||||
{ title: '版本协议', field: 'versionAgreement' ,minWidth: '100'},
|
||||
{ title: '版本日期', field: 'versionDate' ,minWidth: '100'},
|
||||
{ title: '归档日期', field: 'updateTime',minWidth: '150' },
|
||||
{ title: '描述', field: 'description',minWidth: '200' },
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
render: 'tag',
|
||||
minWidth: '80',
|
||||
custom: {
|
||||
0: 'error',
|
||||
1: 'success'
|
||||
@@ -67,7 +76,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -488,7 +488,7 @@ const tableStore = new TableStore({
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: 220,
|
||||
render: 'buttons',
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable placeholder="请输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { auditFeedBack } from '@/api/cs-system-boot/manage'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/manage/feedback'
|
||||
})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-system-boot/feedback/queryFeedBackPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '标题', field: 'title', align: 'center' },
|
||||
{ title: '描述', field: 'description', align: 'center' },
|
||||
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
width: '100',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '已解决',
|
||||
1: '待处理',
|
||||
2: '处理中'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'Finished',
|
||||
title: '解决',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Finished',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return row.status == 0
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '该问题是否已解决?'
|
||||
},
|
||||
click: row => {
|
||||
auditFeedBack({
|
||||
id: row.id,
|
||||
status: 0
|
||||
}).then(res => {
|
||||
tableStore.onTableAction('search', {})
|
||||
ElMessage.success('操作成功!')
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => { }
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchState = 0
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable placeholder="请输入关键字筛选" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { auditFeedBack } from '@/api/cs-system-boot/manage'
|
||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/manage/feedback'
|
||||
})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-system-boot/feedback/queryFeedBackPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '标题', field: 'title', align: 'center' },
|
||||
{ title: '描述', field: 'description', align: 'center' },
|
||||
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
width: '100',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'success',
|
||||
1: 'warning',
|
||||
2: 'primary'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '已解决',
|
||||
1: '待处理',
|
||||
2: '处理中'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'Finished',
|
||||
title: '解决',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Finished',
|
||||
render: 'confirmButton',
|
||||
disabled: row => {
|
||||
return row.status == 0
|
||||
},
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '该问题是否已解决?'
|
||||
},
|
||||
click: row => {
|
||||
auditFeedBack({
|
||||
id: row.id,
|
||||
status: 0
|
||||
}).then(res => {
|
||||
tableStore.onTableAction('search', {})
|
||||
ElMessage.success('操作成功!')
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => { }
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.searchState = 0
|
||||
tableStore.table.params.sortBy = ''
|
||||
tableStore.table.params.orderBy = ''
|
||||
tableStore.table.params.searchValue = ''
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
|
||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
||||
{ title: '监测点数量', field: 'pointNum', align: 'center' },
|
||||
{ title: '拓扑图', field: 'filePath', align: 'center', render: 'image' },
|
||||
{
|
||||
title: '操作',
|
||||
title: '操作', fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
Reference in New Issue
Block a user