fix
This commit is contained in:
@@ -110,28 +110,44 @@ function JScanvasMouseDown(str,e, width,patterning) {//创建线
|
||||
}
|
||||
async function exportSele(canvas,format){
|
||||
var activeObjects = canvas.getActiveObject();
|
||||
if(activeObjects.length == 0){
|
||||
let data = {
|
||||
url:'',
|
||||
imageType:'u'
|
||||
}
|
||||
if(!activeObjects){
|
||||
return
|
||||
}
|
||||
var exportCanvas = new fabric.Canvas(null, {
|
||||
width: activeObjects.width,
|
||||
height: activeObjects.height,
|
||||
backgroundColor: "rgba(255, 255, 255)",
|
||||
});
|
||||
await new Promise((resolve, reject)=>{
|
||||
activeObjects.clone((value)=>{
|
||||
value.left = 0
|
||||
value.top = 0
|
||||
exportCanvas.add(value);
|
||||
resolve()
|
||||
if(activeObjects.type == 'image'){
|
||||
data = {
|
||||
url:activeObjects.getSrc(),
|
||||
imageType:'u',
|
||||
}
|
||||
}else{
|
||||
let scale = activeObjects.scaleX? activeObjects.scaleX: 1
|
||||
var exportCanvas = new fabric.Canvas(null, {
|
||||
width: activeObjects.width*scale,
|
||||
height: activeObjects.height*scale,
|
||||
backgroundColor: "rgba(255, 255, 255)",
|
||||
});
|
||||
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
|
||||
exportCanvas.renderAll();
|
||||
var imgData = exportCanvas.toDataURL({
|
||||
format: format
|
||||
});
|
||||
data = {
|
||||
url:imgData,
|
||||
imageType:'b',
|
||||
}
|
||||
exportCanvas.dispose()
|
||||
}
|
||||
return data
|
||||
}
|
||||
function JScreateCheck(e){//创建对号
|
||||
let downPoint = e.absolutePointer
|
||||
|
||||
@@ -18,8 +18,8 @@ function WriteCookie(name) {
|
||||
now.setMonth( now.getMonth() - 1 );
|
||||
// cookievalue = escape(document.myform.customer.value) + ";"
|
||||
|
||||
document.cookie = name + '=' + '';
|
||||
document.cookie = "expires=" + now.toUTCString() + ";"
|
||||
document.cookie = name + '=' + '' + ";Path=/";
|
||||
document.cookie = "expires=" + now.toUTCString() + ";Path=/";
|
||||
// document.write("Setting Cookies : " + "name=" + cookievalue );
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ axios.interceptors.request.use((config) => {
|
||||
|
||||
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
||||
config.headers.Authorization = getCookie('token');
|
||||
|
||||
return config;
|
||||
},(error) =>{
|
||||
return Promise.reject(error);
|
||||
@@ -210,8 +211,10 @@ export const Https = {
|
||||
//查询某个时间内design点击次数
|
||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
||||
|
||||
getTasksList:`/api/tasks/getList`,//获取档期那任务列表
|
||||
getDesignStatistic:`/api/inquiry/getDesignStatistic`,//拒绝审批
|
||||
getTasksList:`/api/tasks/getList`,//获取当前那任务列表
|
||||
getTasksHistory:`/api/tasks/getHistory`,//获取所有任务列表
|
||||
prepareForSR:`/api/python/prepareForSR`,//超分
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user