3d添加印花 等
This commit is contained in:
202
src/tool/adminRouter.js
Normal file
202
src/tool/adminRouter.js
Normal file
@@ -0,0 +1,202 @@
|
||||
const adminRouter = {
|
||||
all:[{
|
||||
name:'All User',
|
||||
route:'/administrator/allUser',
|
||||
icon:'yonghu',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub1',
|
||||
isShow:true,
|
||||
// children: [
|
||||
// {
|
||||
// name:'User Management',
|
||||
// route:'/home/excil1',
|
||||
// icon:'',
|
||||
// key:'/home/excil22',
|
||||
// isShow:true,
|
||||
// },
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
// ],
|
||||
},{
|
||||
name:'Design Frequency',
|
||||
route:'/administrator/testClickData',
|
||||
icon:'shenpi',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub2',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub3',
|
||||
isShow:true,
|
||||
children:[
|
||||
{
|
||||
name:'All Trial User',
|
||||
route:'/administrator/trialAllUser',
|
||||
icon:'usetime',
|
||||
key:'sub3-1',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User Approval',
|
||||
route:'/administrator/trialApproval',
|
||||
icon:'usetime',
|
||||
key:'sub3-2',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Trial User CHART',
|
||||
route:'/administrator/trialUserCountry',
|
||||
icon:'',
|
||||
key:'sub3-3',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Conversion Rate',
|
||||
route:'/administrator/trialUserConversionRateChart',
|
||||
icon:'',
|
||||
key:'sub3-4',
|
||||
isShow:true,
|
||||
},
|
||||
]
|
||||
},{
|
||||
name:'Function Use CHART',
|
||||
route:'/administrator/recentActiveChart',
|
||||
icon:'usetime',
|
||||
key:'sub4',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Active User',
|
||||
icon:'usetime',
|
||||
route:'/administrator/recentActiveUser',
|
||||
key:'sub5',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'New User',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub6',
|
||||
isShow:true,
|
||||
children:[
|
||||
{
|
||||
name:'New User List',
|
||||
route:'/administrator/recentNewUser',
|
||||
icon:'',
|
||||
key:'sub6-1',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'New User CHART',
|
||||
route:'/administrator/recentNewUserChart',
|
||||
icon:'',
|
||||
key:'sub6-2',
|
||||
isShow:true,
|
||||
},
|
||||
]
|
||||
},{
|
||||
name:'Events',
|
||||
icon:'usetime',
|
||||
key:'sub9',
|
||||
expandIcon:'icon-xiala',
|
||||
isShow:true,
|
||||
children: [
|
||||
{
|
||||
name:'Questionnaire Survey',
|
||||
route:'/administrator/questionnaire',
|
||||
icon:'',
|
||||
key:'sub9-1',
|
||||
isShow:true,
|
||||
},
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
],
|
||||
},{
|
||||
name:'Approval Affiliate',
|
||||
icon:'usetime',
|
||||
route:'/administrator/affiliateAudit',
|
||||
key:'sub10',
|
||||
isShow:true,
|
||||
},{
|
||||
name:'Transaction',
|
||||
icon:'usetime',
|
||||
expandIcon:'icon-xiala',
|
||||
key:'sub11',
|
||||
isShow:true,
|
||||
children: [
|
||||
{
|
||||
name:'Transaction Record',
|
||||
route:'/administrator/TransactionTable',
|
||||
icon:'',
|
||||
key:'sub11-1',
|
||||
isShow:true,
|
||||
},
|
||||
// {
|
||||
// code:'ROLE_MANAGER',
|
||||
// name:'Access Permission',
|
||||
// route:'/home/excil2',
|
||||
// icon:'',
|
||||
// key:'/home/excil33',
|
||||
// isShow:true,
|
||||
// },
|
||||
],
|
||||
},{
|
||||
name:'Promotion Code',
|
||||
icon:'usetime',
|
||||
route:'/administrator/coupons',
|
||||
key:'sub12',
|
||||
isShow:true,
|
||||
}],
|
||||
schoolOrEnterprise:[
|
||||
{
|
||||
name:'All User',
|
||||
route:'/administrator/allUserSE',
|
||||
icon:'usetime',
|
||||
key:'sub1',
|
||||
isShow:true,
|
||||
},
|
||||
{
|
||||
name:'Design Frequency',
|
||||
route:'/administrator/testClickDataSE',
|
||||
icon:'usetime',
|
||||
key:'sub2',
|
||||
isShow:true,
|
||||
},
|
||||
{
|
||||
name:'Credits Detail',
|
||||
route:'/administrator/generateFrequencySE',
|
||||
icon:'usetime',
|
||||
key:'sub3',
|
||||
isShow:true,
|
||||
}
|
||||
// ,{
|
||||
// name:'Coupons',
|
||||
// icon:'usetime',
|
||||
// route:'/administrator/coupons',
|
||||
// key:'sub12',
|
||||
// isShow:true,
|
||||
// },
|
||||
// {
|
||||
// name:'Design Frequency',
|
||||
// icon:'usetime',
|
||||
// route:'/administrator/designFrequency',
|
||||
// key:'sub5',
|
||||
// isShow:true,
|
||||
// },{
|
||||
// name:'Generate Frequency',
|
||||
// icon:'usetime',
|
||||
// route:'/administrator/generateFrequency',
|
||||
// key:'sub5',
|
||||
// isShow:true,
|
||||
// }
|
||||
]
|
||||
}
|
||||
export {adminRouter}
|
||||
@@ -233,7 +233,6 @@ class MyCanvas {
|
||||
async canvasInit (dom, val,img,editGroupImg,data,exportWidth = -1){//初始化
|
||||
// let {erasable} = data
|
||||
// this.canvasClear()
|
||||
console.log(exportWidth)
|
||||
this.exportData.width = exportWidth
|
||||
this.canvasWH={
|
||||
width:val.width,
|
||||
@@ -1033,28 +1032,28 @@ class MyCanvas {
|
||||
cloned._objects = cloned._objects.filter(item => item.type == 'image')
|
||||
}
|
||||
if(this.exportData.width != -1){
|
||||
if (cloned.type !== 'image') {
|
||||
if (cloned.type !== 'image' || cloned.type !== 'group') {
|
||||
cloned.set({
|
||||
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
||||
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
||||
scaleX: cloned.scaleX * scaleXY?.scale?scaleXY?.scale:1,
|
||||
scaleY: cloned.scaleY * scaleXY?.scale?scaleXY?.scale:1
|
||||
scaleX: cloned.scaleX * (scaleXY?.scale?scaleXY?.scale:1),
|
||||
scaleY: cloned.scaleY * (scaleXY?.scale?scaleXY?.scale:1)
|
||||
});
|
||||
} else {
|
||||
// 对图片对象单独处理:重新计算图片的缩放
|
||||
cloned.set({
|
||||
left: scaleXY?.scale?cloned.left * scaleXY?.scale:cloned.left - xy.x,
|
||||
top: scaleXY?.scale?cloned.top * scaleXY?.scale:cloned.top - xy.y,
|
||||
scaleX: cloned.scaleX * scaleXY?.scale?scaleXY?.scale:1, // 根据原有 scaleX 进行缩放
|
||||
scaleY: cloned.scaleY * scaleXY?.scale?scaleXY?.scale:1 // 根据原有 scaleY 进行缩放
|
||||
scaleX: cloned.scaleX * (scaleXY?.scale?scaleXY?.scale:1), // 根据原有 scaleX 进行缩放
|
||||
scaleY: cloned.scaleY * (scaleXY?.scale?scaleXY?.scale:1) // 根据原有 scaleY 进行缩放
|
||||
});
|
||||
|
||||
// 确保图片的尺寸缩放是基于原始宽高和当前缩放
|
||||
var originalWidth = cloned.width * cloned.scaleX; // 原始宽度 * 当前缩放
|
||||
var originalHeight = cloned.height * cloned.scaleY; // 原始高度 * 当前缩放
|
||||
cloned.set({
|
||||
width: originalWidth * scaleXY?.scale?scaleXY?.scale:1, // 调整后的宽度
|
||||
height: originalHeight * scaleXY?.scale?scaleXY?.scale:1 // 调整后的高度
|
||||
width: originalWidth * (scaleXY?.scale?scaleXY?.scale:1), // 调整后的宽度
|
||||
height: originalHeight * (scaleXY?.scale?scaleXY?.scale:1) // 调整后的高度
|
||||
});
|
||||
}
|
||||
}else{
|
||||
@@ -1063,7 +1062,6 @@ class MyCanvas {
|
||||
top: (cloned.top - xy.y),
|
||||
})
|
||||
}
|
||||
|
||||
if(cloned.custom?.layerId != -1){
|
||||
temporar.add(cloned)
|
||||
}
|
||||
@@ -1218,7 +1216,6 @@ class MyCanvas {
|
||||
this.setPencilWidth()
|
||||
}
|
||||
async addImage (imgData){
|
||||
console.log(imgData)
|
||||
if(!imgData.imgUrl)imgData.imgUrl = imgData.url
|
||||
let img = await this.createImage(imgData)
|
||||
let position = {
|
||||
@@ -1234,7 +1231,6 @@ class MyCanvas {
|
||||
// minioUrl:getMinioUrl(imgData.url)
|
||||
},
|
||||
})
|
||||
console.log(this.exportData.width)
|
||||
if(this.exportData.width != -1)await this.createLayer({})
|
||||
// if(this.dashed.isDetail)await this.createLayer({})
|
||||
this.setCanvasImage(img,position,"upImgFiles",imgData)
|
||||
@@ -1245,7 +1241,8 @@ class MyCanvas {
|
||||
img.set({
|
||||
hasControls: true,
|
||||
})
|
||||
img.minioUrl=getMinioUrl(imgData.imgUrl || imgData.minioUrl)
|
||||
let url = imgData.imgUrl || imgData.minioUrl
|
||||
img.minioUrl=getMinioUrl(url)
|
||||
resolve(img)
|
||||
},{ crossOrigin: "Anonymous" })
|
||||
})
|
||||
@@ -2044,7 +2041,6 @@ class MyCanvas {
|
||||
// MyCanvas?.[this.id].add(img)
|
||||
// }
|
||||
}else{
|
||||
console.log(v,'add')
|
||||
MyCanvas?.[this.id].add(v)
|
||||
}
|
||||
if(index == elements.length - 1){
|
||||
@@ -2218,12 +2214,15 @@ class MyCanvas {
|
||||
texture:0,
|
||||
}
|
||||
this.operation = 'movePosition'
|
||||
this.clearEvent()
|
||||
delete MyCanvas[this.id]
|
||||
// MyCanvas[this.id] = null
|
||||
}
|
||||
clearEvent(){
|
||||
document.removeEventListener("keydown", this.canvasKeyDown);
|
||||
document.removeEventListener("keyup", this.canvasKeyUp);
|
||||
document.removeEventListener('mousemove', this.mouseMove);
|
||||
document.removeEventListener('touchmove', this.touchmove);
|
||||
delete MyCanvas[this.id]
|
||||
// MyCanvas[this.id] = null
|
||||
}
|
||||
//删除选中元素
|
||||
deleteObject(){
|
||||
@@ -2292,7 +2291,6 @@ class MyCanvas {
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
this._clipboard = copyObj;
|
||||
}
|
||||
paste(){//粘贴
|
||||
|
||||
@@ -56,8 +56,8 @@ axios.interceptors.request.use((config) => {
|
||||
return Promise.reject(error);
|
||||
});
|
||||
let isLoginTime = false
|
||||
const binaryToUrl = (binary,type = 'application/octet-stream')=>{
|
||||
let blob = new Blob([binary], {type});
|
||||
const binaryToUrl = (binary,type = 'application/octet-stream',res)=>{
|
||||
let blob = new Blob([binary], {'content-type':res.headers['content-type']});
|
||||
let url = URL.createObjectURL(blob);
|
||||
return url
|
||||
}
|
||||
@@ -68,7 +68,7 @@ axios.interceptors.response.use((res) =>{
|
||||
// return Promise.reject(res.data);
|
||||
// }else
|
||||
if(res.config.env.binary){
|
||||
let url = binaryToUrl(res.data,res.config.env.binaryType)
|
||||
let url = binaryToUrl(res.data,res.config.env.binaryType,res)
|
||||
return Promise.resolve({url,data:res.data})
|
||||
}
|
||||
if (res.data) {
|
||||
@@ -137,6 +137,7 @@ export const Https = {
|
||||
parseWeChatCode:'/api/third/party/parseWeChatCode',//微信登录
|
||||
accountIsLogin:'/api/account/isLogin', //判断用户是否登录
|
||||
accountLogin:`/api/account/login`, //账号密码登录接口
|
||||
organizationNameSearch:`/api/account/organizationNameSearch`, //查询学校或者企业版名字
|
||||
getUserLanguage:`/api/account/getUserLanguage`, //获取当前用户语言
|
||||
changeUserLanguage:`/api/account/changeUserLanguage`, //切换用户当前语言
|
||||
uploadAvatar:`/api/account/uploadAvatar`, //修改头像
|
||||
@@ -286,6 +287,9 @@ export const Https = {
|
||||
modifySketch:'/api/generate/modifySketch',//修改画布内容并且储存
|
||||
|
||||
elementUpload:`/api/element/upload`,//上传图片
|
||||
imageSegmentation:`/api/element/imageSegmentation`,//分割衣服
|
||||
|
||||
|
||||
// oldHis:`/oldHis/history/queryUserGroup`,//上传图片
|
||||
sketchBoardsBoundingBox:`/api/design/sketchBoardsBoundingBox`,//裁剪sketch图片
|
||||
|
||||
@@ -302,6 +306,20 @@ export const Https = {
|
||||
getUserInfo:`/api/inquiry/getUserInfo`,//查询所有用户
|
||||
queryTransaction:`/api/inquiry/queryTransaction`,//查询交易记录
|
||||
queryTransactionDownload:`/api/inquiry/queryTransaction/download`,//导出交易记录
|
||||
createCoupon:`/api/stripe/createCoupon`,//创建优惠码
|
||||
updatePromCodeInfo:`/api/stripe/updatePromCodeInfo`,//修改优惠码
|
||||
getAllCoupons:`/api/stripe/getAllCoupons`,//查询优惠码列表
|
||||
checkCoupon:`/api/stripe/checkCoupon`,//根据优惠码获取结算后的金额
|
||||
|
||||
//企业版教育版管理员页面
|
||||
subAccountList:`/api/account/subAccountList`,//查询子账号
|
||||
addOrUpdateSubAccount:`/api/account/addOrUpdateSubAccount`,//添加子账号
|
||||
deleteSubAccount:`/api/account/deleteSubAccount`,//删除子账号
|
||||
subAccountImportExcelDownload:`/api/account/subAccountImportExcelDownload`,//批量添加模板下载模板
|
||||
subAccountImport:`/api/account/subAccountImport`,//模板导入
|
||||
getGenerateFrequency:`/api/inquiry/getGenerateFrequency`,//积分使用详情
|
||||
getAllGenerateFuncName:`/api/inquiry/getAllGenerateFuncName`,//获取所有generate类型
|
||||
|
||||
//查询某个时间内design点击次数
|
||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
||||
getAllQuestionnaire:`/api/inquiry/getAllQuestionnaire`,//拒绝审批
|
||||
|
||||
@@ -196,14 +196,14 @@ const projectList = {
|
||||
],
|
||||
printingDesign3D:[
|
||||
{
|
||||
icon:'fi fi-rs-objects-column',
|
||||
value:'printBoard',
|
||||
name:'Printboard',
|
||||
task:'1-1',
|
||||
},{
|
||||
icon:'fi fi-rr-cubes',
|
||||
value:'patternMaking3D',
|
||||
name:'3D Pattern Making',
|
||||
task:'1-1',
|
||||
},{
|
||||
icon:'fi fi-br-download',
|
||||
value:'download',
|
||||
name:'Download',
|
||||
task:'2-1',
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user