update:预览地址

This commit is contained in:
2025-12-05 09:12:47 +08:00
parent 9fda07a9cf
commit 01b4cad9e4
8 changed files with 146 additions and 55 deletions

View File

@@ -6,7 +6,7 @@ VITE_API_HTTP_URL=http://192.168.65.80:7100
VITE_API_WS_BASE_URL=/wsApi/simulation
VITE_API_WS_URL=ws://192.168.65.80:7100
VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:7104
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161/preview/onlinePreview
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview
VITE_API_FILE_URL=http://192.168.65.161:7104
VITE_API_PREFIX_APPROVE=/

View File

@@ -6,7 +6,7 @@ VITE_API_HTTP_URL=http://192.168.65.80:7100
VITE_API_WS_BASE_URL=/wsApi/simulation
VITE_API_WS_URL=ws://192.168.65.80:7100
VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:7104
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161/preview/onlinePreview
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview
VITE_API_FILE_URL=http://192.168.65.161:7104
VITE_API_PREFIX_APPROVE=/approve/

View File

@@ -6,7 +6,7 @@ VITE_API_HTTP_URL=http://192.168.65.80:7100
VITE_API_WS_BASE_URL=/wsApi/simulation
VITE_API_WS_URL=ws://192.168.65.80:7100
VITE_API_IMAGE_PREVIEW_URL=http://192.168.65.161:7104
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161/preview/onlinePreview
VITE_API_FILE_PREVIEW_URL=http://192.168.65.161:3000/preview/onlinePreview
VITE_API_FILE_URL=http://192.168.65.161:7104
VITE_API_PREFIX_APPROVE=/approve/

View File

