联调 辽宁台账维护 页面 修改 冀北 bug
This commit is contained in:
@@ -158,6 +158,27 @@
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联终端" prop="devId" v-if="props.openType != 'create'">
|
||||
<el-select v-model="form.devId" placeholder="请选择关联终端" @change="changeDevId">
|
||||
<el-option
|
||||
v-for="(item, index) in devIdList"
|
||||
:label="item.devName"
|
||||
:value="item.devId"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联监测点" prop="lineId" v-if="props.openType != 'create'">
|
||||
<el-select v-model="form.lineId" placeholder="请选择关联监测点">
|
||||
<el-option
|
||||
v-for="(item, index) in lineIdList"
|
||||
:label="item.lineName"
|
||||
:value="item.lineId"
|
||||
:key="index"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
for="-"
|
||||
v-if="form.userType != '0' && form.userType != '1'"
|
||||
@@ -361,7 +382,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -379,7 +399,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -397,7 +416,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -420,7 +438,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -438,7 +455,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -462,7 +478,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -486,7 +501,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -510,7 +524,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -534,7 +547,6 @@
|
||||
action=""
|
||||
:accept="acceptType"
|
||||
:limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-change="choose"
|
||||
:auto-upload="false"
|
||||
:on-remove="removeFile"
|
||||
@@ -545,6 +557,7 @@
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<addUpload ref="addUploadRef" v-if="props.openType == 'create'" />
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@@ -565,8 +578,16 @@ import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { queryByAllCode } from '@/api/system-boot/dictTree'
|
||||
import { uploadFile } from '@/api/system-boot/file'
|
||||
import { submitFormData, getById, updateFormData, addEditor, resend } from '@/api/supervision-boot/interfere/index'
|
||||
import {
|
||||
submitFormData,
|
||||
getById,
|
||||
updateFormData,
|
||||
addEditor,
|
||||
resend,
|
||||
getByDeptDevLine
|
||||
} from '@/api/supervision-boot/interfere/index'
|
||||
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||
import addUpload from './addUpload.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const isInterferencemanagement: any = ref(false)
|
||||
@@ -596,6 +617,7 @@ const dialogFormVisible = ref(false)
|
||||
// .doc,.docx,.xlsx,.xls,.pdf
|
||||
const acceptType = ''
|
||||
const form: any = ref({})
|
||||
const addUploadRef: any = ref()
|
||||
const control: any = ref(true)
|
||||
const ruleFormRef: any = ref(null)
|
||||
//字典获取所在地市
|
||||
@@ -606,7 +628,8 @@ const areaOptionList = dictData
|
||||
//字典获取敏感电能质量指标
|
||||
// const energyQualityIndexList = dictData.getBasicData('Indicator_Type')
|
||||
const energyQualityIndexList = dictData.getBasicData('Problem_Indicators')
|
||||
|
||||
const devIdList: any = ref([])
|
||||
const lineIdList: any = ref([])
|
||||
//字典获取行业类型
|
||||
const industryList = dictData.getBasicData('industry_type_jb')
|
||||
//字典电压等级
|
||||
@@ -700,6 +723,8 @@ const resetForm = () => {
|
||||
evaluationDept: evaluationDeptList[0].name, //预测评估单位 1
|
||||
evaluationConclusion: '', //预测评估结论 1
|
||||
backgroundTestPerformed: 0, //是否开展背景测试 1
|
||||
devId: '', //关联终端 1
|
||||
lineId: '', //关联监测点 1
|
||||
feasibilityReport: [], // 可研报告告地址 1
|
||||
preliminaryDesignDescription: [], //项目初步设计说明书告地址 1
|
||||
predictionEvaluationReport: [], //预测评估报告地址 1
|
||||
@@ -789,6 +814,8 @@ const subForm: any = ref({
|
||||
expectedProductionDate: '', //工程预期投产日期
|
||||
orgId: '', //填报部门
|
||||
projectName: '',
|
||||
devId: 0, //关联终端 1
|
||||
lineId: 0, //关联监测点 1
|
||||
reporter: '', //填报人
|
||||
reportDate: new Date(), //填报日期
|
||||
responsibleDepartment: '', //归口管理部门
|
||||
@@ -872,6 +899,8 @@ const rules = ref({
|
||||
voltageLevel: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
|
||||
evaluationDept: [{ required: true, message: '请选择预测评估单位', trigger: 'change' }],
|
||||
evaluationConclusion: [{ required: true, message: '请输入预测评估结论', trigger: 'blur' }],
|
||||
devId: [{ required: true, message: '请选择关联终端', trigger: 'change' }],
|
||||
lineId: [{ required: true, message: '请选择关联监测点', trigger: 'change' }],
|
||||
agreementCapacity: [{ required: true, message: '请选择用户协议容量', trigger: 'blur' }],
|
||||
nonlinearDeviceType: [{ required: true, message: '请选择非线性终端类型', trigger: 'change' }],
|
||||
needGovernance: [{ required: true, message: '请选择是否需要治理', trigger: 'change' }],
|
||||
@@ -1025,10 +1054,11 @@ const status = ref('')
|
||||
const open = async (row: any) => {
|
||||
title.value = row.title
|
||||
dialogFormVisible.value = true
|
||||
let deptIds = adminInfo.$state.deptId
|
||||
if (row.row) {
|
||||
resendId.value = row.row.id
|
||||
status.value = row.row.status
|
||||
|
||||
deptIds = row.row.orgId
|
||||
if (props.update) {
|
||||
await getUserReportUpdateById(row.row.id).then(res => {
|
||||
handleResponse(res.data.userReportMessageJson)
|
||||
@@ -1042,6 +1072,12 @@ const open = async (row: any) => {
|
||||
resendId.value = ''
|
||||
form.value.userType = userTypeList.value[0].value
|
||||
}
|
||||
setTimeout(() => {
|
||||
getByDeptDevLine({ id: deptIds }).then(res => {
|
||||
devIdList.value = res.data
|
||||
changeDevId(form.value.devId, false)
|
||||
})
|
||||
}, 10)
|
||||
}
|
||||
async function handleResponse(data: any) {
|
||||
// userType logic is commented out; if needed, implement accordingly
|
||||
@@ -1186,7 +1222,14 @@ const choose = (e: any) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 关联终端
|
||||
const changeDevId = (e: any, flag?: boolean = true) => {
|
||||
if (flag) {
|
||||
form.value.lineId = ''
|
||||
}
|
||||
|
||||
lineIdList.value = devIdList.value.filter(item => item.devId == e)[0]?.lineList
|
||||
}
|
||||
//设置工程预期投产日期时间选择范围不能<今天
|
||||
const disabledDate = (time: any) => {
|
||||
// return time.getTime() < Date.now() - 8.64e7 // 8.64e7 毫秒数代表一天
|
||||
@@ -1194,6 +1237,7 @@ const disabledDate = (time: any) => {
|
||||
}
|
||||
//提交
|
||||
const confirmForm = (flag: boolean) => {
|
||||
addUploadRef.value?.submitForm()
|
||||
if (flag) {
|
||||
//整理上传文件的数据
|
||||
// userType==0,1
|
||||
|
||||
Reference in New Issue
Block a user