Merge remote-tracking branch 'origin/StableVersion' into localDevelop
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="admin_state">
|
||||
|
||||
<div class="admin_state_item">
|
||||
<span>State:</span>
|
||||
<span>State Time:</span>
|
||||
<a-range-picker
|
||||
class="range_picker"
|
||||
v-model:value="rangePickerValue"
|
||||
@@ -22,7 +22,7 @@
|
||||
</a-range-picker>
|
||||
</div>
|
||||
<div class="admin_state_item">
|
||||
<span>Time:</span>
|
||||
<span>End Time:</span>
|
||||
<a-time-range-picker class="range_picker" valueFormat="HH:mm:ss" v-model:value="rangeTimeValue" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail_modal_model_content" :class="{active:body}">
|
||||
<img class="detail_modal_model" :src="designItemDetail.designItemUrl" alt="">
|
||||
<img class="detail_modal_model" :src="designItemDetail.currentFullBodyView?designItemDetail.currentFullBodyView:designItemDetail.designItemUrl" alt="">
|
||||
<!-- <div class="detail_modal_item_back" :class="{active:body}" v-for="item,index in frontBack.back" :style="item.style">
|
||||
<img :src="item.imageUrl" alt="">
|
||||
</div> -->
|
||||
@@ -1195,7 +1195,7 @@ export default defineComponent({
|
||||
position: relative;
|
||||
width: auto;
|
||||
max-height: 100%;
|
||||
|
||||
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
</label>
|
||||
<label v-show="operation != 'move'">
|
||||
<div >{{ $t('exportModel.Size') }}:</div>
|
||||
<input type="range" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth">
|
||||
<input type="range" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth[operation]">
|
||||
</label>
|
||||
<label v-show="operation == 'pencil'">
|
||||
<div >{{ $t('exportModel.Brushwork') }}:</div>
|
||||
@@ -384,6 +384,13 @@ export default defineComponent({
|
||||
canvas.on("mouse:out", event=>setCanvasOut(event));
|
||||
canvas.on("mouse:down", event=>setCanvasDown(event));
|
||||
canvas.on("mouse:up", event=>setCanvasUp(event));
|
||||
|
||||
//双击
|
||||
canvas.on("mouse:dblclick", event=>{
|
||||
if(operation.value == 'fold'){
|
||||
foldEnd('Enter')
|
||||
}
|
||||
});
|
||||
// canvas.on('path:created', (event)=>{updateCanvasState()});
|
||||
// canvas.on("selection:created", (event)=>{setZIndex(event)});
|
||||
// canvas.on('object:removed', function() {
|
||||
@@ -1006,7 +1013,10 @@ export default defineComponent({
|
||||
// }
|
||||
}
|
||||
let canvasPencilColor = ref('#000000')//画笔颜色
|
||||
let canvasPencilWidth = ref(20)//画笔大小
|
||||
// let canvasPencilWidth = ref(20)//画笔大小
|
||||
let canvasPencilWidth = ref({
|
||||
|
||||
})
|
||||
let allSelectWidth = ref(-1)//多选或单选的宽度
|
||||
let allSelect = ref([])//多选或单选的宽度
|
||||
let setOperation = (str)=>{
|
||||
@@ -1104,7 +1114,7 @@ export default defineComponent({
|
||||
|
||||
let patternBrush = new fabric.PatternBrush(canvas)
|
||||
patternBrush.source = img
|
||||
patternBrush.width = canvasPencilWidth.value; // 设置画笔大小
|
||||
patternBrush.width = canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20; // 设置画笔大小
|
||||
canvas.freeDrawingBrush = patternBrush
|
||||
}
|
||||
let setOperationMode = (str) =>{
|
||||
@@ -1113,6 +1123,7 @@ export default defineComponent({
|
||||
let uploadImage = (event)=>{
|
||||
let input = document.querySelector('.uploadImage input')
|
||||
const file = event.target.files[0];
|
||||
setOperation('move')
|
||||
if (file) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
@@ -1145,7 +1156,7 @@ export default defineComponent({
|
||||
}
|
||||
let clearBrushIndicator = ()=>{
|
||||
let cator = new fabric.Circle({
|
||||
radius:canvasPencilWidth.value/2,
|
||||
radius:(canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20)/2,
|
||||
fill: '#fff',
|
||||
stroke: '#000',
|
||||
strokeWidth: 1,
|
||||
@@ -1218,7 +1229,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
canvas.freeDrawingBrush = pencil
|
||||
canvas.freeDrawingBrush.width = canvasPencilWidth.value;
|
||||
canvas.freeDrawingBrush.width = canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20;
|
||||
|
||||
if(brushworkValue.value == 'RibbonBrush' || brushworkValue.value == 'LongfurBrush'){
|
||||
canvas.freeDrawingBrush.width = 1;
|
||||
@@ -1244,10 +1255,10 @@ export default defineComponent({
|
||||
canvas.isDrawingMode = true
|
||||
let eraser = new fabric.EraserBrush(canvas)
|
||||
canvas.freeDrawingBrush = eraser
|
||||
brushIndicator.set({fill: '#FFF'});
|
||||
brushIndicator.set({fill: '#fff'});
|
||||
canvas.requestRenderAll();
|
||||
canvas.freeDrawingBrush.isEraser = true
|
||||
canvas.freeDrawingBrush.width = canvasPencilWidth.value;
|
||||
canvas.freeDrawingBrush.width = canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20;
|
||||
}
|
||||
let setTextFun = (e)=>{
|
||||
if(operation.value != 'text'){
|
||||
@@ -1263,13 +1274,13 @@ export default defineComponent({
|
||||
left: x,
|
||||
top: y,
|
||||
width: 150,
|
||||
fontSize: canvasPencilWidth.value,
|
||||
fontSize: canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20,
|
||||
fill:canvasPencilColor.value,
|
||||
|
||||
})
|
||||
canvas.add(textbox)
|
||||
canvas.renderAll();
|
||||
textbox.enterEditing();
|
||||
canvas.setActiveObject(textbox).renderAll();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1327,12 +1338,12 @@ export default defineComponent({
|
||||
}
|
||||
let setPencilWidth = ()=>{//切换颜色给铅笔设置颜色
|
||||
clearTimeout(setTimeOut.width)
|
||||
canvasPencilWidth.value = Number(canvasPencilWidth.value)
|
||||
canvasPencilWidth.value[operation.value] = Number(canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20)
|
||||
setTimeOut.width = setTimeout(()=>{
|
||||
if(brushworkValue.value == 'LongfurBrush' || brushworkValue.value == 'RibbonBrush'){
|
||||
canvas.freeDrawingBrush.width = 1;
|
||||
}else{
|
||||
canvas.freeDrawingBrush.width = canvasPencilWidth.value;
|
||||
canvas.freeDrawingBrush.width = canvasPencilWidth.value[operation.value];
|
||||
}
|
||||
// setPencil()
|
||||
},300)
|
||||
@@ -1352,6 +1363,7 @@ export default defineComponent({
|
||||
}
|
||||
//设置再画布上移动
|
||||
let setCanvasMove = (event)=>{
|
||||
|
||||
var pointer = canvas.getPointer(event.e);
|
||||
if(canvas.isDrawingMode){
|
||||
canvas.setCursor('none');
|
||||
@@ -1360,7 +1372,7 @@ export default defineComponent({
|
||||
canvas.bringToFront(brushIndicator);//设置优先级最高
|
||||
}
|
||||
// brushIndicator.fill = canvasPencilColor.value
|
||||
brushIndicator.set({ left: pointer.x, top: pointer.y, visible: true,radius:canvasPencilWidth.value/2 });
|
||||
brushIndicator.set({ left: pointer.x, top: pointer.y, visible: true,radius:(canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20)/2 });
|
||||
|
||||
}else{
|
||||
if(createPatterningIs){
|
||||
@@ -1374,6 +1386,7 @@ export default defineComponent({
|
||||
}
|
||||
//设置再画布上按下
|
||||
let setCanvasDown = (event)=>{
|
||||
// brushIndicator.set({fill: '#FFF',strokeWidth:0});
|
||||
//设置移动端按下添加元素
|
||||
if(isMoible && present.checked){
|
||||
present.checked = false
|
||||
@@ -1408,7 +1421,7 @@ export default defineComponent({
|
||||
})
|
||||
// currentPatterning = JScanvasMouseDown(operation.value,event,canvasPencilWidth.value,currentPatterning)
|
||||
}else{
|
||||
currentPatterning = JScanvasMouseDown(operation.value,event,canvasPencilWidth.value,currentPatterning)
|
||||
currentPatterning = JScanvasMouseDown(operation.value,event,canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20,currentPatterning)
|
||||
canvas.add(currentPatterning)
|
||||
canvas.bringToFront(currentPatterning);//设置优先级最高
|
||||
if(operation.value == 'fold'){
|
||||
@@ -1433,7 +1446,7 @@ export default defineComponent({
|
||||
let polyline = new fabric.Polyline(points, {
|
||||
fill: operationMode.value == 'fill'? canvasPencilColor.value : 'transparent',
|
||||
stroke: canvasPencilColor.value,
|
||||
strokeWidth:canvasPencilWidth.value,
|
||||
strokeWidth:canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20,
|
||||
selection:false,
|
||||
})
|
||||
canvas.add(polyline)
|
||||
@@ -1473,7 +1486,7 @@ export default defineComponent({
|
||||
if(operationMode.value == 'fill'){
|
||||
currentPatterning.set({fill: canvasPencilColor.value})
|
||||
}else if (operationMode.value == 'border'){
|
||||
currentPatterning.set({fill: 'transparent',stroke: canvasPencilColor.value,strokeWidth: canvasPencilWidth.value})
|
||||
currentPatterning.set({fill: 'transparent',stroke: canvasPencilColor.value,strokeWidth: canvasPencilWidth.value[operation.value]?canvasPencilWidth.value[operation.value]:20})
|
||||
}
|
||||
if(JSON.stringify(downPoint) == JSON.stringify(upPoint)){
|
||||
canvas.remove(currentPatterning)
|
||||
|
||||
@@ -679,7 +679,7 @@ export default defineComponent({
|
||||
this.inputTime = setTimeout(()=>{
|
||||
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
||||
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
||||
if(this.searchPictureName?.split(/\s+/).length > 75){
|
||||
if(this.searchPictureName?.split(/\s+/).length > 250){
|
||||
(this.$refs.inputShowText as any).innerHTML = this.t('Generate.maximumLength')
|
||||
this.inputShow = true
|
||||
}else{
|
||||
|
||||
@@ -671,7 +671,7 @@ export default defineComponent({
|
||||
},
|
||||
ifMaximumLength(){
|
||||
this.inputTime = setTimeout(()=>{
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 250){
|
||||
(this.$refs.inputShowText as any).innerHTML = this.t('PrintboardUpload.maximumLength')
|
||||
this.inputShow = true
|
||||
}else{
|
||||
|
||||
@@ -525,7 +525,7 @@ export default defineComponent({
|
||||
// let num1 = ((input as HTMLInputElement).value.match(/ /g) || []).length
|
||||
// let num2 = (input as HTMLInputElement).value.split(' ').length
|
||||
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 250){
|
||||
(this.$refs.inputShowText as any).innerHTML = this.t('SketchboardUpload.maximumLength')
|
||||
this.inputShow = true
|
||||
}else{
|
||||
|
||||
@@ -134,7 +134,7 @@ export default defineComponent({
|
||||
function callback(entries:any, observer:any) {
|
||||
entries.forEach((entry:any) => {
|
||||
if (entry.isIntersecting) {
|
||||
this_.getTaskMoreList()
|
||||
this_.getTaskMoreList('')
|
||||
} else {
|
||||
}
|
||||
});
|
||||
@@ -154,12 +154,12 @@ export default defineComponent({
|
||||
// this.getTaskList()
|
||||
let time = 100
|
||||
if(data){
|
||||
time = 1000
|
||||
time = 10000
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.currentPage = 1
|
||||
this.isShowMark = true
|
||||
this.getTaskMoreList()
|
||||
this.getTaskMoreList(data)
|
||||
this.getTaskTime = null
|
||||
}, time);
|
||||
},
|
||||
@@ -182,7 +182,7 @@ export default defineComponent({
|
||||
this.currentPage = 1
|
||||
this.total = 0
|
||||
this.taskListMore = []
|
||||
this.getTaskMoreList()
|
||||
this.getTaskMoreList('')
|
||||
},
|
||||
getTaskList(){
|
||||
clearTimeout(this.getTaskTime)
|
||||
@@ -226,7 +226,7 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
},
|
||||
getTaskMoreList(){
|
||||
getTaskMoreList(value:any){
|
||||
let data = {
|
||||
size:this.pageSize,
|
||||
page: this.currentPage,
|
||||
@@ -238,12 +238,20 @@ export default defineComponent({
|
||||
this.isShowMark = false
|
||||
if(this.currentPage != 1 && rv.content.length == 0){
|
||||
this.currentPage = 1
|
||||
this.getTaskMoreList()
|
||||
this.getTaskMoreList('')
|
||||
}else{
|
||||
this.currentPage += 1
|
||||
this.taskListMore.push(...rv.content)
|
||||
this.total = rv.total
|
||||
this.taskListUnfinished = []
|
||||
rv.content.forEach((item:any) => {
|
||||
value.forEach((valueItem:any) => {
|
||||
if(valueItem == item.taskId && item.status == 'success'){
|
||||
downloadIamge(item.outputImage,item.imageName)
|
||||
this.store.dispatch('getCredits')
|
||||
}
|
||||
});
|
||||
});
|
||||
this.taskListMore.forEach((item:any,index:number)=>{
|
||||
if(item.status == 'Waiting' || item.status == 'Executing'){
|
||||
item.index = index
|
||||
@@ -260,7 +268,6 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
setDownloadIamge(item:any){
|
||||
console.log(item);
|
||||
downloadIamge(item.outputImage,item.imageName)
|
||||
|
||||
}
|
||||
|
||||
@@ -1052,7 +1052,7 @@ export default defineComponent({
|
||||
ifMaximumLength(){
|
||||
clearTimeout(this.inputTime)
|
||||
this.inputTime = setTimeout(()=>{
|
||||
if(this.captionGeneration?.split(/\s+/).length > 75){
|
||||
if(this.captionGeneration?.split(/\s+/).length > 250){
|
||||
(this.$refs.inputShowText as any).innerHTML = this.t('LibraryPage.maximumLength')
|
||||
this.inputShow = true
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user