Merge branch 'StableVersion' into develop

This commit is contained in:
X1627315083
2024-05-21 16:04:07 +08:00
7 changed files with 84 additions and 60 deletions

View File

@@ -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>

View File

@@ -38,13 +38,14 @@
</div>
</div>
<div class="detail_modal_model_content" :class="{active:body}">
<div class="detail_modal_item_back" :class="{active:body}" v-for="item,index in frontBack.back" :style="item.style">
<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>
<img class="detail_modal_model" :src="frontBack.body?.layersObject[0]?.imageUrl" alt="">
<div class="detail_modal_item_front Guide_1_19" :class="{active:body}" v-for="item,index in frontBack.front" :style="item.style" @click.stop="clothesOpen(index)">
</div> -->
<!-- <img class="detail_modal_model" :src="frontBack.body?.layersObject[0]?.imageUrl" alt=""> -->
<!-- <div class="detail_modal_item_front Guide_1_19" :class="{active:body}" v-for="item,index in frontBack.front" :style="item.style" @click.stop="clothesOpen(index)">
<img :src="item.imageUrl" alt="">
</div>
</div> -->
</div>
</div>
@@ -427,7 +428,7 @@ export default defineComponent({
this.designItemId = data.design.designItemId
this.designOutfitId = data.design.designOutfitId
let url = Https.httpUrls.getDesignDetail + `?designItemId=${data.design.designItemId}&designPythonOutfitId=${data.design.designOutfitId}`
// let url = Https.httpUrls.getDesignDetail + `?designItemId=45192&designPythonOutfitId=44898`
// let url = Https.httpUrls.getDesignDetail + `?designItemId=40660&designPythonOutfitId=40366`
this.parentData = data
this.loadingShow = true
Https.axiosGet(url).then(
@@ -1194,6 +1195,9 @@ export default defineComponent({
position: relative;
width: auto;
max-height: 100%;
top: 50%;
transform: translateY(-50%);
}
&.active{
width: 100%;

View File

@@ -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() {
@@ -626,6 +633,7 @@ export default defineComponent({
//设置导出
let setExport = async () => {
initAligningGuidelines(canvas,false)
var imageDataURL = canvas.toDataURL({
format: "png", // 导出格式为 PNG
quality: 1, // 图片质量为 1最高质量
@@ -724,10 +732,13 @@ export default defineComponent({
if(driver__.value.driver){
driverObj__.moveNext()
}
initAligningGuidelines(canvas,true)
})
.catch((res) => {
// message.warning(t('HomeView.jsContent3'));
isShowMark = false;
initAligningGuidelines(canvas,true)
});
};
//关闭画布
@@ -1004,7 +1015,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)=>{
@@ -1102,7 +1116,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) =>{
@@ -1111,6 +1125,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) => {
@@ -1143,7 +1158,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,
@@ -1216,7 +1231,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;
@@ -1242,10 +1257,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'){
@@ -1261,13 +1276,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();
}
}
@@ -1325,12 +1340,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)
@@ -1350,6 +1365,7 @@ export default defineComponent({
}
//设置再画布上移动
let setCanvasMove = (event)=>{
var pointer = canvas.getPointer(event.e);
if(canvas.isDrawingMode){
canvas.setCursor('none');
@@ -1358,7 +1374,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){
@@ -1372,6 +1388,7 @@ export default defineComponent({
}
//设置再画布上按下
let setCanvasDown = (event)=>{
// brushIndicator.set({fill: '#FFF',strokeWidth:0});
//设置移动端按下添加元素
if(isMoible && present.checked){
present.checked = false
@@ -1406,7 +1423,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'){
@@ -1431,7 +1448,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)
@@ -1471,7 +1488,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)

View File

@@ -71,7 +71,7 @@
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { defineComponent, ref, nextTick, computed } from "vue";
import { Https } from "@/tool/https";
import { useI18n } from "vue-i18n";
export default defineComponent({
@@ -166,9 +166,13 @@ export default defineComponent({
};
},
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
// let historyTable: any = this.$refs.historyTable;
// this.historyTableHeight = historyTable.clientHeight - 130;
this.getAllOrderList()
nextTick(()=>{
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
})
},
methods: {
init(){
@@ -201,8 +205,6 @@ export default defineComponent({
// getCreditsDetail
// orderInfoList
Https.axiosPost(Https.httpUrls.orderInfoList,data).then((rv: any) => {
this.total = rv.length;
this.collectionList = rv
if(this.currentPage > 1 && rv.content.length == 0){
this.currentPage = 1
this.getAllOrderList()

View File

@@ -41,7 +41,7 @@
<div class="generalModel_table_content" ref="historyTable">
<a-table
:columns="columns"
:data-source="collectionList"
:data-source="creditsDetailList"
:scroll="{ y: historyTableHeight }"
@change="changePage"
:pagination="{
@@ -67,7 +67,7 @@
>
refund
</div> -->
<div class="operate_item">{{ $t('HistoryPage.Delete') }}</div>
<!-- <div class="operate_item">{{ $t('HistoryPage.Delete') }}</div> -->
</div>
</template>
</a-table>
@@ -75,7 +75,7 @@
</div>
</template>
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { defineComponent, ref, nextTick, computed } from "vue";
import { Https } from "@/tool/https";
import { useI18n } from "vue-i18n";
export default defineComponent({
@@ -87,39 +87,32 @@ export default defineComponent({
const columns: any = computed(() => {
return [
{
title: useI18n().t('allOrder.Serial'),
title: useI18n().t('allOrder.changedCredits'),
align: "center",
ellipsis: true,
dataIndex: "orderNo",
key: "orderNo",
dataIndex: "changedCredits",
key: "changedCredits",
},
{
title: useI18n().t('allOrder.Title'),
title: useI18n().t('allOrder.changeEvent'),
align: "center",
ellipsis: true,
dataIndex: "title",
key: "title",
dataIndex: "changeEvent",
key: "changeEvent",
},
{
title: useI18n().t('allOrder.Money'),
title: useI18n().t('allOrder.createTime'),
align: "center",
ellipsis: true,
dataIndex: "totalFee",
key: "totalFee",
dataIndex: "createTime",
key: "createTime",
},
{
title: useI18n().t('allOrder.Payment'),
title: useI18n().t('allOrder.credits'),
align: "center",
ellipsis: true,
dataIndex: "paymentType",
key: "paymentType",
},
{
title: useI18n().t('allOrder.State'),
align: "center",
ellipsis: true,
dataIndex: "orderStatus",
key: "orderStatus",
dataIndex: "credits",
key: "credits",
},
// {
@@ -133,7 +126,7 @@ export default defineComponent({
});
let dataList: any = ref([]);
let rangePickerValue: any = ref([]);
let collectionList: any = ref([]);
let creditsDetailList: any = ref([]);
let userInfo: any = {};
let currentState = ref({
value:'income',
@@ -153,7 +146,7 @@ export default defineComponent({
dataList,
renameData,
rangePickerValue,
collectionList,
creditsDetailList,
userInfo,
currentState,
state,
@@ -170,15 +163,18 @@ export default defineComponent({
};
},
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
this.getCreditsDetailList()
// this.getCreditsDetailList()
},
methods: {
init(){
this.currentPage = 1
this.pageSize = 10
this.getCreditsDetailList()
nextTick(()=>{
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
})
},
//改变页码
changePage(e: any) {
@@ -208,17 +204,14 @@ export default defineComponent({
size:this.pageSize,
startTime: startDate
}
console.log(data);
// getCreditsDetail
// orderInfoList
Https.axiosPost(Https.httpUrls.getCreditsDetail,data).then((rv: any) => {
this.total = rv.length;
this.collectionList = rv
if(this.currentPage > 1 && rv.content.length == 0){
this.currentPage = 1
this.getCreditsDetailList()
}else{
this.collectionList = rv.content
this.creditsDetailList = rv.content
this.total = rv.total
}