资源管理列表
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
<script>
|
||||
import resourceList from "./components/resourceList.vue"
|
||||
import addResource from "./components/addResource.vue"
|
||||
import resourceMap from "./components/resourceMap.vue"
|
||||
import resourceManagement from "./components/resourceManagement.vue"
|
||||
import resourceClassification from './components/resourceClassification.vue'
|
||||
@@ -24,10 +25,13 @@ export default {
|
||||
currentPage() {
|
||||
let { hash } = this.$route
|
||||
return hash == "#resourceClassification" ? resourceClassification :
|
||||
hash == "#resourceManagement" ? resourceManagement : hash == "#resourceMap" ? resourceMap:resourceList
|
||||
hash == "#resourceManagement" ? resourceManagement :
|
||||
hash == "#resourceMap" ? resourceMap :
|
||||
hash == "#addResource" ? addResource:resourceList
|
||||
}
|
||||
},
|
||||
components: {
|
||||
addResource,
|
||||
resourceList,
|
||||
resourceMap,
|
||||
resourceManagement,
|
||||
@@ -37,7 +41,7 @@ export default {
|
||||
methods: {
|
||||
onChange(data) {
|
||||
let {type, params: query} = data,
|
||||
hash = ["resourceMap", "resourceManagement","resourceClassification","resourceList"].includes(type) ? "" : "#" + type
|
||||
hash = ["resourceMap", "resourceManagement","resourceClassification","resourceList","addResource"].includes(type) ? "" : "#" + type
|
||||
this.$router.push({hash, query})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<div>新增资源</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'addResource'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scope>
|
||||
.addResource {
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,82 @@
|
||||
<template>
|
||||
<div>资源管理</div>
|
||||
<section class="resourceManagement">
|
||||
<ai-list>
|
||||
<template #content>
|
||||
<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')" />
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="资源姓名" v-model="search.resourceName" clearable
|
||||
@clear="current = 1, search.resourceName = '', getList()" suffix-icon="iconfont iconSearch"
|
||||
v-throttle="() => {(current = 1), getList();}"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="total" :current.sync="search.current" :size.sync="search.size"
|
||||
@getList="getList()" :col-configs="colConfigs" :dict="dict" @sort-change="changeTableSort">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "resourceManagement",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
areaId: String,
|
||||
permissions: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
categoryId: '',
|
||||
size: 10,
|
||||
resourceName: ''
|
||||
},
|
||||
areaId: '',
|
||||
total: 0,
|
||||
tableData: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
colConfigs() {
|
||||
return [
|
||||
{prop: 'resourceName', label: '资源名称', width: '300px'},
|
||||
{prop: 'categoryName', label: '资源种类', align: 'center'},
|
||||
{prop: 'areaName', label: '行政归属', align: 'center'},
|
||||
{prop: 'createTime', label: '添加时间', align: 'center'},
|
||||
]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
addResource() {
|
||||
|
||||
},
|
||||
getList() {
|
||||
this.instance.post(`/app/appresourceinfo/list`,null,{
|
||||
params: {
|
||||
...this.search,
|
||||
areaId: this.areaId,
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
},
|
||||
addResource() {
|
||||
this.$router.push({hash: "#addResource", query: {}})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user