瀏覽代碼

工作台

CzRger 1 年之前
父節點
當前提交
9ac1f0b67f

+ 4 - 0
src/store/modules/app.ts

@@ -7,10 +7,14 @@ const state = {
 	},
 	userInfo: <any>{},
 	userRoleList: [],
+	zby: true,
 	timestamp: new Date().getTime()
 }
 
 const getters = {
+	isZBY: (state) => {
+		return state.zby
+	}
 }
 
 const mutations = {

+ 12 - 0
src/views/staging/common/base.scss

@@ -0,0 +1,12 @@
+.staging-layout {
+  display: flex;
+  .staging-left {
+
+  }
+  .staging-center {
+
+  }
+  .staging-right {
+
+  }
+}

+ 11 - 2
src/views/staging/index.vue

@@ -1,5 +1,10 @@
 <template>
-  asdas
+  <template v-if="$store.getters['app/isZBY']">
+    <ZBYCom/>
+  </template>
+  <template v-else>
+    <ZBGLYCom/>
+  </template>
 </template>
 
 <script lang="ts">
@@ -17,10 +22,14 @@ import {
 } from 'vue'
 import {useStore} from 'vuex'
 import {useRouter, useRoute} from 'vue-router'
+import ZBYCom from './zby/index.vue'
+import ZBGLYCom from './zbgly/index.vue'
 
 export default defineComponent({
   name: '',
-  components: {},
+  components: {
+    ZBYCom, ZBGLYCom
+  },
   setup(props, {emit}) {
     const store = useStore();
     const router = useRouter();

+ 38 - 0
src/views/staging/zbgly/index.vue

@@ -0,0 +1,38 @@
+<template>
+  值班管理员
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>

+ 38 - 0
src/views/staging/zby/index.vue

@@ -0,0 +1,38 @@
+<template>
+  值班员
+</template>
+
+<script lang="ts">
+import {
+  defineComponent,
+  computed,
+  onMounted,
+  ref,
+  reactive,
+  watch,
+  getCurrentInstance,
+  ComponentInternalInstance,
+  toRefs,
+  nextTick
+} from 'vue'
+import {useStore} from 'vuex'
+import {useRouter, useRoute} from 'vue-router'
+
+export default defineComponent({
+  name: '',
+  components: {},
+  setup(props, {emit}) {
+    const store = useStore();
+    const router = useRouter();
+    const route = useRoute();
+    const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties
+    const state = reactive({})
+    return {
+      ...toRefs(state)
+    }
+  },
+})
+</script>
+
+<style scoped lang="scss">
+</style>