commit
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="colorboard_upload_right">
|
||||
<div class="upload_right_content">
|
||||
<div class="right_content_line">
|
||||
@@ -122,6 +121,7 @@
|
||||
<script>
|
||||
import { Chrome,Slider,Sketch,Material,Compact,Swatches,Photoshop } from '@ans1998/vue3-color'
|
||||
import { Https } from "@/tool/https";
|
||||
import GO from "@/tool/GO";
|
||||
import { defineComponent, h,ref } from 'vue'
|
||||
import { LoadingOutlined } from '@ant-design/icons-vue';
|
||||
import {getCookie} from '@/tool/cookie'
|
||||
@@ -220,7 +220,7 @@ export default defineComponent({
|
||||
// return `rgb(${r}, ${g}, ${b})`;
|
||||
// box.style.backgroundColor = label.textContent = result.sRGBHex;
|
||||
} catch (e) {
|
||||
message.error("Your browser does not support it")
|
||||
message.warning("Your browser does not support it")
|
||||
}
|
||||
})
|
||||
// if ("EyeDropper" in window) {
|
||||
@@ -242,11 +242,11 @@ export default defineComponent({
|
||||
}
|
||||
this.selectIndex = index
|
||||
this.selectColor = color?.r + ''? {rgba:{r:color.r,g:color.g,b:color.b,a:color.a? color.a: 1},hex:hex} : {hex:''}
|
||||
this.fileList = []
|
||||
// this.fileList = []
|
||||
this.tcxColor = ''
|
||||
this.pantongName = ''
|
||||
this.pantongNameList = []
|
||||
this.selectColorList= []
|
||||
// this.selectColorList= []
|
||||
this.reviewColor= {}
|
||||
this.getColorBg = false
|
||||
},
|
||||
@@ -268,7 +268,7 @@ export default defineComponent({
|
||||
this.setColorboardList(colorList)
|
||||
this.getColorBg = true
|
||||
}else{
|
||||
message.error("Can't find the TCX color")
|
||||
message.warning("Can't find the TCX color")
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -298,17 +298,39 @@ export default defineComponent({
|
||||
file.imgUrl = data_new
|
||||
file.status = 'done'
|
||||
this.fileList.push(file)
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(async ()=>{
|
||||
const colorThief = new ColorThief();
|
||||
let colorImage = this.$refs.colorImage
|
||||
let domImg = colorImage[0];
|
||||
let color = colorThief.getColor(domImg)
|
||||
let colorHex = this.rgbaToHex(color)
|
||||
// let color = colorThief.getColor(domImg)
|
||||
let selectColorList = [];
|
||||
let selectColor = colorThief.getPalette(domImg,10)
|
||||
let selectColor = colorThief.getPalette(domImg,9)
|
||||
//排序
|
||||
let obj = {
|
||||
max : 5,
|
||||
min: 5,
|
||||
}
|
||||
let colorSort
|
||||
await GO.setColor(selectColor,file.imgUrl,obj).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
colorSort = rv.ratio
|
||||
}
|
||||
}
|
||||
)
|
||||
colorSort.sort((a, b) => {
|
||||
var a_num = a.ratio;
|
||||
var b_num = b.ratio;
|
||||
return b_num - a_num;
|
||||
});
|
||||
selectColor = []
|
||||
colorSort.forEach(v=>{
|
||||
selectColor.push(v.rgb)
|
||||
})
|
||||
selectColor = selectColor.join('&')
|
||||
selectColor = selectColor.split("&")
|
||||
let color = selectColor[0].split(',')
|
||||
let colorHex = this.rgbaToHex(color)
|
||||
let colorLi = []
|
||||
new Set(selectColor).forEach((item)=>{
|
||||
colorLi.push(item.split(","))
|
||||
@@ -321,6 +343,8 @@ export default defineComponent({
|
||||
});
|
||||
this.selectColorList = selectColorList
|
||||
this.getHsvColor(selectColorList)
|
||||
console.log(color,selectColor);
|
||||
|
||||
this.selectColor = {rgba:{r:color[0],g:color[1],b:color[2],a:1},hex:colorHex}
|
||||
},100)
|
||||
};
|
||||
@@ -345,11 +369,11 @@ export default defineComponent({
|
||||
beforeUpload(file){
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload Image file!');
|
||||
message.warning('You can only upload Image file!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 5;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 5MB!');
|
||||
message.warning('Image must smaller than 5MB!');
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
},
|
||||
@@ -654,15 +678,15 @@ export default defineComponent({
|
||||
width: 18rem;
|
||||
background: rgba(0,0,0,0);
|
||||
padding-top: 1rem !important;
|
||||
max-width: 170px;
|
||||
max-width: 17rem;
|
||||
padding: 0;
|
||||
.vc-sketch{
|
||||
}
|
||||
.vc-sketch-saturation-wrap{
|
||||
width: 16rem;
|
||||
height: 16rem;
|
||||
max-height: 170px;
|
||||
max-width: 170px;
|
||||
max-height: 17rem;
|
||||
max-width: 17rem;
|
||||
margin: auto;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
@@ -698,7 +722,7 @@ export default defineComponent({
|
||||
|
||||
.vc-sketch-color-wrap{
|
||||
background-image: url(@../../../../assets/images/homePage/dropper.png);
|
||||
background-size: 15px;
|
||||
background-size: 1.5rem;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50%;
|
||||
cursor: pointer;
|
||||
@@ -777,7 +801,7 @@ export default defineComponent({
|
||||
align-items: center;
|
||||
.color_right{
|
||||
width: 11rem;
|
||||
font-size: 12px;
|
||||
font-size: 1.2rem;
|
||||
color: #666666;
|
||||
.color_rgb_block{
|
||||
display: flex;
|
||||
|
||||
@@ -31,6 +31,13 @@
|
||||
<span>Text-Image</span>
|
||||
</label>
|
||||
</div>
|
||||
<div v-if="type_.type2 == 'Printboard'" class="printModel">
|
||||
<div @click="printModel.optype = !printModel.optype">{{ printModel.num }}</div>
|
||||
<ul v-show="printModel.optype">
|
||||
<li class="printModel_item" @click="setPrintModel(1)">1</li>
|
||||
<li class="printModel_item" @click="setPrintModel(2)">2</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="input_box">
|
||||
<input
|
||||
@@ -150,13 +157,15 @@
|
||||
<img v-lazy="item.imgUrl" alt="" />
|
||||
<div
|
||||
class="delete_like_file_block"
|
||||
@click.stop="likeFile(item)"
|
||||
>
|
||||
<i v-if="item" class="fi fi-rr-heart"></i>
|
||||
<i v-else class="fi fi-sr-heart"></i>
|
||||
<i v-if="!item.like" class="fi fi-rr-heart" @click.stop="likeFile(item,'like')"></i>
|
||||
<i v-else class="fi fi-sr-heart" @click.stop="likeFile(item,'noLike')"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
@@ -168,6 +177,7 @@ import { useStore } from "vuex";
|
||||
import GO from "@/tool/GO";
|
||||
import { getCookie } from "@/tool/cookie";
|
||||
import { getUploadUrl } from "@/tool/util";
|
||||
import { forEach } from "jszip";
|
||||
export default defineComponent({
|
||||
props: ["msg"],
|
||||
setup() {
|
||||
@@ -200,26 +210,17 @@ export default defineComponent({
|
||||
let designType: any = ref(null);
|
||||
let store = useStore();
|
||||
let fileList: any = ref([
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/32913fde3ee589609d98f16c51fcffa6/ee604/day8-printer.png",
|
||||
id_: 1,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/3edf742257c1d1460eb2e2f998a1df96/ee604/day4-polariod.png",
|
||||
id_: 2,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/475732e63175f7dc3bf93c84af8b3d11/ee604/day6-open-vault.png",
|
||||
id_: 3,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/ca430674ef56f1a3a91f705670fd8512/ee604/day17-walkie-talkie.png",
|
||||
id_: 4,
|
||||
},
|
||||
|
||||
]);
|
||||
let sketchboardList:any = ref([])
|
||||
let collectionElementid = ref()
|
||||
let level2Type = ref('')
|
||||
let printModel = ref({
|
||||
num:1,
|
||||
optype:false,
|
||||
})
|
||||
|
||||
let loadingShow = ref(false)
|
||||
return {
|
||||
imgList,
|
||||
selectImgList,
|
||||
@@ -239,6 +240,8 @@ export default defineComponent({
|
||||
collectionElementid,
|
||||
level2Type,
|
||||
checkboxImage,
|
||||
printModel,
|
||||
loadingShow,
|
||||
};
|
||||
},
|
||||
data(prop) {
|
||||
@@ -325,11 +328,11 @@ export default defineComponent({
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/bmp";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("You can only upload Image file!");
|
||||
message.warning("You can only upload Image file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error("Image must smaller than 5MB!");
|
||||
message.warning("Image must smaller than 2MB!");
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
},
|
||||
@@ -349,26 +352,48 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
},
|
||||
setPrintModel(num:any){
|
||||
this.printModel = {
|
||||
num : num,
|
||||
optype:false,
|
||||
}
|
||||
},
|
||||
getgenerate(){
|
||||
if(!this.searchPictureName){
|
||||
message.warning(
|
||||
"Please enter content"
|
||||
);
|
||||
return
|
||||
}
|
||||
let data = {
|
||||
generateType:'',
|
||||
generateType:'text',
|
||||
designType:'',
|
||||
collectionElementId:'',
|
||||
level1Type:this.upload.level1Type,
|
||||
level2Type:'',
|
||||
text:this.searchPictureName,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:1,//为1就是Print
|
||||
version:this.printModel.num,//为1就是Print
|
||||
}
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
|
||||
(rv) => {
|
||||
// if(rv){
|
||||
|
||||
// }
|
||||
console.log(rv);
|
||||
|
||||
if(rv){
|
||||
this.fileList = []
|
||||
let arr
|
||||
rv.generatedCollectionItems.forEach((v:any,index:number)=>{
|
||||
arr = {
|
||||
id:rv.generatedCollectionItems[index].generateItemId,
|
||||
imgUrl:rv.generatedCollectionItems[index].generateItemUrl
|
||||
}
|
||||
this.fileList.push(arr)
|
||||
this.loadingShow = false
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
});
|
||||
},
|
||||
fileUploadChange(data: any) {
|
||||
@@ -386,7 +411,7 @@ export default defineComponent({
|
||||
);
|
||||
let arr = this.store.state.UploadFilesModule.sketchboard;
|
||||
if (arr.length >= 8) {
|
||||
message.error("You can select up to 8 images");
|
||||
message.warning("You can select up to 8 images");
|
||||
} else {
|
||||
this.sketchboardList = fileList
|
||||
}
|
||||
@@ -454,7 +479,36 @@ export default defineComponent({
|
||||
this.store.commit("setSketchboardFile", this.sketchboardList);
|
||||
}
|
||||
},
|
||||
likeFile(item:any){
|
||||
likeFile(item:any,str:string){
|
||||
|
||||
if(str == 'like'){
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
level1Type:"Moodboard",
|
||||
level2Type: '',
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
||||
(rv) => {
|
||||
console.log(rv);
|
||||
item.like = true
|
||||
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
}else{
|
||||
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.generateDislike, {params:data}).then(
|
||||
(rv) => {
|
||||
item.like = false
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
closeModal() {
|
||||
@@ -480,7 +534,7 @@ export default defineComponent({
|
||||
&.generate::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.generate_checkbox,
|
||||
.generage_input {
|
||||
display: flex;
|
||||
@@ -503,12 +557,38 @@ export default defineComponent({
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
span {
|
||||
font-size: 12px;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.printModel{
|
||||
>div{
|
||||
width: 5rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
border-radius: 1rem;
|
||||
margin: 0;
|
||||
border: 2px solid;
|
||||
cursor: pointer;
|
||||
}
|
||||
ul{
|
||||
position: absolute;
|
||||
width: 5rem;
|
||||
text-align: center;
|
||||
margin-top: .3rem;
|
||||
border-radius: 1rem;
|
||||
overflow: hidden;
|
||||
li{
|
||||
background: rgba(0,0,0,.2);
|
||||
cursor: pointer;
|
||||
&.printModel_item:hover{
|
||||
background: rgba(0,0,0,.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.generage_input {
|
||||
}
|
||||
.generage_img {
|
||||
@@ -570,6 +650,9 @@ export default defineComponent({
|
||||
.delete_file_block{
|
||||
pointer-events:none;
|
||||
}
|
||||
.operate_file_block{
|
||||
pointer-events:none;
|
||||
}
|
||||
img {
|
||||
}
|
||||
}
|
||||
@@ -716,7 +799,7 @@ export default defineComponent({
|
||||
box-sizing: border-box;
|
||||
|
||||
.material_content_top_title {
|
||||
font-size: 20px;
|
||||
font-size: 2rem;
|
||||
color: #030303;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
<div>
|
||||
<header class="header_component">
|
||||
<div class="header_right_content">
|
||||
<div class="header_icon icon iconfont icon-touxiang3"></div>
|
||||
<div class="header_user_icon"></div>
|
||||
<!-- <div class="header_icon icon iconfont icon-touxiang3"></div> -->
|
||||
<div class="header_user_content">
|
||||
<div class="username">{{ userInfo?.userName }}</div>
|
||||
<div
|
||||
<div class="username"><span>/</span> hello@{{ userInfo?.userName }}</div>
|
||||
<!-- <div
|
||||
:class="[
|
||||
'icon',
|
||||
'iconfont',
|
||||
@@ -13,7 +14,7 @@
|
||||
isShowOperate ? 'icon_rotate' : '',
|
||||
]"
|
||||
@click.stop="changeShowOperateContent()"
|
||||
></div>
|
||||
></div> -->
|
||||
<nav class="select_block" v-show="isShowOperate">
|
||||
<!-- <div class="select_item" @click="showBindEmailModal()">
|
||||
<span class="icon iconfont icon-youxiang"></span><span class="select_item_des">bind email</span>
|
||||
@@ -208,7 +209,7 @@ export default defineComponent({
|
||||
|
||||
emailNextStepFun() {
|
||||
if (!isEmail(this.email)) {
|
||||
message.error("The email format is incorrect");
|
||||
message.warning("The email format is incorrect");
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
@@ -342,10 +343,11 @@ export default defineComponent({
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 30px;
|
||||
padding-left: 0;
|
||||
width: 100%;
|
||||
height: 7rem;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-bottom: 0.1rem solid rgba(3, 3, 3, 0.1);
|
||||
// border-bottom: 0.1rem solid rgba(3, 3, 3, 0.1);
|
||||
position: relative;
|
||||
align-items: center;
|
||||
|
||||
@@ -379,10 +381,25 @@ export default defineComponent({
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
font-weight: 900;
|
||||
|
||||
&.select_nav {
|
||||
background: #e6e6f6;
|
||||
}
|
||||
&.nav_item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
display: block;
|
||||
background: #000;
|
||||
height: .3rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: .3rem;
|
||||
width: 0px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
&.select_nav {
|
||||
color: #000;
|
||||
transform: scale(1.15);
|
||||
}
|
||||
&.select_nav::before {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,24 +410,37 @@ export default defineComponent({
|
||||
left: 0;
|
||||
display: flex;
|
||||
width: 33%;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
.header_icon {
|
||||
font-size: 3.6rem;
|
||||
position: relative;
|
||||
top: 0.3rem;
|
||||
}
|
||||
|
||||
.header_user_icon{
|
||||
height: 4rem;
|
||||
width: 4rem;
|
||||
background-color: #000;
|
||||
border-radius: 50%;
|
||||
transform: translateX(-40%)scale(1.3);
|
||||
}
|
||||
.header_user_content {
|
||||
margin-left: 1rem;
|
||||
// margin-left: 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: 1.2rem;
|
||||
// top: 1.2rem;
|
||||
height: 3.7rem;
|
||||
|
||||
.username {
|
||||
font-size: 1.6rem;
|
||||
font-size: 1.8rem;
|
||||
color: #1a1a1a;
|
||||
margin-right: 0.8rem;
|
||||
margin: 0 0.8rem;
|
||||
font-weight: 900;
|
||||
span{
|
||||
margin: .7rem;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-xiala {
|
||||
|
||||
@@ -122,11 +122,11 @@ export default defineComponent({
|
||||
beforeUpload(file:any){
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload Image file!');
|
||||
message.warning('You can only upload Image file!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 5MB!');
|
||||
message.warning('Image must smaller than 2MB!');
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
},
|
||||
@@ -149,7 +149,7 @@ export default defineComponent({
|
||||
status:'done',
|
||||
}
|
||||
if(this.fileList.length == 15){
|
||||
message.error('Maximum number of allowable file uploads has been exceeded')
|
||||
message.warning('Maximum number of allowable file uploads has been exceeded')
|
||||
break
|
||||
}
|
||||
this.fileList.push(data)
|
||||
|
||||
@@ -65,7 +65,9 @@
|
||||
<a-checkbox v-model:checked="item.pin">PIN</a-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-show="total > imgList.length" class="material_content_list_loding">
|
||||
<img src="@/assets/images/homePage/loading.gif" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="no_data_block loading_block" v-show="isShowLoading">
|
||||
<a-spin size="large"></a-spin>
|
||||
@@ -88,29 +90,13 @@ export default defineComponent({
|
||||
setup(prop) {
|
||||
let myMaterialModalShow = ref(false)
|
||||
let imgList = ref([
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/32913fde3ee589609d98f16c51fcffa6/ee604/day8-printer.png",
|
||||
id_: 1,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/3edf742257c1d1460eb2e2f998a1df96/ee604/day4-polariod.png",
|
||||
id_: 2,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/475732e63175f7dc3bf93c84af8b3d11/ee604/day6-open-vault.png",
|
||||
id_: 3,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/ca430674ef56f1a3a91f705670fd8512/ee604/day17-walkie-talkie.png",
|
||||
id_: 4,
|
||||
},
|
||||
])
|
||||
let store = useStore()
|
||||
let isShowLoading:any = ref(false)
|
||||
let selectCode:any = ref('')
|
||||
let currentPage:any = ref(1)
|
||||
let searchPictureName = ref('')
|
||||
let pageSize = ref(20)
|
||||
let pageSize = ref(12)
|
||||
let total = ref(0)
|
||||
let searcMaterialhName:any = ref('') //搜索名字
|
||||
let designType:any = ref(null)
|
||||
@@ -180,22 +166,28 @@ export default defineComponent({
|
||||
this.selectCode = code
|
||||
// this.myMaterialModalShow = true
|
||||
if(this.imgList.length == 0){
|
||||
this.getLibraryList()
|
||||
}
|
||||
this.getLibraryList()
|
||||
let loding = document.getElementsByClassName("material_content_list_loding")[0]
|
||||
const ob = new IntersectionObserver(callback,{
|
||||
root:null,
|
||||
threshold:.8
|
||||
})
|
||||
|
||||
let this_ = this
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
this_.getLibraryList()
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
ob.observe(loding)
|
||||
},
|
||||
|
||||
selectImgItem(imgData:any){
|
||||
// this.selectImgListIds = this.selectImgList.map((v:any)=>v.id)
|
||||
// if(this.selectImgListIds.indexOf(imgData.id) === -1){
|
||||
// this.selectImgList.push(imgData)
|
||||
// this.selectImgListIds.push(imgData.id)
|
||||
// }else{
|
||||
// let index = this.selectImgListIds.indexOf(imgData.id)
|
||||
// this.selectImgList.splice(index,1)
|
||||
// this.selectImgListIds.splice(index,1)
|
||||
// }
|
||||
imgData.type_ = this.type_
|
||||
|
||||
imgData.resData = JSON.parse(JSON.stringify(imgData))
|
||||
this.store.commit("addGenerateMaterialFils", imgData);
|
||||
},
|
||||
@@ -220,24 +212,42 @@ export default defineComponent({
|
||||
// level2Type:this.designType,
|
||||
page:this.currentPage,
|
||||
pictureName:this.searchPictureName,
|
||||
size:this.pageSize,
|
||||
size:this.pageSize+this.imgList.length,
|
||||
}
|
||||
this.isShowLoading = true
|
||||
Https.axiosPost(Https.httpUrls.queryLibraryPage,data).then(
|
||||
(rv: any) => {
|
||||
let aa:any = []
|
||||
this.imgList = rv.content
|
||||
rv.content.forEach((item:any) => {
|
||||
rv.content.forEach((item:any,index:any) => {
|
||||
if(this.type_.type2 == 'Sketchboard'){
|
||||
item.category = "Outwear";
|
||||
item.categoryShow = false;
|
||||
}
|
||||
if(!item.id_){
|
||||
item.id_ = GO.id++
|
||||
aa.push(item)
|
||||
}else{
|
||||
aa.push(item)
|
||||
}
|
||||
// let arr
|
||||
// if(this.type_.type2 == 'Sketchboard'){
|
||||
// arr = this.store.state.UploadFilesModule.sketchMaterialFiles
|
||||
// item.category = "Outwear";
|
||||
// item.categoryShow = false;
|
||||
// }else if(this.type_.type2 == 'Moodboard'){
|
||||
// arr = this.store.state.UploadFilesModule.moodboardMaterialFiles
|
||||
// }else if(this.type_.type2 == 'Printboard'){
|
||||
// arr = this.store.state.UploadFilesModule.printMaterialFiles
|
||||
// }
|
||||
item.imgUrl = item.url
|
||||
aa.push(item)
|
||||
|
||||
// if(!item.id_){
|
||||
// item.id_ = GO.id++
|
||||
// aa.push(item)
|
||||
// arr.forEach((v:any)=>{
|
||||
// if(item.id == v.id){
|
||||
// v.checked = false
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// aa.push(item)
|
||||
// }
|
||||
|
||||
});
|
||||
this.imgList = aa
|
||||
this.total = rv.total
|
||||
@@ -247,8 +257,6 @@ export default defineComponent({
|
||||
this.isShowLoading = false
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
closeModal(){
|
||||
this.myMaterialModalShow = false
|
||||
this.searchPictureName = ''
|
||||
@@ -385,7 +393,7 @@ export default defineComponent({
|
||||
box-sizing: border-box;
|
||||
|
||||
.material_content_top_title{
|
||||
font-size: 20px;
|
||||
font-size: 2rem;
|
||||
color: #030303;
|
||||
}
|
||||
|
||||
@@ -439,7 +447,8 @@ export default defineComponent({
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
&.generate::-webkit-scrollbar{display: none;}
|
||||
height: 30rem;
|
||||
&.material_content_body::-webkit-scrollbar{display: none;}
|
||||
|
||||
.content_img_item{
|
||||
margin: 0 2rem 5rem 0;
|
||||
@@ -484,7 +493,12 @@ export default defineComponent({
|
||||
color: #030303;
|
||||
}
|
||||
}
|
||||
|
||||
.material_content_list_loding{
|
||||
text-align: center;
|
||||
img{
|
||||
height: 10rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
<div
|
||||
class="upload_file_item upload_component"
|
||||
v-show="moodboarList.length != 8"
|
||||
v-show="moodboarList.length < 8"
|
||||
>
|
||||
<a-upload
|
||||
:action="uploadUrl + '/api/element/upload'"
|
||||
@@ -74,7 +74,7 @@
|
||||
>
|
||||
<div
|
||||
class="upload_tip_block"
|
||||
v-show=" moodboarList.length != 8"
|
||||
v-show=" moodboarList.length < 8"
|
||||
>
|
||||
<i class="fi fi-br-upload"></i>
|
||||
<!-- <img class="upload_img_icon" src="@/assets/images/homePage/add_file.png"> -->
|
||||
@@ -169,8 +169,6 @@ export default defineComponent({
|
||||
let layoutOpen = ref(false)
|
||||
let loadingShow = ref(false)
|
||||
let modalImg:any= computed(()=>{
|
||||
console.log(store.state.UploadFilesModule.disposeMoodboard);
|
||||
|
||||
return store.state.UploadFilesModule.disposeMoodboard
|
||||
})
|
||||
return {
|
||||
@@ -273,7 +271,7 @@ export default defineComponent({
|
||||
);
|
||||
let arr = this.store.state.UploadFilesModule.moodboard
|
||||
if(arr.length >= 8){
|
||||
message.error('You can select up to 8 images')
|
||||
message.warning('You can select up to 8 images')
|
||||
}else{
|
||||
this.store.commit("setMoodboardFile", fileList);
|
||||
}
|
||||
@@ -297,11 +295,11 @@ export default defineComponent({
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/bmp";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("You can only upload Image file!");
|
||||
message.warning("You can only upload Image file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error("Image must smaller than 5MB!");
|
||||
message.warning("Image must smaller than 2MB!");
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
},
|
||||
@@ -323,7 +321,8 @@ export default defineComponent({
|
||||
this.store.commit("setMoodboardFile", this.fileList);
|
||||
}
|
||||
if(this.store.state.UploadFilesModule.moodboard.length == 0){
|
||||
this.store.commit("setDisposeMoodboard", {});
|
||||
this.store.commit("clearMoodTemplateId");
|
||||
this.layoutList = []
|
||||
}
|
||||
},
|
||||
recollection() {
|
||||
@@ -353,6 +352,7 @@ export default defineComponent({
|
||||
setboard.moodboard.push(v)
|
||||
}
|
||||
})
|
||||
|
||||
this.store.commit("setMoodboardGenerateFiles", setboard.generate);
|
||||
this.store.commit("setMoodboardMaterialFiles", setboard.material);
|
||||
this.store.commit("setMoodboardFile", setboard.moodboard);
|
||||
@@ -366,7 +366,7 @@ export default defineComponent({
|
||||
// layout.init('moodboard')
|
||||
layout.init()
|
||||
}else{
|
||||
message.error('Please click Layout to sort randomlys')
|
||||
message.warning('Please click Layout to sort randomlys')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -460,10 +460,10 @@ export default defineComponent({
|
||||
content: "";
|
||||
display: block;
|
||||
background: #000;
|
||||
height: 3px;
|
||||
height: .3rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 6px;
|
||||
bottom: .6rem;
|
||||
width: 0px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
|
||||
@@ -5,21 +5,28 @@
|
||||
<!-- <div class="img_block_item" v-if="allBoardData?.moodTemplateId">
|
||||
<MoodTemplate :fileList="allBoardData?.moodboardFiles" :moodTemplateId="allBoardData?.moodTemplateId"></MoodTemplate>
|
||||
</div> -->
|
||||
<div class="img_block_item">
|
||||
<div class="lager_img_item lager_img_disposeMoodboard" v-for="(mood) in allBoardData.disposeMoodboard" :key="mood">
|
||||
<div class="img_block_item" v-if="allBoardData?.disposeMoodboard?.length != 0 && allBoardData?.disposeMoodboard?.[0] != null">
|
||||
<div v-for="(mood) in allBoardData?.disposeMoodboard" :key="mood" v-show="mood?.imgUrl != ''" class="lager_img_item lager_img_disposeMoodboard" >
|
||||
<div class="all_img_item_block">
|
||||
<img class="all_img_content cover_img" :src="mood.imgUrl" >
|
||||
<img class="all_img_content cover_img" :src="mood?.imgUrl" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="img_block_item" v-else>
|
||||
<div v-for="(mood) in allBoardData?.moodboardFiles" :key="mood" v-show="mood?.imgUrl != ''" class="lager_img_item lager_img_moodboard" >
|
||||
<div class="all_img_item_block">
|
||||
<img class="all_img_content cover_img" :src="mood?.imgUrl" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="img_block_item">
|
||||
<div class="small_img_item" v-for="(print) in allBoardData.printboardFiles" :key="print">
|
||||
<div class="small_img_item" v-for="(print) in allBoardData?.printboardFiles" :key="print">
|
||||
<div class="all_img_item_block">
|
||||
<img class="all_img_content cover_img" :src="print.imgUrl">
|
||||
<img class="all_img_content cover_img" :src="print?.imgUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div class="small_img_item" v-for="(generate) in allBoardData.generatePrintFiles" :key="generate">
|
||||
<div class="small_img_item" v-for="(generate) in allBoardData?.generatePrintFiles" :key="generate">
|
||||
<div class="all_img_item_block">
|
||||
<img class="all_img_content cover_img" :src="generate.imgUrl">
|
||||
</div>
|
||||
@@ -27,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="img_block_item">
|
||||
<div class="color_item" v-for="(color) in allBoardData.colorBoards" :key="color">
|
||||
<div class="color_item" v-for="(color) in allBoardData?.colorBoards" :key="color">
|
||||
<div class="color_content" :style="{background:`rgb(${color?.rgbValue?.r},${color?.rgbValue?.g},${color?.rgbValue?.b},${color?.rgbValue?.a})`}"></div>
|
||||
<div class="color_content_body">
|
||||
<div class="color_des">{{color.tcx}}</div>
|
||||
@@ -63,7 +70,6 @@ export default defineComponent({
|
||||
setup() {
|
||||
const store = useStore();
|
||||
let allBoardData:any = computed(()=>{
|
||||
console.log(store.state.UploadFilesModule.allBoardData,"===============")
|
||||
return store.state.UploadFilesModule.allBoardData})
|
||||
return {
|
||||
allBoardData,
|
||||
@@ -75,9 +81,11 @@ export default defineComponent({
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.collection_review{
|
||||
width: 40.8rem;
|
||||
// width: 40.8rem;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
|
||||
|
||||
.collection_review_mark{
|
||||
position: absolute;
|
||||
@@ -86,15 +94,14 @@ export default defineComponent({
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 2;
|
||||
|
||||
}
|
||||
|
||||
.img_block_item{
|
||||
margin-bottom: 2rem;
|
||||
|
||||
// &.color_block_item{
|
||||
// padding: 0 0.5rem 0 0.3rem;
|
||||
// }
|
||||
|
||||
.lager_img_item{
|
||||
display: inline-block;
|
||||
width: 20.4rem;
|
||||
@@ -104,6 +111,11 @@ export default defineComponent({
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
&.lager_img_moodboard{
|
||||
height: 17rem;
|
||||
img{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sketch_img_item{
|
||||
@@ -147,7 +159,7 @@ export default defineComponent({
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
margin-bottom: 0.5rem;
|
||||
line-height: 1.3rem;
|
||||
line-height: 1;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -51,9 +51,8 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="upload_file_item upload_component" v-show="fileList.length < 15">
|
||||
<div class="upload_file_item upload_component" v-show="printboardList.length < 8">
|
||||
<a-upload
|
||||
v-show="fileList.length < 15"
|
||||
:action="uploadUrl + '/api/element/upload'"
|
||||
list-type="picture-card"
|
||||
:before-upload="beforeUpload"
|
||||
@@ -64,12 +63,13 @@
|
||||
v-model:file-list="fileList"
|
||||
:customRequest="function(){}"
|
||||
multiple
|
||||
:maxCount="15"
|
||||
:maxCount="8 - printboardList.length+fileList.length"
|
||||
accept=".jpg,.png,.jpeg,.bmp"
|
||||
@change="fileUploadChange"
|
||||
>
|
||||
<div
|
||||
class="upload_tip_block"
|
||||
v-show="printboardList.length < 8"
|
||||
>
|
||||
<i class="fi fi-br-upload"></i>
|
||||
<!-- <img class="upload_img_icon" src="@/assets/images/homePage/add_file.png"> -->
|
||||
@@ -108,10 +108,9 @@
|
||||
<img :src="item.imgUrl" @click.stop="generageAdd(item)">
|
||||
<div
|
||||
class="delete_like_file_block"
|
||||
@click.stop="likeFile(item)"
|
||||
>
|
||||
<i v-if="item" class="fi fi-rr-heart"></i>
|
||||
<i v-else class="fi fi-sr-heart"></i>
|
||||
<i v-if="!item.like" class="fi fi-rr-heart" @click.stop="likeFile(item,'like')"></i>
|
||||
<i v-else class="fi fi-sr-heart" @click.stop="likeFile(item,'noLike')"></i>
|
||||
</div>
|
||||
<div class="pin_block">
|
||||
<a-checkbox v-model:checked="item.pin">PIN</a-checkbox>
|
||||
@@ -120,6 +119,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<Cropper ref="Cropper" @handleCropperSuccess="handleCropperSuccess" @closeCropper="deletUploadFile()" :cropperFileData="cropperFileData" :isUpload="isUpload"></Cropper>
|
||||
</div>
|
||||
</template>
|
||||
@@ -150,23 +152,9 @@ export default defineComponent({
|
||||
let openClick: any = ref(1);
|
||||
let generateCheckbox:any = ref()
|
||||
let generateList:any = ref([
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/32913fde3ee589609d98f16c51fcffa6/ee604/day8-printer.png",
|
||||
id_: 1,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/3edf742257c1d1460eb2e2f998a1df96/ee604/day4-polariod.png",
|
||||
id_: 2,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/475732e63175f7dc3bf93c84af8b3d11/ee604/day6-open-vault.png",
|
||||
id_: 3,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/ca430674ef56f1a3a91f705670fd8512/ee604/day17-walkie-talkie.png",
|
||||
id_: 4,
|
||||
},
|
||||
|
||||
])
|
||||
let loadingShow = ref(false)
|
||||
return {
|
||||
fileList,
|
||||
printImgList,
|
||||
@@ -174,6 +162,7 @@ export default defineComponent({
|
||||
openClick,
|
||||
generateCheckbox,
|
||||
generateList,
|
||||
loadingShow,
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
@@ -264,11 +253,11 @@ export default defineComponent({
|
||||
beforeUpload(file:any,fileList:any){
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload Image file!');
|
||||
message.warning('You can only upload Image file!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 5MB!');
|
||||
message.warning('Image must smaller than 2MB!');
|
||||
}
|
||||
if(isJpgOrPng && isLt2M){
|
||||
this.currentFileNum = fileList.length
|
||||
@@ -296,7 +285,32 @@ export default defineComponent({
|
||||
this.store.commit("setPrintboardFile", this.fileList);
|
||||
}
|
||||
},
|
||||
likeFile(item:any){
|
||||
likeFile(item:any,str:string){
|
||||
if(str == 'like'){
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
level1Type:"Printboard",
|
||||
level2Type: '',
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
||||
(rv) => {
|
||||
item.like = true
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
}else{
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
}
|
||||
Https.axiosGet(Https.httpUrls.generateDislike, {params:data}).then(
|
||||
(rv) => {
|
||||
item.like = false
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
randomRange(min:any, max:any, num:any) { // min最小值,max最大值 num排除的值
|
||||
@@ -547,7 +561,7 @@ export default defineComponent({
|
||||
status:'done',
|
||||
}
|
||||
if(this.fileList.length == 15){
|
||||
message.error('Maximum number of allowable file uploads has been exceeded')
|
||||
message.warning('Maximum number of allowable file uploads has been exceeded')
|
||||
break
|
||||
}
|
||||
this.fileList.push(data)
|
||||
@@ -559,7 +573,6 @@ export default defineComponent({
|
||||
this.generateCheckbox = value
|
||||
},
|
||||
getgenerate(){
|
||||
|
||||
let generage:any = this.$refs.Generate
|
||||
let generateType = generage.checkbox.filter((v:any)=>v.type)[0].name
|
||||
let data = {
|
||||
@@ -567,15 +580,15 @@ export default defineComponent({
|
||||
designType:'',
|
||||
collectionElementId:generage.collectionElementid,
|
||||
level1Type:generage.upload.level1Type,
|
||||
level2Type:generage.level2Type,
|
||||
level2Type:'',
|
||||
text:this.captionGeneration,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:1,//为1就是Print
|
||||
version:2,//为1就是Print
|
||||
}
|
||||
if(generateType == 'image'||generateType == 'text-image'){
|
||||
if(generage.collectionElementid){
|
||||
}else{
|
||||
message.error(
|
||||
message.warning(
|
||||
"Please select a picture"
|
||||
);
|
||||
return
|
||||
@@ -584,23 +597,32 @@ export default defineComponent({
|
||||
data.collectionElementId = ''
|
||||
data.level2Type = ''
|
||||
// this.beforeUpload(false)
|
||||
// if(this.captionGeneration){
|
||||
// }else{
|
||||
// message.error(
|
||||
// "Please enter content"
|
||||
// );
|
||||
// return
|
||||
// }
|
||||
if(this.captionGeneration){
|
||||
}else{
|
||||
message.warning(
|
||||
"Please enter content"
|
||||
);
|
||||
return
|
||||
}
|
||||
}
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
|
||||
(rv) => {
|
||||
// if(rv){
|
||||
|
||||
// }
|
||||
console.log(rv);
|
||||
|
||||
if(rv){
|
||||
this.generateList = []
|
||||
let arr
|
||||
rv.generatedCollectionItems.forEach((v:any,index:number)=>{
|
||||
arr = {
|
||||
id:rv.generatedCollectionItems[index].generateItemId,
|
||||
imgUrl:rv.generatedCollectionItems[index].generateItemUrl
|
||||
}
|
||||
this.generateList.push(arr)
|
||||
this.loadingShow = false
|
||||
})
|
||||
}
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
});
|
||||
},
|
||||
generageAdd(item:any){
|
||||
@@ -658,10 +680,10 @@ export default defineComponent({
|
||||
content: "";
|
||||
display: block;
|
||||
background: #000;
|
||||
height: 3px;
|
||||
height: .3rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 6px;
|
||||
bottom: .6rem;
|
||||
width: 0px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
@@ -728,7 +750,7 @@ export default defineComponent({
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
border: 0.3rem solid #ededed;
|
||||
border-radius: 10px;
|
||||
border-radius: 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="robot" @mouseover="robotmax">
|
||||
<div class="robot" @mousemove="robotmax">
|
||||
<div class="robot_top" ref="robotDom" v-fade="robotTop,'block'">
|
||||
<div :class="[item.state == 1?'text_right':'text_left']" v-for="item in record" ref="robotChildDom">
|
||||
<div class="robot_text">{{item.str}}</div>
|
||||
@@ -45,18 +45,7 @@ export default defineComponent({
|
||||
let timeTop:any = 0;
|
||||
let timeInput:any = 0;
|
||||
let record:any = ref([
|
||||
{
|
||||
state:1,
|
||||
str:"2222222 22222222 222"
|
||||
},
|
||||
{
|
||||
state:2,
|
||||
str:"2222 22222 22 2222 22"
|
||||
},
|
||||
{
|
||||
state:1,
|
||||
str:"222 22222 222 2222 222"
|
||||
},
|
||||
|
||||
])
|
||||
const userInfo:any = {}
|
||||
|
||||
@@ -131,24 +120,26 @@ export default defineComponent({
|
||||
roborSend (){
|
||||
this.clearTimer()
|
||||
if(!this.chatCentent){
|
||||
message.error("Please enter content");
|
||||
message.warning("Please enter content");
|
||||
return
|
||||
}
|
||||
this.record.push({
|
||||
state:2,
|
||||
str:this.chatCentent
|
||||
})
|
||||
this.textScroll()
|
||||
let a = true
|
||||
let data = {
|
||||
"user_id" : this.userInfo.userId,
|
||||
// "message" : this.chatCentent,
|
||||
// // "message" : "Hello, can you tell me what holiday is on July 1st",
|
||||
// "session_id":""
|
||||
"session_id":"session_1",
|
||||
"message" : this.chatCentent,
|
||||
// "message" : "Hello, can you tell me what holiday is on July 1st",
|
||||
"session_id":""
|
||||
}
|
||||
let interaction = {onDownloadProgress: (progressEvent:any) => {
|
||||
this.clearTimer()
|
||||
console.log(progressEvent.event.currentTarget.response);
|
||||
|
||||
// console.log(progressEvent.event.currentTarget.response);
|
||||
// if(a){
|
||||
// this.record.push({
|
||||
// state:1,
|
||||
@@ -160,23 +151,22 @@ export default defineComponent({
|
||||
// }
|
||||
},
|
||||
}
|
||||
// Https.axiosPost(Https.httpUrls.pythonChatStream, data).then(
|
||||
// // Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
|
||||
// (rv: any) => {
|
||||
// // a = true
|
||||
// console.log(rv);
|
||||
// this.record.push({
|
||||
// state:1,
|
||||
// // str:rv.
|
||||
// })
|
||||
// this.createTimer()
|
||||
// }
|
||||
// ).catch(res=>{
|
||||
// this.createTimer()
|
||||
// });
|
||||
Https.axiosPost(Https.httpUrls.chatStreamTest, data).then(
|
||||
// Https.axiosPost(Https.httpUrls.pythonChatStream, data,interaction).then(
|
||||
(rv) => {
|
||||
if(rv){
|
||||
this.record.push({
|
||||
state:1,
|
||||
str:rv.output
|
||||
})
|
||||
this.createTimer()
|
||||
this.textScroll()
|
||||
}
|
||||
}
|
||||
).catch(res=>{
|
||||
// console.log(res,'res');
|
||||
});
|
||||
this.chatCentent = ""
|
||||
this.textScroll()
|
||||
|
||||
},
|
||||
//创建定时器
|
||||
createTimer() {
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
</div>
|
||||
<div
|
||||
class="upload_file_item upload_component"
|
||||
v-show="fileList.length < 15"
|
||||
v-show="sketchboardList.length < 8"
|
||||
>
|
||||
<a-upload
|
||||
:action="uploadUrl + '/api/element/upload'"
|
||||
@@ -123,12 +123,13 @@
|
||||
:headers="{ Authorization: token }"
|
||||
v-model:file-list="fileList"
|
||||
multiple
|
||||
:maxCount="15"
|
||||
:maxCount="8 - sketchboardList.length+fileList.length"
|
||||
accept=".jpg,.png,.jpeg,.bmp"
|
||||
@change="(file) => fileUploadChange(file)"
|
||||
>
|
||||
<div
|
||||
class="upload_tip_block"
|
||||
v-show="sketchboardList.length < 8"
|
||||
>
|
||||
<i class="fi fi-br-upload"></i>
|
||||
<!-- <img class="upload_img_icon" src="@/assets/images/homePage/add_file.png"> -->
|
||||
@@ -223,10 +224,9 @@
|
||||
</div>
|
||||
<div
|
||||
class="delete_like_file_block"
|
||||
@click.stop="likeFile(item)"
|
||||
>
|
||||
<i v-if="item" class="fi fi-rr-heart"></i>
|
||||
<i v-else class="fi fi-sr-heart"></i>
|
||||
<i v-if="!item.like" class="fi fi-rr-heart" @click.stop="likeFile(item,'like')"></i>
|
||||
<i v-else class="fi fi-sr-heart" @click.stop="likeFile(item,'noLike')"></i>
|
||||
</div>
|
||||
<div class="pin_block">
|
||||
<a-checkbox v-model:checked="item.pin">PIN</a-checkbox>
|
||||
@@ -235,6 +235,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
<!-- <layout ref="layout" :moodb_className="moodb_className" :flex_direction="flex_direction" @setmoodbClass="setmoodbClass"></layout> -->
|
||||
|
||||
|
||||
@@ -257,29 +260,16 @@ export default defineComponent({
|
||||
let fileList: any = ref([]);
|
||||
let openClick: any = ref(1);
|
||||
let generateList:any = ref([
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/32913fde3ee589609d98f16c51fcffa6/ee604/day8-printer.png",
|
||||
id_: 1,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/3edf742257c1d1460eb2e2f998a1df96/ee604/day4-polariod.png",
|
||||
id_: 2,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/475732e63175f7dc3bf93c84af8b3d11/ee604/day6-open-vault.png",
|
||||
id_: 3,
|
||||
},
|
||||
{
|
||||
imgUrl: "https://illlustrations.co/static/ca430674ef56f1a3a91f705670fd8512/ee604/day17-walkie-talkie.png",
|
||||
id_: 4,
|
||||
},
|
||||
|
||||
])
|
||||
let generateCheckbox:any = ref()
|
||||
let loadingShow = ref(false)
|
||||
return {
|
||||
fileList,
|
||||
openClick,
|
||||
generateList,
|
||||
generateCheckbox
|
||||
generateCheckbox,
|
||||
loadingShow
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -399,11 +389,11 @@ export default defineComponent({
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/bmp";
|
||||
if (!isJpgOrPng) {
|
||||
message.error("You can only upload Image file!");
|
||||
message.warning("You can only upload Image file!");
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error("Image must smaller than 5MB!");
|
||||
message.warning("Image must smaller than 2MB!");
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
},
|
||||
@@ -459,24 +449,34 @@ export default defineComponent({
|
||||
this.store.commit("setSketchboardFile", this.fileList);
|
||||
}
|
||||
},
|
||||
likeFile(item:any){
|
||||
console.log(item);
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
level1Type:"Sketchboard",
|
||||
level2Type: item.category,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
likeFile(item:any,str:string){
|
||||
if(str == 'like'){
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
level1Type:"Sketchboard",
|
||||
level2Type: item.category,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
||||
(rv) => {
|
||||
console.log(rv);
|
||||
item.like = true
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
}else{
|
||||
let data = {
|
||||
generateDetailId:item.id,
|
||||
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
||||
(rv) => {
|
||||
console.log(rv);
|
||||
item.like = false
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
}
|
||||
// Https.axiosPost(Https.httpUrls.generateLike, data).then(
|
||||
// (rv) => {
|
||||
// // if(rv){
|
||||
|
||||
// // }
|
||||
// console.log(rv);
|
||||
|
||||
// }
|
||||
// ).catch(res=>{
|
||||
// });
|
||||
},
|
||||
recollection() {
|
||||
let arr = JSON.parse(
|
||||
@@ -515,7 +515,7 @@ export default defineComponent({
|
||||
categoryShow: false,
|
||||
};
|
||||
if (this.fileList.length == 15) {
|
||||
message.error(
|
||||
message.warning(
|
||||
"Maximum number of allowable file uploads has been exceeded"
|
||||
);
|
||||
break;
|
||||
@@ -528,6 +528,7 @@ export default defineComponent({
|
||||
getgenerate(){
|
||||
|
||||
let generage:any = this.$refs.Generate
|
||||
|
||||
let generateType = generage.checkbox.filter((v:any)=>v.type)[0].name
|
||||
let data = {
|
||||
generateType:generateType,
|
||||
@@ -542,7 +543,7 @@ export default defineComponent({
|
||||
if(generateType == 'image'||generateType == 'text-image'){
|
||||
if(generage.collectionElementid){
|
||||
}else{
|
||||
message.error(
|
||||
message.warning(
|
||||
"Please select a picture"
|
||||
);
|
||||
return
|
||||
@@ -553,21 +554,31 @@ export default defineComponent({
|
||||
data.level2Type = ''
|
||||
if(this.captionGeneration){
|
||||
}else{
|
||||
message.error(
|
||||
message.warning(
|
||||
"Please enter content"
|
||||
);
|
||||
return
|
||||
}
|
||||
}
|
||||
this.loadingShow = true
|
||||
Https.axiosPost(Https.httpUrls.sketchAndPrintGenerate, data).then(
|
||||
(rv) => {
|
||||
// if(rv){
|
||||
|
||||
// }
|
||||
console.log(rv);
|
||||
|
||||
if(rv){
|
||||
this.generateList = []
|
||||
let arr
|
||||
rv.generatedCollectionItems.forEach((v:any,index:number)=>{
|
||||
arr = {
|
||||
id:rv.generatedCollectionItems[index].generateItemId,
|
||||
imgUrl:rv.generatedCollectionItems[index].generateItemUrl,
|
||||
category:generage.level2Type
|
||||
}
|
||||
this.generateList.push(arr)
|
||||
this.loadingShow = false
|
||||
})
|
||||
}
|
||||
}
|
||||
).catch(res=>{
|
||||
this.loadingShow = false
|
||||
});
|
||||
},
|
||||
generageAdd(item:any){
|
||||
@@ -618,10 +629,10 @@ export default defineComponent({
|
||||
content: "";
|
||||
display: block;
|
||||
background: #000;
|
||||
height: 3px;
|
||||
height: .3rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 6px;
|
||||
bottom: .6rem;
|
||||
width: 0px;
|
||||
transition: 0.3s all;
|
||||
}
|
||||
@@ -686,7 +697,7 @@ export default defineComponent({
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
border: 0.3rem solid #ededed;
|
||||
border-radius: 10px;
|
||||
border-radius: 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
.checked{
|
||||
|
||||
@@ -88,11 +88,11 @@ export default defineComponent({
|
||||
beforeUpload(file:any){
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('You can only upload Image file!');
|
||||
message.warning('You can only upload Image file!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error('Image must smaller than 5MB!');
|
||||
message.warning('Image must smaller than 2MB!');
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<a-modal class="modal_component collection_modal"
|
||||
v-model:visible="showCollectionModal"
|
||||
:footer="null"
|
||||
width="80%"
|
||||
width="65%"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
@@ -61,6 +61,7 @@ import MarketingSketchUpload from '@/component/HomePage/MarketingSketchUpload.vu
|
||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||
import { Modal,message } from 'ant-design-vue';
|
||||
import {useStore} from 'vuex'
|
||||
import GO from "@/tool/GO";
|
||||
export default defineComponent({
|
||||
components:{
|
||||
Generate,
|
||||
@@ -79,6 +80,17 @@ export default defineComponent({
|
||||
},
|
||||
methods:{
|
||||
nextStep(){
|
||||
if(this.collectionStep == 1){
|
||||
let disposeMoodboard = this.store.state.UploadFilesModule.disposeMoodboard
|
||||
let moodboard = this.store.state.UploadFilesModule.moodboard
|
||||
if(moodboard.length > 1){
|
||||
if (!disposeMoodboard || disposeMoodboard.length == 0) {
|
||||
message.warning('You must select the image and then use the layout.')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this.collectionStep = this.collectionStep + 1
|
||||
},
|
||||
|
||||
@@ -113,6 +125,7 @@ export default defineComponent({
|
||||
mask:false,
|
||||
// centered:true,
|
||||
onOk() {
|
||||
GO.id = 0
|
||||
_this.showCollectionModal = false
|
||||
_this.store.commit('clearAllData')
|
||||
_this.collectionStep = 1
|
||||
@@ -123,10 +136,13 @@ export default defineComponent({
|
||||
//完成
|
||||
finishCollection(){
|
||||
let colorBoards = this.store.state.UploadFilesModule.colorBoards
|
||||
|
||||
if(!colorBoards || colorBoards?.length < 1){
|
||||
message.error('You must choose one or more colors for further process.')
|
||||
message.warning('You must choose one or more colors for further process.')
|
||||
return
|
||||
}
|
||||
this.store.commit('clearAllId')
|
||||
GO.id = 0
|
||||
this.showCollectionModal =false
|
||||
this.collectionStep = 1
|
||||
this.$emit('finishCollection')
|
||||
@@ -155,6 +171,7 @@ export default defineComponent({
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,.45);
|
||||
}
|
||||
|
||||
}
|
||||
.collection_closeIcon{
|
||||
top: 2rem;
|
||||
@@ -245,7 +262,7 @@ export default defineComponent({
|
||||
<style lang="less">
|
||||
.collection_modal,.layout_modal{
|
||||
// max-width: 1200px ;
|
||||
max-width: 1150px ;
|
||||
// max-width: 1150px ;
|
||||
.ant-modal-content{
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
@@ -258,6 +275,14 @@ export default defineComponent({
|
||||
// height: calc(65vh - 6.4rem);
|
||||
height: 65rem;
|
||||
}
|
||||
//进度完成字体颜色
|
||||
|
||||
.ant-progress-circle.ant-progress-status-success .ant-progress-text{
|
||||
color: #000;
|
||||
}
|
||||
.ant-progress-circle .ant-progress-text{
|
||||
color:rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
class="layout_modal"
|
||||
v-model:visible="layout"
|
||||
:footer="null"
|
||||
width="80%"
|
||||
width="65%"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
@@ -620,7 +620,7 @@ export default defineComponent({
|
||||
-ms-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
max-width: 1150px;
|
||||
// max-width: 1150px;
|
||||
.ant-modal-body {
|
||||
padding: 0;
|
||||
// height: calc(65vh - 6.4rem);
|
||||
|
||||
Reference in New Issue
Block a user