Merge branch 'hotfix' of http://carsafe.uicp.cn/Front_Team/SPDM into hotfix

This commit is contained in:
魏保林
2026-04-14 09:05:19 +08:00
15 changed files with 1009 additions and 132 deletions

View File

@@ -181,3 +181,7 @@ export const checkDuplicateFileNameApi = (params: any) => {
export const uploadAttachmentApi = (params: any) => {
return upload(`${PREFIX}data/uploadAttachment`, params);
};
// 删除附件
export const deleteAttachmentApi = (params: any) => {
return get(`${PREFIX}data/deleteAttachment`, params);
};

View File

@@ -149,6 +149,16 @@
:disabled="attrs.disabled || (item.disabled && showDisabled)"
@change="(val: any) => changeFun(item.key, val)"
/>
<UploadFile
v-if="item.inputMode === 'uploadFile'"
:attrs="attrs"
v-model="formData[item.searchKey || item.key]"
:multiple="attrs.multiple"
:limit="attrs.limit"
:disabled="attrs.disabled || (item.disabled && showDisabled)"
@change="(val: any) => changeFun(item.key, val)"
@remove="(val: any) => removeFun(item.key, val)"
/>
<UserSelect
v-if="item.inputMode === 'userSelect'"
:attrs="attrs"
@@ -259,6 +269,7 @@
import { ref, watch } from 'vue';
import MultipleSelect from './multipleSelect.vue';
import UploadImg from '@/components/common/uploadImg/index.vue';
import UploadFile from '@/components/common/uploadFile/index.vue';
import ChoseFile from './choseFile.vue';
import UserSelect from '@/components/common/userSelect/index.vue';
import ProjectSelect from '@/components/common/projectSelect/index.vue';

View File

@@ -108,6 +108,7 @@
<el-option label="日期" value="date" />
<el-option label="日期范围" value="daterange" />
<el-option label="上传图片" value="uploadImg" />
<el-option label="上传文件" value="uploadFile" />
<el-option label="文件名称" value="fileName" />
<el-option label="文件大小" value="fileSize" />
<el-option label="选择文件" value="choseFile" />

View File

@@ -10,7 +10,7 @@
:width="formData?.nodeType === NODE_TYPE.TASK ? 1200 : 400"
>
<template #default>
<!-- <el-tabs
<el-tabs
v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])"
v-model="tabName"
type="card"
@@ -21,7 +21,7 @@
<el-tab-pane label="附件信息" name="附件信息" />
<el-tab-pane label="异常信息" name="异常信息" />
<el-tab-pane label="日志信息" name="日志信息" />
</el-tabs> -->
</el-tabs>
<StandardSceneForm v-if="tabName !== '基础信息'" :tabName="tabName" :data="detail" />
<TableForm
v-if="visible && tabName === '基础信息'"
@@ -119,7 +119,7 @@ import { DIR_TYPE } from '@/utils/enum/data.ts';
import { useI18n } from 'vue-i18n';
import { useTaskStore } from '@/stores/taskPool';
import { useReportStore } from '@/stores/reportTemplate';
// import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
const taskStore = useTaskStore();
const reportStore = useReportStore();

View File

