diff --git a/business-css/frontend/public/assets/8.png b/business-css/frontend/public/assets/8.png new file mode 100644 index 0000000..2648c80 Binary files /dev/null and b/business-css/frontend/public/assets/8.png differ diff --git a/business-css/frontend/public/assets/88.png b/business-css/frontend/public/assets/88.png new file mode 100644 index 0000000..85d3f2f Binary files /dev/null and b/business-css/frontend/public/assets/88.png differ diff --git a/business-css/frontend/public/assets/9.png b/business-css/frontend/public/assets/9.png new file mode 100644 index 0000000..5840bc7 Binary files /dev/null and b/business-css/frontend/public/assets/9.png differ diff --git a/business-css/frontend/public/assets/99.png b/business-css/frontend/public/assets/99.png new file mode 100644 index 0000000..5d15799 Binary files /dev/null and b/business-css/frontend/public/assets/99.png differ 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 08b560a..c548fff 100644 --- a/business-css/frontend/src/api/business/database/material/index.ts +++ b/business-css/frontend/src/api/business/database/material/index.ts @@ -70,3 +70,12 @@ export function exportAllExports(){ responseType: 'arraybuffer' }); } + +//查看物料 +export function materialsById (id:any){ + return request({ + url:'/materials/'+id , + method: 'get' + // params: queryParams + }); +} \ No newline at end of file diff --git a/business-css/frontend/src/components/antvx6/index.vue b/business-css/frontend/src/components/antvx6/index.vue index 62fe624..56046ae 100644 --- a/business-css/frontend/src/components/antvx6/index.vue +++ b/business-css/frontend/src/components/antvx6/index.vue @@ -385,20 +385,22 @@ onMounted(() => { node.attr('label/refY', 140) node.attr('label/refX', width/2) node.attr('label/textAnchor', 'middle') - }else if(node.store.data.attrs.text.text == '萃取柱'){ - deviceTypetype.value = 'ExtractionColumn' + } + // else if(node.store.data.attrs.text.text == '萃取柱'){ + // deviceTypetype.value = 'ExtractionColumn' - node.size(30, 140) - const width = node.size().width - node.attr('image/xlink:href', '/assets/55.png') - node.attr('image/width', 30) - node.attr('image/height', 135) - node.attr('label/refY', 140) - node.attr('label/refX', width/2) - node.attr('label/textAnchor', 'middle') + // node.size(30, 140) + // const width = node.size().width + // node.attr('image/xlink:href', '/assets/55.png') + // node.attr('image/width', 30) + // node.attr('image/height', 135) + // node.attr('label/refY', 140) + // node.attr('label/refX', width/2) + // node.attr('label/textAnchor', 'middle') - }else if(node.store.data.attrs.text.text == '流化床'){ + // } + else if(node.store.data.attrs.text.text == '流化床'){ deviceTypetype.value = 'FluidizedBed' node.size(60, 140) const width = node.size().width @@ -418,6 +420,26 @@ onMounted(() => { node.attr('label/refY', 140) node.attr('label/refX', width/2) node.attr('label/textAnchor', 'middle') + }else if(node.store.data.attrs.text.text == '圆柱脉冲柱'){ + deviceTypetype.value = 'PulsedCylindricalColumn' + node.size(30, 140) + const width = node.size().width + node.attr('image/xlink:href', '/assets/88.png') + node.attr('image/width', 30) + node.attr('image/height', 135) + node.attr('label/refY', 140) + node.attr('label/refX', width/2) + node.attr('label/textAnchor', 'middle') + }else if(node.store.data.attrs.text.text == '环形脉冲柱'){ + deviceTypetype.value = 'PulsedAnnularColumn' + node.size(40, 140) + const width = node.size().width + node.attr('image/xlink:href', '/assets/99.png') + node.attr('image/width', 40) + node.attr('image/height', 135) + node.attr('label/refY', 140) + node.attr('label/refX', width/2) + node.attr('label/textAnchor', 'middle') } // 设置固定大小 @@ -803,16 +825,22 @@ graph.on('blank:mouseup', (e) => { label: '管束槽', image: '/assets/4.png', }, - { - label: '萃取柱', - image: '/assets/5.png', - }, + // { + // label: '萃取柱', + // image: '/assets/5.png', + // }, { label: '流化床', image: '/assets/6.png', },{ label: '锥底环形槽', image: '/assets/7.png', + },{ + label: '圆柱脉冲柱', + image: '/assets/8.png', + },{ + label: '环形脉冲柱', + image: '/assets/9.png', }, ] const imageNodes = imageShapes.map((item) => @@ -1289,7 +1317,7 @@ function closeMaterialModel(e:any){ // 关闭物料信息弹窗 isMaterialModel.value = false; return } - + selectedMaterial.value = e let retrievedNode:any = graph.getCellById(nodeId.value) retrievedNode.store.data.materialInfo = e diff --git a/business-css/frontend/src/components/antvx6/materialmodel.vue b/business-css/frontend/src/components/antvx6/materialmodel.vue index 1cf1f71..7a5d1f4 100644 --- a/business-css/frontend/src/components/antvx6/materialmodel.vue +++ b/business-css/frontend/src/components/antvx6/materialmodel.vue @@ -7,7 +7,7 @@ export default { @@ -282,7 +312,7 @@ function confirmMaterial(){ - + 选择物料 @@ -348,6 +378,31 @@ function confirmMaterial(){ + + + + + + + + + + + 物料图片 + + + + 成分名称 @@ -397,11 +452,11 @@ function confirmMaterial(){ - + 确 定 - + 成分名称 成分参数 @@ -416,8 +471,30 @@ function confirmMaterial(){ {{ item.value }} + + 图片 + + + + + + @@ -635,7 +712,37 @@ function confirmMaterial(){ .materialmodel-dialog-box.el-dialog .el-dialog__body{ padding: 0 !important; } +.materialmodel-iconBase64 img{ + max-width: 200px; + max-height: 80px; +} + + + - diff --git a/business-css/frontend/src/views/business/database/material/index.vue b/business-css/frontend/src/views/business/database/material/index.vue index 97a00cc..d767e93 100644 --- a/business-css/frontend/src/views/business/database/material/index.vue +++ b/business-css/frontend/src/views/business/database/material/index.vue @@ -90,6 +90,7 @@ const info: any = ref({ h2c2o4Concentration: "", organicRatio: "", moistureContent: "", + iconBase64: "" }); const dialogVisible = ref(false); @@ -108,6 +109,7 @@ function addClick() { h2c2o4Concentration: "", organicRatio: "", moistureContent: "", + iconBase64: "" }; customAttrsData.value = [] dialogVisible.value = true; @@ -318,6 +320,21 @@ function downloadFile(obj :any, name :any, suffix :any) { document.body.removeChild(link) } + +function uploadIconBaseChange(file:any){ + var reader = new FileReader(); + reader.readAsDataURL(file.raw); + reader.onload = () => { + info.value.iconBase64 =reader.result + }; + reader.onerror = function(error) { + console.log("Error: ", error); + }; +} +function delIconBase(){ + info.value.iconBase64 = " " +} + @@ -451,6 +468,32 @@ function downloadFile(obj :any, name :any, suffix :any) { + + + + + + + + + + + 物料图片 + + + + + 物料成分 @@ -485,12 +528,13 @@ function downloadFile(obj :any, name :any, suffix :any) { 添加一行 - + 取 消 确 定 - @@ -761,5 +805,30 @@ function downloadFile(obj :any, name :any, suffix :any) { cursor: pointer; } - +.newavatar-uploader-icon{ + font-size: 28px; + color: #8c939d; + width: 100px; + text-align: center; +} +.newavatar-uploader-text{ + width: 100%;text-align: center;line-height: 20px; + font-family: 'Arial Normal', 'Arial'; + font-weight: 400; + font-style: normal; + font-size: 12px; + color: #949494; +} + + \ No newline at end of file diff --git a/business-css/src/main/java/com/yfd/business/css/controller/MaterialController.java b/business-css/src/main/java/com/yfd/business/css/controller/MaterialController.java index a2b54bd..e6590b9 100644 --- a/business-css/src/main/java/com/yfd/business/css/controller/MaterialController.java +++ b/business-css/src/main/java/com/yfd/business/css/controller/MaterialController.java @@ -198,7 +198,7 @@ public class MaterialController { "pu_concentration", "puo2_density", "pu_isotope", "e_pu240", "e_pu242", "e_pu241", "e_pu239", "e_pu238", "hno3_acidity", "h2c2o4_concentration", "organic_ratio", "moisture_content", - "custom_attrs", "created_at", "updated_at", "modifier" + "custom_attrs", "created_at", "updated_at", "modifier", "icon_base64" ); qw.eq("project_id", "-1"); if (name != null && !name.isEmpty()) {