Browse Source

工程状况板块修改及单点登录

master_tdsql
xzt 1 year ago
parent
commit
fd27d36212
  1. 26
      src/router/index.js
  2. 349
      src/views/dike/engineeringCondition/dikeCompare/components/bainBenefitIndex.vue
  3. 443
      src/views/dike/engineeringCondition/dikeCompare/components/basePage.vue
  4. 308
      src/views/dike/engineeringCondition/dikeCompare/components/dikeCrossSection.vue
  5. 432
      src/views/dike/engineeringCondition/dikeCompare/components/dikeCrossSectionTrait.vue
  6. 318
      src/views/dike/engineeringCondition/dikeCompare/components/historyOverflowsRecords.vue
  7. 437
      src/views/dike/engineeringCondition/dikeCompare/components/hydrologicalCharacteristics.vue
  8. 72
      src/views/dike/engineeringCondition/dikeCompare/index.vue
  9. 24
      src/views/singleLogin.vue

26
src/router/index.js

@ -1,5 +1,6 @@
import Vue from 'vue'
import Router from 'vue-router'
import { setToken,removeToken } from "@/utils/auth";
Vue.use(Router)
@ -42,6 +43,11 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/loginbg'], resolve),
hidden: true
},
{
path: '/singleLogin',
component: (resolve) => require(['@/views/singleLogin'], resolve),
hidden: true
},
{
path: '/tttt',
component: (resolve) => require(['@/views/system/testD3/index'], resolve),
@ -146,8 +152,28 @@ const createRouter = () => new Router({
routes: constantRoutes
})
const router = createRouter()
// 注册一个全局前置守卫
router.beforeEach((to, from, next) => {
if (to.path === "/singleLogin") {
console.log("单点登录设置token", to.query.token); //判断当前路由是否需要进行权限控制
if (to.query.token) {
setToken(to.query.token);
if (to.query.page === 'null') {
next("/welcome")
} else if (to.query.page) {
next(to.query.page)
} else {
next("/welcome")
}
}
} else {
next() // 放行
}
})
// 重置路由
export const resetRouter = () => {

349
src/views/dike/engineeringCondition/dikeCompare/components/bainBenefitIndex.vue

@ -1,5 +1,20 @@
<template>
<div class="app-container">
<div>
<el-select
v-model="histroy"
placeholder="请选择版本"
style="margin-bottom: 10px; width: 250px"
>
<el-option
v-for="(sub, index) in sumData"
:key="sub.id"
:label="
sub.exprDate ? '版本' + index + ' - ' + sub.exprDate : '当前版本'
"
:value="sub.id"
@click.native="chooseEdition(sub)"
></el-option>
</el-select>
<el-descriptions
class="margin-top"
:column="2"
@ -11,52 +26,52 @@
}"
:contentStyle="{ minWidth: '250px' }"
>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prArea')">
<template slot="label"> 保护面积 </template>
{{ this.form.prArea }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prinArea')">
<template slot="label"> 保护耕地面积 </template>
{{ this.form.prinArea }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prvlNum')">
<template slot="label"> 保护村数 </template>
{{ this.form.prvlNum }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prfxasNum')">
<template slot="label"> 保护固定资产 </template>
{{ this.form.prfxasNum }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('ptPp')">
<template slot="label"> 保护人口 </template>
{{ this.form.ptPp }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prhuNum')">
<template slot="label"> 保护房屋 </template>
{{ this.form.prhuNum }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prfcMn')">
<template slot="label"> 保护工矿 </template>
{{ this.form.prfcMn }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prCt')">
<template slot="label"> 保护城镇 </template>
{{ this.form.prCt }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prRl')">
<template slot="label"> 保护铁路 </template>
{{ this.form.prRl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prHg')">
<template slot="label"> 保护公路 </template>
{{ this.form.prHg }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('prsTes')">
<template slot="label"> 保护重点设施 </template>
{{ this.form.prsTes }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('note')">
<template slot="label"> 备注 </template>
{{ this.form.note }}
</el-descriptions-item>
@ -70,270 +85,72 @@
</template>
<script>
import {
listGcxy,
getGcxy,
delGcxy,
addGcxy,
updateGcxy,
exportGcxy,
} from "@/api/yg/dike/gcxy";
import { getDikeCompare } from "@/api/yg/dikeCompare";
export default {
name: "Gcxy",
props: ["dikeCode"],
props: ["bainBenefitIndexData"],
inject: ["getDiff", "granParentEle"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
gcxyList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
createUid: null,
updateUid: null,
proCode: null,
proNo: null,
owerDept: null,
relation: null,
dikeCode: null,
prArea: null,
prinArea: null,
prvlNum: null,
prfxasNum: null,
ptPp: null,
prhuNum: null,
prfcMn: null,
prCt: null,
prRl: null,
prHg: null,
prsTes: null,
note: null,
effDate: null,
exprDate: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
histroy: "当前版本",
sumData: [],
//
form: {},
//
rules: {},
diffPart: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询工程效益列表 */
getList() {
this.queryParams.data.dikeCode = this.dikeCode;
listGcxy(this.queryParams).then((response) => {
if (response.records[0]) {
this.form = response.records[0];
}
});
},
//
cancel() {
// this.reset();
this.$router.back();
},
//
reset() {
this.form = {
id: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
proCode: null,
proNo: null,
owerDept: null,
remark: null,
relation: null,
dikeCode: null,
prArea: null,
prinArea: null,
prvlNum: null,
prfxasNum: null,
ptPp: null,
prhuNum: null,
prfcMn: null,
prCt: null,
prRl: null,
prHg: null,
prsTes: null,
note: null,
effDate: null,
exprDate: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
proCode: null,
proNo: null,
owerDept: null,
remark: null,
relation: null,
dikeCode: null,
prArea: null,
prinArea: null,
prvlNum: null,
prfxasNum: null,
ptPp: null,
prhuNum: null,
prfcMn: null,
prCt: null,
prRl: null,
prHg: null,
prsTes: null,
note: null,
effDate: null,
exprDate: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工程效益";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getGcxy(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改工程效益";
if (this.bainBenefitIndexData && this.bainBenefitIndexData.id) {
console.log(
"this.bainBenefitIndexData in bainBenefitIndex",
this.bainBenefitIndexData
);
this.form = this.bainBenefitIndexData;
console.log("this.form", this.form);
this.histroy = this.form.id;
this.$nextTick(() => {
this.diffPart = this.getDiff("bainBenefitIndex");
console.log("this.diffPart in bainBenefitIndex", this.diffPart);
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateGcxy(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.dikeCode = this.dikeCode;
addGcxy(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
getDikeCompare(this.$route.query.dikeCode).then((res) => {
this.sumData = res.data.gcxy;
console.log("this.sumData in bainBenefitIndex", this.sumData);
// res.data.jbxx.map((item) => {
// if (!item.exprDate) this.baseData = item;
// });
// res.data.gcgl.map((item) => {
// if (!item.exprDate) this.bainBenefitIndexData = item;
// });
});
},
watch: {
histroy: function (n, o) {
// this.$nextTick(() => {
// this.diffPart = this.getDiff();
// });
setTimeout(() => {
// this.diffPart = this.getDiff();
const childrenEles = Object.keys(this.granParentEle);
for (let index = 0; index < childrenEles.length; index++) {
// console.log(33333333, childrenEles[index]);
this.granParentEle[
childrenEles[index]
].$refs.bainBenefitIndex.diffPart =
this.granParentEle[
childrenEles[index]
].$refs.bainBenefitIndex.getDiff("bainBenefitIndex");
}
});
}, 10);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delGcxy(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
methods: {
isDiff(name) {
return this.diffPart.some((item) => item === name) ? "diffEle" : "";
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if (this.ids) {
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportGcxy(queryParams);
})
.then((response) => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
})
.catch(function () {});
chooseEdition(data) {
this.form = data;
},
},
};
@ -346,3 +163,9 @@ export default {
z-index: 1;
}
</style>
<style lang="scss">
.diffEle {
color: #f13939;
// background: skyblue;
}
</style>

443
src/views/dike/engineeringCondition/dikeCompare/components/basePage.vue

@ -31,159 +31,225 @@
<template slot="label"> 堤防名称 </template>
{{ this.form.dikeName }}
</el-descriptions-item>
<!-- <el-descriptions-item :contentClassName="isDiff('adcd')">
<template slot="label"> 行政区划 </template>
{{ formatAdcd(this.form) }}
</el-descriptions-item> -->
<el-descriptions-item :contentClassName="isDiff('dikeCode')">
<template slot="label"> 堤防 </template>
<template slot="label"> 堤防代码 </template>
{{ this.form.dikeCode }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('plotEmbankments')">
<template slot="label"> 标绘堤防 </template>
{{ this.form.plotEmbankments }}
<el-descriptions-item :contentClassName="isDiff('adcd')">
<template slot="label"> 行政区划 </template>
{{ $formatAdcd(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('adcdStart')">
<template slot="label"> 起点行政区划 </template>
{{ formatAdcd(this.form.adcdStart) }}
<el-descriptions-item :contentClassName="isDiff('securityCategory')">
<template slot="label"> 安全类别 </template>
{{ securityCategoryFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('adcdEnd')">
<template slot="label"> 终点行政区划 </template>
{{ formatAdcd(this.form.adcdEnd) }}
<el-descriptions-item :contentClassName="isDiff('dikePatt')">
<template slot="label"> 堤防型式 </template>
{{ dikePattFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeStartNum')">
<template slot="label"> 起点桩号 </template>
{{ this.form.dikeStartNum }}
<el-descriptions-item :contentClassName="isDiff('dikeStartLong')">
<template slot="label"> 起点经度 </template>
{{ this.form.dikeStartLong }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeEndNum')">
<template slot="label"> 终点桩号 </template>
{{ this.form.dikeEndNum }}
<el-descriptions-item :contentClassName="isDiff('dikeStartLat')">
<template slot="label"> 起点纬度 </template>
{{ this.form.dikeStartLat }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeEndLong')">
<template slot="label"> 终点经度 </template>
{{ this.form.dikeEndLong }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeEndLat')">
<template slot="label"> 终点纬度 </template>
{{ this.form.dikeEndLat }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeLoc')">
<template slot="label"> 堤防所在位置 </template>
{{ this.form.dikeLoc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeType')">
<template slot="label"> 堤防类型 </template>
{{ endStationNumberFormat(this.form) }}
{{ dikeTypeFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('riverLocation')">
<template slot="label"> 所在河流 </template>
{{ this.form.riverLocation }}
<el-descriptions-item :contentClassName="isDiff('dikeUse')">
<template slot="label"> 堤防用途 </template>
{{ this.form.dikeUse }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('riversideClassification')"
>
<template slot="label"> 河流岸别 </template>
{{ riversideClassificationFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('lakeName')">
<template slot="label"> 所在湖泊名称 </template>
{{ this.form.lakeName }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('coastlineName')">
<template slot="label"> 所在海岸名称 </template>
{{ this.form.coastlineName }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('isFloodStorageDetention')"
>
<template slot="label"> 是否为蓄滞洪区堤防 </template>
{{ isFloodStorageDetentionFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('storageDetentionAreaName')"
>
<template slot="label"> 所在蓄滞洪区名称 </template>
{{ this.form.storageDetentionAreaName }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('areaStartingStationNumber')"
>
<template slot="label"> 堤防蓄滞洪区段起点桩号 </template>
{{ this.form.areaStartingStationNumber }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('areaEndStationNumber')">
<template slot="label"> 堤防蓄滞洪区段终点桩号 </template>
{{ this.form.areaEndStationNumber }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('totalLengthFloodStorage')"
>
<template slot="label"> 堤防蓄滞洪区段总长度(m) </template>
{{ this.form.totalLengthFloodStorage }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('floodStorageDetentionAreasExplanation')"
>
<template slot="label"> 蓄滞洪区特殊情况说明 </template>
{{ this.form.floodStorageDetentionAreasExplanation }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('crossBorderSituation')">
<template slot="label"> 堤防跨界情况 </template>
{{ crossBorderSituationFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('engGrad')">
<template slot="label"> 堤防级别 </template>
{{ engGradFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('mainBuildGrad')">
<template slot="label"> 主要建筑物级别 </template>
{{ mainBuildGradFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('desLockDisc')">
<template slot="label"> 最大过闸流量 </template>
{{ this.form.desLockDisc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('gaorNum')">
<template slot="label"> 闸孔数量 </template>
{{ this.form.gaorNum }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('gaorTotNetWid')">
<template slot="label"> 闸孔总净宽 </template>
{{ this.form.gaorTotNetWid }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('engStat')">
<template slot="label"> 工程建设情况 </template>
{{ this.form.engStat }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikePatt')">
<template slot="label"> 堤防型式 </template>
{{ embankmentTyperFormat(this.form.dikePatt) }}
<el-descriptions-item :contentClassName="isDiff('startDate')">
<template slot="label"> 开工时间 </template>
{{ this.form.startDate }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('compDate')">
<template slot="label"> 建成时间 </template>
{{ this.form.compDate }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('recentComplianceReinforcementStatus')"
>
<template slot="label"> 最近达标加固完工状态 </template>
{{ recentComplianceReinforcementStatusFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('admDep')">
<template slot="label"> 归口管理部门 </template>
{{ this.form.admDep }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('recentComplianceReinforcementTime')"
>
<template slot="label"> 最近达标加固完成时间 </template>
{{ this.form.recentComplianceReinforcementTime }}
<el-descriptions-item :contentClassName="isDiff('isGateProject')">
<template slot="label"> 是否为套闸工程 </template>
{{ isGateProjectFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('engTask')">
<template slot="label"> 工程任务 </template>
{{ engineeringTasksFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('observationProject')">
<template slot="label"> 观测项目 </template>
{{ this.form.observationProject }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeGrad')">
<template slot="label"> 堤防级别 </template>
{{ embankmentLevelFormat(this.form) }}
<el-descriptions-item :contentClassName="isDiff('levelDatum')">
<template slot="label"> 水准基面 </template>
{{ this.form.levelDatum }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('sluiceOverview')">
<template slot="label"> 堤防概况 </template>
{{ this.form.sluiceOverview }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('designFloodControl')">
<template slot="label"> 设计防洪 </template>
{{ this.form.designFloodControl }}
<el-descriptions-item :contentClassName="isDiff('sluiceOverview')">
<template slot="label"> 堤防概况 </template>
{{ this.form.sluiceOverview }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('startLoc')">
<template slot="label"> 起点所在位置 </template>
{{ this.form.startLoc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('endLoc')">
<template slot="label"> 终点所在位置 </template>
{{ this.form.endLoc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeLen')">
<template slot="label"> 堤防长度(m) </template>
<template slot="label"> 堤防长度 </template>
{{ this.form.dikeLen }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('planningFloodControl')">
<template slot="label"> 规划防洪 </template>
{{ this.form.planningFloodControl }}
<el-descriptions-item :contentClassName="isDiff('dikeStartNum')">
<template slot="label"> 堤防起点桩号 </template>
{{ this.form.dikeStartNum }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeEndNum')">
<template slot="label"> 堤防终点桩号 </template>
{{ this.form.dikeEndNum }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('engTask')">
<template slot="label"> 工程任务 </template>
{{ engTaskFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeRiver')">
<template slot="label"> 所在河流 </template>
{{ this.form.dikeRiver }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeRvbk')">
<template slot="label"> 河流岸别 </template>
{{ this.form.dikeRvbk }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikePlnStda')">
<template slot="label"> 规划防洪潮标准 </template>
{{ this.form.dikePlnStda }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('embankmentLengthPlanningStandards')"
>
<template slot="label"> 达到规划标准的堤防长度(m) </template>
{{ this.form.embankmentLengthPlanningStandards }}
<el-descriptions-item :contentClassName="isDiff('dikeCrtStda')">
<template slot="label"> 现状防洪潮标准 </template>
{{ this.form.dikeCrtStda }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeStdaLen')">
<template slot="label"> 达标长度 </template>
{{ this.form.dikeStdaLen }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeNotStdaLen')">
<template slot="label"> 不达标长度 </template>
{{ this.form.dikeNotStdaLen }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeNotStdaLoc')">
<template slot="label"> 不达标位置 </template>
{{ this.form.dikeNotStdaLoc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('elevSys')">
<template slot="label"> 高程系统 </template>
{{ elevSysFormat(this.form) }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('startDikeTopEl')">
<template slot="label"> 起点堤顶高程 </template>
{{ this.form.startDikeTopEl }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('endDikeTopEl')">
<template slot="label"> 终点堤顶高程 </template>
{{ this.form.endDikeTopEl }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeWawaMinElev')">
<template slot="label"> 防浪墙顶最低高程 </template>
{{ this.form.dikeWawaMinElev }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeWawaMaxElev')">
<template slot="label"> 防浪墙顶最高高程 </template>
{{ this.form.dikeWawaMaxElev }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeWawaMinLoc')">
<template slot="label"> 防浪墙顶最低高程位置 </template>
{{ this.form.dikeWawaMinLoc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeWawaMaxLoc')">
<template slot="label"> 防浪墙顶最高高程位置 </template>
{{ this.form.dikeWawaMaxLoc }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('populationProtection')">
<template slot="label"> 保护人口 </template>
{{ this.form.populationProtection }}
<el-descriptions-item :contentClassName="isDiff('dikeElevMin')">
<template slot="label"> 堤顶最低高程 </template>
{{ this.form.dikeElevMin }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('protectingFarmland')">
<template slot="label"> 保护农田 </template>
{{ this.form.protectingFarmland }}
<el-descriptions-item :contentClassName="isDiff('dikeElevMax')">
<template slot="label"> 堤顶最高高程 </template>
{{ this.form.dikeElevMax }}
</el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('criticalInfrastructure')"
>
<template slot="label"> 重要基础设施 </template>
{{ this.form.criticalInfrastructure }}
<el-descriptions-item :contentClassName="isDiff('dikeHeigMin')">
<template slot="label"> 堤防最小高度 </template>
{{ this.form.dikeHeigMin }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('relation')">
<template slot="label"> 关联字段1 </template>
{{ this.form.relation }}
<el-descriptions-item :contentClassName="isDiff('dikeHeigMax')">
<template slot="label"> 堤防最大高度 </template>
{{ this.form.dikeHeigMax }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeTopWidMin')">
<template slot="label"> 堤顶最小宽度 </template>
{{ this.form.dikeTopWidMin }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dikeTopWidMax')">
<template slot="label"> 堤顶最大宽度 </template>
{{ this.form.dikeTopWidMax }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('sluicesAmount')">
<template slot="label"> 穿堤水闸数 </template>
{{ this.form.sluicesAmount }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('pumpsAmount')">
<template slot="label"> 穿堤泵站数 </template>
{{ this.form.pumpsAmount }}
</el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('note')">
<template slot="label"> 备注 </template>
{{ this.form.note }}
</el-descriptions-item>
</el-descriptions>
</div>
@ -200,22 +266,24 @@ export default {
histroy: "当前版本",
sumData: [],
form: {},
//
embankmentTypeOptions: [],
//
riversideClassificationOptions: [],
//
isFloodStorageDetentionOptions: [],
//
crossBorderSituationOptions: [],
//
statusOptions: [],
//
embankmentTyperOptions: [],
//
recentComplianceReinforcementStatusOptions: [],
//
engineeringTasksOptions: [],
dikePattOptions: [],
//
dikeTypeOptions: [],
//
mainBuildGradOptions: [],
//
embankmentLevelOptions: [],
engGradOptions: [],
//
isGateProjectOptions: [],
//
securityCategoryOptions: [],
//
engTaskOptions: [],
//
elevSysOptions: [],
diffPart: [],
};
},
@ -239,29 +307,32 @@ export default {
// });
});
this.getDicts("embankment_type").then((response) => {
this.embankmentTypeOptions = response.data;
this.getDicts("report_status").then((response) => {
this.statusOptions = response.data;
});
this.getDicts("riverside_classification").then((response) => {
this.riversideClassificationOptions = response.data;
this.getDicts("embankment_form").then((response) => {
this.dikePattOptions = response.data;
});
this.getDicts("whether").then((response) => {
this.isFloodStorageDetentionOptions = response.data;
this.getDicts("embankment_type").then((response) => {
this.dikeTypeOptions = response.data;
});
this.getDicts("cross_border_situation").then((response) => {
this.crossBorderSituationOptions = response.data;
this.getDicts("embankment_level").then((response) => {
this.engGradOptions = response.data;
});
this.getDicts("embankment_form").then((response) => {
this.embankmentTyperOptions = response.data;
this.getDicts("building_level").then((response) => {
this.mainBuildGradOptions = response.data;
});
this.getDicts("reach_the_standard").then((response) => {
this.recentComplianceReinforcementStatusOptions = response.data;
this.getDicts("whether").then((response) => {
this.isGateProjectOptions = response.data;
});
this.getDicts("project_task").then((response) => {
this.engineeringTasksOptions = response.data;
this.getDicts("security_category").then((response) => {
this.securityCategoryOptions = response.data;
});
this.getDicts("embankment_level").then((response) => {
this.embankmentLevelOptions = response.data;
this.getDicts("dike_engineering_task").then((response) => {
this.engTaskOptions = response.data;
});
this.getDicts("elevation_system").then((response) => {
this.elevSysOptions = response.data;
});
},
mounted() {
@ -329,58 +400,44 @@ export default {
chooseEdition(data) {
this.form = data;
},
//
statusFormat(row) {
return this.selectDictLabel(this.statusOptions, row.status);
},
//
dikePattFormat(row, column) {
return this.selectDictLabel(this.dikePattOptions, row.dikePatt);
},
//
endStationNumberFormat(row, column) {
return this.selectDictLabel(this.embankmentTypeOptions, row.dikeType);
dikeTypeFormat(row, column) {
return this.selectDictLabel(this.dikeTypeOptions, row.dikeType);
},
//
riversideClassificationFormat(row, column) {
return this.selectDictLabel(
this.riversideClassificationOptions,
row.riversideClassification
);
//
engGradFormat(row, column) {
return this.selectDictLabel(this.engGradOptions, row.engGrad);
},
//
isFloodStorageDetentionFormat(row, column) {
return this.selectDictLabel(
this.isFloodStorageDetentionOptions,
row.isFloodStorageDetention
);
//
mainBuildGradFormat(row, column) {
return this.selectDictLabel(this.mainBuildGradOptions, row.mainBuildGrad);
},
//
crossBorderSituationFormat(row, column) {
return this.selectDictLabel(
this.crossBorderSituationOptions,
row.crossBorderSituation
);
//
isGateProjectFormat(row, column) {
return this.selectDictLabel(this.isGateProjectOptions, row.isGateProject);
},
//
recentComplianceReinforcementStatusFormat(row, column) {
//
securityCategoryFormat(row, column) {
return this.selectDictLabel(
this.recentComplianceReinforcementStatusOptions,
row.recentComplianceReinforcementStatus
this.securityCategoryOptions,
row.securityCategory
);
},
//
embankmentTyperFormat(data) {
let res = "";
let arr = data ? JSON.parse(data) : [];
// console.log("XXXXXXXXXXXXXXXXXXXXXX", data);
if (arr) {
arr.forEach((item) => {
res =
res + "+" + this.selectDictLabel(this.embankmentTyperOptions, item);
});
return res.slice(1);
}
},
//
engineeringTasksFormat(row, column) {
return this.selectDictLabel(this.engineeringTasksOptions, row.engTask);
engTaskFormat(row, column) {
return this.selectDictLabel(this.engTaskOptions, row.engTask);
},
//
embankmentLevelFormat(row, column) {
return this.selectDictLabel(this.embankmentLevelOptions, row.dikeGrad);
//
elevSysFormat(row, column) {
return this.selectDictLabel(this.elevSysOptions, row.elevSys);
},
},
};

308
src/views/dike/engineeringCondition/dikeCompare/components/dikeCrossSection.vue

@ -1,5 +1,20 @@
<template>
<div class="app-container">
<div>
<el-select
v-model="histroy"
placeholder="请选择版本"
style="margin-bottom: 10px; width: 250px"
>
<el-option
v-for="(sub, index) in sumData"
:key="sub.id"
:label="
sub.exprDate ? '版本' + index + ' - ' + sub.exprDate : '当前版本'
"
:value="sub.id"
@click.native="chooseEdition(sub)"
></el-option>
</el-select>
<el-descriptions
class="margin-top"
:column="2"
@ -11,23 +26,23 @@
}"
:contentStyle="{ minWidth: '250px' }"
>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bntrCode')">
<template slot="label"> 堤防横断面代码 </template>
{{ this.form.bntrCode }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('srDate')">
<template slot="label"> 测量日期 </template>
{{ this.form.srDate }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('jmDs')">
<template slot="label"> 起点距 </template>
{{ this.form.jmDs }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('srpneLev')">
<template slot="label"> 测点高程 </template>
{{ this.form.srpneLev }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('note')">
<template slot="label"> 备注 </template>
{{ this.form.note }}
</el-descriptions-item>
@ -41,243 +56,72 @@
</template>
<script>
import {
listDfhdm,
getDfhdm,
delDfhdm,
addDfhdm,
updateDfhdm,
exportDfhdm,
} from "@/api/yg/dike/dfhdm";
import { getDikeCompare } from "@/api/yg/dikeCompare";
export default {
name: "Dfhdm",
props: ["dikeCode"],
props: ["dikeCrossSectionData"],
inject: ["getDiff", "granParentEle"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dfhdmList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
bntrCode: null,
srDate: null,
jmDs: null,
srpneLev: null,
createUid: null,
updateUid: null,
owerDept: null,
relation: null,
dikeId: null,
note: null,
effDate: null,
exprDate: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
histroy: "当前版本",
sumData: [],
//
form: {},
//
rules: {},
diffPart: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询堤防横断面列表 */
getList() {
this.queryParams.data.dikeCode = this.dikeCode;
listDfhdm(this.queryParams).then((response) => {
if (response.records[0]) {
this.form = response.records[0];
}
});
},
//
cancel() {
// this.reset();
this.$router.back();
},
//
reset() {
this.form = {
id: null,
bntrCode: null,
srDate: null,
jmDs: null,
srpneLev: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
dikeId: null,
note: null,
effDate: null,
exprDate: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
bntrCode: null,
srDate: null,
jmDs: null,
srpneLev: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
dikeId: null,
note: null,
effDate: null,
exprDate: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加堤防横断面";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getDfhdm(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改堤防横断面";
if (this.dikeCrossSectionData && this.dikeCrossSectionData.id) {
console.log(
"this.dikeCrossSectionData in dikeCrossSection",
this.dikeCrossSectionData
);
this.form = this.dikeCrossSectionData;
console.log("this.form", this.form);
this.histroy = this.form.id;
this.$nextTick(() => {
this.diffPart = this.getDiff("dikeCrossSection");
console.log("this.diffPart in dikeCrossSection", this.diffPart);
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateDfhdm(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.dikeCode = this.dikeCode;
addDfhdm(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
getDikeCompare(this.$route.query.dikeCode).then((res) => {
this.sumData = res.data.hdm;
console.log("this.sumData in dikeCrossSection", this.sumData);
// res.data.jbxx.map((item) => {
// if (!item.exprDate) this.baseData = item;
// });
// res.data.gcgl.map((item) => {
// if (!item.exprDate) this.dikeCrossSectionData = item;
// });
});
},
watch: {
histroy: function (n, o) {
// this.$nextTick(() => {
// this.diffPart = this.getDiff();
// });
setTimeout(() => {
// this.diffPart = this.getDiff();
const childrenEles = Object.keys(this.granParentEle);
for (let index = 0; index < childrenEles.length; index++) {
// console.log(33333333, childrenEles[index]);
this.granParentEle[
childrenEles[index]
].$refs.dikeCrossSection.diffPart =
this.granParentEle[
childrenEles[index]
].$refs.dikeCrossSection.getDiff("dikeCrossSection");
}
});
}, 10);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delDfhdm(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
methods: {
isDiff(name) {
return this.diffPart.some((item) => item === name) ? "diffEle" : "";
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if (this.ids) {
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportDfhdm(queryParams);
})
.then((response) => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
})
.catch(function () {});
chooseEdition(data) {
this.form = data;
},
},
};
@ -290,3 +134,9 @@ export default {
z-index: 1;
}
</style>
<style lang="scss">
.diffEle {
color: #f13939;
// background: skyblue;
}
</style>

432
src/views/dike/engineeringCondition/dikeCompare/components/dikeCrossSectionTrait.vue

@ -1,5 +1,20 @@
<template>
<div class="app-container">
<div>
<el-select
v-model="histroy"
placeholder="请选择版本"
style="margin-bottom: 10px; width: 250px"
>
<el-option
v-for="(sub, index) in sumData"
:key="sub.id"
:label="
sub.exprDate ? '版本' + index + ' - ' + sub.exprDate : '当前版本'
"
:value="sub.id"
@click.native="chooseEdition(sub)"
></el-option>
</el-select>
<el-descriptions
class="margin-top"
:column="2"
@ -11,125 +26,125 @@
}"
:contentStyle="{ minWidth: '250px' }"
>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bntrCode')">
<template slot="label"> 堤防横断面代码 </template>
{{ this.form.bntrCode }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('srDate')">
<template slot="label"> 测量日期 </template>
{{ this.form.srDate }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('trCh')">
<template slot="label"> 断面桩号 </template>
{{ this.form.trCh }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('intrPl')">
<template slot="label"> 起始断面位置 </template>
{{ this.form.intrPl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('intrCh')">
<template slot="label"> 起始断面桩号 </template>
{{ this.form.intrCh }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('tointrDs')">
<template slot="label"> 至起始断面距离 </template>
{{ this.form.tointrDs }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('jmsrpnPl')">
<template slot="label"> 起测点位置 </template>
{{ this.form.jmsrpnPl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('jmsrpneLev')">
<template slot="label"> 起测点高程 </template>
{{ this.form.jmsrpneLev }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bnbdSlch')">
<template slot="label"> 堤身土质 </template>
{{ this.form.bnbdSlch }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bnbdAntp')">
<template slot="label"> 堤身防渗形式 </template>
{{ this.form.bnbdAntp }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bnbsGl')">
<template slot="label"> 堤基地质 </template>
{{ this.form.bnbsGl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bnbsAntp')">
<template slot="label"> 堤基防渗形式 </template>
{{ this.form.bnbsAntp }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bnbdHigh')">
<template slot="label"> 堤身净高度 </template>
{{ this.form.bnbdHigh }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bntpeLev')">
<template slot="label"> 堤顶高程 </template>
{{ this.form.bntpeLev }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bntpFr')">
<template slot="label"> 堤顶超高 </template>
{{ this.form.bntpFr }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('bntpWd')">
<template slot="label"> 堤顶宽度 </template>
{{ this.form.bntpWd }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('upbnToel')">
<template slot="label"> 迎河面堤脚高程 </template>
{{ this.form.upbnToel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dwbnToel')">
<template slot="label"> 背河面堤脚高程 </template>
{{ this.form.dwbnToel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('upslSlrt')">
<template slot="label"> 迎河坡坡比 </template>
{{ this.form.upslSlrt }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dwslSlrt')">
<template slot="label"> 背河坡坡比 </template>
{{ this.form.dwslSlrt }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('uspsIn')">
<template slot="label"> 迎河坡护坡情况 </template>
{{ this.form.uspsIn }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dspsIn')">
<template slot="label"> 背河坡护坡情况 </template>
{{ this.form.dspsIn }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('upbtWide')">
<template slot="label"> 迎河面滩地宽度 </template>
{{ this.form.upbtWide }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('ufrteLev')">
<template slot="label"> 迎河面平台(前戗)顶高程 </template>
{{ this.form.ufrteLev }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('ufrtWide')">
<template slot="label"> 迎河面平台(前戗)顶宽 </template>
{{ this.form.ufrtWide }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('upflRfsl')">
<template slot="label"> 迎河面平台(前戗)坡度 </template>
{{ this.form.upflRfsl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dfrtEl')">
<template slot="label"> 背河面平台(后戗)顶高程 </template>
{{ this.form.dfrtEl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dfrtWide')">
<template slot="label"> 背河面平台(后戗)顶宽 </template>
{{ this.form.dfrtWide }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dwflRfsl')">
<template slot="label"> 背河面平台(后戗)坡度 </template>
{{ this.form.dwflRfsl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('note')">
<template slot="label"> 备注 </template>
{{ this.form.note }}
</el-descriptions-item>
@ -142,318 +157,71 @@
</template>
<script>
import {
listHdmtzz,
getHdmtzz,
delHdmtzz,
addHdmtzz,
updateHdmtzz,
exportHdmtzz,
} from "@/api/yg/dike/hdmtzz";
import { getDikeCompare } from "@/api/yg/dikeCompare";
export default {
name: "Hdmtzz",
props: ["dikeCode"],
props: ["dikeCrossSectionTraitData"],
inject: ["getDiff", "granParentEle"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
hdmtzzList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
dikeCode: null,
bntrCode: null,
srDate: null,
trCh: null,
intrPl: null,
intrCh: null,
tointrDs: null,
jmsrpnPl: null,
jmsrpneLev: null,
bnbdSlch: null,
bnbdAntp: null,
bnbsGl: null,
bnbsAntp: null,
bnbdHigh: null,
bntpeLev: null,
bntpFr: null,
bntpWd: null,
upbnToel: null,
dwbnToel: null,
upslSlrt: null,
dwslSlrt: null,
uspsIn: null,
dspsIn: null,
upbtWide: null,
ufrteLev: null,
ufrtWide: null,
upflRfsl: null,
dfrtEl: null,
dfrtWide: null,
dwflRfsl: null,
note: null,
effDate: null,
exprDate: null,
createUid: null,
updateUid: null,
owerDept: null,
relation: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
histroy: "当前版本",
sumData: [],
//
form: {},
//
rules: {},
diffPart: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询横断面特征值列表 */
getList() {
this.queryParams.data.dikeCode = this.dikeCode;
listHdmtzz(this.queryParams).then((response) => {
if (response.records[0]) {
this.form = response.records[0];
}
});
},
//
cancel() {
// this.reset();
this.$router.back();
},
//
reset() {
this.form = {
id: null,
dikeCode: null,
bntrCode: null,
srDate: null,
trCh: null,
intrPl: null,
intrCh: null,
tointrDs: null,
jmsrpnPl: null,
jmsrpneLev: null,
bnbdSlch: null,
bnbdAntp: null,
bnbsGl: null,
bnbsAntp: null,
bnbdHigh: null,
bntpeLev: null,
bntpFr: null,
bntpWd: null,
upbnToel: null,
dwbnToel: null,
upslSlrt: null,
dwslSlrt: null,
uspsIn: null,
dspsIn: null,
upbtWide: null,
ufrteLev: null,
ufrtWide: null,
upflRfsl: null,
dfrtEl: null,
dfrtWide: null,
dwflRfsl: null,
note: null,
effDate: null,
exprDate: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
dikeCode: null,
bntrCode: null,
srDate: null,
trCh: null,
intrPl: null,
intrCh: null,
tointrDs: null,
jmsrpnPl: null,
jmsrpneLev: null,
bnbdSlch: null,
bnbdAntp: null,
bnbsGl: null,
bnbsAntp: null,
bnbdHigh: null,
bntpeLev: null,
bntpFr: null,
bntpWd: null,
upbnToel: null,
dwbnToel: null,
upslSlrt: null,
dwslSlrt: null,
uspsIn: null,
dspsIn: null,
upbtWide: null,
ufrteLev: null,
ufrtWide: null,
upflRfsl: null,
dfrtEl: null,
dfrtWide: null,
dwflRfsl: null,
note: null,
effDate: null,
exprDate: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
remark: null,
relation: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加横断面特征值";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getHdmtzz(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改横断面特征值";
if (this.dikeCrossSectionTraitData && this.dikeCrossSectionTraitData.id) {
console.log(
"this.dikeCrossSectionTraitData in dikeCrossSectionTrait",
this.dikeCrossSectionTraitData
);
this.form = this.dikeCrossSectionTraitData;
console.log("this.form", this.form);
this.histroy = this.form.id;
this.$nextTick(() => {
this.diffPart = this.getDiff("dikeCrossSectionTrait");
console.log("this.diffPart in dikeCrossSectionTrait", this.diffPart);
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateHdmtzz(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.dikeCode = this.dikeCode;
addHdmtzz(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
getDikeCompare(this.$route.query.dikeCode).then((res) => {
this.sumData = res.data.hdmtzz;
console.log("this.sumData in dikeCrossSectionTrait", this.sumData);
// res.data.jbxx.map((item) => {
// if (!item.exprDate) this.baseData = item;
// });
// res.data.gcgl.map((item) => {
// if (!item.exprDate) this.dikeCrossSectionTraitData = item;
// });
});
},
watch: {
histroy: function (n, o) {
// this.$nextTick(() => {
// this.diffPart = this.getDiff();
// });
setTimeout(() => {
// this.diffPart = this.getDiff();
const childrenEles = Object.keys(this.granParentEle);
for (let index = 0; index < childrenEles.length; index++) {
// console.log(33333333, childrenEles[index]);
this.granParentEle[
childrenEles[index]
].$refs.dikeCrossSectionTrait.diffPart = this.granParentEle[
childrenEles[index]
].$refs.dikeCrossSectionTrait.getDiff("dikeCrossSectionTrait");
}
});
}, 10);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delHdmtzz(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
methods: {
isDiff(name) {
return this.diffPart.some((item) => item === name) ? "diffEle" : "";
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if (this.ids) {
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportHdmtzz(queryParams);
})
.then((response) => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
})
.catch(function () {});
chooseEdition(data) {
this.form = data;
},
},
};
@ -466,3 +234,9 @@ export default {
z-index: 1;
}
</style>
<style lang="scss">
.diffEle {
color: #f13939;
// background: skyblue;
}
</style>

318
src/views/dike/engineeringCondition/dikeCompare/components/historyOverflowsRecords.vue

@ -1,5 +1,20 @@
<template>
<div class="app-container">
<div>
<el-select
v-model="histroy"
placeholder="请选择版本"
style="margin-bottom: 10px; width: 250px"
>
<el-option
v-for="(sub, index) in sumData"
:key="sub.id"
:label="
sub.exprDate ? '版本' + index + ' - ' + sub.exprDate : '当前版本'
"
:value="sub.id"
@click.native="chooseEdition(sub)"
></el-option>
</el-select>
<el-descriptions
class="margin-top"
:column="2"
@ -11,27 +26,27 @@
}"
:contentStyle="{ minWidth: '250px' }"
>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('brspPl')">
<template slot="label"> 决溢地点与形式 </template>
{{ this.form.brspPl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('brspTime')">
<template slot="label"> 决溢时间 </template>
{{ this.form.brspTime }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('brspLs')">
<template slot="label"> 决溢损失 </template>
{{ this.form.brspLs }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('rpTime')">
<template slot="label"> 修复日期 </template>
{{ this.form.rpTime }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('inRn')">
<template slot="label"> 淹没范围 </template>
{{ this.form.inRn }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('note')">
<template slot="label"> 备注 </template>
{{ this.form.note }}
</el-descriptions-item>
@ -45,249 +60,74 @@
</template>
<script>
import {
listJyjl,
getJyjl,
delJyjl,
addJyjl,
updateJyjl,
exportJyjl,
} from "@/api/yg/dike/jyjl";
import { getDikeCompare } from "@/api/yg/dikeCompare";
export default {
name: "Jyjl",
props: ["dikeCode"],
props: ["historyOverflowsRecordsData"],
inject: ["getDiff", "granParentEle"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
jyjlList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
dikeId: null,
brspTime: null,
brspPl: null,
brspLs: null,
rpTime: null,
createUid: null,
updateUid: null,
owerDept: null,
relation: null,
dikeCode: null,
inRn: null,
note: null,
effDate: null,
exprDate: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
histroy: "当前版本",
sumData: [],
//
form: {},
//
rules: {},
diffPart: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询决溢记录列表 */
getList() {
this.queryParams.data.dikeCode = this.dikeCode;
listJyjl(this.queryParams).then((response) => {
if (response.records[0]) {
this.form = response.records[0];
}
});
},
//
cancel() {
// this.reset();
this.$router.back();
},
//
reset() {
this.form = {
id: null,
dikeId: null,
brspTime: null,
brspPl: null,
brspLs: null,
rpTime: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
relation: null,
remark: null,
dikeCode: null,
inRn: null,
note: null,
effDate: null,
exprDate: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
dikeId: null,
brspTime: null,
brspPl: null,
brspLs: null,
rpTime: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
owerDept: null,
relation: null,
remark: null,
dikeCode: null,
inRn: null,
note: null,
effDate: null,
exprDate: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加决溢记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getJyjl(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改决溢记录";
if (
this.historyOverflowsRecordsData &&
this.historyOverflowsRecordsData.id
) {
console.log(
"this.historyOverflowsRecordsData in historyOverflowsRecords",
this.historyOverflowsRecordsData
);
this.form = this.historyOverflowsRecordsData;
console.log("this.form", this.form);
this.histroy = this.form.id;
this.$nextTick(() => {
this.diffPart = this.getDiff("historyOverflowsRecords");
console.log("this.diffPart in historyOverflowsRecords", this.diffPart);
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateJyjl(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.dikeCode = this.dikeCode;
addJyjl(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
getDikeCompare(this.$route.query.dikeCode).then((res) => {
this.sumData = res.data.jyjl;
console.log("this.sumData in historyOverflowsRecords", this.sumData);
// res.data.jbxx.map((item) => {
// if (!item.exprDate) this.baseData = item;
// });
// res.data.gcgl.map((item) => {
// if (!item.exprDate) this.historyOverflowsRecordsData = item;
// });
});
},
watch: {
histroy: function (n, o) {
// this.$nextTick(() => {
// this.diffPart = this.getDiff();
// });
setTimeout(() => {
// this.diffPart = this.getDiff();
const childrenEles = Object.keys(this.granParentEle);
for (let index = 0; index < childrenEles.length; index++) {
// console.log(33333333, childrenEles[index]);
this.granParentEle[
childrenEles[index]
].$refs.historyOverflowsRecords.diffPart = this.granParentEle[
childrenEles[index]
].$refs.historyOverflowsRecords.getDiff("historyOverflowsRecords");
}
});
}, 10);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delJyjl(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
methods: {
isDiff(name) {
return this.diffPart.some((item) => item === name) ? "diffEle" : "";
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if (this.ids) {
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportJyjl(queryParams);
})
.then((response) => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
})
.catch(function () {});
chooseEdition(data) {
this.form = data;
},
},
};
@ -300,3 +140,9 @@ export default {
z-index: 1;
}
</style>
<style lang="scss">
.diffEle {
color: #f13939;
// background: skyblue;
}
</style>

437
src/views/dike/engineeringCondition/dikeCompare/components/hydrologicalCharacteristics.vue

@ -1,5 +1,20 @@
<template>
<div class="app-container">
<div>
<el-select
v-model="histroy"
placeholder="请选择版本"
style="margin-bottom: 10px; width: 250px"
>
<el-option
v-for="(sub, index) in sumData"
:key="sub.id"
:label="
sub.exprDate ? '版本' + index + ' - ' + sub.exprDate : '当前版本'
"
:value="sub.id"
@click.native="chooseEdition(sub)"
></el-option>
</el-select>
<el-descriptions
class="margin-top"
:column="2"
@ -11,118 +26,122 @@
}"
:contentStyle="{ minWidth: '250px' }"
>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('riverWidth')">
<template slot="label"> 河道宽度 </template>
{{ this.form.riverWidth }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('riverGradient')">
<template slot="label"> 河道比降 </template>
{{ this.form.riverGradient }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('annualAverageRunoff')">
<template slot="label"> 多年平均径流量 </template>
{{ this.form.annualAverageRunoff }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('averageSedimentTransport')"
>
<template slot="label"> 多年平均输沙量 </template>
{{ this.form.averageSedimentTransport }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item
:contentClassName="isDiff('averageMinimumTemperature')"
>
<template slot="label"> 多年平均最低气温 </template>
{{ this.form.averageMinimumTemperature }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dsrcin')">
<template slot="label"> 设计重现期 </template>
{{ this.form.dsrcin }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('peakFlowRate')">
<template slot="label"> 设计洪峰流量 </template>
{{ this.form.peakFlowRate }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('chrcin')">
<template slot="label"> 校核重现期 </template>
{{ this.form.chrcin }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('verifyFlowRate')">
<template slot="label"> 校核洪峰流量 </template>
{{ this.form.verifyFlowRate }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dslcfl')">
<template slot="label"> 设计过闸流量 </template>
{{ this.form.dslcfl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dsuswl')">
<template slot="label"> 设计闸上水位 </template>
{{ this.form.dsuswl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('dsdswl')">
<template slot="label"> 设计闸下水位 </template>
{{ this.form.dsdswl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('chlcfl')">
<template slot="label"> 校核过闸流量 </template>
{{ this.form.chlcfl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('chuswl')">
<template slot="label"> 校核闸上水位 </template>
{{ this.form.chuswl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('chdswl')">
<template slot="label"> 校核闸下水位 </template>
{{ this.form.chdswl }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('designFloodStandard')">
<template slot="label"> 设计洪水标准 </template>
{{ this.form.designFloodStandard }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('designFloodHigh')">
<template slot="label"> 设计洪水位 </template>
{{ this.form.designFloodHigh }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('ensureLevel')">
<template slot="label"> 保证水位 </template>
{{ this.form.ensureLevel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('alertLevel')">
<template slot="label"> 警戒水位 </template>
{{ this.form.alertLevel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('fortificationLevel')">
<template slot="label"> 设防水位 </template>
{{ this.form.fortificationLevel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('designFlow')">
<template slot="label"> 设计流量 </template>
{{ this.form.designFlow }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('alertFlow')">
<template slot="label"> 警戒流量 </template>
{{ this.form.alertFlow }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('checkLevel')">
<template slot="label"> 校核水位 </template>
{{ this.form.checkLevel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('checkFlow')">
<template slot="label"> 校核流量 </template>
{{ this.form.checkFlow }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('highestWaterLevel')">
<template slot="label"> 历史最高水位 </template>
{{ this.form.highestWaterLevel }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('highestWaterLevelTime')">
<template slot="label"> 最高水位日期 </template>
{{ this.form.highestWaterLevelTime }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('highestWaterFlow')">
<template slot="label"> 历史最大洪峰流量 </template>
{{ this.form.highestWaterFlow }}
</el-descriptions-item>
<el-descriptions-item>
<el-descriptions-item :contentClassName="isDiff('highestWaterFlowTime')">
<template slot="label"> 历史最大洪峰流量日期 </template>
{{ this.form.highestWaterFlowTime }}
</el-descriptions-item>
@ -135,315 +154,79 @@
</template>
<script>
import {
listSwtz,
getSwtz,
delSwtz,
addSwtz,
updateSwtz,
exportSwtz,
} from "@/api/yg/dike/swtz";
import { getDikeCompare } from "@/api/yg/dikeCompare";
export default {
name: "Swtz",
props: ["dikeCode"],
props: ["hydrologicalCharacteristicsData"],
inject: ["getDiff", "granParentEle"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
swtzList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
riverWidth: null,
riverGradient: null,
annualAverageRunoff: null,
averageSedimentTransport: null,
averageMinimumTemperature: null,
dsrcin: null,
peakFlowRate: null,
chrcin: null,
verifyFlowRate: null,
dslcfl: null,
dsuswl: null,
dsdswl: null,
chlcfl: null,
chuswl: null,
chdswl: null,
createUid: null,
updateUid: null,
proCode: null,
proNo: null,
owerDept: null,
relation: null,
dikeId: null,
dikeCode: null,
designFloodStandard: null,
designFloodHigh: null,
ensureLevel: null,
alertLevel: null,
fortificationLevel: null,
designFlow: null,
alertFlow: null,
checkLevel: null,
checkFlow: null,
highestWaterLevel: null,
highestWaterLevelTime: null,
highestWaterFlow: null,
highestWaterFlowTime: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
},
histroy: "当前版本",
sumData: [],
//
form: {},
//
rules: {},
diffPart: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询水文特征列表 */
getList() {
this.queryParams.data.dikeCode = this.dikeCode;
listSwtz(this.queryParams).then((response) => {
if (response.records[0]) {
this.form = response.records[0];
}
});
},
//
cancel() {
// this.reset();
this.$router.back();
},
//
reset() {
this.form = {
id: null,
riverWidth: null,
riverGradient: null,
annualAverageRunoff: null,
averageSedimentTransport: null,
averageMinimumTemperature: null,
dsrcin: null,
peakFlowRate: null,
chrcin: null,
verifyFlowRate: null,
dslcfl: null,
dsuswl: null,
dsdswl: null,
chlcfl: null,
chuswl: null,
chdswl: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
proCode: null,
proNo: null,
owerDept: null,
remark: null,
relation: null,
dikeId: null,
dikeCode: null,
designFloodStandard: null,
designFloodHigh: null,
ensureLevel: null,
alertLevel: null,
fortificationLevel: null,
designFlow: null,
alertFlow: null,
checkLevel: null,
checkFlow: null,
highestWaterLevel: null,
highestWaterLevelTime: null,
highestWaterFlow: null,
highestWaterFlowTime: null,
};
this.resetForm("form");
},
//
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
riverWidth: null,
riverGradient: null,
annualAverageRunoff: null,
averageSedimentTransport: null,
averageMinimumTemperature: null,
dsrcin: null,
peakFlowRate: null,
chrcin: null,
verifyFlowRate: null,
dslcfl: null,
dsuswl: null,
dsdswl: null,
chlcfl: null,
chuswl: null,
chdswl: null,
createUid: null,
updateUid: null,
createTime: null,
updateTime: null,
proCode: null,
proNo: null,
owerDept: null,
remark: null,
relation: null,
dikeId: null,
dikeCode: null,
designFloodStandard: null,
designFloodHigh: null,
ensureLevel: null,
alertLevel: null,
fortificationLevel: null,
designFlow: null,
alertFlow: null,
checkLevel: null,
checkFlow: null,
highestWaterLevel: null,
highestWaterLevelTime: null,
highestWaterFlow: null,
highestWaterFlowTime: null,
},
//
params: {
//
orderBy: "create_time",
// descasc
sortBy: "desc",
},
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加水文特征";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getSwtz(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改水文特征";
if (
this.hydrologicalCharacteristicsData &&
this.hydrologicalCharacteristicsData.id
) {
console.log(
"this.hydrologicalCharacteristicsData in hydrologicalCharacteristics",
this.hydrologicalCharacteristicsData
);
this.form = this.hydrologicalCharacteristicsData;
console.log("this.form", this.form);
this.histroy = this.form.id;
this.$nextTick(() => {
this.diffPart = this.getDiff("hydrologicalCharacteristics");
console.log(
"this.diffPart in hydrologicalCharacteristics",
this.diffPart
);
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateSwtz(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
this.form.dikeCode = this.dikeCode;
addSwtz(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
getDikeCompare(this.$route.query.dikeCode).then((res) => {
this.sumData = res.data.swtz;
console.log("this.sumData in hydrologicalCharacteristics", this.sumData);
// res.data.jbxx.map((item) => {
// if (!item.exprDate) this.baseData = item;
// });
// res.data.gcgl.map((item) => {
// if (!item.exprDate) this.hydrologicalCharacteristicsData = item;
// });
});
},
watch: {
histroy: function (n, o) {
// this.$nextTick(() => {
// this.diffPart = this.getDiff();
// });
setTimeout(() => {
// this.diffPart = this.getDiff();
const childrenEles = Object.keys(this.granParentEle);
for (let index = 0; index < childrenEles.length; index++) {
// console.log(33333333, childrenEles[index]);
this.granParentEle[
childrenEles[index]
].$refs.hydrologicalCharacteristics.diffPart = this.granParentEle[
childrenEles[index]
].$refs.hydrologicalCharacteristics.getDiff(
"hydrologicalCharacteristics"
);
}
});
}, 10);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delSwtz(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
methods: {
isDiff(name) {
return this.diffPart.some((item) => item === name) ? "diffEle" : "";
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
let message = "是否确认导出所有的数据项?";
if (this.ids) {
message = "是否确认导出选中的数据项?";
queryParams.ids = this.ids;
}
this.$confirm(message, "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportSwtz(queryParams);
})
.then((response) => {
this.downloadFile(response, true, response.msg);
// this.download(response.msg);
})
.catch(function () {});
chooseEdition(data) {
this.form = data;
},
},
};
@ -456,3 +239,9 @@ export default {
z-index: 1;
}
</style>
<style lang="scss">
.diffEle {
color: #f13939;
// background: skyblue;
}
</style>

72
src/views/dike/engineeringCondition/dikeCompare/index.vue

@ -17,6 +17,11 @@
<comparePart
ref="comparePart_1"
:baseData="baseData"
:dikeCrossSectionData="dikeCrossSectionData"
:dikeCrossSectionTraitData="dikeCrossSectionTraitData"
:hydrologicalCharacteristicsData="hydrologicalCharacteristicsData"
:historyOverflowsRecordsData="historyOverflowsRecordsData"
:bainBenefitIndexData="bainBenefitIndexData"
@getDiff="getDiff"
/>
</div>
@ -30,6 +35,41 @@
: sumData.jbxx[0]
: {}
"
:dikeCrossSectionData="
sumData.hdm
? sumData.hdm[1]
? sumData.hdm[1]
: sumData.hdm[0]
: {}
"
:dikeCrossSectionTraitData="
sumData.hdmtzz
? sumData.hdmtzz[1]
? sumData.hdmtzz[1]
: sumData.hdmtzz[0]
: {}
"
:hydrologicalCharacteristicsData="
sumData.swtz
? sumData.swtz[1]
? sumData.swtz[1]
: sumData.swtz[0]
: {}
"
:historyOverflowsRecordsData="
sumData.jyjl
? sumData.jyjl[1]
? sumData.jyjl[1]
: sumData.jyjl[0]
: {}
"
:bainBenefitIndexData="
sumData.gcxy
? sumData.gcxy[1]
? sumData.gcxy[1]
: sumData.gcxy[0]
: {}
"
/>
</div>
</div>
@ -46,7 +86,12 @@ export default {
return {
sumData: {},
baseData: {},
projectManagementData: {},
// projectManagementData: {},
dikeCrossSectionData: {},
dikeCrossSectionTraitData: {},
hydrologicalCharacteristicsData: {},
historyOverflowsRecordsData: {},
bainBenefitIndexData: {},
histroy: "",
routeList: [
{
@ -66,6 +111,31 @@ export default {
if (!item.exprDate) this.baseData = item;
});
}
if (res.data.hdm.length > 0) {
res.data.hdm.map((item) => {
if (!item.exprDate) this.dikeCrossSectionData = item;
});
}
if (res.data.hdmtzz.length > 0) {
res.data.hdmtzz.map((item) => {
if (!item.exprDate) this.dikeCrossSectionTraitData = item;
});
}
if (res.data.swtz.length > 0) {
res.data.swtz.map((item) => {
if (!item.exprDate) this.hydrologicalCharacteristicsData = item;
});
}
if (res.data.jyjl.length > 0) {
res.data.jyjl.map((item) => {
if (!item.exprDate) this.historyOverflowsRecordsData = item;
});
}
if (res.data.gcxy.length > 0) {
res.data.gcxy.map((item) => {
if (!item.exprDate) this.bainBenefitIndexData = item;
});
}
// if (res.data.gcgl.length > 0) {
// res.data.gcgl.map((item) => {
// if (!item.exprDate) this.projectManagementData = item;

24
src/views/singleLogin.vue

@ -0,0 +1,24 @@
<template>
<div class="singleLoginBox" v-loading="true"></div>
</template>
<script>
export default {
data() {
return {
loading: false,
};
},
created() {
// this.loading = true;
this.$router.push("/");
// console.log("token", this.$route);
// setToken(this.$route.query.token);
},
};
</script>
<style lang="scss" scoped>
.singleLoginBox {
width: 100%;
height: 100%;
}
</style>
Loading…
Cancel
Save