修改 电网一张图bug 技术监督新增 重新发起页面绘制
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
title="监测点信息"
|
||||
:title="title"
|
||||
width="65%"
|
||||
:append-to-body="true"
|
||||
:before-close="close"
|
||||
@@ -348,12 +348,13 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import { ref, onMounted, reactive, defineExpose, nextTick, defineEmits, watch, onUnmounted } from 'vue'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { getTempLineDetailsById } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { getDeviceList } from '@/api/supervision-boot/terminal/index'
|
||||
import { addMointorPointFormData, getList } from '@/api/supervision-boot/monitorpoint/index'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
@@ -362,9 +363,10 @@ const emits = defineEmits(['onSubmit'])
|
||||
const dictData = useDictData()
|
||||
const dialogFormVisible = ref(false)
|
||||
const form: any = ref({})
|
||||
const ruleFormRef = ref(null)
|
||||
const title = ref('')
|
||||
const ruleFormRef:any = ref(null)
|
||||
// acceptType .doc,.docx,.xlsx,.xls,.pdf
|
||||
const acceptType=''
|
||||
const acceptType = ''
|
||||
//字典获取所属地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
//字典获取监测点电压等级
|
||||
@@ -423,7 +425,7 @@ const operationStatusList = [
|
||||
}
|
||||
]
|
||||
//定义接线方式下拉框数据
|
||||
const ptTypeList=[
|
||||
const ptTypeList = [
|
||||
{
|
||||
id: '0',
|
||||
name: '星型接法'
|
||||
@@ -435,7 +437,7 @@ const ptTypeList=[
|
||||
{
|
||||
id: '2',
|
||||
name: '开口三角型接法'
|
||||
},
|
||||
}
|
||||
]
|
||||
//定义线路号下拉框数据
|
||||
const numList = [
|
||||
@@ -478,7 +480,7 @@ const numList = [
|
||||
{
|
||||
id: '10',
|
||||
name: '10'
|
||||
},
|
||||
}
|
||||
]
|
||||
//获取登陆用户姓名和部门
|
||||
const adminInfo = useAdminInfo()
|
||||
@@ -547,8 +549,8 @@ const resetForm = () => {
|
||||
voltageDeviationLowerLimit: '0', //电压偏差下限
|
||||
voltageDeviationUpperLimit: '0', // 电压偏差上限
|
||||
voltageLevel: voltageLevelList[0].id, //监测点电压等级
|
||||
ptType:ptTypeList[0].id,//接线方式
|
||||
num:numList[0].id,//线路号
|
||||
ptType: ptTypeList[0].id, //接线方式
|
||||
num: numList[0].id //线路号
|
||||
}
|
||||
let obj = {}
|
||||
getList(obj).then(res => {
|
||||
@@ -567,7 +569,7 @@ const resetForm = () => {
|
||||
expectedProductionDate: obj.expectedProductionDate,
|
||||
userName: userNameList.value[0]?.projectName,
|
||||
userId: userNameList.value[0]?.id,
|
||||
objName:userNameList.value[0]?.projectName,
|
||||
objName: userNameList.value[0]?.projectName
|
||||
}
|
||||
})
|
||||
changevoltageDeviationLimit()
|
||||
@@ -604,13 +606,13 @@ findAllMonitoringTerminalList()
|
||||
//获取树形图数据
|
||||
const treeData: any = ref('')
|
||||
//干扰源类型 取树形图第一层children数据
|
||||
const loadTypeList = ref([])
|
||||
const loadTypeList: any = ref([])
|
||||
//干扰源类别 取树形图第二层children数据
|
||||
const businessTypeList = ref([])
|
||||
const businessTypeList: any = ref([])
|
||||
const getTreeList = () => {
|
||||
queryByAllCode().then(res => {
|
||||
treeData.value = [res.data.find(item => item.code == 'Major_Nonlinear_Device')]
|
||||
treeData.value[0].children.map(item => {
|
||||
treeData.value = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||
treeData.value[0].children.map((item: any) => {
|
||||
//干扰源类型数据
|
||||
loadTypeList.value.push({
|
||||
id: item?.id,
|
||||
@@ -632,7 +634,7 @@ const changeLoadType = async () => {
|
||||
}
|
||||
//选择关联干扰源回显数据
|
||||
const changeUserName = () => {
|
||||
let obj = projectList.value.find(item => {
|
||||
let obj: any = projectList.value.find((item: any) => {
|
||||
return form.value.userName == item.id
|
||||
})
|
||||
form.value = {
|
||||
@@ -646,8 +648,8 @@ const changeUserName = () => {
|
||||
userName: obj?.projectName,
|
||||
userId: obj?.id,
|
||||
expectedProductionDate: obj?.expectedProductionDate,
|
||||
objName:obj?.projectName,
|
||||
userStatus:obj?.userStatus+''
|
||||
objName: obj?.projectName,
|
||||
userStatus: obj?.userStatus + ''
|
||||
}
|
||||
}
|
||||
//定义校验规则
|
||||
@@ -873,10 +875,28 @@ watch(
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
const open = () => {
|
||||
const open = (row: any) => {
|
||||
dialogFormVisible.value = true
|
||||
//初始化数据
|
||||
resetForm()
|
||||
title.value = row.title
|
||||
nextTick(() => {
|
||||
if (row.row) {
|
||||
getTempLineDetailsById({ id: row.row.id }).then(res => {
|
||||
form.value = res.data
|
||||
form.value.loadType = loadTypeList.value.filter((item: any) => item.name == res.data.loadType)[0]?.id
|
||||
form.value.businessType = businessTypeList.value.filter(
|
||||
(item: any) => item.name == res.data.businessType
|
||||
)[0]?.id
|
||||
form.value.mainWiringDiagram = [
|
||||
{
|
||||
name: res.data.mainWiringDiagram.split('/')[2]
|
||||
}
|
||||
]
|
||||
mainWiringDiagram.value = res.data.mainWiringDiagram
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
@@ -903,7 +923,7 @@ const uploadFileName = val => {
|
||||
uploadName.value = val
|
||||
}
|
||||
//移除文件上传
|
||||
const removeFile = (file: any,uploadFiles:any) => {
|
||||
const removeFile = (file: any, uploadFiles: any) => {
|
||||
console.log(file, uploadFiles)
|
||||
}
|
||||
//监测点台账信息
|
||||
@@ -951,8 +971,8 @@ const confirmForm = () => {
|
||||
ptRatio: form.value.ptRatio / form.value.ptRatio2, //PT变比
|
||||
ctRatio: form.value.ctRatio / form.value.ctRatio2 //CT变比
|
||||
}
|
||||
addMointorPointFormData(confirmFormData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
if (title.value == '监测点信息') {
|
||||
addMointorPointFormData(confirmFormData).then(res => {
|
||||
ElMessage({
|
||||
message: '新增成功',
|
||||
type: 'success'
|
||||
@@ -960,8 +980,9 @@ const confirmForm = () => {
|
||||
ruleFormRef.value.resetFields()
|
||||
resetForm()
|
||||
close()
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
console.log('表单验证失败')
|
||||
return false
|
||||
|
||||
@@ -96,7 +96,36 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
handleAudit(row.processInstanceId)
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '重新发起',
|
||||
// type: 'warning',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.status == 1 || row.status == 2
|
||||
// },
|
||||
// click: row => {
|
||||
// addForms.value.open({
|
||||
// title: '重新发起',
|
||||
// row: row
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'cancel',
|
||||
// title: '取消',
|
||||
// type: 'danger',
|
||||
// icon: 'el-icon-Open',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.status == 3 || row.status == 2 || row.status == 4
|
||||
// },
|
||||
// click: row => {
|
||||
// // cancelLeave(row)
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -116,7 +145,9 @@ provide('tableStore', tableStore)
|
||||
const addForms = ref()
|
||||
const addFormModel = () => {
|
||||
setTimeout(() => {
|
||||
addForms.value.open()
|
||||
addForms.value.open({
|
||||
title: '监测点信息'
|
||||
})
|
||||
}, 0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user