Browse Source

堤防与水闸

master_tdsql
xzt 1 year ago
parent
commit
8861dab5e3
  1. 1
      package.json
  2. 9
      src/api/areas/index.js
  3. 9
      src/api/yg/dikeCompare.js
  4. 8
      src/api/yg/dikeMark.js
  5. 46
      src/views/dyke/engineeringCondition/dykeBaseInfo/options/projectManagement.vue
  6. 493
      src/views/dyke/engineeringCondition/dykeCompare/components/basePage.vue
  7. 11
      src/views/dyke/engineeringCondition/dykeCompare/components/comparePart.vue
  8. 136
      src/views/dyke/engineeringCondition/dykeCompare/components/projectManagement.vue
  9. 8
      src/views/dyke/engineeringCondition/dykeCompare/index.vue
  10. 44
      src/views/dyke/engineeringCondition/identificationPlate/components/markForm.vue
  11. 180
      src/views/dyke/engineeringCondition/identificationPlate/index.vue
  12. 12
      src/views/sluice/engineeringCondition/identificationPlate/components/markForm.vue
  13. 116
      src/views/sluice/engineeringCondition/identificationPlate/index.vue
  14. 107
      src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue
  15. 53
      src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue
  16. 26
      src/views/sluice/engineeringCondition/sluiceCompare/components/basePage.vue

1
package.json

@ -49,6 +49,7 @@
"d3": "^5.0.0",
"d3-flextree": "^2.1.2",
"echarts": "4.2.1",
"element-china-area-data": "^6.1.0",
"element-ui": "^2.15.6",
"file-saver": "2.0.1",
"fuse.js": "3.4.4",

9
src/api/areas/index.js

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 查询行政区划数据
export function getAreasData() {
return request({
url: '/xzqh/xzqh/common',
method: 'get',
})
}

9
src/api/yg/dikeCompare.js

@ -0,0 +1,9 @@
import request from '@/utils/request'
// 堤防基本信息版本对比数据
export function getDikeCompare(embankmentCode) {
return request({
url: '/df/contrast/' + embankmentCode,
method: 'get'
})
}

8
src/api/yg/dikeMark.js

