增加web端产品库模块,并增加埋点
This commit is contained in:
@@ -2,6 +2,7 @@ import store from "../store";
|
||||
import {waiting} from "../utils";
|
||||
import appEntry from "../views/apps/appEntry";
|
||||
import router from "./router";
|
||||
import axios from "./axios";
|
||||
|
||||
export default {
|
||||
routes: () => store.state.apps,
|
||||
@@ -29,6 +30,13 @@ export default {
|
||||
//命名规范入口文件必须以App开头
|
||||
return store.commit("addApp", addApp)
|
||||
} else return 0
|
||||
}))).then(() => waiting.close())
|
||||
}))).then(() => {
|
||||
axios.post("/node/wechatapps/addOrUpdate", {
|
||||
list: this.routes().map(({path: libPath, label, module: {name}, name: id}) => ({
|
||||
id, type: 'web', libPath, label, name
|
||||
}))
|
||||
}, {baseURL: "/ns"}).catch(() => 0)
|
||||
waiting.close()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
66
project/oms/apps/AppWebApps/AppWebApps.vue
Normal file
66
project/oms/apps/AppWebApps/AppWebApps.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<section class="AppWebApps">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="web产品库" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索应用" v-model="search.name" clearable
|
||||
@change="page.current=1,getTableData()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"/>
|
||||
</template>
|
||||
</ai-list>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppWebApps",
|
||||
label: "web产品库",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: ""},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{label: "应用名称", prop: "label", width: 200},
|
||||
{label: "应用模块名", prop: "name", width: 200},
|
||||
{label: "产品库目录", prop: "libPath"},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData() {
|
||||
this.instance.post("/node/wechatapps/list", null, {
|
||||
params: {...this.page, ...this.search,type:'web'}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records.map(e => ({...e, count: 0}))
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppWebApps {
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user