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/8] 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/8] =?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 7c8516f5d63fb39dd404bb9de78c8a8f0c4baf02 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 18 Mar 2022 15:48:27 +0800 Subject: [PATCH 3/8] dd --- src/views/main-content.vue | 3 ++ .../modules/base/community/communityTable.vue | 31 +++++++++++++++++-- .../modules/secretaryLog/workLog/form.vue | 4 +-- .../modules/secretaryLog/workLog/index.vue | 4 +-- src/views/tips.vue | 2 +- 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/views/main-content.vue b/src/views/main-content.vue index 569b149f..5d3efcbd 100644 --- a/src/views/main-content.vue +++ b/src/views/main-content.vue @@ -134,6 +134,9 @@ export default { this.loopTips() }, + destroyed() { + this.$store.dispatch('clearInter') + }, computed: { msgList() { return this.$store.state.tipsList diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index e14dd753..91079e08 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -33,6 +33,10 @@ class="diy-button--reset" size="small" @click="resetSearch">重置 +
+ 进入 --> 查看 + @click="handleDownQr(scope.row)">二维码 { + console.log('res----1r', res) + if (res.headers["content-disposition"]) { + let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1]) + console.log('filename', fileName) + this.download(res.data, fileName) //释放掉blob对象 + } else this.$message.error('下载失败') + // this.download(res.data, '1.png') + }) + }, //导出表格 async handleExport () { let title = this.agencyObj.label diff --git a/src/views/modules/secretaryLog/workLog/form.vue b/src/views/modules/secretaryLog/workLog/form.vue index b203816a..51e27374 100644 --- a/src/views/modules/secretaryLog/workLog/form.vue +++ b/src/views/modules/secretaryLog/workLog/form.vue @@ -16,7 +16,7 @@ type="textarea" maxlength="100" show-word-limit - :rows="3" + :rows="4" :disabled="disabled" placeholder="请输入内容" v-model="formData.content"> @@ -30,7 +30,7 @@ type="textarea" maxlength="100" show-word-limit - :rows="3" + :rows="4" :disabled="disabled" placeholder="请输入工作事项" v-model="formData.workType"> diff --git a/src/views/modules/secretaryLog/workLog/index.vue b/src/views/modules/secretaryLog/workLog/index.vue index e448cb0c..04a33afd 100644 --- a/src/views/modules/secretaryLog/workLog/index.vue +++ b/src/views/modules/secretaryLog/workLog/index.vue @@ -150,7 +150,7 @@ :close-on-click-modal="false" :close-on-press-escape="false" :title="formTitle" - width="70%" + width="50%" top="5vh" class="dialog-h" @closed="diaClose"> @@ -309,7 +309,7 @@ export default { }, async deleteDifficulty (row) { - const url = "/gov/project/memoDifficulty/delete" + const url = "/gov/project/memoWorkDiary/delete" // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/delete" let ids = [row.id] let params = { diff --git a/src/views/tips.vue b/src/views/tips.vue index 5b350bd5..b7b451d9 100644 --- a/src/views/tips.vue +++ b/src/views/tips.vue @@ -70,7 +70,7 @@ export default { } .tips-wr-desc { width: 100%; - height: 33px; + height: 32px; margin-top: 10px; padding-left: 20px; display: -webkit-box; 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 4/8] =?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 fc1f1c9613a7ef5d3dfdee18b745b45983ed3c4a Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 18 Mar 2022 16:40:44 +0800 Subject: [PATCH 5/8] dd --- .../secretaryLog/difficulty/difficultyForm.vue | 11 ++++++++--- .../modules/secretaryLog/humanisticCare/careForm.vue | 9 ++++++++- src/views/modules/secretaryLog/workLog/form.vue | 3 +++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue index 240a320a..3041886f 100644 --- a/src/views/modules/secretaryLog/difficulty/difficultyForm.vue +++ b/src/views/modules/secretaryLog/difficulty/difficultyForm.vue @@ -17,7 +17,8 @@ type="textarea" maxlength="100" show-word-limit - :rows="3" + :rows="4" + clearable placeholder="请输入内容" v-model="formData.content"> @@ -30,7 +31,8 @@ type="textarea" maxlength="100" show-word-limit - :rows="3" + :rows="4" + clearable placeholder="请输入解决方式" v-model="formData.resolveWay"> @@ -44,6 +46,7 @@ format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" + clearable placeholder="选择时间"> @@ -56,6 +59,7 @@ format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" + clearable :picker-options="pickerOptions" @change="handleTime" placeholder="选择时间"> @@ -70,7 +74,8 @@ type="textarea" maxlength="100" show-word-limit - :rows="3" + :rows="4" + clearable placeholder="请输入备注" v-model="formData.remark"> diff --git a/src/views/modules/secretaryLog/humanisticCare/careForm.vue b/src/views/modules/secretaryLog/humanisticCare/careForm.vue index 4c9fba45..27fff5c1 100644 --- a/src/views/modules/secretaryLog/humanisticCare/careForm.vue +++ b/src/views/modules/secretaryLog/humanisticCare/careForm.vue @@ -15,6 +15,7 @@ style="display: block"> @@ -25,6 +26,7 @@ style="display: block"> @@ -35,6 +37,7 @@ style="display: block"> @@ -44,6 +47,7 @@ style="display: block"> @@ -56,7 +60,8 @@ type="textarea" maxlength="100" show-word-limit - :rows="3" + :rows="4" + clearable placeholder="请输入关怀事项" v-model="formData.content"> @@ -70,6 +75,7 @@ format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" + clearable placeholder="选择时间"> @@ -82,6 +88,7 @@ format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" + clearable :picker-options="pickerOptions" @change="handleTime" placeholder="选择时间"> diff --git a/src/views/modules/secretaryLog/workLog/form.vue b/src/views/modules/secretaryLog/workLog/form.vue index 51e27374..56a4b6f6 100644 --- a/src/views/modules/secretaryLog/workLog/form.vue +++ b/src/views/modules/secretaryLog/workLog/form.vue @@ -17,6 +17,7 @@ maxlength="100" show-word-limit :rows="4" + clearable :disabled="disabled" placeholder="请输入内容" v-model="formData.content"> @@ -31,6 +32,7 @@ maxlength="100" show-word-limit :rows="4" + clearable :disabled="disabled" placeholder="请输入工作事项" v-model="formData.workType"> @@ -44,6 +46,7 @@ format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" type="datetime" + clearable :disabled="disabled" :picker-options="pickerOptions" @change="handleTime" From d0c277cb20d1ccf1a818eff70755b022e2bf3e8d Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 18 Mar 2022 17:06:15 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E4=BA=8C=E7=BB=B4?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/buttonstyle.scss | 12 ++++++- .../modules/base/community/communityTable.vue | 32 ++++++++++++++----- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/assets/scss/buttonstyle.scss b/src/assets/scss/buttonstyle.scss index a5f6b533..92a5b2e3 100644 --- a/src/assets/scss/buttonstyle.scss +++ b/src/assets/scss/buttonstyle.scss @@ -81,7 +81,11 @@ background-color: #3e8ef7 !important; border-color: #3e8ef7 !important; } - +.diy-button--qrcode { + color: #fff !important; + background-color: #4ec591 !important; + border-color: #4ec591 !important; +} //table按钮样式 //查看 @@ -101,3 +105,9 @@ color: #d51010 !important; text-decoration: underline !important; } + +// +.div-table-button--qr { + color: #4ec591 !important; + text-decoration: underline !important; +} \ No newline at end of file diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 91079e08..901ec305 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -103,6 +103,10 @@ class="diy-button--reset" size="small" @click="handleExport">导出 + 社区二维码
@@ -123,11 +127,11 @@ -