From acff3a6edda93171d1719df9826c29f53f9d0f64 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 15 Aug 2022 13:39:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8B=89=E5=8F=96?= =?UTF-8?q?=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worklog/icworklog-add-or-update.vue | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/views/modules/worklog/icworklog-add-or-update.vue b/src/views/modules/worklog/icworklog-add-or-update.vue index 0b28978eb..c0af91597 100644 --- a/src/views/modules/worklog/icworklog-add-or-update.vue +++ b/src/views/modules/worklog/icworklog-add-or-update.vue @@ -13,6 +13,7 @@ :key="item.value" :label="item.label" :value="item.value" + :disabled="item.disabled" > @@ -69,7 +70,6 @@ --> { this.$refs['dataForm'].resetFields() this.dataForm.fileList = [] @@ -171,6 +166,15 @@ export default { ...this.dataForm, ...res.data } + + const grid = this.optionsG.filter(item => item.value === res.data.gridId) + if (grid.length < 1) { + this.gridState = false + this.optionsG.push({label:res.data.gridName, value:res.data.gridId, disabled: true}) + } else { + this.gridState = true + } + const { id } = this.$store.state.user if (this.dataForm.createdBy == id) { // 是本人可以修改 this.formType = 'update' @@ -197,9 +201,9 @@ export default { } }, getGridList() { - const { user } = this.$store.state + this.optionsG = [] this.$http - .post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' }) + .post('/gov/mine/agency/getmygrids') .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -327,6 +331,11 @@ export default { }, // 表单提交 dataFormSubmitHandle: debounce(function () { + if (!this.gridState) { + this.dataForm.gridId = '' + this.gridState = true + return this.$message.error("请重新选择网格") + } if (this.dataForm.content.length < 70) { return this.$message.error("内容不能少于70字") } From 3678f109e149dd335584d1d280ac353b9cec5ab2 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 15 Aug 2022 13:53:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/worklog/icworklog-add-or-update.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/modules/worklog/icworklog-add-or-update.vue b/src/views/modules/worklog/icworklog-add-or-update.vue index c0af91597..be6427e3f 100644 --- a/src/views/modules/worklog/icworklog-add-or-update.vue +++ b/src/views/modules/worklog/icworklog-add-or-update.vue @@ -10,9 +10,9 @@ > @@ -170,7 +170,7 @@ export default { const grid = this.optionsG.filter(item => item.value === res.data.gridId) if (grid.length < 1) { this.gridState = false - this.optionsG.push({label:res.data.gridName, value:res.data.gridId, disabled: true}) + this.optionsG.push({gridName:res.data.gridName, gridId:res.data.gridId, disabled: true}) } else { this.gridState = true } From e96196bd170c2163f438ee825dea8bafb9c6b9e5 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 15 Aug 2022 15:51:44 +0800 Subject: [PATCH 3/4] bug --- src/views/modules/worklog/icworklog-add-or-update.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/modules/worklog/icworklog-add-or-update.vue b/src/views/modules/worklog/icworklog-add-or-update.vue index be6427e3f..bacf3a21e 100644 --- a/src/views/modules/worklog/icworklog-add-or-update.vue +++ b/src/views/modules/worklog/icworklog-add-or-update.vue @@ -167,8 +167,8 @@ export default { ...res.data } - const grid = this.optionsG.filter(item => item.value === res.data.gridId) - if (grid.length < 1) { + const grid = this.optionsG.filter(item => item.gridId === res.data.gridId) + if (grid.length < 1 && res.data.gridId !== '') { this.gridState = false this.optionsG.push({gridName:res.data.gridName, gridId:res.data.gridId, disabled: true}) } else { @@ -201,7 +201,6 @@ export default { } }, getGridList() { - this.optionsG = [] this.$http .post('/gov/mine/agency/getmygrids') .then(({ data: res }) => { From 8fef272a6de4516b79a4a52d68350c536814d304 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Tue, 16 Aug 2022 11:21:00 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=83=9F=E5=8F=B0=E5=AE=9A=E5=88=B6?= =?UTF-8?q?=E6=8C=87=E6=8C=A5=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/modules/visual/command.scss | 11 +- .../visual/command/cpts/yantai-sidemenu1.vue | 309 ++++++++++++++++++ .../visual/command/cpts/yantai-sidemenu2.vue | 309 ++++++++++++++++++ src/views/modules/visual/command/index.vue | 94 ++++-- 4 files changed, 699 insertions(+), 24 deletions(-) create mode 100644 src/views/modules/visual/command/cpts/yantai-sidemenu1.vue create mode 100644 src/views/modules/visual/command/cpts/yantai-sidemenu2.vue diff --git a/src/assets/scss/modules/visual/command.scss b/src/assets/scss/modules/visual/command.scss index ee0138343..d827e4cb4 100644 --- a/src/assets/scss/modules/visual/command.scss +++ b/src/assets/scss/modules/visual/command.scss @@ -193,6 +193,13 @@ width: 360px; height: calc(825px - 15px); + .menu { + position: relative; + width: 100%; + margin-bottom: 20px; + // height: calc((825px - 15px - 20px) / 2); + } + .title { margin-bottom: 10px; padding: 4px 0; @@ -212,9 +219,9 @@ } } - .list { + .wrap { margin-right: -8px; - height: calc(825px - 120px); + height: calc(825px - 45px); overflow-y: auto; overflow-x: hidden; @include scrollBar; diff --git a/src/views/modules/visual/command/cpts/yantai-sidemenu1.vue b/src/views/modules/visual/command/cpts/yantai-sidemenu1.vue new file mode 100644 index 000000000..84987fb13 --- /dev/null +++ b/src/views/modules/visual/command/cpts/yantai-sidemenu1.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/src/views/modules/visual/command/cpts/yantai-sidemenu2.vue b/src/views/modules/visual/command/cpts/yantai-sidemenu2.vue new file mode 100644 index 000000000..ab06949f2 --- /dev/null +++ b/src/views/modules/visual/command/cpts/yantai-sidemenu2.vue @@ -0,0 +1,309 @@ + + + + + diff --git a/src/views/modules/visual/command/index.vue b/src/views/modules/visual/command/index.vue index 56017d830..52d637a5b 100644 --- a/src/views/modules/visual/command/index.vue +++ b/src/views/modules/visual/command/index.vue @@ -159,20 +159,39 @@
- -
- - 指挥调度 -
+ +
+ + + +
+
@@ -215,7 +234,8 @@ import { requestPost } from "@/js/dai/request"; import People from "@/views/modules/visual/basicinfo/people"; import cptCard from "@/views/modules/visual/cpts/card"; import gridMap from "@/views/modules/visual/command/cpts/map"; -import sidemenu from "@/views/modules/visual/command/cpts/sidemenu"; +import sidemenu1 from "@/views/modules/visual/command/cpts/yantai-sidemenu1"; +import sidemenu2 from "@/views/modules/visual/command/cpts/yantai-sidemenu2"; import sidemenuLeft from "@/views/modules/visual/command/cpts/sidemenu-left"; import ScreenLoading from "@/views/modules/visual/cpts/loading"; @@ -267,7 +287,8 @@ export default { cptCard, ScreenLoading, gridMap, - sidemenu, + sidemenu1, + sidemenu2, sidemenuLeft, eventInfo, serviceInfo, @@ -297,8 +318,8 @@ export default { selUserId: "", dotList: [], - categoryKeys: [], - coverageTypes: [], + categoryKeys: [[], []], + coverageTypes: [[], []], dotIcoList: { anzhibangjiao: require("@/assets/img/shuju/command/ico/anzhibangjiao.png"), @@ -550,7 +571,36 @@ export default { console.log(obj); }, - handleChangeMenu(list) { + handleChangeMenu1(list) { + console.log("handleChangeMenu", list); + let categoryKeys = []; + let coverageTypes = []; + list.forEach((item) => { + if (item.selected) { + coverageTypes.push(item.coverageType); + } + item.categories.forEach((subitem) => { + if (subitem.selected) { + coverageTypes.push(item.coverageType); + categoryKeys.push(subitem.categoryKey); + } + }); + + item.placeTypesInAnalysis.forEach((subitem) => { + subitem.categories.forEach((subitem2) => { + if (subitem2.selected) { + categoryKeys.push(subitem2.categoryKey); + coverageTypes.push(subitem2.coverageType); + } + }); + }); + }); + this.categoryKeys[0] = [...new Set(categoryKeys)]; + this.coverageTypes[0] = [...new Set(coverageTypes)]; + this.requestMapDot(); + }, + + handleChangeMenu2(list) { console.log("handleChangeMenu", list); let categoryKeys = []; let coverageTypes = []; @@ -574,8 +624,8 @@ export default { }); }); }); - this.categoryKeys = [...new Set(categoryKeys)]; - this.coverageTypes = [...new Set(coverageTypes)]; + this.categoryKeys[1] = [...new Set(categoryKeys)]; + this.coverageTypes[1] = [...new Set(coverageTypes)]; this.requestMapDot(); }, @@ -585,8 +635,8 @@ export default { let params = { orgId: this.orgId, orgType: "agency", - coverageTypes: this.coverageTypes, - categoryKeys: this.categoryKeys, + coverageTypes: [...this.coverageTypes[0], ...this.coverageTypes[1]], + categoryKeys: [...this.categoryKeys[0], ...this.categoryKeys[1]], isPage: false, };