添加分类功能

This commit is contained in:
zhal 2022-07-12 14:48:13 +08:00
parent 8158242fde
commit 8517d004b3

View File

@ -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
@ -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>
@ -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',// defaultcustom
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) {//
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,8 +615,6 @@
createSystemSave(formName) {//
const that = this;
that.$refs[formName].validate((valid) => {
if (valid) {
@ -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;