添加分类功能
This commit is contained in:
parent
8158242fde
commit
8517d004b3
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<el-container id="repositoryMain" style="overflow: hidden;">
|
||||
<el-header v-if="!havingWritePerm || havingCreatePerm" :height="headerHeight2">
|
||||
<el-header v-if="!havingWritePerm" :height="headerHeight2">
|
||||
</el-header>
|
||||
<el-header v-if="havingWritePerm || havingCreatePerm" :height="headerHeight1">
|
||||
<el-header v-if="havingWritePerm" :height="headerHeight1">
|
||||
<div style="margin: 12px 0px 10px;text-align: center;">
|
||||
<el-popover
|
||||
v-if="havingWritePerm || havingCreatePerm"
|
||||
v-if="havingWritePerm"
|
||||
placement="bottom"
|
||||
width="280"
|
||||
trigger="click"
|
||||
@ -74,7 +74,7 @@
|
||||
</awsui-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div v-if="havingWritePerm || havingCreatePerm" style="width: 100%;border-bottom: 1px solid #F2F2F2;"></div>
|
||||
<div v-if="havingWritePerm" style="width: 100%;border-bottom: 1px solid #F2F2F2;"></div>
|
||||
</el-header>
|
||||
<el-main class="main-tree" :style="{'overflow': 'auto', 'height': treeHeight}">
|
||||
<el-tree
|
||||
@ -91,7 +91,7 @@
|
||||
<span slot-scope="{node, data}">
|
||||
<i class="awsui-iconfont tree-content-icon tree-content-icon-padding" :style="{'color': node.data.icon.color}"
|
||||
v-html="node.data.icon.icon"></i>
|
||||
<span :style="{'font-weight': data.id.length < 36 ? '600' : ''}">{{node.label}}</span>
|
||||
<span :style="{'font-weight': data.id.length < 36 ? '600' : ''}">{{node.label}}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-main>
|
||||
@ -132,7 +132,6 @@
|
||||
<div style="border: 1px solid #F2F2F2;padding: 0px 10px 10px 10px;" >
|
||||
<awsui-form :model="ModelsetUpDialog.systemForm" :rules="ModelsetUpDialog.rules" ref="systemForm"
|
||||
label-position="top">
|
||||
|
||||
<awsui-form-item label="当前选定路径">
|
||||
<awsui-input v-model="ModelsetUpDialog.systemForm.repositoryPathData" disabled></awsui-input>
|
||||
</awsui-form-item>
|
||||
@ -140,9 +139,9 @@
|
||||
<awsui-input v-model="ModelsetUpDialog.systemForm.name"></awsui-input>
|
||||
</awsui-form-item>
|
||||
<template v-if="ModelsetUpDialog.systemForm.method=='control.policy'">
|
||||
<awsui-form-item label="制度类型" >
|
||||
<awsui-select v-model="ModelsetUpDialog.systemForm.systemType" :options="ModelsetUpDialog.systemForm.SystemTypeOptions" placeholder="请选择制度类型"></awsui-select>
|
||||
</awsui-form-item>
|
||||
<awsui-form-item label="制度类型" >
|
||||
<awsui-select v-model="ModelsetUpDialog.systemForm.systemType" :options="ModelsetUpDialog.systemForm.SystemTypeOptions" placeholder="请选择制度类型"></awsui-select>
|
||||
</awsui-form-item>
|
||||
</template>
|
||||
|
||||
</awsui-form>
|
||||
@ -197,7 +196,7 @@
|
||||
dis: false,
|
||||
headerHeight1: '60px',
|
||||
headerHeight2: '10px',
|
||||
treeHeight: (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm || this.havingCreatePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px',
|
||||
treeHeight: (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px',
|
||||
fileMethodList: [],
|
||||
folderMethodList: [],
|
||||
createDesignerVisible: false,
|
||||
@ -228,7 +227,7 @@
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
systemMethod: 'default',// 文件夹类型,default默认文件夹,custom自定义文件夹(扩展的文件夹类型的建模方法)
|
||||
systemTitle: '名称录入',// 新建文件夹时自定义标题
|
||||
systemTitle: '模型新建',// 新建文件夹时自定义标题
|
||||
systemForm: {
|
||||
name: '',
|
||||
uuid:"",
|
||||
@ -264,9 +263,6 @@
|
||||
havingRemovePerm: false,
|
||||
havingVersionManagePerm: false,
|
||||
validUserPermDataCount: 0,
|
||||
isOlderVersion:true,
|
||||
havingCreatePerm:false,
|
||||
havingBatchPerm:false,
|
||||
isHighSecurity: false,
|
||||
securityList: {},
|
||||
securityVisible: false,
|
||||
@ -315,15 +311,11 @@
|
||||
that.validUserPermDataCount = ro.data.validUserPermDataCount;
|
||||
if (that.validUserPermDataCount > 0) {
|
||||
that.havingWritePerm = ro.data.havingWritePerm;
|
||||
that.havingCreatePerm = ro.data.havingCreatePerm
|
||||
} else {
|
||||
that.havingWritePerm = false;
|
||||
that.havingCreatePerm = false;
|
||||
}
|
||||
that.havingRemovePerm = ro.data.havingRemovePerm;
|
||||
that.havingVersionManagePerm = ro.data.havingVersionManagePerm;
|
||||
that.havingBatchPerm = ro.data.havingBatchPerm;
|
||||
that.isOlderVersion = ro.data.isOlderVersion;
|
||||
that.initTreeHeight();
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
@ -363,10 +355,16 @@
|
||||
}
|
||||
},
|
||||
openNode(obj, node, tree) {// 打开一只模型文件
|
||||
this.closeCreatePopover();
|
||||
this.openRepositoryList(node.data.currId);
|
||||
this.transferTreeNode(obj)
|
||||
if(obj.folder==false){
|
||||
window.open(node.data.url, '_blank'); //在新窗口显示目标网页
|
||||
}else{
|
||||
this.closeCreatePopover();
|
||||
this.openRepositoryList(node.data.currId);
|
||||
this.transferTreeNode(obj)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
loadNode(node, resolve) {
|
||||
const that = this;
|
||||
const data = {
|
||||
@ -385,6 +383,7 @@
|
||||
}
|
||||
// 查询数据
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
|
||||
resolve(ro.data);
|
||||
if (node.level == 0 && ro.data.length > 0) {
|
||||
const tree = that.$refs.tree;
|
||||
@ -469,6 +468,7 @@
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
|
||||
if (ro.result == 'ok') {
|
||||
const fileMethodList = ro.data.fileMethodList;// 文件类建模
|
||||
for (let i = 0; i < fileMethodList.length; i++) {
|
||||
@ -560,7 +560,7 @@
|
||||
createModelsetUp(method) {// 创建文件夹
|
||||
this.ModelsetUpDialog.systemMethod = method;
|
||||
this.ModelsetUpDialog.systemForm.method = method;
|
||||
this.ModelsetUpDialog.systemTitle = '名称录入';
|
||||
this.ModelsetUpDialog.systemTitle = '新建模型';
|
||||
this.ModelsetUpDialog.dialogVisible = true;
|
||||
this.closeCreatePopover();
|
||||
},
|
||||
@ -615,92 +615,90 @@
|
||||
createSystemSave(formName) {// 保存新建的文件夹
|
||||
const that = this;
|
||||
|
||||
|
||||
|
||||
that.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (valid) {
|
||||
|
||||
const checkdata = {
|
||||
url:'jd',
|
||||
data:{
|
||||
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_checkname',
|
||||
title: that.ModelsetUpDialog.systemForm.name,
|
||||
method:that.ModelsetUpDialog.systemForm.method,
|
||||
}
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(checkdata).then(function (ro) {
|
||||
if (ro.data.result == 'ok') {
|
||||
const checkdata = {
|
||||
url:'jd',
|
||||
data:{
|
||||
cmd: 'com.actionsoft.apps.coe.pal_pl_repository_designer_checkname',
|
||||
title: that.ModelsetUpDialog.systemForm.name,
|
||||
method:that.ModelsetUpDialog.systemForm.method,
|
||||
}
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(checkdata).then(function (ro) {
|
||||
if (ro.data.result == 'ok') {
|
||||
|
||||
const nodeData = that.$refs.tree.getCurrentNode();
|
||||
const parentId = nodeData.id;
|
||||
const wsId = that.$store.getters.getWsIdFn;
|
||||
const teamId = that.$store.getters.getTeamIdFn;
|
||||
const data = {
|
||||
url: 'jd',
|
||||
data: {
|
||||
cmd: 'com.actionsoft.apps.coe.pal_processlevel_repository_create_save_Designer',
|
||||
wsId: wsId,
|
||||
teamId: teamId,
|
||||
category: that.ModelsetUpDialog.systemForm.category,
|
||||
method: that.ModelsetUpDialog.systemForm.method,
|
||||
parentId: parentId,
|
||||
container: '_blank',// 模板,暂时不做模板
|
||||
name:that.ModelsetUpDialog.systemForm.name
|
||||
}
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
const nodeData = that.$refs.tree.getCurrentNode();
|
||||
const parentId = nodeData.id;
|
||||
const wsId = that.$store.getters.getWsIdFn;
|
||||
const teamId = that.$store.getters.getTeamIdFn;
|
||||
const data = {
|
||||
url: 'jd',
|
||||
data: {
|
||||
cmd: 'com.actionsoft.apps.coe.pal_processlevel_repository_create_save_Designer',
|
||||
wsId: wsId,
|
||||
teamId: teamId,
|
||||
category: that.ModelsetUpDialog.systemForm.category,
|
||||
method: that.ModelsetUpDialog.systemForm.method,
|
||||
parentId: parentId,
|
||||
container: '_blank',// 模板,暂时不做模板
|
||||
name:that.ModelsetUpDialog.systemForm.name
|
||||
}
|
||||
};
|
||||
// 查询数据
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
|
||||
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.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.ModelsetUpDialog.dialogVisible = false;
|
||||
that.openRepositoryList(that.ModelsetUpDialog.systemForm.parentId);
|
||||
// 返回id
|
||||
openDesigner(that.$store.getters.getTeamIdFn, that.ModelsetUpDialog.systemForm.uuid, that.$store.state.sessionId);
|
||||
if (ro.result == 'ok') {
|
||||
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);
|
||||
})
|
||||
//清空数据
|
||||
that.$refs['systemForm'].resetFields();
|
||||
} else {
|
||||
that.$message.error(ro.msg);
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
})
|
||||
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
} else {
|
||||
that.$message({message: that.ModelsetUpDialog.systemForm.name+'名称重复,请重新输入!!!', type: 'warning'});
|
||||
return;
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
})
|
||||
} else {
|
||||
that.$message({message: that.ModelsetUpDialog.systemForm.name+'名称重复,请重新输入!!!', type: 'warning'});
|
||||
return;
|
||||
}
|
||||
}).catch(error=>{
|
||||
console.log(error);
|
||||
})
|
||||
|
||||
|
||||
}else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
}else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -736,6 +734,7 @@
|
||||
awsuiAxios.post(data).then(function (ro) {
|
||||
|
||||
// 返回id
|
||||
that.ModelsetUpDialog.systemForm.category=category;
|
||||
that.ModelsetUpDialog.systemForm.repositoryPathData = ro.data.repositoryPathData;
|
||||
that.ModelsetUpDialog.systemForm.parentId = parentId;
|
||||
that.createModelsetUp(method);
|
||||
@ -835,7 +834,7 @@
|
||||
|
||||
},
|
||||
initTreeHeight() {
|
||||
this.treeHeight = (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm || this.havingCreatePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px';
|
||||
this.treeHeight = (parseInt(this.$store.getters.getTopMainHeightFn)) - (this.havingWritePerm ? parseInt(this.headerHeight1) : parseInt(this.headerHeight2)) + 'px';
|
||||
},
|
||||
getIsHighSecurity(){
|
||||
return this.isHighSecurity;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user