Prechádzať zdrojové kódy

Merge branch 'main' of github.com:le5le-com/visualization-design

Alsmile 1 rok pred
rodič
commit
7db305263e

+ 1 - 1
src/global.d.ts

@@ -5,7 +5,7 @@ declare global {
   var C2S: any;
   var folderJson: any;
   var fileJson: any;
-  var Meta3D: any;
+  // var Meta3D: any;
 }
 
 declare interface Window {

+ 41 - 10
src/services/defaults.ts

@@ -1013,12 +1013,12 @@ export const formComponents = [
       },
       {
         name: '图标',
-        icon: 'l-share',
+        icon: 'l-tubiao',
         data: {
           width: 100,
           height: 100,
           name: 'image',
-          icon: '\ue8c6',
+          icon: '\uea35',
           iconFamily: 'l-icon',
         },
       },
@@ -1039,7 +1039,7 @@ export const formComponents = [
           width: 100,
           height: 100,
           name: 'gif',
-          image: cdn + '/img/logo.png',
+          image: cdn + '/png/电信机房/防火墙.gif',
         },
       },
       {
@@ -1069,24 +1069,53 @@ export const formComponents = [
         name: '头像',
         icon: 'l-pc',
         data: {
-          width: 200,
-          height: 200,
+          width: 30,
+          height: 30,
+          disableAnchor: true,
+          name: 'square',
+          lineWidth: 0,
+          image: '/img/avatar.png',
+          imageRadius: 0.5,
+          background: '#689f38',
+          borderRadius: 0.5,
+          ratio: true,
         },
       },
       {
         name: '徽标',
         icon: 'l-pc',
         data: {
-          width: 200,
-          height: 200,
+          width: 35,
+          height: 20,
+          name: 'square',
+          borderRadius: 0.5,
+          lineWidth: 0,
+          background: '#d54941',
+          color: '#fff',
+          text: '99+',
         },
       },
       {
         name: '标签',
         icon: 'l-pc',
         data: {
-          width: 200,
-          height: 200,
+          text: 'success',
+          width: 80,
+          height: 24,
+          borderRadius: 0.1,
+          name: 'rectangle',
+          lineWidth: 1,
+          fontSize: 12,
+          icon: '\uea10',
+          iconFamily: 'l-icon',
+          iconColor: '#52c41a',
+          iconSize: 12,
+          iconAlign: 'left',
+          iconLeft: 8,
+          textAlign: 'right',
+          color: '#52c41a',
+          background: '#f6ffed',
+          textLeft: -6,
         },
       },
     ],
@@ -1154,6 +1183,7 @@ export const formComponents = [
               content: '事件四',
             },
           ],
+          text: '时间轴',
         },
       },
       {
@@ -1163,7 +1193,7 @@ export const formComponents = [
           name: 'leTimeline',
           width: 40,
           height: 500,
-          text: '当前时间',
+          text: '时间',
           hiddenText: true,
           direction: 'vertical',
           labelAlign: 'left', //left/right/alternate/top/bottom
@@ -1199,6 +1229,7 @@ export const formComponents = [
         data: {
           width: 200,
           height: 200,
+          name: 'calendar',
         },
       },
     ],

+ 11 - 8
src/views/components/PenProps.vue

@@ -613,8 +613,8 @@
                     :color-modes="['monochrome']"
                     :show-primary-color-preview="false"
                     :clearable="true"
-                    v-model="data.pen.color"
-                    @change="changeValue('color')"
+                    v-model="data.pen.textColor"
+                    @change="changeValue('textColor')"
                   />
                   <label style="width: 44px">前景</label>
                   <t-color-picker
@@ -622,8 +622,8 @@
                     format="CSS"
                     :color-modes="['monochrome']"
                     :show-primary-color-preview="false"
-                    v-model="data.pen.background"
-                    @change="changeValue('background')"
+                    v-model="data.pen.textBackground"
+                    @change="changeValue('textBackground')"
                   />
                   <label style="width: 44px">背景</label>
 
@@ -632,8 +632,8 @@
                     format="CSS"
                     :color-modes="['monochrome']"
                     :show-primary-color-preview="false"
-                    v-model="data.pen.hoverColor"
-                    @change="changeValue('hoverColor')"
+                    v-model="data.pen.hoverTextColor"
+                    @change="changeValue('hoverTextColor')"
                   />
                   <label style="width: 44px">悬停</label>
 
@@ -642,8 +642,8 @@
                     format="CSS"
                     :color-modes="['monochrome']"
                     :show-primary-color-preview="false"
-                    v-model="data.pen.activeColor"
-                    @change="changeValue('activeColor')"
+                    v-model="data.pen.activeTextColor"
+                    @change="changeValue('activeTextColor')"
                   />
                   <label style="width: 44px">选中</label>
                 </div>
@@ -1048,6 +1048,9 @@ onBeforeMount(() => {
   if (!d.groups) {
     d.groups = [];
   }
+  if (!d.iconUrls) {
+    d.iconUrls = [];
+  }
   data.iconUrls = d.iconUrls;
   data.groups = d.groups;
   initPenData();

+ 12 - 0
src/views/components/View.vue

@@ -750,6 +750,7 @@ import CodeEditor from './common/CodeEditor.vue';
 import ContextMenu from './ContextMenu.vue';
 import Network from './Network.vue';
 import ChargeCloudPublish from './ChargeCloudPublish.vue';
+import { setCookie } from '@/services/cookie';
 
 const router = useRouter();
 const route = useRoute();
@@ -822,6 +823,17 @@ const watcher = watch(
 );
 
 const open = async (flag: boolean = false) => {
+  if (route.query.token) {
+    localStorage.setItem('token', route.query.token + '');
+    setCookie('token', route.query.token + '');
+    const newQuery = { ...route.query };
+    delete newQuery.token;
+    router.replace({
+      path: '/',
+      query: newQuery,
+    });
+    return;
+  }
   if (route.query.id) {
     let ret: any;
     if (route.query.c) {

+ 1 - 1
tsconfig.json

@@ -15,7 +15,7 @@
       "@/*": ["src/*"],
       "@meta2d/*": ["../meta2d.js/packages/*"],
       "@2d-components/*": ["../2d-components/packages/*"],
-      "@meta3d/*": ["../meta3d.js/*"],
+      // "@meta3d/*": ["../meta3d.js/*"],
     },
   },
   "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],

+ 2 - 2
vite.config.ts

@@ -7,14 +7,14 @@ import formidable from 'formidable';
 
 // https://vitejs.dev/config/
 export default defineConfig({
-  assetsInclude: ['**/*.glb'],
+  // assetsInclude: ['**/*.glb'],
   plugins: [vue(), vueJsx(), fileList()],
   resolve: {
     alias: {
       '@': path.resolve(__dirname, './src/'),
       '@meta2d': path.resolve(__dirname, '../meta2d.js/packages'),
       '@2d-components': path.resolve(__dirname, '../2d-components/packages'),
-      '@meta3d': path.resolve(__dirname, '../meta3d.js'),
+      // '@meta3d': path.resolve(__dirname, '../meta3d.js'),
     },
   },
   build: {