@ -35,6 +35,14 @@ export function updateDikeMark(data) {
})
}
// 删除整个水闸标识标牌
export function delDikeMarkAll(embankmentCode) {
return request({
url: '/df/dikeMark/del/' + embankmentCode,
method: 'delete'
})
}
// 删除堤防标识标牌
export function delDikeMark(id) {
return request({

46
src/views/dyke/engineeringCondition/dykeBaseInfo/options/projectManagement.vue

@ -398,14 +398,14 @@
action="thinking/common/upload"
:headers="headers"
:on-preview="handleOpinionPreview"
:on-remove="(file) => handleOpinionRemove(file, 'fileList')"
:on-remove="(file) => handleOpinionRemove(file, 'fileList4')"
:before-remove="beforeOpinionRemove"
multiple
:on-exceed="handleOpinionExceed"
:on-success="
(_, fileList) => submitOpinionUpload(fileList, 'fileList')
(_, fileList) => submitOpinionUpload(fileList, 'fileList4')
"
:file-list="fileList"
:file-list="fileList4"
>
<el-button size="small" type="primary" plain>
<i class="el-icon-upload el-icon--right"></i>
@ -425,18 +425,20 @@
</el-col>
<el-col :span="8">
<el-form-item label="监控类型(可多选)" prop="monitoringType">
<!-- <el-select
<el-select
v-model="form.monitoringType"
multiple
collapse-tags
placeholder="监控类型(可多选)"
style="width: 100%"
>
<el-option
v-for="dict in administrationDepartmentNatureOptions"
v-for="dict in monitoringTypeOptions"
:key="dict.dictValue + '监控类型'"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select> -->
</el-select>
</el-form-item>
</el-col>
</el-form>
@ -500,6 +502,8 @@ export default {
managementConfirmationOptions: [],
//
protectionDelimitationOptions: [],
//
monitoringTypeOptions: [],
//
queryParams: {
pageNum: 1,
@ -553,7 +557,10 @@ export default {
headers: {
shuili: "water " + getToken(),
},
fileList: [],
fileList1: [],
fileList2: [],
fileList3: [],
fileList4: [],
};
},
created() {
@ -582,6 +589,9 @@ export default {
this.getDicts("scope_delineation").then((response) => {
this.protectionDelimitationOptions = response.data;
});
this.getDicts("monitoring_type").then((response) => {
this.monitoringTypeOptions = response.data;
});
},
methods: {
/** 查询水闸工程管理信息列表 */
@ -590,8 +600,20 @@ export default {
listEngineerManageInfo(this.queryParams).then((response) => {
if (response.records.length > 0) {
this.form = response.records[0];
if (this.form.delimitationEvidence) {
this.fileList1 = JSON.parse(this.form.delimitationEvidence);
}
if (this.form.confirmationEvidence) {
this.fileList2 = JSON.parse(this.form.confirmationEvidence);
}
if (this.form.protectionEvidence) {
this.fileList3 = JSON.parse(this.form.protectionEvidence);
}
if (this.form.engineeringPanoramicPhotos) {
this.fileList = JSON.parse(this.form.engineeringPanoramicPhotos);
this.fileList4 = JSON.parse(this.form.engineeringPanoramicPhotos);
}
if (this.form.monitoringType) {
this.form.monitoringType = JSON.parse(this.form.monitoringType);
}
}
console.log("this.form", this.form);
@ -700,7 +722,7 @@ export default {
remarks: null,
owerDept: null,
relations: null,
monitoringType: null,
monitoringType: [],
};
this.resetForm("form");
},
@ -790,7 +812,11 @@ export default {
if (valid) {
this.form.embankmentCode = this.embankmentCode;
this.form.engineeringPanoramicPhotos = JSON.stringify(this.fileList);
this.form.delimitationEvidence = JSON.stringify(this.fileList1);
this.form.confirmationEvidence = JSON.stringify(this.fileList2);
this.form.protectionEvidence = JSON.stringify(this.fileList3);
this.form.engineeringPanoramicPhotos = JSON.stringify(this.fileList4);
this.form.monitoringType = JSON.stringify(this.form.monitoringType);
if (this.form.id != null) {
updateEngineerManageInfo(this.form).then((response) => {

493
src/views/dyke/engineeringCondition/dykeCompare/components/basePage.vue

@ -29,153 +29,154 @@
:contentStyle="{}"
ref="descriptions"
>
<el-descriptions-item :contentClassName="isDiff('sluiceName')">
<template slot="label"> 水闸名称 </template>
{{ this.form.sluiceName }}
<el-descriptions-item :contentClassName="isDiff('embankmentName')">
<template slot="label"> 堤防名称 </template>
{{ this.form.embankmentName }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('adcd')">
<template slot="label"> 行政区划 </template>
{{ this.form.adcd }}
<el-descriptions-item :contentClassName="isDiff('adcdStart')">
<template slot="label"> 起点行政区划 </template>
{{ this.form.adcdStart }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('sluiceCode')">
<template slot="label"> 水闸编码 </template>
{{ this.form.sluiceCode }}
<el-descriptions-item :contentClassName="isDiff('embankmentCode')">
<template slot="label"> 堤防编码 </template>
{{ this.form.embankmentCode }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('location')">
<template slot="label"> 所在位置 </template>
{{ locationFormat(this.form.location) }}
<el-descriptions-item :contentClassName="isDiff('plotEmbankments')">
<template slot="label"> 标绘堤防 </template>
{{ this.form.plotEmbankments }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('plottingSluice')">
<template slot="label"> 标绘水闸 </template>
{{ this.form.plottingSluice }}
<el-descriptions-item :contentClassName="isDiff('adcdEnd')">
<template slot="label"> 终点行政区划 </template>
{{ this.form.adcdEnd }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('acceptanceStatus')">
<template slot="label"> 验收情况 </template>
{{ acceptanceStatusFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('startingStationNumber')">
<template slot="label"> 起点桩号 </template>
{{ this.form.startingStationNumber }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('completionTime')">
<template slot="label"> 建成时间 </template>
{{ this.form.completionTime }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('completionAcceptanceTime')"
>
<template slot="label"> 竣工验收时间 </template>
{{ this.form.completionAcceptanceTime }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('riskEliminationStatus')">
<template slot="label"> 除险加固情况 </template>
{{ riskEliminationStatusFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('recentCompletionTime')">
<template slot="label"> 最近除险加固完工时间 </template>
{{ this.form.recentCompletionTime }}
<el-descriptions-item :contentClassName="isDiff('endStationNumber')">
<template slot="label"> 终点桩号 </template>
{{ this.form.endStationNumber }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('isHubProject')">
<template slot="label"> 是否为枢纽工程 </template>
{{ isHubProjectFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('embankmentType')">
<template slot="label"> 堤防类型 </template>
{{ endStationNumberFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('hubBuildings')">
<template slot="label"> 枢纽建筑物 </template>
{{ hubBuildingsFormat(this.form.hubBuildings) }}
<el-descriptions-item :contentClassName="isDiff('riverLocation')">
<template slot="label"> 所在河流 </template>
{{ this.form.riverLocation }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('isGateStation')">
<template slot="label"> 是否为闸站工程 </template>
{{ isGateStationFormat(this.form) }}
<el-descriptions-item
:contentClassName="isDiff('riversideClassification')"
>
<template slot="label"> 河流岸别 </template>
{{ riversideClassificationFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('isSetGateProject')">
<template slot="label"> 是否为套闸工程 </template>
{{ isSetGateProjectFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('lakeName')">
<template slot="label"> 所在湖泊名称 </template>
{{ this.form.lakeName }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('auxiliaryGateHoles')">
<template slot="label"> 副闸闸孔数量 </template>
{{ this.form.auxiliaryGateHoles }}
<el-descriptions-item :contentClassName="isDiff('coastlineName')">
<template slot="label"> 所在海岸名称 </template>
{{ this.form.coastlineName }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('auxiliaryGateHolesWidth')"
:contentClassName="isDiff('isFloodStorageDetention')"
>
<template slot="label"> 副闸闸孔总净宽m </template>
{{ this.form.auxiliaryGateHolesWidth }}
<template slot="label"> 是否为蓄滞洪区堤防 </template>
{{ isFloodStorageDetentionFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('sluiceType')">
<template slot="label"> 水闸类型 </template>
{{ sluiceTypeFormat(this.form.sluiceType) }}
<el-descriptions-item
:contentClassName="isDiff('storageDetentionAreaName')"
>
<template slot="label"> 所在蓄滞洪区名称 </template>
{{ this.form.storageDetentionAreaName }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('designGateFlow')">
<template slot="label"> 设计过闸流量 </template>
{{ this.form.designGateFlow }}
<el-descriptions-item
:contentClassName="isDiff('areaStartingStationNumber')"
>
<template slot="label"> 堤防蓄滞洪区段起点桩号 </template>
{{ this.form.areaStartingStationNumber }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('verifiedGateFlow')">
<template slot="label"> 校核过闸流量 </template>
{{ this.form.verifiedGateFlow }}
<el-descriptions-item :contentClassName="isDiff('areaEndStationNumber')">
<template slot="label"> 堤防蓄滞洪区段终点桩号 </template>
{{ this.form.areaEndStationNumber }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('projectScale')">
<template slot="label"> 工程规模 </template>
{{ projectScaleFormat(this.form) }}
<el-descriptions-item
:contentClassName="isDiff('totalLengthFloodStorage')"
>
<template slot="label"> 堤防蓄滞洪区段总长度(m) </template>
{{ this.form.totalLengthFloodStorage }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('buildingLevel')">
<template slot="label"> 建筑物级别 </template>
{{ buildingLevelFormat(this.form) }}
<el-descriptions-item
:contentClassName="isDiff('floodStorageDetentionAreasExplanation')"
>
<template slot="label"> 蓄滞洪区特殊情况说明 </template>
{{ this.form.floodStorageDetentionAreasExplanation }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('designStandards')">
<template slot="label"> 设计标准[重现期] </template>
{{ this.form.designStandards }}
<el-descriptions-item :contentClassName="isDiff('crossBorderSituation')">
<template slot="label"> 堤防跨界情况 </template>
{{ crossBorderSituationFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('verificationStandards')">
<template slot="label"> 校核标准[重现期] </template>
{{ this.form.verificationStandards }}
<el-descriptions-item :contentClassName="isDiff('embankmentTyper')">
<template slot="label"> 堤防型式 </template>
{{ embankmentTyperFormat(this.form.embankmentTyper) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('historicalMaximumGate')">
<template slot="label"> 历史最大过闸流量(m³/s) </template>
{{ this.form.historicalMaximumGate }}
<el-descriptions-item :contentClassName="isDiff('completionTime')">
<template slot="label"> 建成时间 </template>
{{ this.form.completionTime }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('historicalMaximumDate')">
<template slot="label"> 历史最大过闸流量日期 </template>
{{ this.form.historicalMaximumDate }}
<el-descriptions-item
:contentClassName="isDiff('recentComplianceReinforcementStatus')"
>
<template slot="label"> 最近达标加固完工状态 </template>
{{ this.form.recentComplianceReinforcementStatus }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('designSeismicIntensity')"
:contentClassName="isDiff('recentComplianceReinforcementTime')"
>
<template slot="label"> 设计地震烈度 </template>
{{ this.form.designSeismicIntensity }}
<template slot="label"> 最近达标加固完成时间 </template>
{{ this.form.recentComplianceReinforcementTime }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('gateHolesNumber')">
<template slot="label"> 闸孔数量 </template>
{{ this.form.gateHolesNumber }}
<el-descriptions-item :contentClassName="isDiff('engineeringTasks')">
<template slot="label"> 工程任务 </template>
{{ engineeringTasksFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('gateHoleWidth')">
<template slot="label"> 闸孔总净宽(m) </template>
{{ this.form.gateHoleWidth }}
<el-descriptions-item :contentClassName="isDiff('embankmentLevel')">
<template slot="label"> 堤防级别 </template>
{{ embankmentLevelFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('hoistsNumber')">
<template slot="label"> 启闭机数量 </template>
{{ this.form.hoistsNumber }}
<el-descriptions-item :contentClassName="isDiff('designFloodControl')">
<template slot="label"> 设计防洪 </template>
{{ this.form.designFloodControl }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('observationProject')">
<template slot="label"> 观测项目 </template>
{{ observationProjectFormat(this.form.observationProject) }}
<el-descriptions-item :contentClassName="isDiff('embankmentLength')">
<template slot="label"> 堤防长度(m) </template>
{{ this.form.embankmentLength }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('lockChamberStructure')">
<template slot="label"> 闸室结构 </template>
{{ lockChamberStructureFormat(this.form.lockChamberStructure) }}
<el-descriptions-item :contentClassName="isDiff('planningFloodControl')">
<template slot="label"> 规划防洪 </template>
{{ this.form.planningFloodControl }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('gateType')">
<template slot="label"> 闸门型式 </template>
{{ gateTypeFormat(this.form.gateType) }}
<el-descriptions-item
:contentClassName="isDiff('embankmentLengthPlanningStandards')"
>
<template slot="label"> 达到规划标准的堤防长度(m) </template>
{{ this.form.embankmentLengthPlanningStandards }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('machineForm')">
<template slot="label"> 启闭机形式 </template>
{{ machineFormFormat(this.form.machineForm) }}
<el-descriptions-item :contentClassName="isDiff('populationProtection')">
<template slot="label"> 保护人口 </template>
{{ this.form.populationProtection }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('protectingFarmland')">
<template slot="label"> 保护农田 </template>
{{ this.form.protectingFarmland }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('energyDissipationMethod')"
:contentClassName="isDiff('criticalInfrastructure')"
>
<template slot="label"> 消能方式 </template>
{{ energyDissipationMethodFormat(this.form.energyDissipationMethod) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('automationControl')">
<template slot="label"> 自动化控制 </template>
{{ automationControlFormat(this.form.automationControl) }}
<template slot="label"> 重要基础设施 </template>
{{ this.form.criticalInfrastructure }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('relation')">
<template slot="label"> 关联字段1 </template>
@ -185,7 +186,7 @@
</div>
</template>
<script>
import { getSluiceCompare } from "@/api/yg/sluiceCompare";
import { getDikeCompare } from "@/api/yg/dikeCompare";
export default {
props: ["baseData"],
inject: ["getDiff", "granParentEle"],
@ -194,38 +195,22 @@ export default {
histroy: "当前版本",
sumData: [],
form: {},
//
locationOptions: [],
//
acceptanceStatusOptions: [],
//
riskEliminationStatusOptions: [],
//
isHubProjectOptions: [],
//
isGateStationOptions: [],
//
isSetGateProjectOptions: [],
//
sluiceTypeOptions: [],
//
projectScaleOptions: [],
//
buildingLevelOptions: [],
//
gateTypeOptions: [],
//
observationProjectOptions: [],
//
lockChamberStructureOptions: [],
//
machineFormOptions: [],
//
energyDissipationMethodOptions: [],
//
automationControlOptions: [],
//
hubBuildingsOptions: [],
//
embankmentTypeOptions: [],
//
riversideClassificationOptions: [],
//
isFloodStorageDetentionOptions: [],
//
crossBorderSituationOptions: [],
//
embankmentTyperOptions: [],
//
recentComplianceReinforcementStatusOptions: [],
//
engineeringTasksOptions: [],
//
embankmentLevelOptions: [],
diffPart: [],
};
},
@ -238,7 +223,7 @@ export default {
console.log("this.diffPart in basePage", this.diffPart);
}
getSluiceCompare(this.$route.query.sluiceCode).then((res) => {
getDikeCompare(this.$route.query.embankmentCode).then((res) => {
this.sumData = res.data.jbxx;
console.log("this.sumData in basePage", this.sumData);
// res.data.jbxx.map((item) => {
@ -249,53 +234,29 @@ export default {
// });
});
this.getDicts("location").then((response) => {
this.locationOptions = response.data;
});
this.getDicts("completion_acceptance_status").then((response) => {
this.acceptanceStatusOptions = response.data;
this.getDicts("embankment_type").then((response) => {
this.embankmentTypeOptions = response.data;
});
this.getDicts("reinforcement_situation").then((response) => {
this.riskEliminationStatusOptions = response.data;
this.getDicts("riverside_classification").then((response) => {
this.riversideClassificationOptions = response.data;
});
this.getDicts("whether").then((response) => {
this.isHubProjectOptions = response.data;
this.isFloodStorageDetentionOptions = response.data;
});
this.getDicts("whether").then((response) => {
this.isGateStationOptions = response.data;
});
this.getDicts("whether").then((response) => {
this.isSetGateProjectOptions = response.data;
});
this.getDicts("sluice_type").then((response) => {
this.sluiceTypeOptions = response.data;
});
this.getDicts("engineering_scale").then((response) => {
this.projectScaleOptions = response.data;
});
this.getDicts("building_level").then((response) => {
this.buildingLevelOptions = response.data;
});
this.getDicts("gate_type").then((response) => {
this.gateTypeOptions = response.data;
});
this.getDicts("observation_project").then((response) => {
this.observationProjectOptions = response.data;
this.getDicts("cross_border_situation").then((response) => {
this.crossBorderSituationOptions = response.data;
});
this.getDicts("Lock_chamber_structure").then((response) => {
this.lockChamberStructureOptions = response.data;
this.getDicts("embankment_form").then((response) => {
this.embankmentTyperOptions = response.data;
});
this.getDicts("machine_form").then((response) => {
this.machineFormOptions = response.data;
this.getDicts("reach_the_standard").then((response) => {
this.recentComplianceReinforcementStatusOptions = response.data;
});
this.getDicts("energy_dissipation_method").then((response) => {
this.energyDissipationMethodOptions = response.data;
this.getDicts("project_task").then((response) => {
this.engineeringTasksOptions = response.data;
});
this.getDicts("automation_control").then((response) => {
this.automationControlOptions = response.data;
});
this.getDicts("Hub_buildings").then((response) => {
this.hubBuildingsOptions = response.data;
this.getDicts("embankment_level").then((response) => {
this.embankmentLevelOptions = response.data;
});
},
mounted() {
@ -341,156 +302,60 @@ export default {
chooseEdition(data) {
this.form = data;
},
//
locationFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
// console.log("XXXXXXXXXXXXXXXXXXXXXX", data);
if (arr) {
arr.forEach((item) => {
res = res + "+" + this.selectDictLabel(this.locationOptions, item);
});
return res.slice(1);
}
},
//
acceptanceStatusFormat(row, column) {
//
endStationNumberFormat(row, column) {
return this.selectDictLabel(
this.acceptanceStatusOptions,
row.acceptanceStatus
this.embankmentTypeOptions,
row.embankmentType
);
},
//
riskEliminationStatusFormat(row, column) {
//
riversideClassificationFormat(row, column) {
return this.selectDictLabel(
this.riskEliminationStatusOptions,
row.riskEliminationStatus
this.riversideClassificationOptions,
row.riversideClassification
);
},
//
isHubProjectFormat(row, column) {
return this.selectDictLabel(this.isHubProjectOptions, row.isHubProject);
},
//
hubBuildingsFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res =
res + "+" + this.selectDictLabel(this.hubBuildingsOptions, item);
});
return res.slice(1);
}
},
//
isGateStationFormat(row, column) {
return this.selectDictLabel(this.isGateStationOptions, row.isGateStation);
},
//
isSetGateProjectFormat(row, column) {
//
isFloodStorageDetentionFormat(row, column) {
return this.selectDictLabel(
this.isSetGateProjectOptions,
row.isSetGateProject
this.isFloodStorageDetentionOptions,
row.isFloodStorageDetention
);
},
//
sluiceTypeFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res = res + "+" + this.selectDictLabel(this.sluiceTypeOptions, item);
});
return res.slice(1);
}
},
//
projectScaleFormat(row, column) {
return this.selectDictLabel(this.projectScaleOptions, row.projectScale);
},
//
buildingLevelFormat(row, column) {
return this.selectDictLabel(this.buildingLevelOptions, row.buildingLevel);
},
//
gateTypeFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res = res + "+" + this.selectDictLabel(this.gateTypeOptions, item);
});
return res.slice(1);
}
},
//
observationProjectFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res =
res +
"+" +
this.selectDictLabel(this.observationProjectOptions, item);
});
return res.slice(1);
}
//
crossBorderSituationFormat(row, column) {
return this.selectDictLabel(
this.crossBorderSituationOptions,
row.crossBorderSituation
);
},
//
lockChamberStructureFormat(data) {
//
embankmentTyperFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
// console.log("XXXXXXXXXXXXXXXXXXXXXX", data);
if (arr) {
arr.forEach((item) => {
res =
res +
"+" +
this.selectDictLabel(this.lockChamberStructureOptions, item);
res + "+" + this.selectDictLabel(this.embankmentTyperOptions, item);
});
return res.slice(1);
}
},
//
machineFormFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res = res + "+" + this.selectDictLabel(this.machineFormOptions, item);
});
return res.slice(1);
}
},
//
energyDissipationMethodFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res =
res +
"+" +
this.selectDictLabel(this.energyDissipationMethodOptions, item);
});
return res.slice(1);
}
//
engineeringTasksFormat(row, column) {
return this.selectDictLabel(
this.engineeringTasksOptions,
row.engineeringTasks
);
},
//
automationControlFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
if (arr) {
arr.forEach((item) => {
res =
res +
"+" +
this.selectDictLabel(this.automationControlOptions, item);
});
return res.slice(1);
}
//
embankmentLevelFormat(row, column) {
return this.selectDictLabel(
this.embankmentLevelOptions,
row.embankmentLevel
);
},
},
};

11
src/views/dyke/engineeringCondition/dykeCompare/components/comparePart.vue

@ -5,7 +5,7 @@
@tab-click="handleClick"
style="margin-bottom: 20px"
>
<el-tab-pane label="水闸基本信息" name="basePage" :lazy="true">
<el-tab-pane label="堤防基本信息" name="basePage" :lazy="true">
<basePage ref="basePage" :baseData="baseData" />
</el-tab-pane>
<el-tab-pane
@ -25,7 +25,6 @@
<script>
import basePage from "./basePage.vue";
import projectManagement from "./projectManagement.vue";
import { getSluiceInfo } from "@/api/yg/sluiceInfo";
export default {
components: {
basePage,
@ -54,8 +53,8 @@ export default {
goCompare() {
this.$router.push({
path:
"/sluice/engineeringCondition/sluiceCompare?sluiceCode=" +
this.$refs.basePage.copyForm.sluiceCode,
"/sluice/engineeringCondition/sluiceCompare?embankmentCode=" +
this.$refs.basePage.copyForm.embankmentCode,
});
},
goBack() {
@ -80,8 +79,8 @@ export default {
// console.log("", this.routeList[1].routeName);
this.routeList[1].routeName = tab.label;
// console.log(
// "this.$refs.basePage.copyForm.sluiceCode",
// this.$refs.basePage.copyForm.sluiceCode
// "this.$refs.basePage.copyForm.embankmentCode",
// this.$refs.basePage.copyForm.embankmentCode
// );
},
},

136
src/views/dyke/engineeringCondition/dykeCompare/components/projectManagement.vue

@ -196,95 +196,7 @@
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('')">
<template slot="label"> 闸门操作规程 </template>
<!-- {{ this.form.gateOperatingProcedures }} -->
<div
v-for="(item, index) in JSON.parse(
this.form.gateOperatingProcedures
? this.form.gateOperatingProcedures
: JSON.stringify({})
)"
:key="item + index"
>
<span :class="isDiff('gateOperatingProcedures')">
<i class="el-icon-document"></i>
<span>{{ item.name }}</span>
</span>
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('')">
<template slot="label"> 水闸控制运用计划(方案)批复文件 </template>
<!-- {{ this.form.waterGateControlOperation }} -->
<div
v-for="(item, index) in JSON.parse(
this.form.waterGateControlOperation
? this.form.waterGateControlOperation
: JSON.stringify({})
)"
:key="item + index"
>
<span :class="isDiff('waterGateControlOperation')">
<i class="el-icon-document"></i>
<span>{{ item.name }}</span>
</span>
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('')">
<template slot="label"> 工程竣工验收鉴定书 </template>
<!-- {{ this.form.engineeringCompletionAcceptance }} -->
<div
v-for="(item, index) in JSON.parse(
this.form.engineeringCompletionAcceptance
? this.form.engineeringCompletionAcceptance
: JSON.stringify({})
)"
:key="item + index"
>
<span :class="isDiff('engineeringCompletionAcceptance')">
<i class="el-icon-document"></i>
<span>{{ item.name }}</span>
</span>
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('')">
<template slot="label"> 工程图表 </template>
<!-- {{ this.form.engineeringChart }} -->
<div
v-for="(item, index) in JSON.parse(
this.form.engineeringChart
? this.form.engineeringChart
: JSON.stringify({})
)"
:key="item + index"
>
<span :class="isDiff('engineeringChart')">
<i class="el-icon-document"></i>
<span>{{ item.name }}</span>
</span>
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('')">
<template slot="label"> 工程全景照片 </template>
<template slot="label"> 工程照片 </template>
<!-- {{ this.form.engineeringPanoramicPhotos }} -->
<div
v-for="(item, index) in JSON.parse(
@ -305,33 +217,15 @@
></i>
</div>
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('')">
<template slot="label"> 降等批复文件 </template>
<!-- {{ this.form.approvalDocumentsDowngrade }} -->
<div
v-for="(item, index) in JSON.parse(
this.form.approvalDocumentsDowngrade
? this.form.approvalDocumentsDowngrade
: JSON.stringify({})
)"
:key="item + index"
>
<span :class="isDiff('approvalDocumentsDowngrade')">
<i class="el-icon-document"></i>
<span>{{ item.name }}</span>
</span>
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
<el-descriptions-item :contentClassName="isDiff('monitoringType')">
<template slot="label"> 监控类型 </template>
{{ monitoringTypeFormat(this.form.monitoringType) }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
import { getSluiceCompare } from "@/api/yg/sluiceCompare";
import { getDikeCompare } from "@/api/yg/dikeCompare";
import { getFileStream } from "@/api/system/upload";
export default {
props: ["projectManagementData"],
@ -357,6 +251,8 @@ export default {
managementConfirmationOptions: [],
//
protectionDelimitationOptions: [],
//
monitoringTypeOptions: [],
diffPart: [],
};
},
@ -399,8 +295,11 @@ export default {
this.getDicts("scope_delineation").then((response) => {
this.protectionDelimitationOptions = response.data;
});
this.getDicts("monitoring_type").then((response) => {
this.monitoringTypeOptions = response.data;
});
getSluiceCompare(this.$route.query.sluiceCode).then((res) => {
getDikeCompare(this.$route.query.embankmentCode).then((res) => {
this.sumData = res.data.gcgl;
console.log("this.sumData in projectManagement", this.sumData);
// res.data.jbxx.map((item) => {
@ -511,6 +410,19 @@ export default {
row.protectionDelimitation
);
},
//
monitoringTypeFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
// console.log("XXXXXXXXXXXXXXXXXXXXXX", data);
if (arr) {
arr.forEach((item) => {
res =
res + "+" + this.selectDictLabel(this.monitoringTypeOptions, item);
});
return res.slice(1);
}
},
// ,
downloadFile(info, index) {
console.log(info);

8
src/views/dyke/engineeringCondition/dykeCompare/index.vue

@ -44,7 +44,7 @@
</div>
</template>
<script>
import { getSluiceCompare } from "@/api/yg/sluiceCompare";
import { getDikeCompare } from "@/api/yg/dikeCompare";
import comparePart from "./components/comparePart.vue";
export default {
components: {
@ -58,15 +58,15 @@ export default {
histroy: "",
routeList: [
{
path: "/sluice/engineeringCondition/sluiceBaseInfo",
routeName: "水闸基本信息版本对比",
path: "/dyke/engineeringCondition/dykeBaseInfo",
routeName: "堤防基本信息版本对比",
},
],
};
},
created() {
// console.log("this.$route.query", this.$route.query);
getSluiceCompare(this.$route.query.sluiceCode).then((res) => {
getDikeCompare(this.$route.query.embankmentCode).then((res) => {
console.log(res.data);
this.sumData = res.data;
if (res.data.jbxx.length > 0) {

44
src/views/dyke/engineeringCondition/identificationPlate/components/markForm.vue

@ -57,7 +57,11 @@
<el-col :span="12">
<el-button-group>
<el-button icon="el-icon-plus" @click="addFormFarther"></el-button>
<el-button icon="el-icon-minus" v-if="!isFirst"></el-button>
<el-button
icon="el-icon-minus"
@click="delFormFarther"
v-if="!isFirst"
></el-button>
</el-button-group>
</el-col>
</el-form>
@ -127,8 +131,8 @@ export default {
this.form = this.editItem;
this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
this.form.embankmentName = this.comForm.embankmentName;
this.form.embankmentCode = this.comForm.embankmentCode;
if (this.form.photo) {
this.fileList = JSON.parse(this.form.photo);
}
@ -136,9 +140,9 @@ export default {
this.form = {
id: null,
adcd: null,
sluiceCode: null,
embankmentCode: null,
markName: null,
sluiceName: null,
embankmentName: null,
markLocation: null,
type: null,
markType: null,
@ -154,8 +158,9 @@ export default {
remark: null,
};
this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
// console.log(7777777777, this.comForm);
this.form.embankmentName = this.comForm.embankmentName;
this.form.embankmentCode = this.comForm.embankmentCode;
}
console.log("this.form in components", this.form);
// form
@ -167,22 +172,30 @@ export default {
// console.log("markTypeOptions", this.markTypeOptions);
},
watch: {
"comForm.sluiceName": {
editItem: {
deep: true,
handler(newVal, oldVal) {
//
this.form = newVal;
// console.log("name", newVal);
},
},
"comForm.embankmentName": {
// deep: true, // true
handler(newVal, oldVal) {
// console.log("name", newVal);
// console.log("name", oldVal);
this.form.sluiceName = newVal;
// this.form.sluiceCode = newVal;
this.form.embankmentName = newVal;
// this.form.embankmentCode = newVal;
},
},
"comForm.sluiceCode": {
"comForm.embankmentCode": {
// deep: true, // true
handler(newVal, oldVal) {
// console.log("code", newVal);
// console.log("code", oldVal);
// this.form.sluiceName = newVal;
this.form.sluiceCode = newVal;
// this.form.embankmentName = newVal;
this.form.embankmentCode = newVal;
},
},
// status: function (n, o) {
@ -190,7 +203,7 @@ export default {
// this.form = {
// id: null,
// adcd: null,
// sluiceCode: null,
// embankmentCode: null,
// markName: null,
// suliceName: null,
// markLocation: null,
@ -217,6 +230,9 @@ export default {
addFormFarther() {
this.addForm(this.index, this.type, this.formName);
},
delFormFarther() {
this.$emit("delForm", this.form.id, this.type, this.index);
},
validateForm() {
this.$refs.form.validate((valid) => (this.valid = valid));
},

180
src/views/dyke/engineeringCondition/identificationPlate/index.vue

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<!-- <div class="map">地图</div> -->
<div class="map">地图</div>
<div class="list">
<el-form
:model="queryParams"
@ -77,7 +77,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['yg.sz:sluiceMark:add']"
v-hasPermi="['yg:dikeMark:add']"
>新增</el-button
>
</el-col>
@ -88,7 +88,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['yg.sz:sluiceMark:edit']"
v-hasPermi="['yg:dikeMark:edit']"
>修改</el-button
>
</el-col>
@ -99,7 +99,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['yg.sz:sluiceMark:remove']"
v-hasPermi="['yg:dikeMark:remove']"
>删除</el-button
>
</el-col>
@ -111,7 +111,7 @@
<el-table
v-loading="loading"
:data="sluiceMarkList"
:data="dikeMarkList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" fixed />
@ -130,9 +130,9 @@
min-width="120"
/> -->
<el-table-column
label="水闸名称"
label="堤防名称"
align="center"
prop="sluiceName"
prop="embankmentName"
min-width="120"
/>
<el-table-column
@ -193,7 +193,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['yg.sz:sluiceMark:edit']"
v-hasPermi="['yg:dikeMark:edit']"
>修改</el-button
>
<el-button
@ -201,7 +201,7 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['yg.sz:sluiceMark:remove']"
v-hasPermi="['yg:dikeMark:remove']"
>删除</el-button
>
</template>
@ -234,9 +234,9 @@
label-width="80px"
>
<el-col :span="12">
<el-form-item label="水闸名称" prop="sluiceName">
<el-form-item label="堤防名称" prop="embankmentName">
<el-select
v-model="comForm.sluiceName"
v-model="comForm.embankmentName"
placeholder="请选择水闸名称"
clearable
filterable
@ -244,11 +244,11 @@
style="width: 100%"
>
<el-option
v-for="dict in sluiceNameOptions"
v-for="dict in embankmentNameOptions"
:key="dict.id"
:label="dict.sluiceName"
:value="dict.sluiceName"
@click.native="chooseSluiceName(dict)"
:label="dict.embankmentName"
:value="dict.embankmentName"
@click.native="chooseEmbankmenName(dict)"
/>
</el-select>
</el-form-item>
@ -274,6 +274,7 @@
:index="index"
:type="0"
:comForm="comForm"
@delForm="delForm"
/>
</template>
</div>
@ -296,6 +297,7 @@
:index="index"
:type="1"
:comForm="comForm"
@delForm="delForm"
/>
</template>
<!-- <el-row :gutter="15">
@ -367,6 +369,7 @@
:index="index"
:type="2"
:comForm="comForm"
@delForm="delForm"
/>
</template>
@ -439,6 +442,7 @@
:index="index"
:type="3"
:comForm="comForm"
@delForm="delForm"
/>
</template>
@ -503,19 +507,20 @@
<script>
import {
listSluiceMark,
getSluiceMark,
delSluiceMark,
addSluiceMark,
updateSluiceMark,
exportSluiceMark,
} from "@/api/yg/sluiceMark";
import { listSluiceInfo } from "@/api/yg/sluiceInfo";
listDikeMark,
getDikeMark,
delDikeMark,
delDikeMarkAll,
addDikeMark,
updateDikeMark,
exportDikeMark,
} from "@/api/yg/dikeMark";
import { listDikeInfo } from "@/api/yg/dikeInfo";
import markForm from "./components/markForm.vue";
// import Vue from "vue";
export default {
name: "SluiceMark",
name: "DikeMark",
components: {
markForm,
},
@ -535,7 +540,7 @@ export default {
//
total: 0,
//
sluiceMarkList: [],
dikeMarkList: [],
//
title: "",
//
@ -568,8 +573,8 @@ export default {
//
form: {},
comForm: {
sluiceName: null,
sluiceCode: null,
embankmentName: null,
embankmentCode: null,
},
noticeForm: {},
warnForm: {},
@ -578,21 +583,22 @@ export default {
//
comRule: {
sluiceName: [
{ required: true, message: "请选择水闸名称", trigger: "blur" },
embankmentName: [
{ required: true, message: "请选择堤防名称", trigger: "blur" },
],
},
rules: {
markName: [
{ required: true, message: "请输入标志名称", trigger: "blur" },
// { required: true, message: "", trigger: "blur" },
],
},
sluiceNameOptions: [],
embankmentNameOptions: [],
isEdit: false,
counter0: [{}],
counter1: [{}],
counter2: [{}],
counter3: [{}],
delIdList: [],
};
},
created() {
@ -612,10 +618,10 @@ export default {
this.getDicts("name_identification").then((response) => {
this.markTypeOptions4 = response.data;
});
listSluiceInfo({ data: { recordLoseEfficacyTime: null } }).then(
listDikeInfo({ data: { recordLoseEfficacyTime: null } }).then(
(response) => {
console.log("sluiceNameOptions", response);
this.sluiceNameOptions = response.records;
console.log("embankmentNameOptions", response);
this.embankmentNameOptions = response.records;
}
);
},
@ -644,11 +650,11 @@ export default {
this.$refs[formName + (index + 1)][0].form
);
//
// if (this.comForm.sluiceName) {
// this[counterType][this[counterType].length - 1].sluiceName =
// this.comForm.sluiceName;
// this[counterType][this[counterType].length - 1].sluiceCode =
// this.comForm.sluiceCode;
// if (this.comForm.embankmentName) {
// this[counterType][this[counterType].length - 1].embankmentName =
// this.comForm.embankmentName;
// this[counterType][this[counterType].length - 1].embankmentCode =
// this.comForm.embankmentCode;
// }
//
// this[counterType][this[counterType].length - 1].type = type;
@ -666,11 +672,11 @@ export default {
// this.$refs["noticeForm" + index][0].form;
// console.log(66666, this.counter0);
// //
// if (this.comForm.sluiceName) {
// this.counter0[this.counter0.length - 1].sluiceName =
// this.comForm.sluiceName;
// this.counter0[this.counter0.length - 1].sluiceCode =
// this.comForm.sluiceCode;
// if (this.comForm.embankmentName) {
// this.counter0[this.counter0.length - 1].embankmentName =
// this.comForm.embankmentName;
// this.counter0[this.counter0.length - 1].embankmentCode =
// this.comForm.embankmentCode;
// }
// //
// this.counter0[this.counter0.length - 1].type = "0";
@ -699,33 +705,33 @@ export default {
// // this.$refs[ele].insertAdjacentHTML("beforeend", child); //
// this.$refs[ele].appendChild(child.$el); //
},
chooseSluiceName(data) {
// sluiceCode
this.comForm.sluiceCode = data.sluiceCode;
chooseEmbankmenName(data) {
// embankmentCode
this.comForm.embankmentCode = data.embankmentCode;
// console.log(33333, this.comForm);
// //
// this.$refs["noticeForm0"][0].form.sluiceName = data.sluiceName;
// this.$refs["noticeForm0"][0].form.sluiceCode = data.sluiceCode;
// this.$refs["noticeForm0"][0].form.embankmentName = data.embankmentName;
// this.$refs["noticeForm0"][0].form.embankmentCode = data.embankmentCode;
// // this.$refs["noticeForm0"][0].form.type = "0";
// this.counter0.forEach((item) => {
// item.sluiceName = data.sluiceName;
// item.sluiceCode = data.sluiceCode;
// item.embankmentName = data.embankmentName;
// item.embankmentCode = data.embankmentCode;
// });
// // this.noticeForm.sluiceName = data.sluiceName;
// this.warnForm.sluiceName = data.sluiceName;
// this.nameForm.sluiceName = data.sluiceName;
// this.guideForm.sluiceName = data.sluiceName;
// // this.noticeForm.embankmentName = data.embankmentName;
// this.warnForm.embankmentName = data.embankmentName;
// this.nameForm.embankmentName = data.embankmentName;
// this.guideForm.embankmentName = data.embankmentName;
// // this.noticeForm.sluiceCode = data.sluiceCode;
// this.warnForm.sluiceCode = data.sluiceCode;
// this.nameForm.sluiceCode = data.sluiceCode;
// this.guideForm.sluiceCode = data.sluiceCode;
// // this.noticeForm.embankmentCode = data.embankmentCode;
// this.warnForm.embankmentCode = data.embankmentCode;
// this.nameForm.embankmentCode = data.embankmentCode;
// this.guideForm.embankmentCode = data.embankmentCode;
},
/** 查询水闸标识标牌列表 */
getList() {
this.loading = true;
listSluiceMark(this.queryParams).then((response) => {
this.sluiceMarkList = response.records;
listDikeMark(this.queryParams).then((response) => {
this.dikeMarkList = response.records;
this.total = response.total;
this.loading = false;
});
@ -745,20 +751,21 @@ export default {
},
//
reset() {
this.delIdList = [];
this.counter0 = [{}];
this.counter1 = [{}];
this.counter2 = [{}];
this.counter3 = [{}];
this.comForm = {
sluiceName: null,
sluiceCode: null,
embankmentName: null,
embankmentCode: null,
};
this.noticeForm = {
id: null,
adcd: null,
sluiceCode: null,
embankmentCode: null,
markName: null,
sluiceName: null,
embankmentName: null,
markLocation: null,
type: "0",
markType: null,
@ -776,9 +783,9 @@ export default {
this.warnForm = {
id: null,
adcd: null,
sluiceCode: null,
embankmentCode: null,
markName: null,
sluiceName: null,
embankmentName: null,
markLocation: null,
type: "1",
markType: null,
@ -796,9 +803,9 @@ export default {
this.guideForm = {
id: null,
adcd: null,
sluiceCode: null,
embankmentCode: null,
markName: null,
sluiceName: null,
embankmentName: null,
markLocation: null,
type: "2",
markType: null,
@ -816,9 +823,9 @@ export default {
this.nameForm = {
id: null,
adcd: null,
sluiceCode: null,
embankmentCode: null,
markName: null,
sluiceName: null,
embankmentName: null,
markLocation: null,
type: "3",
markType: null,
@ -877,7 +884,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.ids = selection.map((item) => item.embankmentCode);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -886,18 +893,18 @@ export default {
this.reset();
this.isEdit = false;
this.open = true;
this.title = "添加水闸标识标牌";
this.title = "添加堤防标识标牌";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.isEdit = true;
const sluiceCode = row.sluiceCode;
getSluiceMark(sluiceCode).then((response) => {
const embankmentCode = row.embankmentCode;
getDikeMark(embankmentCode).then((response) => {
// this.form = response.data;
console.log("回显的数据", response);
this.comForm.sluiceName = response.data[0].sluiceName;
this.comForm.sluiceCode = response.data[0].sluiceCode;
this.comForm.embankmentName = response.data[0].embankmentName;
this.comForm.embankmentCode = response.data[0].embankmentCode;
console.log("this.comForm", this.comForm);
this.counter0 = response.data.filter((item) => item.type == 0);
this.counter1 = response.data.filter((item) => item.type == 1);
@ -908,7 +915,7 @@ export default {
console.log("回显的数据时的counter2", this.counter2);
console.log("回显的数据时的counter3", this.counter3);
this.open = true;
this.title = "修改水闸标识标牌";
this.title = "修改堤防标识标牌";
});
},
/** 提交按钮 */
@ -972,7 +979,7 @@ export default {
// console.log("C0C0", C0, C1);
if (this.isEdit) {
updateSluiceMark([
updateDikeMark([
...C0,
...C1,
...C2,
@ -988,8 +995,9 @@ export default {
this.getList();
}
});
if (this.delIdList.length > 0) delDikeMark(this.delIdList);
} else {
addSluiceMark([
addDikeMark([
...C0,
...C1,
...C2,
@ -1015,7 +1023,7 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
const ids = row.embankmentCode || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
@ -1023,7 +1031,7 @@ export default {
type: "warning",
})
.then(function () {
return delSluiceMark(ids);
return delDikeMarkAll(ids);
})
.then(() => {
this.getList();
@ -1034,6 +1042,14 @@ export default {
this.$message.warning("请选择要删除的数据!!");
}
},
//
delForm(itemId, type, index) {
console.log(111, itemId, type, index);
this["counter" + type].splice(index, 1);
// console.log("counter" + type, this["counter" + type]);
if (itemId) this.delIdList.push(itemId);
console.log(222, this.delIdList);
},
},
};
</script>

12
src/views/sluice/engineeringCondition/identificationPlate/components/markForm.vue

@ -15,6 +15,7 @@
<el-form-item label="标识类型" prop="markType">
<el-select
v-model="form.markType"
clearable
placeholder="请选择标识类型"
style="width: 100%"
>
@ -133,6 +134,7 @@ export default {
this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
this.form.adcd = this.comForm.adcd;
if (this.form.photo) {
this.fileList = JSON.parse(this.form.photo);
}
@ -160,6 +162,7 @@ export default {
this.form.type = this.type;
this.form.sluiceName = this.comForm.sluiceName;
this.form.sluiceCode = this.comForm.sluiceCode;
this.form.adcd = this.comForm.adcd;
}
// console.log("this.form in components", this.form);
// form
@ -197,6 +200,15 @@ export default {
this.form.sluiceCode = newVal;
},
},
"comForm.adcd": {
// deep: true, // true
handler(newVal, oldVal) {
// console.log("code", newVal);
// console.log("code", oldVal);
// this.form.sluiceName = newVal;
this.form.adcd = newVal;
},
},
// status: function (n, o) {
// if (!n) {
// this.form = {

116
src/views/sluice/engineeringCondition/identificationPlate/index.vue

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<!-- <div class="map">地图</div> -->
<div class="map">地图</div>
<div class="list">
<el-form
:model="queryParams"
@ -32,6 +32,7 @@
placeholder="请选择标牌类型"
clearable
size="small"
@change="handleQuery"
>
<el-option
v-for="dict in typeOptions"
@ -41,6 +42,18 @@
/>
</el-select>
</el-form-item>
<el-form-item label="行政区划" prop="adcd">
<el-cascader
:options="areasOptions"
v-model="queryParams.data.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
@change="handleQuery"
>
</el-cascader>
</el-form-item>
<!-- <el-form-item label="标识类型" prop="markType">
<el-select
v-model="queryParams.data.markType"
@ -139,6 +152,7 @@
label="行政区划"
align="center"
prop="adcd"
:formatter="formatAdcd"
min-width="120"
/>
<el-table-column
@ -517,6 +531,9 @@ import {
} from "@/api/yg/sluiceMark";
import { listSluiceInfo } from "@/api/yg/sluiceInfo";
import markForm from "./components/markForm.vue";
import { getAreasData } from "@/api/areas/index";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
// import Vue from "vue";
export default {
@ -526,6 +543,11 @@ export default {
},
data() {
return {
areasOptionProps: {
emitPath: false,
checkStrictly: true, //
},
areasOptions: [],
isFirst: true,
//
loading: true,
@ -575,6 +597,7 @@ export default {
comForm: {
sluiceName: null,
sluiceCode: null,
adcd: null,
},
noticeForm: {},
warnForm: {},
@ -589,7 +612,7 @@ export default {
},
rules: {
markName: [
{ required: true, message: "请输入标志名称", trigger: "blur" },
// { required: true, message: "", trigger: "change" },
],
},
sluiceNameOptions: [],
@ -603,6 +626,7 @@ export default {
},
created() {
this.getList();
this.getTreeData();
this.getDicts("breastplate_type").then((response) => {
this.typeOptions = response.data;
});
@ -629,6 +653,51 @@ export default {
// this.counter1[0] = this.noticeForm;
// },
methods: {
formatAdcd(row) {
if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2);
let cityCode = row.adcd.slice(2, 4);
let areaCode = row.adcd.slice(4, 6);
if (areaCode != "00") {
return (
codeToText[provinceCode] +
"-" +
codeToText[provinceCode + cityCode] +
"-" +
codeToText[provinceCode + cityCode + areaCode]
);
} else if (cityCode != "00") {
return (
codeToText[provinceCode] + "-" + codeToText[provinceCode + cityCode]
);
} else {
return codeToText[provinceCode];
}
}
},
getTreeData() {
getAreasData().then((items) => {
// console.log("getAreasData", items.data);
let res = [];
let getChildren = (res, pid) => {
for (const i of items.data) {
if (i.parentid === pid) {
const newItem = {
label: i.name,
value: i.id,
};
if (i.layer != 3) newItem.children = [];
res.push(newItem);
getChildren(newItem.children, newItem.value);
}
}
};
getChildren(res, items.data[0].parentid);
console.log(66666666666, res);
this.areasOptions = res;
// return res;
});
},
addForm(index, type, formName) {
console.log("index和type", index, type);
const counterType = "counter" + type;
@ -708,6 +777,7 @@ export default {
chooseSluiceName(data) {
// sluiceCode
this.comForm.sluiceCode = data.sluiceCode;
this.comForm.adcd = data.adcd;
// console.log(33333, this.comForm);
// //
// this.$refs["noticeForm0"][0].form.sluiceName = data.sluiceName;
@ -759,6 +829,7 @@ export default {
this.comForm = {
sluiceName: null,
sluiceCode: null,
adcd: null,
};
this.noticeForm = {
id: null,
@ -905,11 +976,16 @@ export default {
console.log("回显的数据", response);
this.comForm.sluiceName = response.data[0].sluiceName;
this.comForm.sluiceCode = response.data[0].sluiceCode;
this.comForm.adcd = response.data[0].adcd;
console.log("this.comForm", this.comForm);
this.counter0 = response.data.filter((item) => item.type == 0);
if (this.counter0.length == 0) this.counter0 = [{}];
this.counter1 = response.data.filter((item) => item.type == 1);
if (this.counter1.length == 0) this.counter1 = [{}];
this.counter2 = response.data.filter((item) => item.type == 2);
if (this.counter2.length == 0) this.counter2 = [{}];
this.counter3 = response.data.filter((item) => item.type == 3);
if (this.counter3.length == 0) this.counter3 = [{}];
console.log("回显的数据时的counter0", this.counter0);
console.log("回显的数据时的counter1", this.counter1);
console.log("回显的数据时的counter2", this.counter2);
@ -922,34 +998,40 @@ export default {
submitForm() {
// console.log(1111111111, this.$refs.noticeForm0[0].$refs.form);
//
let isAllTrue = true;
// let isAllTrue = true;
let isAllTrue = false;
this.counter0.forEach((item, index) => {
// console.log(111111, item["markName"]);
// for (sub of Object.values(item)) {
// console.log(sub);
// }
this.counter0[index].photo = JSON.stringify(
this.$refs["noticeForm" + index][0].fileList
);
this.$refs["noticeForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["noticeForm" + index][0].valid;
// isAllTrue = isAllTrue && this.$refs["noticeForm" + index][0].valid;
isAllTrue = isAllTrue || this.$refs["noticeForm" + index][0].valid;
});
this.counter1.forEach((item, index) => {
this.counter1[index].photo = JSON.stringify(
this.$refs["warnForm" + index][0].fileList
);
this.$refs["warnForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["warnForm" + index][0].valid;
isAllTrue = isAllTrue || this.$refs["warnForm" + index][0].valid;
});
this.counter2.forEach((item, index) => {
this.counter2[index].photo = JSON.stringify(
this.$refs["guideForm" + index][0].fileList
);
this.$refs["guideForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["guideForm" + index][0].valid;
isAllTrue = isAllTrue || this.$refs["guideForm" + index][0].valid;
});
this.counter3.forEach((item, index) => {
this.counter3[index].photo = JSON.stringify(
this.$refs["nameForm" + index][0].fileList
);
this.$refs["nameForm" + index][0].validateForm();
isAllTrue = isAllTrue && this.$refs["nameForm" + index][0].valid;
isAllTrue = isAllTrue || this.$refs["nameForm" + index][0].valid;
});
console.log("全部表单是否通过校验", isAllTrue);
this.$refs["comForm"].validate((valid0) => {
@ -963,21 +1045,29 @@ export default {
const C0 =
this.counter0.length > 1
? this.counter0
: [this.$refs["noticeForm0"][0].form];
: this.$refs["noticeForm0"][0].form.markName
? [this.$refs["noticeForm0"][0].form]
: [];
const C1 =
this.counter1.length > 1
? this.counter1
: [this.$refs["warnForm0"][0].form];
: this.$refs["warnForm0"][0].form.markName
? [this.$refs["warnForm0"][0].form]
: [];
const C2 =
this.counter2.length > 1
? this.counter2
: [this.$refs["guideForm0"][0].form];
: this.$refs["guideForm0"][0].form.markName
? [this.$refs["guideForm0"][0].form]
: [];
const C3 =
this.counter3.length > 1
? this.counter3
: [this.$refs["nameForm0"][0].form];
: this.$refs["nameForm0"][0].form.markName
? [this.$refs["nameForm0"][0].form]
: [];
// console.log("C0C0", C0, C1);
// // console.log("C0C0", C0, C1);
if (this.isEdit) {
updateSluiceMark([
...C0,
@ -1048,7 +1138,7 @@ export default {
console.log(111, itemId, type, index);
this["counter" + type].splice(index, 1);
// console.log("counter" + type, this["counter" + type]);
this.delIdList.push(itemId);
if (itemId) this.delIdList.push(itemId);
console.log(222, this.delIdList);
},
},

107
src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue

@ -34,14 +34,16 @@
</el-input>
</el-form-item>
<el-form-item label="行政区划" prop="adcd">
<el-select
<el-cascader
:options="areasOptions"
v-model="queryParams.data.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
@change="handleQuery"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-cascader>
</el-form-item>
<el-form-item label="水闸类型" prop="sluiceType">
<el-select
@ -136,6 +138,7 @@
label="行政区划"
align="center"
prop="adcd"
:formatter="formatAdcd"
min-width="120"
/>
<el-table-column
@ -442,13 +445,17 @@
</el-col>
<el-col :span="8">
<el-form-item label="行政区划" prop="adcd">
<el-select
<el-cascader
:options="areasOptions"
v-model="form.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleChange"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="8">
@ -899,11 +906,18 @@ import {
updateSluiceInfo,
exportSluiceInfo,
} from "@/api/yg/sluiceInfo";
import { getAreasData } from "@/api/areas/index";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
export default {
name: "SluiceInfo",
data() {
return {
areasOptionProps: {
emitPath: false,
checkStrictly: true, //
},
areasOptions: [],
//
loading: true,
//
@ -1017,6 +1031,9 @@ export default {
form: {},
//
rules: {
sluiceName: [
{ required: true, message: "请输入水闸名称", trigger: "blur" },
],
sluiceCode: [
{ required: true, message: "请输入水闸编码", trigger: "blur" },
],
@ -1031,6 +1048,7 @@ export default {
};
},
created() {
this.getTreeData();
this.getList();
this.getDicts("location").then((response) => {
this.locationOptions = response.data;
@ -1082,6 +1100,83 @@ export default {
});
},
methods: {
formatAdcd(row) {
if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2);
let cityCode = row.adcd.slice(2, 4);
let areaCode = row.adcd.slice(4, 6);
if (areaCode != "00") {
return (
codeToText[provinceCode] +
"-" +
codeToText[provinceCode + cityCode] +
"-" +
codeToText[provinceCode + cityCode + areaCode]
);
} else if (cityCode != "00") {
return (
codeToText[provinceCode] + "-" + codeToText[provinceCode + cityCode]
);
} else {
return codeToText[provinceCode];
}
}
},
// label list id
getParentsByValue(list, value) {
for (let i in list) {
if (list[i].value == value) {
//list[i].valuevalue
//value
return [list[i].value];
}
if (list[i].children) {
let node = this.getParentsByValue(list[i].children, value);
if (node !== undefined) {
//
node.unshift(list[i].value);
console.log("node", node);
return node;
}
}
}
},
getTreeData() {
getAreasData().then((items) => {
// console.log("getAreasData", items.data);
let res = [];
let getChildren = (res, pid) => {
for (const i of items.data) {
if (i.parentid === pid) {
const newItem = {
label: i.name,
value: i.id,
};
if (i.layer != 3) newItem.children = [];
res.push(newItem);
getChildren(newItem.children, newItem.value);
}
}
};
getChildren(res, items.data[0].parentid);
console.log(66666666666, res);
this.areasOptions = res;
// return res;
});
},
handleChange(value) {
//valuecode
if (value) {
console.log("value", value);
var provinceCode = codeToText[value[0]]; //code
var cityCode = codeToText[value[1]]; //
var orgion = codeToText[value[2]]; //
console.log(44444444, provinceCode, cityCode, orgion);
// this.baseMsg.adcd = value[value.length - 1];
console.log("this.form.adcd", this.form.adcd);
}
},
/** 查询水闸工程基础信息列表 */
getList() {
this.loading = true;

53
src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue

@ -15,13 +15,17 @@
</el-col>
<el-col :span="8">
<el-form-item label="行政区划" prop="adcd">
<el-select
<el-cascader
:options="areasOptions"
v-model="form.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleChange"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="8">
@ -461,11 +465,18 @@ import {
updateSluiceInfo,
exportSluiceInfo,
} from "@/api/yg/sluiceInfo";
import { getAreasData } from "@/api/areas/index";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
export default {
name: "sluiceInfo",
data() {
return {
areasOptionProps: {
emitPath: false,
checkStrictly: true, //
},
areasOptions: [],
//
loading: true,
//
@ -579,6 +590,7 @@ export default {
},
created() {
this.reset();
this.getTreeData();
this.getList();
this.getDicts("location").then((response) => {
this.locationOptions = response.data;
@ -630,6 +642,41 @@ export default {
});
},
methods: {
getTreeData() {
getAreasData().then((items) => {
// console.log("getAreasData", items.data);
let res = [];
let getChildren = (res, pid) => {
for (const i of items.data) {
if (i.parentid === pid) {
const newItem = {
label: i.name,
value: i.id,
};
if (i.layer != 3) newItem.children = [];
res.push(newItem);
getChildren(newItem.children, newItem.value);
}
}
};
getChildren(res, items.data[0].parentid);
console.log(66666666666, res);
this.areasOptions = res;
// return res;
});
},
handleChange(value) {
//valuecode
if (value) {
console.log("value", value);
var provinceCode = codeToText[value[0]]; //code
var cityCode = codeToText[value[1]]; //
var orgion = codeToText[value[2]]; //
console.log(44444444, provinceCode, cityCode, orgion);
// this.baseMsg.adcd = value[value.length - 1];
console.log("this.form.adcd", this.form.adcd);
}
},
/** 查询水闸工程基础信息列表 */
getList() {
const id = this.$route.query.baseDataId;

26
src/views/sluice/engineeringCondition/sluiceCompare/components/basePage.vue

@ -35,7 +35,7 @@
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('adcd')">
<template slot="label"> 行政区划 </template>
{{ this.form.adcd }}
{{ formatAdcd(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('sluiceCode')">
<template slot="label"> 水闸编码 </template>
@ -186,6 +186,8 @@
</template>
<script>
import { getSluiceCompare } from "@/api/yg/sluiceCompare";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
export default {
props: ["baseData"],
inject: ["getDiff", "granParentEle"],
@ -335,6 +337,28 @@ export default {
},
},
methods: {
formatAdcd(row) {
if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2);
let cityCode = row.adcd.slice(2, 4);
let areaCode = row.adcd.slice(4, 6);
if (areaCode != "00") {
return (
codeToText[provinceCode] +
"-" +
codeToText[provinceCode + cityCode] +
"-" +
codeToText[provinceCode + cityCode + areaCode]
);
} else if (cityCode != "00") {
return (
codeToText[provinceCode] + "-" + codeToText[provinceCode + cityCode]
);
} else {
return codeToText[provinceCode];
}
}
},
isDiff(name) {
return this.diffPart.some((item) => item === name) ? "diffEle" : "";
},

Loading…
Cancel
Save