diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index de07389..eaf942f 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -1,12 +1,22 @@ -@use './variables.scss'; -@use './mixin.scss'; -@use './transition.scss'; -@use './element-ui.scss'; -@use './sidebar.scss'; -@use './btn.scss'; -@use './space.scss'; -@use './flex.scss'; -@use './color.scss'; +// @use './variables.scss'; +// @use './mixin.scss'; +// @use './transition.scss'; +// @use './element-ui.scss'; +// @use './sidebar.scss'; +// @use './btn.scss'; +// @use './space.scss'; +// @use './flex.scss'; +// @use './color.scss'; + +@import './variables.scss'; +@import './mixin.scss'; +@import './transition.scss'; +@import './element-ui.scss'; +@import './sidebar.scss'; +@import './btn.scss'; +@import './space.scss'; +@import './flex.scss'; +@import './color.scss'; body { height: 100%; diff --git a/src/components/linkNameSelect/linkDike.vue b/src/components/linkNameSelect/linkDike.vue index 0ccbbc8..38712cb 100644 --- a/src/components/linkNameSelect/linkDike.vue +++ b/src/components/linkNameSelect/linkDike.vue @@ -61,6 +61,7 @@ export default { pageSize: 10, ids: null, data: { + status:6, dikeName: null, dikeCode: null, }, diff --git a/src/components/linkNameSelect/linkSluice.vue b/src/components/linkNameSelect/linkSluice.vue index 6d42486..dc94592 100644 --- a/src/components/linkNameSelect/linkSluice.vue +++ b/src/components/linkNameSelect/linkSluice.vue @@ -106,6 +106,7 @@ export default { pageSize: 10, ids: null, data: { + status:6, wagaName: null, wagaCode: null, }, diff --git a/src/components/myUpload/index.vue b/src/components/myUpload/index.vue index 49c20c5..2cb19cb 100644 --- a/src/components/myUpload/index.vue +++ b/src/components/myUpload/index.vue @@ -63,7 +63,7 @@ export default { // 点击预览的文件进行下载 handlePreview(file) { - // console.log(file); + console.log(file); getFileStream({ fileName: file.fileName }).then((res) => { const blob = new Blob([res], { // type类型后端返回来的数据中会有,根据自己实际进行修改 diff --git a/src/utils/request.js b/src/utils/request.js index 1d18d7f..cf2b8a6 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -48,7 +48,7 @@ service.interceptors.response.use( type: 'warning' }).then(() => { store.dispatch('LogOut').then(() => { - location.href = '/'; + location.href = 'https://210.76.82.26/wr-portal'; }); }); } @@ -59,7 +59,7 @@ service.interceptors.response.use( type: 'warning' }).then(() => { store.dispatch('LogOut').then(() => { - location.href = '/'; + location.href = 'https://210.76.82.26/wr-portal'; }); }); } else if (code !== 200) { diff --git a/src/views/dike/engineeringCondition/dikeBaseInfo/options/historyOverflowsRecords.vue b/src/views/dike/engineeringCondition/dikeBaseInfo/options/historyOverflowsRecords.vue index 303e08f..24b6945 100644 --- a/src/views/dike/engineeringCondition/dikeBaseInfo/options/historyOverflowsRecords.vue +++ b/src/views/dike/engineeringCondition/dikeBaseInfo/options/historyOverflowsRecords.vue @@ -1,53 +1,195 @@ @@ -297,249 +296,115 @@ - -
- 堤防公告类 -
-
- -
- -
- 堤防警告类 -
-
- - -
- -
- 堤防指引类 -
-
- - -
- -
- 堤防名称类 -
-
- - - +
+
+ + + + + + + + + + + + + + + + +
+ @@ -606,7 +471,7 @@ export default { // 弹出层标题 title: "", // 是否显示弹出层 - open: false, + open: true, // 标牌类型字典 typeOptions: [], // 标识类型字典 @@ -658,13 +523,66 @@ export default { }, dikeNameOptions: [], isEdit: false, - counter0: [{}], - counter1: [{}], - counter2: [{}], - counter3: [{}], + counter0: [], + counter1: [], + counter2: [], + counter3: [], delIdList: [], + activeName: "noticeForm", + editItem: {}, + editIndex: null, + rowIsEdit: false, + search: "", }; }, + computed: { + tabsOpt() { + return [ + { + label: "堤防公告类", + name: "noticeForm", + type: 0, + markTypeOptions: this.markTypeOptions1, + }, + { + label: "堤防警告类", + name: "warnForm", + type: 1, + markTypeOptions: this.markTypeOptions2, + }, + { + label: "堤防指引类", + name: "guideForm", + type: 2, + markTypeOptions: this.markTypeOptions3, + }, + { + label: "堤防名称类", + name: "nameForm", + type: 3, + markTypeOptions: this.markTypeOptions4, + }, + ]; + }, + getTabsOpt() { + return this.tabsOpt.filter((item) => { + return item.name === this.activeName; + })[0]; + }, + getDialogTabelData() { + return this[`counter${this.getTabsOpt.type}`]; + // switch (this.activeName) { + // case "noticeForm": + // return this.counter0; + // case "noticeForm": + // return this.counter0; + // case "noticeForm": + // return this.counter0; + // case "noticeForm": + // return this.counter0; + // } + }, + }, created() { this.getList(); this.getDicts("breastplate_type").then((response) => { @@ -691,6 +609,47 @@ export default { // this.counter1[0] = this.noticeForm; // }, methods: { + formatType(row) { + console.log("row", row); + + let { type, markType } = row; + if (markType) { + const markTypeOptions = "markTypeOptions" + (parseInt(type) + 1); + return this[markTypeOptions].filter((item) => { + return item.dictValue == markType; + })[0].dictLabel; + } else { + return "--"; + } + }, + handleDialogUpdate(row, col, index) { + console.log("row", row, col, index); + this.rowIsEdit = true; + this.editIndex = index; + this.editItem = JSON.parse(JSON.stringify(row)); + }, + handleDialogDelete(row, col, index) { + let { type } = row; + const counterType = "counter" + type; + this.$confirm("是否删除选中的数据?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + console.log("删除", row, index); + this[counterType].splice(index, 1); + }) + .catch(function () {}); + }, + getCounterLen(type) { + const counterType = "counter" + type; + return this[counterType].length; + }, + handleClick() { + this.search = ""; + this.$refs.markForm.resetForm(); + }, formatAdcd(row) { if (row.adcd) { let provinceCode = row.adcd.slice(0, 2); @@ -713,6 +672,19 @@ export default { } } }, + addForm1(rowData) { + console.log("rowData", rowData); + let { type, formData } = rowData; + const counterType = "counter" + type; + console.log(formData); + + if (this.rowIsEdit) { + this[counterType].splice(this.editIndex, 1, formData); + this.rowIsEdit = false; + } else { + this[counterType].push(formData); + } + }, addForm(index, type, formName) { console.log("index和type", index, type); const counterType = "counter" + type; @@ -837,10 +809,10 @@ export default { // 表单重置 reset() { this.delIdList = []; - this.counter0 = [{}]; - this.counter1 = [{}]; - this.counter2 = [{}]; - this.counter3 = [{}]; + this.counter0 = []; + this.counter1 = []; + this.counter2 = []; + this.counter3 = []; this.comForm = { dikeName: null, dikeCode: null, @@ -1001,13 +973,13 @@ export default { 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 = [{}]; + if (this.counter0.length == 0) this.counter0 = []; this.counter1 = response.data.filter((item) => item.type == 1); - if (this.counter1.length == 0) this.counter1 = [{}]; + if (this.counter1.length == 0) this.counter1 = []; this.counter2 = response.data.filter((item) => item.type == 2); - if (this.counter2.length == 0) this.counter2 = [{}]; + if (this.counter2.length == 0) this.counter2 = []; this.counter3 = response.data.filter((item) => item.type == 3); - if (this.counter3.length == 0) this.counter3 = [{}]; + if (this.counter3.length == 0) this.counter3 = []; console.log("回显的数据时的counter0", this.counter0); console.log("回显的数据时的counter1", this.counter1); console.log("回显的数据时的counter2", this.counter2); @@ -1017,6 +989,73 @@ export default { }); }, /** 提交按钮 */ + submitForm1() { + let isAllTrue = + this.counter0.length || + this.counter1.length || + this.counter2.length || + this.counter3.length + ? true + : false; + + this.$refs["comForm"].validate((valid0) => { + if (valid0) { + if (!isAllTrue) { + this.msgError("堤防标识标牌列表数据为空"); + return; + } + this.counter0.forEach((item) => { + if (item) { + item = { ...item, ...this.comForm }; + } + }); + this.counter1.forEach((item) => { + if (item) { + item = { ...item, ...this.comForm }; + } + }); + this.counter2.forEach((item) => { + if (item) { + item = { ...item, ...this.comForm }; + } + }); + this.counter3.forEach((item) => { + if (item) { + item = { ...item, ...this.comForm }; + } + }); + + if (this.isEdit) { + updateDikeMark([ + ...this.counter0, + ...this.counter1, + ...this.counter2, + ...this.counter3, + ]).then((response) => { + if (response.code === 200) { + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); + } + }); + if (this.delIdList.length > 0) delDikeMark(this.delIdList); + } else { + addDikeMark([ + ...this.counter0, + ...this.counter1, + ...this.counter2, + ...this.counter3, + ]).then((response) => { + if (response.code === 200) { + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); + } + }); + } + } + }); + }, submitForm() { // console.log(1111111111, this.$refs.noticeForm0[0].$refs.form); // 表单校验 @@ -1065,26 +1104,26 @@ export default { this.counter0.length > 1 ? this.counter0 : this.$refs["noticeForm0"][0].form.markName - ? [this.$refs["noticeForm0"][0].form] - : []; + ? [this.$refs["noticeForm0"][0].form] + : []; const C1 = this.counter1.length > 1 ? this.counter1 : this.$refs["warnForm0"][0].form.markName - ? [this.$refs["warnForm0"][0].form] - : []; + ? [this.$refs["warnForm0"][0].form] + : []; const C2 = this.counter2.length > 1 ? this.counter2 : this.$refs["guideForm0"][0].form.markName - ? [this.$refs["guideForm0"][0].form] - : []; + ? [this.$refs["guideForm0"][0].form] + : []; const C3 = this.counter3.length > 1 ? this.counter3 : this.$refs["nameForm0"][0].form.markName - ? [this.$refs["nameForm0"][0].form] - : []; + ? [this.$refs["nameForm0"][0].form] + : []; // console.log("C0C0", C0, C1); if (this.isEdit) { diff --git a/src/views/dike/safetyManage/declarationManage/declare/components/listPage/index.vue b/src/views/dike/safetyManage/declarationManage/declare/components/listPage/index.vue index d1586a7..c20c0b8 100644 --- a/src/views/dike/safetyManage/declarationManage/declare/components/listPage/index.vue +++ b/src/views/dike/safetyManage/declarationManage/declare/components/listPage/index.vue @@ -1338,7 +1338,7 @@ export default { } }); } else { - this.chartEleGetData(); + // this.chartEleGetData(); addJbxx(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("新增成功"); diff --git a/src/views/dike/safetyManage/declarationManage/declare/index.vue b/src/views/dike/safetyManage/declarationManage/declare/index.vue index 238fb5f..844031d 100644 --- a/src/views/dike/safetyManage/declarationManage/declare/index.vue +++ b/src/views/dike/safetyManage/declarationManage/declare/index.vue @@ -11,7 +11,7 @@ - + diff --git a/vue.config.js b/vue.config.js index d4c5a90..6859414 100644 --- a/vue.config.js +++ b/vue.config.js @@ -80,8 +80,8 @@ module.exports = { changeOrigin: true, }, [process.env.VUE_APP_BASE_API]: { - // target: "http://shuili.product.dev.com:30115/", - target: "http://172.16.34.80:18082/", + target: "http://shuili.product.dev.com:30115/", + // target: "http://192.168.31.26:18082/", // target: 'http://172.16.32.62:18888/', // target: "http://172.16.34.27:18082", changeOrigin: true,