电能质量问题-用户投诉联调
This commit is contained in:
@@ -199,3 +199,12 @@ export function handleWarningAlarmFlag(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//提交用户投诉新增表单
|
||||||
|
export function addComplaintsData(data) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/SupervisionUserComplaint/add',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 用户投诉 -->
|
||||||
<!-- 2 有新增 发起 预警单 -->
|
<!-- 2 有新增 发起 预警单 -->
|
||||||
|
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
@@ -8,7 +9,7 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<complaintsForm ref="formRef" />
|
<complaintsForm ref="formRef" @onSubmit="tableStore.index()"/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
@@ -27,7 +28,7 @@ const formRef = ref()
|
|||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/generalSurvey/getSurvey',
|
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
@@ -41,47 +42,57 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'userName', title: '用户名称' },
|
{ field: 'userName', title: '用户名称' },
|
||||||
{ field: 'userId', title: '用户编号' },
|
{ field: 'userNumber', title: '用户编号' },
|
||||||
{ field: 'complaintContent', title: '投诉内容' },
|
// { field: 'userCategory', title: '用户类别' },
|
||||||
{ field: 'complaintTime', title: '投诉时间' },
|
{ field: 'complaintText', title: '投诉内容' },
|
||||||
|
{ field: 'steadyIndicator', title: '稳态指标' },
|
||||||
|
{ field: 'transientIndicators', title: '暂态指标' },
|
||||||
|
{ field: 'monitorName', title: '监测点名称' },
|
||||||
|
{ field: 'monitorNumber', title: '监测点编号' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
field:'status',
|
||||||
width: '180',
|
title: '是否实现监测',
|
||||||
align: 'center',
|
formatter: (row: any) => {
|
||||||
render: 'buttons',
|
return row.cellvalue=='0'?'否':'是'
|
||||||
|
}
|
||||||
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: 'primary',
|
||||||
|
// icon: 'el-icon-Open',
|
||||||
|
// render: 'confirmButton',
|
||||||
|
// popconfirm: {
|
||||||
|
// confirmButtonText: '确认',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// confirmButtonType: 'primary',
|
||||||
|
// title: '请确认发起发起预警单!'
|
||||||
|
// },
|
||||||
|
// click: row => {}
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = [
|
// tableStore.table.data = [
|
||||||
{
|
// {
|
||||||
userName: '东润开阳堡光伏电站用户',
|
// userName: '东润开阳堡光伏电站用户',
|
||||||
userId: '8115771123274',
|
// userId: '8115771123274',
|
||||||
complaintContent: '装置频繁重启',
|
// complaintContent: '装置频繁重启',
|
||||||
complaintTime: '2024-05-16'
|
// complaintTime: '2024-05-16'
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +1,119 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 1100px" :before-close="handleClose">
|
<el-dialog draggable v-model="dialogVisible" :title="title" style="width: 55%" :before-close="handleClose">
|
||||||
<el-form :model="userAdddata" :inline="true" ref="userAddRef" :rules="rules">
|
<el-form
|
||||||
<el-form-item label="用户名称:" prop="userName">
|
:model="form"
|
||||||
<el-input v-model="userAdddata.userName" clearable placeholder="请输入用户名称"></el-input>
|
ref="formRef"
|
||||||
</el-form-item>
|
:rules="rules"
|
||||||
<el-form-item label="用户编号:" prop="userNo">
|
label-width="140px"
|
||||||
<el-input v-model="userAdddata.userNo" clearable placeholder="请输入用户编号"></el-input>
|
label-position="right"
|
||||||
</el-form-item>
|
:scroll-to-error="true"
|
||||||
|
>
|
||||||
<el-form-item label="投诉内容:" style="margin-top: 10px" prop="complaintContent">
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="用户名称:" style="margin-top: 10px" prop="userName">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
v-model="form.userName"
|
||||||
style="width: 400px"
|
clearable
|
||||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
style="width: 100%"
|
||||||
placeholder="请输入内容"
|
placeholder="请输入用户名称"
|
||||||
v-model="userAdddata.complaintContent"
|
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
</el-col>
|
||||||
<el-form-item label="投诉时间:" style="margin-top: 10px" prop="complaintTime">
|
<!-- <el-col :span="12">
|
||||||
<el-date-picker
|
<el-form-item label="用户类别:" style="margin-top: 10px" prop="userCategory">
|
||||||
v-model="userAdddata.complaintTime"
|
<el-select
|
||||||
type="date"
|
v-model="form.userCategory"
|
||||||
placeholder="选择日期"
|
clearable
|
||||||
value-format="YYYY-MM-DD"
|
style="width: 100%"
|
||||||
></el-date-picker>
|
placeholder="请选择用户类别"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in monitorTypeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="用户编号:" style="margin-top: 10px" prop="userNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="form.userNumber"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请输入用户编号"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</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-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-form-item label="监测点名称:" style="margin-top: 10px" prop="monitorName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.monitorName"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请输入监测点名称"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.status == '1'">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="监测点编号:" style="margin-top: 10px" prop="monitorNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="form.monitorNumber"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请输入监测点编号"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-form-item label="稳态指标:" prop="steadyState">
|
<el-form-item label="投诉内容:" style="margin-top: 10px" prop="complaintText">
|
||||||
<el-checkbox-group v-model="userAdddata.steadyState">
|
<el-input
|
||||||
<el-checkbox v-for="(item, ind) in steadyStateList" :key="ind" :label="item.code">
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="form.complaintText"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="稳态指标:" style="margin-top: 10px" prop="steadyIndicator">
|
||||||
|
<el-checkbox-group v-model="form.steadyIndicator">
|
||||||
|
<div style="width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start">
|
||||||
|
<el-checkbox
|
||||||
|
style="flex: none; width: 120px"
|
||||||
|
v-for="(item, ind) in steadyStateList"
|
||||||
|
:key="ind"
|
||||||
|
:label="item.name"
|
||||||
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
|
</div>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br />
|
<el-form-item label="暂态指标:" style="margin-top: 10px" prop="transientIndicators">
|
||||||
<el-form-item label="暂态指标:" prop="transientIndicators">
|
<el-checkbox-group v-model="form.transientIndicators">
|
||||||
<el-checkbox-group v-model="userAdddata.transientIndicators">
|
<div style="width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start">
|
||||||
<el-checkbox v-for="(item, ind) in transientIndicatorsList" :key="ind" :label="item.code">
|
<el-checkbox
|
||||||
|
style="flex: none; width: 120px"
|
||||||
|
v-for="(item, ind) in transientIndicatorsList"
|
||||||
|
:key="ind"
|
||||||
|
:label="item.name"
|
||||||
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
|
</div>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -52,38 +126,55 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref,defineEmits } from 'vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
const emit = defineEmits(['onsubmit'])
|
import { addComplaintsData } from '@/api/process-boot/electricitymanagement'
|
||||||
|
const emits = defineEmits(['onSubmit'])
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title: any = ref('')
|
const title: any = ref('')
|
||||||
const steadyStateList = dictData.getBasicData('Steady_Indicator')
|
const steadyStateList = dictData.getBasicData('Steady_Indicator')
|
||||||
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
const transientIndicatorsList = dictData.getBasicData('Transient_Indicators')
|
||||||
|
const form = ref({
|
||||||
const userAdddata = ref({
|
complaintText: '', //投诉内容
|
||||||
complaintContent: '',
|
status: '0', //是否实现监测
|
||||||
complaintTime: '',
|
steadyIndicator: [], //稳态指标
|
||||||
steadyState: [],
|
transientIndicators: [], //暂态指标
|
||||||
userName: '',
|
userName: '', //用户名称
|
||||||
userNo: '',
|
userNumber: '', //用户编号
|
||||||
transientIndicators: []
|
userCategory: '', //用户类别
|
||||||
|
monitorName: '', //监测点名称
|
||||||
|
monitorNumber: '' //监测点编号
|
||||||
})
|
})
|
||||||
const rules = {
|
const rules = {
|
||||||
problemName: [{ required: true, message: '请输入问题名称', trigger: 'blur' }],
|
|
||||||
userName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
userName: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
|
||||||
userNo: [{ required: true, message: '请输入用户编号', trigger: 'blur' }],
|
userNumber: [{ required: true, message: '请输入用户编号', trigger: 'blur' }],
|
||||||
complaintContent: [{ required: true, message: '请输入投诉内容', trigger: 'blur' }],
|
userCategory: [{ required: true, message: '请选择用户类别', trigger: 'change' }],
|
||||||
complaintTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
complaintText: [{ required: true, message: '请输入投诉内容', trigger: 'blur' }],
|
||||||
problemSources: [{ required: true, message: '情选择问题来源', trigger: 'change' }],
|
status: [{ required: true, message: '请选择是否实现监测', trigger: 'change' }],
|
||||||
abnormalDevTime: [{ required: true, message: '请选择时间', trigger: 'change' }],
|
|
||||||
transientIndicators: [{ required: true, message: '请选择暂态指标', trigger: 'change' }],
|
transientIndicators: [{ required: true, message: '请选择暂态指标', trigger: 'change' }],
|
||||||
steadyState: [{ required: true, message: '请选择稳态指标', trigger: 'change' }],
|
steadyIndicator: [{ required: true, message: '请选择稳态指标', trigger: 'change' }],
|
||||||
eventDescription: [{ required: true, message: '请输入设备异常描述', trigger: 'blur' }],
|
monitorName: [{ required: true, message: '请输入监测点名称', trigger: 'blur' }],
|
||||||
abnormalDevName: [{ required: true, message: '请输入问题名称', trigger: 'blur' }]
|
monitorNumber: [{ required: true, message: '请输入监测点编号', trigger: 'blur' }],
|
||||||
}
|
}
|
||||||
|
const formRef = ref(null)
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
|
formRef.value.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
form.value = {
|
||||||
|
...form.value,
|
||||||
|
steadyIndicator: form.value.steadyIndicator.join(','),
|
||||||
|
transientIndicators: form.value.transientIndicators.join(',')
|
||||||
|
}
|
||||||
|
addComplaintsData(form.value).then(res => {
|
||||||
|
emits('onSubmit')
|
||||||
handleClose()
|
handleClose()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('表单验证失败')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = (row: any) => {
|
const open = (row: any) => {
|
||||||
@@ -98,7 +189,10 @@ const handleClose = () => {
|
|||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.el-upload-list__item) {
|
.el-form {
|
||||||
width: 400px;
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
height: 400px;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label="在线监测" name="1">
|
<el-tab-pane label="在线监测" name="1">
|
||||||
<online v-if="activeName=='1'"/>
|
<online v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="用户投诉" name="2">
|
<el-tab-pane label="用户投诉" name="2">
|
||||||
<complaints v-if="activeName=='2'"/>
|
<complaints v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="现场测试问题" name="3">
|
<el-tab-pane label="现场测试问题" name="3">
|
||||||
<testQuestions v-if="activeName=='3'"/>
|
<testQuestions v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tabs v-model="activeName" type="border-card">
|
<!-- <el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label="电能质量问题查询维护" name="1">
|
<el-tab-pane label="电能质量问题查询维护" name="1">
|
||||||
|
|||||||
Reference in New Issue
Block a user