This commit is contained in:
zhujiyan
2024-05-13 10:18:48 +08:00
parent 007657a5bf
commit cd2a09061e

View File

@@ -190,7 +190,7 @@
<el-option <el-option
v-for="(item, index) in voltageLevelList" v-for="(item, index) in voltageLevelList"
:label="item.name" :label="item.name"
:value="item.name" :value="item.id"
:key="index" :key="index"
/> />
</el-select> </el-select>
@@ -207,7 +207,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.name" :value="item.id"
:key="index" :key="index"
/> />
</el-select> </el-select>
@@ -251,7 +251,7 @@
v-for="(item, index) in evaluationTypeList" v-for="(item, index) in evaluationTypeList"
:key="indedx" :key="indedx"
:label="item.name" :label="item.name"
:value="item.value" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -340,7 +340,7 @@
<el-option <el-option
v-for="(item, index) in industryList" v-for="(item, index) in industryList"
:label="item.name" :label="item.name"
:value="item.name" :value="item.id"
:key="index" :key="index"
/> />
</el-select> </el-select>
@@ -384,7 +384,7 @@
<el-option <el-option
v-for="(item, index) in energyQualityIndexList" v-for="(item, index) in energyQualityIndexList"
:label="item.name" :label="item.name"
:value="item.name" :value="item.id"
:key="index" :key="index"
/> />
</el-select> </el-select>
@@ -739,9 +739,7 @@ const getTreeList = () => {
} }
const treeRef = ref() const treeRef = ref()
const handleCheckChange = data => { const handleCheckChange = data => {
console.log(22222, data)
const checkedNodes = treeRef.value.getCheckedKeys() const checkedNodes = treeRef.value.getCheckedKeys()
console.log('选中的节点数据:', checkedNodes)
if (checkedNodes.length > 1) { if (checkedNodes.length > 1) {
checkedNodes.map((item, index) => { checkedNodes.map((item, index) => {
// if (index == checkedNodes.length - 1) { // if (index == checkedNodes.length - 1) {
@@ -756,6 +754,9 @@ const handleCheckChange = data => {
} }
} }
getTreeList() getTreeList()
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
console.log(adminInfo.$state, '打印登陆用户新信息')
const resetForm = () => { const resetForm = () => {
form.value = { form.value = {
reporter: '', //填报人 reporter: '', //填报人
@@ -808,112 +809,84 @@ const resetForm = () => {
antiInterferenceReport: '' //抗扰度测试报告 antiInterferenceReport: '' //抗扰度测试报告
// } // }
} }
//获取登陆用户姓名和部门
const adminInfo = useAdminInfo()
console.log(adminInfo.$state, '打印登陆用户新信息')
form.value.reporter = adminInfo.$state.name form.value.reporter = adminInfo.$state.name
form.value.orgId = adminInfo.$state.deptName form.value.orgId = adminInfo.$state.deptName
} }
//初始化数据 //初始化数据
resetForm() resetForm()
const subForm = ref({ const subForm = ref({
city: '', //所属地市
evaluationConclusion: '', //预测评估结论
evaluationDept: '', //预测评估单位
expectedProductionDate: '', //工程预期投产日期
orgId: '', //填报部门
projectName: '',
reporter: '', //填报人 reporter: '', //填报人
reportDate: new Date(), //填报日期 reportDate: new Date(), //填报日期
orgId: '', //填报部门
expectedProductionDate: '', //工程预期投产日期
userType: '0', //用户性质
city: '', //所属地市
responsibleDepartment: '', //归口管理部门 responsibleDepartment: '', //归口管理部门
userStatus: '', //用户状态 substation: '', ////变电站
projectName: '', //工程名称 userStatus: '0', //用户状态
substation: '', //变电站 userType: '0',//用户性质
voltageLevel: '', //电压等级 voltageLevel: "",
evaluationDept: '', //预测评估单位
evaluationConclusion: '', //预测评估结论
backgroundTestPerformed: '', //是否开展背景测试
feasibilityReport: '', // 可研报告告地址
preliminaryDesignDescription: '', //项目初步设计说明书告地址
predictionEvaluationReport: '', //预测评估报告告地址
predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
additionalAttachments: '', //其他附件告地址
state: '', //数据状态
pccPoint: '', //PCC点
industry: '', //行业
evaluationType: '', //评估类型
evaluationChekDept: '', //预测评估审单位
substationMainWiringDiagram: '', //用户接入变电站主接线示意图地址
powerQualityReport: '', //背景电能质量测试报告
minShortCircuitCapacity: '', //系统最小短路容量MVA
userAgreementCapacity: '', //用户用电协议容量MVA
needGovernance: '', //是否需要治理
//userType=='0' '1' //userType=='0' '1'
userReportProjectPO: { userReportProjectPO: {
agreementCapacity: '', //用户协议容量 additionalAttachments: '', //其他附件告地址
nonlinearDeviceType: '', //非线性设备类型 agreementCapacity: 0,
additionalAttachments: '',
backgroundTestPerformed: 0, backgroundTestPerformed: 0,
feasibilityReport: '', feasibilityReport: '', //可研报告
id: '', id: '',
needGovernance: 0, needGovernance: 0,
predictionEvaluationReport: '', nonlinearDeviceType: '',
predictionEvaluationReviewOpinions: '', predictionEvaluationReport: '', //预测评估报告告地址
preliminaryDesignDescription: '', predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
preliminaryDesignDescription: '', //项目初步设计说明书告地址
state: 0 state: 0
}, },
//userType=='2' '3' '4' '5' //userType=='2,3,4,5'
userReportSensitivePO: {
nonlinearLoadType: '', //非线性负荷类型
pccEquipmentCapacity: '', // PCC供电设备容量MVA
baseShortCircuitCapacity: '', //基准短路容量MVA
additionalAttachments: '',
antiInterferenceReport: '',
antiInterferenceTest: '',
backgroundTestPerformed: 0,
deviceName: '',
energyQualityIndex: '',
evaluationChekDept: '',
evaluationType: '',
feasibilityReport: '',
id: '',
industry: '',
needGovernance: 0,
pccPoint: '',
powerQualityReport: '',
powerSupplyCount: 0,
predictionEvaluationReport: '',
predictionEvaluationReviewOpinions: '',
preliminaryDesignDescription: '',
sensitiveDevices: '',
state: 0,
substationMainWiringDiagram: ''
},
//userType=='6'
userReportSubstationPO: { userReportSubstationPO: {
industry: '', //行业 additionalAttachments: '', //其他附件告地址
deviceName: '', //敏感装置名称
powerSupplyCount: 0, //供电电源数量
energyQualityIndex: '', //敏感电能质量指标
antiInterferenceTest: '', //是否开展抗扰度测试
sensitiveDevices: '', //主要敏感设备清单
antiInterferenceReport: '', //抗扰度测试报告
additionalAttachments: '',
backgroundTestPerformed: 0, backgroundTestPerformed: 0,
baseShortCircuitCapacity: 0, baseShortCircuitCapacity: 0,
evaluationChekDept: '', evaluationChekDept: '',
evaluationType: '', evaluationType: '',
feasibilityReport: '', feasibilityReport: '', //可研报告
id: '', id: '',
minShortCircuitCapacity: 0, minShortCircuitCapacity: 0,
needGovernance: 0, needGovernance: 0,
nonlinearLoadType: '', nonlinearLoadType: '',
pccEquipmentCapacity: 0, pccEquipmentCapacity: 0,
pccPoint: '', pccPoint: '',
predictionEvaluationReport: '', predictionEvaluationReport: '', //预测评估报告告地址
predictionEvaluationReviewOpinions: '', predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
preliminaryDesignDescription: '', preliminaryDesignDescription: '', //项目初步设计说明书告地址
state: 0, state: 0,
substationMainWiringDiagram: '', substationMainWiringDiagram: '', //用户接入变电站主接线示意图地址
userAgreementCapacity: 0 userAgreementCapacity: 0
},
//userType=='6'
userReportSensitivePO: {
additionalAttachments: '', //其他附件告地址
antiInterferenceReport: '', //抗扰度测试报告
antiInterferenceTest: '',
backgroundTestPerformed: 0,
deviceName: '',
energyQualityIndex: '',
evaluationChekDept: '',
evaluationType: '',
feasibilityReport: '', //可研报告告地址
id: '',
industry: '',
needGovernance: 0,
pccPoint: '',
powerQualityReport: '', //背景电能质量测试报告
powerSupplyCount: 0,
predictionEvaluationReport: '', //预测评估报告告地址
predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
preliminaryDesignDescription: '', //项目初步设计说明书告地址
sensitiveDevices: '', //主要敏感设备清单
state: 0,
substationMainWiringDiagram: '' //用户接入变电站主接线示意图地址
} }
}) })
watch( watch(
@@ -929,16 +902,16 @@ watch(
//userType==0,1 //userType==0,1
if (val.userType == '0' || val.userType == '1') { if (val.userType == '0' || val.userType == '1') {
subForm.value.userReportProjectPO = { subForm.value.userReportProjectPO = {
agreementCapacity: '', //用户协议容量 additionalAttachments: '', //其他附件告地址
nonlinearDeviceType: '', //非线性设备类型 agreementCapacity: 0,
additionalAttachments: '',
backgroundTestPerformed: 0, backgroundTestPerformed: 0,
feasibilityReport: '', feasibilityReport: '', //可研报告
id: '', id: '',
needGovernance: 0, needGovernance: 0,
predictionEvaluationReport: '', nonlinearDeviceType: '',
predictionEvaluationReviewOpinions: '', predictionEvaluationReport: '', //预测评估报告告地址
preliminaryDesignDescription: '', predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
preliminaryDesignDescription: '', //项目初步设计说明书告地址
state: 0 state: 0
} }
for (let key in val) { for (let key in val) {
@@ -947,36 +920,30 @@ watch(
subForm.value.userReportProjectPO[key] = val[key] subForm.value.userReportProjectPO[key] = val[key]
} }
} }
delete subForm.value.userReportSensitivePO
delete subForm.value.userReportSubstationPO delete subForm.value.userReportSubstationPO
delete subForm.value.userReportSensitivePO
} }
//userType==2,3,4,5 //userType==2,3,4,5
if (val.userType == '2' || val.userType == '3' || val.userType == '4' || val.userType == '5') { if (val.userType == '2' || val.userType == '3' || val.userType == '4' || val.userType == '5') {
subForm.value.userReportSensitivePO = { subForm.value.userReportSubstationPO = {
nonlinearLoadType: '', //非线性负荷类型 additionalAttachments: '', //其他附件告地址
pccEquipmentCapacity: '', // PCC供电设备容量MVA
baseShortCircuitCapacity: '', //基准短路容量MVA
additionalAttachments: '',
antiInterferenceReport: '',
antiInterferenceTest: '',
backgroundTestPerformed: 0, backgroundTestPerformed: 0,
deviceName: '', baseShortCircuitCapacity: 0,
energyQualityIndex: '',
evaluationChekDept: '', evaluationChekDept: '',
evaluationType: '', evaluationType: '',
feasibilityReport: '', feasibilityReport: '', //可研报告
id: '', id: '',
industry: '', minShortCircuitCapacity: 0,
needGovernance: 0, needGovernance: 0,
nonlinearLoadType: '',
pccEquipmentCapacity: 0,
pccPoint: '', pccPoint: '',
powerQualityReport: '', predictionEvaluationReport: '', //预测评估报告告地址
powerSupplyCount: 0, predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
predictionEvaluationReport: '', preliminaryDesignDescription: '', //项目初步设计说明书告地址
predictionEvaluationReviewOpinions: '',
preliminaryDesignDescription: '',
sensitiveDevices: '',
state: 0, state: 0,
substationMainWiringDiagram: '' substationMainWiringDiagram: '', //用户接入变电站主接线示意图地址
userAgreementCapacity: 0
} }
for (let key in val) { for (let key in val) {
if (subForm.value.userReportSensitivePO.hasOwnProperty(key)) { if (subForm.value.userReportSensitivePO.hasOwnProperty(key)) {
@@ -985,36 +952,32 @@ watch(
} }
} }
delete subForm.value.userReportProjectPO delete subForm.value.userReportProjectPO
delete subForm.value.userReportSubstationPO delete subForm.value.userReportSensitivePO
} }
//userType==6 //userType==6
if (val.userType == '6') { if (val.userType == '6') {
subForm.value.userReportSubstationPO = { subForm.value.userReportSensitivePO = {
industry: '', //行业 additionalAttachments: '', //其他附件告地址
deviceName: '', //敏感装置名称
powerSupplyCount: 0, //供电电源数量
energyQualityIndex: '', //敏感电能质量指标
antiInterferenceTest: '', //是否开展抗扰度测试
sensitiveDevices: '', //主要敏感设备清单
antiInterferenceReport: '', //抗扰度测试报告 antiInterferenceReport: '', //抗扰度测试报告
additionalAttachments: '', antiInterferenceTest: '',
backgroundTestPerformed: 0, backgroundTestPerformed: 0,
baseShortCircuitCapacity: 0, deviceName: '',
energyQualityIndex: '',
evaluationChekDept: '', evaluationChekDept: '',
evaluationType: '', evaluationType: '',
feasibilityReport: '', feasibilityReport: '', //可研报告告地址
id: '', id: '',
minShortCircuitCapacity: 0, industry: '',
needGovernance: 0, needGovernance: 0,
nonlinearLoadType: '',
pccEquipmentCapacity: 0,
pccPoint: '', pccPoint: '',
predictionEvaluationReport: '', powerQualityReport: '', //背景电能质量测试报告
predictionEvaluationReviewOpinions: '', powerSupplyCount: 0,
preliminaryDesignDescription: '', predictionEvaluationReport: '', //预测评估报告告地址
predictionEvaluationReviewOpinions: '', //预测评估评审意见报告地址
preliminaryDesignDescription: '', //项目初步设计说明书告地址
sensitiveDevices: '', //主要敏感设备清单
state: 0, state: 0,
substationMainWiringDiagram: '', substationMainWiringDiagram: '' //用户接入变电站主接线示意图地址
userAgreementCapacity: 0
} }
for (let key in val) { for (let key in val) {
if (subForm.value.userReportSubstationPO.hasOwnProperty(key)) { if (subForm.value.userReportSubstationPO.hasOwnProperty(key)) {
@@ -1023,9 +986,8 @@ watch(
} }
} }
delete subForm.value.userReportProjectPO delete subForm.value.userReportProjectPO
delete subForm.value.userReportSensitivePO delete subForm.value.userReportSubstationPO
} }
console.log(subForm.value, '打印处理好的subForm数据')
}, },
{ {
deep: true deep: true
@@ -1388,7 +1350,6 @@ const handleExceed: UploadProps['onExceed'] = files => {
let uploadName = ref('') let uploadName = ref('')
//上传报告改变 //上传报告改变
const uploadFileName = val => { const uploadFileName = val => {
console.log(val, '打印上传报告的名字')
uploadName.value = val uploadName.value = val
} }
// 可研报告数组 // 可研报告数组
@@ -1411,7 +1372,6 @@ const antiInterferenceReport = ref('')
const powerQualityReport = ref('') const powerQualityReport = ref('')
const choose = (e: any) => { const choose = (e: any) => {
uploadFile(e.raw, '/supervision/').then(res => { uploadFile(e.raw, '/supervision/').then(res => {
console.log(res, '000000000')
//可研报告 //可研报告
if (uploadName.value == 'feasibilityReport') { if (uploadName.value == 'feasibilityReport') {
feasibilityReport.value = res.data.name feasibilityReport.value = res.data.name
@@ -1457,22 +1417,61 @@ const disabledDate = time => {
} }
//提交 //提交
const confirmForm = () => { const confirmForm = () => {
console.log(form.value, '打印提交表单')
console.log('提交的数据:', subForm.value)
ruleFormRef.value.validate(valid => { ruleFormRef.value.validate(valid => {
console.log(moment(form.value.reportDate).format('YYYY-MM-DD'))
if (valid) { if (valid) {
subForm.value.userReportSubstationPO.sensitiveDevices = sensitiveDevices.value //整理上传文件的数据
subForm.value.userReportSubstationPO.antiInterferenceReport = antiInterferenceReport.value // userType==0,1
subForm.value.feasibilityReport = feasibilityReport.value form.value.reporter = adminInfo.$state.id
subForm.value.preliminaryDesignDescription = preliminaryDesignDescription.value form.value.orgId = adminInfo.$state.deptName
subForm.value.userReportSensitivePO.predictionEvaluationReport = predictionEvaluationReport.value subForm.value.reporter = adminInfo.$state.id
let confirmFormData = JSON.parse(JSON.stringify(subForm.value))
if(subForm.value.userType=='0'||subForm.value.userType=='1'){
confirmFormData.userReportProjectPO = {
...confirmFormData.userReportProjectPO,
feasibilityReport: feasibilityReport.value, //可研报告
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
additionalAttachments: additionalAttachments.value //其他附件告地址
}
}else{
delete subForm.value.userReportProjectPO;
}
console.log(
feasibilityReport.value,
'feasibilityReport.value++++++++',
confirmFormData,
)
//userType==2,3,4,5
if(subForm.value.userType=='0'||subForm.value.userType=='1'){
confirmFormData.userReportProjectPO = {
...confirmFormData.userReportProjectPO,
feasibilityReport: feasibilityReport.value, //可研报告
preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
additionalAttachments: additionalAttachments.value //其他附件告地址
}
}else{
delete subForm.value.userReportProjectPO;
}
subForm.value.userReportSubstationPO.predictionEvaluationReviewOpinions = predictionEvaluationReviewOpinions.value //userType==6
subForm.value.userReportSubstationPO.additionalAttachments = additionalAttachments.value confirmFormData.userReportSensitivePO = {
subForm.value.userReportSensitivePO.substationMainWiringDiagram = substationMainWiringDiagram.value ... confirmFormData.userReportSensitivePO,
subForm.value.userReportSensitivePO.powerQualityReport = powerQualityReport.value feasibilityReport: feasibilityReport.value, //可研报告
console.log('提交的数据:', subForm.value) preliminaryDesignDescription: preliminaryDesignDescription.value, //项目初步设计说明书告地址
predictionEvaluationReport: predictionEvaluationReport.value, //预测评估报告告地址
predictionEvaluationReviewOpinions: predictionEvaluationReviewOpinions.value, //预测评估评审意见报告地址
additionalAttachments: additionalAttachments.value, //其他附件告地址
substationMainWiringDiagram: substationMainWiringDiagram.value, //用户接入变电站主接线示意图地址
sensitiveDevices: sensitiveDevices.value, //主要敏感设备清单
antiInterferenceReport: antiInterferenceReport.value, //抗扰度测试报告
powerQualityReport: powerQualityReport.value //背景电能质量测试报告
}
console.log('提交的数据:', confirmFormData)
return
submitFormData(subForm.value).then(res => { submitFormData(subForm.value).then(res => {
console.log(res, '打印提交结果2333=======>>>>>') console.log(res, '打印提交结果2333=======>>>>>')
}) })