|
@@ -1056,7 +1056,7 @@ const dragStart = async (event: DragEvent | MouseEvent|TouchEvent, item: any) =>
|
|
|
dropped = false;
|
|
|
|
|
|
let data = null;
|
|
|
- const id = item._id || item.id;
|
|
|
+ const id = item.id || item._id;
|
|
|
let isAsync: boolean;
|
|
|
if (
|
|
|
activeAssets.value === 'user' &&
|
|
@@ -1071,7 +1071,7 @@ const dragStart = async (event: DragEvent | MouseEvent|TouchEvent, item: any) =>
|
|
|
//方案
|
|
|
data = item.data || item;
|
|
|
} else if (item['3d']) {
|
|
|
- const res: any = await getLe5le3d(item._id || item.id, {
|
|
|
+ const res: any = await getLe5le3d(item.id || item._id, {
|
|
|
image: 1,
|
|
|
_id: 1,
|
|
|
name: 1,
|
|
@@ -1095,7 +1095,7 @@ const dragStart = async (event: DragEvent | MouseEvent|TouchEvent, item: any) =>
|
|
|
height: meta2d.store.data.height || meta2d.store.options.height,
|
|
|
externElement: true,
|
|
|
thumbImg: res.image,
|
|
|
- iframe: 'https://view3d.le5le.com/?id=' + (item._id || item.id),
|
|
|
+ iframe: 'https://view3d.le5le.com/?id=' + (item.id || item._id),
|
|
|
};
|
|
|
} else if (item.component) {
|
|
|
// 默认
|
|
@@ -1180,7 +1180,7 @@ const open = async (item: any) => {
|
|
|
path: '/',
|
|
|
query: {
|
|
|
r: Date.now() + '',
|
|
|
- id: item._id,
|
|
|
+ id:item.id || item._id,
|
|
|
},
|
|
|
});
|
|
|
} else {
|
|
@@ -1390,7 +1390,7 @@ const _createFoder = async () => {
|
|
|
});
|
|
|
if (ret) {
|
|
|
editedFolder.value.name = editedFolder.value.label;
|
|
|
- editedFolder.value._id = ret._id || ret.id;
|
|
|
+ editedFolder.value._id = ret.id || ret._id;
|
|
|
editedFolder.value.edited = false;
|
|
|
}
|
|
|
}
|
|
@@ -1496,7 +1496,7 @@ const delDialog = reactive<any>({
|
|
|
});
|
|
|
// TODO 右键菜单移动图纸
|
|
|
const onMenu = async (val: string) => {
|
|
|
- const id = contextmenu.component._id || contextmenu.component.id;
|
|
|
+ const id = contextmenu.component.id || contextmenu.component._id;
|
|
|
setTimeout(() => {
|
|
|
contextmenu.group = '';
|
|
|
contextmenu.component = {};
|
|
@@ -1531,7 +1531,7 @@ const onMenu = async (val: string) => {
|
|
|
}
|
|
|
window.open(url + id, '_blank');
|
|
|
} else {
|
|
|
- if (contextmenu.group._id && contextmenu.group.name !== '默认') {
|
|
|
+ if ((contextmenu.group.id||contextmenu.group._id) && contextmenu.group.name !== '默认') {
|
|
|
setFolder(contextmenu.group);
|
|
|
}
|
|
|
autoSave();
|
|
@@ -1750,7 +1750,7 @@ const delComponent = async () => {
|
|
|
delDialog.contextmenuObj.component.id;
|
|
|
delDialog.contextmenuObj.group.list.forEach(
|
|
|
(item: any, index: number, arr: any[]) => {
|
|
|
- if (id && (id === item._id || id === item.id)) {
|
|
|
+ if (id && (id === item.id || id === item._id)) {
|
|
|
arr.splice(index, 1);
|
|
|
}
|
|
|
if (!id) {
|
|
@@ -1793,7 +1793,7 @@ const drop = (obj: any) => {
|
|
|
const onSubmitOrder = async () => {
|
|
|
const result: any = await axios.post('/api/order/datas/submit', {
|
|
|
collection: 'v',
|
|
|
- id: chargeDialog.data._id,
|
|
|
+ id: chargeDialog.data.id||chargeDialog.data._id,
|
|
|
});
|
|
|
if (result) {
|
|
|
wechatPayDialog.order = result;
|
|
@@ -1960,7 +1960,7 @@ const delFolder = async (item: any) => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const id = item._id || item.id;
|
|
|
+ const id = item.id || item._id;
|
|
|
let ret: any;
|
|
|
if (activeAssets.value !== 'user') {
|
|
|
return;
|