Files
admin-sjzx/src/views/pqs/supervise/electricalEnergy/components/maintenance.vue

145 lines
4.9 KiB
Vue
Raw Normal View History

2024-03-12 16:15:45 +08:00
<template>
<TableHeader area datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="问题来源">
<el-select v-model="tableStore.table.params.searchState1" placeholder="请选择问题来源">
<el-option
v-for="item in uploadData"
:key="item.id"
:label="item.label"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="填报进度">
<el-select v-model="tableStore.table.params.searchState2" placeholder="请选择填报进度">
<el-option
v-for="item in uploadData"
:key="item.id"
:label="item.label"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核状态">
<el-select v-model="tableStore.table.params.searchState3" placeholder="请选择审核状态">
<el-option
v-for="item in uploadData"
:key="item.id"
:label="item.label"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="问题名称">
<el-select v-model="tableStore.table.params.searchState4" placeholder="请输入问题名称">
<el-option
v-for="item in uploadData"
:key="item.id"
:label="item.label"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary">新增</el-button>
<el-button icon="el-icon-EditPen" type="primary">填报</el-button>
<el-button icon="el-icon-Delete" type="primary">删除</el-button>
<el-button icon="el-icon-SuccessFilled" type="primary">归档</el-button>
<el-button icon="el-icon-PieChart" type="primary">历史审核记录</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
const uploadData = [
{
id: 0,
label: '未上传'
},
{
id: 1,
label: '已上传'
}
]
const dialogVisible = ref(false)
const title = ref('')
const TableHeaderRef = ref()
const ruleFormRef = ref()
const tableStore = new TableStore({
url: '/system-boot/area/areaSelect',
publicHeight: 65,
method: 'POST',
column: [
{ width: '60', type: 'checkbox' },
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'orgName', title: '所属单位' },
{
field: 'problemSources',
title: '问题来源'
},
{ field: 'powerQualityProblemNo', title: '问题编号' },
{ field: 'problemName', title: '问题名称' },
{ field: 'dataDate', title: '问题新建时间' },
{ field: 'reportProcess', title: '填报进度' },
{ field: 'reportProcessStatus', title: '审核状态' },
{
title: '详情',
width: '120',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '查看',
type: 'primary',
disabled: row => {
return row.reportProcess != 'Not_Reported' && row.reportProcess != 'Archived'
},
icon: 'el-icon-Plus',
render: 'basicButton',
click: async row => {}
}
]
}
],
loadCallback: () => {
tableStore.table.data = [
{
status: 2
}
]
}
})
tableStore.table.params.searchState1 = ''
tableStore.table.params.searchState2 = ''
tableStore.table.params.searchState3 = ''
tableStore.table.params.searchState4 = ''
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
</script>