From 916128e753bb1cefedae5e00a9a8a6dce9a73818 Mon Sep 17 00:00:00 2001 From: "wu.jian2" Date: Tue, 7 Nov 2023 13:46:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86=E9=A1=B9=E7=9B=AE=E4=B8=AD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=BA=86=20window.open(bigScreenHref,=20'=5F?= =?UTF-8?q?self')=E7=9A=84=E5=9C=B0=E6=96=B9=E8=B0=83=E6=95=B4=E4=B8=BAthi?= =?UTF-8?q?s..push=EF=BC=8C=E8=A7=A3=E5=86=B3=E8=B7=AF=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E9=9D=9E=E6=8C=87=E5=AE=9A=E8=B7=AF=E7=94=B1=E4=B8=8A?= =?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 --- .../packages/BigScreenList/EditForm.vue | 10 ++++- data-room-ui/packages/BigScreenList/index.vue | 12 ++++-- .../BigScreenManagement/addDialog.vue | 10 ++++- .../packages/BigScreenManagement/index.vue | 12 ++++-- .../packages/ComponentList/EditForm.vue | 43 +++++++++++++------ data-room-ui/packages/ComponentList/index.vue | 14 ++++-- data-room-ui/packages/SourceList/EditForm.vue | 10 ++++- 7 files changed, 81 insertions(+), 30 deletions(-) diff --git a/data-room-ui/packages/BigScreenList/EditForm.vue b/data-room-ui/packages/BigScreenList/EditForm.vue index 12aa81df..15b04ff9 100644 --- a/data-room-ui/packages/BigScreenList/EditForm.vue +++ b/data-room-ui/packages/BigScreenList/EditForm.vue @@ -377,13 +377,19 @@ export default { }, // 跳转设计态 toDesign (form) { - const { href: bigScreenHref } = this.$router.resolve({ + // const { href: bigScreenHref } = this.$router.resolve({ + // path: window.BS_CONFIG?.routers?.designUrl || '/big-screen/design', + // query: { + // code: form.code + // } + // }) + // window.open(bigScreenHref, '_self') + this.$router.push({ path: window.BS_CONFIG?.routers?.designUrl || '/big-screen/design', query: { code: form.code } }) - window.open(bigScreenHref, '_self') } } } diff --git a/data-room-ui/packages/BigScreenList/index.vue b/data-room-ui/packages/BigScreenList/index.vue index 53751203..51b188d6 100644 --- a/data-room-ui/packages/BigScreenList/index.vue +++ b/data-room-ui/packages/BigScreenList/index.vue @@ -232,13 +232,19 @@ export default { }, design (screen) { const path = window.BS_CONFIG?.routers?.designUrl || '/big-screen/design' - const { href } = this.$router.resolve({ + // const { href } = this.$router.resolve({ + // path, + // query: { + // code: screen.code + // } + // }) + // window.open(href, '_self') + this.$router.push({ path, query: { code: screen.code } }) - window.open(href, '_self') }, add () { const page = { @@ -309,7 +315,7 @@ export default { */ getCoverPicture (url) { return getFileUrl(url) - }, + } } } diff --git a/data-room-ui/packages/BigScreenManagement/addDialog.vue b/data-room-ui/packages/BigScreenManagement/addDialog.vue index 5f085166..28261bd9 100644 --- a/data-room-ui/packages/BigScreenManagement/addDialog.vue +++ b/data-room-ui/packages/BigScreenManagement/addDialog.vue @@ -392,13 +392,19 @@ export default { // 跳转设计态 toDesign (form) { // eslint-disable-next-line no-case-declarations - const { href: bigScreenHref } = this.$router.resolve({ + // const { href: bigScreenHref } = this.$router.resolve({ + // path: window.BS_CONFIG?.routers?.designUrl || '/big-screen/design', + // query: { + // code: form.code + // } + // }) + // window.open(bigScreenHref, '_self') + this.$router.push({ path: window.BS_CONFIG?.routers?.designUrl || '/big-screen/design', query: { code: form.code } }) - window.open(bigScreenHref, '_self') }, // 得到模板列表 getTemplateList (type) { diff --git a/data-room-ui/packages/BigScreenManagement/index.vue b/data-room-ui/packages/BigScreenManagement/index.vue index 04b64b2f..a313045a 100644 --- a/data-room-ui/packages/BigScreenManagement/index.vue +++ b/data-room-ui/packages/BigScreenManagement/index.vue @@ -51,7 +51,7 @@ - + 编辑 { const path = window.BS_CONFIG?.routers?.designUrl || '/big-screen/design' - const { href } = this.$router.resolve({ + // const { href } = this.$router.resolve({ + // path, + // query: { + // code: code + // } + // }) + // window.open(href, '_self') + this.$router.push({ path, query: { code: code } }) - window.open(href, '_self') }).finally(() => { this.templateLoading = true }) diff --git a/data-room-ui/packages/ComponentList/EditForm.vue b/data-room-ui/packages/ComponentList/EditForm.vue index 65358648..17e6c342 100644 --- a/data-room-ui/packages/ComponentList/EditForm.vue +++ b/data-room-ui/packages/ComponentList/EditForm.vue @@ -526,20 +526,35 @@ export default { // 跳转设计态 toDesign (form) { const path = this.type === 'component' ? (window.BS_CONFIG?.routers?.designUrl || '/big-screen/design') : 'big-screen-biz-component-design' - const { href: bigScreenHref } = this.type === 'bizComponent' ? this.$router.resolve({ - path, - query: { - code: form.code, - type: this.bizType - } - }) : this.$router.resolve({ - path, - query: { - code: form.code - } - }) - // 新窗口打开 - window.open(bigScreenHref, '_self') + // const { href: bigScreenHref } = this.type === 'bizComponent' ? this.$router.resolve({ + // path, + // query: { + // code: form.code, + // type: this.bizType + // } + // }) : this.$router.resolve({ + // path, + // query: { + // code: form.code + // } + // }) + // window.open(bigScreenHref, '_self') + if (this.type === 'bizComponent') { + this.$router.push({ + path, + query: { + code: form.code, + type: this.bizType + } + }) + } else { + this.$router.push({ + path, + query: { + code: form.code + } + }) + } } } } diff --git a/data-room-ui/packages/ComponentList/index.vue b/data-room-ui/packages/ComponentList/index.vue index ca7fcdc4..b2e6d04b 100644 --- a/data-room-ui/packages/ComponentList/index.vue +++ b/data-room-ui/packages/ComponentList/index.vue @@ -346,14 +346,20 @@ export default { }, design (screen) { const path = this.catalogInfo === 'component' ? (window.BS_CONFIG?.routers?.designUrl || '/big-screen/design') : (window.BS_CONFIG?.routers?.bizComponentDesignUrl || 'big-screen-biz-component-design') - const { href } = this.$router.resolve({ + // const { href } = this.$router.resolve({ + // path, + // query: { + // code: screen.code + // } + // }) + // 新窗口打开 + // window.open(href, '_self') + this.$router.push({ path, query: { code: screen.code } }) - // 新窗口打开 - window.open(href, '_self') }, add () { const page = { @@ -426,7 +432,7 @@ export default { */ getCoverPicture (url) { return getFileUrl(url) - }, + } } } diff --git a/data-room-ui/packages/SourceList/EditForm.vue b/data-room-ui/packages/SourceList/EditForm.vue index b729f8f9..d681c857 100644 --- a/data-room-ui/packages/SourceList/EditForm.vue +++ b/data-room-ui/packages/SourceList/EditForm.vue @@ -321,13 +321,19 @@ export default { }, // 跳转设计态 toDesign (form) { - const { href: bigScreenHref } = this.$router.resolve({ + // const { href: bigScreenHref } = this.$router.resolve({ + // path: window.BS_CONFIG?.routers?.designUrl || '/big-screen/design', + // query: { + // code: form.code + // } + // }) + // window.open(bigScreenHref, '_self') + this.$router.push({ path: window.BS_CONFIG?.routers?.designUrl || '/big-screen/design', query: { code: form.code } }) - window.open(bigScreenHref, '_self') } } }