diff --git a/.env.dev b/.env.dev
index d5d9d7c0..d5889047 100644
--- a/.env.dev
+++ b/.env.dev
@@ -7,6 +7,6 @@ VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
# 佩佩
-# 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'
+VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
diff --git a/src/assets/style/style.css b/src/assets/style/style.css
index 58b943b0..2d9828e3 100644
--- a/src/assets/style/style.css
+++ b/src/assets/style/style.css
@@ -116,9 +116,15 @@ li {
border-radius: 5px;
padding: 0.6rem 0.5rem;
}
+.select_block {
+ height: 4rem;
+}
+.select_block .ant-select {
+ height: 100%;
+}
.select_block .ant-select:not(.ant-select-customize-input) .ant-select-selector {
background: transparent;
- height: 4rem;
+ height: 95%;
border: 0.1rem solid rgba(0, 0, 0, 0) !important;
border-radius: 0;
box-shadow: none !important;
@@ -467,6 +473,9 @@ li {
top: auto;
margin: 0 9rem;
}
+.ant-modal {
+ box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);
+}
.ant-modal-confirm-confirm .ant-modal-content {
border-radius: 1rem;
}
@@ -609,8 +618,6 @@ li {
.generalModel .ant-modal-body {
padding: 0;
height: calc(65rem*1.2);
-}
-.generalModel .ant-modal-body {
padding: calc(4rem*1.2) calc(5rem*1.2);
}
.generalModel .fi-rr-down-to-line,
@@ -937,14 +944,17 @@ li {
height: 2.2rem;
align-items: center;
}
-.pin_block .ant-checkbox-wrapper span {
+.pin_block .ant-checkbox-wrapper > span {
+ height: 100%;
+}
+.pin_block .ant-checkbox-wrapper > span {
font-size: 1.4rem;
line-height: 2.3rem;
}
-.pin_block .ant-checkbox-wrapper span .ant-checkbox-input::after {
+.pin_block .ant-checkbox-wrapper > span .ant-checkbox-input::after {
height: auto;
}
-.pin_block .ant-checkbox-wrapper span.ant-checkbox-checked::after {
+.pin_block .ant-checkbox-wrapper > span.ant-checkbox-checked::after {
border: 1px solid rgba(0, 0, 0, 0);
}
.ant-checkbox-inner {
@@ -1230,7 +1240,9 @@ li {
}
.designOpenrtion_modal .design_closeIcon,
.designOpenrtionMobile_modal .design_closeIcon,
-.design_detail_modal_component .design_closeIcon {
+.design_detail_modal_component .design_closeIcon,
+.designElements_modal .design_closeIcon,
+.designElementsMobile_modal .design_closeIcon {
top: 2rem;
right: 2rem;
cursor: pointer;
@@ -1243,7 +1255,9 @@ li {
}
.designOpenrtion_modal .design_closeIcon .fi-rr-cross-small::before,
.designOpenrtionMobile_modal .design_closeIcon .fi-rr-cross-small::before,
-.design_detail_modal_component .design_closeIcon .fi-rr-cross-small::before {
+.design_detail_modal_component .design_closeIcon .fi-rr-cross-small::before,
+.designElements_modal .design_closeIcon .fi-rr-cross-small::before,
+.designElementsMobile_modal .design_closeIcon .fi-rr-cross-small::before {
padding: 0.2rem;
border-radius: 5px;
border: solid 2px rgba(0, 0, 0, 0.25);
@@ -1252,33 +1266,41 @@ li {
}
.designOpenrtion_modal .design_closeIcon.collection_closeIcon:hover .fi-rr-cross-small::before,
.designOpenrtionMobile_modal .design_closeIcon.collection_closeIcon:hover .fi-rr-cross-small::before,
-.design_detail_modal_component .design_closeIcon.collection_closeIcon:hover .fi-rr-cross-small::before {
+.design_detail_modal_component .design_closeIcon.collection_closeIcon:hover .fi-rr-cross-small::before,
+.designElements_modal .design_closeIcon.collection_closeIcon:hover .fi-rr-cross-small::before,
+.designElementsMobile_modal .design_closeIcon.collection_closeIcon:hover .fi-rr-cross-small::before {
border: solid 2px rgba(0, 0, 0, 0.55);
color: #000000;
}
.design_detail_modal_component .ant-upload-list-picture-card-container,
.designOpenrtion_modal .ant-upload-list-picture-card-container,
+.designElements_modal .ant-upload-list-picture-card-container,
.UpgradePlan_modal .ant-upload-list-picture-card-container,
.refund_reason .ant-upload-list-picture-card-container,
.Export .ant-upload-list-picture-card-container,
-.designOpenrtionMobile_modal .ant-upload-list-picture-card-container {
+.designOpenrtionMobile_modal .ant-upload-list-picture-card-container,
+.designElementsMobile_modal .ant-upload-list-picture-card-container {
display: none !important;
}
.design_detail_modal_component .ant-upload-picture-card-wrapper,
.designOpenrtion_modal .ant-upload-picture-card-wrapper,
+.designElements_modal .ant-upload-picture-card-wrapper,
.UpgradePlan_modal .ant-upload-picture-card-wrapper,
.refund_reason .ant-upload-picture-card-wrapper,
.Export .ant-upload-picture-card-wrapper,
-.designOpenrtionMobile_modal .ant-upload-picture-card-wrapper {
+.designOpenrtionMobile_modal .ant-upload-picture-card-wrapper,
+.designElementsMobile_modal .ant-upload-picture-card-wrapper {
width: auto;
vertical-align: top;
}
.design_detail_modal_component .subitOkPreviewBtn,
.designOpenrtion_modal .subitOkPreviewBtn,
+.designElements_modal .subitOkPreviewBtn,
.UpgradePlan_modal .subitOkPreviewBtn,
.refund_reason .subitOkPreviewBtn,
.Export .subitOkPreviewBtn,
-.designOpenrtionMobile_modal .subitOkPreviewBtn {
+.designOpenrtionMobile_modal .subitOkPreviewBtn,
+.designElementsMobile_modal .subitOkPreviewBtn {
background-color: #38205b;
color: #fff;
cursor: pointer;
@@ -1304,13 +1326,19 @@ i {
opacity: 0.5;
transform: scale(0.9);
}
+input[type=number]::-webkit-inner-spin-button,
+input[type=number]::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
textarea:focus {
outline: none;
/* 清除默认焦点样式 */
}
.collection_modal_body .input_border,
.design_detail_modal_component .input_border,
-.library_page .input_border {
+.library_page .input_border,
+.productImg_modal .input_border {
z-index: 2;
display: flex;
align-items: center;
@@ -1323,7 +1351,8 @@ textarea:focus {
}
.collection_modal_body .input_border .input_box,
.design_detail_modal_component .input_border .input_box,
-.library_page .input_border .input_box {
+.library_page .input_border .input_box,
+.productImg_modal .input_border .input_box {
position: relative;
z-index: 2;
flex: 1;
@@ -1333,35 +1362,41 @@ textarea:focus {
}
.collection_modal_body .input_border .input_box .inputShowText,
.design_detail_modal_component .input_border .input_box .inputShowText,
-.library_page .input_border .input_box .inputShowText {
+.library_page .input_border .input_box .inputShowText,
+.productImg_modal .input_border .input_box .inputShowText {
width: 100%;
display: none;
}
.collection_modal_body .input_border .input_box.active .input_box_btnBox,
.design_detail_modal_component .input_border .input_box.active .input_box_btnBox,
.library_page .input_border .input_box.active .input_box_btnBox,
+.productImg_modal .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 {
+.library_page .input_border .input_box.active textarea,
+.productImg_modal .input_border .input_box.active textarea {
border: 1px solid #ff0001;
box-shadow: 0px 0px 3px 1px rgba(255, 0, 0, 0.2);
}
.collection_modal_body .input_border .input_box.active span,
.design_detail_modal_component .input_border .input_box.active span,
-.library_page .input_border .input_box.active span {
+.library_page .input_border .input_box.active span,
+.productImg_modal .input_border .input_box.active span {
opacity: 1;
display: block;
color: rgba(255, 0, 0.7);
}
.collection_modal_body .input_border .search_keyword,
.design_detail_modal_component .input_border .search_keyword,
-.library_page .input_border .search_keyword {
+.library_page .input_border .search_keyword,
+.productImg_modal .input_border .search_keyword {
height: 0;
flex-basis: 100%;
}
.collection_modal_body .input_border .search_keyword .search_keyword_center,
.design_detail_modal_component .input_border .search_keyword .search_keyword_center,
-.library_page .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 {
justify-content: space-between;
display: flex;
width: var(--width);
@@ -1377,7 +1412,8 @@ textarea:focus {
}
.collection_modal_body .input_border .search_keyword .search_keyword_center .search_keyword_center_left,
.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 {
+.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 {
display: flex;
overflow: hidden;
flex: 1;
@@ -1385,7 +1421,8 @@ textarea:focus {
}
.collection_modal_body .input_border .search_keyword .search_keyword_center .search_keyword_center_item,
.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 {
+.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 {
border-radius: 0.4rem;
border: solid 1px #39215b;
background-color: #8156bd;
@@ -1399,12 +1436,14 @@ textarea:focus {
}
.collection_modal_body .input_border .search_keyword .search_keyword_center .search_keyword_center_item:last-child,
.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 {
+.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 {
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 {
+.library_page .input_border .input_box_btnBox,
+.productImg_modal .input_border .input_box_btnBox {
border: calc(0.1rem*1.2) solid #F1F1F1;
width: var(--width);
display: flex;
@@ -1412,18 +1451,31 @@ textarea:focus {
}
.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 {
+.library_page .input_border .input_box_btnBox .ant-spin-text,
+.productImg_modal .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 {
+ padding: 0;
+ width: 4rem;
+ text-align: center;
+ font-size: 1.2rem;
+ border-right: calc(0.1rem*1.2) solid #F1F1F1;
+}
.collection_modal_body .input_border .upload_item .upload_file_item,
.design_detail_modal_component .input_border .upload_item .upload_file_item,
-.library_page .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 {
width: 8rem;
height: 8rem;
}
.collection_modal_body .input_border input,
.design_detail_modal_component .input_border input,
-.library_page .input_border input {
+.library_page .input_border input,
+.productImg_modal .input_border input {
width: 100%;
border-radius: calc(0.5rem*1.2);
border: 1px solid rgba(0, 0, 0, 0.15);
@@ -1434,32 +1486,38 @@ textarea:focus {
}
.collection_modal_body .input_border inputinput:-moz-placeholder,
.design_detail_modal_component .input_border inputinput:-moz-placeholder,
-.library_page .input_border inputinput:-moz-placeholder {
+.library_page .input_border inputinput:-moz-placeholder,
+.productImg_modal .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 {
+.library_page .input_border inputinput:-ms-input-placeholder,
+.productImg_modal .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 {
+.library_page .input_border inputinput::-webkit-input-placeholder,
+.productImg_modal .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 {
+.library_page .input_border input.forbidden,
+.productImg_modal .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 {
+.library_page .input_border .input_box_btnBox_upImg,
+.productImg_modal .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 {
+.library_page .input_border .fi,
+.productImg_modal .input_border .fi {
margin-right: 1rem;
display: flex;
cursor: pointer;
@@ -1473,23 +1531,27 @@ textarea:focus {
}
.collection_modal_body .input_border .fi.fi-br-loading,
.design_detail_modal_component .input_border .fi.fi-br-loading,
-.library_page .input_border .fi.fi-br-loading {
+.library_page .input_border .fi.fi-br-loading,
+.productImg_modal .input_border .fi.fi-br-loading {
height: 100%;
background-color: rgba(0, 0, 0, 0);
}
.collection_modal_body .input_border .fi.active,
.design_detail_modal_component .input_border .fi.active,
-.library_page .input_border .fi.active {
+.library_page .input_border .fi.active,
+.productImg_modal .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 {
+.library_page .input_border .fi.forbidden,
+.productImg_modal .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 {
+.library_page .input_border .search_upImg,
+.productImg_modal .input_border .search_upImg {
width: 4rem;
height: 100%;
position: absolute;
@@ -1498,20 +1560,23 @@ textarea:focus {
}
.collection_modal_body .input_border .search_upImg span,
.design_detail_modal_component .input_border .search_upImg span,
-.library_page .input_border .search_upImg span {
+.library_page .input_border .search_upImg span,
+.productImg_modal .input_border .search_upImg span {
position: absolute;
width: 100%;
}
.collection_modal_body .input_border .search_upImg .ant-upload-select-picture-card,
.design_detail_modal_component .input_border .search_upImg .ant-upload-select-picture-card,
-.library_page .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 {
width: 100%;
height: 100%;
display: block !important;
}
.collection_modal_body .input_border .search_textarea,
.design_detail_modal_component .input_border .search_textarea,
-.library_page .input_border .search_textarea {
+.library_page .input_border .search_textarea,
+.productImg_modal .input_border .search_textarea {
z-index: 3;
height: auto;
position: absolute;
@@ -1525,18 +1590,21 @@ textarea:focus {
}
.collection_modal_body .input_border .generage_btn,
.design_detail_modal_component .input_border .generage_btn,
-.library_page .input_border .generage_btn {
+.library_page .input_border .generage_btn,
+.productImg_modal .input_border .generage_btn {
margin-left: 2rem;
}
.collection_modal_body .upload_item,
.design_detail_modal_component .upload_item,
-.library_page .upload_item {
+.library_page .upload_item,
+.productImg_modal .upload_item {
display: flex;
flex-wrap: wrap;
}
.collection_modal_body .upload_item .upload_file_item,
.design_detail_modal_component .upload_item .upload_file_item,
-.library_page .upload_item .upload_file_item {
+.library_page .upload_item .upload_file_item,
+.productImg_modal .upload_item .upload_file_item {
margin: 0 calc(2rem*1.2) calc(2rem*1.2) 0;
display: inline-block;
width: calc(10rem*1.2);
@@ -1548,24 +1616,28 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item.active,
.design_detail_modal_component .upload_item .upload_file_item.active,
-.library_page .upload_item .upload_file_item.active {
+.library_page .upload_item .upload_file_item.active,
+.productImg_modal .upload_item .upload_file_item.active {
opacity: 0.5;
border-radius: calc(1rem*1.2);
transform: scale(0.9);
}
.collection_modal_body .upload_item .upload_file_item.active .delete_file_block,
.design_detail_modal_component .upload_item .upload_file_item.active .delete_file_block,
-.library_page .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 {
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 {
+.library_page .upload_item .upload_file_item.active .operate_file_block,
+.productImg_modal .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 {
+.library_page .upload_item .upload_file_item.upload_component,
+.productImg_modal .upload_item .upload_file_item.upload_component {
border: none;
display: flex;
align-items: center;
@@ -1573,7 +1645,8 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item :deep(.ant-upload-picture-card-wrapper),
.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) {
+.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) {
position: absolute;
top: 50%;
left: 50%;
@@ -1581,7 +1654,8 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item :deep(.ant-upload-select-picture-card),
.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) {
+.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) {
width: calc(6rem*1.2);
height: calc(6rem*1.2);
border: calc(0.3rem*1.2) solid #ededed;
@@ -1590,7 +1664,8 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item .upload_file_item_content,
.design_detail_modal_component .upload_item .upload_file_item .upload_file_item_content,
-.library_page .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 {
display: flex;
align-items: center;
justify-content: center;
@@ -1600,17 +1675,20 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item .upload_file_item_content:hover div,
.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 {
+.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 {
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 {
+.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 {
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 {
+.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 {
display: block;
height: 100%;
width: auto;
@@ -1619,7 +1697,8 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item .upload_file_item_content .delete_file_block,
.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 {
+.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 {
display: none;
width: 100%;
cursor: pointer;
@@ -1635,7 +1714,8 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop,
.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 {
+.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 {
width: calc(3.2rem*1.2);
height: calc(3.2rem*1.2);
background: rgba(0, 0, 0, 0.6);
@@ -1649,18 +1729,21 @@ textarea:focus {
}
.collection_modal_body .upload_item .upload_file_item .upload_file_item_content .delete_file_block.rightTop .icon-shanchu,
.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 {
+.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 {
font-size: calc(1.6rem*1.2);
color: #fff;
}
.collection_modal_body .upload_item .upload_file_item .upload_img_icon,
.design_detail_modal_component .upload_item .upload_file_item .upload_img_icon,
-.library_page .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 {
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 {
+.library_page .upload_item .upload_file_item:last-child,
+.productImg_modal .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 10c7e9a3..4e431564 100644
--- a/src/assets/style/style.less
+++ b/src/assets/style/style.less
@@ -127,9 +127,13 @@ input:focus{
}
.select_block{
+ height: 4rem;
+ .ant-select{
+ height: 100%;
+ }
.ant-select:not(.ant-select-customize-input) .ant-select-selector{
background: transparent;
- height: 4rem;
+ height: 95%;
border: 0.1rem solid rgba(0,0,0,0) !important;
// border: 0.1rem solid #000 !important;
border-radius: 0;
@@ -533,6 +537,7 @@ input:focus{
//弹窗公共样式
.ant-modal{
+ box-shadow: 0px 0px 6px rgba(0, 0, 0, .2);
&.ant-modal-confirm{
&.ant-modal-confirm-confirm{
// top: 50%;
@@ -696,13 +701,10 @@ input:focus{
// height: calc(65vh - 6.4rem);
height: calc(65rem*1.2);
// background-color: #181818;
+ padding: calc(4rem*1.2) calc(5rem*1.2);
}
.ant-modal-btn{
- }
- .ant-modal-body{
- padding: calc(4rem*1.2) calc(5rem*1.2);
-
}
.fi-rr-down-to-line,.fi-rr-arrow-small-right,.fi-rr-arrow-small-left{
font-size: 2rem;
@@ -1068,7 +1070,10 @@ input:focus{
.ant-checkbox-wrapper{
height: 2.2rem;
align-items: center;
- span{
+ >span{
+ height: 100%;
+ }
+ >span{
font-size: 1.4rem;
line-height: 2.3rem;
.ant-checkbox-input::after{
@@ -1339,7 +1344,7 @@ input:focus{
}
}
//desing 关闭按钮
-.designOpenrtion_modal,.designOpenrtionMobile_modal,.design_detail_modal_component{
+.designOpenrtion_modal,.designOpenrtionMobile_modal,.design_detail_modal_component,.designElements_modal,.designElementsMobile_modal{
.design_closeIcon{
top: 2rem;
right: 2rem;
@@ -1363,7 +1368,7 @@ input:focus{
}
}
}
-.design_detail_modal_component,.designOpenrtion_modal,.UpgradePlan_modal,.refund_reason,.Export,.designOpenrtionMobile_modal{
+.design_detail_modal_component,.designOpenrtion_modal,.designElements_modal,.UpgradePlan_modal,.refund_reason,.Export,.designOpenrtionMobile_modal,.designElementsMobile_modal{
.ant-upload-list-picture-card-container{
display: none !important;
}
@@ -1402,12 +1407,16 @@ i{
opacity: .5;
transform: scale(.9);
}
-
+input[type=number]::-webkit-inner-spin-button,
+input[type=number]::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
textarea:focus{
outline: none; /* 清除默认焦点样式 */
}
//设计input和上传按钮样式
-.collection_modal_body,.design_detail_modal_component,.library_page,{
+.collection_modal_body,.design_detail_modal_component,.library_page,.productImg_modal{
.input_border{
z-index: 2;
display: flex;
@@ -1490,6 +1499,13 @@ textarea:focus{
.ant-spin-text{
font-size: 1.2rem;
}
+ .search_seed{
+ padding: 0;
+ width: 4rem;
+ text-align: center;
+ font-size: 1.2rem;
+ border-right: calc(0.1rem* 1.2) solid #F1F1F1;
+ }
}
.upload_item{
.upload_file_item{
diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue
index d0252ac1..bd2fa180 100644
--- a/src/component/Detail/DesignDetail.vue
+++ b/src/component/Detail/DesignDetail.vue
@@ -79,6 +79,7 @@
{{ $t('DesignDetail.CurrentApparel') }}
+
@@ -93,12 +94,14 @@
-
+
+
+
+
-
-
+
@@ -139,6 +154,7 @@
+
@@ -163,6 +179,7 @@ import { openGuide,driverObj__ } from "@/tool/guide";
import GO from '@/tool/GO';
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
+import addDetails from '@/component/Detail/addDetails.vue'
export default defineComponent({
components:{
Draggable,
@@ -170,6 +187,7 @@ export default defineComponent({
setDesignItem,
magnifyingGlass,
setDesignItemMobile,
+ addDetails,
},
setup() {
const store = useStore();
@@ -212,6 +230,11 @@ export default defineComponent({
provide('body',body)
let moible:any = isMoible()
provide('moible',moible)
+ let exhibitionList = ref({
+ print:[],
+ elements:[],
+ })
+ provide('exhibitionList',exhibitionList)
let {t} = useI18n()
//创建单件衣服
let setClothes:any = ref()
@@ -239,6 +262,7 @@ export default defineComponent({
revocationShow,
driver__,
moible,
+ exhibitionList,
t,
setClothes,
deleteShow,
@@ -324,7 +348,21 @@ export default defineComponent({
handler: function(newval) {
// this.removeRevocation()
}
- }
+ },
+ 'current.printObject.prints':{
+ handler(newVal,oldVal){
+ if(newVal && newVal.length > 0){
+ this.exhibitionList.print = this.setExhibitionList(newVal)
+ }
+ }
+ },
+ 'current.trims.prints':{
+ handler(newVal,oldVal){
+ if(newVal && newVal.length > 0){
+ this.exhibitionList.elements = this.setExhibitionList(newVal)
+ }
+ }
+ },
},
provide() {
return {
@@ -387,7 +425,10 @@ export default defineComponent({
}
}
},
-
+ addDetail(){
+ let addDetails:any = this.$refs.addDetails
+ addDetails.init(this.current,this.currentIndex)
+ },
closeModal(submit:any){
if(this.designShowPrview == 1){
if(this.ifSubmit && submit == ''){
@@ -423,7 +464,19 @@ export default defineComponent({
// this.designItemDetailUrl = {}
}
},
-
+ //切换当前展示的是印花还是elements
+ setExhibitionList(arr:any){
+ const seen = new Map();
+ return arr.filter((obj:any, index:any, self:any) => {
+ const key = obj.minIOPath; // 替换成你想要去重的属性名
+ if (seen.has(key)) {
+ return false;
+ } else {
+ seen.set(key, true);
+ return true;
+ }
+ });
+ },
showDesignDetailModal(data:any,str:string){
this.moible = isMoible()
this.designItemId = data.design.designItemId
@@ -443,7 +496,7 @@ export default defineComponent({
item.layersObject[1] = a
}
if(item.printObject.prints == null){
- item.printObject.prints = [{}]
+ item.printObject.prints = []
}else{
item.printObject.prints.forEach((element:any) => {
if(!element.designType){
@@ -674,6 +727,8 @@ export default defineComponent({
id:item.id,
path:item.minIOPath,
gradient:{},
+ trims:item.trims,
+ sketchString:item.sketchString,
changed:item.changed?item.changed:false,
designType:item.designType?item.designType:"Library",
offset:item.layersObject?.[1]?.offset == null?[0,0]:item.layersObject[1].offset,
@@ -711,6 +766,7 @@ export default defineComponent({
gender:workspace?.sex,
designSingleItemDTOList:clothes,
isPreview:false,
+ sketchString:'',
ifSubmit:designItemDetail.isPreview,
processId:String(this.userInfo?.userId),
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
@@ -772,6 +828,7 @@ export default defineComponent({
img.onload = () => {
imgWidth = img.width
resolve(img)
+ img.remove()
};
img.onerror = reject;
img.src = url;
@@ -852,38 +909,46 @@ export default defineComponent({
}else{
this.deleteShow = false
- let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
-
let data:any = this.setSubmitItem('preview',true)
if(!this.deleteItemShow){
return
}
- this.loadingShow = true
- Https.axiosPost(Https.httpUrls.designSingle, data).then(
- (rv) => {
- this.designItemDetail.currentFullBodyView = rv.currentFullBodyView
- this.designItemDetail.ifSubmit = true
- this.loadingShow = false
- // if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){
- // this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1)
- // }
- if(data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1] && !data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1].id){
- data.designSingleItemDTOList.split(data.designSingleItemDTOList.legnth-1,1)
- }
- this.store.commit("setDesignItemDetail", designItemDetail);
- console.log(123);
- this.store.commit("setDesignPreviewData", data);
- this.setRevocation(designItemDetail,data)
- this.deleteItemShow = false
- }
- ).catch(res=>{
- this.loadingShow = false
- });
+ this.setDesignSingle(data)
}
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.changePlace()
DesignDetailAlter.terminate()
},
+ setDesignSingle(data:any){
+ this.loadingShow = true
+ let designItemDetail = JSON.parse(JSON.stringify(this.designItemDetail))
+ Https.axiosPost(Https.httpUrls.designSingle, data).then(
+ (rv) => {
+ // this.current.minIOPath = rv.clothes[this.currentIndex].minIOPath
+ designItemDetail.clothes[this.currentIndex].minIOPath = rv.clothes[this.currentIndex].minIOPath
+ this.current.path = rv.clothes[this.currentIndex].minIOPath
+ designItemDetail.clothes[this.currentIndex].path = rv.clothes[this.currentIndex].path
+ designItemDetail.clothes[this.currentIndex].sketchString = ''
+ data.designSingleItemDTOList[this.currentIndex].sketchString =''
+ data.designSingleItemDTOList[this.currentIndex].path =rv.clothes[this.currentIndex].minIOPath
+ designItemDetail.currentFullBodyView = rv.currentFullBodyView
+ designItemDetail.ifSubmit = true
+ this.loadingShow = false
+ // if(this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1] && !this.designItemDetail.clothes[this.designItemDetail.clothes.legnth-1].id){
+ // this.designItemDetail.clothes.split(this.designItemDetail.clothes.legnth-1,1)
+ // }
+ if(data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1] && !data.designSingleItemDTOList[data.designSingleItemDTOList.legnth-1].id){
+ data.designSingleItemDTOList.split(data.designSingleItemDTOList.legnth-1,1)
+ }
+ this.store.commit("setDesignItemDetail", designItemDetail);
+ this.store.commit("setDesignPreviewData", data);
+ this.setRevocation(designItemDetail,data)
+ this.deleteItemShow = false
+ }
+ ).catch(res=>{
+ this.loadingShow = false
+ });
+ },
setDelete(num:number){
this.designItemDetail.clothes.splice(num,1)
this.deleteItemShow = true
@@ -942,12 +1007,16 @@ export default defineComponent({
"color": color,
gradient:gradient,
priority:10,
+ trims:{
+ "ifSingle": null,
+ "prints":null,
+ },
"printObject": {
"ifSingle": null,
"prints": [
- {}
]
},
+ sketchString:'',
"layersObject": [
]
}
@@ -1001,17 +1070,19 @@ export default defineComponent({
}
});
}
+ this.current.sketchString = ''
this.currentIndex = this.currentIndex>0?this.currentIndex:0
data.designSingleItemDTOList[this.currentIndex] = {
color:`${this.current.color.r} ${this.current.color.g} ${this.current.color.b}`,
-
id:this.current.id?this.current.id:'',
changed:this.current.changed?this.current.changed:false,
designType:this.current.designType?this.current.designType:'Library',
path:this.current.minIOPath?this.current.minIOPath:'',
offset:this.current.layersObject?.[1]?.offset?this.current.layersObject[1].offset:[0,0],
priority:this.current.priority,
+ trims:this.current.trims,
scale:this.current.layersObject?.[1]?.scale?this.current.layersObject[1].scale:[1,1],
+ sketchString:'',
printObject:{
ifSingle:this.current?.printObject?.ifSingle == null ? false : this.current?.printObject?.ifSingle,
// prints:this.current?.printObject[0]?.path == null ? [] : [{
@@ -1031,12 +1102,21 @@ export default defineComponent({
this.store.commit('setDesignPreviewData',data)
let DesignDetailAlter:any = this.$refs.DesignDetailAlter
DesignDetailAlter.changePlace()
+
if(this.driver__.driver){
nextTick().then(()=>{
driverObj__.moveNext();
})
}
},
+ setSloganData(data:any){
+ this.current.sketchString = data
+
+ // let designData:any = this.setSubmitItem('preview',true)
+ let designData = this.store.state.DesignDetailModule.designPreviewData
+ designData.designSingleItemDTOList[this.currentIndex].sketchString = data
+ this.setDesignSingle(designData)
+ }
//重新设计
// redesignItem(){
// let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
@@ -1356,20 +1436,34 @@ export default defineComponent({
display: flex;
flex-direction: column;
overflow: hidden;
+ overflow-y: auto;
.hideCursor{
*{
cursor: not-allowed !important;
}
}
+ &.detail_modal_right_top::-webkit-scrollbar{display: none;}
.clothes_detail_item{
// margin-bottom: 5rem*1.2);
position: relative;
- flex: 1;
+ height: 20rem;
+ // flex: 1;
+ flex-shrink: 0;
.centent_div{
display: flex;
cursor: pointer;
justify-content: center;
}
+ .centent_print{
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-content: space-between;
+ img{
+ width: 30%;
+ height: 30%;
+ margin-bottom: 1rem;
+ }
+ }
.centent{
cursor: pointer;
@@ -1386,11 +1480,18 @@ export default defineComponent({
font-size: var(--aida-fsize1-8);
color: #000000;
justify-content: space-between;
+ position: relative;
.icon-dangqianweizhi{
font-size: calc(1.8rem*1.2);
color: #000000;
margin-right: calc(1rem*1.2);
}
+ .fi-rs-pencil-paintbrush{
+ position: absolute;
+ right: 0;
+ top: 4rem;
+ cursor: pointer;
+ }
i{
font-size: var(--aida-fsize1-8);
display: flex;
@@ -1442,7 +1543,8 @@ export default defineComponent({
}
}
&.clothes_detail_item_print,
- &.clothes_detail_item_apparel{
+ &.clothes_detail_item_apparel,
+ &.clothes_detail_item_elements{
.fi-rr-picture{
display: flex;
align-items: center;
diff --git a/src/component/Detail/DesignDetailAlter.vue b/src/component/Detail/DesignDetailAlter.vue
index 2980df65..b66baf3f 100644
--- a/src/component/Detail/DesignDetailAlter.vue
+++ b/src/component/Detail/DesignDetailAlter.vue
@@ -1,24 +1,40 @@
-
+
-
-
{{ $t('DesignDetailAlter.Upload') }}
+
+ {{ $t('DesignDetailAlter.Upload') }}
+
+
+ {{ $t('DesignDetailAlter.Library') }}
+
-
- {{ $t('DesignDetailAlter.Library') }}
-
-
+
@@ -47,51 +63,7 @@
v-show="file?.status === 'done'"
>
-
-
-
+
-
+
@@ -288,7 +260,7 @@ import { useStore } from "vuex";
import { LoadingOutlined } from '@ant-design/icons-vue';
import { message,Upload} from 'ant-design-vue';
import { Sketch, Chrome} from '@ans1998/vue3-color'
-import {getUploadUrl,rgbToHsv} from '@/tool/util'
+import {getUploadUrl,rgbToHsv,isMoible} from '@/tool/util'
import DesignDetailEnd from './DesignDetailEnd.vue';
import { getCookie } from "@/tool/cookie";
import { openGuide,driverObj__ } from "@/tool/guide";
@@ -321,6 +293,11 @@ export default defineComponent({
let apparelList = ref([])
let printList = ref([])
let selectCode = ref('Sketchboard')
+ let designTypeList = ref([])
+ let printCatecoryList = computed(()=>{
+ return store.state.UserHabit.printType
+ })
+ let designType = ref('')
//颜色
let selectColor = ref({
rgba:{},
@@ -331,6 +308,9 @@ export default defineComponent({
let sketchCatecoryList = computed(()=>{
return store.state.Workspace.workspacePosition
})
+ let designElementsType = computed(()=>{
+ return store.state.UserHabit.designElementsType;
+ })
let colorList = ref([{},{},{},{},{},{},{},{},{}])
let selectIndex = ref(0)
let gradient = ref({
@@ -359,6 +339,7 @@ export default defineComponent({
})
provide('colorList',colorList)
provide('selectIndex',selectIndex)
+ provide('designTypeList',designTypeList)
let {t} = useI18n()
return{
store,
@@ -375,6 +356,10 @@ export default defineComponent({
printList,
selectCode,
+ designTypeList,
+ printCatecoryList,
+ designType,
+
type_,
select,
selectColor,
@@ -383,6 +368,7 @@ export default defineComponent({
driver__,
body,
sketchCatecoryList,
+ designElementsType,
colorList,
selectIndex,
gradient,
@@ -595,12 +581,22 @@ export default defineComponent({
this.selectCode = 'Sketchboard'
this.upload.level1Type = 'Sketchboard'
this.uploadList = this.apparelList
+ this.designTypeList = this.sketchCatecoryList
+ this.designType = this.designTypeList[0].value
}else if (num == 2){
this.selectCode = 'Printboard'
this.upload.level1Type = 'Printboard'
this.uploadList = this.printList
+ this.designTypeList = this.printCatecoryList
+ this.designType = this.designTypeList[0].value
+ }else if (num == 4){
+ this.selectCode = 'DesignElements'
+ this.upload.level1Type = 'DesignElements'
+ this.designTypeList = this.designElementsType
+ this.designType = this.designTypeList[0]?.value
+ this.openClick = 2
}
- if(num == 1 || num == 2){
+ if(num == 1 || num == 2 || num == 4){
this.clothesList = []
this.getLibraryList()
}
@@ -650,6 +646,7 @@ export default defineComponent({
(v) => v.status === "done"
);
this.uploadList = fileList
+ this.selectImgItem(this.uploadList[this.uploadList.length-1])
// this.store.commit("clearMoodTemplateId");
if(this.selectCode == 'Sketchboard'){
this.apparelList = this.uploadList
@@ -706,6 +703,7 @@ export default defineComponent({
// DesignDetailEnd.colorList = [{}]
DesignDetailEnd.sketchImg={}
this.terminate()
+ DesignDetailEnd.clearModal()
},
// this.getLibraryList('Moodboard')
// this.getLibraryList('Printboard')
@@ -721,39 +719,57 @@ export default defineComponent({
});
},
selectImgItem(imgData){
+ let DesignDetailEnd = this.$refs.DesignDetailEnd
+ imgData.categoryValue = imgData.level2TypeEnum.value
+ imgData.category = imgData.level2TypeEnum.name
if(this.selectCode == 'Sketchboard'){
// this.current.id_ = imgData.id
// this.current.path = imgData.url
- let DesignDetailEnd = this.$refs.DesignDetailEnd
DesignDetailEnd.setSketchImg(imgData)
// DesignDetailEnd.sketchImg.id_ = imgData.id
// DesignDetailEnd.sketchImg.path = imgData.url
- }else{
- this.current.printObject.path = imgData?.url
- this.current.printObject.id = imgData?.id
- this.current.printObject.designType = imgData?.designType
- this.current.printObject.minIOPath = imgData.minIOPath
- this.current.printObject.prints = [{
- minIOPath:imgData.minIOPath,
- path:imgData?.url,
- designType: imgData?.designType
- }]
- if(this.driver__.driver){
- nextTick().then(()=>{
- driverObj__.moveNext();
- })
- }
+ }else if(this.selectCode == 'Printboard'){
+ // this.current.printObject.path = imgData?.url
+ // this.current.printObject.id = imgData?.id
+ // this.current.printObject.designType = imgData?.designType
+ // this.current.printObject.minIOPath = imgData.minIOPath
+ // this.current.printObject.prints = [{
+ // minIOPath:imgData.minIOPath,
+ // path:imgData?.url,
+ // designType: imgData?.designType
+ // }]
+ // if(this.driver__.driver){
+ // nextTick().then(()=>{
+ // driverObj__.moveNext();
+ // })
+ // }
+ imgData.path = imgData.url
+ DesignDetailEnd.printsList.push(imgData)
// console.log(this.current.printObject,imgData);
+ }else if(this.selectCode == 'DesignElements'){
+ imgData.path = imgData.url
+ DesignDetailEnd.elementsList.push(imgData)
}
},
+ handleChange(){
+ this.currentPage = 1
+ this.clothesList = []
+ this.getLibraryList('')
+ },
//请求我的印花&&模型
getLibraryList(){
- let type = this.body?this.current.type:''
+ let level2Type = ''
+ if(this.selectCode == 'Sketchboard' || this.selectCode == 'Printboard' || this.selectCode == 'DesignElements'){
+ level2Type = this.designType
+ }
+ let type = this.body?this.current.type:level2Type
let workspace = this.store.state.Workspace.workspace
let data = {
+ // level1Type:'Printboard',
level1Type:this.selectCode,
- level2Type:this.selectCode == 'Sketchboard'?type:'',
+ // level2Type:'Pattern',
+ level2Type:type,
modelSex:workspace?.sex,
page:this.currentPage,
pictureName:this.searchPictureName,
@@ -783,6 +799,7 @@ export default defineComponent({
//衣服
open(num) {
+ if(num == 1 && this.type_ ==4)return
this.openClick = num;
if(num ==2 ){
this.getLibraryList()
@@ -805,7 +822,7 @@ export default defineComponent({
if (!isJpgOrPng) {
message.info(this.t('DesignDetailAlter.jsContent4'));
}
- const isLt2M = file.size / 1024 / 1024 < 3;
+ const isLt2M = file.size / 1024 / 1024 < 5;
if (!isLt2M) {
message.info(this.t('DesignDetailAlter.jsContent5'));
}
@@ -905,7 +922,7 @@ export default defineComponent({
let hex = this.rgbaToHex(rgba)
this.selectColor = {rgba:gradientRgba,hex:hex} //顔色选择器默认颜色
// isMoible() true为移动端
- let gradientWidth = document.querySelector('.colorboard_upload_modal .color_setting_operate_bg').clientWidth
+ let gradientWidth = document.querySelector('.detail_modal_body_select .color_setting_operate_bg').clientWidth
let position = {
x:moible?event.touches[0].screenX:event?.x,
left:event.target.style.left?event.target.style.left.split('%')[0]:0
@@ -1098,6 +1115,7 @@ export default defineComponent({
this.selectColorList = selectColorList
// this.getHsvColor(selectColorList)
this.selectColor = {rgba:{r:color[0],g:color[1],b:color[2],a:1},hex:colorHex}
+ img.remove()
};
@@ -1136,6 +1154,19 @@ export default defineComponent({
}
.detail_Library{
+ .select_block{
+ border: calc(0.1rem* 1.2) solid #F1F1F1;
+ // margin-right: calc(2.3rem*1.2);
+ height: 4rem;
+ width: calc(20rem*1.2);
+ margin-bottom: 1rem;
+ .ant-select{
+ width: 90%;
+ }
+ .ant-select:not(.ant-select-customize-input) .ant-select-selector{
+ width: 100%;
+ }
+ }
.content_search_block{
display: flex;
margin-bottom: calc(1rem*1.2);
@@ -1150,7 +1181,7 @@ export default defineComponent({
// font-size: 1.6rem*1.2);
font-size: calc(1.2rem*1.2);
font-weight: 400;
- height: calc(3rem*1.2);
+ height: 4rem;
&::placeholder {
color: #C2C2C2;
diff --git a/src/component/Detail/DesignDetailEnd.vue b/src/component/Detail/DesignDetailEnd.vue
index 641f3ad9..8c2fc6f8 100644
--- a/src/component/Detail/DesignDetailEnd.vue
+++ b/src/component/Detail/DesignDetailEnd.vue
@@ -1,70 +1,49 @@
-
+
{{ $t('DesignDetailEnd.NewApparel') }}
-
-
-
-
- {{ $t('DesignDetailEnd.NewPrint') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('DesignDetailEnd.Placement') }}
-
-
-
-
- {{ $t('DesignDetailEnd.Overall') }}
-
-
-
- {{ $t('DesignDetailEnd.Single') }}
-
-
-
-
-
-
+
-
-
+
+
+
+
+ {{ $t('DesignDetailEnd.NewPrint') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New Elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ $t('DesignDetailEnd.preview') }}
-
{{ $t('DesignDetailEnd.Layout') }}
-
{{ $t('DesignDetailEnd.preview') }}
+
{{ $t('DesignDetailEnd.Layout') }}
+
+
{{ $t('DesignDetailEnd.Layout') }}
+
+
+
@@ -102,15 +113,19 @@ import { useStore } from "vuex";
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'
import { useI18n } from 'vue-i18n';
+import sketchCategory from "@/component/HomePage/sketchCategory.vue";
export default defineComponent({
props: ["msg"],
components:{
- Draggable,Sketch,DesignPrintOperation,DesignPrintOperationMobile
+ Draggable,Sketch,DesignPrintOperation,DesignPrintOperationMobile,
+ DesignElementsOperation,DesignPrintMobile,sketchCategory
},
setup(prop) {
const store = useStore();
@@ -122,10 +137,9 @@ export default defineComponent({
let moible = inject('moible')//父组件传过来的数据
let designItemDetail = inject('designItemDetail')//父组件传过来的数据
let currentIndex = inject('currentIndex')//父组件传过来的数据
+ let designTypeList = inject('designTypeList')//父组件传过来的数据
let previewShow = ref(false)
//印花
- let overallSingle = ref(false)
- let systemDesignerPercentage = ref(30)
//颜色
// let colorList = ref([{}])
@@ -135,7 +149,12 @@ export default defineComponent({
//加载中
let loadingShow = ref(false)
+ let exhibitionList = inject('exhibitionList')
let {t} = useI18n()
+ let printsList = ref([])
+ let elementsList = ref([
+
+ ])
return{
store,
current,
@@ -145,14 +164,16 @@ export default defineComponent({
moible,
designItemDetail,
currentIndex,
+ designTypeList,
previewShow,
type_,
- overallSingle,
- systemDesignerPercentage,
colorList,
selectIndex,
loadingShow,
+ exhibitionList,
t,
+ printsList,
+ elementsList,
}
},
data(){
@@ -182,14 +203,40 @@ export default defineComponent({
}
}
},
+ watch: {
+ 'exhibitionList.print':{
+ handler(newVal,oldVal){
+ this.printsList = this.printsList.filter(objA => {
+ return !newVal.some(objB => objB.minIOPath === objA.minIOPath);
+ });
+ this.setExhibitionType('print')
+ }
+ },
+ 'exhibitionList.elements':{
+ handler(newVal,oldVal){
+ this.elementsList = this.elementsList.filter(objA => {
+ return !newVal.some(objB => objB.minIOPath === objA.minIOPath);
+ });
+ this.setExhibitionType('elements')
+ }
+ }
+ },
methods:{
+
//点击判断
init(num){
// this.current = JSON.parse(JSON.stringify(this.currentItem))
this.type_ = num
this.colorList[this.selectIndex] = this.$parent.selectColor
- this.overallSingle = this.current?.printObject?.ifSingle == null?false:this.current?.printObject?.ifSingle
- this.systemDesignerPercentage = this.current?.printObject?.ifSingle?this.current?.printObject?.prints[0].scale?this.current?.printObject?.prints[0].scale*100:100:100
+ if(num == 2){
+ this.setExhibitionType('print')
+ }else if(num == 4){
+ this.setExhibitionType('elements')
+ }
+ },
+ clearModal(){
+ this.elementsList = []
+ this.printsList = []
},
//模型
setSketchImg(v){
@@ -201,17 +248,22 @@ export default defineComponent({
this.sketchImg.designType = v.designType
},
//印花
- systemDesigner(num) {
- this.current.printObject.scale = num
- },
- setOveralSingle(){
- this.current.printObject.ifSingle = this.overallSingle
- },
- formatter(value) {
- return `${value*3}%`;
+ setExhibitionType(str){
+ this.exhibitionList[str].forEach((item,index)=>{
+ if(!item.categoryValue){
+ this.designTypeList.forEach((typeItem)=>{
+ if(item.level2Type == typeItem.value){
+ item.categoryValue = typeItem.name
+ item.category = typeItem.value
+ }
+
+ })
+ }
+ })
},
+
setPrint(){
- if(this.current?.printObject?.prints?.[0]?.path){
+ // if(this.current?.printObject?.prints?.[0]?.path){
let DesignPrintOperation = isMoible() ? this.$refs.DesignPrintOperationMobile : this.$refs.DesignPrintOperation
DesignPrintOperation.init()
if(this.driver__.driver){
@@ -219,9 +271,9 @@ export default defineComponent({
driverObj__.moveNext();
})
}
- }else{
- message.info(this.t('DesignDetailEnd.jsContent1'));
- }
+ // }else{
+ // message.info(this.t('DesignDetailEnd.jsContent1'));
+ // }
},
deleteFile(){
@@ -286,6 +338,23 @@ export default defineComponent({
// arr[index].id = this.sketchImg.id_? this.sketchImg.id_:this.current.id
return arr
},
+ deleteptints(item,index){
+ this.printsList.splice(index,1)
+ },
+ deleteSelectptints(item,index){
+ this.exhibitionList.print.splice(index,1)
+ },
+ deleteElements(item,index){
+ this.elementsList.splice(index,1)
+ },
+ deleteSelectElements(item,index){
+ this.exhibitionList.elements.splice(index,1)
+ },
+ setElemets(){
+ if(this.current.trims.prints && this.current.trims.prints.length == 0 && this.elementsList.length == 0)return message.info('请选择至少一张element')
+ let DesignElementsOperation = isMoible() ? this.$refs.DesignPrintMobile : this.$refs.DesignElementsOperation
+ DesignElementsOperation.init()
+ },
//提交
setPreview(){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
@@ -329,6 +398,8 @@ export default defineComponent({
}
let color = `${this.colorList[this.selectIndex].rgba.r} ${this.colorList[this.selectIndex].rgba.g} ${this.colorList[this.selectIndex].rgba.b}`
data.designSingleItemDTOList[index].color = color
+ }else if(this.type_ == 4){
+ data.designSingleItemDTOList[index].trims = this.current.trims
}
if(this.colorList[this.selectIndex].gradient){
let gradient = this.colorList[this.selectIndex].gradient
@@ -353,6 +424,7 @@ export default defineComponent({
delete designItemDetail.clothes[index].gradient
}
designItemDetail.clothes[index].designType = item.designType
+ designItemDetail.clothes[index].trims = item.trims
designItemDetail.clothes[index].layersObject = item.layersObject
designItemDetail.clothes[index].minIOPath = item.minIOPath
designItemDetail.clothes[index].path = item.path
@@ -544,6 +616,7 @@ export default defineComponent({
display: flex;
flex-wrap: wrap;
padding-left: calc(2rem*1.2);
+ align-content: flex-start;
&.modal_img::-webkit-scrollbar {
display: none;
}
@@ -590,6 +663,48 @@ export default defineComponent({
}
}
+ //elements
+ .result_apparel_elements{
+ height: 85%;
+ // height: 100%;
+ .modal_img{
+ height: calc(100%);
+ overflow-y: auto;
+ }
+ .modal_img_item{
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ height: auto;
+ border: none;
+ img{
+ width: 100%;
+ object-fit: cover;
+ }
+ .delete_file_block{
+ display: none;
+ width: calc(3.2rem*1.2);
+ height: calc(3.2rem*1.2);
+ background: rgba(0,0,0,0.6);
+ border-radius: calc(0.4rem*1.2);
+ position: absolute;
+ top: calc(0.9rem*1.2);
+ right: calc(0.9rem*1.2);
+ text-align: center;
+ line-height: calc(3.2rem*1.2);
+ left: auto;
+ cursor: pointer;
+ .icon-shanchu{
+ font-size: calc(1.6rem*1.2);
+ color: #fff;
+ }
+ }
+ &:hover .delete_file_block{
+ display: block;
+ }
+ }
+ }
.subitOkPreviewBtn{
bottom: calc(4rem*1.2);
position: absolute;
diff --git a/src/component/Detail/DesignElements.vue b/src/component/Detail/DesignElements.vue
new file mode 100644
index 00000000..78b41f26
--- /dev/null
+++ b/src/component/Detail/DesignElements.vue
@@ -0,0 +1,922 @@
+
+
+
+
+
+
{{ $t('DesignPrintOperation.Placement') }}
+
+
+
+
+
+
+
+
+
{{ $t('DesignPrintOperation.Random') }}
+
+
+
+
+
+
+
+
+
{{ $t('DesignPrintOperation.preview') }}
+
OK
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/component/Detail/DesignElementsMobile.vue b/src/component/Detail/DesignElementsMobile.vue
new file mode 100644
index 00000000..d12eea0e
--- /dev/null
+++ b/src/component/Detail/DesignElementsMobile.vue
@@ -0,0 +1,924 @@
+
+
+
+
+
+
{{ $t('DesignPrintOperation.Placement') }}
+
+
+
+
+
+
+
+
+
{{ $t('DesignPrintOperation.Random') }}
+
+
+
+
+
+
+
+
+
{{ $t('DesignPrintOperation.preview') }}
+
OK
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/component/Detail/DesignPrintOperation.vue b/src/component/Detail/DesignPrintOperation.vue
index 60759892..8c972701 100644
--- a/src/component/Detail/DesignPrintOperation.vue
+++ b/src/component/Detail/DesignPrintOperation.vue
@@ -38,10 +38,21 @@
+
+
+
+
+
+
+
+
+
{{ $t('DesignPrintOperation.Scale') }}
{{ $t('DesignPrintOperation.Random') }}
-
@@ -69,32 +73,40 @@
-
+
-
+ ref="content"
+ >
+
-
+
+
+
+
-
+
+
+
+
@@ -121,19 +133,30 @@ import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { useI18n } from "vue-i18n";
+import { remove } from "jszip";
export default defineComponent({
setup(prop) {
let designOpenrtion = ref(false);
- let designOpenrtionList = ref([])
+ let designOpenrtionList = ref([])//新增的元素
+ let designList = ref([])//已经存在的元素
+ let setOkData = ref([])
+ let exhibitionOpenrtionList = ref({
+ single:[],
+ overall:[],
+ })//展示的元素
let current = inject('current')//父组件传过来的数据
let driver__ = inject('driver__')
let setRevocation = inject('setRevocation')//父组件传过来的数据
- let overallSingle = ref(false)
+ let overallSingle = ref(true)
+ let stateOverallSingle = ref('single')
let systemDesignerPercentage = ref(0)
- let printAmount = ref(1)//印花数量
let printZIndex = ref(2)//印花优先级
- let printStyleList = ref([{
+ let printStyleList = ref({
+ single:[],
+ overall:[],
+ });
+ let currentPrintStyleList = ref({
centers:{
left:0,
top:0,
@@ -152,7 +175,7 @@ export default defineComponent({
rotateZ:0,
},
designOpenrtionBtn:false
- }]);
+ });
let direction = ref('')
let imgDom = ref()
@@ -173,13 +196,17 @@ export default defineComponent({
return {
designOpenrtion,
designOpenrtionList,
+ designList,
+ setOkData,
+ exhibitionOpenrtionList,
overallSingle,
+ stateOverallSingle,
systemDesignerPercentage,
current,
driver__,
- printAmount,
printZIndex,
printStyleList,
+ currentPrintStyleList,
direction,//判断点击的是li那个边
imgDom,
imgDomIndex,
@@ -211,8 +238,8 @@ export default defineComponent({
let num = 1
let x = 0
let y = 0
- num = value.instance.printStyleList[value.instance.imgDomIndex].transform.scale
- angle = value.instance.printStyleList[value.instance.imgDomIndex].transform.rotateZ
+ num = value.instance.printStyleList[value.instance.stateOverallSingle][value.instance.imgDomIndex].transform.scale
+ angle = value.instance.printStyleList[value.instance.stateOverallSingle][value.instance.imgDomIndex].transform.rotateZ
// 添加鼠标按下事件监听器
el.style.transform = "translate(-50%, -50%)rotateZ("+ angle + "deg)"
// let scale = Number(elParent.firstElementChild.style.transform?.split('scale(')[1]?.split(')')[0])
@@ -236,7 +263,7 @@ export default defineComponent({
document.addEventListener('mousemove', mousemove);
// 添加鼠标松开事件监听器
let mouseup = () => {
- value.instance.printStyleList[value.instance.imgDomIndex].transform.rotateZ = angle
+ value.instance.printStyleList[value.instance.stateOverallSingle][value.instance.imgDomIndex].transform.rotateZ = angle
mouse = false;
document.removeEventListener('mouseup',mouseup)
document.removeEventListener('mousemove',mousemove)
@@ -250,86 +277,110 @@ export default defineComponent({
methods: {
init(){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
- this.currentFullBodyView = designItemDetail.currentFullBodyView? designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
+ this.currentFullBodyView = designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl
if(designItemDetail.others.length == 0){
this.body = true
}
- let DesignPrintOperationParent = this.$parent
this.designOpenrtion = true
this.clearModal()
- this.designOpenrtionList = []
- this.designOpenrtionList.push(...this.current.printObject.prints)
- this.overallSingle = DesignPrintOperationParent.overallSingle
- this.systemDesignerPercentage = DesignPrintOperationParent.systemDesignerPercentage
+ this.overallSingle = this.current.printObject.ifSingle?true:false
+ this.ifListOver()
+ if(this.current.printObject.prints)this.exhibitionOpenrtionList[this.stateOverallSingle] = JSON.parse(JSON.stringify(this.current.printObject.prints))
+ if(this.$parent.exhibitionList.print)this.designOpenrtionList = JSON.parse(JSON.stringify(this.$parent.exhibitionList.print))
+ if(this.$parent.elementsList)this.designList = JSON.parse(JSON.stringify(this.$parent.printsList))
+ // this.overallSingle = this.current.ifSingle?false:this.current.ifSingle
let skecth = new Image
skecth.src = this.current.path
skecth.onload=()=>{
this.sketch.width = skecth.width/10+'rem'
this.sketch.height = skecth.height/10+'rem'
+ skecth.remove()
}
- // this.sketch = {
- // width:this.current.layersObject[1].imageSize[0]/10+'rem',
- // height:this.current.layersObject[1].imageSize[1]/10+'rem'
- // }
- let print = new Image
- print.src = this.current.printObject.prints[0].path
- print.onload=()=>{
- this.print.width = print.width+'px'
- this.print.height = print.height+'px'
- this.printStyleList[0].style.width = print.width+'px'
- this.printStyleList[0].style.height = print.height+'px'
- this.printStyleList[0].designOpenrtionBtn = false
- nextTick().then(()=>{
- if(this.designOpenrtionList[0].scale){
- this.designOpenrtionList.forEach((item,index)=>{
- this.setTemplate(item,index)
- this.printAmount = this.printStyleList.length
- if (!this.overallSingle) {
- this.printAmount = 1
- this.setprintAmount()
- }
- if(this.current.printObject.ifSingle != this.overallSingle){
- this.refetchTemplate(0)
- }
-
- })
- }else{
- this.refetchTemplate(0)
- }
+ if(this.exhibitionOpenrtionList[this.stateOverallSingle].length > 0){
+ this.exhibitionOpenrtionList[this.stateOverallSingle].forEach((item,index)=>{
+ this.setTemplate(item,index)
})
+ }else{
+ }
+
+ },
+ ifListOver(){
+ if(!this.overallSingle){
+ // this.designOpenrtionList = this.designOpenrtionList.filter((item)=>item.level2Type == "Pattern")
+ // this.designList = this.designList.filter((item)=>item.level2Type == "Pattern")
+ this.stateOverallSingle = 'overall'
+ }else{
+ this.stateOverallSingle = 'single'
}
},
+ setPrintWH(url){
+ let print = new Image
+ return new Promise((resolve, reject) => {
+ print.onload=()=>{
+ this.print.width = print.width+'px'
+ this.print.height = print.height+'px'
+ resolve()
+ print.remove()
+ }
+ print.src = url
+ })
+ },
systemDesigner(num) {
- let DesignPrintOperationParent = this.$parent
- DesignPrintOperationParent.systemDesignerPercentage = num
+
},
formatter(value) {
- if(value<30)value = 30
return `${value*3}%`;
},
setOveralSingle(){
- let DesignPrintOperationParent = this.$parent
- DesignPrintOperationParent.overallSingle = this.overallSingle
- if (!this.overallSingle) {
- this.printAmount = 1
- this.setprintAmount()
+ if(!this.overallSingle){
+ // this.refetchTemplate(0)
+ this.stateOverallSingle = 'overall'
}else{
+ this.stateOverallSingle = 'single'
}
- this.random()
+ // this.random()
},
- setpitch(item,index){
- this.printStyleList.forEach((v)=>{
+ async setpitch(item,index){
+ await this.setPrintWH(item.path)
+ this.printStyleList[this.stateOverallSingle].forEach((v)=>{
v.designOpenrtionBtn = false
})
- this.imgDomIndex = index
- this.printStyleList[index].designOpenrtionBtn = true
- this.printStyleList[index].style.zIndex = this.printZIndex++
+ if(!this.overallSingle){
+ this.printStyleList[this.stateOverallSingle][0] = JSON.parse(JSON.stringify(this.currentPrintStyleList))
+ this.refetchTemplate(0)
+ this.exhibitionOpenrtionList[this.stateOverallSingle][0] = {
+ angle:0,
+ designType:item.designType,
+ level2Type:item.level2Type,
+ minIOPath:item.minIOPath,
+ path:item.path,
+ priority:1,
+ scale:.3,
+ location:[0,0]
+ }
+ this.systemDesignerPercentage = 30
+ }else{
+ this.printStyleList[this.stateOverallSingle].push(JSON.parse(JSON.stringify(this.currentPrintStyleList)))
+ let currentIndex = this.printStyleList[this.stateOverallSingle].length-1
+ this.exhibitionOpenrtionList[this.stateOverallSingle].push({
+ angle:0,
+ designType:item.designType,
+ level2Type:item.level2Type,
+ minIOPath:item.minIOPath,
+ path:item.path,
+ priority:1,
+ scale:1,
+ location:[0,0]
+ })
+ this.refetchTemplate(currentIndex)
+ }
},
//设置移动
itemMoveMousedown(index,event){
+ if (event.target.tagName === 'IMG' || event.target.nodeName === 'IMG')return
this.imgDomIndex = index
- this.printStyleList.forEach((v)=>{
+ this.printStyleList[this.stateOverallSingle].forEach((v)=>{
v.designOpenrtionBtn = false
})
if(!this.overallSingle){
@@ -339,17 +390,17 @@ export default defineComponent({
}
let scale = Number(this.imgDom.children[0].style.transform?.split('scale(')[1]?.split(')')[0])
let rotateZ = Number(this.imgDom.children[0].style.transform?.split('rotateZ(')[1]?.split('deg')[0])
- this.printStyleList[index].designOpenrtionBtn = true
- this.printStyleList[index].style.zIndex = this.printZIndex++
- this.printStyleList[index].transform = {
+ this.printStyleList[this.stateOverallSingle][index].designOpenrtionBtn = true
+ this.printStyleList[this.stateOverallSingle][index].style.zIndex = this.printZIndex++
+ this.printStyleList[this.stateOverallSingle][index].transform = {
scale:scale,
rotateZ:rotateZ?rotateZ:0,
}
let imgDomWH = this.imgDom.getBoundingClientRect()
- let left = Number(this.printStyleList[index].style.left.replace(/px/g,''))
- let top = Number(this.printStyleList[index].style.top.replace(/px/g,''))
- this.printStyleList[index].centers.left = imgDomWH.x+event.offsetX-left
- this.printStyleList[index].centers.top = imgDomWH.y+event.offsetY-top
+ let left = Number(this.printStyleList[this.stateOverallSingle][index].style.left.replace(/px/g,''))
+ let top = Number(this.printStyleList[this.stateOverallSingle][index].style.top.replace(/px/g,''))
+ this.printStyleList[this.stateOverallSingle][index].centers.left = imgDomWH.x+event.offsetX-left
+ this.printStyleList[this.stateOverallSingle][index].centers.top = imgDomWH.y+event.offsetY-top
document.addEventListener("mouseup", this.mouseup);
document.addEventListener("mousemove", this.moveMousemove);
},
@@ -359,19 +410,19 @@ export default defineComponent({
this.imgDom = document.getElementsByClassName('designOpenrtion_modal')[0].getElementsByClassName("modal_imgItem")[this.imgDomIndex]
let scale = Number(this.imgDom.firstChild.style.transform?.split('scale(')[1]?.split(')')[0])
let rotateZ = Number(this.imgDom.firstChild.style.transform?.split('rotateZ(')[1]?.split('deg')[0])
- this.printStyleList[this.imgDomIndex].designOpenrtionBtn = true
- this.printStyleList[this.imgDomIndex].transform = {
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].designOpenrtionBtn = true
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].transform = {
scale:scale,
rotateZ:rotateZ,
}
let imgDomWH = this.imgDom.getBoundingClientRect()
let li = document.getElementsByClassName('designOpenrtion_modal')[0].getElementsByClassName("designOpenrtion_btn_top")[0].offsetWidth/2
if(this.direction == 'right' || this.direction == 'bottom'){
- this.printStyleList[this.imgDomIndex].centers.left = imgDomWH.x+event.offsetX-li
- this.printStyleList[this.imgDomIndex].centers.top = imgDomWH.y+event.offsetY-li
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left = imgDomWH.x+event.offsetX-li
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.top = imgDomWH.y+event.offsetY-li
}else{
- this.printStyleList[this.imgDomIndex].centers.left = imgDomWH.x+event.offsetX+imgDomWH.width-li
- this.printStyleList[this.imgDomIndex].centers.top = imgDomWH.y+event.offsetY+imgDomWH.height-li
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left = imgDomWH.x+event.offsetX+imgDomWH.width-li
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.top = imgDomWH.y+event.offsetY+imgDomWH.height-li
}
document.addEventListener("mouseup", this.sizeMouseup);
@@ -382,22 +433,22 @@ export default defineComponent({
let imgDomWH = this.imgDom.getBoundingClientRect()
let parentNode = document.getElementsByClassName('designOpenrtion_modal')[0].getElementsByClassName("designOpenrtion_imgMask")[0]
parentNode = parentNode.getBoundingClientRect()
- let x = (e.x - this.printStyleList[this.imgDomIndex].centers.left)+'px'
- let y = ( e.y - this.printStyleList[this.imgDomIndex].centers.top)+'px'
- this.printStyleList[this.imgDomIndex].style.left = x
- this.printStyleList[this.imgDomIndex].style.top = y
+ let x = (e.x - this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left)+'px'
+ let y = ( e.y - this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.top)+'px'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.left = x
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.top = y
if(!this.overallSingle){
if(x.replace(/px/g,'') >= parentNode.width - imgDomWH.width){
- this.printStyleList[this.imgDomIndex].style.left = parentNode.width - imgDomWH.width+'px'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.left = parentNode.width - imgDomWH.width+'px'
}
if(x.replace(/px/g,'') <= 0){
- this.printStyleList[this.imgDomIndex].style.left = 0+'px'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.left = 0+'px'
}
if(y.replace(/px/g,'') >= parentNode.height - imgDomWH.height){
- this.printStyleList[this.imgDomIndex].style.top = parentNode.height - imgDomWH.height+'px'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.top = parentNode.height - imgDomWH.height+'px'
}
if(y.replace(/px/g,'') <= 0){
- this.printStyleList[this.imgDomIndex].style.top = 0+'px'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.top = 0+'px'
}
}
@@ -413,38 +464,38 @@ export default defineComponent({
let w,h
//判断移动四个边
if(this.direction == 'right'){
- w = (e.x - this.printStyleList[this.imgDomIndex].centers.left)
- h = (e.x - this.printStyleList[this.imgDomIndex].centers.left)*num
+ w = (e.x - this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left)
+ h = (e.x - this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left)*num
width = w+'px'
height = w*num1+'px'
}else if(this.direction == 'top'){
- this.printStyleList[this.imgDomIndex].style.top = 'auto'
- // this.printStyleList[this.imgDomIndex].style.left = 'auto'
- this.printStyleList[this.imgDomIndex].style.bottom = parentNode.offsetHeight -imgDomWH.height - this.imgDom.offsetTop+'px'
- w = (e.x - this.printStyleList[this.imgDomIndex].centers.left)*num
- h = (this.printStyleList[this.imgDomIndex].centers.top - e.y)
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.top = 'auto'
+ // this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.left = 'auto'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.bottom = parentNode.offsetHeight -imgDomWH.height - this.imgDom.offsetTop+'px'
+ w = (e.x - this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left)*num
+ h = (this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.top - e.y)
height = h+'px'
width = h*num+'px'
}else if(this.direction == 'bottom'){
- h = (e.y - this.printStyleList[this.imgDomIndex].centers.top)
+ h = (e.y - this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.top)
height = h+'px'
width = h*num+'px'
}else if(this.direction == 'left'){
- this.printStyleList[this.imgDomIndex].style.left = 'auto'
- this.printStyleList[this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
- w = (this.printStyleList[this.imgDomIndex].centers.left - e.x)
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.left = 'auto'
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.right = parentNode.offsetWidth -imgDomWH.width - this.imgDom.offsetLeft+'px'
+ w = (this.printStyleList[this.stateOverallSingle][this.imgDomIndex].centers.left - e.x)
width = w+'px'
height = w*num1+'px'
}
//判断尺寸是否到边
- this.printStyleList[this.imgDomIndex].style.width = width
- this.printStyleList[this.imgDomIndex].style.height = height
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.width = width
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style.height = height
},
//鼠标抬起
sizeMouseup(e){
- this.printStyleList[this.imgDomIndex].style={
+ this.printStyleList[this.stateOverallSingle][this.imgDomIndex].style={
right:'auto',
left:this.imgDom.offsetLeft+'px',
bottom:'auto',
@@ -461,47 +512,12 @@ export default defineComponent({
document.removeEventListener("mouseup", this.mouseup);
document.removeEventListener("mousemove", this.moveMousemove);
},
-
-
- setprintAmount(){
- if(this.printAmount < 1){
- this.printAmount = 1
- return
- }
- if(this.printAmount > 20){
- this.printAmount = 20
- return
- }
- let printTiemNum
- if(this.printAmount>this.printStyleList.length){
- let num = this.printAmount - this.printStyleList.length
- for (let index = 0; index < num; index++) {
- this.printStyleList.push(JSON.parse(JSON.stringify(this.printStyleList[this.printStyleList.length-1])))
- this.printStyleList[this.printStyleList.length-1].transform.rotateZ = 0
- this.refetchTemplate(this.printStyleList.length-1)
- this.designOpenrtionList.push(this.current.printObject.prints[this.current.printObject.prints.length-1])
- }
- }else{
- let num = this.printStyleList.length - this.printAmount
- this.designOpenrtionList.splice(this.printStyleList.length-num,num)
- this.printStyleList.splice(this.printStyleList.length-num,num)
- }
- this.printStyleList.forEach((v)=>{
- v.designOpenrtionBtn = false
- })
- this.printStyleList[this.printStyleList.length-1].designOpenrtionBtn = true
- this.imgDomIndex = this.printStyleList.length-1
- },
deletePrint(){
- if(this.designOpenrtionList.length <= 1){
- return
- }
- this.designOpenrtionList.splice(this.imgDomIndex,1)
- this.printStyleList.splice(this.imgDomIndex,1)
- this.printAmount = this.designOpenrtionList.length
+ this.exhibitionOpenrtionList[this.stateOverallSingle].splice(this.imgDomIndex,1)
+ this.printStyleList[this.stateOverallSingle].splice(this.imgDomIndex,1)
},
random(){
- this.designOpenrtionList.forEach((v,index)=>{
+ this.exhibitionOpenrtionList[this.stateOverallSingle].forEach((v,index)=>{
this.refetchTemplate(index)
})
},
@@ -527,7 +543,7 @@ export default defineComponent({
x = sketch?.width - this.print.width.replace(/px/g,'')*scale/2
}
let y = sketch?.height-this.print.height.replace(/px/g,'')*scale
- this.printStyleList[index]={
+ this.printStyleList[this.stateOverallSingle][index]={
centers:{
left:0,
top:0,
@@ -544,13 +560,14 @@ export default defineComponent({
transform:{
// scale:scale<.2?.2:scale,//0.2-3
// rotateZ:rotateZ1-rotateZ2,
- rotateZ:this.printStyleList[index].transform.rotateZ?this.printStyleList[index].transform.rotateZ:0
+ rotateZ:this.printStyleList[this.stateOverallSingle][index].transform.rotateZ?this.printStyleList[this.stateOverallSingle][index].transform.rotateZ:0
},
designOpenrtionBtn:false
}
},
//设置图片
- setTemplate(item,index) {
+ async setTemplate(item,index) {
+ await this.setPrintWH(item.path)
this.designOpenrtionList
let sketch = document.getElementsByClassName("designOpenrtion_modal")[0]?.getElementsByClassName('designOpenrtion_sketch')[0]
let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
@@ -565,7 +582,7 @@ export default defineComponent({
if(sketch.offsetHeight < item.location[1]/sketchNum){
top = sketch.offsetHeight +'px'
}
- this.printStyleList[index]={
+ this.printStyleList[this.stateOverallSingle][index]={
centers:{
left:0,
top:0,
@@ -587,7 +604,7 @@ export default defineComponent({
}
},
computeZindex(){
- let arr = JSON.parse(JSON.stringify(this.printStyleList))
+ let arr = JSON.parse(JSON.stringify(this.printStyleList[this.stateOverallSingle]))
arr.sort((a, b) => {
var a_num = a["style"].zIndex;
var b_num = b["style"].zIndex;
@@ -600,38 +617,41 @@ export default defineComponent({
return this.computeSize(arr)//计算单件衣服初始大小到目前大小的缩放比
},
computeSize(arr){
- // let num = this.sketch/
- let sketch = document.getElementsByClassName("designOpenrtion_sketch")[0]
- let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
- let prints = []
- let scale
- let location
- arr.forEach((v,index)=>{
- if(!this.overallSingle){
- scale = this.systemDesignerPercentage/100
- // location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
- location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
- }else{
- scale = (arr[index].style.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
- location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
+ return new Promise(async (resolve, reject) => {
+ // let num = this.sketch/
+ let sketch = document.getElementsByClassName("designOpenrtion_sketch")[0]
+ let sketchNum = this.sketch.width.replace(/rem/g,'')*10/sketch.offsetWidth
+ let prints = []
+ let scale
+ let location
+ for (let index = 0; index < arr.length; index++) {
+ if(!this.overallSingle){
+ scale = this.systemDesignerPercentage/100
+ // location = [arr[index].style.left.replace(/px/g,'')*sketchNum+this.print.width.replace(/px/g,'')/2-7,arr[index].style.top.replace(/px/g,'')*sketchNum+this.print.height.replace(/px/g,'')/2-7]
+ location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
+ }else{
+ await this.setPrintWH(this.exhibitionOpenrtionList[this.stateOverallSingle][index].path)
+ scale = (arr[index].style.width.replace(/px/g,'')*sketchNum/this.print.width.replace(/px/g,''))
+ location = [arr[index].style.left.replace(/px/g,'')*sketchNum,arr[index].style.top.replace(/px/g,'')*sketchNum]
+ }
+ let obj = {
+ angle : !this.overallSingle ? 0:arr[index].transform.rotateZ,
+ location : location,
+ priority:arr[index].style.zIndex,
+ scale: scale,
+ designType:this.exhibitionOpenrtionList[this.stateOverallSingle][index].designType,
+ level2Type:this.exhibitionOpenrtionList[this.stateOverallSingle][index].level2Type,
+ path:this.exhibitionOpenrtionList[this.stateOverallSingle][index].path,
+ minIOPath:this.exhibitionOpenrtionList[this.stateOverallSingle][index].minIOPath,
+ }
+ prints.push(obj)
}
- let obj = {
- angle : !this.overallSingle ? 0:arr[index].transform.rotateZ,
- location : location,
- priority:arr[index].style.zIndex,
- scale: scale,
- designType:this.designOpenrtionList[index].designType,
- path:this.designOpenrtionList[index].path,
- minIOPath:this.designOpenrtionList[index].minIOPath,
- }
- prints.push(obj)
+ resolve(prints)
})
- return prints
},
- setPreview(){
+ async setPreview(){
let designItemDetail = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designItemDetail))
let index
- let scale = this.printStyleList[0].style.width.replace(/px/g,'')/this.print.width.replace(/px/g,'')
designItemDetail.clothes.forEach((v,ind)=>{
if(v.id == this.current.id){
index = ind
@@ -645,10 +665,13 @@ export default defineComponent({
// priority:priority,
// timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
// }
- let data = this.store.state.DesignDetailModule.designPreviewData
+ let data = JSON.parse(JSON.stringify(this.store.state.DesignDetailModule.designPreviewData))
+ await this.computeZindex().then((rv)=>{
+ this.setOkData = rv
+ })
data.designSingleItemDTOList[index].printObject={
ifSingle:this.overallSingle,
- prints:this.computeZindex(),
+ prints:this.setOkData,
}
data.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
this.loadingShow = true
@@ -678,12 +701,12 @@ export default defineComponent({
index = ind
}
})
- console.log(this.designItemDetailTS);
if(this.designItemDetailTS.rv){
designItemDetail.currentFullBodyView = this.designItemDetailTS.rv.currentFullBodyView
designItemDetail.clothes[index].printObject.ifSingle = this.overallSingle
designItemDetail.clothes[index].layersObject = this.designItemDetailTS.rv.clothes[index].layersObject
- designItemDetail.clothes[index].printObject.prints = this.computeZindex()
+ designItemDetail.clothes[index].trims = this.designItemDetailTS.rv.clothes[index].trims
+ designItemDetail.clothes[index].printObject.prints = this.setOkData
designItemDetail.ifSubmit = true
designItemDetail.clothes.forEach((item,i)=>{
let a
@@ -706,31 +729,18 @@ export default defineComponent({
}
},
clearModal(){
- this.printAmount = 1//显示数量
this.designOpenrtion = true//modal页面关闭
this.printZIndex = 2//点击图片z-index
this.imgDomIndex = 0//点击图片下标
this.designOpenrtionList = []
- this.printStyleList.splice(1,this.printStyleList.length-1)
- this.printStyleList[0] = {
- centers:{
- left:0,
- top:0,
- },
- style:{
- left:0+"px",
- top:0+"px",
- right:"auto",
- bottom:"auto",
- width:'auto',
- height:'auto',
- zIndex:1,
- },
- transform:{
- scale:1,
- rotateZ:0,
- },
- designOpenrtionBtn:false
+ this.designList = []
+ this.exhibitionOpenrtionList = {
+ single:[],
+ overall:[],
+ }
+ this.printStyleList = {
+ single:[],
+ overall:[],
}
},
closeModal(){
@@ -887,30 +897,6 @@ export default defineComponent({
height: calc(3rem*1.2);
line-height: calc(3rem*1.2);
}
- .print_input{
- margin-top: calc(1rem*1.2);
- width: calc(9.85rem*1.2);
- display: flex;
- .search_input{
- width: calc(6.85rem*1.2);
- margin-right: calc(1rem*1.2);
- padding: 0 calc(1.5rem*1.2);
- border: 2px solid #000;
- font-size: calc(1.2rem*1.2);
- font-weight: 400;
- height: calc(3rem*1.2);
- border-radius: calc(1.5rem*1.2);
- &::placeholder {
- color: #C2C2C2;
- }
- }
- i{
- width: calc(2rem*1.2);
- cursor: pointer;
- display: flex;
- align-items: center;
- }
- }
.designOpenrtion_nav{
display: flex;
margin-top: calc(2rem*1.2);
@@ -922,13 +908,6 @@ export default defineComponent({
&.designOpenrtion_nav::-webkit-scrollbar {
display: none;
}
- .active{
- img{
- border: 2px solid;
- border-radius: 2px;
- box-sizing: border-box;
- }
- }
.designOpenrtion_single{
width: 40%;
margin-bottom: calc(2rem*1.2);
@@ -944,6 +923,7 @@ export default defineComponent({
&.show_print_right{
border: none;
padding: 0;
+ flex: 1;
height: auto;
}
}
@@ -1104,6 +1084,19 @@ export default defineComponent({
width: 0;
height: 0;
}
+ .designOpenrtion_delete{
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 4rem;
+ background: none;
+ transform: translate(100%, -100%);
+ height: 4rem;
+ img{
+ width: 100%;
+ height: 100%;
+ }
+ }
.designOpenrtion_rotote::after{
position: absolute;
content: "";
diff --git a/src/component/Detail/DesignPrintOperationMobile.vue b/src/component/Detail/DesignPrintOperationMobile.vue
index 0282b7eb..1e1541d0 100644
--- a/src/component/Detail/DesignPrintOperationMobile.vue
+++ b/src/component/Detail/DesignPrintOperationMobile.vue
@@ -49,17 +49,23 @@
{{ $t('DesignPrintOperation.Random') }}
-