多租户首页添加smsc-cdr
This commit is contained in:
@@ -8,40 +8,20 @@ import { getConfigKey } from '@/api/system/config';
|
|||||||
import { defineAsyncComponent, onMounted, shallowRef } from 'vue';
|
import { defineAsyncComponent, onMounted, shallowRef } from 'vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
|
import useLayoutStore from '@/store/modules/layout';
|
||||||
|
|
||||||
const currentComponent = shallowRef(
|
const currentComponent = shallowRef(
|
||||||
defineAsyncComponent(() => import('@/views/index/defaultIndex.vue'))
|
defineAsyncComponent(() => import('@/views/index/defaultIndex.vue'))
|
||||||
);
|
);
|
||||||
|
|
||||||
// function loadComponent(sysValue: String) {
|
|
||||||
// //PS:import不允许变量形式 也有人说左右都穿插字符串即可---经测试不行
|
|
||||||
|
|
||||||
// // currentComponent.value = defineAsyncComponent(
|
|
||||||
// // () => import(`@/views/${selectedComponent.value}.vue`)
|
|
||||||
// // );
|
|
||||||
|
|
||||||
// switch (sysValue) {
|
|
||||||
// case 'Index':
|
|
||||||
// currentComponent.value = Index;
|
|
||||||
// break;
|
|
||||||
// case 'Gold':
|
|
||||||
// currentComponent.value = Gold;
|
|
||||||
// break;
|
|
||||||
// case 'Dash':
|
|
||||||
// currentComponent.value = Dash;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// getConfigKey('sys.indexModule').then(res => {
|
|
||||||
// if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
|
||||||
// loadComponent(res.data);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
if (useUserStore().roles.includes('tenant')) {
|
if (useUserStore().roles.includes('tenant')) {
|
||||||
currentComponent.value = Index;
|
currentComponent.value = Index;
|
||||||
|
useLayoutStore().changeConf('layout', 'top');
|
||||||
|
useLayoutStore().changeConf('menuTheme', 'light');
|
||||||
|
useLayoutStore().changeConf('tabRender', false);
|
||||||
|
} else {
|
||||||
|
useLayoutStore().changeConf('layout', 'mix');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -45,19 +45,14 @@
|
|||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
top: 60%;
|
top: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.detailsLeft {
|
.detailsLeft {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
top: 60%;
|
top: 60%;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
.details {
|
|
||||||
margin-left: 12px;
|
|
||||||
right: 15px;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
.number {
|
.number {
|
||||||
padding-top: 25px;
|
padding-top: 25px;
|
||||||
@@ -70,6 +65,72 @@
|
|||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.details-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
left: 15px;
|
||||||
|
right: 15px;
|
||||||
|
top: 60%;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-item {
|
||||||
|
flex: 0 0 30%;
|
||||||
|
max-width: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cdrLeft {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cdrCenter {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cdrRight {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cdrNumber {
|
||||||
|
padding-top: 25px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 34px;
|
||||||
|
line-height: 40px;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
font-weight: 300;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
/* 图标样式 */
|
||||||
|
.cdrNumber .anticon {
|
||||||
|
margin-right: 5px;
|
||||||
|
font-size: 34px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cdrNumber .value {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
/* 响应式调整 */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.cdrNumber {
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cdrNumber .anticon {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.desc {
|
.desc {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -330,16 +330,40 @@ onMounted(() => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailsLeft">
|
<div class="details-container">
|
||||||
<div class="number" @click="fnToRouter('ImsCDR_10013')">
|
<div class="details-item cdrLeft">
|
||||||
<PhoneOutlined />
|
<div
|
||||||
{{ skimState.imsCdrNum }}
|
class="cdrNumber"
|
||||||
|
@click="fnToRouter('ImsCDR_10013')"
|
||||||
|
:title="`${skimState.imsCdrNum}`"
|
||||||
|
>
|
||||||
|
<PhoneOutlined class="spaceButton"/>
|
||||||
|
<!-- <span class="value">{{ skimState.imsCdrNum }}</span> -->
|
||||||
|
<span class="value"> {{ skimState.imsCdrNum }}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="details">
|
<div class="details-item cdrCenter">
|
||||||
<div class="number" @click="fnToRouter('SmfCDR_10014')">
|
<div
|
||||||
<database-outlined class="spaceButton" />
|
class="cdrNumber"
|
||||||
{{ skimState.smfCdrNum }}
|
@click="fnToRouter('SmfCDR_10014')"
|
||||||
|
:title="`${skimState.smfCdrNum}`"
|
||||||
|
>
|
||||||
|
<database-outlined class="spaceButton" />
|
||||||
|
<!-- <span class="value"> {{skimState.smfCdrNum}}</span> -->
|
||||||
|
<span class="value"> {{skimState.smfCdrNum}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="details-item cdrRight">
|
||||||
|
<div
|
||||||
|
class="cdrNumber"
|
||||||
|
@click="fnToRouter('SmfCDR_10014')"
|
||||||
|
:title="`${skimState.smfCdrNum}`"
|
||||||
|
>
|
||||||
|
<database-outlined class="spaceButton" />
|
||||||
|
<span class="value"> {{skimState.smfCdrNum}}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
@@ -377,7 +401,6 @@ onMounted(() => {
|
|||||||
class="spaceButton"
|
class="spaceButton"
|
||||||
/>
|
/>
|
||||||
{{ skimState.gEventNum }}
|
{{ skimState.gEventNum }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|||||||
Reference in New Issue
Block a user