100 lines
3.0 KiB
Vue
100 lines
3.0 KiB
Vue
<template>
|
|
<!-- 2 有新增 发起 预警单 -->
|
|
|
|
<TableHeader area datePicker ref="TableHeaderRef">
|
|
<template v-slot:operation>
|
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
|
</template>
|
|
</TableHeader>
|
|
<Table ref="tableRef" />
|
|
<!-- 新增 -->
|
|
<complaintsForm ref="formRef" />
|
|
</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 { useDictData } from '@/stores/dictData'
|
|
import complaintsForm from './form/complaintsForm.vue'
|
|
// Steady_Statis
|
|
const dictData = useDictData()
|
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
|
const tableRef = ref()
|
|
const planAddRef = ref()
|
|
const formRef = ref()
|
|
const TableHeaderRef = ref()
|
|
|
|
const tableStore = new TableStore({
|
|
url: '/supervision-boot/generalSurvey/getSurvey',
|
|
publicHeight: 65,
|
|
method: 'POST',
|
|
column: [
|
|
{
|
|
title: '序号',
|
|
type: 'seq',
|
|
align: 'center',
|
|
width: 60,
|
|
formatter: (row: any) => {
|
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
}
|
|
},
|
|
{ field: 'userName', title: '用户名称' },
|
|
{ field: 'userId', title: '用户编号' },
|
|
{ field: 'complaintContent', title: '投诉内容' },
|
|
{ field: 'complaintTime', title: '投诉时间' },
|
|
|
|
{
|
|
title: '操作',
|
|
width: '180',
|
|
align: 'center',
|
|
render: 'buttons',
|
|
|
|
buttons: [
|
|
{
|
|
name: 'edit',
|
|
title: '发起预警单',
|
|
type: 'primary',
|
|
icon: 'el-icon-Open',
|
|
render: 'confirmButton',
|
|
popconfirm: {
|
|
confirmButtonText: '确认',
|
|
cancelButtonText: '取消',
|
|
confirmButtonType: 'primary',
|
|
title: '请确认发起发起预警单!'
|
|
},
|
|
click: row => {}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
beforeSearchFun: () => {
|
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
},
|
|
loadCallback: () => {
|
|
tableStore.table.data = [
|
|
{
|
|
userName: '东润开阳堡光伏电站用户',
|
|
userId: '8115771123274',
|
|
complaintContent: '装置频繁重启',
|
|
complaintTime: '2024-05-16'
|
|
}
|
|
]
|
|
}
|
|
})
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
onMounted(() => {
|
|
tableStore.index()
|
|
})
|
|
// 新增
|
|
const add = () => {
|
|
formRef.value.open({ text: '新增投诉' })
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss"></style>
|