Merge remote-tracking branch 'origin/StableVersion' into dev_vite
This commit is contained in:
6
components.d.ts
vendored
6
components.d.ts
vendored
@@ -9,8 +9,10 @@ export {}
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
ABadge: typeof import('ant-design-vue/es')['Badge']
|
ABadge: typeof import('ant-design-vue/es')['Badge']
|
||||||
|
ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
|
||||||
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
|
||||||
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
|
||||||
|
ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
|
||||||
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
ADrawer: typeof import('ant-design-vue/es')['Drawer']
|
||||||
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
|
||||||
AImage: typeof import('ant-design-vue/es')['Image']
|
AImage: typeof import('ant-design-vue/es')['Image']
|
||||||
@@ -24,9 +26,13 @@ declare module 'vue' {
|
|||||||
ASelect: typeof import('ant-design-vue/es')['Select']
|
ASelect: typeof import('ant-design-vue/es')['Select']
|
||||||
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
|
||||||
ASlider: typeof import('ant-design-vue/es')['Slider']
|
ASlider: typeof import('ant-design-vue/es')['Slider']
|
||||||
|
ASpace: typeof import('ant-design-vue/es')['Space']
|
||||||
ASpin: typeof import('ant-design-vue/es')['Spin']
|
ASpin: typeof import('ant-design-vue/es')['Spin']
|
||||||
|
ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
|
||||||
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
ASwitch: typeof import('ant-design-vue/es')['Switch']
|
||||||
ATable: typeof import('ant-design-vue/es')['Table']
|
ATable: typeof import('ant-design-vue/es')['Table']
|
||||||
|
ATabPane: typeof import('ant-design-vue/es')['TabPane']
|
||||||
|
ATabs: typeof import('ant-design-vue/es')['Tabs']
|
||||||
AUpload: typeof import('ant-design-vue/es')['Upload']
|
AUpload: typeof import('ant-design-vue/es')['Upload']
|
||||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
|||||||
@@ -299,7 +299,6 @@ export default defineComponent({
|
|||||||
// 0.35822305
|
// 0.35822305
|
||||||
// ]
|
// ]
|
||||||
let isCurrent = list[i].id == detailData?.selectDetail?.id
|
let isCurrent = list[i].id == detailData?.selectDetail?.id
|
||||||
console.log(isCurrent,newData)
|
|
||||||
let color = (detailData.currentDetailType == 'color' && isCurrent && !detailData.isEditPattern.value)?
|
let color = (detailData.currentDetailType == 'color' && isCurrent && !detailData.isEditPattern.value)?
|
||||||
(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):
|
(newData?.rgba?.r?`${newData.rgba.r} ${newData.rgba.g} ${newData.rgba.b}`:''):
|
||||||
(list[i].color?.rgba?.r?
|
(list[i].color?.rgba?.r?
|
||||||
@@ -380,6 +379,7 @@ export default defineComponent({
|
|||||||
delete detailData.designDetail.newModel
|
delete detailData.designDetail.newModel
|
||||||
store.commit('DesignDetail/setPraeview',value)
|
store.commit('DesignDetail/setPraeview',value)
|
||||||
detailData.loadingShow = false
|
detailData.loadingShow = false
|
||||||
|
canvasReload()
|
||||||
// setRevocation()
|
// setRevocation()
|
||||||
}).catch(res=>{
|
}).catch(res=>{
|
||||||
detailData.loadingShow = false
|
detailData.loadingShow = false
|
||||||
|
|||||||
@@ -255,7 +255,6 @@ export default defineComponent({
|
|||||||
detailData.isShowMark = true
|
detailData.isShowMark = true
|
||||||
}
|
}
|
||||||
const index = detailData.designDetail.clothes.findIndex(item => item.id === detailData.selectDetail.id);
|
const index = detailData.designDetail.clothes.findIndex(item => item.id === detailData.selectDetail.id);
|
||||||
console.log(index,detailData.selectDetail.id)
|
|
||||||
await new Promise<void>((resolve, reject) => {
|
await new Promise<void>((resolve, reject) => {
|
||||||
if(!detailDom?.editCanvas)return resolve()
|
if(!detailDom?.editCanvas)return resolve()
|
||||||
let canvasJSON = detailDom?.editCanvas?.getJSON()
|
let canvasJSON = detailDom?.editCanvas?.getJSON()
|
||||||
@@ -299,8 +298,7 @@ export default defineComponent({
|
|||||||
if(front?.oldImageUrl)front.imageUrl = front.oldImageUrl
|
if(front?.oldImageUrl)front.imageUrl = front.oldImageUrl
|
||||||
if(front?.oldMaskUrl)front.maskUrl = front.oldMaskUrl
|
if(front?.oldMaskUrl)front.maskUrl = front.oldMaskUrl
|
||||||
if(back?.oldImageUrl)back.imageUrl = back.oldImageUrl
|
if(back?.oldImageUrl)back.imageUrl = back.oldImageUrl
|
||||||
console.log(front)
|
if(front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.maskUrl})
|
||||||
if(front?.oldMaskUrl)store.commit('DesignDetail/updataDetailItem',{maskUrl:front.oldMaskUrl})
|
|
||||||
|
|
||||||
sessionStorage.removeItem('frontBackEdit');
|
sessionStorage.removeItem('frontBackEdit');
|
||||||
sessionStorage.removeItem('sketchEdit');
|
sessionStorage.removeItem('sketchEdit');
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
if(!editPrintElementData.selectDetail.printObject.prints)return
|
if(!editPrintElementData.selectDetail.printObject.prints)return
|
||||||
let state = true
|
let state = true
|
||||||
editPrintElementData.stateOverallSingle = 'single'
|
// editPrintElementData.stateOverallSingle = 'single'
|
||||||
let arr:any = editPrintElementData.selectDetail.printObject.prints
|
let arr:any = editPrintElementData.selectDetail.printObject.prints
|
||||||
if(props.type == 'element'){
|
if(props.type == 'element'){
|
||||||
arr = editPrintElementData.selectDetail.trims.prints
|
arr = editPrintElementData.selectDetail.trims.prints
|
||||||
@@ -344,7 +344,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
if(arr && arr.length > 0){
|
if(arr && arr.length > 0){
|
||||||
arr.forEach((item:any)=>{
|
arr.forEach((item:any)=>{
|
||||||
if(!item.ifSingle){
|
if(!item.ifSingle && arr.length == 1){
|
||||||
editPrintElementData.stateOverallSingle = 'overall',
|
editPrintElementData.stateOverallSingle = 'overall',
|
||||||
state = false
|
state = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,31 +71,31 @@ export default defineComponent({
|
|||||||
},{immediate:true})
|
},{immediate:true})
|
||||||
const selectDetailItem = (item:any,index:number)=>{
|
const selectDetailItem = (item:any,index:number)=>{
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
// if(detailData.isEditPattern.value &&
|
if(detailData.isEditPattern.value &&
|
||||||
// detailData.selectDetail?.id &&
|
detailData.selectDetail?.id &&
|
||||||
// detailData?.getCanvasIfEdit?.fun&&detailData?.getCanvasIfEdit?.fun() > 0
|
detailData?.getCanvasIfEdit?.fun&&detailData?.getCanvasIfEdit?.fun() > 0
|
||||||
// ){
|
){
|
||||||
// Modal.confirm({
|
Modal.confirm({
|
||||||
// title: t('collectionModal.jsContent2'),
|
title: t('collectionModal.jsContent6'),
|
||||||
// icon: createVNode(ExclamationCircleOutlined),
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
// okText: 'Yes',
|
okText: 'Yes',
|
||||||
// cancelText: 'No',
|
cancelText: 'No',
|
||||||
// mask:false,
|
mask:false,
|
||||||
// centered:true,
|
centered:true,
|
||||||
// onOk() {
|
onOk() {
|
||||||
// resolve(true)
|
resolve(true)
|
||||||
// emit('canvasReload')
|
emit('canvasReload')
|
||||||
// },
|
},
|
||||||
// onCancel(){
|
onCancel(){
|
||||||
// resolve(false)
|
resolve(false)
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
// }else{
|
}else{
|
||||||
resolve(true)
|
resolve(true)
|
||||||
if(detailData.selectDetail.id !== item.id){
|
if(detailData.selectDetail.id !== item.id){
|
||||||
emit('canvasReload')
|
emit('canvasReload')
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}).then((rv)=>{
|
}).then((rv)=>{
|
||||||
if(rv)store.commit('DesignDetail/setDesignColthes',item.id)
|
if(rv)store.commit('DesignDetail/setDesignColthes',item.id)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -239,38 +239,41 @@ export default defineComponent({
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
const itemMoveMousedown = async (index:any,e:any)=>{
|
const itemMoveMousedown = async (index:any,e:any)=>{
|
||||||
|
if(detailData.selectDetail.id != detailData.frontBack.front[index].id)return
|
||||||
let isOpen = false
|
let isOpen = false
|
||||||
let isModal = false
|
let isModal = false
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
if(
|
// if(
|
||||||
detailData.isEditPattern.value &&
|
// detailData.isEditPattern.value &&
|
||||||
selectItem.selectDetail?.id &&
|
// selectItem.selectDetail?.id &&
|
||||||
(detailData.frontBack.front[index].id != selectItem.selectDetail.id)
|
// (detailData.frontBack.front[index].id != selectItem.selectDetail.id)
|
||||||
){
|
// ){
|
||||||
isModal = true
|
// isModal = true
|
||||||
Modal.confirm({
|
// Modal.confirm({
|
||||||
title: t('collectionModal.jsContent2'),
|
// title: t('collectionModal.jsContent2'),
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
// icon: createVNode(ExclamationCircleOutlined),
|
||||||
okText: 'Yes',
|
// okText: 'Yes',
|
||||||
cancelText: 'No',
|
// cancelText: 'No',
|
||||||
mask:false,
|
// mask:false,
|
||||||
centered:true,
|
// centered:true,
|
||||||
onOk() {
|
// onOk() {
|
||||||
resolve(true)
|
// resolve(true)
|
||||||
isOpen = true
|
// isOpen = true
|
||||||
},
|
// },
|
||||||
onCancel(){
|
// onCancel(){
|
||||||
resolve(false)
|
// resolve(false)
|
||||||
isOpen = false
|
// isOpen = false
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}else{
|
// }else{
|
||||||
if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){
|
// if(detailData.frontBack.front[index].id != selectItem.selectDetail.id){
|
||||||
isOpen = true
|
// isOpen = true
|
||||||
}
|
// }
|
||||||
resolve(true)
|
// resolve(true)
|
||||||
isModal = false
|
// isModal = false
|
||||||
}
|
// }
|
||||||
|
resolve(true)
|
||||||
|
isOpen = true
|
||||||
}).then((rv)=>{
|
}).then((rv)=>{
|
||||||
})
|
})
|
||||||
if(isOpen){
|
if(isOpen){
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ export default defineComponent({
|
|||||||
title:this.selectSex,
|
title:this.selectSex,
|
||||||
surname:this.surname,
|
surname:this.surname,
|
||||||
givenName:this.givenName,
|
givenName:this.givenName,
|
||||||
userId:this.userDetail.userId,
|
userId:this.userDetail?.userId,
|
||||||
};
|
};
|
||||||
if(this.loginTime){
|
if(this.loginTime){
|
||||||
this.loginTime = false
|
this.loginTime = false
|
||||||
|
|||||||
@@ -583,6 +583,7 @@ export default {
|
|||||||
jsContent2: "上传的文件不会保存,是否继续? ",
|
jsContent2: "上传的文件不会保存,是否继续? ",
|
||||||
jsContent3: "您必须选择一种或多种颜色进行下一步。",
|
jsContent3: "您必须选择一种或多种颜色进行下一步。",
|
||||||
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个,这可能会导致一些已钉住的项目未被使用。您是否仍要继续?",
|
jsContent5: "我们检测到您的({str})上的PIN数量超过了八个,这可能会导致一些已钉住的项目未被使用。您是否仍要继续?",
|
||||||
|
jsContent6: "画布内容没有保存,请点击预保存后继续。",
|
||||||
},
|
},
|
||||||
DesignDetail: {
|
DesignDetail: {
|
||||||
Details: "详情",
|
Details: "详情",
|
||||||
|
|||||||
@@ -583,6 +583,7 @@ export default {
|
|||||||
jsContent2: "The uploaded files will not be saved, being sure to continue? ",
|
jsContent2: "The uploaded files will not be saved, being sure to continue? ",
|
||||||
jsContent3: "You must choose one or more colors for further process.",
|
jsContent3: "You must choose one or more colors for further process.",
|
||||||
jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?",
|
jsContent5: "We've detected that the number of pins on your ({str}) exceeds eight, which may result in some pinned items not being used. Would you like to continue anyway?",
|
||||||
|
jsContent6: 'The content on the canvas has not been saved. Please click "Preview" to continue.',
|
||||||
},
|
},
|
||||||
DesignDetail: {
|
DesignDetail: {
|
||||||
Details: "Details",
|
Details: "Details",
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
|||||||
state.frontBack.back = back
|
state.frontBack.back = back
|
||||||
},
|
},
|
||||||
updataDetailItem(state,data){
|
updataDetailItem(state,data){
|
||||||
|
console.log(data)
|
||||||
state.designDetail.clothes.forEach((item:any) => {
|
state.designDetail.clothes.forEach((item:any) => {
|
||||||
if(item.id == state.selectDetail.id){
|
if(item.id == state.selectDetail.id){
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
@@ -255,7 +256,7 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
|||||||
})
|
})
|
||||||
if(state.currentDetailType != 'models'){
|
if(state.currentDetailType != 'models'){
|
||||||
state.selectDetail.change = item.change
|
state.selectDetail.change = item.change
|
||||||
if(state.selectDetail?.newDetail?.color){
|
if(state.selectDetail?.newDetail?.color && currentType != 'color'){
|
||||||
state.selectDetail.color = state.selectDetail?.newDetail?.color
|
state.selectDetail.color = state.selectDetail?.newDetail?.color
|
||||||
state.selectDetail.newDetail.color = null
|
state.selectDetail.newDetail.color = null
|
||||||
}
|
}
|
||||||
@@ -272,12 +273,20 @@ const DesignDetail : Module<DesignDetail,RootState> = {
|
|||||||
state.selectDetail.printObject = item.printObject
|
state.selectDetail.printObject = item.printObject
|
||||||
state.selectDetail.trims = item.trims
|
state.selectDetail.trims = item.trims
|
||||||
state.selectDetail.type = item.type
|
state.selectDetail.type = item.type
|
||||||
|
state.selectDetail.color = {
|
||||||
|
...item.color,
|
||||||
|
rgba:{
|
||||||
|
r:item.color?.r,
|
||||||
|
g:item.color?.g,
|
||||||
|
b:item.color?.b,
|
||||||
|
}
|
||||||
|
}
|
||||||
state.selectDetail.undividedLayer = item.undividedLayer
|
state.selectDetail.undividedLayer = item.undividedLayer
|
||||||
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
|
if(state.selectDetail.newDetail?.sketch?.id && !state.selectDetail.id){
|
||||||
state.designDetail.clothes.push(state.selectDetail)
|
state.designDetail.clothes.push(state.selectDetail)
|
||||||
}
|
}
|
||||||
state.selectDetail.id = item.id
|
state.selectDetail.id = item.id
|
||||||
if(currentType)if(state.selectDetail.newDetail?.[currentType])delete state.selectDetail.newDetail[currentType]
|
if(currentType)if(state.selectDetail.newDetail?.[currentType] && currentType != 'color')delete state.selectDetail.newDetail[currentType]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(value.fun)value.fun()
|
if(value.fun)value.fun()
|
||||||
|
|||||||
@@ -38,20 +38,6 @@ const CancelToken = axios.CancelToken;
|
|||||||
const source = CancelToken.source();
|
const source = CancelToken.source();
|
||||||
// console.log(import.meta.env.VITE_APP_BASE_URL);
|
// console.log(import.meta.env.VITE_APP_BASE_URL);
|
||||||
let isLoginTime = false
|
let isLoginTime = false
|
||||||
const filterHttpsUrl = [
|
|
||||||
// '/api/portfolio/page',
|
|
||||||
'/api/third/party/parseGoogleCredential',
|
|
||||||
'/api/account/resetPwd',
|
|
||||||
'/api/portfolio/detail',
|
|
||||||
'/api/account/preLogin',
|
|
||||||
'/api/account/designWorksRegister',
|
|
||||||
'/api/account/schoolLogin',
|
|
||||||
'/api/account/enterpriseLogin',
|
|
||||||
'/api/account/login',
|
|
||||||
'/api/account/organizationNameSearch',
|
|
||||||
'/api/account/designWorksRegisterCode',
|
|
||||||
'/api/third/party/parseWeChatCode',
|
|
||||||
'/api/account/sendEmail']
|
|
||||||
//POST传参序列化(添加请求拦截器)
|
//POST传参序列化(添加请求拦截器)
|
||||||
axios.interceptors.request.use((config) => {
|
axios.interceptors.request.use((config) => {
|
||||||
//在发送请求之前做某件事
|
//在发送请求之前做某件事
|
||||||
@@ -64,23 +50,7 @@ axios.interceptors.request.use((config) => {
|
|||||||
// config.data = JSON.stringify(config.data);
|
// config.data = JSON.stringify(config.data);
|
||||||
}
|
}
|
||||||
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
// config.headers.Authorization = 'Bearer-eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyIiwic3ViIjoie1wiaWRcIjoyLFwidXNlcm5hbWVcIjpcImxpcnNcIn0iLCJpYXQiOjE2NjU3NDEwODcsImlzcyI6IkRXSiIsImF1dGhvcml0aWVzIjoiW10iLCJleHAiOjE2NzQzODEwODd9.ShM9R_NNFD7oo1OvxrEgg7PFeWinOuAKkuInUCMQupp66s64Hhv8tN0Wwr83nIN4rHPqtn95wmd4msWcvaFYJA';
|
||||||
if(filterHttpsUrl.indexOf(config.url) == -1){
|
config.headers.Authorization = getCookie('token');
|
||||||
if (!getCookie('token')) {
|
|
||||||
console.log('无Token,取消请求');
|
|
||||||
if(!isLoginTime){
|
|
||||||
isLoginTime = true
|
|
||||||
router.replace('/')
|
|
||||||
message.warning('Please login and try again~')
|
|
||||||
setTimeout(()=>[
|
|
||||||
isLoginTime = false
|
|
||||||
],2000)
|
|
||||||
}
|
|
||||||
return Promise.reject(new Error('缺少Token,请求被拦截')); // 阻止请求
|
|
||||||
}
|
|
||||||
config.headers.Authorization = getCookie('token');
|
|
||||||
}else{
|
|
||||||
config.headers.Authorization = '';
|
|
||||||
}
|
|
||||||
return config;
|
return config;
|
||||||
},(error) =>{
|
},(error) =>{
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
|||||||
@@ -403,12 +403,10 @@ export default defineComponent({
|
|||||||
homeMainData.openType = Object.keys(query)[0]
|
homeMainData.openType = Object.keys(query)[0]
|
||||||
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
||||||
}
|
}
|
||||||
console.log('homeMainData.openType',homeMainData.openType,'route.path',route.path)
|
if((query?.id || query?.history) && !await getIdExistToHistory()){
|
||||||
if (homeMainData.openType == 'history' && route.path !== '/home/history') {
|
router.push('/home')
|
||||||
homeMainData.openType = ''
|
return
|
||||||
homeMainData.openTypeChild = ''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
homeMainData.openType = ''
|
homeMainData.openType = ''
|
||||||
homeMainData.openTypeChild = ''
|
homeMainData.openTypeChild = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user