From bd0ae1d9e4ed39ad88f4ddcacef1efac599a2a5e Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 18 Mar 2022 11:13:14 +0800 Subject: [PATCH 1/7] ss --- src/assets/scss/main-shuju.scss | 8 ++ src/router/index.js | 35 +++++-- src/views/main-shuju/main-content.vue | 133 +++++++++++++++++--------- 3 files changed, 123 insertions(+), 53 deletions(-) diff --git a/src/assets/scss/main-shuju.scss b/src/assets/scss/main-shuju.scss index 64eaa42c..092ff796 100644 --- a/src/assets/scss/main-shuju.scss +++ b/src/assets/scss/main-shuju.scss @@ -5,6 +5,14 @@ body { } +.m-iframe { + position: relative; + width: 100vw; + height: calc(100vh - 55px); + margin: -10px; + z-index: 100; +} + /* Reset element-ui ------------------------------ */ .g-bd { diff --git a/src/router/index.js b/src/router/index.js index 6ec6c657..0b1df15f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -298,12 +298,14 @@ router.beforeEach((to, from, next) => { // url: "visual/basicinfo/basicInfoMain", children: [ { - url: "/visual/ai/index", + url: "https://epmet-dev.elinkservice.cn/epmet-oper-gov/#/", + // url: "/visual/ai/index", name: "AI安防", id: "5feawfwa111111efwa57", }, { - url: "/visual/ai/renliu", + url: "http://www.baidu.com", + // url: "/visual/ai/renliu", name: "人流数据", id: "5fwaefwae222112fawef58", }, @@ -477,12 +479,33 @@ function fnAddDynamicMenuRoutes2(menuList = [], routes = []) { eval(s2) ); // URL支持{{ window.xxx }}占位符变量 if (isURL(URL)) { - route["path"] = route["name"] = `i-${menuList[i].id}`; - route["meta"]["iframeURL"] = URL; + if (menuList[i].children && menuList[i].children.length >= 1) { + let item = menuList[i].children.find( + (subMenu) => subMenu.url == menuList[i].url + ); + if (item) { + route["path"] = route["name"] = `i-${menuList[i].id}`; + route["redirect"] = `i-${item.id}`; + } else { + route["path"] = route["name"] = `i-${menuList[i].id}`; + route["meta"]["iframeURL"] = URL; + } + } else { + route["path"] = route["name"] = `i-${menuList[i].id}`; + route["meta"]["iframeURL"] = URL; + } } else { URL = URL.replace(/^\//, "").replace(/_/g, "-"); - route["path"] = route["name"] = URL.replace(/\//g, "-"); - route["component"] = () => import(`@/views/modules/${URL}`); + if (URL.startsWith("unopen")) { + route["path"] = route["name"] = URL.replace(/\//g, "-"); + route["component"] = () => import(`@/views/modules/unopen`); + } else if (menuList[i].children && menuList[i].children.length >= 1) { + route["path"] = route["name"] = URL; + route["redirect"] = URL.replace(/\//g, "-"); + } else { + route["path"] = route["name"] = URL.replace(/\//g, "-"); + route["component"] = () => import(`@/views/modules/${URL}`); + } } routes.push(route); } diff --git a/src/views/main-shuju/main-content.vue b/src/views/main-shuju/main-content.vue index e78235c6..33bc09e8 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -1,98 +1,137 @@ - From 3b3bc96ec57a7cb1708a8c4bb4aaa59ea0f7568e Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 18 Mar 2022 14:12:41 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=B5=8C=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main-shuju/main-content.vue | 29 +++++++++------------------ 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/views/main-shuju/main-content.vue b/src/views/main-shuju/main-content.vue index 33bc09e8..a67827be 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -11,17 +11,16 @@ '&customerId=' + customerId " - ref="iframes" + ref="iframe" class="m-iframe" - id="iframes" + id="iframe" width="100%" height="100%" - style="" frameborder="0" scrolling="yes" - > + /> - + @@ -39,10 +38,12 @@ export default { customerId: "", }; }, + watch: { + // "$router.currentRoute.name": function () { + // console.log($router.currentRoute); + // }, + }, created() { - // this.$nextTick(() => { - // this.sendMessage() - // }) this.token = localStorage.getItem("token"); this.customerId = localStorage.getItem("customerId"); }, @@ -118,18 +119,6 @@ export default { ); this.$router.push({ name: "home" }); }, - sendMessage() { - // const iframe = this.$refs.iframes.contentWindow - const iframe = - document.getElementsByClassName("iframes")[0].contentWindow; - - console.log("iframe", iframe); - // iframe.postMessage({ - // token: localStorage.getItem('token'), - // customerId: localStorage.getItem('customerId') - // }, '*') - iframe.postMessage({ name: "lalalal" }, "*"); - }, }, }; From 24cfd27404e10f1b2679cc32da66b2111656c9a1 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Fri, 18 Mar 2022 16:08:17 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=B5=8C=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 0b1df15f..b8763839 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -298,14 +298,14 @@ router.beforeEach((to, from, next) => { // url: "visual/basicinfo/basicInfoMain", children: [ { - url: "https://epmet-dev.elinkservice.cn/epmet-oper-gov/#/", + url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel", // url: "/visual/ai/index", name: "AI安防", id: "5feawfwa111111efwa57", }, { - url: "http://www.baidu.com", - // url: "/visual/ai/renliu", + // url: "http://www.baidu.com", + url: "/visual/ai/renliu", name: "人流数据", id: "5fwaefwae222112fawef58", }, @@ -325,7 +325,8 @@ router.beforeEach((to, from, next) => { id: "fewafwafewaefddd", }, { - url: "/visual/ai/yujing", + // url: "/visual/ai/yujing", + url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis", name: "预警事件", id: "545345fdsfs", }, From e5d40840349983da3e4b4f8ba05877c6427bc4c6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sat, 19 Mar 2022 10:04:17 +0800 Subject: [PATCH 4/7] =?UTF-8?q?test=E5=88=86=E6=94=AF=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index b8763839..d8f6318f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -300,10 +300,10 @@ router.beforeEach((to, from, next) => { { url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel", // url: "/visual/ai/index", - name: "AI安防", + name: "视频监控", id: "5feawfwa111111efwa57", }, - { + /*{ // url: "http://www.baidu.com", url: "/visual/ai/renliu", name: "人流数据", @@ -323,11 +323,11 @@ router.beforeEach((to, from, next) => { url: "/visual/ai/gongdan", name: "工单数据", id: "fewafwafewaefddd", - }, + },*/ { // url: "/visual/ai/yujing", url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis", - name: "预警事件", + name: "预警分析", id: "545345fdsfs", }, ], From 8d83a70d08e60df0bbd0fa1bebf1a1ac00a9f05f Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 22 Mar 2022 14:55:53 +0800 Subject: [PATCH 5/7] 11 --- src/views/pages/caiji.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/pages/caiji.vue b/src/views/pages/caiji.vue index ec1041c5..1ece6522 100644 --- a/src/views/pages/caiji.vue +++ b/src/views/pages/caiji.vue @@ -308,13 +308,16 @@ export default { computed: { }, - created () { }, - mounted () { + created () { console.log(this.$route) this.shequId = this.$route.params.id this.customerId = this.$route.query.customerId this.shequName = this.$route.query.name + document.title = this.shequName + }, + mounted () { + let envShow = process.env.VUE_APP_NODE_ENV console.log('环境', envShow) From 6118f0e398854e6254787620cac7e960d69ea9f8 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 22 Mar 2022 15:04:54 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=87=87=E9=9B=86=E5=A4=84=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=94=B9=E5=8F=98=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pages/caiji.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/pages/caiji.vue b/src/views/pages/caiji.vue index 1ece6522..f8d9a2a9 100644 --- a/src/views/pages/caiji.vue +++ b/src/views/pages/caiji.vue @@ -203,6 +203,7 @@ import { requestPost } from "@/js/dai/request"; import { Toast } from "mint-ui"; import { MessageBox } from 'mint-ui'; import { Loading } from 'element-ui' // 引入Loading服务 +import { messages } from '@/i18n' let loading // 加载动画 export default { @@ -308,6 +309,7 @@ export default { computed: { }, + created () { console.log(this.$route) @@ -858,7 +860,10 @@ export default { } - } + }, + beforeDestroy () { + document.title = messages[val].brand.lg + }, } From e1fa052b8984d2799a2505b430fa5bf4c547710f Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Tue, 22 Mar 2022 17:11:11 +0800 Subject: [PATCH 7/7] dd --- .../modules/secretaryLog/difficulty/difficultyForm.vue | 6 +++++- src/views/modules/secretaryLog/humanisticCare/careForm.vue | 6 +++++- src/views/modules/secretaryLog/workLog/form.vue | 7 +++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue index 8e4132e0..26361b75 100644 --- a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue +++ b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue @@ -276,7 +276,7 @@ export default { beforeUpload (file) { const array = file.name.split('.') const extension = array[array.length - 1] - + const isLt1M = (file.size / 1024 / 1024) < 5 if (extension !== 'xls' && extension !== 'xlsx' && extension !== 'doc' @@ -285,6 +285,10 @@ export default { this.$message.error('只能上传word、excel、pdf文件!') return false } + if (!isLt1M) { + this.$message.error('上传文件大小不能超过 5MB!') + } + return isLt1M }, diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue index 0dac347a..e4a47683 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careForm.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -331,7 +331,7 @@ export default { beforeUpload (file) { const array = file.name.split('.') const extension = array[array.length - 1] - + const isLt1M = (file.size / 1024 / 1024) < 5 if (extension !== 'xls' && extension !== 'xlsx' && extension !== 'doc' @@ -340,6 +340,10 @@ export default { this.$message.error('只能上传word、excel、pdf文件!') return false } + if (!isLt1M) { + this.$message.error('上传文件大小不能超过 5MB!') + } + return isLt1M }, diff --git a/src/views/modules/secretaryLog/workLog/form.vue b/src/views/modules/secretaryLog/workLog/form.vue index 841cb534..cad4ffea 100644 --- a/src/views/modules/secretaryLog/workLog/form.vue +++ b/src/views/modules/secretaryLog/workLog/form.vue @@ -252,7 +252,7 @@ export default { beforeUpload (file) { const array = file.name.split('.') const extension = array[array.length - 1] - + const isLt1M = (file.size / 1024 / 1024) < 5 if (extension !== 'xls' && extension !== 'xlsx' && extension !== 'doc' @@ -261,7 +261,10 @@ export default { this.$message.error('只能上传word、excel、pdf文件!') return false } - + if (!isLt1M) { + this.$message.error('上传文件大小不能超过 5MB!') + } + return isLt1M }, handleFileRemove (file) {