|
@@ -662,49 +662,27 @@ export default {
|
|
specialtyId: specialtyId
|
|
specialtyId: specialtyId
|
|
});
|
|
});
|
|
var url = CORE_API + "/courseSpeciatlyRelation/delete?" + param;
|
|
var url = CORE_API + "/courseSpeciatlyRelation/delete?" + param;
|
|
- this.$http
|
|
|
|
- .delete(url)
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "取消关联成功!"
|
|
|
|
- });
|
|
|
|
- this.searchSpecialtyPage();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ this.$httpWithMsg.delete(url).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "取消关联成功!"
|
|
});
|
|
});
|
|
|
|
+ this.searchSpecialtyPage();
|
|
|
|
+ });
|
|
},
|
|
},
|
|
submitAddRelationForm() {
|
|
submitAddRelationForm() {
|
|
this.$refs.addRelationForm.validate(valid => {
|
|
this.$refs.addRelationForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
var param = new URLSearchParams(this.addRelationForm);
|
|
var param = new URLSearchParams(this.addRelationForm);
|
|
var url = CORE_API + "/courseSpeciatlyRelation/add?" + param;
|
|
var url = CORE_API + "/courseSpeciatlyRelation/add?" + param;
|
|
- this.$http.post(url, this.speciallyForm).then(
|
|
|
|
- () => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "添加成功!"
|
|
|
|
- });
|
|
|
|
- this.searchSpecialtyPage();
|
|
|
|
- this.addRelationDialog = false;
|
|
|
|
- },
|
|
|
|
- response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
|
|
+ this.$httpWithMsg.post(url, this.speciallyForm).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "添加成功!"
|
|
|
|
+ });
|
|
|
|
+ this.searchSpecialtyPage();
|
|
|
|
+ this.addRelationDialog = false;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
console.log("error submit!");
|
|
console.log("error submit!");
|
|
return false;
|
|
return false;
|
|
@@ -713,7 +691,7 @@ export default {
|
|
},
|
|
},
|
|
getSpecialtyList4AddRelation(query) {
|
|
getSpecialtyList4AddRelation(query) {
|
|
this.specialtyLoading4AddRelation = true;
|
|
this.specialtyLoading4AddRelation = true;
|
|
- this.$http
|
|
|
|
|
|
+ this.$httpWithMsg
|
|
.get(CORE_API + "/specialty/query?name=" + query)
|
|
.get(CORE_API + "/specialty/query?name=" + query)
|
|
.then(response => {
|
|
.then(response => {
|
|
this.specialtyList4AddRelation = response.data;
|
|
this.specialtyList4AddRelation = response.data;
|
|
@@ -742,7 +720,7 @@ export default {
|
|
this.pageSize +
|
|
this.pageSize +
|
|
"?" +
|
|
"?" +
|
|
param;
|
|
param;
|
|
- this.$http.get(url).then(response => {
|
|
|
|
|
|
+ this.$httpWithMsg.get(url).then(response => {
|
|
this.specialtyTableData = response.data.content;
|
|
this.specialtyTableData = response.data.content;
|
|
this.specialtyTotal = response.data.totalElements;
|
|
this.specialtyTotal = response.data.totalElements;
|
|
});
|
|
});
|
|
@@ -768,7 +746,7 @@ export default {
|
|
},
|
|
},
|
|
getSpecialtyList4Search(query) {
|
|
getSpecialtyList4Search(query) {
|
|
this.specialtyLoading4Search = true;
|
|
this.specialtyLoading4Search = true;
|
|
- this.$http
|
|
|
|
|
|
+ this.$httpWithMsg
|
|
.get(CORE_API + "/specialty/query?name=" + query)
|
|
.get(CORE_API + "/specialty/query?name=" + query)
|
|
.then(response => {
|
|
.then(response => {
|
|
this.specialtyList4Search = response.data;
|
|
this.specialtyList4Search = response.data;
|
|
@@ -789,7 +767,7 @@ export default {
|
|
this.pageSize +
|
|
this.pageSize +
|
|
"?" +
|
|
"?" +
|
|
param;
|
|
param;
|
|
- this.$http.get(url).then(response => {
|
|
|
|
|
|
+ this.$httpWithMsg.get(url).then(response => {
|
|
this.tableData = response.data.content;
|
|
this.tableData = response.data.content;
|
|
this.total = response.data.totalElements;
|
|
this.total = response.data.totalElements;
|
|
});
|
|
});
|
|
@@ -862,26 +840,15 @@ export default {
|
|
//修改
|
|
//修改
|
|
this.$refs.courseForm.validate(valid => {
|
|
this.$refs.courseForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.$http.put(url, this.courseForm).then(
|
|
|
|
- () => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "修改成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- this.resetForm();
|
|
|
|
- this.courseDialog = false;
|
|
|
|
- },
|
|
|
|
- response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
|
|
+ this.$httpWithMsg.put(url, this.courseForm).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "修改成功!"
|
|
|
|
+ });
|
|
|
|
+ this.searchForm();
|
|
|
|
+ this.resetForm();
|
|
|
|
+ this.courseDialog = false;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
console.log("error submit!");
|
|
console.log("error submit!");
|
|
return false;
|
|
return false;
|
|
@@ -890,26 +857,15 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$refs.courseForm.validate(valid => {
|
|
this.$refs.courseForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.$http.post(url, this.courseForm).then(
|
|
|
|
- () => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "添加成功"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- this.resetForm();
|
|
|
|
- this.courseDialog = false;
|
|
|
|
- },
|
|
|
|
- response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
|
|
+ this.$httpWithMsg.post(url, this.courseForm).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "添加成功"
|
|
|
|
+ });
|
|
|
|
+ this.searchForm();
|
|
|
|
+ this.resetForm();
|
|
|
|
+ this.courseDialog = false;
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
console.log("error submit!");
|
|
console.log("error submit!");
|
|
return false;
|
|
return false;
|
|
@@ -939,24 +895,13 @@ export default {
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(() => {
|
|
}).then(() => {
|
|
var url = CORE_API + "/course/" + row.id;
|
|
var url = CORE_API + "/course/" + row.id;
|
|
- this.$http
|
|
|
|
- .delete(url)
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "删除成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ this.$httpWithMsg.delete(url).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "删除成功!"
|
|
});
|
|
});
|
|
|
|
+ this.searchForm();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//删除多条数据
|
|
//删除多条数据
|
|
@@ -973,24 +918,13 @@ export default {
|
|
type: "error"
|
|
type: "error"
|
|
}).then(() => {
|
|
}).then(() => {
|
|
var url = CORE_API + "/course/" + this.courseIds;
|
|
var url = CORE_API + "/course/" + this.courseIds;
|
|
- this.$http
|
|
|
|
- .delete(url)
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "删除成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ this.$httpWithMsg.delete(url).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "删除成功!"
|
|
});
|
|
});
|
|
|
|
+ this.searchForm();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1008,24 +942,13 @@ export default {
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(() => {
|
|
}).then(() => {
|
|
var url = CORE_API + "/course/enable/" + this.courseIds;
|
|
var url = CORE_API + "/course/enable/" + this.courseIds;
|
|
- this.$http
|
|
|
|
- .put(url, {})
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "开启成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ this.$httpWithMsg.put(url, {}).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "开启成功!"
|
|
});
|
|
});
|
|
|
|
+ this.searchForm();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1036,24 +959,13 @@ export default {
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(() => {
|
|
}).then(() => {
|
|
var url = CORE_API + "/course/enable/" + row.id;
|
|
var url = CORE_API + "/course/enable/" + row.id;
|
|
- this.$http
|
|
|
|
- .put(url, {})
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "开启成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ this.$httpWithMsg.put(url, {}).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "开启成功!"
|
|
});
|
|
});
|
|
|
|
+ this.searchForm();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//禁用
|
|
//禁用
|
|
@@ -1070,24 +982,13 @@ export default {
|
|
type: "error"
|
|
type: "error"
|
|
}).then(() => {
|
|
}).then(() => {
|
|
var url = CORE_API + "/course/disable/" + this.courseIds;
|
|
var url = CORE_API + "/course/disable/" + this.courseIds;
|
|
- this.$http
|
|
|
|
- .put(url, {})
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "禁用成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ this.$httpWithMsg.put(url, {}).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "禁用成功!"
|
|
});
|
|
});
|
|
|
|
+ this.searchForm();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1099,24 +1000,13 @@ export default {
|
|
type: "error"
|
|
type: "error"
|
|
}).then(() => {
|
|
}).then(() => {
|
|
var url = CORE_API + "/course/disable/" + row.id;
|
|
var url = CORE_API + "/course/disable/" + row.id;
|
|
- this.$http
|
|
|
|
- .put(url, {})
|
|
|
|
- .then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "禁用成功!"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- })
|
|
|
|
- .catch(response => {
|
|
|
|
- if (response.status == 500) {
|
|
|
|
- this.$notify({
|
|
|
|
- showClose: true,
|
|
|
|
- message: response.data.desc,
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ return this.$httpWithMsg.put(url, {}).then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "禁用成功!"
|
|
});
|
|
});
|
|
|
|
+ return this.searchForm();
|
|
|
|
+ });
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//导入
|
|
//导入
|