Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f11b545fe7
|
@ -133,15 +133,11 @@
|
|||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$get(this.deletePath + row.id).then(response => {
|
||||
if (response.data.success) {
|
||||
this.$get(this.deletePath + row.id,() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.initTableData()
|
||||
});
|
||||
}).catch(() => {
|
||||
|
@ -154,17 +150,12 @@
|
|||
createOrganization(createOrganizationForm) {
|
||||
this.$refs[createOrganizationForm].validate( valide => {
|
||||
if (valide) {
|
||||
this.$post(this.createPath, this.form)
|
||||
.then(response => {
|
||||
if (response.data.success) {
|
||||
this.$post(this.createPath, this.form,() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '添加成功!'
|
||||
});
|
||||
this.initTableData();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.createVisible = false;
|
||||
});
|
||||
} else {
|
||||
|
@ -175,17 +166,12 @@
|
|||
updateOrganization(udpateOrganizationForm) {
|
||||
this.$refs[udpateOrganizationForm].validate(valide => {
|
||||
if (valide) {
|
||||
this.$post(this.updatePath, this.form)
|
||||
.then(response => {
|
||||
if (response.data.success) {
|
||||
this.$post(this.updatePath, this.form,() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改成功!'
|
||||
});
|
||||
this.updateVisible = false;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.initTableData();
|
||||
self.loading = false;
|
||||
});
|
||||
|
@ -195,14 +181,10 @@
|
|||
})
|
||||
},
|
||||
initTableData() {
|
||||
this.$post(this.buildPagePath(this.queryPath)).then(response => {
|
||||
if (response.data.success) {
|
||||
let data = response.data.data;
|
||||
this.$post(this.buildPagePath(this.queryPath),{},response => {
|
||||
let data = response.data;
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
closeFunc() {
|
||||
|
|
|
@ -180,16 +180,12 @@
|
|||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$get(this.deletePath + row.id).then(response => {
|
||||
if (response.data.success) {
|
||||
this.$get(this.deletePath + row.id, () => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
this.initTableData()
|
||||
} else {
|
||||
this.$message.error(response.message)
|
||||
}
|
||||
this.initTableData();
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
|
@ -201,17 +197,12 @@
|
|||
createUser(createUserForm) {
|
||||
this.$refs[createUserForm].validate(valide => {
|
||||
if (valide) {
|
||||
this.$post(this.createPath, this.form)
|
||||
.then(response => {
|
||||
if (response.data.success) {
|
||||
this.$post(this.createPath, this.form, () => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '添加成功!'
|
||||
});
|
||||
this.initTableData();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.createVisible = false;
|
||||
});
|
||||
} else {
|
||||
|
@ -222,17 +213,12 @@
|
|||
updateUser(updateUserForm) {
|
||||
this.$refs[updateUserForm].validate(valide => {
|
||||
if (valide) {
|
||||
this.$post(this.updatePath, this.form)
|
||||
.then(response => {
|
||||
if (response.data.success) {
|
||||
this.$post(this.updatePath, this.form,() => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改成功!'
|
||||
});
|
||||
this.updateVisible = false;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.initTableData();
|
||||
self.loading = false;
|
||||
});
|
||||
|
@ -242,29 +228,21 @@
|
|||
})
|
||||
},
|
||||
initTableData() {
|
||||
this.$post(this.buildPagePath(this.queryPath)).then(response => {
|
||||
if (response.data.success) {
|
||||
let data = response.data.data;
|
||||
this.$post(this.buildPagePath(this.queryPath),{},response => {
|
||||
let data = response.data;
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
closeFunc() {
|
||||
this.form = {};
|
||||
},
|
||||
changeSwitch(row) {
|
||||
this.$post(this.updatePath, row).then(response =>{
|
||||
if (response.data.success) {
|
||||
this.$post(this.updatePath, row,() =>{
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态修改成功!'
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
buildPagePath(path) {
|
||||
|
|
Loading…
Reference in New Issue