From 7d24a473875fea215feecba2aa7364323ee4a051 Mon Sep 17 00:00:00 2001
From: xzt <1113240624@qq.com>
Date: Tue, 26 Dec 2023 17:44:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B0=B4=E9=97=B8=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
src/store/index.js | 18 +
.../sluiceBaseInfo/index.vue | 52 +-
.../sluiceBaseInfo/options/basePage.vue | 1216 +++++++----------
.../sluiceBaseInfo/options/index.vue | 45 +-
.../options/projectManagement.vue | 1198 ++++------------
6 files changed, 869 insertions(+), 1661 deletions(-)
diff --git a/package.json b/package.json
index 97bd238..2a2d6f7 100644
--- a/package.json
+++ b/package.json
@@ -87,6 +87,7 @@
"vue2-org-tree": "^1.3.6",
"vuedraggable": "^2.20.0",
"vuex": "3.1.0",
+ "vuex-persistedstate": "^4.1.0",
"wangeditor": "^4.7.5",
"xlsx": "^0.18.5"
},
diff --git a/src/store/index.js b/src/store/index.js
index 3606c07..4269eb7 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -7,11 +7,22 @@ import tagsView from './modules/tagsView'
import permission from './modules/permission'
import settings from './modules/settings'
import getters from './getters'
+import createPersistedstate from 'vuex-persistedstate'
Vue.use(Vuex)
const store = new Vuex.Store({
+ plugins: [
+ createPersistedstate({
+ reducer (val) {
+ // console.log(val);
+ return {
+ basePageData: val.basePageData
+ }
+ }
+ })
+ ],
modules: {
app,
user,
@@ -27,6 +38,10 @@ const store = new Vuex.Store({
addChildTimeLine: {},
previewTimeLine:{},
fileUrl: window.g.fileUrl,
+ basePageData: {
+ // 专题管理面包屑
+ routeList: [],
+ }
},
mutations:{
setParagraph(state, obj){
@@ -44,6 +59,9 @@ const store = new Vuex.Store({
setPreviewTimeLine(state, obj) {
state.previewTimeLine = obj;
},
+ setRouteList (state, payload) {
+ state.basePageData.routeList = payload
+ },
},
getters
})
diff --git a/src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue b/src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue
index 8c5dc4f..d964ece 100644
--- a/src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue
+++ b/src/views/sluice/engineeringCondition/sluiceBaseInfo/index.vue
@@ -23,7 +23,15 @@
clearable
size="small"
@keyup.enter.native="handleQuery"
- />
+ >
+
+
- 搜索
+ > -->
重置
-
{
- this.form = response.data;
- this.open = true;
- this.title = "修改水闸工程基础信息";
+ this.routeList.push({
+ path: "/sluice/engineeringCondition/sluiceBaseInfo/options",
+ routeName: "水闸基本信息",
+ isEdit: true,
+ });
+
+ // 存储面包屑信息
+ this.$store.commit("setRouteList", JSON.stringify(this.routeList));
+ // 跳转到选项卡页面
+ this.$router.push({
+ path:
+ "/sluice/engineeringCondition/sluiceBaseInfo/options?baseDataId=" +
+ id,
});
+ // getSluiceInfo(id).then((response) => {
+ // this.form = response.data;
+ // this.open = true;
+ // this.title = "修改水闸工程基础信息";
+ // });
},
/** 提交按钮 */
submitForm() {
diff --git a/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue b/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue
index 8536b31..8d021cd 100644
--- a/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue
+++ b/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/basePage.vue
@@ -1,552 +1,419 @@
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
-
-
- 新增
-
-
- 修改
-
-
- 删除
-
-
- 导出
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{
- parseTime(scope.row.historicalMaximumDate, "{y}-{m}-{d}")
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}
-
-
-
-
- {{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}
-
-
-
-
-
-
-
- {{ parseTime(scope.row.completionTime, "{y}-{m}-{d}") }}
-
-
-
-
- {{
- parseTime(scope.row.completionAcceptanceTime, "{y}-{m}-{d}")
- }}
-
-
-
+
-
- {{
- parseTime(scope.row.recentCompletionTime, "{y}-{m}-{d}")
- }}
-
-
-
-
-
-
-
- 修改
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 请选择字典生成
-
-
-
-
- 请选择字典生成
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.dictLabel }}
+
+
+
+
+
+
+ {{ dict.dictLabel }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -582,6 +449,30 @@ export default {
title: "",
// 是否显示弹出层
open: false,
+ // 验收情况字典
+ acceptanceStatusOptions: [],
+ // 除险加固情况字典
+ riskEliminationStatusOptions: [],
+ // 是否为枢纽工程字典
+ isHubProjectOptions: [],
+ // 是否为闸站工程字典
+ isGateStationOptions: [],
+ // 是否为套闸工程字典
+ isSetGateProjectOptions: [],
+ // 水闸类型字典
+ sluiceTypeOptions: [],
+ // 工程规模字典
+ projectScaleOptions: [],
+ // 建筑物级别字典
+ buildingLevelOptions: [],
+ // 闸门型式字典
+ gateTypeOptions: [],
+ // 闸室结构字典
+ lockChamberStructureOptions: [],
+ // 启闭机形式字典
+ machineFormOptions: [],
+ // 消能方式字典
+ energyDissipationMethodOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
@@ -634,161 +525,66 @@ export default {
},
// 表单参数
form: {},
+ copyForm: {},
// 表单校验
- rules: {},
+ rules: {
+ sluiceCode: [
+ { required: true, message: "请输入水闸编码", trigger: "blur" },
+ ],
+ },
};
},
created() {
this.getList();
+ this.getDicts("completion_acceptance_status").then((response) => {
+ this.acceptanceStatusOptions = response.data;
+ });
+ this.getDicts("reinforcement_situation").then((response) => {
+ this.riskEliminationStatusOptions = response.data;
+ });
+ this.getDicts("whether").then((response) => {
+ this.isHubProjectOptions = 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("Lock_chamber_structure").then((response) => {
+ this.lockChamberStructureOptions = response.data;
+ });
+ this.getDicts("machine_form").then((response) => {
+ this.machineFormOptions = response.data;
+ });
+ this.getDicts("energy_dissipation_method").then((response) => {
+ this.energyDissipationMethodOptions = response.data;
+ });
},
methods: {
/** 查询水闸工程基础信息列表 */
getList() {
- this.loading = true;
- listSluiceInfo(this.queryParams).then((response) => {
- this.sluiceInfoList = response.records;
- this.total = response.total;
- this.loading = false;
+ const id = this.$route.query.baseDataId;
+ getSluiceInfo(id).then((response) => {
+ this.form = response.data;
+ this.copyForm = { ...response.data };
});
},
// 取消按钮
cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- sluiceName: null,
- adcd: null,
- sluiceCode: null,
- location: null,
- plottingSluice: null,
- acceptanceStatus: "0",
- riskEliminationStatus: "0",
- isHubProject: null,
- isGateStation: null,
- isSetGateProject: null,
- sluiceType: null,
- designGateFlow: null,
- verifiedGateFlow: null,
- projectScale: null,
- buildingLevel: null,
- designStandards: null,
- verificationStandards: null,
- historicalMaximumGate: null,
- historicalMaximumDate: null,
- designSeismicIntensity: null,
- gateHolesNumber: null,
- gateHoleWidth: null,
- gateType: null,
- hoistsNumber: null,
- observationProject: null,
- lockChamberStructure: null,
- machineForm: null,
- energyDissipationMethod: null,
- automationControl: null,
- createUid: null,
- updateUid: null,
- createTime: null,
- updateTime: null,
- proNo: null,
- proCode: null,
- relation: null,
- completionTime: null,
- completionAcceptanceTime: null,
- recentCompletionTime: null,
- hubBuildings: null,
- auxiliaryGateHoles: null,
- auxiliaryGateHolesWidth: null,
- };
- this.resetForm("form");
- },
- // 查询表单重置
- resetQueryForm() {
- this.queryParams = {
- pageNum: 1,
- pageSize: 10,
- data: {
- id: null,
- sluiceName: null,
- adcd: null,
- sluiceCode: null,
- location: null,
- plottingSluice: null,
- acceptanceStatus: "0",
- riskEliminationStatus: "0",
- isHubProject: null,
- isGateStation: null,
- isSetGateProject: null,
- sluiceType: null,
- designGateFlow: null,
- verifiedGateFlow: null,
- projectScale: null,
- buildingLevel: null,
- designStandards: null,
- verificationStandards: null,
- historicalMaximumGate: null,
- historicalMaximumDate: null,
- designSeismicIntensity: null,
- gateHolesNumber: null,
- gateHoleWidth: null,
- gateType: null,
- hoistsNumber: null,
- observationProject: null,
- lockChamberStructure: null,
- machineForm: null,
- energyDissipationMethod: null,
- automationControl: null,
- createUid: null,
- updateUid: null,
- createTime: null,
- updateTime: null,
- proNo: null,
- proCode: null,
- relation: null,
- completionTime: null,
- completionAcceptanceTime: null,
- recentCompletionTime: null,
- hubBuildings: null,
- auxiliaryGateHoles: null,
- auxiliaryGateHolesWidth: null,
- },
- };
- 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;
- getSluiceInfo(id).then((response) => {
- this.form = response.data;
- this.open = true;
- this.title = "修改水闸工程基础信息";
- });
+ this.$router.back();
},
/** 提交按钮 */
submitForm() {
@@ -798,15 +594,6 @@ export default {
updateSluiceInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- }
- });
- } else {
- addSluiceInfo(this.form).then((response) => {
- if (response.code === 200) {
- this.msgSuccess("新增成功");
- this.open = false;
this.getList();
}
});
@@ -814,49 +601,6 @@ export default {
}
});
},
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- if (ids) {
- this.$confirm("是否删除选中的数据?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(function () {
- return delSluiceInfo(ids);
- })
- .then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- })
- .catch(function () {});
- } else {
- this.$message.warning("请选择要删除的数据!!");
- }
- },
- /** 导出按钮操作 */
- 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 exportSluiceInfo(queryParams);
- })
- .then((response) => {
- this.downloadFile(response, true, response.msg);
- // this.download(response.msg);
- })
- .catch(function () {});
- },
},
};
diff --git a/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/index.vue b/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/index.vue
index 14a7ba8..96a6e16 100644
--- a/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/index.vue
+++ b/src/views/sluice/engineeringCondition/sluiceBaseInfo/options/index.vue
@@ -22,38 +22,69 @@
@tab-click="handleClick"
style="margin-bottom: 20px"
>
-
-
- 555
+
+
-
- 6666
+