merge
This commit is contained in:
@@ -246,3 +246,13 @@ export const chunkUploadCallbackApi = (params: any) => {
|
||||
export const downloadFileForEditApi = (params: any) => {
|
||||
return get(`${PREFIX}data/downloadFileForEdit`, params);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 查询文件树信息
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export const dataTreeListDirApi = (params: any) => {
|
||||
return get(`${PREFIX}data/listDir?`, params);
|
||||
};
|
||||
@@ -55,7 +55,11 @@
|
||||
<div class="right-content">
|
||||
<div class="tree-menu">
|
||||
<el-breadcrumb :separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item v-for="(item) in navList" :key="item[dataKey.id]" @click="openDirFun(item[dataKey.id])">
|
||||
<el-breadcrumb-item
|
||||
v-for="item in navList"
|
||||
:key="item[dataKey.id]"
|
||||
@click="openDirFun(item[dataKey.id])"
|
||||
>
|
||||
{{ item[dataKey.name] }}
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
@@ -76,6 +80,7 @@ interface Props {
|
||||
api: any;
|
||||
hideTree?: boolean;
|
||||
dataKey?: any;
|
||||
param?: any;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
@@ -86,6 +91,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
pId: 'parentDirId',
|
||||
name: 'originalName',
|
||||
},
|
||||
param: {},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['choseNode', 'updateNav']);
|
||||
@@ -96,7 +102,7 @@ const visible = ref(true);
|
||||
const isToggleShow = ref(true);
|
||||
|
||||
// 加载节点
|
||||
const loadMoreFun = async(node: any, resolve: any) => {
|
||||
const loadMoreFun = async (node: any, resolve: any) => {
|
||||
const listData: any = await getDataFun(node.data[props.dataKey.id] || '');
|
||||
if (node.level >= 1) {
|
||||
node.data.children = listData;
|
||||
@@ -106,9 +112,9 @@ const loadMoreFun = async(node: any, resolve: any) => {
|
||||
};
|
||||
|
||||
// 获取节点数据
|
||||
const getDataFun = async(pId: string) => {
|
||||
const getDataFun = async (pId: string) => {
|
||||
if (props.api) {
|
||||
const params: any = {};
|
||||
const params: any = { ...props.param };
|
||||
params[props.dataKey.pId] = pId || '';
|
||||
const res: any = await props.api(params);
|
||||
if (res.code === 200) {
|
||||
@@ -191,10 +197,12 @@ defineExpose({
|
||||
<style lang="scss" scoped>
|
||||
.comp-content {
|
||||
height: 100%;
|
||||
|
||||
.content {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
.toggle-btn {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
@@ -212,11 +220,13 @@ defineExpose({
|
||||
color: var(--el-text-color-regular);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
|
||||
&.hide {
|
||||
left: -14px;
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.left-content {
|
||||
width: 400px;
|
||||
overflow: auto;
|
||||
@@ -226,11 +236,13 @@ defineExpose({
|
||||
padding: var(--padding-normal);
|
||||
border-right: solid 1px var(--el-border-color-darker);
|
||||
transition: all 0.3s;
|
||||
|
||||
&.hide {
|
||||
width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tree-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -238,12 +250,14 @@ defineExpose({
|
||||
justify-content: space-between;
|
||||
min-height: 20px;
|
||||
width: 0;
|
||||
|
||||
.name {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -252,12 +266,14 @@ defineExpose({
|
||||
height: 20px;
|
||||
margin-right: var(--margin-tiny);
|
||||
}
|
||||
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
padding-left: var(--padding-normal);
|
||||
display: flex;
|
||||
@@ -266,12 +282,14 @@ defineExpose({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right-content {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
background-color: var(--el-bg-color);
|
||||
border-radius: var(--border-radius-normal);
|
||||
padding: var(--padding-normal);
|
||||
|
||||
.tree-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
<div class="png-container">
|
||||
<div class="png-title">{{ item.originalName }}</div>
|
||||
<div class="png-image">
|
||||
<el-image :src="item.url" fit="scale-down" />
|
||||
<el-image :src="item.url" fit="scale-down" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
<template>
|
||||
<div class="gl-page-content-grey-full">
|
||||
<div class="content">
|
||||
<FileTree ref="fileTreeRef" :api="dataListDirApi" @choseNode="choseNodeFun" @updateNav="updateNavFun">
|
||||
<FileTree
|
||||
ref="fileTreeRef"
|
||||
:api="dataTreeListDirApi"
|
||||
:param="{
|
||||
dirType,
|
||||
}"
|
||||
@choseNode="choseNodeFun"
|
||||
@updateNav="updateNavFun"
|
||||
>
|
||||
<template #options>
|
||||
<el-select v-model="dirType" @change="changedirTypeFun">
|
||||
<el-option
|
||||
v-for="item in dirTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #table>
|
||||
<!-- :head="headData" -->
|
||||
|
||||
@@ -33,7 +51,10 @@
|
||||
<el-form-item class="user-role-form-item">
|
||||
<el-input v-model="filterUserNameCopy" placeholder="请输入筛选内容">
|
||||
<template #suffix>
|
||||
<el-icon class="el-input__icon current-icon" @click="filterUserPermissionFun">
|
||||
<el-icon
|
||||
class="el-input__icon current-icon"
|
||||
@click="filterUserPermissionFun"
|
||||
>
|
||||
<search />
|
||||
</el-icon>
|
||||
</template>
|
||||
@@ -46,19 +67,19 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #read="{ row }">
|
||||
<el-checkbox v-model="row.read" label="" />
|
||||
<el-checkbox disabled v-model="row.read" label="" />
|
||||
</template>
|
||||
<template #write="{ row }">
|
||||
<el-checkbox v-model="row.write" label="" />
|
||||
<el-checkbox disabled v-model="row.write" label="" />
|
||||
</template>
|
||||
<template #delete="{ row }">
|
||||
<el-checkbox v-model="row.delete" label="" />
|
||||
<el-checkbox disabled v-model="row.delete" label="" />
|
||||
</template>
|
||||
<template #input="{ row }">
|
||||
<el-checkbox v-model="row.input" label="" />
|
||||
<el-checkbox disabled v-model="row.input" label="" />
|
||||
</template>
|
||||
<template #output="{ row }">
|
||||
<el-checkbox v-model="row.output" label="" />
|
||||
<el-checkbox disabled v-model="row.output" label="" />
|
||||
</template>
|
||||
</BaseTable>
|
||||
</template>
|
||||
@@ -72,7 +93,7 @@ import { onMounted, reactive, ref } from 'vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTree from '@/components/common/fileTree/index.vue';
|
||||
import {
|
||||
dataListDirApi,
|
||||
dataTreeListDirApi,
|
||||
queryUserFilePermissionApi,
|
||||
updateUserFilePermissionApi,
|
||||
} from '@/api/data/data';
|
||||
@@ -86,6 +107,26 @@ const filterUserName = ref<string>('');
|
||||
const filterUserNameCopy = ref<string>('');
|
||||
const currentTreeNodeInfo = ref<any>({});
|
||||
|
||||
const dirType = ref(1);
|
||||
|
||||
const dirTypeList = ref<any>([
|
||||
{
|
||||
label: '知识库',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '项目数据',
|
||||
value: 2,
|
||||
},
|
||||
]);
|
||||
|
||||
//
|
||||
const changedirTypeFun = async () => {
|
||||
currentTreeNodeInfo.value = {};
|
||||
await fileTreeRef.value.reloadFun();
|
||||
await baseTableRef.value.setDataFun([]);
|
||||
};
|
||||
|
||||
tableData.value = [
|
||||
// {
|
||||
// id: 1,
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-time">
|
||||
创建时间:
|
||||
节点执行时间:
|
||||
<el-icon class="blue">
|
||||
<Odometer />
|
||||
</el-icon>
|
||||
<span class="name"> {{ currentRunNodeInfo?.createTime }}</span>
|
||||
<span class="name"> {{ flowNodeData?.nodeDetailInfo?.durationFormatted || '--' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-operate">
|
||||
|
||||
Reference in New Issue
Block a user