|
|
@@ -173,16 +173,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
if (this.$route.query.aid) {
|
|
|
- this.$http
|
|
|
- .post('/arrange/all', { query: { id: this.$route.query.aid } }, { body: 'json' })
|
|
|
- .then(res => {
|
|
|
- this.arrange = res.content;
|
|
|
- this.performanceId = res.content[0].performanceId;
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- console.log(e);
|
|
|
- this.$message.error(e.error);
|
|
|
- });
|
|
|
+ this.getArrange(this.$route.query.aid);
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -265,10 +256,13 @@ export default {
|
|
|
removeRow(row) {
|
|
|
this.$alert('移除将无法恢复,确认要移除么?', '警告', { type: 'error' })
|
|
|
.then(() => {
|
|
|
- return this.$http.post(`/programme/removeGroup/${row.id}`);
|
|
|
+ return this.$http.post(`/programme/removeGroup/${row.id}`, {
|
|
|
+ arrangeId: Number(this.$route.query.aid)
|
|
|
+ });
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message.success('移除成功');
|
|
|
+ this.getArrange(this.$route.query.aid);
|
|
|
this.getData();
|
|
|
})
|
|
|
.catch(e => {
|
|
|
@@ -333,12 +327,25 @@ export default {
|
|
|
.then(res => {
|
|
|
this.showProgramme = false;
|
|
|
this.$message.success('添加成功');
|
|
|
+ this.getArrange(this.$route.query.aid);
|
|
|
this.getData();
|
|
|
})
|
|
|
.catch(e => {
|
|
|
console.log(e);
|
|
|
this.$message.error(e.error);
|
|
|
});
|
|
|
+ },
|
|
|
+ getArrange(aid) {
|
|
|
+ this.$http
|
|
|
+ .post('/arrange/all', { query: { id: aid } }, { body: 'json' })
|
|
|
+ .then(res => {
|
|
|
+ this.arrange = res.content;
|
|
|
+ this.performanceId = res.content[0].performanceId;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|