update:数据总览优化
This commit is contained in:
@@ -26,14 +26,11 @@
|
||||
<div class="tree-item">
|
||||
<div class="name">
|
||||
<div class="icon">
|
||||
<el-icon v-if="data.relatedResourceUuidOwnType === NODE_TYPE.PROJECT" :size="18">
|
||||
<MessageBox />
|
||||
</el-icon>
|
||||
<el-icon v-else-if="data.relatedResourceUuidOwnType === NODE_TYPE.PHASE" :size="18">
|
||||
<Share />
|
||||
</el-icon>
|
||||
<el-icon v-else>
|
||||
<Folder />
|
||||
<el-icon :size="18">
|
||||
<MessageBox v-if="data.relatedResourceUuidOwnType === NODE_TYPE.PROJECT" />
|
||||
<Share v-else-if="data.relatedResourceUuidOwnType === NODE_TYPE.PHASE" />
|
||||
<Document v-else-if="data.relatedResourceUuidOwnType === NODE_TYPE.TASK"/>
|
||||
<Folder v-else />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="label">{{ data.originalName }}</div>
|
||||
@@ -74,7 +71,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { MessageBox, Share, Folder, DArrowLeft, Search } from '@element-plus/icons-vue';
|
||||
import { MessageBox, Share, Folder, DArrowLeft, Search, Document } from '@element-plus/icons-vue';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -17,7 +17,10 @@ export enum NODE_TYPE {
|
||||
MIXED = 'mixed',
|
||||
/** 算例 */
|
||||
RUN = 'run',
|
||||
WORKSPACE = 'workspace'
|
||||
/** 工位 */
|
||||
WORKSPACE = 'workspace',
|
||||
/** 机台 */
|
||||
MACHINE = 'machine',
|
||||
}
|
||||
export enum LEVEL_TYPE {
|
||||
/** 非任务和指标 */
|
||||
|
||||
@@ -92,7 +92,10 @@
|
||||
<div class="file-name">
|
||||
<template v-if="row.dataType === 1">
|
||||
<el-icon :size="16">
|
||||
<Folder />
|
||||
<MessageBox v-if="row.relatedResourceUuidOwnType === NODE_TYPE.PROJECT" />
|
||||
<Share v-else-if="row.relatedResourceUuidOwnType === NODE_TYPE.PHASE" />
|
||||
<Document v-else-if="row.relatedResourceUuidOwnType === NODE_TYPE.TASK"/>
|
||||
<Folder v-else />
|
||||
</el-icon>
|
||||
<el-link type="primary" class="name" @dblclick="goDetailFun(row)">{{ row.originalName }}</el-link>
|
||||
</template>
|
||||
@@ -174,7 +177,7 @@ import PhaseInfoDia from '@/components/project/phaseInfoDialog.vue';
|
||||
import NodeDetailDialog from '@/components/common/treeCaseTable/nodeDetailDialog.vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import ProjectInfoDialog from '@/components/project/projectInfoDialog.vue';
|
||||
import { CirclePlus, Upload, Edit, Refresh, Delete, Folder, Document } from '@element-plus/icons-vue';
|
||||
import { CirclePlus, Upload, Edit, Refresh, Delete, Folder, Document, Share, MessageBox } from '@element-plus/icons-vue';
|
||||
import { getTagMapList } from '@/views/task/projectDetail/components/project';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
@@ -227,17 +230,13 @@ const addDiaFun = (type: string) => {
|
||||
showNodeInfoDialog.value = true;
|
||||
}
|
||||
if (type === NODE_TYPE.CATEGORY) {
|
||||
if (!currentData.value || currentData.value.relatedResourceUuidOwnType !== NODE_TYPE.PHASE) {
|
||||
ElMessage.warning('请在节点下创建分类');
|
||||
if (!currentData.value || ![NODE_TYPE.PHASE, NODE_TYPE.WORKSPACE, NODE_TYPE.MACHINE].includes(currentData.value.relatedResourceUuidOwnType)) {
|
||||
ElMessage.warning('请在节点或分类下创建分类');
|
||||
return;
|
||||
}
|
||||
modalVisible.value = true;
|
||||
}
|
||||
if (type === NODE_TYPE.TASK) {
|
||||
if (!currentData.value || !currentData.value.relatedResourceUuidOwnType) {
|
||||
ElMessage.warning('请在分类下创建任务');
|
||||
return;
|
||||
}
|
||||
modalVisible.value = true;
|
||||
}
|
||||
};
|
||||
@@ -255,9 +254,14 @@ const editFun = () => {
|
||||
editId.value = currentData.value.relatedParentUuid;
|
||||
showNodeInfoDialog.value = true;
|
||||
}
|
||||
if (currentData.value.relatedResourceUuidOwnType === 'workspace') { // TODO
|
||||
if (currentData.value.relatedResourceUuidOwnType === NODE_TYPE.WORKSPACE) {
|
||||
editId.value = currentData.value.relatedParentUuid;
|
||||
editData.value = currentData.value;
|
||||
editData.value = {
|
||||
nodeName: currentData.value.originalName,
|
||||
englishName: '',
|
||||
nodeCode: '',
|
||||
nodeType: currentData.value.relatedResourceUuidOwnType,
|
||||
};
|
||||
modalVisible.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user