From 0a87850bce2e6fb59d0e3ce9889a45a425d94dcf Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 24 Sep 2024 09:50:55 +0800 Subject: [PATCH 1/9] =?UTF-8?q?add:=E5=A6=82=E6=9E=9C=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=B8=BAtarget=3D=5Fblank,=E5=88=99=E7=94=A8?= =?UTF-8?q?window.open()=E6=89=93=E5=BC=80=E6=96=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 2702594d8..0ad413443 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -942,9 +942,20 @@ const router = new Router({ }), routes: pageRoutes.concat(moduleRoutes, moduleShujuRoutes, dataBoardRoutes), }); + router.beforeEach((to, from, next) => { // 添加动态(菜单)路由 // 已添加或者当前路由为页面路由, 可直接访问 + let toUrl = to.meta.iframeURL + if (toUrl && toUrl.indexOf("target=_blank") != -1) { + // 此处请求后端,获取一个ticket票据 + http.get("/auth/sso/getTicket") + .then(({data: res}) => { + let ticket = res.data + window.open(toUrl + ticket) + }) + return null; + } if (to.name === "caiji") { return next(); } @@ -982,7 +993,7 @@ router.beforeEach((to, from, next) => { }); return next({ name: "login", - query: { redirect: to.fullPath } + query: { redirect: to.fullPath } }); } window.SITE_CONFIG["menuShujuList"] = res.data; @@ -996,7 +1007,7 @@ router.beforeEach((to, from, next) => { console.log(err); next({ name: "login", - query: { redirect: to.fullPath } + query: { redirect: to.fullPath } }); }); http @@ -1013,7 +1024,7 @@ router.beforeEach((to, from, next) => { }); return next({ name: "login", - query: { redirect: to.fullPath } + query: { redirect: to.fullPath } }); } window.SITE_CONFIG["menuList"] = res.data @@ -1031,7 +1042,7 @@ router.beforeEach((to, from, next) => { console.log(err); next({ name: "login", - query: { redirect: to.fullPath } + query: { redirect: to.fullPath } }); }); }); From de5422a404c6f23601e52b698e0aae7365281803 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 24 Sep 2024 18:19:30 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E9=92=88=E5=AF=B9=E5=BF=97=E6=84=BF?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E6=8E=A5=E5=85=A5=E4=BF=AE=E6=94=B9=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index 0ad413443..597bc3b38 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -947,7 +947,8 @@ router.beforeEach((to, from, next) => { // 添加动态(菜单)路由 // 已添加或者当前路由为页面路由, 可直接访问 let toUrl = to.meta.iframeURL - if (toUrl && toUrl.indexOf("target=_blank") != -1) { + console.log("=====", toUrl) + if (toUrl && toUrl.indexOf("ticket=") != -1) { // 此处请求后端,获取一个ticket票据 http.get("/auth/sso/getTicket") .then(({data: res}) => { From e3978990cdba2818dc7af7cc456b1f8c8994be48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Wed, 25 Sep 2024 19:13:24 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=B8=BA1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/volunteer/VolunteerProjects/add.vue | 2 +- src/views/modules/volunteer/VolunteerProjects/edit.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/volunteer/VolunteerProjects/add.vue b/src/views/modules/volunteer/VolunteerProjects/add.vue index 73873cb40..d831441fd 100644 --- a/src/views/modules/volunteer/VolunteerProjects/add.vue +++ b/src/views/modules/volunteer/VolunteerProjects/add.vue @@ -49,7 +49,7 @@ - + diff --git a/src/views/modules/volunteer/VolunteerProjects/edit.vue b/src/views/modules/volunteer/VolunteerProjects/edit.vue index 0d1cd2a9b..4cb4cd498 100644 --- a/src/views/modules/volunteer/VolunteerProjects/edit.vue +++ b/src/views/modules/volunteer/VolunteerProjects/edit.vue @@ -49,7 +49,7 @@ - + From e672be1324e2947185d7ba776a4373a1b88a9d0c Mon Sep 17 00:00:00 2001 From: wxz Date: Thu, 26 Sep 2024 09:33:37 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0localhost=E9=85=8D?= =?UTF-8?q?=E7=BD=AE,=E5=90=8E=E7=AB=AF=E8=87=AA=E5=B7=B1=E7=94=A8?= =?UTF-8?q?=E7=9A=84,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.localhost | 19 +++++++++++++++++++ package.json | 1 + 2 files changed, 20 insertions(+) create mode 100644 .env.localhost diff --git a/.env.localhost b/.env.localhost new file mode 100644 index 000000000..9c8490046 --- /dev/null +++ b/.env.localhost @@ -0,0 +1,19 @@ +NODE_ENV=development + +# VUE_APP_API_SERVER = https://epmet-preview.elinkservice.cn/api +# VUE_APP_API_SERVER = http://192.168.1.60:8080/api +VUE_APP_API_SERVER = http://localhost:8080/api +# VUE_APP_API_SERVER = http://219.146.91.110:30801/api219.146.91.110:30801 +# VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api +# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api +# VUE_APP_API_SERVER = https://epmet-cloud.elinkservice.cn/api +# VUE_APP_API_SERVER = https://epdc-shibei.elinkservice.cn/api +# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api +# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api + +VUE_APP_BIPASS_API_SERVER = /linkdata/linkdata-gateway/route + +# VUE_APP_NODE_ENV=dev_sdtdt +VUE_APP_NODE_ENV=dev +#项目根路径 +VUE_APP_PUBLIC_PATH=epmet-oper diff --git a/package.json b/package.json index 1bb574cc2..5ce162d98 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.0.0", "private": true, "scripts": { + "localhost": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve --mode localhost", "dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve", "serve": "vue-cli-service serve", "build": "vue-cli-service build", From 28c30ebf7ac9c5e3521d011286ee2b996a269272 Mon Sep 17 00:00:00 2001 From: duanliangtao <48194157+duanliangtao@users.noreply.github.com> Date: Fri, 27 Sep 2024 14:10:47 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=BF=97=E6=84=BF=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E7=9A=84iframe=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/volunteer/mall/index.vue | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/views/modules/volunteer/mall/index.vue diff --git a/src/views/modules/volunteer/mall/index.vue b/src/views/modules/volunteer/mall/index.vue new file mode 100644 index 000000000..8ef16ac3d --- /dev/null +++ b/src/views/modules/volunteer/mall/index.vue @@ -0,0 +1,71 @@ + + + + + From 2f8d0be3dd696798955103bfbd3a8b6090e032fd Mon Sep 17 00:00:00 2001 From: duanliangtao <48194157+duanliangtao@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:48:40 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/volunteer/mall/category.vue | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/views/modules/volunteer/mall/category.vue diff --git a/src/views/modules/volunteer/mall/category.vue b/src/views/modules/volunteer/mall/category.vue new file mode 100644 index 000000000..8728dcb27 --- /dev/null +++ b/src/views/modules/volunteer/mall/category.vue @@ -0,0 +1,71 @@ + + + + + From 28035c8493b09396ec8240eb89dadfb3258392a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Sun, 29 Sep 2024 15:28:17 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/volunteer/VoluntaryOrganization/index.vue | 2 +- src/views/modules/volunteer/VoluntaryOrganization/process.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/volunteer/VoluntaryOrganization/index.vue b/src/views/modules/volunteer/VoluntaryOrganization/index.vue index 1203d0620..833c22e77 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/index.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/index.vue @@ -78,7 +78,7 @@ @click="handleshowMember(scope.row)">成员管理 删除 - 审核 diff --git a/src/views/modules/volunteer/VoluntaryOrganization/process.vue b/src/views/modules/volunteer/VoluntaryOrganization/process.vue index 567c73106..e3f893117 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/process.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/process.vue @@ -44,7 +44,7 @@
- +
From cacb91dff4e574191e4f9b3ed2b854458f0d5425 Mon Sep 17 00:00:00 2001 From: duanliangtao <48194157+duanliangtao@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:46:32 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dticket=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/volunteer/mall/category.vue | 71 ++++++++++--------- src/views/modules/volunteer/mall/index.vue | 71 ++++++++++--------- 2 files changed, 78 insertions(+), 64 deletions(-) diff --git a/src/views/modules/volunteer/mall/category.vue b/src/views/modules/volunteer/mall/category.vue index 8728dcb27..a0bb79e6f 100644 --- a/src/views/modules/volunteer/mall/category.vue +++ b/src/views/modules/volunteer/mall/category.vue @@ -26,46 +26,53 @@ export default { created() { // 此处请求后端,获取一个ticket票据 http.get("/auth/sso/getTicket") - .then(({data: res}) => { - let ticket = res.data - console.log('ticket:', ticket) - this.iframeSrc = "../../../epmet-voluntary-mall-admin/pms/productCategory?target=_blank&ticket=" + ticket - }) + .then(({ data: res }) => { + let ticket = res.data; + console.log('ticket:', ticket); + this.iframeSrc = "../../../epmet-voluntary-mall-admin/pms/productCategory?ticket=" + ticket; + }); }, methods: { // 监听 iframe 加载完成事件 onIframeLoad() { - // 获取 iframe 的内容窗口 - const iframe = this.$refs.childIframe; - const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; + + if(this.iframeSrc==''){ + return; + } - if (iframeDocument) { - const styleElement = iframeDocument.createElement('style'); - styleElement.type = 'text/css'; - - const newStyles = ` - #app .main-container { - margin-left: 0px !important; - } - #app .sidebar-container { - display: none !important; - } - .navbar { - display: none !important; - } - `; - - styleElement.appendChild(iframeDocument.createTextNode(newStyles)); - - iframeDocument.head.appendChild(styleElement); + const iframe = this.$refs.childIframe; + + if (this.iframeSrc.indexOf("ticket")!== -1) { + // 将 iframeSrc 设置为新的 URL(去掉了 ticket 参数) + this.iframeSrc = "../../../epmet-voluntary-mall-admin/pms/productCategory"; + }else{ + const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; - // 显示 iframe - iframe.style.display = 'block'; + if (iframeDocument) { + const styleElement = iframeDocument.createElement('style'); + styleElement.type = 'text/css'; + + const newStyles = ` + #app .main-container { + margin-left: 0px !important; + } + #app .sidebar-container { + display: none !important; + } + .navbar { + display: none !important; + } + `; + + styleElement.appendChild(iframeDocument.createTextNode(newStyles)); + iframeDocument.head.appendChild(styleElement); + + // 显示 iframe + iframe.style.display = 'block'; + } } + } } }; - - diff --git a/src/views/modules/volunteer/mall/index.vue b/src/views/modules/volunteer/mall/index.vue index 8ef16ac3d..76fe73744 100644 --- a/src/views/modules/volunteer/mall/index.vue +++ b/src/views/modules/volunteer/mall/index.vue @@ -26,46 +26,53 @@ export default { created() { // 此处请求后端,获取一个ticket票据 http.get("/auth/sso/getTicket") - .then(({data: res}) => { - let ticket = res.data - console.log('ticket:', ticket) - this.iframeSrc = "../../../epmet-voluntary-mall-admin/pms/product?target=_blank&ticket=" + ticket - }) + .then(({ data: res }) => { + let ticket = res.data; + console.log('ticket:', ticket); + this.iframeSrc = "../../../epmet-voluntary-mall-admin/pms/product?ticket=" + ticket; + }); }, methods: { // 监听 iframe 加载完成事件 onIframeLoad() { - // 获取 iframe 的内容窗口 - const iframe = this.$refs.childIframe; - const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; + + if(this.iframeSrc==''){ + return; + } - if (iframeDocument) { - const styleElement = iframeDocument.createElement('style'); - styleElement.type = 'text/css'; - - const newStyles = ` - #app .main-container { - margin-left: 0px !important; - } - #app .sidebar-container { - display: none !important; - } - .navbar { - display: none !important; - } - `; - - styleElement.appendChild(iframeDocument.createTextNode(newStyles)); - - iframeDocument.head.appendChild(styleElement); + const iframe = this.$refs.childIframe; + + if (this.iframeSrc.indexOf("ticket")!== -1) { + // 将 iframeSrc 设置为新的 URL(去掉了 ticket 参数) + this.iframeSrc = "../../../epmet-voluntary-mall-admin/pms/product"; + }else{ + const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; - // 显示 iframe - iframe.style.display = 'block'; + if (iframeDocument) { + const styleElement = iframeDocument.createElement('style'); + styleElement.type = 'text/css'; + + const newStyles = ` + #app .main-container { + margin-left: 0px !important; + } + #app .sidebar-container { + display: none !important; + } + .navbar { + display: none !important; + } + `; + + styleElement.appendChild(iframeDocument.createTextNode(newStyles)); + iframeDocument.head.appendChild(styleElement); + + // 显示 iframe + iframe.style.display = 'block'; + } } + } } }; - - From 00a5fec89106e5ba32c85e3caa01dde6e310c637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Mon, 30 Sep 2024 14:41:09 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E5=AE=A1=E6=A0=B8=E5=8F=AA=E6=98=BE=E7=A4=BA=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=EF=BC=8C=E7=BB=84=E7=BB=87=E7=B1=BB=E5=9E=8B=E5=88=86?= =?UTF-8?q?=E4=B8=80=E4=BA=8C=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../volunteer/LifeCircleManagement/add.vue | 8 +- .../volunteer/VoluntaryOrganization/add.vue | 214 ++++++------------ .../volunteer/VoluntaryOrganization/index.vue | 27 ++- .../volunteer/VoluntaryOrganization/info.vue | 3 +- .../volunteer/VolunteerProjects/add.vue | 14 -- 5 files changed, 99 insertions(+), 167 deletions(-) diff --git a/src/views/modules/volunteer/LifeCircleManagement/add.vue b/src/views/modules/volunteer/LifeCircleManagement/add.vue index b021f4be5..9cf0b9ec3 100644 --- a/src/views/modules/volunteer/LifeCircleManagement/add.vue +++ b/src/views/modules/volunteer/LifeCircleManagement/add.vue @@ -336,7 +336,13 @@ "label": "文化体育" }, { - "children": [], + "children": [ + { + "pv":"5", + "value": "51", + "label": "其他" + }, + ], "value": "5", "label": "其它" } diff --git a/src/views/modules/volunteer/VoluntaryOrganization/add.vue b/src/views/modules/volunteer/VoluntaryOrganization/add.vue index 02ce1d507..2e1c8f4b2 100644 --- a/src/views/modules/volunteer/VoluntaryOrganization/add.vue +++ b/src/views/modules/volunteer/VoluntaryOrganization/add.vue @@ -13,13 +13,13 @@
- - + @@ -28,7 +28,7 @@ - +