Merge branch 'dev' of http://192.168.0.56:3000/bonus/devicesmgt into dev
This commit is contained in:
commit
eff89495bd
|
|
@ -24,6 +24,7 @@
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
:loading="isLoading"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新建</el-button>
|
>新建</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -105,6 +106,7 @@ export default {
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLoading: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
|
@ -211,17 +213,24 @@ export default {
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.isLoading = true;
|
||||||
if (this.form.id != undefined) {
|
if (this.form.id != undefined) {
|
||||||
updateUnitType(this.form).then(response => {
|
updateUnitType(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.isLoading = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}).catch(() => {
|
||||||
|
this.isLoading = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUnitType(this.form).then(response => {
|
addUnitType(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.isLoading = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
}).catch(() => {
|
||||||
|
this.isLoading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue