资源管理编辑 删除
This commit is contained in:
@@ -15,6 +15,13 @@
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="total" :current.sync="search.current" :size.sync="search.size"
|
||||
@getList="getList()" :col-configs="colConfigs" :dict="dict">
|
||||
|
||||
<el-table-column slot="options" label="状态" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" title="详情" @click="toEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" title="删除" @click="Delete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
@@ -50,6 +57,7 @@ export default {
|
||||
{prop: 'categoryName', label: '资源种类', align: 'center'},
|
||||
{prop: 'areaName', label: '行政归属', align: 'center'},
|
||||
{prop: 'createTime', label: '添加时间', align: 'center'},
|
||||
{slot: 'options'}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -71,9 +79,11 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
addResource() {
|
||||
this.$router.push({hash: "#addResource", query: {}})
|
||||
},
|
||||
|
||||
getCategoryList() {
|
||||
this.instance.post(`/app/appresourcecategory/list`,null,{
|
||||
params: {
|
||||
@@ -91,6 +101,21 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toEdit(id) {
|
||||
this.$router.push({hash: "#addResource", query: {id}})
|
||||
},
|
||||
|
||||
Delete(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appresourceinfo/delete?ids=${id}`).then(res=> {
|
||||
if(res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user