Merge branch 'hotfix' of http://carsafe.uicp.cn/Front_Team/SPDM into hotfix
This commit is contained in:
BIN
src/assets/imgs/fileIcon/run.png
Normal file
BIN
src/assets/imgs/fileIcon/run.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
@@ -33,6 +33,7 @@
|
||||
<FileIcon
|
||||
:fileName="projectCodeName(data)"
|
||||
:fileType="data.relatedResourceUuidOwnType"
|
||||
:folderOpen="node.expanded"
|
||||
/>
|
||||
</div>
|
||||
<div class="label" :title="projectCodeName(data)">
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<slot name="top" />
|
||||
</div>
|
||||
<div class="darg-line line-row" @mousedown="startDragFun">
|
||||
==
|
||||
<span class="icon">||</span>
|
||||
<div
|
||||
v-if="showToggleBtn && !currentHideTop"
|
||||
class="toggle-btn arrow-top"
|
||||
@@ -361,6 +361,10 @@ const clickBottomFun = (event: Event) => {
|
||||
&:hover {
|
||||
background-color: var(--el-border-color);
|
||||
}
|
||||
.icon {
|
||||
transform: rotate(90deg);
|
||||
transform-origin: center center;
|
||||
}
|
||||
}
|
||||
|
||||
// 垂直分割线样式(left-right)
|
||||
@@ -380,8 +384,8 @@ const clickBottomFun = (event: Event) => {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--el-bg-color);
|
||||
width: 20px;
|
||||
height: 40px;
|
||||
width: 16px;
|
||||
height: 30px;
|
||||
border: solid 1px var(--el-border-color-darker);
|
||||
color: var(--el-text-color-regular);
|
||||
cursor: pointer;
|
||||
@@ -395,7 +399,7 @@ const clickBottomFun = (event: Event) => {
|
||||
}
|
||||
.arrow-left {
|
||||
position: absolute;
|
||||
left: -20px;
|
||||
left: -16px;
|
||||
border-radius: 6px 0 0 6px;
|
||||
border-right: 0;
|
||||
}
|
||||
@@ -412,8 +416,8 @@ const clickBottomFun = (event: Event) => {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--el-bg-color);
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
width: 30px;
|
||||
height: 16px;
|
||||
border: solid 1px var(--el-border-color-darker);
|
||||
color: var(--el-text-color-regular);
|
||||
cursor: pointer;
|
||||
@@ -427,7 +431,7 @@ const clickBottomFun = (event: Event) => {
|
||||
}
|
||||
.arrow-top {
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
top: -16px;
|
||||
border-radius: 6px 6px 0 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -9,18 +9,20 @@
|
||||
<img v-if="fileType === NODE_TYPE.PROJECT" class="second-type-img" :src="ProjectIcon" />
|
||||
<img v-if="fileType === NODE_TYPE.PHASE" class="second-type-img" :src="PhaseIcon" />
|
||||
<img v-if="fileType === NODE_TYPE.TASK" class="second-type-img" :src="TaskIcon" />
|
||||
<img v-if="fileType === NODE_TYPE.RUN" class="second-type-img" :src="RunIcon" />
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import { fileUploadAllocationIconFun } from '@/utils/file';
|
||||
import { isString } from 'lodash-es';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
import ProjectIcon from '@/assets/imgs/fileIcon/project.png';
|
||||
import PhaseIcon from '@/assets/imgs/fileIcon/phase.png';
|
||||
import TaskIcon from '@/assets/imgs/fileIcon/task.png';
|
||||
import RunIcon from '@/assets/imgs/fileIcon/run.png';
|
||||
|
||||
interface Props {
|
||||
fileName: string;
|
||||
@@ -38,7 +40,14 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
folderOpen: false,
|
||||
});
|
||||
|
||||
const imgSrc = ref(fileUploadAllocationIconFun(props.fileName, props.dataType));
|
||||
watch(
|
||||
() => props.folderOpen,
|
||||
() => {
|
||||
imgSrc.value = fileUploadAllocationIconFun(props.fileName, props.dataType, props.folderOpen);
|
||||
}
|
||||
);
|
||||
|
||||
const imgSrc = ref(fileUploadAllocationIconFun(props.fileName, props.dataType, props.folderOpen));
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<Dialog v-model="visible" diaTitle="文件重命名" :width="600" @close="handleClose">
|
||||
<Dialog
|
||||
v-model="visible"
|
||||
:diaTitle="fileData.dataType == 1 ? '文件夹重命名' : '文件重命名'"
|
||||
:width="600"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form label-width="auto">
|
||||
<el-form-item label="文件名称">
|
||||
<el-form-item :label="fileData.dataType == 1 ? '文件夹名称' : '文件名称'">
|
||||
<el-input v-model="fileName" placeholder="请输入" clearable>
|
||||
<template #append v-if="fileSuffix">{{ fileSuffix }}</template>
|
||||
</el-input>
|
||||
|
||||
@@ -199,7 +199,7 @@ const renameFun = (id: any, row: any) => {
|
||||
const renameFinishFun = () => {
|
||||
// 刷新数据
|
||||
fileTableRef.value.resetFun();
|
||||
emit('refresh');
|
||||
emit('refresh', currentRenameData.value);
|
||||
};
|
||||
// #endregion
|
||||
|
||||
|
||||
@@ -26,17 +26,11 @@
|
||||
<template #default="{ data, node }">
|
||||
<div class="tree-item">
|
||||
<div class="icon">
|
||||
<template v-if="data.dataType === 1">
|
||||
<el-icon :size="18">
|
||||
<Folder v-if="!node.expanded" />
|
||||
<FolderOpened v-else />
|
||||
</el-icon>
|
||||
</template>
|
||||
<template v-if="data.dataType === 2">
|
||||
<el-icon :size="18">
|
||||
<Document />
|
||||
</el-icon>
|
||||
</template>
|
||||
<FileIcon
|
||||
:fileName="data[dataKey.name]"
|
||||
:dataType="data.dataType"
|
||||
:folderOpen="node.expanded"
|
||||
/>
|
||||
</div>
|
||||
<div class="label" :title="data[dataKey.name]">{{ data[dataKey.name] }}</div>
|
||||
<div class="actions">
|
||||
@@ -75,8 +69,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { Folder, FolderOpened, Document } from '@element-plus/icons-vue';
|
||||
import DragSplit from '@/components/common/dragSplit/index.vue';
|
||||
import FileIcon from '@/components/common/fileIcon/index.vue';
|
||||
|
||||
interface Props {
|
||||
api: any;
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
...searchParams,
|
||||
parentDirId: currentFolder?.id || '',
|
||||
}"
|
||||
@refresh="onFileTableRefreshFun"
|
||||
@cell-dblclick="onCellDblclickFun"
|
||||
>
|
||||
<template #leftOptions>
|
||||
@@ -692,6 +693,14 @@ const onDelDirConfirmFun = () => {
|
||||
refreshTreeAfterModifyOrRemove(currentFolderToDelete.value);
|
||||
};
|
||||
|
||||
const onFileTableRefreshFun = (row?: any) => {
|
||||
if (row) {
|
||||
refreshTreeAfterModifyOrRemove(row);
|
||||
} else {
|
||||
fileTreeRef.value?.openDirFun(currentFolder.value?.id);
|
||||
}
|
||||
};
|
||||
|
||||
const onCellDblclickFun = (e: any) => {
|
||||
if (e.row.dataType === 1) {
|
||||
fileTreeRef.value?.openDirFun(e.row.id);
|
||||
|
||||
@@ -503,6 +503,9 @@ export const fileUploadAllocationIconFun = (
|
||||
fileUploadAllocationIconFun?: any,
|
||||
folderOpen?: any
|
||||
) => {
|
||||
if (!fileName) {
|
||||
return;
|
||||
}
|
||||
const arr = fileName?.split('.');
|
||||
const fileType = arr.length > 1 ? arr.pop()?.toLowerCase() : '';
|
||||
if (fileType === '') {
|
||||
|
||||
@@ -60,13 +60,16 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="table">
|
||||
<BaseTable
|
||||
<FileTable
|
||||
ref="baseTableRef"
|
||||
:tableName="TABLE_NAME.SIMULATION_KNOWLEDGE"
|
||||
:api="apiName"
|
||||
:params="searchParams"
|
||||
showIndex
|
||||
:actionList="actionList"
|
||||
:defaultActions="
|
||||
folderPermission.import && currentFolder ? ['rename', 'refresh'] : ['refresh']
|
||||
"
|
||||
:exportApi="dataExportKnowledgeListApi"
|
||||
:showExport="parsePermission(currentFolder?.permissionValue).export"
|
||||
fullHeight
|
||||
@@ -75,6 +78,7 @@
|
||||
...searchParams,
|
||||
parentDirId: currentFolder?.id || '',
|
||||
}"
|
||||
@refresh="onFileTableRefreshFun"
|
||||
@cell-dblclick="onCellDblclickFun"
|
||||
>
|
||||
<template #leftOptions>
|
||||
@@ -138,7 +142,7 @@
|
||||
{{ KNOWLEDGE_APPROVE_TYPE.O[row[column.field]] }}</el-button
|
||||
>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</FileTable>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -183,7 +187,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, watchEffect, type Ref } from 'vue';
|
||||
import { DArrowLeft, Plus } from '@element-plus/icons-vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTable from '@/components/common/fileTable/index.vue';
|
||||
import FileTree from '@/components/common/fileTree/index.vue';
|
||||
import KnowledgeDetailModal from './components/knowledgeDetailModal.vue';
|
||||
import FolderModal from './components/folderDetailModal.vue';
|
||||
@@ -540,6 +544,14 @@ const delFileFun = (row: any) => {
|
||||
approveDelParams.value = { delFileId: row.id };
|
||||
approveDelVisible.value = true;
|
||||
};
|
||||
const onFileTableRefreshFun = (row?: any) => {
|
||||
if (row) {
|
||||
refreshTreeAfterModifyOrRemove(row);
|
||||
} else {
|
||||
fileTreeRef.value?.openDirFun(currentFolder.value?.id);
|
||||
}
|
||||
};
|
||||
|
||||
const onCellDblclickFun = (e: any) => {
|
||||
if (e.row.dataType === 1) {
|
||||
fileTreeRef.value?.openDirFun(e.row.id);
|
||||
|
||||
@@ -15,10 +15,13 @@
|
||||
:load="loadMoreFun"
|
||||
@current-change="currentChangeFun"
|
||||
>
|
||||
<template #default="{ data }">
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node">
|
||||
<el-icon class="icon-style" v-if="data.type != 3" :size="18"><Folder /></el-icon>
|
||||
<el-icon class="icon-style" v-else :size="18"><Document /></el-icon>
|
||||
<FileIcon
|
||||
:fileName="data.name"
|
||||
:dataType="data.type !== 3 ? '1' : '2'"
|
||||
:folderOpen="node.expanded"
|
||||
/>
|
||||
<div class="name" :title="data.name">{{ data.name }}</div>
|
||||
<!-- 审批中的节点 不允许修改删除 0-审核完成,1-文件上传审核中,2-文件修改审核中 3-文件删除审核中-->
|
||||
<div v-if="!pageType">
|
||||
@@ -195,7 +198,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { Document, Folder, EditPen, Delete } from '@element-plus/icons-vue';
|
||||
import { EditPen, Delete } from '@element-plus/icons-vue';
|
||||
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import {
|
||||
getSimulationParameterTreeApi,
|
||||
@@ -218,6 +221,7 @@ import DragSplit from '@/components/common/dragSplit/index.vue';
|
||||
import ParamDetail from './components/addParam.vue';
|
||||
import { downloadFileById } from '@/utils/file';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import FileIcon from '@/components/common/fileIcon/index.vue';
|
||||
|
||||
const currentNodeKey = ref<any>('');
|
||||
const currentNode = ref<any>({});
|
||||
@@ -585,10 +589,6 @@ const objFormatFun = (data: any) => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
.icon-style {
|
||||
color: var(--el-color-primary);
|
||||
margin-right: 5px;
|
||||
}
|
||||
.name {
|
||||
width: 0;
|
||||
flex: 1;
|
||||
|
||||
@@ -17,18 +17,16 @@
|
||||
@current-change="nodeChangeClickFun"
|
||||
@node-contextmenu="rowRightClickFun"
|
||||
>
|
||||
<template #default="{ data }">
|
||||
<template #default="{ node, data }">
|
||||
<div class="custom-tree-node">
|
||||
<div class="title-info">
|
||||
<el-icon v-if="data.nodeType === NODE_TYPE.TASK" :size="16" class="blue">
|
||||
<Document />
|
||||
</el-icon>
|
||||
<el-icon v-else-if="data.nodeType === NODE_TYPE.RUN" :size="16" class="blue">
|
||||
<ScaleToOriginal />
|
||||
</el-icon>
|
||||
<el-icon v-else :size="16" class="blue">
|
||||
<Folder />
|
||||
</el-icon>
|
||||
<div class="file-icon">
|
||||
<FileIcon
|
||||
:fileName="data.nodeName || data.runName"
|
||||
:folderOpen="node.expanded"
|
||||
:fileType="data.nodeType"
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
v-if="data.nodeType === NODE_TYPE.RUN"
|
||||
:title="data.runName"
|
||||
@@ -215,7 +213,7 @@
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick, watch } from 'vue';
|
||||
import filterProject from '../filterProject/index.vue';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
import { Folder, Document, ScaleToOriginal, Edit } from '@element-plus/icons-vue';
|
||||
import { Edit } from '@element-plus/icons-vue';
|
||||
import createRunDiv from './operateComponent/createRunDiv.vue';
|
||||
import {
|
||||
addTaskRunApi,
|
||||
@@ -236,6 +234,7 @@ import { getTagMapList } from '@/utils/task';
|
||||
import { getIdMap } from '@/views/task/projectDetail/components/project';
|
||||
import changeTaskStatus from './operateComponent/changeTaskStatus.vue';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import FileIcon from '@/components/common/fileIcon/index.vue';
|
||||
|
||||
const emits = defineEmits(['nodeClickFn']);
|
||||
const tableId = ref(new Date().getTime());
|
||||
@@ -786,19 +785,16 @@ onBeforeUnmount(() => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.title-info {
|
||||
height: 100%;
|
||||
width: calc(100% - 40px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.blue {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.name {
|
||||
padding-left: 8px;
|
||||
.file-icon {
|
||||
width: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ const currentProjectBaseInfo = reactive<any>({
|
||||
const viewType = ref(enableConfigByTenant([TENANT_ENUM.LYRIC]) ? 'list' : 'card');
|
||||
const searchParams = ref({
|
||||
type: props.projectType,
|
||||
nodeType: NODE_TYPE.PROJECT,
|
||||
});
|
||||
const currentRow = ref();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user