From dc4a9761e948c5d75c070267f88a09ddc28401ed Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 26 Aug 2022 14:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=95=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E4=BA=A7=E5=93=81=E5=BA=93=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E8=B7=AF=E5=BE=84=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/router/autoRoutes.js | 3 ++- project/oms/apps/develop/AppDeployCustom/add.vue | 16 +++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/router/autoRoutes.js b/examples/router/autoRoutes.js index 5a2775df..13b207ab 100644 --- a/examples/router/autoRoutes.js +++ b/examples/router/autoRoutes.js @@ -20,7 +20,8 @@ export default { if (file.default) { let {name, label} = file.default, addApp = { - name: path.replace(/\.\/?(vue)?/g, '')?.split("/").join("_"), label: label || name, + name: [base, path.replace(/\.\/?(vue)?/g, '')?.split("/")].flat().join("_"), + label: label || name, path: `/${base}${path.replace(/\.(\/.+\/App.+)\.vue$/, '$1')}`, component: appEntry, module: file.default diff --git a/project/oms/apps/develop/AppDeployCustom/add.vue b/project/oms/apps/develop/AppDeployCustom/add.vue index eff2057c..57403d79 100644 --- a/project/oms/apps/develop/AppDeployCustom/add.vue +++ b/project/oms/apps/develop/AppDeployCustom/add.vue @@ -47,10 +47,12 @@ - - - - + + + + + + @@ -249,7 +251,7 @@ export default { this.form.extra = {tabBar, appId} } else if (type == 'web') { const {desc} = sysInfo - sysInfo.desc = JSON.parse(desc) + sysInfo.desc = JSON.parse(desc || null) this.form.extra = {isSingleService, homePage, hmt, dv, downloadCenter, showTool, helpDoc, customerService, sysInfo} } else if (type == 'wxwork') { this.form.extra = {isSingleService, homePage, hmt} @@ -257,7 +259,7 @@ export default { this.instance.post("/node/custom/addOrUpdate", this.form).then(res => { if (res?.code == 0) { this.$message.success("提交成功!") - this.back() + this.getDetail() } }) } @@ -271,7 +273,7 @@ export default { delete values.tabBar } } else if (v == 'web') { - values?.sysInfo.desc = JSON.stringify(values?.sysInfo.desc) + if (values?.sysInfo?.desc) values.sysInfo.desc = JSON.stringify(values.sysInfo.desc) } Object.keys(values).map(e => this.$set(this.form, e, values[e])) },