终端入网检测-新增表单
This commit is contained in:
@@ -0,0 +1,755 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="dialogFormVisible"
|
||||||
|
title="台账模型"
|
||||||
|
width="55%"
|
||||||
|
height="400"
|
||||||
|
:append-to-body="true"
|
||||||
|
:before-close="close"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
draggable
|
||||||
|
>
|
||||||
|
<!-- 用户档案录入 新建1 -->
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
:validate-on-rule-change="false"
|
||||||
|
:scroll-to-error="true"
|
||||||
|
:rules="rules"
|
||||||
|
ref="ruleFormRef"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="填报人:" :label-width="formLabelWidth" prop="reporter">
|
||||||
|
<el-input
|
||||||
|
v-model="form.reporter"
|
||||||
|
autocomplete="off"
|
||||||
|
:disabled="true"
|
||||||
|
place-holder="请输入填报人"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="填报日期:" :label-width="formLabelWidth" prop="reportDate">
|
||||||
|
<el-date-picker
|
||||||
|
:disabled="true"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.reportDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择填报日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col></el-col>
|
||||||
|
<el-col></el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="填报部门:" :label-width="formLabelWidth" prop="orgId">
|
||||||
|
<el-input v-model="form.orgId" :disabled="true" autocomplete="off" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工程投产日期:" :label-width="formLabelWidth" prop="expectedProductionDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.expectedProductionDate"
|
||||||
|
type="date"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
:disabled-date="disabledDate"
|
||||||
|
placeholder="请选择工程投产日期"
|
||||||
|
:disabled="openType == 'detail'"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="所属地市:" :label-width="formLabelWidth" prop="city">
|
||||||
|
<el-select
|
||||||
|
v-model="form.city"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择所属地市"
|
||||||
|
:disabled="openType == 'detail'"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptionList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="用户状态:" :label-width="formLabelWidth" prop="userStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="form.userStatus"
|
||||||
|
placeholder="请选择用户状态"
|
||||||
|
:disabled="openType == 'detail'"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in userStateList"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
:disabled="item.label != '建设'"
|
||||||
|
:key="index"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工程名称:" :label-width="formLabelWidth" prop="projectName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.projectName"
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="请输入工程名称"
|
||||||
|
:disabled="openType == 'detail'"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="终端台账信息:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file1"
|
||||||
|
:show-message="false"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file1"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="监测点台账信息:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file2"
|
||||||
|
:show-message="false"
|
||||||
|
class="label_over_warp"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file2"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="验收检验报告单:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file3"
|
||||||
|
:show-message="false"
|
||||||
|
class="label_over_warp"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file3"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="验收检验报告:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file4"
|
||||||
|
:show-message="false"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file4"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="型式实验报告:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file5"
|
||||||
|
:show-message="false"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file5"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="出厂检验报告:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file6"
|
||||||
|
:show-message="false"
|
||||||
|
class="label_over_warp"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file6"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="性能检测报告:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file7"
|
||||||
|
:show-message="false"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file7"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="信息安全检测报告:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
prop="file8"
|
||||||
|
:show-message="false"
|
||||||
|
class="label_over_warp"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file8"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item
|
||||||
|
label="其他附件:"
|
||||||
|
:label-width="formLabelWidth"
|
||||||
|
class="no_required"
|
||||||
|
prop="file9"
|
||||||
|
:show-message="false"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="form.file9"
|
||||||
|
ref="uploadRef"
|
||||||
|
action=""
|
||||||
|
accept=".xls,.xlsx"
|
||||||
|
:limit="1"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-progress="uploadFileName('file1')"
|
||||||
|
>
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="primary" :disabled="openType == 'detail'">上传文件</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="close()">取消</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, 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'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||||
|
import moment from 'moment'
|
||||||
|
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
|
import { submitFormData } from '@/api/supervise/interfere/index'
|
||||||
|
defineProps({
|
||||||
|
openType: {
|
||||||
|
type: String,
|
||||||
|
default: 'create'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const emits = defineEmits(['onSubmit'])
|
||||||
|
const dictData = useDictData()
|
||||||
|
const dialogFormVisible = ref(false)
|
||||||
|
const formLabelWidth = '120px'
|
||||||
|
const form: any = ref({})
|
||||||
|
const ruleFormRef = ref(null)
|
||||||
|
//字典获取所属地市
|
||||||
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
|
|
||||||
|
//用户状态数组
|
||||||
|
const userStateList = reactive([
|
||||||
|
{
|
||||||
|
label: '可研',
|
||||||
|
value: '0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '建设',
|
||||||
|
value: '1'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '运行',
|
||||||
|
value: '2'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '退运',
|
||||||
|
value: '3'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
//获取登陆用户姓名和部门
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
|
const resetForm = () => {
|
||||||
|
form.value = {
|
||||||
|
reporter: '', //填报人 2
|
||||||
|
reportDate: new Date(), //填报日期 2
|
||||||
|
orgId: '', //填报部门 2
|
||||||
|
expectedProductionDate: '', //工程投产日期 2
|
||||||
|
city: areaOptionList[0].name, //所属地市 2
|
||||||
|
userStatus: userStateList[1].value, //用户状态 2
|
||||||
|
projectName: '', //工程名称 2
|
||||||
|
|
||||||
|
file1: [], //上传文件1
|
||||||
|
file2: [], //上传文件2
|
||||||
|
file3: [], //上传文件3
|
||||||
|
file4: [], //上传文件4
|
||||||
|
file5: [], //上传文件5
|
||||||
|
file6: [], //上传文件6
|
||||||
|
file7: [], //上传文件7
|
||||||
|
file8: [], //上传文件8
|
||||||
|
file9: [] //上传文件9
|
||||||
|
}
|
||||||
|
|
||||||
|
form.value.reporter = adminInfo.$state.name
|
||||||
|
form.value.orgId = adminInfo.$state.deptName
|
||||||
|
}
|
||||||
|
//初始化数据
|
||||||
|
resetForm()
|
||||||
|
const subForm = ref({
|
||||||
|
reporter: '', //填报人 2
|
||||||
|
reportDate: new Date(), //填报日期 2
|
||||||
|
orgId: '', //填报部门 2
|
||||||
|
expectedProductionDate: '', //工程投产日期 2
|
||||||
|
city: areaOptionList[0].name, //所属地市 2
|
||||||
|
userStatus: userStateList[1].value, //用户状态 2
|
||||||
|
projectName: '', //工程名称 2
|
||||||
|
|
||||||
|
file1: [], //上传文件1
|
||||||
|
file2: [], //上传文件2
|
||||||
|
file3: [], //上传文件3
|
||||||
|
file4: [], //上传文件4
|
||||||
|
file5: [], //上传文件5
|
||||||
|
file6: [], //上传文件6
|
||||||
|
file7: [], //上传文件7
|
||||||
|
file8: [], //上传文件8
|
||||||
|
file9: [] //上传文件9
|
||||||
|
})
|
||||||
|
|
||||||
|
//定义校验规则
|
||||||
|
const rules = ref({
|
||||||
|
reporter: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入填报人',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
reportDate: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择填报日期',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
orgId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择填报部门',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
expectedProductionDate: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择工程投产日期',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
city: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择所属地市',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
userStatus: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择用户状态',
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
projectName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入工程名称',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
file1: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file2: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file3: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file4: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file5: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file6: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file7: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file8: [
|
||||||
|
{
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
file9: [
|
||||||
|
{
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
watch(
|
||||||
|
() => form.value,
|
||||||
|
(val, oldVal) => {},
|
||||||
|
{
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
const open = () => {
|
||||||
|
dialogFormVisible.value = true
|
||||||
|
}
|
||||||
|
const close = () => {
|
||||||
|
//重置表单内容
|
||||||
|
//取消表单校验状态
|
||||||
|
ruleFormRef.value && ruleFormRef.value.resetFields()
|
||||||
|
dialogFormVisible.value = false
|
||||||
|
emits('onSubmit')
|
||||||
|
resetForm()
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
console.log()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 上传报告
|
||||||
|
const uploadRef = ref()
|
||||||
|
const handleExceed: UploadProps['onExceed'] = files => {
|
||||||
|
uploadRef.value!.clearFiles()
|
||||||
|
const file = files[0] as UploadRawFile
|
||||||
|
file.uid = genFileId()
|
||||||
|
uploadRef.value!.handleStart(file)
|
||||||
|
}
|
||||||
|
let uploadName = ref('')
|
||||||
|
//上传报告改变
|
||||||
|
const uploadFileName = val => {
|
||||||
|
uploadName.value = val
|
||||||
|
}
|
||||||
|
// 终端台账信息
|
||||||
|
const file1 = ref('')
|
||||||
|
//监测点台账信息
|
||||||
|
const file2 = ref('')
|
||||||
|
//验收检验报告单
|
||||||
|
const file3 = ref('')
|
||||||
|
//验收检验报告
|
||||||
|
const file4 = ref('')
|
||||||
|
//型式实验报告
|
||||||
|
const file5 = ref('')
|
||||||
|
//出厂检验报告
|
||||||
|
const file6 = ref('')
|
||||||
|
//性能检测报告
|
||||||
|
const file7 = ref('')
|
||||||
|
//信息安全检测报告
|
||||||
|
const file8 = ref('')
|
||||||
|
//其他附件
|
||||||
|
const file9 = ref('')
|
||||||
|
const choose = (e: any) => {
|
||||||
|
uploadFile(e.raw, '/supervision/').then(res => {
|
||||||
|
//终端台账信息
|
||||||
|
if (uploadName.value == 'file1') {
|
||||||
|
file1.value = res.data.name
|
||||||
|
}
|
||||||
|
//监测点台账信息
|
||||||
|
else if (uploadName.value == 'file2') {
|
||||||
|
file2.value = res.data.name
|
||||||
|
}
|
||||||
|
//验收检验报告单
|
||||||
|
else if (uploadName.value == 'file3') {
|
||||||
|
file3.value = res.data.name
|
||||||
|
}
|
||||||
|
//验收检验报告
|
||||||
|
else if (uploadName.value == 'file4') {
|
||||||
|
file4.value = res.data.name
|
||||||
|
}
|
||||||
|
//型式实验报告
|
||||||
|
else if (uploadName.value == 'file5') {
|
||||||
|
file5.value = res.data.name
|
||||||
|
}
|
||||||
|
//出厂检验报告
|
||||||
|
else if (uploadName.value == 'file6') {
|
||||||
|
file6.value = res.data.name
|
||||||
|
}
|
||||||
|
//性能检测报告
|
||||||
|
else if (uploadName.value == 'file7') {
|
||||||
|
file7.value = res.data.name
|
||||||
|
}
|
||||||
|
//信息安全检测报告
|
||||||
|
else if (uploadName.value == 'file8') {
|
||||||
|
file8.value = res.data.name
|
||||||
|
}
|
||||||
|
//信息安全检测报告
|
||||||
|
else if (uploadName.value == 'file9') {
|
||||||
|
file9.value = res.data.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//设置工程投产日期时间选择范围不能<今天
|
||||||
|
const disabledDate = time => {
|
||||||
|
return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||||
|
}
|
||||||
|
//提交
|
||||||
|
const confirmForm = () => {
|
||||||
|
ruleFormRef.value.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
//整理上传文件的数据
|
||||||
|
// userType==0,1
|
||||||
|
subForm.value.reporter = adminInfo.$state.id
|
||||||
|
subForm.value.orgId = adminInfo.$state.deptId
|
||||||
|
let confirmFormData = JSON.parse(JSON.stringify(subForm.value))
|
||||||
|
|
||||||
|
//其他附件非必填
|
||||||
|
submitFormData(confirmFormData).then(res => {
|
||||||
|
ruleFormRef.value.resetFields()
|
||||||
|
resetForm()
|
||||||
|
close()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('表单验证失败')
|
||||||
|
//1.判断是否上传
|
||||||
|
|
||||||
|
if (!file1.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传终端台账信息',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file2.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传监测点台账信息',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file3.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传验收检验报告单',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file4.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传验收检验报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file5.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传型式实验报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file6.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传出厂检验报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file7.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传性能检测报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!file8.value) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请上传信息安全检测报告',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-form {
|
||||||
|
width: 96%;
|
||||||
|
height: 400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
.dialog-footer {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
/* 调整标签的换行行为 */
|
||||||
|
.label_over_warp::v-deep .el-form-item__label {
|
||||||
|
white-space: pre-line !important;
|
||||||
|
line-height: 16px !important;
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
padding: 0 20px;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
justify-content: flex-start !important;
|
||||||
|
}
|
||||||
|
.form-label-left-align {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
::v-deep .el-input-number .el-input__inner {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.no_required::v-deep .el-form-item__label {
|
||||||
|
padding-left: 10px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
<!---终端入网检测-->
|
||||||
|
<template>
|
||||||
|
<TableHeader ref="TableHeaderRef">
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="工程名称">
|
||||||
|
<el-input v-model="tableStore.table.params.searchValue" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属地市">
|
||||||
|
<el-select v-model="tableStore.table.params.loadType" clearable placeholder="请选择所属地市">
|
||||||
|
<el-option
|
||||||
|
v-for="item in areaOptionList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button icon="el-icon-Plus" type="primary" @click="addFormModel">新增</el-button>
|
||||||
|
<!-- <el-button icon="el-icon-Download" @click="exportEvent" type="primary">导出</el-button> -->
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
|
<!-- 新增弹框 -->
|
||||||
|
<addForm ref="addForms" @onSubmit="tableStore.index()"></addForm>
|
||||||
|
</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 { useRouter } from 'vue-router'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { getLoadTypeUserList } from '@/api/process-boot/interference'
|
||||||
|
import addForm from './addForm.vue'
|
||||||
|
const dictData = useDictData()
|
||||||
|
const { push } = useRouter()
|
||||||
|
|
||||||
|
const TableHeaderRef = ref()
|
||||||
|
const tableRef = ref()
|
||||||
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
|
const ruleFormRef = ref()
|
||||||
|
const show: any = ref(false)
|
||||||
|
const fileList = ref([])
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/supervision-boot/userReport/getUserReport',
|
||||||
|
publicHeight: 65,
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{ title: '序号', type: 'seq', width: 80 },
|
||||||
|
{ field: 'projectName', title: '工程名称', minWidth: 170 },
|
||||||
|
{
|
||||||
|
field: 'userType',
|
||||||
|
title: '用户性质',
|
||||||
|
minWidth: 150,
|
||||||
|
formatter: (obj: any) => {
|
||||||
|
const userType = obj.row.userType
|
||||||
|
return getUserTypeName(userType)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'city', title: '所属地市', minWidth: 80 },
|
||||||
|
{ field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||||
|
{
|
||||||
|
field: 'userStatus',
|
||||||
|
title: '用户状态',
|
||||||
|
minWidth: 100,
|
||||||
|
render: 'tag',
|
||||||
|
custom: {
|
||||||
|
0: 'primary',
|
||||||
|
1: 'primary',
|
||||||
|
2: 'success',
|
||||||
|
3: 'warning'
|
||||||
|
},
|
||||||
|
replaceValue: {
|
||||||
|
0: '可研',
|
||||||
|
1: '建设',
|
||||||
|
2: '运行',
|
||||||
|
3: '退运'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'substation', title: '变电站', minWidth: 100 },
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '审核状态',
|
||||||
|
minWidth: 100,
|
||||||
|
render: 'tag',
|
||||||
|
custom: {
|
||||||
|
1: 'primary',
|
||||||
|
2: 'success',
|
||||||
|
3: 'danger',
|
||||||
|
4: 'warning'
|
||||||
|
},
|
||||||
|
replaceValue: {
|
||||||
|
1: '审批中',
|
||||||
|
2: '审批通过',
|
||||||
|
3: '审批不通过',
|
||||||
|
4: '已取消'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'createTime', title: '开始时间', minWidth: 170 },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
minWidth: 150,
|
||||||
|
fixed: 'right',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'productSetting',
|
||||||
|
title: '流程详情',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
handleAudit(row.processInstanceId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
|
tableStore.table.params.relationUserName = tableStore.table.params.userName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.loadType = ''
|
||||||
|
tableStore.table.params.userName = ''
|
||||||
|
tableStore.table.params.fileUploadflag = ''
|
||||||
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
const addForms = ref()
|
||||||
|
const addFormModel = () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
addForms.value.open()
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const exportEvent = () => {
|
||||||
|
let form = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
|
form.pageNum = 1
|
||||||
|
form.pageSize = tableStore.table.total
|
||||||
|
getLoadTypeUserList(form).then(res => {
|
||||||
|
tableRef.value.getRef().exportData({
|
||||||
|
filename: '未建档非线性用户', // 文件名字
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
|
useStyle: true,
|
||||||
|
data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
|
columnFilterMethod: function (column: any) {
|
||||||
|
return !(column.$columnIndex === 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
/** 处理审批按钮 */
|
||||||
|
const handleAudit = (instanceId: any) => {
|
||||||
|
push({
|
||||||
|
name: 'BpmProcessInstanceDetail',
|
||||||
|
query: {
|
||||||
|
id: instanceId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**获取用户性质*/
|
||||||
|
const getUserTypeName = (userType: any) => {
|
||||||
|
if (userType === 0) {
|
||||||
|
return '新建电网工程'
|
||||||
|
}
|
||||||
|
if (userType === 1) {
|
||||||
|
return '扩建电网工程'
|
||||||
|
}
|
||||||
|
if (userType === 2) {
|
||||||
|
return '新建非线性负荷用户'
|
||||||
|
}
|
||||||
|
if (userType === 3) {
|
||||||
|
return '扩建非线性负荷用户'
|
||||||
|
}
|
||||||
|
if (userType === 4) {
|
||||||
|
return '新建新能源发电站'
|
||||||
|
}
|
||||||
|
if (userType === 5) {
|
||||||
|
return '扩建新能源发电站'
|
||||||
|
}
|
||||||
|
if (userType === 6) {
|
||||||
|
return '敏感及重要用户'
|
||||||
|
}
|
||||||
|
return '新建电网工程'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
:deep(.el-upload-list__item) {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-input__wrapper {
|
||||||
|
width: 200px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,9 +4,12 @@
|
|||||||
<el-tab-pane label="干扰源用户建档管理" name="1">
|
<el-tab-pane label="干扰源用户建档管理" name="1">
|
||||||
<undocumented v-if="activeName == '1'" />
|
<undocumented v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="入网评估报告审核" name="2"><network v-if="activeName == '2'" /></el-tab-pane>-->
|
<!-- <el-tab-pane label="入网评估报告审核" name="2"><network v-if="activeName == '2'" /></el-tab-pane>-->
|
||||||
<el-tab-pane label="常态化干扰源用户管理" name="3"><normal v-if="activeName == '3'" /></el-tab-pane>
|
<el-tab-pane label="常态化干扰源用户管理" name="3"><normal v-if="activeName == '3'" /></el-tab-pane>
|
||||||
<!-- <el-tab-pane label="实测报告审核" name="4"><report v-if="activeName == '4'" /></el-tab-pane>-->
|
<!-- <el-tab-pane label="实测报告审核" name="4"><report v-if="activeName == '4'" /></el-tab-pane>-->
|
||||||
|
<el-tab-pane label="终端入网检测" name="5">
|
||||||
|
<terminalNetworkDetection v-if="activeName == '5'"></terminalNetworkDetection>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -18,6 +21,7 @@ import network from './components/network/index.vue'
|
|||||||
import normal from './components/normal.vue'
|
import normal from './components/normal.vue'
|
||||||
import report from './components/report.vue'
|
import report from './components/report.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import terminalNetworkDetection from './components/terminalNetworkDetection/index.vue'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Processsupervision/interferencemanagement'
|
name: 'Processsupervision/interferencemanagement'
|
||||||
})
|
})
|
||||||
@@ -26,8 +30,6 @@ const Statistics = ref()
|
|||||||
const compatibility = ref()
|
const compatibility = ref()
|
||||||
|
|
||||||
const layout = mainHeight(63) as any
|
const layout = mainHeight(63) as any
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user