新增资源管理
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" size="small" icon="iconfont iconAdd" @click="addResource"> 添加资源</el-button>
|
||||
<ai-select v-model="search.categoryId" @change="search.current = 1, getList()" placeholder="资源种类" :selectList="dict.getDict('cwpStatus')" />
|
||||
<ai-select v-model="search.categoryId" @change="search.current = 1, getList()" placeholder="资源种类" :selectList="categoryList" />
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="资源姓名" v-model="search.resourceName" clearable
|
||||
@@ -40,6 +40,7 @@ export default {
|
||||
},
|
||||
total: 0,
|
||||
tableData: [],
|
||||
categoryList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -54,13 +55,14 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getCategoryList()
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appresourceinfo/list`,null,{
|
||||
params: {
|
||||
...this.search,
|
||||
areaId: this.areaId,
|
||||
// areaId: this.areaId,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
@@ -71,13 +73,28 @@ export default {
|
||||
},
|
||||
addResource() {
|
||||
this.$router.push({hash: "#addResource", query: {}})
|
||||
}
|
||||
},
|
||||
getCategoryList() {
|
||||
this.instance.post(`/app/appresourcecategory/list`,null,{
|
||||
params: {
|
||||
current: 1,
|
||||
size: 3000,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.categoryList = res.data.records.map(item=> {
|
||||
return {
|
||||
dictName: item.categoryName,
|
||||
dictValue: item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scope>
|
||||
.resourceManagement {
|
||||
|
||||
}
|
||||
.resourceManagement {}
|
||||
</style>
|
||||
Reference in New Issue
Block a user