电能质量问题-用户投诉联调

This commit is contained in:
zhujiyan
2024-05-22 19:55:57 +08:00
parent 1afc303fcd
commit f849e8611a
3 changed files with 65 additions and 33 deletions

View File

@@ -208,3 +208,12 @@ export function addComplaintsData(data) {
data
})
}
//针对用户投诉确认发起告警单
export function sureInitiateWarningLeaflet(query) {
return createAxios({
url: '/supervision-boot/SupervisionUserComplaint/initiateWarningLeaflet',
method: 'GET',
params:query
})
}

View File

@@ -9,7 +9,7 @@
</TableHeader>
<Table ref="tableRef" />
<!-- 新增 -->
<complaintsForm ref="formRef" @onSubmit="tableStore.index()"/>
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
@@ -19,6 +19,8 @@ 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'
import { useRouter } from 'vue-router'
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
// Steady_Statis
const dictData = useDictData()
const exceeded = dictData.getBasicData('Steady_Statis')
@@ -26,7 +28,7 @@ const tableRef = ref()
const planAddRef = ref()
const formRef = ref()
const TableHeaderRef = ref()
const router = useRouter() // 路由对象
const tableStore = new TableStore({
url: '/supervision-boot/SupervisionUserComplaint/list',
publicHeight: 65,
@@ -50,35 +52,56 @@ const tableStore = new TableStore({
{ field: 'monitorName', title: '监测点名称' },
{ field: 'monitorNumber', title: '监测点编号' },
{
field:'status',
field: 'detectionFlag',
title: '是否实现监测',
formatter: (row: any) => {
return row.cellvalue=='0'?'否':'是'
return row.cellvalue == '0' ? '否' : '是'
}
},
// {
// 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 => {}
// }
// ]
// }
{
title: '操作',
width: '180',
align: 'center',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '发起告警单',
type: 'warning',
icon: 'el-icon-Open',
render: 'confirmButton',
disabled: row => {
return row.initiateWarningFlag == 1
},
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'primary',
title: '请确认发起发起告警单!'
},
click: row => {
sureInitiateWarningLeaflet({ id: row.id })
ElMessage.success('发起告警单成功!')
tableStore.index()
}
},
{
name: 'edit',
title: '查看告警单',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.initiateWarningFlag == 0
},
click: row => {
router.push({
name: 'supervision/supervision/manage'
})
}
}
]
}
],
beforeSearchFun: () => {
tableStore.table.params.orgNo = tableStore.table.params.deptIndex

View File

@@ -49,14 +49,14 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否实现监测:" style="margin-top: 10px" prop="status">
<el-radio-group v-model="form.status">
<el-form-item label="是否实现监测:" style="margin-top: 10px" prop="detectionFlag">
<el-radio-group v-model="form.detectionFlag">
<el-radio value="0"></el-radio>
<el-radio value="1"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col v-if="form.status == '1'" :span="12">
<el-col v-if="form.detectionFlag == '1'" :span="12">
<el-form-item label="监测点名称:" style="margin-top: 10px" prop="monitorName">
<el-input
v-model="form.monitorName"
@@ -67,7 +67,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="form.status == '1'">
<el-row v-if="form.detectionFlag == '1'">
<el-col :span="12">
<el-form-item label="监测点编号:" style="margin-top: 10px" prop="monitorNumber">
<el-input
@@ -137,7 +137,7 @@ const steadyStateList = dictData.getBasicData('Steady_Indicator')
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
const form = ref({
complaintText: '', //投诉内容
status: '0', //是否实现监测
detectionFlag: '0', //是否实现监测
steadyIndicator: [], //稳态指标
transientIndicators: [], //暂态指标
userName: '', //用户名称
@@ -151,7 +151,7 @@ const rules = {
userNumber: [{ required: true, message: '请输入用户编号', trigger: 'blur' }],
userCategory: [{ required: true, message: '请选择用户类别', trigger: 'change' }],
complaintText: [{ required: true, message: '请输入投诉内容', trigger: 'blur' }],
status: [{ required: true, message: '请选择是否实现监测', trigger: 'change' }],
detectionFlag: [{ required: true, message: '请选择是否实现监测', trigger: 'change' }],
transientIndicators: [{ required: true, message: '请选择暂态指标', trigger: 'change' }],
steadyIndicator: [{ required: true, message: '请选择稳态指标', trigger: 'change' }],
monitorName: [{ required: true, message: '请输入监测点名称', trigger: 'blur' }],