diff --git a/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue b/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue index a4f5a6c5..c6707a90 100644 --- a/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue +++ b/project/oms/apps/develop/AppDeployCustom/AiLibTable.vue @@ -117,10 +117,12 @@ export default { } this.$emit("change", selected) this.$emit("update:choose", choose) + this.$emit("select", choose) } else { this.tableData.map(e => e.checked = e[nodeKey] == row.id && row.checked) this.$emit("change", row.checked ? row[nodeKey] : '') this.$emit("update:choose", row.checked ? row : null) + this.$emit("select", row.checked ? row : null) } }, handleCheckAll(v) { @@ -131,6 +133,7 @@ export default { }).filter(e => e.checked) || [] this.$emit("change", selected?.map(e => e[nodeKey])) this.$emit("update:choose", selected) + this.$emit("select", selected) } }, created() { diff --git a/project/oms/apps/develop/AppDeployCustom/add.vue b/project/oms/apps/develop/AppDeployCustom/add.vue index 61b5ec83..24df87f4 100644 --- a/project/oms/apps/develop/AppDeployCustom/add.vue +++ b/project/oms/apps/develop/AppDeployCustom/add.vue @@ -44,14 +44,17 @@ - - - - + + + + + + @@ -95,32 +98,6 @@ export default { return e }) || [] }, - tabBar: v => ({ - color: "#666666", - selectedColor: "#197DF0", - backgroundColor: "#ffffff", - list: [ - {pagePath: "pages/home/home", text: "首页", iconPath: "static/TabBar/home.png", selectedIconPath: "static/TabBar/home_selected.png"}, - {pagePath: "pages/service/service", text: "应用", iconPath: "static/TabBar/service.png", selectedIconPath: "static/TabBar/service_selected.png"}, - v.form.customTabbar, - {pagePath: "pages/mine/my", text: "我的", iconPath: "static/TabBar/me.png", selectedIconPath: "static/TabBar/me_selected.png"} - ] - }), - customTabbar: { - set({name, id, label}) { - this.form.customTabbar = { - id, - pagePath: `pages/${name}/${name}`, - text: label, - iconPath: `static/TabBar/custom.png`, - selectedIconPath: `static/TabBar/custom_selected.png` - } - }, - get() { - const {id} = this.form.customTabbar || {} - return {id} - } - } }, data() { return { @@ -141,7 +118,21 @@ export default { {prop: 'project', label: "项目/框架"}, {prop: 'category', label: "分类", dict: "appsCategory"}, {prop: 'name', label: "模块名"} - ] + ], + tabBar: { + color: "#666666", + selectedColor: "#197DF0", + backgroundColor: "#ffffff", + list: [ + {pagePath: "pages/AppHome/AppHome", text: "首页", iconPath: "static/TabBar/home.png", selectedIconPath: "static/TabBar/home_selected.png"}, + {pagePath: "pages/service/service", text: "应用", iconPath: "static/TabBar/service.png", selectedIconPath: "static/TabBar/service_selected.png"}, + { + pagePath: "pages/AppEnteringVillage/AppEnteringVillage", text: "进村", + iconPath: "static/TabBar/custom.png", selectedIconPath: "static/TabBar/custom_selected.png" + }, + {pagePath: "pages/mine/my", text: "我的", iconPath: "static/TabBar/me.png", selectedIconPath: "static/TabBar/me_selected.png"} + ] + } } }, methods: { @@ -178,14 +169,12 @@ export default { handleSysTypeChange(v, data) { if (v == 'mp') { this.form.appId = data.appId - const customTabbar = data?.tabBar?.list?.[2] - this.$set(this.form, 'customTabbar', customTabbar || { - pagePath: "pages/AppEnteringVillage/AppEnteringVillage", - text: "进村", - iconPath: "static/TabBar/custom.png", - selectedIconPath: "static/TabBar/custom_selected.png" - }) + this.tabBar = data?.tabBar || this.tabBar } + }, + handleTabbarChange(row, {name, label}) { + row.label = label + row.pagePath = `pages/${name}/${name}` } }, created() {