This commit is contained in:
X1627315083
2024-03-15 17:23:25 +08:00
parent 3cdbd9e179
commit 5f9fe870c7
9 changed files with 289 additions and 177 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

View File

@@ -291,6 +291,24 @@ li {
top: 0.1rem;
width: 0.3rem;
}
.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
border: 1px solid #d9d9d9;
}
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
box-shadow: 0 0 0 2px rgba(83, 83, 83, 0.3);
border: 1px solid #d9d9d9;
}
.ant-picker:hover,
.ant-picker-focused {
border: 1px solid #d9d9d9;
}
.ant-picker-focused {
box-shadow: 0 0 0 2px rgba(83, 83, 83, 0.3);
border: 1px solid #d9d9d9;
}
.ant-picker-range .ant-picker-active-bar {
background: #353535;
}
.trial_page .ant-select-allow-clear {
height: 100%;
}
@@ -323,13 +341,6 @@ li {
.trial_page .ant-select-allow-clear .ant-select-selector::after {
line-height: 1;
}
.trial_page .ant-select-allow-clear.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0);
border: 1px solid #d9d9d9;
}
.trial_page .ant-select:not(.ant-select-disabled):hover .ant-select-selector {
border: 1px solid #d9d9d9;
}
.trial_page .ant-select-dropdown {
font-size: 1.4rem;
}

View File

