提交新增表单
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
:close-on-click-modal="true"
|
||||
title="用户档案录入"
|
||||
width="55%"
|
||||
height="400"
|
||||
:append-to-body="true"
|
||||
:validate-on-rule-change="false"
|
||||
:scroll-to-error="true"
|
||||
@closed="close"
|
||||
:before-close="close"
|
||||
>
|
||||
<!-- 用户档案录入 新建1 -->
|
||||
<el-form :model="form" :rules="rules" ref="ruleFormRef">
|
||||
<el-form :model="form" :validate-on-rule-change="false" :rules="rules" ref="ruleFormRef">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="填报人:" :label-width="formLabelWidth" prop="reporter">
|
||||
@@ -162,20 +162,6 @@
|
||||
class="label_over_warp"
|
||||
prop="nonlinearDeviceType"
|
||||
>
|
||||
<!-- <el-tree
|
||||
accordion
|
||||
ref="treeRef"
|
||||
:default-expand-all="false"
|
||||
show-checkbox
|
||||
check-strictly
|
||||
:highlight-current="true"
|
||||
readonly
|
||||
node-key="id"
|
||||
:props="defaultProps"
|
||||
:data="nonlinearDeviceTypeList"
|
||||
:expand-on-click-node="false"
|
||||
@check-change="handleCheckChange"
|
||||
></el-tree> -->
|
||||
<el-tree-select
|
||||
accordion
|
||||
ref="treeRef"
|
||||
@@ -224,7 +210,7 @@
|
||||
<el-option
|
||||
v-for="(item, index) in evaluationDeptList"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
:value="item.name"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
@@ -590,7 +576,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12" class="required_position" v-show="form.userType != '0' && form.userType != '1'">
|
||||
<el-col :span="12" class="required_position" v-if="form.userType != '0' && form.userType != '1'">
|
||||
<span class="required_icon">*</span>
|
||||
<el-form-item
|
||||
label="用户接入变电站主接线示意图:"
|
||||
@@ -615,7 +601,7 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="required_position" v-show="form.userType == '6'">
|
||||
<el-col :span="12" class="required_position" v-if="form.userType == '6'">
|
||||
<span class="required_icon">*</span>
|
||||
<el-form-item
|
||||
label="主要敏感设备清单:"
|
||||
@@ -641,7 +627,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="form.userType == '6'" class="required_position">
|
||||
<el-row v-if="form.userType == '6'" class="required_position">
|
||||
<span class="required_icon">*</span>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
@@ -697,13 +683,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close()">取消</el-button>
|
||||
<el-button type="primary" v-if="openType != 'detail'" @click="confirmForm()">确定</el-button>
|
||||
<el-button type="primary" @click="confirmForm()">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch } from 'vue'
|
||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch,onUnmounted } from 'vue'
|
||||
// import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
@@ -812,7 +798,7 @@ const resetForm = () => {
|
||||
projectName: '', //工程名称 1
|
||||
substation: '', //变电站 1
|
||||
voltageLevel: voltageLevelList[0].id, //电压等级 1
|
||||
evaluationDept: evaluationDeptList[0].id, //预测评估单位 1
|
||||
evaluationDept: evaluationDeptList[0].name, //预测评估单位 1
|
||||
evaluationConclusion: '', //预测评估结论 1
|
||||
backgroundTestPerformed: 0, //是否开展背景测试 1
|
||||
feasibilityReport: '', // 可研报告告地址 1
|
||||
@@ -1389,15 +1375,16 @@ const open = () => {
|
||||
}
|
||||
const close = () => {
|
||||
//重置表单内容
|
||||
resetForm()
|
||||
//取消表单校验状态
|
||||
ruleFormRef.value.resetFields()
|
||||
dialogFormVisible.value = false
|
||||
emits('onSubmit')
|
||||
resetForm()
|
||||
}
|
||||
onMounted(() => {
|
||||
console.log()
|
||||
})
|
||||
|
||||
const changeUserType = value => {
|
||||
console.log(form.value.userType, '切换用户性质++++++++++++', value)
|
||||
return
|
||||
|
||||
@@ -415,27 +415,28 @@ const getProviteData = () => {
|
||||
}
|
||||
//根据文件名请求
|
||||
const getFileNamePath = async (val: any, pathName: any) => {
|
||||
const data = await getFileNameAndFilePath({ filePath: val })
|
||||
if (data.data && data.data.name && data.data.url) {
|
||||
getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
console.log(111111111)
|
||||
if (res.data && res.data.name && res.data.url) {
|
||||
//可研报告
|
||||
if (pathName == 'feasibilityReport' && proviteData.value.feasibilityReport) {
|
||||
proviteData.value.feasibilityReport = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//项目初步设计说明书
|
||||
else if (pathName == 'preliminaryDesignDescription' && proviteData.value.preliminaryDesignDescription) {
|
||||
proviteData.value.preliminaryDesignDescription = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估报告
|
||||
else if (pathName == 'predictionEvaluationReport' && proviteData.value.predictionEvaluationReport) {
|
||||
proviteData.value.predictionEvaluationReport = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
@@ -444,46 +445,47 @@ const getFileNamePath = async (val: any, pathName: any) => {
|
||||
proviteData.value.predictionEvaluationReviewOpinions
|
||||
) {
|
||||
proviteData.value.predictionEvaluationReviewOpinions = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//用户接入变电站主接线示意图
|
||||
else if (pathName == 'substationMainWiringDiagram' && proviteData.value.substationMainWiringDiagram) {
|
||||
proviteData.value.substationMainWiringDiagram = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//主要敏感设备清单
|
||||
else if (pathName == 'sensitiveDevices' && proviteData.value.sensitiveDevices) {
|
||||
proviteData.value.sensitiveDevices = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//抗扰度测试报告
|
||||
else if (pathName == 'antiInterferenceReport' && proviteData.value.antiInterferenceReport) {
|
||||
proviteData.value.antiInterferenceReport = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//背景电能质量测试报告
|
||||
else if (pathName == 'powerQualityReport' && proviteData.value.powerQualityReport) {
|
||||
proviteData.value.powerQualityReport = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
//其他附件
|
||||
else if (pathName == 'additionalAttachments' && proviteData.value.additionalAttachments) {
|
||||
proviteData.value.additionalAttachments = {
|
||||
name: data.data.fileName,
|
||||
url: data.data.url
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
|
||||
@@ -143,11 +143,8 @@ const addList = () => {
|
||||
|
||||
//三个表单
|
||||
const addForms = ref()
|
||||
const formVisibile = ref(false)
|
||||
const addFormModel = () => {
|
||||
console.log(addForms.value, '00000')
|
||||
addForms.value.open()
|
||||
formVisibile.value = true
|
||||
}
|
||||
|
||||
// 导出
|
||||
|
||||
Reference in New Issue
Block a user