优化新建模型等待

This commit is contained in:
zhal 2022-07-26 16:41:34 +08:00
parent a49aef600d
commit 55b9e7d72c

View File

@ -269,7 +269,7 @@
</awsui-form>
</div>
<span slot="footer" class="dialog-footer">
<awsui-button class="button-general-color" type="primary" @click="createSystemSave('systemForm')" :disabled="isDisabled">确定</awsui-button>
<awsui-button class="button-general-color" type="primary" @click="createSystemSave('systemForm')" :loading="isLoading">确定</awsui-button>
<awsui-button @click="clearSystemDlg">取消</awsui-button>
</span>
</el-dialog>
@ -321,7 +321,7 @@
}
};
return {
isDisabled:false,
isLoading:false,
multiple: true,
//
currentUserCheck: true,
@ -1081,10 +1081,9 @@
});
},
//
//
createSystemSave(formName) {//
const that = this;
that.$refs[formName].validate((valid) => {
if (valid) {
const checkdata = {
@ -1097,9 +1096,8 @@
};
//
awsuiAxios.post(checkdata).then(function (ro) {
if (ro.data.result == 'ok') {
that.isDisabled = true;
that.isLoading = true;
const nodeData = that.$refs.tree.getCurrentNode();
const parentId = nodeData.id;
const wsId = that.$store.getters.getWsIdFn;
@ -1122,6 +1120,7 @@
if (ro.result == 'ok') {
that.ModelsetUpDialog.systemForm.uuid=ro.data.id;
that.ModelsetUpDialog.systemForm.parentId=parentId;
if(that.ModelsetUpDialog.systemForm.method == "control.policy"){
const data = {
url:'jd',
data:{
@ -1136,12 +1135,11 @@
//
awsuiAxios.post(data).then(function (ro) {
if (ro.result == 'ok') {
that.isDisabled = false;
that.isLoading = false;
that.ModelsetUpDialog.dialogVisible = false;
that.openRepositoryList(that.ModelsetUpDialog.systemForm.parentId);
// id
openDesigner(that.$store.getters.getTeamIdFn, that.ModelsetUpDialog.systemForm.uuid, that.$store.state.sessionId);
//
that.$refs['systemForm'].resetFields();
} else {
@ -1150,6 +1148,16 @@
}).catch(error=>{
console.log(error);
})
}else{
that.isLoading = false;
that.ModelsetUpDialog.dialogVisible = false;
that.openRepositoryList(that.ModelsetUpDialog.systemForm.parentId);
// id
openDesigner(that.$store.getters.getTeamIdFn, that.ModelsetUpDialog.systemForm.uuid, that.$store.state.sessionId);
//
that.$refs['systemForm'].resetFields();
}
}
}).catch(error => {