@@ -342,6 +342,23 @@ input:focus{
}
}
.ant-select:not(.ant-select-disabled):hover .ant-select-selector{
border: 1px solid #d9d9d9;
}
.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
box-shadow: 0 0 0 2px rgba(83, 83, 83, 0.3);
border: 1px solid #d9d9d9;
}
.ant-picker:hover, .ant-picker-focused{
border: 1px solid #d9d9d9;
}
.ant-picker-focused{
box-shadow: 0 0 0 2px rgba(83, 83, 83, 0.3);
border: 1px solid #d9d9d9;
}
.ant-picker-range .ant-picker-active-bar{
background: #353535;
}
.trial_page{
//Library多级菜单
@@ -378,14 +395,8 @@ input:focus{
.ant-select-selector::after{
line-height: 1;
}
&.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.0);
border: 1px solid #d9d9d9;
}
}
.ant-select:not(.ant-select-disabled):hover .ant-select-selector{
border: 1px solid #d9d9d9;
}
.ant-select-dropdown{
font-size: 1.4rem;
.ant-cascader-menu-item{
@@ -433,7 +444,6 @@ input:focus{
}
}
}
.ant-modal-mask{
background: linear-gradient(45deg, #eee4f3, #f3f4e6);
// min-width: 1440px;

View File

@@ -87,11 +87,11 @@
<i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:operation == 'eraser'}"></i>
</div>
<div class="exportCanvasBox_left_tool_item">
<label>
<label v-show="operation != 'move' && operation != 'eraser'">
<div >Color</div>
<input type="color" @input="setPencilColor" v-model="canvasPencilColor">
</label>
<label>
<label v-show="operation != 'move'">
<div >Size:</div>
<input type="range" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth">
</label>
@@ -191,7 +191,7 @@ import { useStore } from "vuex";
import JSZip, { forEach } from "jszip";
import { message, Modal } from "ant-design-vue";
const FileSaver = require("file-saver");
import { getWHXY,JSRectUpdata,JSchangeType,JScanvasMouseDown,JScanvasMouseMove,JScreateCheck } from "@/tool/canvasDrawing";
import { exportSele,JSRectUpdata,JSchangeType,JScanvasMouseDown,JScanvasMouseMove,JScreateCheck } from "@/tool/canvasDrawing";
export default defineComponent({
components: {
scaleImage,
@@ -1069,13 +1069,10 @@ export default defineComponent({
}
}
}
let setHDExport = ()=>{//获取选中内容的位置信息
var activeObjects = canvas.getActiveObjects();
let wHXY = getWHXY(activeObjects)
var canvasOffset = canvas._offset
console.log(canvasOffset);
console.log(wHXY.width,wHXY.height,wHXY.x,wHXY.y);
console.log(activeObjects);
let setHDExport = async ()=>{//获取选中内容的位置信息
let imgData = await exportSele(canvas,'jpg')
console.log(imgData);
}
onMounted(() => {});
@@ -1221,6 +1218,8 @@ export default defineComponent({
.label_select{
img{
width: 100%;
max-height: 100%;
object-fit: contain;
}
}
}
@@ -1382,6 +1381,8 @@ export default defineComponent({
.label_select_item{
img{
width: 100%;
max-height: 100%;
object-fit: contain;
}
}
</style>

View File

@@ -1,39 +1,38 @@
<template>
<div class="allOrder_page">
<div class="allOrder_table_search">
<!-- <a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker> -->
<!-- <div class="content_search_block">
<input
class="search_input"
:placeholder="
$t('HistoryPage.inputContent1')
"
v-model="searchCollectionName"
@keydown.enter="searchAllOrderList()"
/>
<div
class="search_icon_block"
@click="searchAllOrderList()"
<div class="allOrder_state">
<div class="allOrder_state_item">
<span>Time:</span>
<a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div> -->
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
</div>
<div class="allOrder_search">
<div
class="allOrder_search_item"
@click="searchAllOrderList()"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div>
</div>
<div class="allOrder_table_content" ref="historyTable">
<a-table
@@ -130,16 +129,29 @@ export default defineComponent({
let dataList: any = ref([]);
let rangePickerValue: any = ref([]);
let collectionList: any = ref([]);
let allDataList: any = ref([]);
let userInfo: any = {};
let currentState = ref({
value:'income',
})
let state:any = ref([
{
label:'Income',
value:'income',
},
{
label:'Expend',
value:'expend',
},
])
return {
columns,
dataList,
renameData,
rangePickerValue,
collectionList,
allDataList,
userInfo,
currentState,
state,
};
},
data() {
@@ -154,6 +166,7 @@ export default defineComponent({
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
this.getAllOrderList()
},
methods: {
init(){
@@ -163,12 +176,9 @@ export default defineComponent({
},
//改变页码
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
this.currentPage = e.current
this.pageSize = e.pageSize
this.getAllOrderList();
},
//查询列表
searchAllOrderList() {
@@ -177,21 +187,34 @@ export default defineComponent({
},
//获取列表
getAllOrderList() {
let startDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[0]).getTime()
let startTime = '00:00:00'
let endTime = '00:00:00'
let startDate: any = this.rangePickerValue[0]
? this.rangePickerValue[0]+' '+startTime
: "";
let endDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[1]).getTime()
let endDate: any = this.rangePickerValue[1]
? this.rangePickerValue[1]+' '+endTime
: "";
Https.axiosGet(Https.httpUrls.orderInfoList).then((rv: any) => {
let data = {
endTime: endDate,
isIncome: this.currentState.value == 'income'?true:false,
page:this.currentPage,
size:this.pageSize,
startTime: startDate
}
console.log(data);
// getCreditsDetail
// orderInfoList
Https.axiosPost(Https.httpUrls.orderInfoList,data).then((rv: any) => {
this.total = rv.length;
this.allDataList = rv
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
this.collectionList = rv
if(this.currentPage > 1 && rv.content.length == 0){
this.currentPage = 1
this.getAllOrderList()
}else{
this.collectionList = rv.content
this.total = rv.total
}
});
},
@@ -213,9 +236,11 @@ export default defineComponent({
padding: 2rem 3.5rem 5rem 2.8rem;
background: #fff;
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
.allOrder_search{
width: 40%;
width: 20%;
.allOrder_search_item{
background: #343579;
border-color: #343579;
@@ -230,22 +255,39 @@ export default defineComponent({
}
.allOrder_state {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
width: 60%;
width: 80%;
.allOrder_state_item{
margin-right: 2rem;
margin-bottom: 2rem;
display: flex;
align-items: center;
margin-right: 5rem;
>span{
font-size: 1.6rem;
font-size: 2rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 13rem;
text-align: right;
min-width: 5rem;
text-align: left;
}
.ant-picker-range{
height: 5rem;
}
.ant-select-lg{
font-size: 14px;
.ant-select-selector{
height: 5rem;
.ant-select-selection-item{
line-height: 5rem;
}
input{
line-height: 5rem;
height: 5rem;
}
}
}
}
.allOrder_current{

View File

@@ -1,39 +1,42 @@
<template>
<div class="creditsDetail_page">
<div class="creditsDetail_table_search">
<!-- <a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker> -->
<!-- <div class="content_search_block">
<input
class="search_input"
:placeholder="
$t('HistoryPage.inputContent1')
"
v-model="searchCollectionName"
@keydown.enter="searchCreditDetailList()"
/>
<div
class="search_icon_block"
@click="searchCreditDetailList()"
<div class="creditsDetail_state">
<div class="creditsDetail_state_item">
<span>Time:</span>
<a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div> -->
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
<div class="creditsDetail_state_item">
<span>State:</span>
<a-select v-model:value="currentState.value" size="large" optionFilterProp="label" :options="state" placeholder="Please select" allowClear show-search></a-select>
</div>
</div>
<div class="creditsDetail_search">
<div
class="creditsDetail_search_item"
@click="searchcreditsDetailList()"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div>
</div>
<div class="creditsDetail_table_content" ref="historyTable">
<a-table
@@ -74,7 +77,6 @@
<script lang="ts">
import { defineComponent, ref, createVNode, computed } from "vue";
import { Https } from "@/tool/https";
import { formatTime } from "@/tool/util";
import { useI18n } from "vue-i18n";
export default defineComponent({
components: {
@@ -130,17 +132,30 @@ export default defineComponent({
});
let dataList: any = ref([]);
let rangePickerValue: any = ref([]);
let allDataList: any = ref([]);
let collectionList: any = ref([]);
let userInfo: any = {};
let currentState = ref({
value:'income',
})
let state:any = ref([
{
label:'Income',
value:'income',
},
{
label:'Expend',
value:'expend',
},
])
return {
columns,
dataList,
renameData,
rangePickerValue,
allDataList,
collectionList,
userInfo,
currentState,
state,
};
},
data() {
@@ -155,44 +170,55 @@ export default defineComponent({
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
this.getCreditsDetailList()
},
methods: {
init(){
this.currentPage = 1
this.pageSize = 10
this.getCreditDetailList()
this.getCreditsDetailList()
},
//改变页码
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
changePage(e: any) {
this.currentPage = e.current
this.pageSize = e.pageSize
this.getCreditsDetailList();
},
//查询列表
searchCreditDetailList() {
searchcreditsDetailList() {
this.currentPage = 1;
this.getCreditDetailList();
this.getCreditsDetailList();
},
//获取列表
getCreditDetailList() {
let startDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[0]).getTime()
getCreditsDetailList() {
let startTime = '00:00:00'
let endTime = '00:00:00'
let startDate: any = this.rangePickerValue[0]
? this.rangePickerValue[0]+' '+startTime
: "";
let endDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[1]).getTime()
let endDate: any = this.rangePickerValue[1]
? this.rangePickerValue[1]+' '+endTime
: "";
Https.axiosGet(Https.httpUrls.orderInfoList).then((rv: any) => {
let data = {
endTime: endDate,
isIncome: this.currentState.value == 'income'?true:false,
page:this.currentPage,
size:this.pageSize,
startTime: startDate
}
console.log(data);
// getCreditsDetail
// orderInfoList
Https.axiosPost(Https.httpUrls.getCreditsDetail,data).then((rv: any) => {
this.total = rv.length;
this.allDataList = rv
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
this.collectionList = rv
if(this.currentPage > 1 && rv.content.length == 0){
this.currentPage = 1
this.getCreditsDetailList()
}else{
this.collectionList = rv.content
this.total = rv.total
}
});
},
@@ -214,9 +240,11 @@ export default defineComponent({
padding: 2rem 3.5rem 5rem 2.8rem;
background: #fff;
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
.creditsDetail_search{
width: 40%;
width: 20%;
.creditsDetail_search_item{
background: #343579;
border-color: #343579;
@@ -231,22 +259,39 @@ export default defineComponent({
}
.creditsDetail_state {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
width: 60%;
width: 80%;
.creditsDetail_state_item{
margin-right: 2rem;
margin-bottom: 2rem;
display: flex;
align-items: center;
margin-right: 5rem;
>span{
font-size: 1.6rem;
font-size: 2rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 13rem;
text-align: right;
min-width: 5rem;
text-align: left;
}
.ant-picker-range{
height: 5rem;
}
.ant-select-lg{
font-size: 14px;
.ant-select-selector{
height: 5rem;
.ant-select-selection-item{
line-height: 5rem;
}
input{
line-height: 5rem;
height: 5rem;
}
}
}
}
.creditsDetail_current{

View File

@@ -70,11 +70,14 @@ export default defineComponent({
this.presentState = str
let setInit:any
if(str == 'paypal'){
setInit = this.$refs.creditsDetail
}else{
setInit = this.$refs.allOrder
}else{
setInit = this.$refs.creditsDetail
}
setInit.init()
},
cancelDsign(){
this.showPayOrder = false
}
},
});

View File

@@ -108,30 +108,29 @@ function JScanvasMouseDown(str,e, width,patterning) {//创建线
}
return currentPatterning
}
function getWHXY(arr){
var minX = Number.MAX_SAFE_INTEGER;
var minY = Number.MAX_SAFE_INTEGER;
var maxX = Number.MIN_SAFE_INTEGER;
var maxY = Number.MIN_SAFE_INTEGER;
arr.forEach(function(object) {
var objectBoundingRect = object.getBoundingRect();
console.log(objectBoundingRect);
minX = Math.min(minX, objectBoundingRect.left);
minY = Math.min(minY, objectBoundingRect.top);
maxX = Math.max(maxX, objectBoundingRect.left + objectBoundingRect.width);
maxY = Math.max(maxY, objectBoundingRect.top + objectBoundingRect.height);
});
var width = maxX - minX;
var height = maxY - minY;
let wHXY = {
width:width,
height:height,
x:minX,
y:minY,
async function exportSele(canvas,format){
var activeObjects = canvas.getActiveObject();
if(activeObjects.length == 0){
return
}
return wHXY
var exportCanvas = new fabric.Canvas(null, {
width: activeObjects.width,
height: activeObjects.height
});
await new Promise((resolve, reject)=>{
activeObjects.clone((value)=>{
value.left = 0
value.top = 0
exportCanvas.add(value);
resolve()
})
})
exportCanvas.renderAll();
var imgData = exportCanvas.toDataURL({
format: format
});
exportCanvas.dispose()
return imgData
}
function JScreateCheck(e){//创建对号
let downPoint = e.absolutePointer
@@ -231,4 +230,4 @@ function JSRectUpdata(rect, downPointer, upPointer) {
})
return rect
}
export { multiselectJS, JSRectUpdata, JSchangeType, JScanvasMouseDown, JScanvasMouseMove,JScreateCheck,getWHXY }
export { multiselectJS, JSRectUpdata, JSchangeType, JScanvasMouseDown, JScanvasMouseMove,JScreateCheck,exportSele }

View File

@@ -140,6 +140,7 @@ export const Https = {
getCredits:`/api/credits/getCredits`, //查询用户积分
orderInfoList:`/api/order-info/list`, //查询订单列表
getCreditsDetail:`/api/credits/getCreditsDetail`, //查询积分列表
tradeRefundAlipay:`/api/ali-pay/trade/refund`, //支付宝退款
tradeRefundPaypal:`/api/paypal/trade/refund`, //paypal退款