首页入库
This commit is contained in:
@@ -117,10 +117,12 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$emit("change", selected)
|
this.$emit("change", selected)
|
||||||
this.$emit("update:choose", choose)
|
this.$emit("update:choose", choose)
|
||||||
|
this.$emit("select", choose)
|
||||||
} else {
|
} else {
|
||||||
this.tableData.map(e => e.checked = e[nodeKey] == row.id && row.checked)
|
this.tableData.map(e => e.checked = e[nodeKey] == row.id && row.checked)
|
||||||
this.$emit("change", row.checked ? row[nodeKey] : '')
|
this.$emit("change", row.checked ? row[nodeKey] : '')
|
||||||
this.$emit("update:choose", row.checked ? row : null)
|
this.$emit("update:choose", row.checked ? row : null)
|
||||||
|
this.$emit("select", row.checked ? row : null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCheckAll(v) {
|
handleCheckAll(v) {
|
||||||
@@ -131,6 +133,7 @@ export default {
|
|||||||
}).filter(e => e.checked) || []
|
}).filter(e => e.checked) || []
|
||||||
this.$emit("change", selected?.map(e => e[nodeKey]))
|
this.$emit("change", selected?.map(e => e[nodeKey]))
|
||||||
this.$emit("update:choose", selected)
|
this.$emit("update:choose", selected)
|
||||||
|
this.$emit("select", selected)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -44,14 +44,17 @@
|
|||||||
<el-form-item label="小程序AppId">
|
<el-form-item label="小程序AppId">
|
||||||
<el-input v-model="form.appId" clearable placeholder="小程序appId"/>
|
<el-input v-model="form.appId" clearable placeholder="小程序appId"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<ai-title title="底部导航栏">
|
<ai-title title="底部导航栏"/>
|
||||||
<template #rightBtn>
|
<ai-table :tableData="tabBar.list" :colConfigs="colConfigs" tableSize="mini" :isShowPagination="false" border>
|
||||||
<ai-dialog-btn text="更换定制页" dialogTitle="选择应用">
|
<el-table-column slot="options" label="操作" width="80" align="center">
|
||||||
<ai-lib-table :meta="appList" :choose.sync="customTabbar" :isShowPagination="false" v-bind="$props"/>
|
<template slot-scope="{row}">
|
||||||
</ai-dialog-btn>
|
<ai-dialog-btn text="更换" dialogTitle="选择应用">
|
||||||
</template>
|
<ai-lib-table :meta="appList" v-model="row.id" @select="v=>handleTabbarChange(row,v)" :isShowPagination="false" v-bind="$props"
|
||||||
</ai-title>
|
:border="false"/>
|
||||||
<ai-table :tableData="tabBar.list" :colConfigs="colConfigs" tableSize="mini" :isShowPagination="false" border/>
|
</ai-dialog-btn>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
@@ -95,32 +98,6 @@ export default {
|
|||||||
return e
|
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -141,7 +118,21 @@ export default {
|
|||||||
{prop: 'project', label: "项目/框架"},
|
{prop: 'project', label: "项目/框架"},
|
||||||
{prop: 'category', label: "分类", dict: "appsCategory"},
|
{prop: 'category', label: "分类", dict: "appsCategory"},
|
||||||
{prop: 'name', label: "模块名"}
|
{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: {
|
methods: {
|
||||||
@@ -178,14 +169,12 @@ export default {
|
|||||||
handleSysTypeChange(v, data) {
|
handleSysTypeChange(v, data) {
|
||||||
if (v == 'mp') {
|
if (v == 'mp') {
|
||||||
this.form.appId = data.appId
|
this.form.appId = data.appId
|
||||||
const customTabbar = data?.tabBar?.list?.[2]
|
this.tabBar = data?.tabBar || this.tabBar
|
||||||
this.$set(this.form, 'customTabbar', customTabbar || {
|
|
||||||
pagePath: "pages/AppEnteringVillage/AppEnteringVillage",
|
|
||||||
text: "进村",
|
|
||||||
iconPath: "static/TabBar/custom.png",
|
|
||||||
selectedIconPath: "static/TabBar/custom_selected.png"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
handleTabbarChange(row, {name, label}) {
|
||||||
|
row.label = label
|
||||||
|
row.pagePath = `pages/${name}/${name}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
Reference in New Issue
Block a user