55 lines
1.5 KiB
Vue
55 lines
1.5 KiB
Vue
<template>
|
|
<div class="outer">
|
|
<!-- 专业人员 -->
|
|
<specialized :imProps="imProps" v-if="isSpecialized === '6'" />
|
|
<!-- 操作人员 -->
|
|
<operate :imProps="imProps" v-if="isSpecialized === '5'" />
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue';
|
|
import specialized from './components/specialized.vue';
|
|
import operate from './components/operate.vue';
|
|
import { userSigAndroidApi } from '/@/views/emergency/communication/components/commApi';
|
|
import { getToken } from '/@/utils/auth';
|
|
import { useGlobSetting } from '/@/hooks/setting';
|
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
|
const isSpecialized = ref<String>('');
|
|
const imProps = ref<Object>({
|
|
sdkAppId: '',
|
|
userSig: '',
|
|
tokenF: getToken(),
|
|
userId: '',
|
|
urlF: '',
|
|
});
|
|
const userStore = useUserStore();
|
|
|
|
isSpecialized.value = userStore.getUserInfo.personType;
|
|
|
|
const globSetting = useGlobSetting();
|
|
const apiUrl = globSetting.apiUrl;
|
|
imProps.value.urlF = apiUrl.replace('://', 'lol');
|
|
|
|
const getSig = () => {
|
|
userSigAndroidApi({})
|
|
.then((res) => {
|
|
imProps.value.userSig = res.userSig;
|
|
imProps.value.sdkAppId = res.sdkAppId;
|
|
imProps.value.userId = res.userId;
|
|
})
|
|
.catch((e) => {
|
|
console.log(e);
|
|
});
|
|
};
|
|
|
|
getSig();
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.outer {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|