@@ -1,175 +1,196 @@
<template>
<div class="comp-content" :class="{ 'auto-width': !clearable }">
<div class="comp-upload-file">
<div class="content">
<template v-if="clearable">
<div v-if="fileId" class="preview">
<div class="file-name" @click="downloadFun">{{ fileName }}</div>
<div v-if="clearable" class="close" @click="removeFun">
<el-icon :size="20"><Delete /></el-icon>
<el-upload
v-model:file-list="fileList"
:auto-upload="false"
:multiple="multiple"
:limit="limit"
:disabled="disabled"
@change="changeFun"
>
<el-button type="primary">上传文件</el-button>
<template #file="{ file, index }">
<div :key="index" class="file-item">
<div class="file-icon">
<FileIcon :fileName="file.name" />
</div>
<div class="file-name">{{ file.name }}</div>
<div class="file-options">
<el-icon
v-if="file.fileId"
class="btn download"
:size="16"
@click="downloadFun(file)"
>
<Download />
</el-icon>
<el-icon v-if="file.fileId" class="btn preview" :size="16" @click="previewFun(file)">
<View />
</el-icon>
<el-icon class="btn del" :size="16" @click="removeFun(index)">
<Delete />
</el-icon>
</div>
</div>
</div>
<div v-else class="upload">
<el-upload :show-file-list="false" :before-upload="beforeUploadFun">
<div v-if="!uploading" class="btn">
<el-button type="primary">上传文件</el-button>
</div>
<div v-else class="progress">
<el-progress :stroke-width="8" :percentage="percentage" />
</div>
</el-upload>
</div>
</template>
<div v-else class="download">
<div class="file-name" @click="downloadFun">{{ fileName }}</div>
</div>
</template>
</el-upload>
</div>
<FilePreview v-model="previewVisible" :fileId="previewFileId" />
</div>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { Delete } from '@element-plus/icons-vue';
import { dataUploadFilesApi } from '@/api/data/data';
import { ElMessage } from 'element-plus';
import FileIcon from '@/components/common/fileIcon/index.vue';
import FilePreview from '@/components/common/filePreview/index.vue';
import { View, Delete, Download } from '@element-plus/icons-vue';
import { downloadFileById } from '@/utils/file';
import { uploadAttachmentApi, getFileBaseInfoApi } from '@/api/data/data';
interface Props {
modelValue: any;
name?: string;
clearable?: boolean;
dirId?: number | string;
multiple?: boolean;
disabled?: boolean;
limit?: any;
}
const props = withDefaults(defineProps<Props>(), {
modelValue: '',
name: '',
clearable: false,
dirId: '',
multiple: true,
disabled: false,
limit: null,
});
const emit = defineEmits(['update:modelValue']);
const emit = defineEmits(['update:modelValue', 'change', 'remove']);
const fileList = ref<any>([]);
const fileId = ref('');
const fileName = ref(props.name);
const uploading = ref(false);
const percentage = ref(0);
const loadFileFun = (fileId: any) => {
const params = {
fileId,
};
getFileBaseInfoApi(params).then((res: any) => {
if (res.code === 200) {
const { id, originalName, fileSize } = res.data;
const file = {
name: originalName,
fileId: id,
size: fileSize,
};
fileList.value.push(file);
}
});
};
watch(
() => props.modelValue,
(val: any) => {
if (val) {
fileId.value = val;
fileName.value = fileName.value || '文件下载';
const ids = String(props.modelValue).split(',') || [];
ids.forEach((item: any) => {
const hasFile = fileList.value.find((i: any) => i.fileId);
if (!hasFile) {
loadFileFun(item);
}
});
} else {
fileId.value = '';
fileName.value = '';
fileList.value = [];
}
},
{ deep: true, immediate: true }
);
const beforeUploadFun = (file: any) => {
uploading.value = true;
const { name } = file;
const params = {
fileName: name,
dirId: props.dirId,
file: file,
};
dataUploadFilesApi(params, (event: any) => {
const { loaded, total } = event;
const percent = (loaded / total) * 100;
percentage.value = Number(percent.toFixed(2));
})
.then((res: any) => {
if (res.code === 200) {
fileId.value = res.data.fileId;
fileName.value = name;
emit('update:modelValue', res.data.fileId);
ElMessage.success('上传成功');
watch(
() => fileList.value,
(val: any) => {
const ids: any = [];
val.forEach((item: any) => {
if (item.fileId) {
ids.push(item.fileId);
}
})
.finally(() => {
uploading.value = false;
percentage.value = 0;
});
return false;
emit('update:modelValue', ids.join(','));
},
{ deep: true, immediate: true }
);
const changeFun = async (file: any) => {
const fileId = await uploadFun(file);
file.fileId = fileId;
emit('change', file);
};
const downloadFun = () => {
const id: any = fileId.value;
downloadFileById(id);
const previewFileId = ref<any>('');
const previewVisible = ref<any>(false);
const previewFun = (data: any) => {
previewFileId.value = data.fileId;
previewVisible.value = true;
};
const removeFun = () => {
fileId.value = '';
fileName.value = '';
emit('update:modelValue', '');
const downloadFun = (data: any) => {
downloadFileById(data.fileId);
};
const removeFun = (index: number) => {
emit('remove', fileList.value[index]);
fileList.value.splice(index, 1);
};
const uploadFun = async (file: any) => {
const params = {
attachment: file.raw,
};
const res: any = await uploadAttachmentApi(params);
if (res.code === 200) {
fileList.value.some((item: any) => {
if (file.uid === item.uid && file.name === item.name) {
item.fileId = res.data;
return true;
}
});
return res.data;
} else {
return '';
}
};
</script>
<style lang="scss" scoped>
.comp-content {
.comp-upload-file {
width: 100%;
height: 100%;
margin: 0 var(--margin-tiny);
&.auto-width {
width: auto;
}
.content {
width: 100%;
height: 100%;
.preview {
.file-item {
width: 100%;
height: 100%;
display: flex;
align-items: center;
.file-name {
max-width: calc(100% - 30px);
height: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--el-color-primary);
cursor: pointer;
&:hover {
text-decoration: underline;
}
line-height: 18px;
padding: 0 4px;
.file-icon {
display: flex;
align-items: center;
}
.close {
.file-name {
flex: 1;
font-size: 14px;
color: var(--el-text-color-secondary);
padding-right: 5px;
word-break: break-word;
padding: 2px 4px;
}
.file-options {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
color: var(--el-color-danger);
padding-left: var(--padding-small);
cursor: pointer;
}
}
.download {
width: 100%;
height: 100%;
display: flex;
align-items: center;
.file-name {
height: 100%;
color: var(--el-color-primary);
cursor: pointer;
&:hover {
text-decoration: underline;
}
}
}
.upload {
width: 100%;
> div {
width: 100%;
.btn {
width: 100%;
}
.progress {
width: 100%;
margin-left: 8px;
cursor: pointer;
&.download,
&.preview {
color: var(--el-color-primary);
}
&.del {
color: var(--el-color-danger);
}
}
}
}

View File

@@ -24,6 +24,18 @@
@click="flowClickFun('justStartLocalAppFun')"
>启动</el-button
>
<el-button
type="primary"
v-else-if="flowNodeParamData.nodeTypeValue === '3'"
@click="flowClickFun('startOtherNodeFun')"
>计算</el-button
>
<el-button
type="primary"
v-else-if="flowNodeParamData.nodeTypeValue === '5'"
@click="flowClickFun('startOtherNodeFun')"
>保存</el-button
>
<el-button type="primary" v-else @click="flowClickFun('startOtherNodeFun')"
>启动</el-button
>
@@ -35,7 +47,22 @@
@click="flowClickFun('continueStartRunJobFun')"
>完成</el-button
>
<el-button @click="showLogFun">日志</el-button>
<el-button v-if="flowNodeParamData.nodeTypeValue === '1'" @click="showLogFun"
>日志</el-button
>
<el-dropdown>
<el-button type="primary" class="ml10">
参数操作<el-icon class="el-icon--right"><arrow-down /></el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>参数引用</el-dropdown-item>
<el-dropdown-item>参数入库</el-dropdown-item>
<el-dropdown-item>参数导入</el-dropdown-item>
<el-dropdown-item>参数导出</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
<!-- <el-button type="primary" @click="referenceParamFun">引用参数</el-button>
<el-button type="primary" @click="paramToLibFun">参数入库</el-button> -->
<!-- <el-button type="primary" @click="saveNodeParamFun">保存参数</el-button> -->
@@ -177,8 +204,9 @@
<span v-if="row.required" class="required-icon">*</span>
<span v-else class="required-icon">&nbsp;</span>
<span v-if="row.tagType === WIDGET_TYPE.VIEW && row.tagIcon === 'row'">
{{ row.componentName }}
{{ row?.children[0]?.defaultValue || '配置' }}
</span>
<span v-else>{{ row.label }}</span>
</template>
</BaseTable>
@@ -629,6 +657,10 @@ watch(
nextTick(() => {
baseTableRef.value.setDataFun(tableData.value);
});
setTimeout(() => {
baseTableRef.value.tableRef.setAllTreeExpand(true);
}, 200);
}
},
{
@@ -692,6 +724,14 @@ watch(
margin-right: 10px;
}
.ml10 {
margin-left: 10px;
}
.w70p{
width: 60%;
}
.input-grid {
display: flex;
align-items: center;

View File

@@ -73,11 +73,24 @@
:data="formData"
:itemNum="4"
:formAttrs="{
amount: {
min: 0,
},
confidence: {
min: 0,
max: 100,
},
closeReport: {
limit: 1,
multiple: false,
},
fileId: {
limit: 1,
multiple: false,
},
}"
@change="changeFun"
@remove="removeFun"
/>
<template #footer>
<div>
@@ -94,6 +107,7 @@ import { ref } from 'vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import Dialog from '@/components/common/dialog/index.vue';
import TableForm from '@/components/common/table/tableForm.vue';
import { deleteAttachmentApi } from '@/api/data/data';
import {
queryTaskPoolCloseLoopApi,
addTaskPoolCloseLoopItemApi,
@@ -107,6 +121,7 @@ import {
addTaskPoolLogItemApi,
} from '@/api/task/taskpool';
import { ElMessage } from 'element-plus';
import { formatFileSize, removeAttachmentFileIds } from '@/utils/file';
interface Props {
tabName: string;
@@ -190,6 +205,24 @@ const loadFun = () => {
});
};
const changeFun = (data: any) => {
if (data.key === 'fileId') {
formData.value.fileName = data.val.name;
if (props.tabName === '附件信息') {
formData.value.fileSize = formatFileSize(data.val.size);
}
}
};
const removeFun = (data: any) => {
if (data.key === 'fileId') {
formData.value.fileName = '';
if (props.tabName === '附件信息') {
formData.value.fileSize = '';
}
}
};
const errorData = ref<any>({
totalNum: 0,
totalCost: 0,
@@ -235,6 +268,7 @@ const sureFun = async () => {
ElMessage.success('操作成功');
closeFun();
loadFun();
removeAttachmentFileIds(oldFileId.value, params.fileId);
}
});
}
@@ -244,6 +278,10 @@ const delFun = (data: any) => {
const params = {
lineCode: data.lineCode,
};
// 删除附件文件
if (data.fileId) {
deleteAttachmentApi({ fileId: data.fileId });
}
optionsPbj[props.tabName].delApi(params).then((res: any) => {
if (res.code === 200) {
ElMessage.success('删除成功');
@@ -252,8 +290,10 @@ const delFun = (data: any) => {
});
};
const oldFileId = ref('');
const openFun = (data?: any) => {
formData.value = { ...(data || {}) };
oldFileId.value = formData.value.fileId;
delete formData.value._X_ROW_KEY;
formName.value = optionsPbj[props.tabName].tableName;
diaVisible.value = true;

View File

@@ -3,6 +3,7 @@ import {
queryFileIdByNodeIdApi,
systemDataDownloadFileApi,
getMinioPresignedUrlApi,
deleteAttachmentApi,
} from '@/api/data/data';
import { getDictionaryDataApi, getFormConfigureApi } from '@/api/system/systemData';
import { ElMessage } from 'element-plus';
@@ -584,3 +585,14 @@ export const isJSONFun = (str: any) => {
return false;
}
};
// 删除无用附件文件
export const removeAttachmentFileIds = (oldIds: string, newIds: any) => {
const oldList = oldIds.split(',');
const newList = newIds.split(',');
const newSet = new Set(newList);
const delIds: any[] = oldList.filter((id) => !newSet.has(id));
delIds.forEach((id: any) => {
deleteAttachmentApi({ fileId: id });
});
};

View File

@@ -0,0 +1,105 @@
// 轨道参数
export const OrbitalParameters = [
{
label: '基础配置一',
name: '',
value: '',
type: 'text',
children: [
{
label: '轨道结构形式',
name: '',
value: '',
type: 'select',
selectOption: [
{
name: '道床版面支撑',
value: 1,
},
],
},
{
label: '轨道板纵连形式',
name: '',
value: '',
type: 'select',
selectOption: [
{
name: '纵连',
value: 1,
},
],
},
{
label: '底座板纵连形式',
name: '',
value: '',
type: 'select',
selectOption: [
{
name: '纵连',
value: 1,
},
],
},
],
},
{
label: '混泥土板阻尼参数一',
name: '',
value: '',
type: 'text',
children: [
{
label: '混泥土板阻尼参数一',
name: '',
value: '',
type: 'text',
},
],
},
{
label: '轨道结构参数一',
name: '',
value: '',
type: 'text',
children: [],
},
];
// 列车参数
export const TrainParameters = [];
// 基础结构参数
export const FoundationStructureParameters = [];
// 隧道外围土体参数
export const TheTunnelPeripherySoilParameters = [];
export const testOption = {
xAxis: {
type: 'category',
data: ['0', '1', '2', '3', '4', '5'],
axisTick: {
show: true, // 是否显示刻度线
inside: true, // 刻度线朝内(true)或朝外(false)
alignWithLabel: true, // 刻度线与标签对齐
interval: 0, // 显示间隔(0表示全部显示)
},
},
yAxis: {
type: 'value',
min: 0, // 最小值
max: 5, // 最大值
axisTick: {
show: true, // 是否显示刻度线
inside: true, // 刻度线朝内(true)或朝外(false)
alignWithLabel: true, // 刻度线与标签对齐
interval: 0, // 显示间隔(0表示全部显示)
},
axisLine: {
show: true,
},
},
series: [],
};

View File

@@ -2,7 +2,7 @@
<div class="run-detail-page">
<DragSplit
dragType="top-bottom"
topContentHeight="270"
topContentHeight="400"
:minTopHeight="240"
:minBottomHeight="200"
:showToggleBtn="false"
@@ -137,6 +137,23 @@
<el-tab-pane label="输入数据" name="input"></el-tab-pane>
<!-- <el-tab-pane label="仿真参数" name="param"></el-tab-pane> -->
<el-tab-pane label="输出数据" name="output"></el-tab-pane>
<!-- TODO中车演示使用零时假页面不展示在其他系统内 -->
<el-tab-pane
v-if="flowNodeData.nodeName === '动力学计算'"
label="可视化结果"
name="result"
></el-tab-pane>
<el-tab-pane
v-if="
['车辆平稳性分析', '轮轨力分析', '震动信号分析'].includes(
flowNodeData.nodeName
)
"
label="可视化结果"
name="analysis"
></el-tab-pane>
</el-tabs>
</div>
<div class="operate-box"></div>
@@ -171,6 +188,22 @@
:run-info="runInfo"
:online-file-param="onlineFileParam"
></runDataPage>
<analysisResult v-if="nodeActiveName === 'result'"></analysisResult>
<vehicleStabilityAnalysis_Demo
v-if="
nodeActiveName === 'analysis' && flowNodeData.nodeName === '车辆平稳性分析'
"
></vehicleStabilityAnalysis_Demo>
<rollingWheelForceAnalysis_Demo
v-if="nodeActiveName === 'analysis' && flowNodeData.nodeName === '轮轨力分析'"
></rollingWheelForceAnalysis_Demo>
<vibrationSignalAnalysis_Demo
v-if="
nodeActiveName === 'analysis' && flowNodeData.nodeName === '震动信号分析'
"
></vibrationSignalAnalysis_Demo>
<div class="bottom-info-content-tab" v-show="nodeActiveName === 'param'">
<div class="node-img">
<img :src="flowNodeParamData.iconUrl" alt="" />
@@ -395,6 +428,10 @@ import dayjs from 'dayjs';
import { base64ToStrFun, isJSONFun } from '@/utils/file';
import simulationParam from './runPagecomponent/simulationParam.vue';
import dataAchieve from './runPagecomponent/dataAchieve.vue';
import analysisResult from './runPagecomponent/analysisResult.vue';
import vehicleStabilityAnalysis_Demo from './runPagecomponent/vehicleStabilityAnalysis_Demo.vue';
import rollingWheelForceAnalysis_Demo from './runPagecomponent/rollingWheelForceAnalysis_Demo.vue';
import vibrationSignalAnalysis_Demo from './runPagecomponent/vibrationSignalAnalysis_Demo.vue';
const props = defineProps({
runInfo: {
@@ -1323,10 +1360,10 @@ const timer = ref<any>(null);
onMounted(async () => {
await getDictionaryDataFun();
emitter.on('UPLOAD_FINISHED', uploadFinishedFun);
// 1分钟一次流程信息
timer.value = setInterval(() => {
refreshFun();
}, 60 * 1000);
// // 1分钟一次流程信息
// timer.value = setInterval(() => {
// refreshFun();
// }, 60 * 1000);
});
onBeforeUnmount(() => {

View File

@@ -0,0 +1,154 @@
<template>
<div class="page-content">
<div class="page-operate">
<el-button type="primary">刷新</el-button>
</div>
<div class="chart-content">
<div class="chart-item" v-for="item in chartData" :key="item.id">
<commonFilterChart
:title="item.title"
:charts-id="'chart-item' + item.id"
:bar-type="'lineChart'"
:option="item.option"
:nodata="nodata"
@update="initChartInfo(item)"
/>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import commonFilterChart from '@/components/common/echartCard/commonFilterChart.vue';
import { testOption } from '../demoFile/param';
const nodata = ref(false);
const options = ref({
xAxis: {
type: 'category',
data: ['0', '1', '2', '3', '4', '5'],
axisTick: {
show: true, // 是否显示刻度线
inside: true, // 刻度线朝内(true)或朝外(false)
alignWithLabel: true, // 刻度线与标签对齐
interval: 0, // 显示间隔(0表示全部显示)
},
},
yAxis: {
type: 'value',
min: 0, // 最小值
max: 5, // 最大值
axisTick: {
show: true, // 是否显示刻度线
inside: true, // 刻度线朝内(true)或朝外(false)
alignWithLabel: true, // 刻度线与标签对齐
interval: 0, // 显示间隔(0表示全部显示)
},
axisLine: {
show: true,
},
},
series: [],
});
const chartData = ref<any>([
{
title: '右侧轮轨垂向力(kN)',
option: options.value,
id: '1',
},
{
title: '左则轮下钢轨垂向位移(mm)',
option: options.value,
id: '2',
},
{
title: '基础结构轮下垂向位移',
option: options.value,
id: '3',
},
{
title: '左侧轮轨垂向力(kN)',
option: options.value,
id: '4',
},
{
title: '左刨轮下钢轨横向位移(mm)',
option: options.value,
id: '5',
},
{
title: '基础出结构轮下垂向加速度',
option: options.value,
id: '6',
},
{
title: '左侧轮轨横向力(kN)',
option: options.value,
id: '7',
},
{
title: '右钢轨轮下垂向位移',
option: options.value,
id: '8',
},
{
title: '右钢轨轮下垂向加速度',
option: options.value,
id: '9',
},
{
title: '右钢轨轮下横向加速度',
option: options.value,
id: '10',
},
{
title: '右钢轨定点横向位移响应',
option: options.value,
id: '11',
},
{
title: '右钢轨定点横向加速度响应',
option: options.value,
id: '12',
},
]);
const initChartInfo = (data: any) => {
data.option = testOption;
};
</script>
<style lang="scss" scoped>
.page-content {
width: 100%;
height: 100%;
.page-operate {
width: 100%;
height: 50px;
display: flex;
align-items: center;
justify-content: flex-end;
}
.chart-content {
width: 100%;
height: calc(100% - 50px);
display: flex;
flex-wrap: wrap;
overflow: auto;
.chart-item {
width: calc((100% / 3) - 5px);
height: 70%;
margin-right: 5px;
margin-bottom: 5px;
border-radius: 5px;
overflow: hidden;
border: 1px solid #dcebf7;
}
}
}
</style>

View File

@@ -0,0 +1,113 @@
<!-- 轮轨力分析 -->
<template>
<div class="chart-page">
<div class="chart-item h50">
<commonFilterChart
title="左轨垂向力"
:charts-id="'chart-item1'"
:bar-type="'lineChart'"
:option="chartOneOption"
:nodata="nodata"
@update="initChartOneInfo"
/>
</div>
<div class="chart-item h50">
<commonFilterChart
title="右轨垂向力"
:charts-id="'chart-item2'"
:bar-type="'lineChart'"
:option="chartOneOption"
:nodata="nodata"
@update="initChartOneInfo"
/>
</div>
<div class="chart-item h50">
<commonFilterChart
title="左轨横向力"
:charts-id="'chart-item3'"
:bar-type="'lineChart'"
:option="chartOneOption"
:nodata="nodata"
@update="initChartOneInfo"
/>
</div>
<div class="chart-item h50">
<commonFilterChart
title="右轨横向力"
:charts-id="'chart-item4'"
:bar-type="'lineChart'"
:option="chartOneOption"
:nodata="nodata"
@update="initChartOneInfo"
/>
</div>
</div>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue';
import commonFilterChart from '@/components/common/echartCard/commonFilterChart.vue';
import { testOption } from '../demoFile/param';
const nodata = ref(false);
const chartOneOption = ref<any>({});
const initChartOneInfo = () => {
chartOneOption.value = testOption;
};
const chartTwoFormData = reactive({
start: '0',
end: '0',
highVal: '',
moreHighVal: '',
});
const chartTwoOption = ref<any>({});
const initChartTwoInfo = () => {
chartTwoOption.value = testOption;
};
const chartThreeFormData = reactive({
isFilter: '不滤波',
highVal: '',
moreHighVal: '',
type: '垂向平稳性',
performance: '',
system: '客车评价体系',
level: 'L1',
});
const chartThreeOption = ref<any>({});
const initChartThreeInfo = () => {
chartThreeOption.value = testOption;
};
</script>
<style lang="scss" scoped>
.chart-page {
width: 100%;
height: 100%;
overflow: auto;
.chart-item {
width: 100%;
border: 1px solid #dcebf7;
margin-bottom: 5px;
border-radius: 5px;
overflow: hidden;
}
.h50 {
height: 50%;
}
.h60 {
height: 60%;
}
.input-style {
width: calc(100% - 20px);
}
}
:deep(.el-form-item__content) {
flex-wrap: nowrap;
}
</style>

View File

@@ -0,0 +1,159 @@
<!-- 车辆平稳性分析 -->
<template>
<div class="chart-page">
<div class="chart-item h50">
<commonFilterChart
title="加速度时域谱"
:charts-id="'chart-item1'"
:bar-type="'lineChart'"
:option="chartOneOption"
:nodata="nodata"
@update="initChartOneInfo"
/>
</div>
<div class="chart-item h50">
<commonFilterChart
title="局部加速度谱"
:charts-id="'chart-item2'"
:bar-type="'lineChart'"
:option="chartTwoOption"
:nodata="nodata"
@update="initChartTwoInfo"
>
<template #formSlot>
<el-form :model="chartTwoFormData" labelWidth="100">
<el-form-item label="起始时刻">
<el-input-number
v-model="chartTwoFormData.start"
controls-position="right"
precision="5"
/><span>s</span>
</el-form-item>
<el-form-item label="终止时刻">
<el-input-number
v-model="chartTwoFormData.end"
controls-position="right"
precision="5"
/>
<span>s</span>
</el-form-item>
<el-form-item label="峰值">
<el-input v-model="chartTwoFormData.highVal" class="input-style" /><span>m/</span>
</el-form-item>
<el-form-item label="峰峰值">
<el-input v-model="chartTwoFormData.moreHighVal" class="input-style" /><span
>m/</span
>
</el-form-item>
</el-form>
</template>
</commonFilterChart>
</div>
<div class="chart-item h60">
<commonFilterChart
title="分析结果"
:charts-id="'chart-item3'"
:bar-type="'lineChart'"
:option="chartThreeOption"
:nodata="nodata"
@update="initChartThreeInfo"
>
<template #formSlot>
<el-form :model="chartThreeFormData" labelWidth="100">
<el-form-item label="滤波设置">
<el-select v-model="chartThreeFormData.isFilter"></el-select>
</el-form-item>
<el-form-item label="峰值">
<el-input v-model="chartThreeFormData.highVal" class="input-style" /><span>m/</span>
</el-form-item>
<el-form-item label="峰峰值">
<el-input v-model="chartThreeFormData.moreHighVal" class="input-style" /><span
>m/</span
>
</el-form-item>
<el-form-item>
<el-select v-model="chartThreeFormData.type"></el-select>
</el-form-item>
<el-form-item label="平稳性指标">
<el-input v-model="chartThreeFormData.performance"></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="chartThreeFormData.system"></el-select>
</el-form-item>
<el-form-item label="平稳性等级">
<el-select v-model="chartThreeFormData.level"></el-select>
</el-form-item>
</el-form>
</template>
</commonFilterChart>
</div>
</div>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue';
import commonFilterChart from '@/components/common/echartCard/commonFilterChart.vue';
import { testOption } from '../demoFile/param';
const nodata = ref(false);
const chartOneOption = ref<any>({});
const initChartOneInfo = () => {
chartOneOption.value = testOption;
};
const chartTwoFormData = reactive({
start: '0',
end: '0',
highVal: '',
moreHighVal: '',
});
const chartTwoOption = ref<any>({});
const initChartTwoInfo = () => {
chartTwoOption.value = testOption;
};
const chartThreeFormData = reactive({
isFilter: '不滤波',
highVal: '',
moreHighVal: '',
type: '垂向平稳性',
performance: '',
system: '客车评价体系',
level: 'L1',
});
const chartThreeOption = ref<any>({});
const initChartThreeInfo = () => {
chartThreeOption.value = testOption;
};
</script>
<style lang="scss" scoped>
.chart-page {
width: 100%;
height: 100%;
overflow: auto;
.chart-item {
width: 100%;
border: 1px solid #dcebf7;
margin-bottom: 5px;
border-radius: 5px;
overflow: hidden;
}
.h50 {
height: 50%;
}
.h60 {
height: 60%;
}
.input-style {
width: calc(100% - 20px);
}
}
:deep(.el-form-item__content) {
flex-wrap: nowrap;
}
</style>

View File

@@ -0,0 +1,180 @@
<!-- 震动信号分析 -->
<template>
<div class="page-content">
<div class="operate-box">
<el-form class="el-form-style" inline>
<el-form-item>
<el-button type="primary">双列数据读取</el-button>
<el-button type="primary">单列数据读取</el-button>
<el-button type="primary">从速度数据加载</el-button>
</el-form-item>
<el-form-item label="数据来源:">
<el-select class="select-style"></el-select>
</el-form-item>
<el-form-item>
<el-button type="primary">清除当前数据</el-button>
<el-button type="primary">清除</el-button>
</el-form-item>
</el-form>
</div>
<div class="filter-content">
<el-tabs v-model="activeName" class="tab-style" type="card">
<el-tab-pane label="加速度分析" name="acceleration"></el-tab-pane>
<el-tab-pane label="速度分析" name="speed"></el-tab-pane>
</el-tabs>
<div class="tab-inner" v-if="activeName === 'acceleration'">
<div class="chart-item">
<commonFilterChart
v-if="activeName === 'acceleration'"
title="加速度时域谱"
:charts-id="'chart-item1'"
:bar-type="'lineChart'"
:option="chartOneOption"
:nodata="nodata"
@update="initChartOneInfo"
/>
</div>
<div class="chart-item">
<commonFilterChart
v-if="activeName === 'acceleration'"
title="局部加速度谱"
:charts-id="'chart-item2'"
:bar-type="'lineChart'"
:option="chartTwoOption"
:nodata="nodata"
@update="initChartTwoInfo"
/>
</div>
<div class="chart-item">
<commonFilterChart
v-if="activeName === 'acceleration'"
title="加速度频谱"
:charts-id="'chart-item3'"
:bar-type="'lineChart'"
:option="chartThreeOption"
:nodata="nodata"
@update="initChartThreeInfo"
>
<template #formSlot>
<el-form :model="chartThreeFormData" labelWidth="100">
<el-form-item label="x轴-min">
<el-input-number
v-model="chartThreeFormData.xMin"
controls-position="right"
precision="5"
/>
<span>Hz</span>
</el-form-item>
<el-form-item label="x轴-max">
<el-input-number
v-model="chartThreeFormData.xMax"
controls-position="right"
precision="5"
/>
<span>Hz</span>
</el-form-item>
<el-form-item label="y轴-min">
<el-input-number
v-model="chartThreeFormData.yMin"
controls-position="right"
precision="7"
/>
<span>m/</span>
</el-form-item>
<el-form-item label="y轴-max">
<el-input-number
v-model="chartThreeFormData.yMax"
controls-position="right"
precision="7"
/>
<span>m/</span>
</el-form-item>
</el-form>
</template>
</commonFilterChart>
</div>
</div>
<div class="tab-inner" v-else></div>
</div>
</div>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue';
import commonFilterChart from '@/components/common/echartCard/commonFilterChart.vue';
import { testOption } from '../demoFile/param';
const activeName = ref('acceleration');
const nodata = ref(false);
const chartThreeFormData = reactive({
xMin: '0',
xMax: '0',
yMin: '0',
yMax: '0',
});
const chartOneOption = ref<any>({});
const initChartOneInfo = () => {
chartOneOption.value = testOption;
};
const chartTwoOption = ref<any>({});
const initChartTwoInfo = () => {
chartTwoOption.value = testOption;
};
const chartThreeOption = ref<any>({});
const initChartThreeInfo = () => {
chartThreeOption.value = testOption;
};
</script>
<style lang="scss" scoped>
.page-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.operate-box {
width: 100%;
}
.filter-content {
flex: 1;
width: 100%;
overflow: hidden;
.tab-style {
width: 100%;
height: 50px;
}
.tab-inner {
width: 100%;
height: calc(100% - 50px);
overflow: auto;
.chart-item {
width: 100%;
height: 50%;
min-height: 200px;
border: 1px solid #dcebf7;
margin-bottom: 5px;
border-radius: 5px;
}
}
}
.select-style {
width: 200px;
}
:deep(.el-input-number){
width: 140px !important;
}
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<demandVue/>
<demandVue />
</template>
<script setup lang="ts">