|
@@ -968,7 +968,7 @@ import {
|
|
} from '@/services/common';
|
|
} from '@/services/common';
|
|
import { useSelection } from '@/services/selections';
|
|
import { useSelection } from '@/services/selections';
|
|
import { defaultFormat, fromArrows, toArrows, rootDomain } from '@/services/defaults';
|
|
import { defaultFormat, fromArrows, toArrows, rootDomain } from '@/services/defaults';
|
|
-import { checkData, localStorageName, Meta2dBackData } from '@/services/utils';
|
|
|
|
|
|
+import { checkData, localStorageName, Meta2dBackData, noLoginTip } from '@/services/utils';
|
|
import { debounce } from '@/services/debouce';
|
|
import { debounce } from '@/services/debouce';
|
|
import { s8 } from '@/services/random';
|
|
import { s8 } from '@/services/random';
|
|
import { setCookie, deleteCookie } from '@/services/cookie';
|
|
import { setCookie, deleteCookie } from '@/services/cookie';
|
|
@@ -981,6 +981,7 @@ import { AddIcon, EditIcon, SaveIcon, RootListIcon,SlashIcon, RefreshIcon, Serve
|
|
import {transformData} from '@/services/utils';
|
|
import {transformData} from '@/services/utils';
|
|
import { importExcel, saveAsExcel } from '@/services/excel';
|
|
import { importExcel, saveAsExcel } from '@/services/excel';
|
|
import { typeOptions } from '@/services/common';
|
|
import { typeOptions } from '@/services/common';
|
|
|
|
+import { upload } from '@/services/file';
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
@@ -1011,6 +1012,20 @@ const meta2dOptions: Options = {
|
|
// color: '#bdc7db',
|
|
// color: '#bdc7db',
|
|
disableAnchor: true,
|
|
disableAnchor: true,
|
|
defaultFormat: { ...defaultFormat },
|
|
defaultFormat: { ...defaultFormat },
|
|
|
|
+ uploadFn: async (file: File) => {
|
|
|
|
+ if (!(user&&user.id)) {
|
|
|
|
+ MessagePlugin.warning(noLoginTip);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const res:any = await upload(
|
|
|
|
+ file,
|
|
|
|
+ true,
|
|
|
|
+ file.name,
|
|
|
|
+ `/大屏/图片/默认`,
|
|
|
|
+ 'new'
|
|
|
|
+ );
|
|
|
|
+ return res.url;
|
|
|
|
+ },
|
|
};
|
|
};
|
|
|
|
|
|
let timer: any = 0;
|
|
let timer: any = 0;
|