megre:魏保林遗留代码
This commit is contained in:
@@ -11,10 +11,14 @@
|
||||
>
|
||||
<el-tabs v-model="activeName" class="flow-view-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="属性配置" name="attributeConfig">
|
||||
<AttributeConfig readonly :nodeAttribute="nodeAttribute"></AttributeConfig>
|
||||
<AttributeConfig :graph="graph" readonly :nodeAttribute="nodeAttribute"></AttributeConfig>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="界面配置" name="pageConfig">
|
||||
<!-- <PageConfig :nodeAttribute="nodeAttribute" ref="pageConfigRef"></PageConfig> -->
|
||||
<FlowNodeParamTable
|
||||
hideButtons
|
||||
:nodeParams="nodeAttribute.pageConfigList"
|
||||
></FlowNodeParamTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template #footer>
|
||||
@@ -25,6 +29,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
import AttributeConfig from '@/views/simulation/creation/components/attributeConfig.vue';
|
||||
import FlowNodeParamTable from '@/components/flow/flowNodeParamTable.vue';
|
||||
|
||||
const props = defineProps({
|
||||
drawerVisible: {
|
||||
@@ -37,6 +42,12 @@ const props = defineProps({
|
||||
return {};
|
||||
},
|
||||
},
|
||||
graph: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:drawerVisible', 'update:nodeAttribute']);
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
<div id="flow-view-content"></div>
|
||||
</div>
|
||||
<TeleportContainer />
|
||||
<FlowConfig v-model:drawerVisible="drawerVisible" :nodeAttribute="nodeAttribute"></FlowConfig>
|
||||
<FlowConfig
|
||||
:graph="graph"
|
||||
v-model:drawerVisible="drawerVisible"
|
||||
:nodeAttribute="nodeAttribute"
|
||||
></FlowConfig>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
@@ -209,7 +213,7 @@ onMounted(async () => {
|
||||
span {
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
margin-right: var(--margin-medium) ;
|
||||
margin-right: var(--margin-medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,30 @@
|
||||
@keyup.enter="enterFun"
|
||||
/>
|
||||
</template>
|
||||
<!-- 执行状态 -->
|
||||
<template #exeStatus="{ row }">
|
||||
<span v-if="row.nodeType === NODE_TYPE.TASK">
|
||||
<span :class="getTaskExeStyleClass(row.exeStatus)"> </span>
|
||||
{{ TASK_EXE_STATUS.O[row.exeStatus] }}
|
||||
</span>
|
||||
<!-- <StatusDot
|
||||
v-if="row.nodeType === NODE_TYPE.TASK"
|
||||
:status="statusMapFun(row.exeStatus)"
|
||||
:title="TASK_EXE_STATUS.O[row.exeStatus]"
|
||||
/> -->
|
||||
</template>
|
||||
<!-- 达成状态 -->
|
||||
<template #achieveStatus="{ row }">
|
||||
<span v-if="row.nodeType === NODE_TYPE.TASK">
|
||||
<span :class="getTaskAchieveStyleClass(row.achieveStatus)"> </span>
|
||||
{{ RESULT_ACHIEVE_STATUS.O[row.achieveStatus] }}
|
||||
</span>
|
||||
<!-- <StatusDot
|
||||
v-if="row.nodeType === NODE_TYPE.TASK"
|
||||
:status="statusMapFun2(row.achieveStatus)"
|
||||
:title="RESULT_ACHIEVE_STATUS.O[row.achieveStatus]"
|
||||
/> -->
|
||||
</template>
|
||||
<!-- 英文名 -->
|
||||
<template #englishName="{ row }">
|
||||
<TreeEditItem :data="row.englishName" :editMode="editMode" />
|
||||
@@ -391,7 +415,8 @@ import uploadImg from '@/components/common/table/uploadImg.vue';
|
||||
import { useTaskStore } from '@/stores/taskPool';
|
||||
import userSelect from '../userSelect/index.vue';
|
||||
import { disposeMemberList } from '@/views/task/projectDetail/components/project';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import { getMemberListIds, getTaskExeStyleClass, getTaskAchieveStyleClass } from '@/utils/task';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
|
||||
const ALLOWED_PATTERN = /[^a-zA-Z0-9\u4e00-\u9fa5\s]/g;
|
||||
const TreeTableRef = ref<any>();
|
||||
@@ -408,6 +433,11 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
editMode: false,
|
||||
});
|
||||
|
||||
const { TASK_EXE_STATUS, RESULT_ACHIEVE_STATUS } = useDict(
|
||||
'RESULT_ACHIEVE_STATUS',
|
||||
'TASK_EXE_STATUS'
|
||||
);
|
||||
|
||||
const treeData = ref<any>([]);
|
||||
const taskStore = useTaskStore();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
tableName="FLOW_NODE_PARAM"
|
||||
:show-overflow="false"
|
||||
>
|
||||
<template #leftOptions>
|
||||
<template #leftOptions v-if="!hideButtons">
|
||||
<el-button type="primary" @click="paramToLibFun">参数入库</el-button>
|
||||
<el-button type="primary" @click="saveNodeParamFun">保存参数</el-button>
|
||||
<el-button type="" @click="referenceParamFun">引用参数</el-button>
|
||||
@@ -172,6 +172,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
hideButtons: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const baseTableRef = ref();
|
||||
|
||||
@@ -33,7 +33,7 @@ const props = defineProps({
|
||||
},
|
||||
tableName: {
|
||||
type: String,
|
||||
default: 'PROJECT_TASK_MODAL',
|
||||
default: 'PROJECT_TASK_DETAIL',
|
||||
},
|
||||
});
|
||||
const tableFormRef = ref();
|
||||
|
||||
@@ -16,7 +16,7 @@ export enum TABLE_NAME {
|
||||
/** 知识库 - 审批预览 */
|
||||
SIMULATION_KNOWLEDGE_APPROVE_PREVIEW = 'SIMULATION_KNOWLEDGE_APPROVE_PREVIEW',
|
||||
/** 项目任务弹窗 */
|
||||
PROJECT_TASK_MODAL = 'PROJECT_TASK_MODAL',
|
||||
PROJECT_TASK_MODAL = 'PROJECT_TASK_DETAIL',
|
||||
/** 数据训练 */
|
||||
MODEL_TRAINING_LIST = 'MODEL_TRAINING_LIST',
|
||||
/** 数据训练 - 参数设置 */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useDict } from './useDict';
|
||||
import { getTagKeyMap } from './enum/node';
|
||||
import { TASK_CALCULATE_STATUS, TASK_PROCESS_STATUS } from './enum/task';
|
||||
|
||||
export const disposeSimType = (demandType: string, simType: string) => {
|
||||
if (demandType && simType) {
|
||||
@@ -40,3 +41,32 @@ export const getTagMapList = () => {
|
||||
});
|
||||
return tagMapList;
|
||||
};
|
||||
|
||||
export const getTaskExeStyleClass = (status: string) => {
|
||||
switch (status) {
|
||||
case TASK_PROCESS_STATUS.COMPLETED:
|
||||
return 'dot dot-success';
|
||||
case TASK_PROCESS_STATUS.IN_PROGRESS:
|
||||
return 'dot dot-in-precess';
|
||||
case TASK_PROCESS_STATUS.NO_STARTED:
|
||||
return 'dot dot-default';
|
||||
case TASK_PROCESS_STATUS.PAUSED:
|
||||
return 'dot dot-approving';
|
||||
default:
|
||||
return 'dot dot-default';
|
||||
}
|
||||
};
|
||||
|
||||
export const getTaskAchieveStyleClass = (status: number) => {
|
||||
const statusString = String(status);
|
||||
switch (statusString) {
|
||||
case TASK_CALCULATE_STATUS.QUALIFIED:
|
||||
return 'dot dot-qualified';
|
||||
case TASK_CALCULATE_STATUS.UNQUALIFIED:
|
||||
return 'dot dot-unqualified';
|
||||
case TASK_CALCULATE_STATUS.NO_CALCULATE:
|
||||
return 'dot dot-no-calculate';
|
||||
default:
|
||||
return 'dot dot-no-calculate';
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,11 +19,16 @@
|
||||
</el-tabs>
|
||||
<template #footer>
|
||||
<el-button @click="closeFun">关闭</el-button>
|
||||
<el-button @click="reviewPageConfigFun">预览</el-button>
|
||||
<el-button v-if="activeName === 'pageConfig'" type="primary" @click="saveTemplateFun"
|
||||
>保存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-drawer>
|
||||
<ReviewPageConfig
|
||||
v-model:showReviewDialog="showReviewDialog"
|
||||
:pageConfigList="nodeAttribute.pageConfigList"
|
||||
></ReviewPageConfig>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
@@ -31,6 +36,7 @@ import AttributeConfig from './attributeConfig.vue';
|
||||
import PageConfig from './pageConfig/index.vue';
|
||||
import { updateNodeAttribute } from './nodeEvents';
|
||||
import { FLOW_CREATE_ID } from './initGraph';
|
||||
import ReviewPageConfig from './reviewPageConfig.vue';
|
||||
|
||||
const props = defineProps({
|
||||
drawerVisible: {
|
||||
@@ -79,6 +85,11 @@ const saveTemplateFun = () => {
|
||||
updateNodeAttribute({ pageConfigList: pageConfigRef.value.drawingList });
|
||||
};
|
||||
|
||||
const showReviewDialog = ref(false);
|
||||
const reviewPageConfigFun = () => {
|
||||
showReviewDialog.value = true;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
insertElement.value = document.getElementById(FLOW_CREATE_ID);
|
||||
});
|
||||
|
||||
@@ -146,7 +146,10 @@ export const getNodeList = async () => {
|
||||
const res: any = await queryAllApplicationApi();
|
||||
if (res.code === 200) {
|
||||
res.data.forEach((item: any) => {
|
||||
typeKeyArray[item.appType].nodes.push(item);
|
||||
// 启用的app才能在流程中使用
|
||||
if (item.appStatus === 1) {
|
||||
typeKeyArray[item.appType].nodes.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
return typeKeyArray;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.gl-page-content {
|
||||
.flow-content {
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
#flow-box {
|
||||
@@ -63,80 +63,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.x6-widget-stencil.collapsable.collapsed > .x6-widget-stencil-title::before,
|
||||
.x6-widget-stencil-group.collapsable.collapsed > .x6-widget-stencil-group-title::before {
|
||||
background-image: url(@/assets/imgs/dragFlow/close.svg) !important;
|
||||
background-size: 10px;
|
||||
background-position: center;
|
||||
}
|
||||
.x6-widget-stencil.collapsable > .x6-widget-stencil-title::before,
|
||||
.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title::before {
|
||||
background-image: url(@/assets/imgs/dragFlow/open.svg) !important;
|
||||
background-size: 10px;
|
||||
background-position: center;
|
||||
}
|
||||
.x6-widget-stencil-title {
|
||||
display: none;
|
||||
}
|
||||
.x6-widget-stencil-title,
|
||||
.x6-widget-stencil-group > .x6-widget-stencil-group-title {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
#flow-create-content {
|
||||
display: flex;
|
||||
border: 1px solid #dfe3e8;
|
||||
// height: calc(100vh - 176px);
|
||||
// height: 100%;
|
||||
// height: calc(100% - 40px) !important;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
#stencil {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
border-right: 1px solid #dfe3e8;
|
||||
}
|
||||
#graph-container {
|
||||
width: calc(100% - 180px);
|
||||
height: 100%;
|
||||
}
|
||||
.x6-widget-stencil {
|
||||
background-color: #fff;
|
||||
}
|
||||
.x6-widget-stencil-title {
|
||||
background-color: #fff;
|
||||
}
|
||||
.x6-widget-stencil-group-title {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.x6-widget-transform {
|
||||
margin: -1px 0 0 -1px;
|
||||
padding: 0px;
|
||||
border: 1px solid #239edd;
|
||||
}
|
||||
.x6-widget-transform > div {
|
||||
border: 1px solid #239edd;
|
||||
}
|
||||
.x6-widget-transform > div:hover {
|
||||
background-color: #3dafe4;
|
||||
}
|
||||
.x6-widget-transform-active-handle {
|
||||
background-color: #3dafe4;
|
||||
}
|
||||
.x6-widget-transform-resize {
|
||||
border-radius: 0;
|
||||
}
|
||||
.x6-widget-selection-inner {
|
||||
border: 1px solid #239edd;
|
||||
}
|
||||
.x6-widget-selection-box {
|
||||
opacity: 0;
|
||||
}
|
||||
.x6-widget-stencil-content {
|
||||
.x6-port-body {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="gl-page-content no-padding">
|
||||
<div class="gl-page-content no-padding flow-content">
|
||||
<!-- <el-button @click="exportJson">导出json</el-button>
|
||||
<el-button @click="importJson">导入json</el-button> -->
|
||||
<div class="header-box">
|
||||
@@ -253,3 +253,81 @@ onBeforeUnmount(() => {
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" src="./index.scss" scoped></style>
|
||||
<style lang="scss">
|
||||
.x6-widget-stencil.collapsable.collapsed > .x6-widget-stencil-title::before,
|
||||
.x6-widget-stencil-group.collapsable.collapsed > .x6-widget-stencil-group-title::before {
|
||||
background-image: url(@/assets/imgs/dragFlow/close.svg) !important;
|
||||
background-size: 10px;
|
||||
background-position: center;
|
||||
}
|
||||
.x6-widget-stencil.collapsable > .x6-widget-stencil-title::before,
|
||||
.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title::before {
|
||||
background-image: url(@/assets/imgs/dragFlow/open.svg) !important;
|
||||
background-size: 10px;
|
||||
background-position: center;
|
||||
}
|
||||
.x6-widget-stencil-title {
|
||||
display: none;
|
||||
}
|
||||
.x6-widget-stencil-title,
|
||||
.x6-widget-stencil-group > .x6-widget-stencil-group-title {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
#flow-create-content {
|
||||
display: flex;
|
||||
border: 1px solid #dfe3e8;
|
||||
// height: calc(100vh - 176px);
|
||||
// height: 100%;
|
||||
// height: calc(100% - 40px) !important;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
#stencil {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
border-right: 1px solid #dfe3e8;
|
||||
}
|
||||
#graph-container {
|
||||
width: calc(100% - 180px);
|
||||
height: 100%;
|
||||
}
|
||||
.x6-widget-stencil {
|
||||
background-color: #fff;
|
||||
}
|
||||
.x6-widget-stencil-title {
|
||||
background-color: #fff;
|
||||
}
|
||||
.x6-widget-stencil-group-title {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.x6-widget-transform {
|
||||
margin: -1px 0 0 -1px;
|
||||
padding: 0px;
|
||||
border: 1px solid #239edd;
|
||||
}
|
||||
.x6-widget-transform > div {
|
||||
border: 1px solid #239edd;
|
||||
}
|
||||
.x6-widget-transform > div:hover {
|
||||
background-color: #3dafe4;
|
||||
}
|
||||
.x6-widget-transform-active-handle {
|
||||
background-color: #3dafe4;
|
||||
}
|
||||
.x6-widget-transform-resize {
|
||||
border-radius: 0;
|
||||
}
|
||||
.x6-widget-selection-inner {
|
||||
border: 1px solid #239edd;
|
||||
}
|
||||
.x6-widget-selection-box {
|
||||
opacity: 0;
|
||||
}
|
||||
.x6-widget-stencil-content {
|
||||
.x6-port-body {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -108,9 +108,11 @@
|
||||
</template>
|
||||
<template #templateStatus="{ row }">
|
||||
<StatusDot
|
||||
v-if="row.approveType === FLOW_APPROVE_STATUS_ENUM.APPROVED"
|
||||
:status="row.templateStatus === FLOW_USE_STATUS.USED ? 'success' : 'error'"
|
||||
:title="FLOW_USE_TYPE.O[row.templateStatus]"
|
||||
/>
|
||||
<span v-else>--</span>
|
||||
</template>
|
||||
<template #approveType="{ row }">
|
||||
<StatusDot :status="statusMapFun4(row.approveType)">
|
||||
|
||||
@@ -105,7 +105,7 @@ const props = defineProps({
|
||||
},
|
||||
tableName: {
|
||||
type: String,
|
||||
default: 'PROJECT_TASK_MODAL',
|
||||
default: 'PROJECT_TASK_DETAIL',
|
||||
},
|
||||
showTaskInfo: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<template #fileSize="{ row }">
|
||||
{{ formatFileSize(row.fileSize) }}
|
||||
</template>
|
||||
<template #fileType="{ row }">
|
||||
{{ ALL_FILE_TYPE.O[row.fileType] }}
|
||||
</template>
|
||||
<template #tableActions="{ row }">
|
||||
<div class="gl-table-actions">
|
||||
<el-link type="primary" @click="reviewFile(row.id)">预览</el-link>
|
||||
@@ -49,6 +52,7 @@ import { formatFileSize, openTabReviewFile } from '@/utils/file';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { tableActionsLength } from '@/utils/common';
|
||||
import { downloadFileById } from '@/utils/file';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
@@ -56,6 +60,7 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const emits = defineEmits(['update:visible']);
|
||||
const { ALL_FILE_TYPE } = useDict('ALL_FILE_TYPE');
|
||||
|
||||
const diaVisible = computed({
|
||||
get: () => props.visible,
|
||||
|
||||
@@ -121,7 +121,7 @@ const visibleDialog = async (visible: boolean, row?: any) => {
|
||||
formVisible.value = true;
|
||||
isCreateDialog.value = visible;
|
||||
if (!isCreateDialog.value) {
|
||||
const res: any = await dataQueryDirApi({ nodeId: row.id, current: 1, size: 99 });
|
||||
const res: any = await dataQueryDirApi({ uuid: row.uuid, current: 1, size: 99 });
|
||||
row.attachments =
|
||||
res.data?.data?.map((item: { originalName: any; fileSize: any; id: number }) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user