热搜管理

master
cl 5 years ago
parent e254f54803
commit d2ffb05559

@ -84,15 +84,21 @@ export default {
}, },
components: {}, components: {},
methods: { methods: {
init (data) { init (id) {
this.dataForm.hotSearchId = id || 0
this.visible = true this.visible = true
if (data) {
this.dataForm = Object.assign({}, data)
} else {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() 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 () { dataFormSubmit () {

@ -38,7 +38,7 @@
type="primary" type="primary"
size="small" size="small"
icon="el-icon-edit" 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')" <el-button v-if="isAuth('admin:hotSearch:delete')"
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"

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

Loading…
Cancel
Save