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