修改前段设备物料,计算结果逻辑
This commit is contained in:
parent
14ee33aecd
commit
faa4b9482a
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
//获取所有项目列表
|
||||
//获取临界数据分页列表
|
||||
export function searchCriticalDataPage(queryParams:any){
|
||||
return request({
|
||||
url: '/critical-data/by-device-type' ,
|
||||
@ -12,7 +12,7 @@ export function searchCriticalDataPage(queryParams:any){
|
||||
|
||||
|
||||
|
||||
//新增项目
|
||||
//新增临界数据
|
||||
export function addCriticalData(data:any){
|
||||
return request({
|
||||
url:'/critical-data' ,
|
||||
@ -22,7 +22,7 @@ export function addCriticalData(data:any){
|
||||
}
|
||||
|
||||
|
||||
//更新项目信息
|
||||
//更新临界数据信息
|
||||
export function updateCriticalData (queryParams:any){
|
||||
return request({
|
||||
url:'/critical-data' ,
|
||||
@ -32,7 +32,7 @@ export function updateCriticalData (queryParams:any){
|
||||
}
|
||||
|
||||
|
||||
//单个删除项目
|
||||
//单个删除临界数据
|
||||
export function deleteCriticalData (queryParams:any){
|
||||
return request({
|
||||
url:'/critical-data/'+queryParams.id ,
|
||||
@ -40,7 +40,7 @@ export function deleteCriticalData (queryParams:any){
|
||||
// params: queryParams
|
||||
});
|
||||
}
|
||||
//多选删除项目
|
||||
//多选删除临界数据
|
||||
export function deleteBatchCriticalData (queryParams:any){
|
||||
return request({
|
||||
url:'/critical-data',
|
||||
@ -48,3 +48,13 @@ export function deleteBatchCriticalData (queryParams:any){
|
||||
data: queryParams
|
||||
});
|
||||
}
|
||||
// 导出临界数据
|
||||
export function exportAllExports(deviceType:any){
|
||||
let url = '/critical-data/v2/export/?deviceType='+deviceType
|
||||
|
||||
return request({
|
||||
url: url ,
|
||||
method: 'get',
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
//获取所有项目列表
|
||||
//获取所有设备列表
|
||||
export function searchDevicesPage(queryParams:any){
|
||||
return request({
|
||||
url: '/devices/search' ,
|
||||
@ -12,7 +12,7 @@ export function searchDevicesPage(queryParams:any){
|
||||
|
||||
|
||||
|
||||
//新增项目
|
||||
//新增设备
|
||||
export function addDevices(data:any){
|
||||
return request({
|
||||
url:'/devices' ,
|
||||
@ -22,7 +22,7 @@ export function addDevices(data:any){
|
||||
}
|
||||
|
||||
|
||||
//更新项目信息
|
||||
//更新设备信息
|
||||
export function updateDevices (queryParams:any){
|
||||
return request({
|
||||
url:'/devices' ,
|
||||
@ -32,7 +32,7 @@ export function updateDevices (queryParams:any){
|
||||
}
|
||||
|
||||
|
||||
//单个删除项目
|
||||
//单个删除设备
|
||||
export function deleteDevices (queryParams:any){
|
||||
return request({
|
||||
url:'/devices/'+queryParams.id ,
|
||||
@ -40,7 +40,7 @@ export function deleteDevices (queryParams:any){
|
||||
// params: queryParams
|
||||
});
|
||||
}
|
||||
//多选删除项目
|
||||
//多选删除设备
|
||||
export function deleteBatchDevices (queryParams:any){
|
||||
return request({
|
||||
url:'/devices',
|
||||
@ -50,7 +50,7 @@ export function deleteBatchDevices (queryParams:any){
|
||||
}
|
||||
|
||||
|
||||
//获取所有项目列表
|
||||
//获取所有设备列表
|
||||
export function sizeSchemaAll(queryParams:any){
|
||||
return request({
|
||||
url: '/devices/v2/size-schema/all' ,
|
||||
@ -59,4 +59,13 @@ export function sizeSchemaAll(queryParams:any){
|
||||
});
|
||||
}
|
||||
|
||||
// 导出全部结果
|
||||
export function exportAllExports(deviceType:any){
|
||||
let url = '/devices/v2/export/?deviceType='+deviceType
|
||||
|
||||
return request({
|
||||
url: url ,
|
||||
method: 'get',
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
//获取所有项目列表
|
||||
//获取所有物料列表
|
||||
export function searchMaterialsPage(queryParams:any){
|
||||
return request({
|
||||
url: '/materials/search' ,
|
||||
@ -13,7 +13,7 @@ export function searchMaterialsPage(queryParams:any){
|
||||
|
||||
|
||||
|
||||
//拓扑图新增或更新项目
|
||||
//拓扑图新增或更新物料
|
||||
export function saveOrUpdate(data:any){
|
||||
return request({
|
||||
url:'/materials/saveOrUpdate' ,
|
||||
@ -23,7 +23,7 @@ export function saveOrUpdate(data:any){
|
||||
}
|
||||
|
||||
|
||||
//新增项目
|
||||
//新增物料
|
||||
export function addMaterials(data:any){
|
||||
return request({
|
||||
url:'/materials' ,
|
||||
@ -33,7 +33,7 @@ export function addMaterials(data:any){
|
||||
}
|
||||
|
||||
|
||||
//更新项目信息
|
||||
//更新物料信息
|
||||
export function updateMaterials (queryParams:any){
|
||||
return request({
|
||||
url:'/materials' ,
|
||||
@ -43,7 +43,7 @@ export function updateMaterials (queryParams:any){
|
||||
}
|
||||
|
||||
|
||||
//单个删除项目
|
||||
//单个删除物料
|
||||
export function deleteMaterials (queryParams:any){
|
||||
return request({
|
||||
url:'/materials/'+queryParams.id ,
|
||||
@ -51,7 +51,7 @@ export function deleteMaterials (queryParams:any){
|
||||
// params: queryParams
|
||||
});
|
||||
}
|
||||
//多选删除项目
|
||||
//多选删除物料
|
||||
export function deleteBatchMaterials (queryParams:any){
|
||||
return request({
|
||||
url:'/materials',
|
||||
@ -59,3 +59,14 @@ export function deleteBatchMaterials (queryParams:any){
|
||||
data: queryParams
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 导出物料
|
||||
export function exportAllExports(){
|
||||
let url = '/materials/export'
|
||||
return request({
|
||||
url: url ,
|
||||
method: 'get',
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
}
|
||||
|
||||
@ -16,6 +16,11 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
sizeSchemaInfo: {
|
||||
required: false,
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
deviceId: {
|
||||
required: false,
|
||||
type: String,
|
||||
@ -27,6 +32,7 @@ const props = defineProps({
|
||||
default: ''
|
||||
},
|
||||
})
|
||||
const sourceTempData:any = ref([])
|
||||
const input = ref('') // 设备名称
|
||||
const loading = ref(false) // 加载中
|
||||
const tableData = ref([]) // 表格数据
|
||||
@ -44,55 +50,56 @@ if(deviceTypetype.value == ''){
|
||||
loading.value = true;
|
||||
searchDevicesPage(params).then((result:any) => {
|
||||
result.records.forEach((item:any) => {
|
||||
if(deviceTypetype.value == 'FlatTank'){ // 扁平槽
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['length'] = sizeInfo.length
|
||||
item['width'] = sizeInfo.width
|
||||
item['height'] = sizeInfo.height
|
||||
}
|
||||
if(deviceTypetype.value == 'CylindricalTank'){ // 圆柱槽
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['diameter'] = sizeInfo.diameter
|
||||
item['height'] = sizeInfo.height
|
||||
}
|
||||
if(deviceTypetype.value == 'AnnularTank'){ // 环形槽
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['outer_diameter'] = sizeInfo.outer_diameter
|
||||
item['height'] = sizeInfo.height
|
||||
}
|
||||
item.size = JSON.parse(item.size)
|
||||
// if(deviceTypetype.value == 'FlatTank'){ // 扁平槽
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['length'] = sizeInfo.length
|
||||
// item['width'] = sizeInfo.width
|
||||
// item['height'] = sizeInfo.height
|
||||
// }
|
||||
// if(deviceTypetype.value == 'CylindricalTank'){ // 圆柱槽
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['diameter'] = sizeInfo.diameter
|
||||
// item['height'] = sizeInfo.height
|
||||
// }
|
||||
// if(deviceTypetype.value == 'AnnularTank'){ // 环形槽
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['outer_diameter'] = sizeInfo.outer_diameter
|
||||
// item['height'] = sizeInfo.height
|
||||
// }
|
||||
|
||||
if(deviceTypetype.value == 'TubeBundleTank'){ // 管束槽
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['outer_diameter'] = sizeInfo.outer_diameter
|
||||
item['height'] = sizeInfo.height
|
||||
}
|
||||
if(deviceTypetype.value == 'ExtractionColumn'){ // 萃取柱
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['upper_expanded_diameter'] = sizeInfo.upper_expanded.diameter
|
||||
item['upper_expanded_height'] = sizeInfo.upper_expanded.height
|
||||
item['tray_section_diameter'] = sizeInfo.tray_section.diameter
|
||||
item['tray_section_height'] = sizeInfo.tray_section.height
|
||||
item['lower_expanded_diameter'] = sizeInfo.lower_expanded.diameter
|
||||
item['lower_expanded_height'] = sizeInfo.lower_expanded.height
|
||||
}
|
||||
if(deviceTypetype.value == 'FluidizedBed'){ // 流化床
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['expanded_section_diameter'] = sizeInfo.expanded_section.diameter
|
||||
item['expanded_section_height'] = sizeInfo.expanded_section.height
|
||||
// if(deviceTypetype.value == 'TubeBundleTank'){ // 管束槽
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['outer_diameter'] = sizeInfo.outer_diameter
|
||||
// item['height'] = sizeInfo.height
|
||||
// }
|
||||
// if(deviceTypetype.value == 'ExtractionColumn'){ // 萃取柱
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['upper_expanded_diameter'] = sizeInfo.upper_expanded.diameter
|
||||
// item['upper_expanded_height'] = sizeInfo.upper_expanded.height
|
||||
// item['tray_section_diameter'] = sizeInfo.tray_section.diameter
|
||||
// item['tray_section_height'] = sizeInfo.tray_section.height
|
||||
// item['lower_expanded_diameter'] = sizeInfo.lower_expanded.diameter
|
||||
// item['lower_expanded_height'] = sizeInfo.lower_expanded.height
|
||||
// }
|
||||
// if(deviceTypetype.value == 'FluidizedBed'){ // 流化床
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['expanded_section_diameter'] = sizeInfo.expanded_section.diameter
|
||||
// item['expanded_section_height'] = sizeInfo.expanded_section.height
|
||||
|
||||
item['transition_section_height'] = sizeInfo.transition_section.height
|
||||
// item['transition_section_height'] = sizeInfo.transition_section.height
|
||||
|
||||
|
||||
item['reaction_section_diameter'] = sizeInfo.reaction_section.diameter
|
||||
item['reaction_section_height'] = sizeInfo.reaction_section.height
|
||||
}
|
||||
if(deviceTypetype.value == 'ACFTank'){ // 锥底环形槽
|
||||
let sizeInfo =JSON.parse(item.size)
|
||||
item['annular_cylinder_outer_diameter'] = sizeInfo.annular_cylinder.outer_diameter
|
||||
item['annular_cylinder_height'] = sizeInfo.annular_cylinder.height
|
||||
item['frustum_bottom_bottom_diameter'] = sizeInfo.frustum_bottom.bottom_diameter
|
||||
item['frustum_bottom_height'] = sizeInfo.frustum_bottom.height
|
||||
}
|
||||
// item['reaction_section_diameter'] = sizeInfo.reaction_section.diameter
|
||||
// item['reaction_section_height'] = sizeInfo.reaction_section.height
|
||||
// }
|
||||
// if(deviceTypetype.value == 'ACFTank'){ // 锥底环形槽
|
||||
// let sizeInfo =JSON.parse(item.size)
|
||||
// item['annular_cylinder_outer_diameter'] = sizeInfo.annular_cylinder.outer_diameter
|
||||
// item['annular_cylinder_height'] = sizeInfo.annular_cylinder.height
|
||||
// item['frustum_bottom_bottom_diameter'] = sizeInfo.frustum_bottom.bottom_diameter
|
||||
// item['frustum_bottom_height'] = sizeInfo.frustum_bottom.height
|
||||
// }
|
||||
|
||||
})
|
||||
tableData.value = result.records;
|
||||
@ -110,7 +117,7 @@ function confirmDevice(){ // 确定添加设备
|
||||
const params = {
|
||||
projectId: props.projectInfo.projectId,
|
||||
deviceId: props.deviceId,
|
||||
size: selectedDevice.value.size,
|
||||
size: JSON.stringify(selectedDevice.value.size),
|
||||
code: selectedDevice.value.code,
|
||||
name: selectedDevice.value.name,
|
||||
type: selectedDevice.value.type,
|
||||
@ -130,7 +137,7 @@ function confirmClick(formEl: any) {
|
||||
if (valid) {
|
||||
const params = {
|
||||
...info.value,
|
||||
size: JSON.stringify( josnInfo.value),
|
||||
size: JSON.stringify( info.value.size),
|
||||
projectId: props.projectInfo.projectId,
|
||||
deviceId: props.deviceId
|
||||
}
|
||||
@ -143,22 +150,28 @@ function confirmClick(formEl: any) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const info: any = ref({
|
||||
name: "",
|
||||
code: "",
|
||||
type: null,
|
||||
size: {},
|
||||
volume: null,
|
||||
flowRate: null,
|
||||
pulseVelocity: null
|
||||
});
|
||||
onMounted(() => {
|
||||
// sizeSchemaInfo.value = props.sizeSchemaInfo
|
||||
sourceTempData.value = props.sizeSchemaInfo[props.deviceTypetype].fields
|
||||
sourceTempData.value.forEach((item:any) => {
|
||||
info.value.size[item.key] = null
|
||||
})
|
||||
// sizeSchemaInfo.value[queryParams.value.type]
|
||||
gettableData()
|
||||
|
||||
});
|
||||
const infoForm = ref();
|
||||
const isAdd = ref(false) // 是否添加设备
|
||||
const info: any = ref({
|
||||
name: "",
|
||||
code: "",
|
||||
type: null,
|
||||
size: null,
|
||||
volume: null,
|
||||
flowRate: null,
|
||||
pulseVelocity: null
|
||||
});
|
||||
|
||||
const josnInfo: any = ref({}) // 设备信息
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: "请输入设备名称", trigger: "blur" }],
|
||||
@ -169,30 +182,30 @@ function addClick() {
|
||||
name: "",
|
||||
code: "",
|
||||
type: props.deviceTypetype,
|
||||
size: null,
|
||||
size: {},
|
||||
volume: null,
|
||||
flowRate: null,
|
||||
pulseVelocity: null
|
||||
};
|
||||
josnInfo.value = {}
|
||||
if(props.deviceTypetype == 'ExtractionColumn'){
|
||||
josnInfo.value = {
|
||||
tray_section:{},
|
||||
lower_expanded:{},
|
||||
upper_expanded:{}
|
||||
}
|
||||
}else if(props.deviceTypetype == 'FluidizedBed'){
|
||||
josnInfo.value = {
|
||||
expanded_section:{},
|
||||
reaction_section:{},
|
||||
transition_section:{}
|
||||
}
|
||||
}else if(props.deviceTypetype == 'ACFTank'){
|
||||
josnInfo.value = {
|
||||
frustum_bottom:{},
|
||||
annular_cylinder:{}
|
||||
}
|
||||
}
|
||||
// josnInfo.value = {}
|
||||
// if(props.deviceTypetype == 'ExtractionColumn'){
|
||||
// josnInfo.value = {
|
||||
// tray_section:{},
|
||||
// lower_expanded:{},
|
||||
// upper_expanded:{}
|
||||
// }
|
||||
// }else if(props.deviceTypetype == 'FluidizedBed'){
|
||||
// josnInfo.value = {
|
||||
// expanded_section:{},
|
||||
// reaction_section:{},
|
||||
// transition_section:{}
|
||||
// }
|
||||
// }else if(props.deviceTypetype == 'ACFTank'){
|
||||
// josnInfo.value = {
|
||||
// frustum_bottom:{},
|
||||
// annular_cylinder:{}
|
||||
// }
|
||||
// }
|
||||
isAdd.value = true
|
||||
}
|
||||
</script>
|
||||
@ -215,30 +228,11 @@ function addClick() {
|
||||
@cell-click="selectPatient" highlight-current-row row-key="id" :header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }">
|
||||
<el-table-column type="index" label="序号" width="70" align="center"></el-table-column>
|
||||
<el-table-column prop="name" label="设备名称" min-width="180"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FlatTank'" prop="length" label="长度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FlatTank'" prop="width" label="宽度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FlatTank'" prop="height" label="高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'CylindricalTank'" prop="diameter" label="直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'CylindricalTank'" prop="height" label="高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'AnnularTank'" prop="outer_diameter" label="环形槽外径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'AnnularTank'" prop="height" label="环形槽高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'TubeBundleTank'" prop="outer_diameter" label="外径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'TubeBundleTank'" prop="height" label="高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ExtractionColumn'" prop="upper_expanded_diameter" label="上扩大段直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ExtractionColumn'" prop="upper_expanded_height" label="上扩大段高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ExtractionColumn'" prop="tray_section_diameter" label="板段直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ExtractionColumn'" prop="tray_section_height" label="板段高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ExtractionColumn'" prop="lower_expanded_diameter" label="下扩大段直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ExtractionColumn'" prop="lower_expanded_height" label="下扩大段高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FluidizedBed'" prop="expanded_section_diameter" label="扩大段直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FluidizedBed'" prop="expanded_section_height" label="扩大段高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FluidizedBed'" prop="transition_section_height" label="过渡段高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FluidizedBed'" prop="reaction_section_diameter" label="反应段直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'FluidizedBed'" prop="reaction_section_height" label="反应段高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ACFTank'" prop="annular_cylinder_outer_diameter" label="环形圆柱外径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ACFTank'" prop="annular_cylinder_height" label="环形圆柱高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ACFTank'" prop="frustum_bottom_bottom_diameter" label="圆锥台底部直径(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-if="deviceTypetype == 'ACFTank'" prop="frustum_bottom_height" label="圆锥台底部高度(cm)" min-width="100"></el-table-column>
|
||||
<el-table-column v-for="(item,index) in sourceTempData" :label="item.label" min-width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.size[item.key] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="volume" label="容量(L)" width="120"></el-table-column>
|
||||
<el-table-column prop="flowRate" label="流量(m³/h)" width="120"></el-table-column>
|
||||
<el-table-column prop="pulseVelocity" label="脉冲速度(Hz)" width="120"></el-table-column>
|
||||
@ -246,341 +240,25 @@ function addClick() {
|
||||
</div>
|
||||
<div v-if="isAdd == true">
|
||||
<el-form ref="infoForm" :model="info" :rules="rules" label-width="120px" v-if="isAdd == true"
|
||||
style="width: 100%;height: calc(100vh - 340px);margin-top: 30px;">
|
||||
style="width: 100%;max-height: calc(100vh - 300px);margin-top: 20px;overflow: auto;">
|
||||
<el-form-item label="设备编号" prop="code" style="width: 100%;">
|
||||
<el-input v-model="info.code" style="width: 100%" placeholder="请输入设备编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name" style="width: 100%;">
|
||||
<el-input v-model="info.name" style="width: 100%" placeholder="请输入设备名称"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="deviceTypetype == 'FlatTank'">
|
||||
<el-form-item label="长度" style="width: 100%;">
|
||||
<el-form-item :label="item.label" style="width: 100%;" v-for="item in sourceTempData">
|
||||
<el-input-number
|
||||
placeholder="请输入长度"
|
||||
v-model="josnInfo['length']"
|
||||
v-model="info.size[item.key]"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
<template #suffix>{{item.unit}}</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入宽度"
|
||||
v-model="josnInfo.width"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'CylindricalTank'">
|
||||
<el-form-item label="直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'AnnularTank'">
|
||||
<el-form-item label="环形槽外径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.outer_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="环形槽高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'TubeBundleTank'">
|
||||
<el-form-item label="外径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.outer_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="deviceTypetype == 'ExtractionColumn'">
|
||||
<div class="flex">
|
||||
<el-form-item label="上扩大段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.upper_expanded.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上扩大段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.upper_expanded.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<el-form-item label="板段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.tray_section.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="板段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.tray_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<el-form-item label="下扩大段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.lower_expanded.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="下扩大段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.lower_expanded.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'FluidizedBed'">
|
||||
<div class="flex">
|
||||
<el-form-item label="扩大段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.expanded_section.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="扩大段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.expanded_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="过渡段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.transition_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<div class="flex">
|
||||
<el-form-item label="反应段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.reaction_section.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="反应段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.reaction_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'ACFTank'">
|
||||
<div class="flex">
|
||||
<el-form-item label="环形圆柱外径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入外径"
|
||||
v-model="josnInfo.annular_cylinder.outer_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="环形圆柱高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.annular_cylinder.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<el-form-item label="圆锥台底部直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.frustum_bottom.bottom_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="圆锥台底部高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.frustum_bottom.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="容量" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入容量"
|
||||
|
||||
@ -17,49 +17,56 @@ function getName(code:any) {
|
||||
key: '',
|
||||
type: ''
|
||||
}
|
||||
if( getFormula(deviceType.value ,code).isDevice == true){
|
||||
return tempInfo = {
|
||||
name: getFormula(deviceType.value ,code).label,
|
||||
key: getFormula(deviceType.value ,code).key,
|
||||
type: 'device'
|
||||
};
|
||||
}
|
||||
switch (code) {
|
||||
case 'width':
|
||||
return tempInfo = {
|
||||
name: "宽度cm",
|
||||
key: 'width',
|
||||
type: 'device'
|
||||
};
|
||||
break;
|
||||
case 'outer_diameter':
|
||||
return tempInfo = {
|
||||
name: "外径cm",
|
||||
key: 'outer_diameter',
|
||||
type: 'device'
|
||||
};
|
||||
break;
|
||||
case 'height':
|
||||
return tempInfo = {
|
||||
name: "高度cm",
|
||||
key: 'height',
|
||||
type: 'device'
|
||||
};
|
||||
break;
|
||||
case 'length':
|
||||
return tempInfo = {
|
||||
name: "长度cm",
|
||||
key: 'length',
|
||||
type: 'device'
|
||||
};
|
||||
break;
|
||||
case 'diameter':
|
||||
return tempInfo = {
|
||||
name: "外径cm",
|
||||
key: 'diameter',
|
||||
type: 'device'
|
||||
};
|
||||
break;
|
||||
case 'volume':
|
||||
return tempInfo = {
|
||||
name: "体积(单位:L)",
|
||||
key: 'volume',
|
||||
type: 'device'
|
||||
};
|
||||
break;
|
||||
// case 'width':
|
||||
// return tempInfo = {
|
||||
// name: "宽度cm",
|
||||
// key: 'width',
|
||||
// type: 'device'
|
||||
// };
|
||||
// break;
|
||||
// case 'outer_diameter':
|
||||
// return tempInfo = {
|
||||
// name: "外径cm",
|
||||
// key: 'outer_diameter',
|
||||
// type: 'device'
|
||||
// };
|
||||
// break;
|
||||
// case 'height':
|
||||
// return tempInfo = {
|
||||
// name: "高度cm",
|
||||
// key: 'height',
|
||||
// type: 'device'
|
||||
// };
|
||||
// break;
|
||||
// case 'length':
|
||||
// return tempInfo = {
|
||||
// name: "长度cm",
|
||||
// key: 'length',
|
||||
// type: 'device'
|
||||
// };
|
||||
// break;
|
||||
// case 'diameter':
|
||||
// return tempInfo = {
|
||||
// name: "外径cm",
|
||||
// key: 'diameter',
|
||||
// type: 'device'
|
||||
// };
|
||||
// break;
|
||||
// case 'volume':
|
||||
// return tempInfo = {
|
||||
// name: "体积(单位:L)",
|
||||
// key: 'volume',
|
||||
// type: 'device'
|
||||
// };
|
||||
// break;
|
||||
case 'flow_rate':
|
||||
return tempInfo = {
|
||||
name: "流量(单位:m3/h)",
|
||||
@ -90,7 +97,7 @@ function getName(code:any) {
|
||||
break;
|
||||
case 'u_enrichment':
|
||||
return tempInfo = {
|
||||
name: "铀富集度(%)",
|
||||
name: "铀富集度",
|
||||
key: 'u_enrichment',
|
||||
type: 'material'
|
||||
};
|
||||
@ -109,10 +116,39 @@ function getName(code:any) {
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
case 'pu_isotope':
|
||||
case 'e_pu238':
|
||||
return tempInfo = {
|
||||
name: "钚同位素比例(PU-240占比)%",
|
||||
key: 'pu_isotope',
|
||||
name: "PU-238占比",
|
||||
key: 'e_pu238',
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
|
||||
case 'e_pu239':
|
||||
return tempInfo = {
|
||||
name: "PU-239占比",
|
||||
key: 'e_pu239',
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
case 'e_pu240':
|
||||
return tempInfo = {
|
||||
name: "PU-240占比",
|
||||
key: 'e_pu240',
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
case 'e_pu241':
|
||||
return tempInfo = {
|
||||
name: "PU-241占比",
|
||||
key: 'e_pu241',
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
case 'e_pu242':
|
||||
return tempInfo = {
|
||||
name: "PU-242占比",
|
||||
key: 'e_pu242',
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
@ -132,14 +168,14 @@ function getName(code:any) {
|
||||
break;
|
||||
case 'organic_ratio':
|
||||
return tempInfo = {
|
||||
name: "有机相比例%",
|
||||
name: "有机相比例",
|
||||
key: 'organic_ratio',
|
||||
type: 'material'
|
||||
};
|
||||
break;
|
||||
case 'moisture_content':
|
||||
return tempInfo = {
|
||||
name: "含水率%",
|
||||
name: "含水率",
|
||||
key: 'moisture_content',
|
||||
type: 'material'
|
||||
};
|
||||
@ -154,12 +190,38 @@ function getName(code:any) {
|
||||
return tempInfo
|
||||
}
|
||||
|
||||
const getFormula:any = (deviceType:any,code:any)=>{
|
||||
let deviceTemp = {
|
||||
isDevice: false,
|
||||
label: '',
|
||||
key: '',
|
||||
}
|
||||
let tempFields = props.sizeSchemaInfo[deviceType].fields
|
||||
for(let i = 0; i < tempFields.length; i++){
|
||||
if(tempFields[i].key == code){
|
||||
deviceTemp = {
|
||||
isDevice: true,
|
||||
label:tempFields[i].label,
|
||||
key: tempFields[i].key,
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
return deviceTemp
|
||||
|
||||
|
||||
}
|
||||
const props = defineProps({
|
||||
projectInfo: {
|
||||
required: false,
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
sizeSchemaInfo:{
|
||||
required: false,
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
formula: {
|
||||
required: false,
|
||||
type: String,
|
||||
@ -196,7 +258,10 @@ function gettableData() {
|
||||
}
|
||||
})
|
||||
}
|
||||
const deviceType:any = ref('')
|
||||
function handleClick(item:any, index:any){
|
||||
deviceType.value = item.deviceType
|
||||
|
||||
attributeList.value = [];
|
||||
if(item.deviceSize != "" && item.deviceSize != null){
|
||||
let deviceSize = JSON.parse(item.deviceSize);
|
||||
|
||||
@ -18,7 +18,11 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
|
||||
sizeSchemaInfo:{
|
||||
required: false,
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
deviceInfo:{
|
||||
required: false,
|
||||
type: Object,
|
||||
@ -93,7 +97,7 @@ function getInit(row:any){
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "铀富集度(%)",
|
||||
key: "铀富集度",
|
||||
name: "u_enrichment",
|
||||
value: row.uEnrichment,
|
||||
unit: "%",
|
||||
@ -117,14 +121,48 @@ function getInit(row:any){
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "钚同位素比例(PU-240占比)%",
|
||||
name: "pu_isotope",
|
||||
value: row.puIsotope,
|
||||
unit: "%",
|
||||
key: "PU-238占比",
|
||||
name: "e_pu238",
|
||||
value: row.ePu238,
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "PU-239占比",
|
||||
name: "e_pu239",
|
||||
value: row.ePu239,
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "PU-240占比",
|
||||
name: "e_pu240",
|
||||
value: row.ePu240,
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "PU-241占比",
|
||||
name: "e_pu241",
|
||||
value: row.ePu241,
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "PU-242占比",
|
||||
name: "e_pu242",
|
||||
value: row.ePu242,
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},
|
||||
|
||||
{
|
||||
key: "硝酸酸度(mol/L)",
|
||||
name: "hno3_acidity",
|
||||
value: row.hno3Acidity,
|
||||
@ -138,18 +176,18 @@ function getInit(row:any){
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "有机相比例%",
|
||||
key: "有机相比例",
|
||||
name: "organic_ratio",
|
||||
value: row.organicRatio,
|
||||
unit: "%",
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
},{
|
||||
key: "含水率%",
|
||||
key: "含水率",
|
||||
name: "moisture_content",
|
||||
value: row.moistureContent,
|
||||
unit: "%",
|
||||
unit: "",
|
||||
formula: '',
|
||||
correlation: '',
|
||||
delay: '',
|
||||
@ -266,7 +304,7 @@ function closeChangeDialogsettings(e:any){ // 变动公式值设置关闭
|
||||
</div>
|
||||
|
||||
<div class="table-box">
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table :data="tableData" style="width: 100%;height: calc(100vh - 360px); overflow: auto;" border >
|
||||
<el-table-column prop="key" label="属性" width="280"></el-table-column>
|
||||
<el-table-column prop="value" label="值" width="150"></el-table-column>
|
||||
<el-table-column prop="formula" label="计算公式" min-width="100"></el-table-column>
|
||||
@ -360,7 +398,7 @@ function closeChangeDialogsettings(e:any){ // 变动公式值设置关闭
|
||||
<el-dialog v-model="isChangeDialogsettings" :close-on-click-modal="false" :modal="false" draggable
|
||||
:before-close="dialogChangeDialogsettings" title="变动公式值设置" append-to-body width="1280px" class="materialmodel-dialog-box">
|
||||
<ChangeDialogsettings v-if="isChangeDialogsettings" :projectInfo="projectInfo"
|
||||
:formula = "formula" :formulaData= "formulaData" :delayList="delayList"
|
||||
:formula = "formula" :formulaData= "formulaData" :delayList="delayList" :sizeSchemaInfo="sizeSchemaInfo"
|
||||
@closeChangeDialogsettings="closeChangeDialogsettings" />
|
||||
</el-dialog>
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ function getName(code:any) {
|
||||
return name = "氧化铀密度(g/cm3)";
|
||||
break;
|
||||
case 'u_enrichment':
|
||||
return name = "铀富集度(%)";
|
||||
return name = "铀富集度";
|
||||
break;
|
||||
case 'pu_concentration':
|
||||
return name = "钚浓度(g/L)";
|
||||
@ -83,7 +83,7 @@ function getName(code:any) {
|
||||
return name = "氧化钚密度(g/cm3)";
|
||||
break;
|
||||
case 'pu_isotope':
|
||||
return name = "钚同位素比例(PU-240占比)%";
|
||||
return name = "钚同位素比例(PU-240占比)";
|
||||
break;
|
||||
case 'hno3_acidity':
|
||||
return name = "硝酸酸度(mol/L)";
|
||||
@ -92,10 +92,10 @@ function getName(code:any) {
|
||||
return name = "草酸浓度(mol/L)";
|
||||
break;
|
||||
case 'organic_ratio':
|
||||
return name = "有机相比例%";
|
||||
return name = "有机相比例";
|
||||
break;
|
||||
case 'moisture_content':
|
||||
return name = "含水率%";
|
||||
return name = "含水率";
|
||||
break;
|
||||
default:
|
||||
return name = "";
|
||||
|
||||
@ -16,6 +16,11 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
sizeSchemaInfo: {
|
||||
required: false,
|
||||
type: Object,
|
||||
default: {}
|
||||
},
|
||||
deviceInfo: {
|
||||
required: false,
|
||||
type: Object,
|
||||
@ -37,7 +42,7 @@ function confirmClick(formEl: any) {
|
||||
if (valid) {
|
||||
const params = {
|
||||
...info.value,
|
||||
size: JSON.stringify(josnInfo.value)
|
||||
size: JSON.stringify(info.value.size)
|
||||
}
|
||||
|
||||
updateDevices(params).then((res:any) => {
|
||||
@ -49,8 +54,9 @@ function confirmClick(formEl: any) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const sourceTempData:any = ref([])
|
||||
onMounted(() => {
|
||||
sourceTempData.value = props.sizeSchemaInfo[props.deviceTypetype].fields
|
||||
editClick(props.deviceInfo)
|
||||
|
||||
});
|
||||
@ -59,12 +65,11 @@ const info: any = ref({
|
||||
name: "",
|
||||
code: "",
|
||||
type: null,
|
||||
size: null,
|
||||
size: {},
|
||||
volume: null,
|
||||
flowRate: null,
|
||||
pulseVelocity: null
|
||||
});
|
||||
const josnInfo: any = ref({}) // 设备信息
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: "请输入设备名称", trigger: "blur" }],
|
||||
code: [{ required: true, message: "请输入设备编码", trigger: "blur" }],
|
||||
@ -72,10 +77,8 @@ const rules = ref({
|
||||
const isEdit = ref(false) // 是否编辑设备
|
||||
function editClick(row: any) {
|
||||
info.value = JSON.parse(JSON.stringify(row));
|
||||
info.value.size = JSON.parse(row.size)
|
||||
|
||||
if(row.size != null){
|
||||
josnInfo.value = JSON.parse(row.size);
|
||||
}
|
||||
isEdit.value = true;
|
||||
}
|
||||
</script>
|
||||
@ -84,341 +87,27 @@ function editClick(row: any) {
|
||||
<div class="editdevice-box">
|
||||
|
||||
<el-form ref="infoForm" :model="info" :rules="rules" label-width="120px" v-if="isEdit"
|
||||
style="width: 100%;height: calc(100vh - 340px);margin-top: 30px;">
|
||||
style="width: 100%;max-height: calc(100vh - 260px);margin-top: 20px;overflow: auto;">
|
||||
<el-form-item label="设备编号" prop="code" style="width: 100%;">
|
||||
<el-input v-model="info.code" style="width: 100%" placeholder="请输入设备编号" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="name" style="width: 100%;">
|
||||
<el-input v-model="info.name" style="width: 100%" placeholder="请输入设备名称"></el-input>
|
||||
</el-form-item>
|
||||
<div v-if="deviceTypetype == 'FlatTank'">
|
||||
<el-form-item label="长度" style="width: 100%;">
|
||||
|
||||
|
||||
<el-form-item :label="item.label" style="width: 100%;" v-for="item in sourceTempData">
|
||||
<el-input-number
|
||||
placeholder="请输入长度"
|
||||
v-model="josnInfo['length']"
|
||||
v-model="info.size[item.key]"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
<template #suffix>{{item.unit}}</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入宽度"
|
||||
v-model="josnInfo.width"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'CylindricalTank'">
|
||||
<el-form-item label="直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'AnnularTank'">
|
||||
<el-form-item label="环形槽外径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.outer_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="环形槽高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'TubeBundleTank'">
|
||||
<el-form-item label="外径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.outer_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="deviceTypetype == 'ExtractionColumn'">
|
||||
<div class="flex">
|
||||
<el-form-item label="上扩大段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.upper_expanded.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上扩大段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.upper_expanded.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<el-form-item label="板段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.tray_section.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="板段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.tray_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<el-form-item label="下扩大段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.lower_expanded.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="下扩大段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.lower_expanded.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'FluidizedBed'">
|
||||
<div class="flex">
|
||||
<el-form-item label="扩大段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.expanded_section.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="扩大段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.expanded_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="过渡段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.transition_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<div class="flex">
|
||||
<el-form-item label="反应段直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.reaction_section.diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="反应段高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.reaction_section.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="deviceTypetype == 'ACFTank'">
|
||||
<div class="flex">
|
||||
<el-form-item label="环形圆柱外径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入外径"
|
||||
v-model="josnInfo.annular_cylinder.outer_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="环形圆柱高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.annular_cylinder.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<el-form-item label="圆锥台底部直径" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入直径"
|
||||
v-model="josnInfo.frustum_bottom.bottom_diameter"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="圆锥台底部高度" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入高度"
|
||||
v-model="josnInfo.frustum_bottom.height"
|
||||
:min="0"
|
||||
align="left"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
>
|
||||
<template #suffix>cm</template>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="容量" style="width: 100%;">
|
||||
<el-input-number
|
||||
placeholder="请输入容量"
|
||||
|
||||
@ -19,9 +19,8 @@ import insertCss from 'insert-css'
|
||||
import { updateProjects} from "@/api/business/project";
|
||||
import Createscenario from '@/views/component/scenario/createscenario.vue'
|
||||
import ScenarioModel from '@/views/component/scenario/index.vue'
|
||||
import { addDevices } from "@/api/business/database/device";
|
||||
import { addDevices,sizeSchemaAll } from "@/api/business/database/device";
|
||||
import { saveOrUpdate} from "@/api/business/database/material";
|
||||
|
||||
import { projectsById} from "@/api/business/project";
|
||||
import line1 from '@/assets/x6/line1.png'
|
||||
import line2 from '@/assets/x6/line2.png'
|
||||
@ -44,6 +43,16 @@ const props = defineProps({
|
||||
default: {}
|
||||
},
|
||||
})
|
||||
//获取所有项目列表
|
||||
const sizeSchemaInfo:any = ref({});
|
||||
|
||||
async function getSizeSchemaList(){
|
||||
let result = await sizeSchemaAll({})
|
||||
sizeSchemaInfo.value = result
|
||||
}
|
||||
|
||||
|
||||
|
||||
const isLock = ref(false) // 是否锁定
|
||||
const deviceTypetype:any = ref('') // 设备类型
|
||||
const isAdddevice = ref(false) // 是否添加设备
|
||||
@ -940,12 +949,21 @@ graph.on('blank:mouseup', (e) => {
|
||||
const topology:any = JSON.parse(projectInfo.value.topology)
|
||||
if(!topology.designData)return
|
||||
graph.fromJSON(topology.designData);
|
||||
let json = graph.toJSON()
|
||||
tabDeviceNum.value = 0
|
||||
for(let i = 0; i < json.cells.length; i++){
|
||||
if(json.cells[i].shape == 'custom-image'){
|
||||
tabDeviceNum.value++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
getSizeSchemaList()
|
||||
// #endregion
|
||||
})
|
||||
|
||||
const tabDeviceNum = ref(0)
|
||||
const antvStatus = ref('初始化')
|
||||
function preWork() {
|
||||
// 这里协助演示的代码,在实际项目中根据实际情况进行调整
|
||||
const container = document.getElementById('container') as HTMLElement
|
||||
@ -1020,6 +1038,14 @@ const isMenuShow = ref(false) // 是否显示右键菜单
|
||||
const selectedNode:any = ref(null)
|
||||
function deleteNode() { // 删除节点
|
||||
graph.removeNode(selectedNode.value)
|
||||
let json = graph.toJSON()
|
||||
tabDeviceNum.value = 0
|
||||
for(let i = 0; i < json.cells.length; i++){
|
||||
if(json.cells[i].shape == 'custom-image'){
|
||||
tabDeviceNum.value++
|
||||
}
|
||||
}
|
||||
antvStatus.value = '删除设备'
|
||||
isMenuShow.value = false
|
||||
}
|
||||
|
||||
@ -1161,6 +1187,7 @@ function closeConnectingwireModel(e:any){ // 关闭连接线弹窗
|
||||
zIndex: 0
|
||||
})
|
||||
}
|
||||
antvStatus.value = '编辑连接线'
|
||||
}
|
||||
isConnectingwire.value = false;
|
||||
}
|
||||
@ -1195,6 +1222,14 @@ function closeAdddevice(e:any){ // 关闭新增设备弹窗
|
||||
retrievedNode.attr('label/text', e.name)
|
||||
retrievedNode.store.data.deviceInfo = e
|
||||
saveDesign(false)
|
||||
let json = graph.toJSON()
|
||||
tabDeviceNum.value = 0
|
||||
for(let i = 0; i < json.cells.length; i++){
|
||||
if(json.cells[i].shape == 'custom-image'){
|
||||
tabDeviceNum.value++
|
||||
}
|
||||
}
|
||||
antvStatus.value = '新增设备'
|
||||
isAdddevice.value = false;
|
||||
}
|
||||
|
||||
@ -1215,6 +1250,14 @@ function closeEditdevice(e:any){ // 关闭编辑设备弹窗
|
||||
retrievedNode.attr('text/text', e.name)
|
||||
retrievedNode.attr('label/text', e.name)
|
||||
isEditdevice.value = false;
|
||||
let json = graph.toJSON()
|
||||
tabDeviceNum.value = 0
|
||||
for(let i = 0; i < json.cells.length; i++){
|
||||
if(json.cells[i].shape == 'custom-image'){
|
||||
tabDeviceNum.value++
|
||||
}
|
||||
}
|
||||
antvStatus.value = '编辑设备'
|
||||
saveDesign(false)
|
||||
}
|
||||
|
||||
@ -1251,6 +1294,14 @@ function closeMaterialModel(e:any){ // 关闭物料信息弹窗
|
||||
let retrievedNode:any = graph.getCellById(nodeId.value)
|
||||
retrievedNode.store.data.materialInfo = e
|
||||
saveDesign(false)
|
||||
let json = graph.toJSON()
|
||||
tabDeviceNum.value = 0
|
||||
for(let i = 0; i < json.cells.length; i++){
|
||||
if(json.cells[i].shape == 'custom-image'){
|
||||
tabDeviceNum.value++
|
||||
}
|
||||
}
|
||||
antvStatus.value = '编辑物料信息'
|
||||
isMaterialModel.value = false;
|
||||
}
|
||||
|
||||
@ -1300,6 +1351,15 @@ function closeChangesettingsModel(e:any){ // 关闭变动设置弹窗
|
||||
selectedMaterial.value = e
|
||||
let retrievedNode:any = graph.getCellById(nodeId.value)
|
||||
retrievedNode.store.data.changesettings = e
|
||||
saveDesign(false)
|
||||
let json = graph.toJSON()
|
||||
tabDeviceNum.value = 0
|
||||
for(let i = 0; i < json.cells.length; i++){
|
||||
if(json.cells[i].shape == 'custom-image'){
|
||||
tabDeviceNum.value++
|
||||
}
|
||||
}
|
||||
antvStatus.value = '编辑变动设置'
|
||||
isChangesettings.value = false;
|
||||
}
|
||||
|
||||
@ -1491,6 +1551,9 @@ function saveDesign(is:any) { // 保存设计
|
||||
});
|
||||
}
|
||||
});
|
||||
if(is == true){
|
||||
antvStatus.value = '完成保存'
|
||||
}
|
||||
// 返回保存的数据
|
||||
return saveData
|
||||
} catch (error) {
|
||||
@ -1724,10 +1787,10 @@ function getName(code:any) {
|
||||
return name = "氧化铀密度(g/cm3)";
|
||||
break;
|
||||
case 'u_enrichment':
|
||||
return name = "铀富集度(%)";
|
||||
return name = "铀富集度";
|
||||
break;
|
||||
case 'uEnrichment':
|
||||
return name = "铀富集度(%)";
|
||||
return name = "铀富集度";
|
||||
break;
|
||||
case 'pu_concentration':
|
||||
return name = "钚浓度(g/L)";
|
||||
@ -1742,10 +1805,10 @@ function getName(code:any) {
|
||||
return name = "氧化钚密度(g/cm3)";
|
||||
break;
|
||||
case 'pu_isotope':
|
||||
return name = "钚同位素比例(PU-240占比)%";
|
||||
return name = "钚同位素比例(PU-240占比)";
|
||||
break;
|
||||
case 'puIsotope':
|
||||
return name = "钚同位素比例(PU-240占比)%";
|
||||
return name = "钚同位素比例(PU-240占比)";
|
||||
break;
|
||||
case 'hno3_acidity':
|
||||
return name = "硝酸酸度(mol/L)";
|
||||
@ -1760,16 +1823,16 @@ function getName(code:any) {
|
||||
return name = "草酸浓度(mol/L)";
|
||||
break;
|
||||
case 'organic_ratio':
|
||||
return name = "有机相比例%";
|
||||
return name = "有机相比例";
|
||||
break;
|
||||
case 'organicRatio':
|
||||
return name = "有机相比例%";
|
||||
return name = "有机相比例";
|
||||
break;
|
||||
case 'moisture_content':
|
||||
return name = "含水率%";
|
||||
return name = "含水率";
|
||||
break;
|
||||
case 'moistureContent':
|
||||
return name = "含水率%";
|
||||
return name = "含水率";
|
||||
break;
|
||||
default:
|
||||
return name = "";
|
||||
@ -1902,6 +1965,13 @@ function getName(code:any) {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tab-device-num">
|
||||
<div style="margin-left: 10px; margin-right: 10px;"> 设备数量:<span style="color: #0089ff;">{{ tabDeviceNum }}个</span></div>
|
||||
<div> 完成操作:
|
||||
<span style="color: #0089ff;" v-if="antvStatus=='初始化'">{{ antvStatus }}</span>
|
||||
<span style="color: red;" v-else>{{ antvStatus }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Createscenario v-if="dialogVisible" :projectInfo="projectInfo" @closeCreatescenario ="closeCreatescenario"/>
|
||||
<el-dialog v-model="isScenario" :close-on-click-modal="false"
|
||||
@ -1912,12 +1982,12 @@ function getName(code:any) {
|
||||
<el-dialog v-model="isAdddevice" :close-on-click-modal="false"
|
||||
:modal="false" draggable :before-close="dialogAdddevice" title="添加设备"
|
||||
append-to-body width="1050px">
|
||||
<AdddeviceModel v-if="isAdddevice == true" :deviceId="nodeId" :projectInfo="projectInfo"
|
||||
<AdddeviceModel v-if="isAdddevice == true" :deviceId="nodeId" :projectInfo="projectInfo" :sizeSchemaInfo="sizeSchemaInfo"
|
||||
:deviceTypetype="deviceTypetype" ref="Adddevice" @closeAdddevice="closeAdddevice"/>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="isEditdevice" :close-on-click-modal="false" :modal="false" draggable :before-close="dialogEditdevice" title="设备信息" append-to-body width="1050px">
|
||||
<EditdeviceModel v-if="isEditdevice == true" :deviceId="nodeId" :deviceInfo="deviceInfo"
|
||||
<EditdeviceModel v-if="isEditdevice == true" :deviceId="nodeId" :deviceInfo="deviceInfo" :sizeSchemaInfo="sizeSchemaInfo"
|
||||
:deviceTypetype="deviceTypetype" ref="Editdevice" @closeEditdevice="closeEditdevice"/>
|
||||
</el-dialog>
|
||||
|
||||
@ -1928,7 +1998,8 @@ function getName(code:any) {
|
||||
|
||||
|
||||
<el-dialog v-model="isChangesettings" :close-on-click-modal="false" :modal="false" draggable :before-close="dialogChangesettings" title="变动设置" append-to-body width="1014px">
|
||||
<ChangesettingsModels v-if="isChangesettings == true" :materialId="nodeId" :projectInfo="projectInfo" :changesettingsData="changesettingsData"
|
||||
<ChangesettingsModels v-if="isChangesettings == true" :materialId="nodeId" :projectInfo="projectInfo"
|
||||
:changesettingsData="changesettingsData" :sizeSchemaInfo="sizeSchemaInfo"
|
||||
:materialInfo="materialInfo" :deviceInfo="deviceInfo" ref="ChangesettingsModel" @closeChangesettingsModel="closeChangesettingsModel"/>
|
||||
</el-dialog>
|
||||
|
||||
@ -2295,4 +2366,18 @@ function getName(code:any) {
|
||||
.x6-widget-stencil .x6-node.x6-node-immovable{
|
||||
cursor: pointer;
|
||||
}
|
||||
.tab-device-num{
|
||||
position: absolute;
|
||||
left: 300px;
|
||||
bottom: 0px;
|
||||
font-size: 14px;
|
||||
color: #808080;
|
||||
width: calc(100% - 300px);
|
||||
height: 60px;
|
||||
border-top: 1px solid #cfcfcf;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
/* justify-content: center; */
|
||||
}
|
||||
</style>
|
||||
@ -56,7 +56,11 @@ function confirmClick(formEl: any) {
|
||||
uEnrichment: info.value.uEnrichment,
|
||||
puConcentration: info.value.puConcentration,
|
||||
puo2Density: info.value.puo2Density,
|
||||
puIsotope: info.value.puIsotope,
|
||||
ePu238: info.value.ePu238,
|
||||
ePu239: info.value.ePu239,
|
||||
ePu240: info.value.ePu240,
|
||||
ePu241: info.value.ePu241,
|
||||
ePu242: info.value.ePu242,
|
||||
hno3Acidity: info.value.hno3Acidity,
|
||||
h2c2o4Concentration: info.value.h2c2o4Concentration,
|
||||
organicRatio: info.value.organicRatio,
|
||||
@ -176,7 +180,7 @@ function handleClick(item:any, index:any){
|
||||
value: item.uo2Density,
|
||||
unit: "",
|
||||
},{
|
||||
key: "铀富集度(%)",
|
||||
key: "铀富集度",
|
||||
value: item.uEnrichment,
|
||||
unit: "",
|
||||
},{
|
||||
@ -188,8 +192,24 @@ function handleClick(item:any, index:any){
|
||||
value: item.puo2Density,
|
||||
unit: "",
|
||||
},{
|
||||
key: "钚同位素比例(PU-240占比)%",
|
||||
value: item.puIsotope,
|
||||
key: "PU-238占比",
|
||||
value: item.ePu238,
|
||||
unit: "",
|
||||
},{
|
||||
key: "PU-239占比",
|
||||
value: item.ePu239,
|
||||
unit: "",
|
||||
},{
|
||||
key: "PU-240占比",
|
||||
value: item.ePu240,
|
||||
unit: "",
|
||||
},{
|
||||
key: "PU-241占比",
|
||||
value: item.ePu241,
|
||||
unit: "",
|
||||
},{
|
||||
key: "PU-242占比",
|
||||
value: item.ePu242,
|
||||
unit: "",
|
||||
},{
|
||||
key: "硝酸酸度(mol/L)",
|
||||
@ -200,11 +220,11 @@ function handleClick(item:any, index:any){
|
||||
value: item.h2c2o4Concentration,
|
||||
unit: "",
|
||||
},{
|
||||
key: "有机相比例%",
|
||||
key: "有机相比例",
|
||||
value: item.organicRatio,
|
||||
unit: "",
|
||||
},{
|
||||
key: "含水率%",
|
||||
key: "含水率",
|
||||
value: item.moistureContent,
|
||||
unit: "",
|
||||
})
|
||||
@ -234,7 +254,11 @@ function confirmMaterial(){
|
||||
uEnrichment: selectedMaterial.value.uEnrichment,
|
||||
puConcentration: selectedMaterial.value.puConcentration,
|
||||
puo2Density: selectedMaterial.value.puo2Density,
|
||||
puIsotope: selectedMaterial.value.puIsotope,
|
||||
ePu238: selectedMaterial.value.ePu238,
|
||||
ePu239: selectedMaterial.value.ePu239,
|
||||
ePu240: selectedMaterial.value.ePu240,
|
||||
ePu241: selectedMaterial.value.ePu241,
|
||||
ePu242: selectedMaterial.value.ePu242,
|
||||
hno3Acidity: selectedMaterial.value.hno3Acidity,
|
||||
h2c2o4Concentration: selectedMaterial.value.h2c2o4Concentration,
|
||||
organicRatio: selectedMaterial.value.organicRatio,
|
||||
@ -275,7 +299,7 @@ function confirmMaterial(){
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="materialmodel_dialog_display">
|
||||
<el-form-item label="铀富集度(%)" prop="uEnrichment">
|
||||
<el-form-item label="铀富集度" prop="uEnrichment">
|
||||
<el-input v-model="info.uEnrichment" style="width: 100%" placeholder="" @input="handleNumberInput('uEnrichment')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="钚浓度(g/L)" prop="puConcentration">
|
||||
@ -286,10 +310,28 @@ function confirmMaterial(){
|
||||
<el-form-item label="氧化钚密度(g/cm3)" prop="puo2Density">
|
||||
<el-input v-model="info.puo2Density" style="width: 100%" placeholder="" @input="handleNumberInput('puo2Density')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="钚同位素比例(PU-240占比)%" prop="puIsotope">
|
||||
<el-input v-model="info.puIsotope" style="width: 100%" placeholder="" @input="handleNumberInput('puIsotope')"></el-input>
|
||||
<el-form-item label="PU-238占比" prop="ePu238">
|
||||
<el-input v-model="info.ePu238" style="width: 100%" placeholder="" @input="handleNumberInput('ePu238')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="materialmodel_dialog_display">
|
||||
<el-form-item label="PU-239占比" prop="ePu239">
|
||||
<el-input v-model="info.ePu239" style="width: 100%" placeholder="" @input="handleNumberInput('ePu239')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="PU-240占比" prop="ePu240">
|
||||
<el-input v-model="info.ePu240" style="width: 100%" placeholder="" @input="handleNumberInput('ePu240')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="materialmodel_dialog_display">
|
||||
<el-form-item label="PU-241占比" prop="ePu241">
|
||||
<el-input v-model="info.ePu241" style="width: 100%" placeholder="" @input="handleNumberInput('ePu241')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="PU-242占比" prop="ePu242">
|
||||
<el-input v-model="info.ePu242" style="width: 100%" placeholder="" @input="handleNumberInput('ePu242')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="materialmodel_dialog_display">
|
||||
<el-form-item label="硝酸酸度(mol/L)" prop="hno3Acidity">
|
||||
<el-input v-model="info.hno3Acidity" style="width: 100%" placeholder="" @input="handleNumberInput('hno3Acidity')"></el-input>
|
||||
@ -299,10 +341,10 @@ function confirmMaterial(){
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="materialmodel_dialog_display">
|
||||
<el-form-item label="有机相比例%" prop="organicRatio">
|
||||
<el-form-item label="有机相比例" prop="organicRatio">
|
||||
<el-input v-model="info.organicRatio" style="width: 100%" placeholder="" @input="handleNumberInput('organicRatio')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="含水率%" prop="moistureContent">
|
||||
<el-form-item label="含水率" prop="moistureContent">
|
||||
<el-input v-model="info.moistureContent" style="width: 100%" placeholder="" @input="handleNumberInput('moistureContent')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@ -111,14 +111,14 @@ function downloadFile(obj :any, name :any, suffix :any) {
|
||||
<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,'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,'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-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>
|
||||
|
||||
@ -14,9 +14,10 @@ import {
|
||||
Snapline,
|
||||
Transform
|
||||
} from '@antv/x6'
|
||||
import { getDictItemById } from '@/api/dict';
|
||||
// @ts-ignore
|
||||
import { updateProjects,projectsById} from "@/api/business/project";
|
||||
|
||||
import { sizeSchemaAll } from "@/api/business/database/device";
|
||||
import { getByScenario } from "@/api/business/scenario";
|
||||
import textimg from '@/assets/x6/text.png'
|
||||
import echartsimg from '@/assets/x6/charts.png'
|
||||
@ -44,6 +45,59 @@ const props = defineProps({
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
const menuData:any = ref([])
|
||||
|
||||
// 查询字典项
|
||||
function menuInit() {
|
||||
let params = {
|
||||
dictId: 'fe2c3418b8998f4e64d56ab46bfe0fed',
|
||||
size:99,
|
||||
current:1
|
||||
}
|
||||
getDictItemById(params).then((result: any) => {
|
||||
|
||||
menuData.value = result.data.records;
|
||||
getSizeSchemaList()
|
||||
}).catch((err: any) => {
|
||||
});
|
||||
}
|
||||
|
||||
//获取所有项目列表
|
||||
const sizeSchemaInfo:any = ref({});
|
||||
function getDeviceTypeName(deviceType:any){
|
||||
let name:any = ""
|
||||
for(let i = 0;i<menuData.value.length;i++){
|
||||
if(menuData.value[i].itemCode == deviceType){
|
||||
name = menuData.value[i].dictName
|
||||
}
|
||||
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
async function getSizeSchemaList(){
|
||||
let result:any = await sizeSchemaAll({})
|
||||
for(let item in result){
|
||||
result[item].deviceTypeName = getDeviceTypeName(result[item].deviceType)
|
||||
result[item].fields.forEach((items:any) => {
|
||||
items.name = items.label
|
||||
items.code = items.key
|
||||
items.checked = false
|
||||
items.deviceType = result[item].deviceType,
|
||||
items.deviceTypeName = getDeviceTypeName(result[item].deviceType)
|
||||
})
|
||||
// item.checked = true
|
||||
// item.fields.forEach((items:any) => {
|
||||
// items.checked = true
|
||||
// }
|
||||
// })
|
||||
}
|
||||
sizeSchemaInfo.value = result
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const sliderIndex = ref<any>(0) // 选中时间
|
||||
const sliderValues = ref<any>([]) // 时间轴
|
||||
const deviceTypetype:any = ref('') // 设备类型
|
||||
@ -154,6 +208,7 @@ function addAttrText(item:any,index:any,useData:any){
|
||||
let tempData:any = []
|
||||
if(item.scenarioResults[index].attrState){
|
||||
let attrState = JSON.parse(item.scenarioResults[index].attrState)
|
||||
debugger
|
||||
for (const key in attrState) {
|
||||
if (!Object.hasOwn(attrState, key)) continue;
|
||||
const element = attrState[key];
|
||||
@ -200,7 +255,7 @@ function getName(code:any) {
|
||||
return name = "氧化铀密度(g/cm3)";
|
||||
break;
|
||||
case 'u_enrichment':
|
||||
return name = "铀富集度(%)";
|
||||
return name = "铀富集度";
|
||||
break;
|
||||
case 'pu_concentration':
|
||||
return name = "钚浓度(g/L)";
|
||||
@ -209,7 +264,7 @@ function getName(code:any) {
|
||||
return name = "氧化钚密度(g/cm3)";
|
||||
break;
|
||||
case 'pu_isotope':
|
||||
return name = "钚同位素比例(PU-240占比)%";
|
||||
return name = "钚同位素比例(PU-240占比)";
|
||||
break;
|
||||
case 'hno3_acidity':
|
||||
return name = "硝酸酸度(mol/L)";
|
||||
@ -218,10 +273,10 @@ function getName(code:any) {
|
||||
return name = "草酸浓度(mol/L)";
|
||||
break;
|
||||
case 'organic_ratio':
|
||||
return name = "有机相比例%";
|
||||
return name = "有机相比例";
|
||||
break;
|
||||
case 'moisture_content':
|
||||
return name = "含水率%";
|
||||
return name = "含水率";
|
||||
break;
|
||||
default:
|
||||
return name = "";
|
||||
@ -296,7 +351,7 @@ function groupByDeviceId(data:any) { // 按设备id分组
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
menuInit()
|
||||
scenarioId.value = props.scenarioId
|
||||
// #region 初始化画布
|
||||
graph = new Graph({
|
||||
@ -804,10 +859,26 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗
|
||||
|
||||
function confirmClick(){
|
||||
let tempData:any = []
|
||||
for(let i = 0;i<deviceList.value.length;i++){
|
||||
if(deviceList.value[i].checked){
|
||||
tempData.push(deviceList.value[i].code)
|
||||
// for(let i = 0;i<deviceList.value.length;i++){
|
||||
// if(deviceList.value[i].checked){
|
||||
// tempData.push(deviceList.value[i].code)
|
||||
// }
|
||||
// }
|
||||
|
||||
// items.name = items.label
|
||||
// items.code = items.key
|
||||
// items.checked = false
|
||||
// items.deviceType = result[item].deviceType,
|
||||
// items.deviceTypeName = getDeviceTypeName(result[item].deviceType)
|
||||
|
||||
|
||||
|
||||
for(let item in sizeSchemaInfo.value){
|
||||
sizeSchemaInfo.value[item].fields.forEach((items:any) => {
|
||||
if(items.checked == true){
|
||||
tempData.push(items.deviceType+items.code)
|
||||
}
|
||||
})
|
||||
}
|
||||
for(let i = 0;i<materialList.value.length;i++){
|
||||
if(materialList.value[i].checked){
|
||||
@ -883,9 +954,24 @@ function dialogAttributeDialog(){ // 关闭变动设置弹窗
|
||||
</div>
|
||||
<div style="width: 100%; height: calc(100vh - 300px);overflow: auto;">
|
||||
<div class="deviceList-box" v-if="isTab == 0">
|
||||
<div v-for="(item,index) in deviceList" :key="index" class="deviceList-li">
|
||||
<el-checkbox v-model="item.checked" :label="item.name"></el-checkbox>
|
||||
|
||||
<div v-for="(item,index) in sizeSchemaInfo" :key="index">
|
||||
<div class="deviceList-li">
|
||||
{{item.deviceTypeName}}({{item.deviceType}})
|
||||
</div>
|
||||
|
||||
<div v-for="(items,index) in item.fields" :key="index" class="deviceList-li">
|
||||
<el-checkbox v-model="items.checked" :label="items.name"></el-checkbox>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div v-for="(item,index) in deviceList" :key="index" class="deviceList-li">
|
||||
<el-checkbox v-model="item.checked" :label="item.name"></el-checkbox>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="deviceList-box" v-if="isTab == 1">
|
||||
<div v-for="(item,index) in materialList" :key="index" class="deviceList-li">
|
||||
|
||||
@ -7,7 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, nextTick } from "vue";
|
||||
import { ElForm, ElMessage, ElMessageBox } from "element-plus";
|
||||
import { searchCriticalDataPage,addCriticalData,updateCriticalData,deleteCriticalData,deleteBatchCriticalData} from "@/api/business/database/criticalData";
|
||||
import { searchCriticalDataPage,addCriticalData,updateCriticalData,deleteCriticalData,deleteBatchCriticalData,exportAllExports} from "@/api/business/database/criticalData";
|
||||
import { getDictItemById } from '@/api/dict';
|
||||
import { sizeSchemaAll } from "@/api/business/database/device";
|
||||
|
||||
@ -309,6 +309,25 @@ onMounted(() => {
|
||||
getSizeSchemaList()
|
||||
menuInit()
|
||||
});
|
||||
|
||||
|
||||
function exportExportsClick(){
|
||||
exportAllExports(queryParams.value.type).then((response:any) => {
|
||||
downloadFile(response, '临界数据数据' , 'xlsx')
|
||||
});
|
||||
}
|
||||
function downloadFile(obj :any, name :any, suffix :any) {
|
||||
const url = window.URL.createObjectURL(new Blob([obj]))
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
const fileName = name.trim() + '.' + suffix
|
||||
link.setAttribute('download', fileName)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -343,6 +362,7 @@ onMounted(() => {
|
||||
:on-error="handleError">
|
||||
<el-button type="primary" style="margin: 0 10px;" v-hasPerm="['criticalData:import']">导入</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" @click="exportExportsClick">导出</el-button>
|
||||
<el-button :type="multipleSelection.length > 0 ? 'primary' : ''"
|
||||
:disabled="multipleSelection.length <= 0" @click="delClick" v-hasPerm="['criticalData:del']">删除</el-button>
|
||||
</div>
|
||||
@ -388,7 +408,7 @@ onMounted(() => {
|
||||
:modal="false" draggable :before-close="handleClose" :title="title"
|
||||
append-to-body width="677px" height="530px">
|
||||
|
||||
<el-form ref="infoForm" :model="info" :rules="rules" label-width="100px" >
|
||||
<el-form ref="infoForm" :model="info" :rules="rules" label-width="100px" style="height: calc(100vh - 160px);overflow: auto;">
|
||||
<el-form-item :label="item.label" style="width: 100%;" v-for="item in sourceTempData">
|
||||
<el-input-number
|
||||
placeholder="请输入长度"
|
||||
|
||||
@ -7,7 +7,8 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, nextTick } from "vue";
|
||||
import { ElForm, ElMessage, ElMessageBox } from "element-plus";
|
||||
import { searchDevicesPage,addDevices,updateDevices,deleteDevices,deleteBatchDevices,sizeSchemaAll} from "@/api/business/database/device";
|
||||
import { searchDevicesPage,addDevices,updateDevices,deleteDevices,deleteBatchDevices,sizeSchemaAll,
|
||||
exportAllExports} from "@/api/business/database/device";
|
||||
import { getDictItemById } from '@/api/dict';
|
||||
import Page from '@/components/Pagination/page.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
@ -327,6 +328,24 @@ const handleInput = (val: string) => {
|
||||
val = value.slice(0, -1);
|
||||
}
|
||||
};
|
||||
|
||||
function exportExportsClick(){
|
||||
exportAllExports(queryParams.value.type).then((response:any) => {
|
||||
downloadFile(response, '设备数据' , 'xlsx')
|
||||
});
|
||||
}
|
||||
function downloadFile(obj :any, name :any, suffix :any) {
|
||||
const url = window.URL.createObjectURL(new Blob([obj]))
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
const fileName = name.trim() + '.' + suffix
|
||||
link.setAttribute('download', fileName)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -356,7 +375,7 @@ const handleInput = (val: string) => {
|
||||
accept=".xlsx,.xls" v-hasPerm="['device:import']"
|
||||
class="upload-demo"
|
||||
:data="{deviceType: queryParams.type}"
|
||||
:action=" url + '/devices/import' "
|
||||
:action=" url + '/devices/v2/import' "
|
||||
:headers="{ token: getToken() }"
|
||||
:show-file-list="false"
|
||||
:before-upload="handlePreview"
|
||||
@ -364,6 +383,7 @@ const handleInput = (val: string) => {
|
||||
:on-error="handleError">
|
||||
<el-button type="primary" style="margin: 0 10px;">导入</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" @click="exportExportsClick">导出</el-button>
|
||||
<el-button :type="multipleSelection.length > 0 ? 'primary' : ''" v-hasPerm="['device:del']"
|
||||
:disabled="multipleSelection.length <= 0" @click="delClick">删除</el-button>
|
||||
</div>
|
||||
|
||||
@ -7,7 +7,7 @@ export default {
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, nextTick } from "vue";
|
||||
import { ElForm, ElMessage, ElMessageBox } from "element-plus";
|
||||
import { searchMaterialsPage,addMaterials,updateMaterials,deleteMaterials,deleteBatchMaterials} from "@/api/business/database/material";
|
||||
import { searchMaterialsPage,addMaterials,updateMaterials,deleteMaterials,deleteBatchMaterials,exportAllExports} from "@/api/business/database/material";
|
||||
import Page from '@/components/Pagination/page.vue'
|
||||
import { getToken } from '@/utils/auth'
|
||||
const url = import.meta.env.VITE_APP_BASE_API;
|
||||
@ -301,6 +301,23 @@ function handleError(file: any){
|
||||
onMounted(() => {
|
||||
gettableData();
|
||||
});
|
||||
function exportExportsClick(){
|
||||
exportAllExports().then((response:any) => {
|
||||
downloadFile(response, '物料数据' , 'xlsx')
|
||||
});
|
||||
}
|
||||
function downloadFile(obj :any, name :any, suffix :any) {
|
||||
const url = window.URL.createObjectURL(new Blob([obj]))
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = url
|
||||
const fileName = name.trim() + '.' + suffix
|
||||
link.setAttribute('download', fileName)
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -327,6 +344,7 @@ onMounted(() => {
|
||||
:on-error="handleError">
|
||||
<el-button type="primary" style="margin: 0 10px;" v-hasPerm="['material:import']">导入</el-button>
|
||||
</el-upload>
|
||||
<el-button type="primary" @click="exportExportsClick">导出</el-button>
|
||||
<el-button :type="multipleSelection.length > 0 ? 'primary' : ''"
|
||||
:disabled="multipleSelection.length <= 0" @click="delClick" v-hasPerm="['material:del']">删除</el-button>
|
||||
</div>
|
||||
@ -381,7 +399,7 @@ onMounted(() => {
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="Materials_dialog_display">
|
||||
<el-form-item label="铀富集度(%)" prop="uEnrichment">
|
||||
<el-form-item label="铀富集度" prop="uEnrichment">
|
||||
<el-input v-model="info.uEnrichment" style="width: 100%" placeholder="" @input="handleNumberInput('uEnrichment')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="钚浓度(g/L)" prop="puConcentration">
|
||||
@ -392,10 +410,31 @@ onMounted(() => {
|
||||
<el-form-item label="氧化钚密度(g/cm3)" prop="puo2Density">
|
||||
<el-input v-model="info.puo2Density" style="width: 100%" placeholder="" @input="handleNumberInput('puo2Density')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="钚同位素比例(PU-240占比)%" prop="puIsotope">
|
||||
<el-input v-model="info.puIsotope" style="width: 100%" placeholder="" @input="handleNumberInput('puIsotope')"></el-input>
|
||||
<el-form-item label="PU-238占比" prop="puIsotope">
|
||||
<el-input v-model="info.ePu238" style="width: 100%" placeholder="" @input="handleNumberInput('ePu238')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="Materials_dialog_display">
|
||||
<el-form-item label="PU-239占比" prop="puIsotope">
|
||||
<el-input v-model="info.ePu239" style="width: 100%" placeholder="" @input="handleNumberInput('ePu239')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="PU-240占比" prop="puIsotope">
|
||||
<el-input v-model="info.ePu240" style="width: 100%" placeholder="" @input="handleNumberInput('ePu240')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="Materials_dialog_display">
|
||||
<el-form-item label="PU-241占比" prop="puIsotope">
|
||||
<el-input v-model="info.ePu241" style="width: 100%" placeholder="" @input="handleNumberInput('ePu241')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="PU-242占比" prop="puIsotope">
|
||||
<el-input v-model="info.ePu242" style="width: 100%" placeholder="" @input="handleNumberInput('ePu242')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="Materials_dialog_display">
|
||||
<el-form-item label="硝酸酸度(mol/L)" prop="hno3Acidity">
|
||||
<el-input v-model="info.hno3Acidity" style="width: 100%" placeholder="" @input="handleNumberInput('hno3Acidity')"></el-input>
|
||||
@ -405,10 +444,10 @@ onMounted(() => {
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="Materials_dialog_display">
|
||||
<el-form-item label="有机相比例%" prop="organicRatio">
|
||||
<el-form-item label="有机相比例" prop="organicRatio">
|
||||
<el-input v-model="info.organicRatio" style="width: 100%" placeholder="" @input="handleNumberInput('organicRatio')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="含水率%" prop="moistureContent">
|
||||
<el-form-item label="含水率" prop="moistureContent">
|
||||
<el-input v-model="info.moistureContent" style="width: 100%" placeholder="" @input="handleNumberInput('moistureContent')"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user