优化新建模型等待
This commit is contained in:
parent
a49aef600d
commit
55b9e7d72c
@ -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,34 +1120,44 @@
|
||||
if (ro.result == 'ok') {
|
||||
that.ModelsetUpDialog.systemForm.uuid=ro.data.id;
|
||||
that.ModelsetUpDialog.systemForm.parentId=parentId;
|
||||
const data = {
|
||||
url:'jd',
|
||||
data:{
|
||||
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_CreateSystemModelBySelectType',
|
||||
title: that.ModelsetUpDialog.systemForm.name,
|
||||
type: that.ModelsetUpDialog.systemForm.systemType,
|
||||
method:that.ModelsetUpDialog.systemForm.method,
|
||||
uuid:that.ModelsetUpDialog.systemForm.uuid,
|
||||
parentId:that.ModelsetUpDialog.systemForm.parentId
|
||||
}
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
if (ro.result == 'ok') {
|
||||
that.isDisabled = 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);
|
||||
if(that.ModelsetUpDialog.systemForm.method == "control.policy"){
|
||||
const data = {
|
||||
url:'jd',
|
||||
data:{
|
||||
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_CreateSystemModelBySelectType',
|
||||
title: that.ModelsetUpDialog.systemForm.name,
|
||||
type: that.ModelsetUpDialog.systemForm.systemType,
|
||||
method:that.ModelsetUpDialog.systemForm.method,
|
||||
uuid:that.ModelsetUpDialog.systemForm.uuid,
|
||||
parentId:that.ModelsetUpDialog.systemForm.parentId
|
||||
}
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
if (ro.result == 'ok') {
|
||||
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 {
|
||||
that.$message.error(ro.msg);
|
||||
}
|
||||
}).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();
|
||||
}
|
||||
|
||||
//清空数据
|
||||
that.$refs['systemForm'].resetFields();
|
||||
} else {
|
||||
that.$message.error(ro.msg);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
})
|
||||
|
||||
}
|
||||
}).catch(error => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user