Merge branch 'develop-business-css' of http://121.37.111.42:3000/ThbTech/JavaProjectRepo into development-business-css

This commit is contained in:
wanxiaoli 2026-01-21 13:41:30 +08:00
commit 451d3fafe8
10 changed files with 68 additions and 46 deletions

View File

@ -12,6 +12,17 @@ export function searchMaterialsPage(queryParams:any){
//拓扑图新增或更新项目
export function saveOrUpdate(data:any){
return request({
url:'/materials/saveOrUpdate' ,
method: 'Post',
data: data
});
}
//新增项目 //新增项目
export function addMaterials(data:any){ export function addMaterials(data:any){
return request({ return request({

View File

@ -117,7 +117,11 @@ const option = ref<any>({
}, },
toolbox: { toolbox: {
feature: { feature: {
saveAsImage: {} saveAsImage: {
title: '导出图片', // hover
name: '导出图片', //
pixelRatio: 2 //
}
} }
}, },
xAxis: { xAxis: {

View File

@ -7,7 +7,7 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref, nextTick } from "vue"; import { onMounted, ref, nextTick } from "vue";
import { ElForm, ElMessage, ElMessageBox } from "element-plus"; import { ElForm, ElMessage, ElMessageBox } from "element-plus";
import { searchMaterialsPage, addMaterials,updateMaterials} from "@/api/business/database/material"; import { searchMaterialsPage, saveOrUpdate} from "@/api/business/database/material";
const emit = defineEmits([ 'closeMaterialModel']); const emit = defineEmits([ 'closeMaterialModel']);
@ -63,7 +63,7 @@ function confirmClick(formEl: any) {
moistureContent: info.value.moistureContent, moistureContent: info.value.moistureContent,
customAttrs: JSON.stringify(customAttrsData.value) customAttrs: JSON.stringify(customAttrsData.value)
} }
addMaterials(params).then((res:any) => { saveOrUpdate(params).then((res:any) => {
if(res == true){ if(res == true){
emit('closeMaterialModel', params) emit('closeMaterialModel', params)
} }

View File

@ -9,6 +9,7 @@ import { onMounted, ref, nextTick } from "vue";
import { ElForm, ElMessage, ElMessageBox, selectEmits } from "element-plus"; import { ElForm, ElMessage, ElMessageBox, selectEmits } from "element-plus";
import Page from '@/components/Pagination/page.vue' import Page from '@/components/Pagination/page.vue'
import { getByScenario } from "@/api/business/scenario"; import { getByScenario } from "@/api/business/scenario";
const apiUrl = import.meta.env.VITE_APP_BASE_API; //
const emit = defineEmits([ 'closeEditdevice']); const emit = defineEmits([ 'closeEditdevice']);
const props = defineProps({ const props = defineProps({
@ -76,36 +77,39 @@ onMounted(() => {
<template> <template>
<div class="editdevice-box"> <div class="editdevice-box">
<el-table :data="scenarioResultData" style="width: 100%; height: calc(100vh - 275px);margin-bottom: 10px;" border <div style="margin-bottom: 10px;display: flex;justify-content: flex-end;">
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"> <a :href=" apiUrl + '/scenario-results/exportResultsAsExcel?scenarioId='+props.scenarioId+'&deviceId='+props.deviceId" target="_blank" rel="noopener noreferrer">
<el-table-column type="selection" width="50" align="center"></el-table-column> <el-button type="primary">导出</el-button>
<el-table-column prop="step" label="时间" width="100"></el-table-column> </a>
<el-table-column prop="keffValue" label="keff" min-width="100"></el-table-column> </div>
<el-table-column v-if="getIf(selectData,'diameter')" prop="diameter" label="直径cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'height')" prop="height" label="高度cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'width')" prop="width" label="宽度cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'length')" prop="length" label="长度cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'volume')" prop="volume" label="体积单位L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'flow_rate')" prop="flow_rate" label="流量单位m3/h" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'pulse_velocity')" prop="pulse_velocity" label="脉冲速度单位Hz" min-width="160"></el-table-column>
<el-table :data="scenarioResultData" style="width: 100%; height: calc(100vh - 315px);margin-bottom: 10px;" border
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }">
<el-table-column type="selection" width="50" align="center"></el-table-column>
<el-table-column prop="step" label="时间" width="100"></el-table-column>
<el-table-column prop="keffValue" label="keff" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'diameter')" prop="diameter" label="直径cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'height')" prop="height" label="高度cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'width')" prop="width" label="宽度cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'length')" prop="length" label="长度cm" min-width="100"></el-table-column>
<el-table-column v-if="getIf(selectData,'volume')" prop="volume" label="体积单位L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'flow_rate')" prop="flow_rate" label="流量单位m3/h" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'pulse_velocity')" prop="pulse_velocity" label="脉冲速度单位Hz" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'u_concentration')" prop="u_concentration" label="铀浓度g/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'uo2_density')" prop="uo2_density" label="氧化铀密度g/cm3" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'u_enrichment')" prop="u_enrichment" label="铀富集度(%" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'pu_concentration')" prop="pu_concentration" label="钚浓度g/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'puo2_density')" prop="puo2_density" label="氧化钚密度g/cm3" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'pu_isotope')" prop="pu_isotope" label="钚同位素比例PU-240占比%" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'hno3_acidity')" prop="hno3_acidity" label="硝酸酸度mol/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'h2c2o4_concentration')" prop="h2c2o4_concentration" label="草酸浓度mol/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'organic_ratio')" prop="organic_ratio" label="有机相比例%" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'moisture_content')" prop="moisture_content" label="含水率%" min-width="160"></el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end;">
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current" @pagination="getScenarioResults" ></Page>
<el-table-column v-if="getIf(selectData,'u_concentration')" prop="u_concentration" label="铀浓度g/L" min-width="160"></el-table-column> </div>
<el-table-column v-if="getIf(selectData,'uo2_density')" prop="uo2_density" label="氧化铀密度g/cm3" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'u_enrichment')" prop="u_enrichment" label="铀富集度(%" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'pu_concentration')" prop="pu_concentration" label="钚浓度g/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'puo2_density')" prop="puo2_density" label="氧化钚密度g/cm3" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'pu_isotope')" prop="pu_isotope" label="钚同位素比例PU-240占比%" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'hno3_acidity')" prop="hno3_acidity" label="硝酸酸度mol/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'h2c2o4_concentration')" prop="h2c2o4_concentration" label="草酸浓度mol/L" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'organic_ratio')" prop="organic_ratio" label="有机相比例%" min-width="160"></el-table-column>
<el-table-column v-if="getIf(selectData,'moisture_content')" prop="moisture_content" label="含水率%" min-width="160"></el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end;">
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current" @pagination="getScenarioResults" ></Page>
</div>
</div> </div>

View File

@ -252,7 +252,7 @@ function changeStatus(row: any) {
{{ dateFormat(scope.row.updatedAt) }} {{ dateFormat(scope.row.updatedAt) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updatedAt" label="是否激活" width="90" align="center"> <el-table-column prop="status" label="是否激活" width="90" align="center">
<template #default="scope"> <template #default="scope">
<el-switch <el-switch
v-model="scope.row.status" v-model="scope.row.status"

View File

@ -295,8 +295,8 @@ onMounted(() => {
<div <div
style="display: flex;display: -webkit-flex; justify-content: space-between; -webkit-justify-content: space-between;margin-bottom: 10px"> style="display: flex;display: -webkit-flex; justify-content: space-between; -webkit-justify-content: space-between;margin-bottom: 10px">
<div style="display: flex;display: -webkit-flex;"> <div style="display: flex;display: -webkit-flex;">
<el-input v-model="input" placeholder="请输入设备名称" @keyup.enter="gettableData" style="width: 200px" clearable /> <!-- <el-input v-model="input" placeholder="请输入设备名称" @keyup.enter="gettableData" style="width: 200px" clearable />
<el-button type="primary" style="margin-left: 10px" @click="gettableData">搜索</el-button> <el-button type="primary" style="margin-left: 10px" @click="gettableData">搜索</el-button> -->
</div> </div>
<div style="display: flex;display: -webkit-flex;"> <div style="display: flex;display: -webkit-flex;">
<el-button type="primary" @click="addClick"> <el-button type="primary" @click="addClick">
@ -329,9 +329,9 @@ onMounted(() => {
<el-table-column prop="isotopicAbundance" label="同位素丰度" min-width="100"></el-table-column> <el-table-column prop="isotopicAbundance" label="同位素丰度" min-width="100"></el-table-column>
<el-table-column prop="keffValue" label="对应Keff值" min-width="100"></el-table-column> <el-table-column prop="keffValue" label="对应Keff值" min-width="100"></el-table-column>
<el-table-column prop="modifier" label="创建人" width="120"></el-table-column> <el-table-column prop="modifier" label="创建人" width="120"></el-table-column>
<el-table-column prop="updatedAt" label="创建时间" width="200"> <el-table-column prop="createdAt" label="创建时间" width="200">
<template #default="scope"> <template #default="scope">
{{ dateFormat(scope.row.updatedAt) }} {{ dateFormat(scope.row.createdAt) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="80" align="center"> <el-table-column fixed="right" label="操作" width="80" align="center">

View File

@ -427,9 +427,9 @@ onMounted(() => {
<el-table-column prop="modifier" label="创建人" width="120"></el-table-column> <el-table-column prop="modifier" label="创建人" width="120"></el-table-column>
<el-table-column prop="updatedAt" label="创建时间" width="200"> <el-table-column prop="createdAt" label="创建时间" width="200">
<template #default="scope"> <template #default="scope">
{{ dateFormat(scope.row.updatedAt) }} {{ dateFormat(scope.row.createdAt) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="80" align="center"> <el-table-column fixed="right" label="操作" width="80" align="center">

View File

@ -189,8 +189,10 @@ function editClick(row: any) {
title.value = "修改物料数据"; title.value = "修改物料数据";
info.value = JSON.parse(JSON.stringify(row)); info.value = JSON.parse(JSON.stringify(row));
if(row.customAttrs != null){ if(row.customAttrs != null && row.customAttrs != ""){
customAttrsData.value = JSON.parse(row.customAttrs); customAttrsData.value = JSON.parse(row.customAttrs);
}else{
customAttrsData.value = []
} }
dialogVisible.value = true; dialogVisible.value = true;
} }
@ -337,9 +339,9 @@ onMounted(() => {
<el-table-column prop="name" label="物料名称" min-width="180"></el-table-column> <el-table-column prop="name" label="物料名称" min-width="180"></el-table-column>
<!-- <el-table-column prop="description" label="物料数据描述" min-width="100"></el-table-column> --> <!-- <el-table-column prop="description" label="物料数据描述" min-width="100"></el-table-column> -->
<el-table-column prop="modifier" label="创建人" width="120"></el-table-column> <el-table-column prop="modifier" label="创建人" width="120"></el-table-column>
<el-table-column prop="updatedAt" label="创建时间" width="200"> <el-table-column prop="createdAt" label="创建时间" width="200">
<template #default="scope"> <template #default="scope">
{{ dateFormat(scope.row.updatedAt) }} {{ dateFormat(scope.row.createdAt) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="80" align="center"> <el-table-column fixed="right" label="操作" width="80" align="center">

View File

@ -88,6 +88,7 @@ function confirmClick(formEl: any) {
} else if (info.value.projectId) { } else if (info.value.projectId) {
const params = { const params = {
name: info.value.name, name: info.value.name,
code: info.value.code,
description: info.value.description, description: info.value.description,
projectId: info.value.projectId, projectId: info.value.projectId,
}; };
@ -227,9 +228,9 @@ function closeAntvx6() {
<el-table-column prop="name" label="项目名称" width="180"></el-table-column> <el-table-column prop="name" label="项目名称" width="180"></el-table-column>
<el-table-column prop="description" label="项目描述" min-width="100"></el-table-column> <el-table-column prop="description" label="项目描述" min-width="100"></el-table-column>
<el-table-column prop="modifier" label="创建人" width="120"></el-table-column> <el-table-column prop="modifier" label="创建人" width="120"></el-table-column>
<el-table-column prop="updatedAt" label="创建时间" width="200"> <el-table-column prop="createdAt" label="创建时间" width="200">
<template #default="scope"> <template #default="scope">
{{ dateFormat(scope.row.updatedAt) }} {{ dateFormat(scope.row.createdAt) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="190"> <el-table-column fixed="right" label="操作" width="190">

View File

@ -366,11 +366,11 @@ function changeShowResult(isShow:boolean){ // 切换显示结果模型
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"> :header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }">
<el-table-column type="selection" width="50" align="center"></el-table-column> <el-table-column type="selection" width="50" align="center"></el-table-column>
<el-table-column prop="name" label="事故情景名称" min-width="180"></el-table-column> <el-table-column prop="name" label="事故情景名称" min-width="180"></el-table-column>
<el-table-column prop="name" label="算法模型" min-width="180"></el-table-column> <el-table-column prop="algorithmType" label="算法模型" min-width="180"></el-table-column>
<el-table-column prop="updatedAt" label="模拟时间" width="200"> <el-table-column prop="createdAt" label="模拟时间" width="200">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.updatedAt != null">{{ dateFormat(scope.row.updatedAt) }}</span> <span v-if="scope.row.createdAt != null">{{ dateFormat(scope.row.createdAt) }}</span>
<span v-else>--</span> <span v-else>--</span>
</template> </template>
</el-table-column> </el-table-column>