联调 干扰源用户 谐波普测页面
This commit is contained in:
180
src/views/pqs/supervise/interfere/components/network/audit.vue
Normal file
180
src/views/pqs/supervise/interfere/components/network/audit.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<!-- 上传 -->
|
||||
<el-dialog :title="title" v-model="uploadConclusions" width="800px" :before-close="cancel">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="formRef"
|
||||
:model="addForm"
|
||||
label-width="120px"
|
||||
:rules="rules"
|
||||
:disabled="title == '未建档干扰源用户详情'"
|
||||
>
|
||||
<el-form-item label="所属单位:">
|
||||
<Area v-model="addForm.orgNo" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称:" prop="userName">
|
||||
<el-input v-model="addForm.userName" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select v-model="addForm.loadType" clearable collapse-tags placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="建档时间:">
|
||||
<el-input v-model="addForm.recordTime" clearable placeholder="请输入关键字" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">报告在线查看</el-divider>
|
||||
<el-form-item class="item" label="报告:">
|
||||
<el-button type="primary" link @click="download">
|
||||
{{ addForm.ifilePathName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-weight: bolder; font-size: 18px">
|
||||
入网评估结论填报
|
||||
</el-divider>
|
||||
<el-form-item label="是否超标:" style="margin-top: 10px" prop="iIsOverLimit">
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="1" disabled>是</el-radio>
|
||||
<el-radio v-model="addForm.iIsOverLimit" :label="0" disabled>否</el-radio>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="超标指标:" style="margin-top: 10px" prop="IOverLimitTarget">
|
||||
<el-checkbox-group v-model="addForm.IOverLimitTarget" disabled>
|
||||
<el-checkbox v-for="(item, ind) in exceeded" :label="item.id">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="计划采取措施:" style="margin-top: 10px" prop="IPlanStep">
|
||||
<el-select v-model="addForm.IPlanStep" placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in takeMeasures"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br />
|
||||
<el-form-item label="入网详情:" style="margin-top: 10px" prop="IDescription">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="addForm.IDescription"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入入网详情"
|
||||
type="textarea"
|
||||
style="width: 500px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-divider content-position="left" style="font-size: 18px; font-weight: bolder">审核意见</el-divider>
|
||||
<el-form-item prop="checkComment">
|
||||
<el-input
|
||||
type="textarea"
|
||||
style="width: 400px"
|
||||
placeholder="请输入审核意见"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
v-model="addForm.checkComment"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; justify-content: center; margin-top: 30px" v-if="title != '未建档干扰源用户详情'">
|
||||
<el-button type="primary" class="ml20" @click="submit(1)">通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="submit(0)">不通过</el-button>
|
||||
<el-button type="primary" class="ml20" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
import { UploadInstance, UploadProps, UploadRawFile, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { genFileId } from 'element-plus'
|
||||
import { checkLoadTypeUserI, getLoadTypeUserById } from '@/api/process-boot/interference'
|
||||
const dictData = useDictData()
|
||||
|
||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||
const takeMeasures = dictData.getBasicData('Plan_Take')
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const emit = defineEmits(['onSubmit'])
|
||||
const uploadConclusions = ref(false)
|
||||
|
||||
const addForm: any = ref({})
|
||||
|
||||
const title = ref('')
|
||||
const rules = {
|
||||
checkComment: [{ required: true, message: '请输入入网详情', trigger: 'blur' }]
|
||||
}
|
||||
const formRef = ref()
|
||||
|
||||
const submit = (flag: any) => {
|
||||
formRef.value?.validate((valid: any) => {
|
||||
if (valid) {
|
||||
checkLoadTypeUserI({
|
||||
checkComment: addForm.value.checkComment,
|
||||
checkPerson: dictData.state.area[0].id,
|
||||
checkResult: flag,
|
||||
id: addForm.value.id
|
||||
}).then((res: any) => {
|
||||
ElMessage.success('操作成功')
|
||||
cancel()
|
||||
emit('onSubmit')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 下载
|
||||
const download = async () => {
|
||||
// window.open(addForm.value.ifile)
|
||||
let response = await fetch(addForm.value.ifile)
|
||||
let blob = await response.blob()
|
||||
let a = document.createElement('a')
|
||||
a.href = window.URL.createObjectURL(blob)
|
||||
a.download = addForm.value.ifilePathName
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const cancel = () => {
|
||||
addForm.value.checkComment = ''
|
||||
uploadConclusions.value = false
|
||||
}
|
||||
|
||||
const open = (text: string, row: any) => {
|
||||
title.value = text
|
||||
addForm.value = {}
|
||||
getLoadTypeUserById({ id: row.id }).then((res: any) => {
|
||||
addForm.value = {
|
||||
id: res.data.id,
|
||||
orgNo: res.data.orgNo,
|
||||
loadType: res.data.loadType,
|
||||
userName: res.data.userName,
|
||||
recordTime: res.data.recordTime,
|
||||
iIsOverLimit: res.data.iisOverLimit ? res.data.iisOverLimit : 0,
|
||||
IDescription: res.data.idescription ? res.data.idescription : '',
|
||||
IPlanStep: res.data.iplanStep ? res.data.iplanStep : '',
|
||||
IOverLimitTarget: res.data.ioverLimitTarget ? res.data.ioverLimitTarget.split(',') : [],
|
||||
ifilePathName: res.data.ifilePathName ? res.data.ifilePathName : '',
|
||||
ifile: res.data.ifile
|
||||
}
|
||||
})
|
||||
|
||||
uploadConclusions.value = true
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-upload-list__item) {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,96 @@
|
||||
<template>
|
||||
<TableHeader area ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="干扰源类型">
|
||||
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择干扰源类型">
|
||||
<el-option
|
||||
v-for="item in interferenceType"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源用户名称">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.userName"
|
||||
clearable
|
||||
placeholder="请选择干扰源用户名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Stamp" type="primary">审核</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 审核 -->
|
||||
<Audit ref="AuditRef" @onSubmit="tableStore.index()" />
|
||||
</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'
|
||||
import Audit from './audit.vue'
|
||||
|
||||
const dictData = useDictData()
|
||||
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const AuditRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/loadTypeUserManage/getLoadTypeUserList',
|
||||
publicHeight: 65,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ field: 'orgName', title: '所属单位' },
|
||||
{
|
||||
field: 'loadType',
|
||||
title: '干扰源类型',
|
||||
formatter: row => {
|
||||
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||
}
|
||||
},
|
||||
{ field: 'userName', title: '干扰源用户名称' },
|
||||
{ field: 'recordTime', title: '建档时间' },
|
||||
{ field: 'iuploadTime', title: '报告提交评估时间' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '审核',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
AuditRef.value.open('入网评估报告审核', row)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
beforeSearchFun: () => {
|
||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||
tableStore.table.params.checkType = 1
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.loadType = ''
|
||||
tableStore.table.params.userName = ''
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user