diff --git a/.env.dev b/.env.dev index 7d633ff1..8727a59f 100644 --- a/.env.dev +++ b/.env.dev @@ -6,7 +6,7 @@ NODE_ENV = 'development' VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk' # VUE_APP_BASE_URL = 'https://www.api.aida.com.hk' # 佩佩 -# VUE_APP_BASE_URL = 'http://192.168.1.7:5567' +VUE_APP_BASE_URL = 'http://192.168.1.7:5567' # 海波 # VUE_APP_BASE_URL = 'http://192.168.1.9:5567' diff --git a/dist.7z b/dist.7z new file mode 100644 index 00000000..1a8531fe Binary files /dev/null and b/dist.7z differ diff --git a/public/index.html b/public/index.html index abd4d963..42d11a35 100644 --- a/public/index.html +++ b/public/index.html @@ -3,6 +3,7 @@ + AiDA diff --git a/src/assets/style/style.css b/src/assets/style/style.css index 966a3625..368bfd1a 100644 --- a/src/assets/style/style.css +++ b/src/assets/style/style.css @@ -10,6 +10,10 @@ body, --aida-fsize1-8: calc(1.8rem*1.2); --aida-fsize1-6: calc(1.6rem*1.2); --aida-fsize1-4: calc(1.4rem*1.2); + --antd-wave-shadow-color: #39215b; +} +::selection { + background-color: #1890ff; } input { outline: none; @@ -337,6 +341,9 @@ li { cursor: pointer; pointer-events: auto !important; } +.ant-popover-placement-top { + z-index: 9999; +} .ant-drawer { z-index: 9999; } @@ -1524,7 +1531,8 @@ textarea:focus { .design_detail_modal_component .input_border, .library_page .input_border, .productImg_modal .input_border, -.accountEdit_page .input_border { +.accountEdit_page .input_border, +.generalMenu_printModel_upload .input_border { z-index: 2; display: flex; align-items: center; @@ -1539,7 +1547,8 @@ textarea:focus { .design_detail_modal_component .input_border .input_box, .library_page .input_border .input_box, .productImg_modal .input_border .input_box, -.accountEdit_page .input_border .input_box { +.accountEdit_page .input_border .input_box, +.generalMenu_printModel_upload .input_border .input_box { position: relative; z-index: 2; flex: 1; @@ -1551,7 +1560,8 @@ textarea:focus { .design_detail_modal_component .input_border .input_box .inputShowText, .library_page .input_border .input_box .inputShowText, .productImg_modal .input_border .input_box .inputShowText, -.accountEdit_page .input_border .input_box .inputShowText { +.accountEdit_page .input_border .input_box .inputShowText, +.generalMenu_printModel_upload .input_border .input_box .inputShowText { width: 100%; display: none; } @@ -1560,11 +1570,13 @@ textarea:focus { .library_page .input_border .input_box.active .input_box_btnBox, .productImg_modal .input_border .input_box.active .input_box_btnBox, .accountEdit_page .input_border .input_box.active .input_box_btnBox, +.generalMenu_printModel_upload .input_border .input_box.active .input_box_btnBox, .collection_modal_body .input_border .input_box.active textarea, .design_detail_modal_component .input_border .input_box.active textarea, .library_page .input_border .input_box.active textarea, .productImg_modal .input_border .input_box.active textarea, -.accountEdit_page .input_border .input_box.active textarea { +.accountEdit_page .input_border .input_box.active textarea, +.generalMenu_printModel_upload .input_border .input_box.active textarea { border: 1px solid #ff0001; box-shadow: 0px 0px 3px 1px rgba(255, 0, 0, 0.2); } @@ -1572,7 +1584,8 @@ textarea:focus { .design_detail_modal_component .input_border .input_box.active span, .library_page .input_border .input_box.active span, .productImg_modal .input_border .input_box.active span, -.accountEdit_page .input_border .input_box.active span { +.accountEdit_page .input_border .input_box.active span, +.generalMenu_printModel_upload .input_border .input_box.active span { opacity: 1; display: block; color: rgba(255, 0, 0.7); @@ -1581,7 +1594,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_keyword, .library_page .input_border .search_keyword, .productImg_modal .input_border .search_keyword, -.accountEdit_page .input_border .search_keyword { +.accountEdit_page .input_border .search_keyword, +.generalMenu_printModel_upload .input_border .search_keyword { height: 0; flex-basis: 100%; } @@ -1589,7 +1603,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_keyword .search_keyword_center, .library_page .input_border .search_keyword .search_keyword_center, .productImg_modal .input_border .search_keyword .search_keyword_center, -.accountEdit_page .input_border .search_keyword .search_keyword_center { +.accountEdit_page .input_border .search_keyword .search_keyword_center, +.generalMenu_printModel_upload .input_border .search_keyword .search_keyword_center { justify-content: space-between; display: flex; width: var(--width); @@ -1607,7 +1622,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_keyword .search_keyword_center .search_keyword_center_left, .library_page .input_border .search_keyword .search_keyword_center .search_keyword_center_left, .productImg_modal .input_border .search_keyword .search_keyword_center .search_keyword_center_left, -.accountEdit_page .input_border .search_keyword .search_keyword_center .search_keyword_center_left { +.accountEdit_page .input_border .search_keyword .search_keyword_center .search_keyword_center_left, +.generalMenu_printModel_upload .input_border .search_keyword .search_keyword_center .search_keyword_center_left { display: flex; overflow: hidden; flex: 1; @@ -1617,7 +1633,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_keyword .search_keyword_center .search_keyword_center_item, .library_page .input_border .search_keyword .search_keyword_center .search_keyword_center_item, .productImg_modal .input_border .search_keyword .search_keyword_center .search_keyword_center_item, -.accountEdit_page .input_border .search_keyword .search_keyword_center .search_keyword_center_item { +.accountEdit_page .input_border .search_keyword .search_keyword_center .search_keyword_center_item, +.generalMenu_printModel_upload .input_border .search_keyword .search_keyword_center .search_keyword_center_item { border-radius: 0.4rem; border: solid 1px #39215b; background-color: #8156bd; @@ -1633,31 +1650,36 @@ textarea:focus { .design_detail_modal_component .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child, .library_page .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child, .productImg_modal .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child, -.accountEdit_page .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child { +.accountEdit_page .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child, +.generalMenu_printModel_upload .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child { margin-right: 0; } .collection_modal_body .input_border .input_box_btnBox, .design_detail_modal_component .input_border .input_box_btnBox, .library_page .input_border .input_box_btnBox, .productImg_modal .input_border .input_box_btnBox, -.accountEdit_page .input_border .input_box_btnBox { +.accountEdit_page .input_border .input_box_btnBox, +.generalMenu_printModel_upload .input_border .input_box_btnBox { border: calc(0.1rem*1.2) solid #F1F1F1; width: var(--width); display: flex; float: left; + align-items: center; } .collection_modal_body .input_border .input_box_btnBox .ant-spin-text, .design_detail_modal_component .input_border .input_box_btnBox .ant-spin-text, .library_page .input_border .input_box_btnBox .ant-spin-text, .productImg_modal .input_border .input_box_btnBox .ant-spin-text, -.accountEdit_page .input_border .input_box_btnBox .ant-spin-text { +.accountEdit_page .input_border .input_box_btnBox .ant-spin-text, +.generalMenu_printModel_upload .input_border .input_box_btnBox .ant-spin-text { font-size: 1.2rem; } .collection_modal_body .input_border .input_box_btnBox .search_seed, .design_detail_modal_component .input_border .input_box_btnBox .search_seed, .library_page .input_border .input_box_btnBox .search_seed, .productImg_modal .input_border .input_box_btnBox .search_seed, -.accountEdit_page .input_border .input_box_btnBox .search_seed { +.accountEdit_page .input_border .input_box_btnBox .search_seed, +.generalMenu_printModel_upload .input_border .input_box_btnBox .search_seed { padding: 0; width: 4rem; text-align: center; @@ -1668,7 +1690,8 @@ textarea:focus { .design_detail_modal_component .input_border .upload_item .upload_file_item, .library_page .input_border .upload_item .upload_file_item, .productImg_modal .input_border .upload_item .upload_file_item, -.accountEdit_page .input_border .upload_item .upload_file_item { +.accountEdit_page .input_border .upload_item .upload_file_item, +.generalMenu_printModel_upload .input_border .upload_item .upload_file_item { width: 8rem; height: 8rem; } @@ -1676,7 +1699,8 @@ textarea:focus { .design_detail_modal_component .input_border input, .library_page .input_border input, .productImg_modal .input_border input, -.accountEdit_page .input_border input { +.accountEdit_page .input_border input, +.generalMenu_printModel_upload .input_border input { width: 100%; border-radius: calc(0.5rem*1.2); border: 1px solid rgba(0, 0, 0, 0.15); @@ -1689,42 +1713,48 @@ textarea:focus { .design_detail_modal_component .input_border inputinput:-moz-placeholder, .library_page .input_border inputinput:-moz-placeholder, .productImg_modal .input_border inputinput:-moz-placeholder, -.accountEdit_page .input_border inputinput:-moz-placeholder { +.accountEdit_page .input_border inputinput:-moz-placeholder, +.generalMenu_printModel_upload .input_border inputinput:-moz-placeholder { color: rgba(0, 0, 0, 0.15); } .collection_modal_body .input_border inputinput:-ms-input-placeholder, .design_detail_modal_component .input_border inputinput:-ms-input-placeholder, .library_page .input_border inputinput:-ms-input-placeholder, .productImg_modal .input_border inputinput:-ms-input-placeholder, -.accountEdit_page .input_border inputinput:-ms-input-placeholder { +.accountEdit_page .input_border inputinput:-ms-input-placeholder, +.generalMenu_printModel_upload .input_border inputinput:-ms-input-placeholder { color: rgba(0, 0, 0, 0.15); } .collection_modal_body .input_border inputinput::-webkit-input-placeholder, .design_detail_modal_component .input_border inputinput::-webkit-input-placeholder, .library_page .input_border inputinput::-webkit-input-placeholder, .productImg_modal .input_border inputinput::-webkit-input-placeholder, -.accountEdit_page .input_border inputinput::-webkit-input-placeholder { +.accountEdit_page .input_border inputinput::-webkit-input-placeholder, +.generalMenu_printModel_upload .input_border inputinput::-webkit-input-placeholder { color: rgba(0, 0, 0, 0.15); } .collection_modal_body .input_border input.forbidden, .design_detail_modal_component .input_border input.forbidden, .library_page .input_border input.forbidden, .productImg_modal .input_border input.forbidden, -.accountEdit_page .input_border input.forbidden { +.accountEdit_page .input_border input.forbidden, +.generalMenu_printModel_upload .input_border input.forbidden { cursor: no-drop; } .collection_modal_body .input_border .input_box_btnBox_upImg, .design_detail_modal_component .input_border .input_box_btnBox_upImg, .library_page .input_border .input_box_btnBox_upImg, .productImg_modal .input_border .input_box_btnBox_upImg, -.accountEdit_page .input_border .input_box_btnBox_upImg { +.accountEdit_page .input_border .input_box_btnBox_upImg, +.generalMenu_printModel_upload .input_border .input_box_btnBox_upImg { height: 100%; } .collection_modal_body .input_border .fi, .design_detail_modal_component .input_border .fi, .library_page .input_border .fi, .productImg_modal .input_border .fi, -.accountEdit_page .input_border .fi { +.accountEdit_page .input_border .fi, +.generalMenu_printModel_upload .input_border .fi { margin-right: 1rem; display: flex; cursor: pointer; @@ -1740,7 +1770,8 @@ textarea:focus { .design_detail_modal_component .input_border .fi.fi-br-loading, .library_page .input_border .fi.fi-br-loading, .productImg_modal .input_border .fi.fi-br-loading, -.accountEdit_page .input_border .fi.fi-br-loading { +.accountEdit_page .input_border .fi.fi-br-loading, +.generalMenu_printModel_upload .input_border .fi.fi-br-loading { height: 100%; background-color: rgba(0, 0, 0, 0); } @@ -1748,21 +1779,24 @@ textarea:focus { .design_detail_modal_component .input_border .fi.active, .library_page .input_border .fi.active, .productImg_modal .input_border .fi.active, -.accountEdit_page .input_border .fi.active { +.accountEdit_page .input_border .fi.active, +.generalMenu_printModel_upload .input_border .fi.active { transform: rotate(180deg); } .collection_modal_body .input_border .fi.forbidden, .design_detail_modal_component .input_border .fi.forbidden, .library_page .input_border .fi.forbidden, .productImg_modal .input_border .fi.forbidden, -.accountEdit_page .input_border .fi.forbidden { +.accountEdit_page .input_border .fi.forbidden, +.generalMenu_printModel_upload .input_border .fi.forbidden { cursor: no-drop; } .collection_modal_body .input_border .search_upImg, .design_detail_modal_component .input_border .search_upImg, .library_page .input_border .search_upImg, .productImg_modal .input_border .search_upImg, -.accountEdit_page .input_border .search_upImg { +.accountEdit_page .input_border .search_upImg, +.generalMenu_printModel_upload .input_border .search_upImg { width: 4rem; height: 100%; position: absolute; @@ -1773,7 +1807,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_upImg span, .library_page .input_border .search_upImg span, .productImg_modal .input_border .search_upImg span, -.accountEdit_page .input_border .search_upImg span { +.accountEdit_page .input_border .search_upImg span, +.generalMenu_printModel_upload .input_border .search_upImg span { position: absolute; width: 100%; } @@ -1781,7 +1816,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_upImg .ant-upload-select-picture-card, .library_page .input_border .search_upImg .ant-upload-select-picture-card, .productImg_modal .input_border .search_upImg .ant-upload-select-picture-card, -.accountEdit_page .input_border .search_upImg .ant-upload-select-picture-card { +.accountEdit_page .input_border .search_upImg .ant-upload-select-picture-card, +.generalMenu_printModel_upload .input_border .search_upImg .ant-upload-select-picture-card { width: 100%; height: 100%; display: block !important; @@ -1790,7 +1826,8 @@ textarea:focus { .design_detail_modal_component .input_border .search_textarea, .library_page .input_border .search_textarea, .productImg_modal .input_border .search_textarea, -.accountEdit_page .input_border .search_textarea { +.accountEdit_page .input_border .search_textarea, +.generalMenu_printModel_upload .input_border .search_textarea { z-index: 3; height: auto; position: absolute; @@ -1806,14 +1843,16 @@ textarea:focus { .design_detail_modal_component .input_border .generage_btn, .library_page .input_border .generage_btn, .productImg_modal .input_border .generage_btn, -.accountEdit_page .input_border .generage_btn { +.accountEdit_page .input_border .generage_btn, +.generalMenu_printModel_upload .input_border .generage_btn { margin-left: 2rem; } .collection_modal_body .upload_item, .design_detail_modal_component .upload_item, .library_page .upload_item, .productImg_modal .upload_item, -.accountEdit_page .upload_item { +.accountEdit_page .upload_item, +.generalMenu_printModel_upload .upload_item { display: flex; flex-wrap: wrap; } @@ -1821,7 +1860,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item, .library_page .upload_item .upload_file_item, .productImg_modal .upload_item .upload_file_item, -.accountEdit_page .upload_item .upload_file_item { +.accountEdit_page .upload_item .upload_file_item, +.generalMenu_printModel_upload .upload_item .upload_file_item { margin: 0 calc(2rem*1.2) calc(2rem*1.2) 0; display: inline-block; width: calc(10rem*1.2); @@ -1835,7 +1875,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item.active, .library_page .upload_item .upload_file_item.active, .productImg_modal .upload_item .upload_file_item.active, -.accountEdit_page .upload_item .upload_file_item.active { +.accountEdit_page .upload_item .upload_file_item.active, +.generalMenu_printModel_upload .upload_item .upload_file_item.active { opacity: 0.5; border-radius: calc(1rem*1.2); transform: scale(0.9); @@ -1844,21 +1885,24 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item.active .delete_file_block, .library_page .upload_item .upload_file_item.active .delete_file_block, .productImg_modal .upload_item .upload_file_item.active .delete_file_block, -.accountEdit_page .upload_item .upload_file_item.active .delete_file_block { +.accountEdit_page .upload_item .upload_file_item.active .delete_file_block, +.generalMenu_printModel_upload .upload_item .upload_file_item.active .delete_file_block { pointer-events: none; } .collection_modal_body .upload_item .upload_file_item.active .operate_file_block, .design_detail_modal_component .upload_item .upload_file_item.active .operate_file_block, .library_page .upload_item .upload_file_item.active .operate_file_block, .productImg_modal .upload_item .upload_file_item.active .operate_file_block, -.accountEdit_page .upload_item .upload_file_item.active .operate_file_block { +.accountEdit_page .upload_item .upload_file_item.active .operate_file_block, +.generalMenu_printModel_upload .upload_item .upload_file_item.active .operate_file_block { pointer-events: none; } .collection_modal_body .upload_item .upload_file_item.upload_component, .design_detail_modal_component .upload_item .upload_file_item.upload_component, .library_page .upload_item .upload_file_item.upload_component, .productImg_modal .upload_item .upload_file_item.upload_component, -.accountEdit_page .upload_item .upload_file_item.upload_component { +.accountEdit_page .upload_item .upload_file_item.upload_component, +.generalMenu_printModel_upload .upload_item .upload_file_item.upload_component { border: none; display: flex; align-items: center; @@ -1868,7 +1912,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper), .library_page .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper), .productImg_modal .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper), -.accountEdit_page .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper) { +.accountEdit_page .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper), +.generalMenu_printModel_upload .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper) { position: absolute; width: auto; top: 50%; @@ -1879,7 +1924,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item :deep(.ant-upload-select-picture-card), .library_page .upload_item .upload_file_item :deep(.ant-upload-select-picture-card), .productImg_modal .upload_item .upload_file_item :deep(.ant-upload-select-picture-card), -.accountEdit_page .upload_item .upload_file_item :deep(.ant-upload-select-picture-card) { +.accountEdit_page .upload_item .upload_file_item :deep(.ant-upload-select-picture-card), +.generalMenu_printModel_upload .upload_item .upload_file_item :deep(.ant-upload-select-picture-card) { width: calc(6rem*1.2); height: calc(6rem*1.2); border: calc(0.3rem*1.2) solid #ededed; @@ -1890,7 +1936,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content, .library_page .upload_item .upload_file_item .upload_file_item_content, .productImg_modal .upload_item .upload_file_item .upload_file_item_content, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content { display: flex; align-items: center; justify-content: center; @@ -1902,21 +1949,24 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content:hover div, .library_page .upload_item .upload_file_item .upload_file_item_content:hover div, .productImg_modal .upload_item .upload_file_item .upload_file_item_content:hover div, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content:hover div { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content:hover div, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content:hover div { opacity: 1; } .collection_modal_body .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block, .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block, .library_page .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block, .productImg_modal .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content:hover .delete_file_block { display: block; } .collection_modal_body .upload_item .upload_file_item .upload_file_item_content .upload_img, .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content .upload_img, .library_page .upload_item .upload_file_item .upload_file_item_content .upload_img, .productImg_modal .upload_item .upload_file_item .upload_file_item_content .upload_img, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .upload_img { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .upload_img, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content .upload_img { display: block; height: 100%; width: auto; @@ -1927,7 +1977,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content .delete_file_block, .library_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block, .productImg_modal .upload_item .upload_file_item .upload_file_item_content .delete_file_block, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content .delete_file_block { display: none; width: 100%; cursor: pointer; @@ -1945,7 +1996,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop, .library_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop, .productImg_modal .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop { width: calc(3.2rem*1.2); height: calc(3.2rem*1.2); background: rgba(0, 0, 0, 0.6); @@ -1961,7 +2013,8 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu, .library_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu, .productImg_modal .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu, -.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu { +.accountEdit_page .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu { font-size: calc(1.6rem*1.2); color: #fff; } @@ -1969,14 +2022,16 @@ textarea:focus { .design_detail_modal_component .upload_item .upload_file_item .upload_img_icon, .library_page .upload_item .upload_file_item .upload_img_icon, .productImg_modal .upload_item .upload_file_item .upload_img_icon, -.accountEdit_page .upload_item .upload_file_item .upload_img_icon { +.accountEdit_page .upload_item .upload_file_item .upload_img_icon, +.generalMenu_printModel_upload .upload_item .upload_file_item .upload_img_icon { width: calc(4.6rem*1.2); } .collection_modal_body .upload_item .upload_file_item:last-child, .design_detail_modal_component .upload_item .upload_file_item:last-child, .library_page .upload_item .upload_file_item:last-child, .productImg_modal .upload_item .upload_file_item:last-child, -.accountEdit_page .upload_item .upload_file_item:last-child { +.accountEdit_page .upload_item .upload_file_item:last-child, +.generalMenu_printModel_upload .upload_item .upload_file_item:last-child { margin: 0; } .generalModel_modal .ant-modal-content { diff --git a/src/assets/style/style.less b/src/assets/style/style.less index 39b788f3..fb67b37c 100644 --- a/src/assets/style/style.less +++ b/src/assets/style/style.less @@ -10,6 +10,10 @@ html,body,#app{ --aida-fsize1-8: calc(1.8rem*1.2); --aida-fsize1-6: calc(1.6rem*1.2); --aida-fsize1-4: calc(1.4rem*1.2); + --antd-wave-shadow-color:#39215b; +} +::selection{ + background-color: #1890ff; } input{ outline:none; @@ -359,6 +363,9 @@ input:focus{ cursor: pointer; pointer-events: auto !important; } +.ant-popover-placement-top{ + z-index: 9999; +} .ant-drawer{ z-index: 9999; } @@ -1600,7 +1607,7 @@ textarea:focus{ outline: none; /* 清除默认焦点样式 */ } //设计input和上传按钮样式 -.collection_modal_body,.design_detail_modal_component,.library_page,.productImg_modal,.accountEdit_page{ +.collection_modal_body,.design_detail_modal_component,.library_page,.productImg_modal,.accountEdit_page,.generalMenu_printModel_upload{ .input_border{ z-index: 2; display: flex; @@ -1680,6 +1687,7 @@ textarea:focus{ width: var(--width); display: flex; float: left; + align-items: center; .ant-spin-text{ font-size: 1.2rem; } diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue index 6c83db9e..887eb1f4 100644 --- a/src/component/Detail/DesignDetail.vue +++ b/src/component/Detail/DesignDetail.vue @@ -152,7 +152,7 @@
- +
@@ -507,15 +507,12 @@ export default defineComponent({ item.layersObject[0] = item.layersObject[1] item.layersObject[1] = a } - if(item.printObject.prints == null){ - item.printObject.prints = [] - }else{ - item.printObject.prints.forEach((element:any) => { - if(!element.designType){ - element.designType = 'Library' - } - }); - } + if(item.printObject.prints == null)item.printObject.prints = [] + item.printObject.prints.forEach((element:any) => { + if(!element.designType){ + element.designType = 'Library' + } + }); }) this.currentIndex = 0 this.store.commit('setDesignItemDetail',rv) diff --git a/src/component/Detail/DesignDetailEnd.vue b/src/component/Detail/DesignDetailEnd.vue index 4005f6e4..4d70c665 100644 --- a/src/component/Detail/DesignDetailEnd.vue +++ b/src/component/Detail/DesignDetailEnd.vue @@ -94,10 +94,8 @@
{{ $t('DesignDetailEnd.Layout') }}
{{ $t('DesignDetailEnd.Layout') }}
- - - - + +
@@ -112,7 +110,6 @@ import { Sketch} from '@ans1998/vue3-color' import DesignPrintOperation from './DesignPrintOperation.vue'; import DesignPrintOperationMobile from './DesignPrintOperationMobile.vue'; import DesignElementsOperation from './DesignElements.vue'; -import DesignPrintMobile from './DesignElementsMobile.vue'; import { message,Upload} from 'ant-design-vue'; import { openGuide,driverObj__ } from "@/tool/guide"; import {isMoible,setGradual} from '@/tool/util' @@ -123,7 +120,7 @@ export default defineComponent({ props: ["msg"], components:{ Draggable,Sketch,DesignPrintOperation,DesignPrintOperationMobile, - DesignElementsOperation,DesignPrintMobile,sketchCategory + DesignElementsOperation,sketchCategory }, setup(prop) { const store = useStore(); @@ -262,7 +259,8 @@ export default defineComponent({ setPrint(){ // if(this.current?.printObject?.prints?.[0]?.path){ - let DesignPrintOperation = isMoible() ? this.$refs.DesignPrintOperationMobile : this.$refs.DesignPrintOperation + let DesignPrintOperation = this.$refs.DesignPrintOperation + // let DesignPrintOperation = isMoible() ? this.$refs.DesignPrintOperationMobile : this.$refs.DesignPrintOperation DesignPrintOperation.init() if(this.driver__.driver){ nextTick().then(()=>{ diff --git a/src/component/Detail/DesignPrintOperation.vue b/src/component/Detail/DesignPrintOperation.vue index f0829f06..50da8d99 100644 --- a/src/component/Detail/DesignPrintOperation.vue +++ b/src/component/Detail/DesignPrintOperation.vue @@ -99,7 +99,7 @@
-
-
+
+
+ +
@@ -63,6 +68,7 @@ import allOrder from "@/component/Pay/allOrder.vue"; import creditsDetail from "@/component/Pay/creditsDetail.vue"; import { exportSele,JSRectUpdata,JSchangeType,JScanvasMouseDown,JSSetRemoveImage,JScreateCheck,JSSetTexture } from "@/tool/canvasDrawing"; import { useI18n } from "vue-i18n"; +import { getMousePosition } from "@/tool/mdEvent"; export default defineComponent({ components: { creditsDetail, @@ -110,15 +116,8 @@ export default defineComponent({ exportWH = 512 nextTick(()=>{ let canvasBox = document.querySelector(".addDetails_modal .exportCanvasBox_center"); - let oldCanvasDom = canvasBox.querySelector('.canvas-container') - let oldCanvasDom1 = canvasBox.querySelector('canvas') - var canvasDom = document.createElement("canvas"); - document.addEventListener("keydown", canvasKeyDown); - document.addEventListener("keyup", canvasKeyUp); - if(oldCanvasDom)oldCanvasDom.remove() - if(oldCanvasDom)loadingShow.value = false - if(oldCanvasDom1)oldCanvasDom1.remove() - canvasBox.appendChild(canvasDom); + document.removeEventListener('mousemove', mouseMove); + document.removeEventListener('touchmove', touchmove); let img = new Image(); img.onload = function(){ @@ -136,13 +135,11 @@ export default defineComponent({ exportWH = img.height } ratio = [wScale,hScale] - canvas = new fabric.Canvas(canvasDom, { - width: canvasWH.value * wScale, - height: canvasWH.value * hScale, - isDrawingMode: false, // 开启绘图模式 - }); + canvas = canvasGeneral.canvasInit(canvasBox,{ + width:canvasWH.value * wScale, + height:canvasWH.value * hScale, + }) scale = img.height/canvas.height - JSchangeType(canvas,'init') pencilbtnStyle.value.background = rgba fabric.Object.prototype.cornerSize = 10 @@ -174,7 +171,8 @@ export default defineComponent({ }); //画布上移动 - canvas.on("mouse:move", event =>setCanvasMove(event)); + document.addEventListener('mousemove', mouseMove); + document.addEventListener('touchmove', touchmove); setOperation('pencil') img.remove() } @@ -206,20 +204,24 @@ export default defineComponent({ document.removeEventListener("keyup", canvasKeyUp); } let rgba = 'rgba(0, 0, 0, 1)' - + let mouseMove = (event)=>{ + let e = getMousePosition(event,false) + setCanvasMove(e) + } + let touchmove = (event)=>{ + let e = getMousePosition(event,true) + setCanvasMove(e) + } let setCanvasMove = (event)=>{ - var pointer = canvas.getPointer(event.e); if(canvas.isDrawingMode){ canvas.setCursor('none'); } - let canvasBox = document.querySelector(".addDetails_canvasCenter .canvas-container"); - const rect = canvasBox.getBoundingClientRect(); - const parentRect = canvasBox.parentElement.getBoundingClientRect(); - let parentX = rect.left - parentRect.left - let parentY = rect.top - parentRect.top - pencilbtnStyle.value.left = parentX + pointer.x+'px' - pencilbtnStyle.value.top = parentY + pointer.y+'px' - canvas.requestRenderAll() + let canvasCenterBox = document.querySelector(".addDetails_modal .exportCanvasBox_center_box"); + if(!canvasCenterBox)return + let parentX = event.clientX - canvasCenterBox.getBoundingClientRect().left + let parentY = event.clientY - canvasCenterBox.getBoundingClientRect().top + pencilbtnStyle.value.left = parentX + "px" + pencilbtnStyle.value.top = parentY+'px' } let setOperation = (str)=>{ canvasBtn.canvasState = str @@ -339,26 +341,17 @@ export default defineComponent({ } ) exportCanvas.add(obj) - // if(allObjects.length-1 == index){ - // let data = exportCanvas.toDataURL('jpg') - // cancelDsign() - // clearCanvas() - // emit('setSloganData',data) - // } }) let data = exportCanvas.toDataURL('jpg') cancelDsign() clearCanvas() emit('setSloganData',data) - - }) } let cancelDsign = ()=>{ - canvas.dispose(); - showPayOrder.value = false document.removeEventListener('keydown',canvasKeyDown); document.removeEventListener('keyup', canvasKeyUp); + showPayOrder.value = false } return { presentState, @@ -473,6 +466,25 @@ export default defineComponent({ position: relative; margin: 0 auto; } + .exportCanvasBox_center_box{ + padding: 3rem; + height: 100%; + flex: 1; + position: relative; + width: 100%; + background: #e6e6e6; + &:hover{ + cursor: none; + } + .editFrontBack_pencilbtn{ + position: absolute; + z-index: 1; + border-radius: 50%; + border: 1px solid #000; + pointer-events: none; + transform: translate(-50%,-50%); + } + } .exportCanvasBox_center{ height: 100%; flex: 1; diff --git a/src/component/Detail/editFrontBack.vue b/src/component/Detail/editFrontBack.vue index 695aa202..2463ea68 100644 --- a/src/component/Detail/editFrontBack.vue +++ b/src/component/Detail/editFrontBack.vue @@ -6,7 +6,7 @@ --> - +
@@ -14,9 +14,11 @@ -
-
- +
+
+
+ +
@@ -32,6 +34,7 @@ import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; import allOrder from "@/component/Pay/allOrder.vue"; import creditsDetail from "@/component/Pay/creditsDetail.vue"; import { exportSele,JSRectUpdata,JSchangeType,JScanvasMouseDown,JSSetRemoveImage,JScreateCheck,JSSetTexture } from "@/tool/canvasDrawing"; +import { getMousePosition } from "@/tool/mdEvent"; import { useI18n } from "vue-i18n"; export default defineComponent({ components: { @@ -92,18 +95,14 @@ export default defineComponent({ var canvasDom = document.createElement("canvas"); document.addEventListener("keydown", canvasKeyDown); document.addEventListener("keyup", canvasKeyUp); - let oldCanvasDom = canvasBox.querySelector('.canvas-container') - let oldCanvasDom1 = canvasBox.querySelector('canvas') - if(oldCanvasDom)oldCanvasDom.remove() - if(oldCanvasDom)loadingShow.value = false - if(oldCanvasDom1)oldCanvasDom1.remove() + document.removeEventListener('mousemove', mouseMove); + document.removeEventListener('touchmove', touchmove); canvasBox.appendChild(canvasDom); let img = new Image(); img.onload = function(){ loadingShow.value = true let height = canvasBox.offsetHeight; canvasWH.value = height - console.log(canvasBox.offsetHeight); canvasBox.style.width = height+'px' let wScale = 1 let hScale = 1 @@ -117,13 +116,10 @@ export default defineComponent({ exportWH = img.height } ratio = [wScale,hScale] - canvas = new fabric.Canvas(canvasDom, { - width: canvasWH.value * wScale, - height: canvasWH.value * hScale, - isDrawingMode: false, // 开启绘图模式 - }); - JSchangeType(canvas,'init') - console.log(rgba.value); + canvas = canvasGeneral.canvasInit(canvasBox,{ + width:canvasWH.value * wScale, + height:canvasWH.value * hScale, + }) pencilbtnStyle.value.background = rgba.value fabric.Object.prototype.cornerSize = 10 fabric.Object.prototype.transparentCorners = false @@ -159,7 +155,9 @@ export default defineComponent({ }); //画布上移动 - canvas.on("mouse:move", event =>setCanvasMove(event)); + // canvas.on("mouse:move", event =>setCanvasMove(event)); + document.addEventListener('mousemove', mouseMove); + document.addEventListener('touchmove', touchmove); setOperation('pencil') createSetTimeSubmit() img.remove() @@ -186,8 +184,7 @@ export default defineComponent({ } let setClone = ()=>{ - // canvasBtn.canvasState = 'move' - // canvasBtn.spreadState = false + let canvasBox = document.querySelector(".editFrontBack_center .exportCanvasBox_center"); let oldCanvasDom = canvasBox.querySelector('.canvas-container') let oldCanvasDom1 = canvasBox.querySelector('canvas') @@ -200,22 +197,24 @@ export default defineComponent({ document.removeEventListener("keyup", canvasKeyUp); } let rgba = ref('rgb(255,0,0)') - + let mouseMove = (event)=>{ + let e = getMousePosition(event,false) + setCanvasMove(e) + } + let touchmove = (event)=>{ + let e = getMousePosition(event,true) + setCanvasMove(e) + } let setCanvasMove = (event)=>{ - var pointer = canvas.getPointer(event.e); if(canvas.isDrawingMode){ canvas.setCursor('none'); - // brushIndicator.set({ left: pointer.x, top: pointer.y, visible: true,radius:(canvasBtn.canvasPencilWidth[canvasBtn.canvasState])/2 }); } - let canvasBox = document.querySelector(".editFrontBack_center .canvas-container"); - const rect = canvasBox.getBoundingClientRect(); - const parentRect = canvasBox.parentElement.getBoundingClientRect(); - let parentX = rect.left - parentRect.left - let parentY = rect.top - parentRect.top - // brushIndicator.set({ left: x, top: y, visible: true,radius:(canvasBtn.canvasPencilWidth[canvasBtn.canvasState])/2 }); - pencilbtnStyle.value.left = parentX + pointer.x+'px' - pencilbtnStyle.value.top = parentY + pointer.y+'px' - canvas.requestRenderAll() + let canvasCenterBox = document.querySelector(".editFrontBack_center .exportCanvasBox_center_box"); + if(!canvasCenterBox)return + let parentX = event.clientX - canvasCenterBox.getBoundingClientRect().left + let parentY = event.clientY - canvasCenterBox.getBoundingClientRect().top + pencilbtnStyle.value.left = parentX + "px" + pencilbtnStyle.value.top = parentY+'px' } let setOperation = (str)=>{ canvasBtn.canvasState = str @@ -227,7 +226,7 @@ export default defineComponent({ pencilbtnStyle.value.display = `block` }else if(str == 'eraser'){ setEraser() - rgba.value = 'rgb(255,255,255)' + // rgba.value = 'rgb(255,255,255)' pencilbtnStyle.value.display = `block` } } @@ -373,6 +372,7 @@ export default defineComponent({ }) } let cancelDsign = ()=>{ + document.removeEventListener('keydown',canvasKeyDown); document.removeEventListener('keyup', canvasKeyUp); } @@ -410,6 +410,7 @@ export default defineComponent({ // width: calc(512px / 2); // width: 256px; height: 100%; + width: 100%; display: flex; flex-direction: column; // height: calc(512px / 2); @@ -499,13 +500,30 @@ export default defineComponent({ transform: translate(-50%,0); } } - .exportCanvasBox_center{ + .exportCanvasBox_center_box{ + padding: 3rem; height: 100%; flex: 1; position: relative; + width: 100%; + background: #e6e6e6; + &:hover{ + cursor: none; + } + .editFrontBack_pencilbtn{ + position: absolute; + z-index: 1; + border-radius: 50%; + border: 1px solid #000; + pointer-events: none; + transform: translate(-50%,-50%); + } + } + .exportCanvasBox_center{ margin: 0 auto; overflow: hidden; - background: #e6e6e6; + height: 100%; + position: relative; // overflow: scroll; :deep(.canvas-container){ @@ -531,14 +549,7 @@ export default defineComponent({ object-fit: contain; } } - .editFrontBack_pencilbtn{ - position: absolute; - z-index: 1; - border-radius: 50%; - border: 1px solid #000; - pointer-events: none; - transform: translate(-50%,-50%); - } + } .exportCanvasBox_center:hover{ .editFrontBack_center_btn{ diff --git a/src/component/Detail/oldHistoryDetail.vue b/src/component/Detail/oldHistoryDetail.vue deleted file mode 100644 index 5410056c..00000000 --- a/src/component/Detail/oldHistoryDetail.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - diff --git a/src/component/Detail/setDesignItem.vue b/src/component/Detail/setDesignItem.vue index 82c5beae..80c0b8b1 100644 --- a/src/component/Detail/setDesignItem.vue +++ b/src/component/Detail/setDesignItem.vue @@ -8,7 +8,6 @@
-
- @@ -180,6 +179,7 @@ T + 液化
- +
+
+
+
+ +
+
+ +
+ +
+
+
+
+ + + + +
+ +
+
-
{{ $t('Generate.Generate') }} -
@@ -108,37 +146,6 @@
-
+
+ +
- + @@ -196,25 +206,9 @@ export default defineComponent({ setup(props) { // console.log(prop.msg); - let printModelList = ref([ - { - num:'', - optype:false, - value:'Painting Style', - label:useI18n().t('Generate.Model1') - },{ - num:'', - optype:false, - value:'Illustration Style', - label:useI18n().t('Generate.Model2') - },{ - num:'', - optype:false, - value:'Real Style', - label:useI18n().t('Generate.Model3') - }, - ]) - let printModel = ref({ + let printModelList:any = ref([]) + let sketchStyleList:any = ref([]) + let printModel:any = ref({ num:'', optype:false, value:'Painting Style', @@ -240,12 +234,13 @@ export default defineComponent({ let isTest = ref() let userInfo:any = {} let generateTime:any = ref() - let generateProceedList = ref([]) + let generateProceedList:any = ref([]) let remGenerate:any = ref(false) let remGenerateTime:any = ref() let styleRecommend:any = inject('styleRecommend') let generateLevel2Type = '' let isSloganHint:any = ref(' ') + let loadingShow =ref(false) return { searchPictureName, searchPictureSeed, @@ -255,6 +250,7 @@ export default defineComponent({ level2Type, printModel, printModelList, + sketchStyleList, isGenerate, // printBoards, @@ -274,6 +270,7 @@ export default defineComponent({ styleRecommend, generateLevel2Type, isSloganHint, + loadingShow, }; }, data(prop) { @@ -319,6 +316,42 @@ export default defineComponent({ this.workspaceCom = computed(()=>{ return this.store?.state?.Workspace?.workspace }) + // if() + if(this.type_.type2 == 'Printboard'){ + this.printModelList = [ + { + num:'', + optype:false, + value:'Painting Style', + label:useI18n().t('Generate.Model1') + },{ + num:'', + optype:false, + value:'Illustration Style', + label:useI18n().t('Generate.Model2') + },{ + num:'', + optype:false, + value:'Real Style', + label:useI18n().t('Generate.Model3') + }, + ] + }else if(this.type_.type2 == 'Sketchboard'){ + this.printModelList = JSON.parse(JSON.stringify(this.store.state.UserHabit.SketchStyle)) + this.printModelList.forEach((item:any)=>{ + item.img = 'https://www.aida.com.hk/img/aida_logo.5ab4163e.png' + }) + this.printModelList.push({ + num:'', + optype:false, + img:-1, + value:'', + label:useI18n().t('Generate.Model1') + }) + } + this.printModel = this.printModelList[0] + + }, watch:{ driver__:{ @@ -377,6 +410,7 @@ export default defineComponent({ methods: { generageAdd(data: any) { data.type_ = this.type_; + data.type_.type1 = data.designType?data.designType:this.type_.type1 data.resData = JSON.parse(JSON.stringify(data)) let maxImg = 8 if(this.type_.type2 == 'Sketchboard'){ @@ -410,7 +444,41 @@ export default defineComponent({ setprintModel(value:any){ this.printModel = value }, + imageToSketch(){ + if((!this.printModel?.id && !this.printModel?.value) || !this.sketchboardList?.[0]?.id)return message.info(this.t('Generate.jsContent4')); + this.loadingShow = true + let data = { + "elementId": this.sketchboardList[0].id, + gender:this.workspace.sexEnum.value, + "style": this.printModel.value, + "styleImageId": this.printModel.id?this.printModel.id:'' + } + Https.axiosPost(Https.httpUrls.imageToSketch, data).then((rv)=>{ + if(rv){ + this.sketchCatecoryList.forEach((itemCategory:any) => { + if(itemCategory.value == rv.category){ + rv.categoryValue = itemCategory?.value + rv.category = itemCategory?.name + } + }); + this.fileList.push({ + imgUrl:rv.url, + categoryValue:rv.categoryValue, + category:rv.category, + id:rv.id, + status:'Success', + }) + this.loadingShow = false + } + }).catch(()=>{ + this.loadingShow = false + }) + }, getgenerate(){ + if(this.scene?.value == 'extract'){ + this.imageToSketch() + return + } this.isTextarea = false this.isInputFocus = false if(this.isGenerate)return @@ -844,7 +912,6 @@ export default defineComponent({ border-radius: calc(1rem*1.2); img { transform: scale(0.9); - object-fit: contain; } .delete_like_file_block{ pointer-events:none; @@ -856,6 +923,7 @@ export default defineComponent({ img { width: calc(10rem*1.2); height: calc(10rem*1.2); + object-fit: contain; } &:hover .delete_like_file_block{ // display: block; diff --git a/src/component/HomePage/OldExportNewCoolection.vue b/src/component/HomePage/OldExportNewCoolection.vue deleted file mode 100644 index c3900fb7..00000000 --- a/src/component/HomePage/OldExportNewCoolection.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - diff --git a/src/component/HomePage/PrintboardUpload.vue b/src/component/HomePage/PrintboardUpload.vue index 243b8c73..e98475d6 100644 --- a/src/component/HomePage/PrintboardUpload.vue +++ b/src/component/HomePage/PrintboardUpload.vue @@ -203,18 +203,6 @@ export default defineComponent({ designType:'' }) let workspace:any = ref({}) - let sceneList = ref([ - { - name:'Pattern', - value:'Pattern' - },{ - name:'Slogan', - value:'Slogan' - },{ - name:'Logo', - value:'Logo' - }, - ]) let scene = ref({ name:'Pattern', value:'Pattern' @@ -234,7 +222,6 @@ export default defineComponent({ userInfo, useGenerate, workspace, - sceneList, scene, openMenu, printCatecoryList, @@ -700,6 +687,8 @@ export default defineComponent({ .printMenu{ margin-right: 0; margin-top: auto; + position: relative; + margin-left: 2rem; >div{ width: 14rem; font-size: var(--aida-fsize1-6); @@ -707,6 +696,8 @@ export default defineComponent({ i{ transition: all .3s; display: inline-block; + position: absolute; + right: 0; } .forbidden{ transform: rotate(180deg); diff --git a/src/component/HomePage/SketchboardUpload.vue b/src/component/HomePage/SketchboardUpload.vue index 3afc81a2..808cf57e 100644 --- a/src/component/HomePage/SketchboardUpload.vue +++ b/src/component/HomePage/SketchboardUpload.vue @@ -23,6 +23,19 @@ > {{ $t('SketchboardUpload.Generate') }} +
+
{{ scene.name }}
+ +
@@ -113,6 +126,7 @@ v-show="openClick == 3" ref="Generate" msg="Sketchboard" + :scene="scene" :sketchCatecoryList="sketchCatecoryList" >
@@ -214,6 +228,14 @@ export default defineComponent({ level2Type:'', designType:'', }) + let scene = ref({ + name:'Generate Sketch', + value:'generate' + }) + let openMenu = ref(false) + let sketchStyleList:any = computed(()=>{ + return store.state.UserHabit.SketchGenerateType + }) return { fileList, openClick, @@ -227,6 +249,9 @@ export default defineComponent({ isTest, userInfo, useGenerate, + scene, + openMenu, + sketchStyleList, }; }, data() { @@ -549,6 +574,23 @@ export default defineComponent({ } this.store.commit("setSketchboardFile", this.fileList); }, + setSceneList(data:any){ + if(this.scene.value === data.value) return + this.scene = data + let generate:any = this.$refs.Generate + generate.sketchboardList = [] + generate.searchPictureName = '' + this.openMenu = false + }, + openPrintModel(){ + if(this.openMenu)return + document.addEventListener('click',this.removePrintModel) + this.openMenu = true + }, + removePrintModel(){ + this.openMenu = false + document.removeEventListener('click',this.removePrintModel) + } }, }); @@ -610,6 +652,32 @@ export default defineComponent({ margin-right: calc(0.8rem*1.2); } } + .printMenu{ + margin-right: 0; + margin-left: 2rem; + margin-top: auto; + position: relative; + >div{ + width: 14rem; + font-size: var(--aida-fsize1-6); + border: 0; + i{ + transition: all .3s; + display: inline-block; + position: absolute; + right: 0; + } + .forbidden{ + transform: rotate(180deg); + } + } + ul{ + width: 14rem; + } + } + .switch_type_item:nth-child(3){ + margin: 0; + } } .sketchboard_body { // height: calc(100% - 5rem*1.2)); diff --git a/src/component/HomePage/generalMenu.vue b/src/component/HomePage/generalMenu.vue index c5c6ad4d..c78df66c 100644 --- a/src/component/HomePage/generalMenu.vue +++ b/src/component/HomePage/generalMenu.vue @@ -1,16 +1,56 @@ \ No newline at end of file diff --git a/src/component/HomePage/layout.vue b/src/component/HomePage/layout.vue index 15c46752..4f2e9978 100644 --- a/src/component/HomePage/layout.vue +++ b/src/component/HomePage/layout.vue @@ -30,7 +30,7 @@
- + +
-
-
- +
+ +
@@ -147,7 +137,9 @@ import { useStore } from "vuex"; import { downloadIamge } from "@/tool/util"; import { getCookie,setCookie } from "@/tool/cookie"; +import generalMiniCanvas from "@/component/modules/generalMiniCanvas.vue"; export default defineComponent({ + components:{generalMiniCanvas}, props:{ productData:{ type:Object, @@ -156,7 +148,16 @@ export default defineComponent({ brightenValue:1, upload:'', }, - } + }, + isCanvas:{ + type:Boolean, + default:false, + }, + workspace:{ + type:Object, + default:{ + } + }, }, setup(props:any,{emit}) { const store = useStore(); @@ -298,6 +299,27 @@ export default defineComponent({ }); } } + let submitBase64Data = (rv:any)=>{ + loadingShow.value = true + let data = { + "base64": rv, + "category": scaleImageList.value[scaleImageIndex.value]?.categoryValue, + "gender": props.workspace.sexEnum.value, + } + Https.axiosPost(Https.httpUrls.modifySketch, data).then( + (rv) => { + rv.imgUrl = rv.url + rv.status = 'Success' + rv.category = scaleImageList.value[scaleImageIndex.value]?.category + rv.categoryValue = scaleImageList.value[scaleImageIndex.value]?.categoryValue + delete rv.url + scaleImageList.value.unshift(rv) + loadingShow.value = false + } + ).catch(res=>{ + loadingShow.value = false + }); + } return { ...toRefs(productimg), scaleImage, @@ -313,6 +335,7 @@ export default defineComponent({ robotAssits, getPrductimg, removeProductimg, + submitBase64Data, }; }, data() { @@ -447,6 +470,7 @@ export default defineComponent({ display: flex; align-items: center; justify-content: center; + z-index: 2; .operate_icon{ font-size: 1.8rem; color: #fff; @@ -464,7 +488,7 @@ export default defineComponent({ } - .scaleImage_content:hover{ + .scaleImage_content_imgBox:hover{ .img_operate_block{ opacity: 1; } diff --git a/src/component/modules/generalCanvas.vue b/src/component/modules/generalCanvas.vue new file mode 100644 index 00000000..e4e0c837 --- /dev/null +++ b/src/component/modules/generalCanvas.vue @@ -0,0 +1,1525 @@ + + + + + \ No newline at end of file diff --git a/src/component/modules/generalMiniCanvas.vue b/src/component/modules/generalMiniCanvas.vue new file mode 100644 index 00000000..f8f37f90 --- /dev/null +++ b/src/component/modules/generalMiniCanvas.vue @@ -0,0 +1,511 @@ + + + \ No newline at end of file diff --git a/src/component/modules/liquefaction.vue b/src/component/modules/liquefaction.vue new file mode 100644 index 00000000..740bd147 --- /dev/null +++ b/src/component/modules/liquefaction.vue @@ -0,0 +1,284 @@ + + + \ No newline at end of file diff --git a/src/lang/cn.ts b/src/lang/cn.ts index 82e8ebbe..06c114fb 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -415,6 +415,8 @@ export default { effectPoor:'当前生成的图像质量低于标准。请考虑调整您的提示词并再次尝试。', Model:'模型', uploadTitle:'上传参考图', + uploadproduct:'上传产品图', + style:'风格', sloganTitle:'输入文字内容', jsContent1:"您只能上传图片文件!", jsContent2:'图片必须小于5MB', diff --git a/src/lang/en.ts b/src/lang/en.ts index 5c441203..cc5792cb 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -415,6 +415,8 @@ export default { effectPoor:'The quality of the generated images currently falls below standard. Please consider adjusting your prompt and trying again.', Model:'Model', uploadTitle:'Upload reference image', + uploadproduct:'Upload product picture', + style:'Style', sloganTitle:'Input text content', jsContent1:"You can only upload Image file!", jsContent2:'Image must smaller than 5MB!', diff --git a/src/store/uploadFile/uploadFile.ts b/src/store/uploadFile/uploadFile.ts index 3f4c4e2b..ac002510 100644 --- a/src/store/uploadFile/uploadFile.ts +++ b/src/store/uploadFile/uploadFile.ts @@ -71,6 +71,8 @@ const UploadFilesModule : Module = { state.moodboard = [...state.moodboardFiles,...state.moodboardGenerateFiles,...state.moodboardMaterialFiles] }, addGenerateMaterialFils(state,data:any){ + console.log(data); + let file let arr let maxImg = 8 diff --git a/src/store/userHabit/userHabit.ts b/src/store/userHabit/userHabit.ts index d9eeb852..b08abccc 100644 --- a/src/store/userHabit/userHabit.ts +++ b/src/store/userHabit/userHabit.ts @@ -13,9 +13,12 @@ interface UserHabit{ FemalePosition:any, MalePosition:any, Position:any, + SketchGenerateType:any, + SketchStyle:any, systemUser:any, userInfo:any, messageSystem:any, + sex:any, } const userHabit : Module = { @@ -37,7 +40,9 @@ const userHabit : Module = { designElementsType:[], FemalePosition:[], MalePosition:[], + SketchGenerateType:[], Position:[], + SketchStyle:[], systemUser:{ value : -1 }, @@ -48,6 +53,8 @@ const userHabit : Module = { messageNum:0, messageType:{}, }, + sex:{ + }, }, mutations:{ res_clothingType(state,data){ @@ -65,6 +72,12 @@ const userHabit : Module = { setFemalePosition(state,data){ state.FemalePosition = data }, + setSketchGenerateType(state,data){ + state.SketchGenerateType = data + }, + setSketchStyle(state,data){ + state.SketchStyle = data + }, setMalePosition(state,data){ state.MalePosition = data }, @@ -115,7 +128,9 @@ const userHabit : Module = { }else{ } - + }, + setSex(state,data){ + state.sex.value = data }, }, @@ -150,7 +165,7 @@ const userHabit : Module = { }, getLangType(context){ let allPromise = []; - let getList = ['DesignElementsEnum','PrintboardLevel2TypeEnum','FemalePosition','MalePosition'] + let getList = ['DesignElementsEnum','PrintboardLevel2TypeEnum','FemalePosition','MalePosition','SketchStyle','SketchGenerateType','Sex'] let axiosGet = (item:any)=>{ return new Promise((resolve) => { Https.axiosGet(Https.httpUrls.workspaceenumValues,{params:{enumName:item}}).then((rv: any) => { @@ -159,6 +174,7 @@ const userHabit : Module = { let name = item.name item.name = item.value item.value = name + item.optype = false }); if(item == 'DesignElementsEnum'){ context.commit('setDesignElementsType',rv) @@ -169,6 +185,12 @@ const userHabit : Module = { }else if(item == 'MalePosition'){ context.commit('setMalePosition',rv) context.commit('setPosition','MalePosition') + }else if(item == 'SketchStyle'){ + context.commit('setSketchStyle',rv) + }else if(item == 'SketchGenerateType'){ + context.commit('setSketchGenerateType',rv) + }else if(item == 'Sex'){ + context.commit('setSex',rv) } resolve('') } diff --git a/src/tool/canvasDrawing.js b/src/tool/canvasDrawing.js index c985ac0e..315ad983 100644 --- a/src/tool/canvasDrawing.js +++ b/src/tool/canvasDrawing.js @@ -295,6 +295,102 @@ function JSSetRemoveImage(fun){ cornerSize: 24 }) } +function JSSetGroup(data){ + let rect + if(data.gradient){ + let colorStops = [] + data.gradient.gradientList.forEach(item=>{ + let obj = { + offset:item.left.split('%')[0]/100, + color:`rgba(${item.rgba.r},${item.rgba.g},${item.rgba.b},${item.rgba.a})` + } + colorStops.push(obj) + }) + let { x0, y0, x1, y1 } = calculateGradientCoordinate(100,120,data.gradient.angle) + let linear = new fabric.Gradient({ + type: 'linear', // 线性渐变 + // coords: { x1: 0, y1: 0, x2: 200, y2: 0 }, // 渐变方向 + coords: { x1:x0, y1:y0, x2:x1, y2:y1 }, // 渐变方向 + colorStops: colorStops, + }) + var color = new fabric.Rect({ + top:0, + left:0, + width: 110, + height: 130, + textAlign: "left", + fill: linear // 设置渐变填充 + // fill: `rgb(${data.rgbValue.r},${data.rgbValue.g},${data.rgbValue.b})`, + }); + var text = new fabric.Text('',{ + left: 0, + top: 0, + fontSize: 0, + fontFamily: "Arial", + textAlign: "left", + fill: "black", + }); + let text1 = new fabric.Text('',{ + left: 0, + top: 0, + width: 20, + fontSize: 0, + fontFamily: "Arial", + textAlign: "left", + }); + rect = {text,text1,color,width:110} + }else{ + var text = new fabric.Text(data.tcx,{ + left: 0, + top: 60, + fontSize: 14, + fontFamily: "Arial", + textAlign: "left", + fill: "black", + }); + let text1 = new fabric.Text(data.name,{ + left: 0, + top: 80, + width: 20, + fontSize: 14, + fontFamily: "Arial", + textAlign: "left", + }); + let width = 110 > text1.width ? 110 : text1.width; + var color = new fabric.Rect({ + width: width, + height: 60, + textAlign: "left", + fill: `rgb(${data.rgbValue.r},${data.rgbValue.g},${data.rgbValue.b})`, + }); + rect = {text,text1,color,width} + } + return rect +} +function JSSetPencil(str,canvas){ + let pencil + if(str == 'PencilBrush'){ + pencil = new fabric.PencilBrush(canvas,{}); //普通笔 + }else if(str == 'Marking'){ + pencil = new fabric.PencilBrush(canvas,); //记号笔 + }else if(str == 'InkBrush'){ + pencil = new fabric.InkBrush(canvas,{}); //油画笔 + }else if(str=='CrayonBrush'){ + pencil = new fabric.CrayonBrush(canvas,{}); //蜡笔 + }else if(str == 'RibbonBrush'){ + pencil = new fabric.RibbonBrush(canvas,{width: 1,}); //色带 + }else if(str == 'MarkerBrush'){ + pencil = new fabric.MarkerBrush(canvas,{}); //书写笔 + // pencil = new fabric.PenBrush(canvas,{}); //书写笔 + }else if(str == 'WritingBrush'){ + pencil = new fabric.WritingBrush(canvas,{}); //毛笔 + }else if(str == 'LongfurBrush'){ + pencil = new fabric.LongfurBrush(canvas,{width: 1,}); //色带 + }else if(str == 'SpraypaintBrush'){ + pencil = new fabric.SpraypaintBrush(canvas,{}); //长毛刷 + } + return pencil +} export { multiselectJS, JSRectUpdata, @@ -304,5 +400,7 @@ export { JScreateCheck, exportSele, JSSetTexture, - JSSetRemoveImage + JSSetRemoveImage, + JSSetGroup, + JSSetPencil, } \ No newline at end of file diff --git a/src/tool/canvasGeneral.js b/src/tool/canvasGeneral.js new file mode 100644 index 00000000..edf694c0 --- /dev/null +++ b/src/tool/canvasGeneral.js @@ -0,0 +1,239 @@ +import { + exportSele, + JSRectUpdata, + JSchangeType, + JScanvasMouseDown, + JScanvasMouseMove, + JScreateCheck, + JSSetTexture, + JSSetRemoveImage, + } from "@/tool/canvasDrawing"; +class myCanvas { + constructor() { + this.canvasDomParent = null; + this.canvas = null; + this.canvasDom = null; + this.pencilBtn = null; + this.pencilType = null; + this.keyDown = [];//键盘按下 + this._clipboard = null; //剪切板 + this.isLoadCanvas = false//撤回或者反撤回false为撤回 + this.reverseCanvasState=[];//撤回 + this.normalCanvasState=[];//反撤回 + this.canvasState = {}//当前内容 + this.pencilList = { + textFontFamilyList:[ + { value: 'Arial', name: 'select font' }, + { value: 'EN_slogan_art1', name: 'select font' }, + { value: 'EN_slogan_art2', name: 'select font' }, + { value: 'EN_slogan_art3', name: 'select font' }, + { value: 'EN_slogan_art4', name: 'select font' }, + { value: 'EN_slogan_art5', name: 'select font' }, + { value: 'EN_slogan_art6', name: 'select font' }, + { value: 'EN_slogan_art7', name: 'select font' }, + { value: '微软雅黑', name: '请选择字体' }, + { value: 'CN_slogan_art1', name: '请选择字体' }, + { value: 'CN_slogan_art2', name: '请选择字体' }, + { value: 'CN_slogan_art3', name: '请选择字体' }, + { value: 'CN_slogan_art4', name: '请选择字体' }, + { value: '华文行楷', name: '请选择字体' }, + { value: '隶书', name: '请选择字体' }, + ], + brushList:[ + { + value:'PencilBrush', + url:'/image/brush/PencilBrush.jpg' + },{ + value:'Marking', + url:'/image/brush/PencilBrush-2.jpg' + },{ + value:'InkBrush', + url:'/image/brush/InkBrush.jpg' + },{ + value:'CrayonBrush', + url:'/image/brush/CrayonBrush.jpg' + },{ + value:'RibbonBrush', + url:'/image/brush/RibbonBrush.jpg' + },{ + value:'MarkerBrush', + url:'/image/brush/MarkerBrush.jpg' + },{ + value:'WritingBrush', + url:'/image/brush/WritingBrush.jpg' + },{ + value:'LongfurBrush', + url:'/image/brush/LongfurBrush.jpg' + },{ + value:'SpraypaintBrush', + url:'/image/brush/SpraypaintBrush.jpg' + }, + ] + + } + } + canvasInit(dom, val) { + this.canvasDomParent = dom; + this.canvasClear() + var canvasDom = document.createElement("canvas"); + this.canvasDomParent.appendChild(canvasDom); + this.canvas = new fabric.Canvas(canvasDom, { + backgroundColor: "rgba(255, 255, 255)", + width: val.width?val.width:this.canvasDomParent.getBoundingClientRect().width, + height: val.height?val.height:this.canvasDomParent.getBoundingClientRect().height, + isDrawingMode: val.isDrawingMode, // 开启绘图模式 + }); + + if(!fabric.Object.prototype.controls.deleteControl){//设置元素删除 + JSSetRemoveImage(this.deleteObject) + }else{ + fabric.Object.prototype.controls.deleteControl.mouseUpHandler = this.deleteObject + } + + this.canvas.on("object:modified", ()=>{ + this.updateCanvasState('') + }); + + this.canvasKeyDown = this.canvasKeyDown.bind(this); + this.canvasKeyUp = this.canvasKeyUp.bind(this); + document.addEventListener("keydown", this.canvasKeyDown); + document.addEventListener("keyup", this.canvasKeyUp); + initAligningGuidelines(this.canvas,true) + JSchangeType(this.canvas,'init') + this.updateCanvasState('') + this.canvas.on("object:added", (event)=>{ + if(!this.isLoadCanvas)this.updateCanvasState('') + }); + + return this.canvas + } + + canvasKeyUp(event){ + this.keyDown = this.keyDown.filter(function(item) { + return event.code !== item; + }) + } + canvasKeyDown(event){ + if(this.keyDown.indexOf(event.key)>-1){ + }else{ + this.keyDown.push(event.code) + if(event.key === 'Enter' && operation.value == 'fold'){ + foldEnd('Enter') + }else if(event.key === 'Delete'){ + deleteObject() + }else if(this.keyDown.indexOf('ControlLeft') > -1 && this.keyDown.indexOf('KeyZ') > -1 && this.keyDown.indexOf('ShiftLeft') > -1){ + this.historyState('reverse') + }else if(this.keyDown.indexOf('ControlLeft') > -1 && this.keyDown.indexOf('KeyZ') > -1){ + this.historyState('') + }else if(this.keyDown.indexOf('ControlLeft') > -1 && this.keyDown.indexOf('KeyC') > -1){ + this.copy() + }else if(this.keyDown.indexOf('ControlLeft') > -1 && this.keyDown.indexOf('KeyV') > -1){ + this.paste() + } + } + } + canvasClear(){ + let oldCanvasDom = this.canvasDomParent.querySelector('.canvas-container') + let oldCanvasDom1 = this.canvasDomParent.querySelector('canvas') + + if(oldCanvasDom)oldCanvasDom.remove() + if(oldCanvasDom1)oldCanvasDom1.remove() + + document.removeEventListener("keydown", this.canvasKeyDown); + document.removeEventListener("keyup", this.canvasKeyUp); + + } + //删除选中元素 + deleteObject = ()=> { + if(!this.canvas.getActiveObjects()){ + return + } + let target = this.canvas.getActiveObjects() + target.forEach((item)=>{ + this.canvas.fxRemove(item, { + onComplete:()=>{ + this.canvas.discardActiveObject(); // 丢弃当前选中的对象 + this.canvas.renderAll(); // 重新渲染 Canvas + } + }) + this.canvas.FX_DURATION = 300 + }) + this.updateCanvasState('remove') + } + //复制粘贴 + copy(canvas){ + var activeObject = this.canvas.getActiveObject(); + if(!activeObject){ + return + } + activeObject.clone((cloned)=>{ + this._clipboard = cloned; + }) + } + paste = () => {//粘贴 + if(!this._clipboard){ + return + } + this._clipboard.clone(clonedObj => { + this.canvas.discardActiveObject() // 取消选择 + + // 设置新内容的坐标位置 + clonedObj.set({ + left: clonedObj.left + 10, + top: clonedObj.top + 10, + evented: true + }) + + if (clonedObj.type === 'activeSelection') { + // 活动选择需要一个对画布的引用 + clonedObj.canvas = canvas; + clonedObj.forEachObject((obj)=>{ + this.canvas.add(obj) + }) + + clonedObj.setCoords() + } else { + this.canvas.add(clonedObj) + } + this._clipboard.top += 10 + this._clipboard.left += 10 + this.canvas.setActiveObject(clonedObj) + this.canvas.requestRenderAll() + }) + this.updateCanvasState() + } + + //撤回反撤回 + //设置画布监听修改添加事件,用来做撤回功能 + updateCanvasState(str){ + const canvasAsJson = JSON.stringify(this.canvas.toJSON()); + if(str == 'loadingCompleted'){ + // this.reverseCanvasState.push(canvasAsJson); + } + this.normalCanvasState.push(canvasAsJson); + if (this.isLoadCanvas) { + this.reverseCanvasState = [] + this.isLoadCanvas = false; + this.canvasState = canvasAsJson + } + } + //撤回 + historyState(str){ + if(str == 'reverse' && this.reverseCanvasState.length > 0){//反撤回 + let obj = this.reverseCanvasState.pop() + // this.canvasState = this.reverseCanvasState[this.reverseCanvasState.length-1] + this.canvasState = obj + this.normalCanvasState.push(obj); + }else if(str == '' && this.normalCanvasState.length > 1){ + let obj = this.normalCanvasState.pop() + this.canvasState = this.normalCanvasState[this.normalCanvasState.length-1] + this.reverseCanvasState.push(obj); + this.isLoadCanvas = true; + }else{ + return + } + this.canvas.loadFromJSON(this.canvasState, () => {}); + } +} + +export default new myCanvas() \ No newline at end of file diff --git a/src/tool/https.js b/src/tool/https.js index 73e9b94e..17333089 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -183,6 +183,7 @@ export const Https = { updateUserGroupName:`/api/history/updateUserGroupName`, //History修改用户分组名 historyChoose:`/api/history/choose`, //History choose getDesignDetail:`/api/design/detail/getDetail`,//查询design详情 + designSingleWithGradient:`/api/design/detail/designSingleWithGradient`,//查询需要更新mask列表 getNextSysElement:'/api/design/detail/getNextSysElement',//切换系统的element detailPrintDot:'/api/design/detail/printDot',//print打点预览 designSingle:`/api/design/detail/designSingle`,//单个design @@ -225,6 +226,9 @@ export const Https = { generateResult:'/api/generate/result',//获取生成结果 generateLike:'/api/generate/like',//喜欢ganerate图片 generateDislike:'/api/generate/dislike',//喜欢ganerate图片 + imageToSketch:'/api/generate/imageToSketch',//成品图转为线稿 + modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存 + elementUpload:`/api/element/upload`,//上传图片 // oldHis:`/oldHis/history/queryUserGroup`,//上传图片 sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片 diff --git a/src/views/HomeRecommend.vue b/src/views/HomeRecommend.vue index 921f6016..2626559d 100644 --- a/src/views/HomeRecommend.vue +++ b/src/views/HomeRecommend.vue @@ -26,7 +26,7 @@

DESIGN
AIDA

- Slooming
+ Blooming
Your Creativity
diff --git a/src/views/HomeView/HomeView.vue b/src/views/HomeView/HomeView.vue index f24182c8..23dc4baf 100644 --- a/src/views/HomeView/HomeView.vue +++ b/src/views/HomeView/HomeView.vue @@ -1,6 +1,8 @@ @@ -229,6 +230,7 @@ import CollectionModal from "@/component/HomePage/collectionModal.vue"; import NewCollectionReview from "@/component/HomePage/NewCollectionReview.vue"; import ExportNewCoolection from "@/component/HomePage/ExportNewCoolection.vue"; import productImg from "@/component/HomePage/productImg.vue"; +import generalCanvas from "@/component/modules/generalCanvas.vue"; import affiche from "@/component/HomePage/affiche.vue"; import DesignDetail from "@/component/Detail/DesignDetail.vue"; // import RobotAssist from "@/component/HomePage/RobotAssist.vue"; @@ -256,7 +258,8 @@ export default defineComponent({ affiche, // RobotAssist, draggable, - productImg + productImg, + generalCanvas }, props:{ getLangIsShowMark:{ diff --git a/src/views/HomeView/library.vue b/src/views/HomeView/library.vue index 81901643..cef7adf0 100644 --- a/src/views/HomeView/library.vue +++ b/src/views/HomeView/library.vue @@ -128,7 +128,7 @@ :clearable="true" :placeholder="$t('LibraryPage.Select')" :max-collapse-tags=3 - :props="props" + :props="prop" :collapse-tags-tooltip="true" ref="cascader" popper-class="libraryPageCascader" @@ -342,12 +342,9 @@ -
- - - - -
+
+ +
@@ -355,7 +352,7 @@