热搜管理

This commit is contained in:
cl
2021-05-13 17:38:22 +08:00
parent e254f54803
commit d2ffb05559
3 changed files with 15 additions and 10 deletions

View File

@@ -84,15 +84,21 @@ export default {
},
components: {},
methods: {
init (data) {
init (id) {
this.dataForm.hotSearchId = id || 0
this.visible = true
if (data) {
this.dataForm = Object.assign({}, data)
} else {
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
})
}
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.hotSearchId) {
this.$http({
url: this.$http.adornUrl('/admin/hotSearch/info/' + this.dataForm.hotSearchId),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
this.dataForm = data
})
}
})
},
// 表单提交
dataFormSubmit () {

View File

@@ -38,7 +38,7 @@
type="primary"
size="small"
icon="el-icon-edit"
@click="addOrUpdateHandle(scope.row)">修改</el-button>
@click="addOrUpdateHandle(scope.row.hotSearchId)">修改</el-button>
<el-button v-if="isAuth('admin:hotSearch:delete')"
type="danger"
icon="el-icon-delete"

View File

@@ -69,7 +69,6 @@ public class HotSearchController {
* 获取信息
*/
@GetMapping("/info/{id}")
@PreAuthorize("@pms.hasPermission('admin:hotSearch:info')")
public ResponseEntity<HotSearch> info(@PathVariable("id") Long id){
HotSearch hotSearch = hotSearchService.getById(id);
return ResponseEntity.ok(hotSearch);