diff --git a/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryMain.vue b/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryMain.vue index 0589e64..fadcb3d 100644 --- a/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryMain.vue +++ b/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryMain.vue @@ -269,7 +269,7 @@ - 确定 + 确定 取消 @@ -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 => {