| | |
| | | }, |
| | | methods: { |
| | | getTreeData() { |
| | | this.$HTTP.get('/api/blade-cps/group/tree?groupCategory=1&groupType=group_machine').then(res => { |
| | | this.$HTTP.get('/api/smis/group/tree?groupCategory=1&groupType=group_machine').then(res => { |
| | | if (res.code === 200) { |
| | | this.group = res.data |
| | | this.groupClick(res.data[0]) |
| | |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.$HTTP.delete('/api/blade-cps/group/deleteGroup', {}, { params: { groupId: this.form.id } }).then(res => { |
| | | this.$HTTP.delete('/api/smis/group/deleteGroup', {}, { params: { groupId: this.form.id } }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.getTreeData() |
| | |
| | | save() { |
| | | this.group = [] |
| | | if (this.form.id) { |
| | | this.$HTTP.put('/api/blade-cps/group', this.form).then(res => { |
| | | this.$HTTP.put('/api/smis/group', this.form).then(res => { |
| | | if (res.code === 200) { |
| | | this.getTreeData() |
| | | } |
| | | }) |
| | | } else { |
| | | this.$HTTP.post('/api/blade-cps/group', this.form).then(res => { |
| | | this.$HTTP.post('/api/smis/group', this.form).then(res => { |
| | | if (res.code === 200) { |
| | | this.getTreeData() |
| | | } |