From faa4b9482ac72f905f9260e444b77ab91cb5492c Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Mon, 18 May 2026 08:55:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=8D=E6=AE=B5=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=89=A9=E6=96=99=EF=BC=8C=E8=AE=A1=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/database/criticalData/index.ts | 20 +- .../src/api/business/database/device/index.ts | 23 +- .../api/business/database/material/index.ts | 23 +- .../src/components/antvx6/adddevice.vue | 558 ++++-------------- .../antvx6/changeDialogsettings.vue | 161 +++-- .../src/components/antvx6/changesettings.vue | 62 +- .../src/components/antvx6/echartsModel.vue | 8 +- .../src/components/antvx6/editdevice.vue | 377 ++---------- .../frontend/src/components/antvx6/index.vue | 119 +++- .../src/components/antvx6/materialmodel.vue | 78 ++- .../src/components/antvx6/tableModel.vue | 10 +- .../frontend/src/components/antvx6/viewx6.vue | 110 +++- .../business/database/criticalData/index.vue | 24 +- .../views/business/database/device/index.vue | 24 +- .../business/database/material/index.vue | 51 +- 15 files changed, 720 insertions(+), 928 deletions(-) diff --git a/business-css/frontend/src/api/business/database/criticalData/index.ts b/business-css/frontend/src/api/business/database/criticalData/index.ts index 3bd6a2b..5910e11 100644 --- a/business-css/frontend/src/api/business/database/criticalData/index.ts +++ b/business-css/frontend/src/api/business/database/criticalData/index.ts @@ -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' + }); +} diff --git a/business-css/frontend/src/api/business/database/device/index.ts b/business-css/frontend/src/api/business/database/device/index.ts index e7b42d4..771eb05 100644 --- a/business-css/frontend/src/api/business/database/device/index.ts +++ b/business-css/frontend/src/api/business/database/device/index.ts @@ -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' + }); +} diff --git a/business-css/frontend/src/api/business/database/material/index.ts b/business-css/frontend/src/api/business/database/material/index.ts index 908cf00..08b560a 100644 --- a/business-css/frontend/src/api/business/database/material/index.ts +++ b/business-css/frontend/src/api/business/database/material/index.ts @@ -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' + }); +} diff --git a/business-css/frontend/src/components/antvx6/adddevice.vue b/business-css/frontend/src/components/antvx6/adddevice.vue index e61b9c3..d20b391 100644 --- a/business-css/frontend/src/components/antvx6/adddevice.vue +++ b/business-css/frontend/src/components/antvx6/adddevice.vue @@ -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 } @@ -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' }"> - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -246,341 +240,25 @@ function addClick() {
+ style="width: 100%;max-height: calc(100vh - 300px);margin-top: 20px;overflow: auto;"> -
- - - - - - - - - - - - - - - -
- -
- - - - - - - - - - -
- -
- - - - - - - - - - -
- -
- - - - - - - - - - -
-
-
- - - - - - - - - - -
-
- - - - - - - - - - -
-
- - - - - - - - - - - - -
- -
- -
-
- - - - - - - - - - -
- - - - - - -
- - - - - - - - - - -
- - - -
- -
-
- - - - - - - - - - -
-
- - - - - - - - - - -
-
+ + + + + - - - + + +
+ + +
diff --git a/business-css/frontend/src/views/business/database/criticalData/index.vue b/business-css/frontend/src/views/business/database/criticalData/index.vue index 768d0fe..b07741f 100644 --- a/business-css/frontend/src/views/business/database/criticalData/index.vue +++ b/business-css/frontend/src/views/business/database/criticalData/index.vue @@ -7,7 +7,7 @@ export default {