@@ -40,6 +40,7 @@ const emit = defineEmits(['update:modelValue']);
watch(
() => props.modelValue,
(val: boolean) => {
url.value = '';
diaVisible.value = val;
if (val) {
getPreviewUrlFun();

View File

@@ -0,0 +1,64 @@
const objData: any = {
nodeName: {
mode: 'input',
},
englishName: {
mode: 'input',
},
nodeCode: {
mode: 'input',
},
nodeType: {
mode: 'select',
dictName: 'POOL_CATEGORY_TYPE',
},
analyseTarget: {
mode: 'input',
},
highValue: {
mode: 'input',
},
analyseSoftware: {
mode: 'select',
dictName: 'ANALYSIS_SOFTWARE',
},
days: {
mode: 'input',
},
confidence: {
mode: 'input',
},
performanceType: {
mode: 'select',
dictName: 'PERFORMANCE_TYPE',
},
method: {
mode: 'select',
dictName: 'COMPLIANCE_METHOD',
},
unit: {
mode: 'select',
dictName: 'PERFORMANCE_UNIT',
},
description: {
mode: 'input',
},
bCapacity: {
mode: 'select',
dictName: 'SIMULATION_CAPACITY',
},
department: {
mode: 'select',
dictName: 'DEPARTMENT_LIST',
},
section: {
mode: 'select',
dictName: 'SECTION_LIST',
},
group: {
mode: 'select',
dictName: 'GROUP_LIST',
},
};
export default objData;

View File

@@ -107,24 +107,33 @@
<template #header="{ column }">
<span class="head-title">
{{ column.title }}
<el-popover trigger="click" :width="200">
<el-popover v-if="filterHead[column.field]" trigger="click" :width="200">
<template #default>
<div class="head-search">
<div class="search-item">
<el-input
v-if="filterHead[column.field].mode === 'input'"
v-model="filterData[column.field]"
size="small"
placeholder="请输入"
clearable
/>
<el-select
v-if="filterHead[column.field].mode === 'select'"
v-model="filterData[column.field]"
:options="getDictDataFun(filterHead[column.field].dictName)"
placeholder="请选择"
clearable
@close="filterResetFun(column)"
@change="filterFun(column)"
/>
</div>
<div class="btns">
<el-button class="btn" size="small" @click="filterResetFun(column)"
>重置</el-button
>
<el-button class="btn" type="primary" size="small" @click="filterFun(column)"
>确定</el-button
>
<div v-if="filterHead[column.field].mode === 'input'" class="btns">
<el-button class="btn" size="small" @click="filterResetFun(column)">
重置
</el-button>
<el-button class="btn" type="primary" size="small" @click="filterFun(column)">
确定
</el-button>
</div>
</div>
</template>
@@ -241,7 +250,11 @@ import { getFormConfigureApi } from '@/api/system/systemData';
import { formOptionsFormat } from './lib';
import { uniqBy, cloneDeep } from 'lodash-es';
import { exportFile } from '@/utils/file';
import { nodeTypeList } from '@/utils/enum/node';
import { CommonStore } from '@/stores/common';
import filterHead from './filterHead';
const commonStore = CommonStore();
const emit = defineEmits([
'searchChange',
'load',
@@ -496,7 +509,7 @@ const filterFun = (data: any, isReset: boolean = false) => {
});
originData.forEach((item: any) => {
// 筛选条件
if (item[data.field]?.indexOf(filterData.value[data.field]) > -1) {
if (String(item[data.field] || '')?.indexOf(filterData.value[data.field] || '') > -1) {
matchedIds.add(item.fakeId);
}
});
@@ -594,6 +607,13 @@ const actionClickFun = (row: any, action: any) => {
}
};
const getDictDataFun = (name: string) => {
if (name === 'POOL_CATEGORY_TYPE') {
return [...nodeTypeList, ...commonStore.getDictData(name).A];
}
return commonStore.getDictData(name).A;
};
const exportFun = () => {
exportFile(
props.exportApi,

View File

@@ -60,7 +60,7 @@ const sortNodeAndEdge = (nodeArr: any, edgeArr: any) => {
try {
console.log('nodeArr edgeArr', nodeArr, edgeArr);
const startNode = nodeArr.find((item: any) => item.nodeType === FLOW_NODE_TYPE_ENUM.START);
if (startNode) {
if (!startNode) {
ElMessage.error('没有开始节点,无法闭环!');
return;
}

View File

@@ -5,7 +5,7 @@
showIndex
ref="tableRef"
tableName="SIMULATION_TASK_DEMAND_CREATE"
:params="{type:0}"
:params="{ type: 0 }"
:api="demandListApi"
:actionsWidth="tableActionsLength['2-2']"
exportFileName="新增待办需求"
@@ -15,13 +15,15 @@
</template>
<template #tableActions="slotProps">
<div class="gl-table-actions">
<el-link type="primary" @click="visibleDialog(false,(slotProps as any).row)">编辑</el-link>
<el-link type="primary" @click="visibleDialog(false, (slotProps as any).row)"
>编辑</el-link
>
<el-popconfirm
title="确认删除吗?"
@confirm="deleteDemandFun((slotProps as any).row.uuid)"
>
<template #reference>
<el-link type="danger" >删除</el-link>
<el-link type="danger">删除</el-link>
</template>
</el-popconfirm>
</div>
@@ -30,8 +32,8 @@
<Dialog
v-model="formVisible"
:loading="loadingInterface"
:diaTitle="isCreateDialog?'创建需求':'编辑需求'"
:width="800"
:diaTitle="isCreateDialog ? '创建需求' : '编辑需求'"
:width="1100"
:height="500"
@close="closeFun"
show-footer
@@ -39,13 +41,13 @@
<TableForm
ref="tableFormRef"
tableName="SIMULATION_TASK_DEMAND_CREATE"
@change="changeFun($event,'form')"
@change="changeFun($event, 'form')"
@remove="removeFileFun"
@load="loadTableForm"
:colNum="2"
:hidKeys="hidKeys"
>
<template v-for="(name) in Object.keys($slots)" :key="name" #[name]="scope">
<template v-for="name in Object.keys($slots)" :key="name" #[name]="scope">
<slot :name="name" v-bind="scope" />
</template>
</TableForm>
@@ -57,7 +59,7 @@
</template>
</Dialog>
</div>
<attachments :demandId="demandInfo.uuid" v-model:visible="attachmentsVisible" ></attachments>
<attachments :demandId="demandInfo.uuid" v-model:visible="attachmentsVisible"></attachments>
</template>
<script setup lang="ts">
@@ -114,23 +116,23 @@ const demandInfo = reactive({
const isCreateDialog = ref(true);
const visibleDialog = async( visible:boolean, row?: any) => {
const visibleDialog = async (visible: boolean, row?: any) => {
console.log('row', row);
formVisible.value = true;
isCreateDialog.value = visible;
if (!isCreateDialog.value) {
const res:any = await dataQueryDirApi({ nodeId: row.id, current: 1, size: 99 });
row.attachments = res.data?.data?.map((item: { originalName: any; fileSize: any;id:number }) => {
return {
name: item.originalName,
size: item.fileSize,
id: item.id,
};
}
) || [];
const res: any = await dataQueryDirApi({ nodeId: row.id, current: 1, size: 99 });
row.attachments =
res.data?.data?.map((item: { originalName: any; fileSize: any; id: number }) => {
return {
name: item.originalName,
size: item.fileSize,
id: item.id,
};
}) || [];
let phaseList = [];
if (row.phaseId) {
phaseList = await getChildrenNodeList(NODE_TYPE.PHASE, row.projectId );
phaseList = await getChildrenNodeList(NODE_TYPE.PHASE, row.projectId);
phaseList = phaseList.map((item: any) => {
return {
label: item.nodeName,
@@ -138,7 +140,7 @@ const visibleDialog = async( visible:boolean, row?: any) => {
};
});
}
let simList:any ;
let simList: any;
if (row.simType) {
simList = commonStore.getDictData(row.demandType);
}
@@ -161,17 +163,17 @@ const visibleDialog = async( visible:boolean, row?: any) => {
};
const deleteDemandFun = async (uuid: number) => {
const res:any = await deleteDemandApi({ deleteNodeIdList: [uuid] });
const res: any = await deleteDemandApi({ deleteNodeIdList: [uuid] });
if (res.code === 200) {
ElMessage.success('删除成功');
tableRef.value.tableRef.resetFun();
}
};
const confirmFun = async() => {
const confirmFun = async () => {
if (await tableFormRef.value.validateFun()) {
loadingInterface.value = true;
const fromData:any = tableFormRef.value.getFormDataFun();
const fromData: any = tableFormRef.value.getFormDataFun();
console.log('fromData', fromData);
if (fromData.planTime) {
fromData.beginTime = fromData.planTime[0];
@@ -203,21 +205,21 @@ const confirmFun = async() => {
}
};
const createDemandApiFun = async(fromData:any) => {
const createDemandApiFun = async (fromData: any) => {
const params = {
'pid': fromData.nodeId,
'demandName': fromData.demandName,
'demandCode': fromData.demandCode,
'demandStatus': '0',
pid: fromData.nodeId,
demandName: fromData.demandName,
demandCode: fromData.demandCode,
demandStatus: '0',
demandType: fromData.demandType,
simType: fromData.simType,
'beginTime': fromData.beginTime,
'endTime': fromData.endTime,
'pMemberList': fromData.pMemberList,
beginTime: fromData.beginTime,
endTime: fromData.endTime,
pMemberList: fromData.pMemberList,
eMemberList: '',
'projectId': fromData.projectId,
'phaseId': fromData.phaseId,
'nodeId': fromData.nodeId,
projectId: fromData.projectId,
phaseId: fromData.phaseId,
nodeId: fromData.nodeId,
// extraList: [
// {
// propertyName: 'robotBrand',
@@ -227,7 +229,7 @@ const createDemandApiFun = async(fromData:any) => {
// },
// ],
};
const res:any = await addDemandApi(params);
const res: any = await addDemandApi(params);
if (res.code === 200) {
formVisible.value = false;
ElMessage.success('创建成功');
@@ -237,7 +239,7 @@ const createDemandApiFun = async(fromData:any) => {
}
};
const editDemandApiFun = async(fromData: any) => {
const editDemandApiFun = async (fromData: any) => {
console.log('fromData', fromData);
// let addFileList = [];
// let deleteFileList = [];
@@ -254,7 +256,11 @@ const editDemandApiFun = async(fromData: any) => {
// oldAttachments.value.forEach((item: any) => {
// formData.attachments.some((item2: any) => item2.name ===)
// })
const res:any = await editDemandApi({ ...fromData, pMemberList: fromData.pMemberList, eMemberList: '' });
const res: any = await editDemandApi({
...fromData,
pMemberList: fromData.pMemberList,
eMemberList: '',
});
if (res.code === 200) {
ElMessage.success('修改成功');
formVisible.value = false;
@@ -281,9 +287,9 @@ const editDemandApiFun = async(fromData: any) => {
const deleteFileList = ref<number[]>([]);
const changeFun = async (val: any, type:string) => {
const changeFun = async (val: any, type: string) => {
console.log('val', val);
let optionRef :any;
let optionRef: any;
if (type === 'search') {
optionRef = tableRef.value;
} else {
@@ -327,8 +333,8 @@ const removeFileFun = (val: any) => {
deleteFileList.value.push(val.val.id);
};
const getPhaseList = async (nodeType:string, projectUuid: string) => {
let optionList = await getChildrenNodeList(nodeType, projectUuid );
const getPhaseList = async (nodeType: string, projectUuid: string) => {
let optionList = await getChildrenNodeList(nodeType, projectUuid);
optionList = optionList.map((item: any) => {
return {
label: item.nodeName,