|
@@ -62,31 +62,42 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
-import { ref, onMounted } from 'vue'
|
|
|
+<script setup>
|
|
|
+import { ref, onMounted, computed } from 'vue'
|
|
|
+import { useUserStore } from '@/stores/user'
|
|
|
+import { findSceneNumber, findDeviceNumber } from '@/api/information/index'
|
|
|
import MemberTable from '@/views/pc/information/components/MemberTable.vue'
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
+
|
|
|
// 模拟数据结构
|
|
|
-const info = ref({
|
|
|
- head: '',
|
|
|
- nickName: '用户昵称',
|
|
|
- userName: '手机号码',
|
|
|
- email: '邮箱地址',
|
|
|
- incrementNum: 1,
|
|
|
- downloadNumTotal: 100,
|
|
|
- downloadNum: 20,
|
|
|
- cameraCount: 5
|
|
|
-})
|
|
|
+const info = computed(() => userStore.info)
|
|
|
+
|
|
|
|
|
|
const showStatus = ref('')
|
|
|
-const totalScene = ref(10)
|
|
|
+const totalScene = ref(0)
|
|
|
|
|
|
-const changeShowStatus = (component: string) => {
|
|
|
+const changeShowStatus = (component) => {
|
|
|
showStatus.value = component
|
|
|
}
|
|
|
|
|
|
+const getTotalScene = async () => {
|
|
|
+ const res = await findSceneNumber({})
|
|
|
+ const {SS, kJ, kk, SG, sx} = res
|
|
|
+ totalScene.value = SS.sceneNum + kJ.sceneNum + kk.sceneNum + SG.sceneNum + sx.sceneNum
|
|
|
+}
|
|
|
+
|
|
|
+const findIncrementList = async () => {
|
|
|
+ const res = await findIncrementList({})
|
|
|
+ const {cameraCount} = res
|
|
|
+ totalDevice.value = cameraCount
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
// 页面初始化逻辑
|
|
|
+ info.value = userStore.info
|
|
|
+ getTotalScene()
|
|
|
+ getTotalDevice()
|
|
|
})
|
|
|
</script>
|
|
|
|