修改bug
This commit is contained in:
parent
a011e60d0c
commit
061ddc16f4
@ -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({
|
||||||
|
|||||||
@ -117,7 +117,11 @@ const option = ref<any>({
|
|||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
feature: {
|
feature: {
|
||||||
saveAsImage: {}
|
saveAsImage: {
|
||||||
|
title: '导出图片', // 自定义hover提示文字
|
||||||
|
name: '导出图片', // 自定义导出文件名
|
||||||
|
pixelRatio: 2 // 提高导出图片清晰度(可选)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,7 +77,13 @@ 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;">
|
||||||
|
<a :href=" apiUrl + '/scenario-results/exportResultsAsExcel?scenarioId='+props.scenarioId+'&deviceId='+props.deviceId" target="_blank" rel="noopener noreferrer">
|
||||||
|
<el-button type="primary">导出</el-button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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' }">
|
: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="step" label="时间" width="100"></el-table-column>
|
<el-table-column prop="step" label="时间" width="100"></el-table-column>
|
||||||
@ -88,9 +95,6 @@ onMounted(() => {
|
|||||||
<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,'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,'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,'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,'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,'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,'u_enrichment')" prop="u_enrichment" label="铀富集度(%)" min-width="160"></el-table-column>
|
||||||
|
|||||||
@ -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"
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user