Browse Source

经典案例前台

master
maguoqiang 6 years ago
parent
commit
0a5aa6d661
  1. 2
      src/views/modules/case/typicalcase-add-or-update.vue
  2. 28
      src/views/modules/case/typicalcase.vue

2
src/views/modules/case/typicalcase-add-or-update.vue

@ -152,7 +152,7 @@ export default {
if (!valid) { if (!valid) {
return false return false
} }
this.$http[!this.dataForm.id ? 'post' : 'put']('/typicalcase/', this.dataForm).then(({ data: res }) => { this.$http[!this.dataForm.id ? 'post' : 'put']('/typicalcase/addcase', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }

28
src/views/modules/case/typicalcase.vue

@ -76,6 +76,34 @@ export default {
}, },
components: { components: {
AddOrUpdate AddOrUpdate
},
methods: {
UpdateStateOn () {
return this.$http.get('/typicalcase/UpdateStateOn').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
window.SITE_CONFIG['permissions'] = res.data
}).catch(() => {})
},
UpdateStateOff () {
return this.$http.get('/typicalcase/UpdateStateOff').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
window.SITE_CONFIG['permissions'] = res.data
}).catch(() => {})
},
getDataList () {
this.$router.push({
name: 'AddOrUpdate',
params: {
id: this.id,
add: false
}
})
}
} }
} }
</script> </script>

Loading…
Cancel
Save