lvkun 2 anos atrás
pai
commit
a768cc6fbd

+ 0 - 2
src/components/CodeMirror/index.tsx

@@ -28,8 +28,6 @@ export const CodeMirrorTsx = defineComponent({
     const view = ref<EditorView>()
 
     const transDoc = () => {
-      console.log(' props.bodyType:', props.bodyType)
-
       return props.bodyType === 'javascript' ? props.bodyJson : JSON.stringify(JSON.parse(props.bodyJson), null, '\t')
     }
 

+ 0 - 5
src/components/FormPro/index.vue

@@ -129,9 +129,6 @@ const initFormPro = () => {
   }
 
   propsState.layout = props.layout ? props.layout : 'horizontal'
-  console.log('rulesRef:', rulesRef)
-
-  console.log('formProps:', formProps)
 }
 
 const modelRef = reactive<Record<string, any>>({})
@@ -141,7 +138,6 @@ const rulesRef = reactive<Record<string, any>>({})
 const formProps = reactive<FormItemProps[]>([])
 
 const onChange = (record: any, key: string) => {
-  console.log('form pro item change:', record)
   modelRef[key] = record
 }
 
@@ -159,7 +155,6 @@ const onSubmit = () => {
         resolve(modelRef)
       })
       .catch(err => {
-        console.log('error', err)
         reject(err)
       })
   })

+ 0 - 2
src/components/MicroComponents/index.tsx

@@ -76,8 +76,6 @@ export const IconTsx = defineComponent({
     }
   },
   setup (props, ctx) {
-    console.log('IconTsx:', props.name)
-
     return () => (
       <svg class="icon" aria-hidden="true" style={{ fill: '#fff' }} >
         <use style={{ fill: '#fff' }} xlinkHref={`#icon-${props.name}`}></use>

+ 10 - 8
src/layout/components/Sidebar/index.vue

@@ -52,20 +52,22 @@ const collapsed = ref<boolean>(false)
 const selectedKeys2 = ref<string[]>([appRouter.router.sider.selectPath])
 const openKeys = ref<string[]>(appRouter.router.sider!.openKeys)
 
-const emitter = useEmitter()
+console.log('appRouter:', appRouter)
+
+// const emitter = useEmitter()
 
 // 如果是产品类型这种 需要找到父节点 设置openKeys
 // 刷新后也需要打开openKeys
 
-emitter.on(Emitter.NAVBAR, () => {
-  selectedKeys2.value = [appRouter.router.sider.selectPath]
-})
+// emitter.on(Emitter.NAVBAR, () => {
+//   selectedKeys2.value = [appRouter.router.sider.selectPath]
+// })
 
-onMounted(() => {
-  selectedKeys2.value = [appRouter.currentRoute!]
+// onMounted(() => {
+//   selectedKeys2.value = [appRouter.currentRoute!]
 
-  rootRouter.push(appRouter.currentRoute!)
-})
+//   rootRouter.push(appRouter.currentRoute!)
+// })
 </script>
 
 <style lang="less" scoped >

+ 8 - 20
src/layout/navbar.vue

@@ -34,15 +34,11 @@
 import { computed, onMounted, ref } from 'vue'
 import { useAppRouter } from '@/store/router'
 import user from './user.vue'
-import { useRouter, useRoute } from 'vue-router'
+import { useRoute } from 'vue-router'
 import { routes } from '@/router/index'
 import { IconTsx } from '@/components/MicroComponents/index'
 import { useDesignStore } from '@/store'
 
-const logoPng = require('@/assets/logo.png')
-
-const router = useRouter()
-
 const route = useRoute()
 
 const appRouter = useAppRouter()
@@ -51,8 +47,6 @@ const selectedKeys = ref<string[]>()
 
 const designStore = useDesignStore()
 
-console.log('designStore:', !!designStore.theme, designStore.theme)
-
 const iconName = computed(() => designStore.theme ? 'sun' : 'moon')
 
 const headerBgColor = computed(() => designStore.theme ? '#141414' : '#fff')
@@ -90,24 +84,18 @@ const hasCurrentRourte = (children: ROUTER.RoutesProps[]): boolean => {
 }
 
 onMounted(() => {
-  routes.forEach(item => {
-    if (item.children && hasCurrentRourte(item.children)) {
-      selectedKeys.value = [item.path]
-      appRouter.changeNavbar(item.path, 'init')
-      appRouter.changeSiderRoute()
-    }
-  })
+  // routes.forEach(item => {
+  //   if (item.children && hasCurrentRourte(item.children)) {
+  //     selectedKeys.value = [item.path]
+  //     appRouter.changeNavbar(item.path, 'init')
+  //     appRouter.changeSiderRoute()
+  //   }
+  // })
 })
 
 </script>
 
 <style lang="less" scoped >
-.header {
-  // width: 100%;
-  // position: absolute;
-  // z-index: 2;
-  // background-color: #fff;
-}
 
 .df-center {
   display: flex;

+ 0 - 3
src/pages/Iot/dashboard/deviceAccess/index.vue

@@ -111,12 +111,10 @@ const sourceList = reactive([
 
 const getStatisList = async () => {
   ModelController.count().then(r => {
-    console.log('ModelController:', r.data)
     sourceList[0].value = r.data.TOTAL
   })
 
   DeviceContriller.count().then(r => {
-    console.log('DeviceContriller', r.data)
     sourceList[3].value = r.data.TOTAL
     sourceList[4].value = r.data.CONNECT
     sourceList[5].value = r.data.INIT
@@ -128,7 +126,6 @@ const getStatisList = async () => {
 
   RuleController.linkCount().then(r => {
     sourceList[2].value = r.data.TOTAL
-    console.log('RuleController:', r.data)
   })
 }
 

+ 1 - 10
src/store/router.ts

@@ -38,11 +38,7 @@ export const useAppRouter = defineStore(ConstantStore.ROUTER, () => {
   const siderRoutes = computed(() => RootRouter.getRoutes().find(item => item.path === appRouter.navbar!.selectPath)?.children)
 
   const initAppRouter = () => {
-    console.log('initAppRouter')
-
     appRouter.navbar.route = RootRouter.options.routes.map((route: any) => {
-      console.log(route.link, route.path)
-
       return {
         path: route.link ? route.path.substr(1) : route.path,
         name: route.name,
@@ -50,12 +46,7 @@ export const useAppRouter = defineStore(ConstantStore.ROUTER, () => {
       }
     })
 
-    // appRouter.navbar.selectPath = RootRouter.options.routes[0].path
-    appRouter.navbar.selectPath = currentRoute.value!
-
-    appRouter.sider.route = siderRoutes.value!
-
-    appRouter.sider.selectPath = currentRoute.value!
+    // appRouter.sider.selectPath = currentRoute.value!
   }
 
   const changeNavbar = (path: string, key: 'init' | '' = '') => {

+ 1 - 0
vue.config.js

@@ -26,4 +26,5 @@ module.exports = defineConfig({
       }
     }
   }
+
 })

Diferenças do arquivo suprimidas por serem muito extensas
+ 314 - 314
yarn.lock


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff