merge main to multi-tenant

This commit is contained in:
2024-06-28 14:26:06 +08:00
parent ef3796c34f
commit a78e7049cf
5 changed files with 38 additions and 41 deletions

View File

@@ -38,12 +38,12 @@ const statusBarChart = ref<any>(null);
/**网元状态字典数据 */ /**网元状态字典数据 */
let indexColor = ref<DictType[]>([ let indexColor = ref<DictType[]>([
{ label: 'Normal', value: 'normal', elTagType: '', elTagClass: '#91cc75' }, { label: 'Normal', value: 'normal', tagType: '', tagClass: '#91cc75' },
{ {
label: 'Abnormal', label: 'Abnormal',
value: 'abnormal', value: 'abnormal',
elTagType: '', tagType: '',
elTagClass: '#ee6666', tagClass: '#ee6666',
}, },
]); ]);
@@ -197,7 +197,7 @@ function fnGetList(one: boolean) {
orient: 'vertical', orient: 'vertical',
left: 'left', left: 'left',
}, },
color: indexColor.value.map(item => item.elTagClass), color: indexColor.value.map(item => item.tagClass),
series: [ series: [
{ {
name: t('views.index.realNeStatus'), name: t('views.index.realNeStatus'),

View File

@@ -2,7 +2,7 @@
import { ref, onMounted, markRaw, reactive } from 'vue'; import { ref, onMounted, markRaw, reactive } from 'vue';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listSub } from '@/api/neUser/sub'; import { listUDMSub } from '@/api/neData/udm_sub';
import { listUENumBySMF, listUEInfoBySMF } from '@/api/neUser/smf'; import { listUENumBySMF, listUEInfoBySMF } from '@/api/neUser/smf';
import { listBase5G } from '@/api/neUser/base5G'; import { listBase5G } from '@/api/neUser/base5G';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
@@ -38,7 +38,7 @@ let skimState: SkimStateType = reactive({
/**获取概览信息 */ /**获取概览信息 */
async function fnGetSkim() { async function fnGetSkim() {
const resArr = await Promise.allSettled([ const resArr = await Promise.allSettled([
listSub({ listUDMSub({
neid: '001', neid: '001',
pageNum: 1, pageNum: 1,
pageSize: 1, pageSize: 1,

View File

@@ -1106,7 +1106,6 @@ onMounted(() => {
<ProModal <ProModal
:drag="true" :drag="true"
:width="800" :width="800"
:destroyOnClose="true"
:keyboard="false" :keyboard="false"
:mask-closable="false" :mask-closable="false"
:visible="modalState.visibleByEdit" :visible="modalState.visibleByEdit"

View File

@@ -8,17 +8,17 @@ import { ColumnsType } from 'ant-design-vue/lib/table';
import UploadModal from '@/components/UploadModal/index.vue'; import UploadModal from '@/components/UploadModal/index.vue';
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue'; import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { import {
loadSub, addUDMSub,
listSub, batchAddUDMSub,
getSub, batchDelUDMSub,
updateSub, delUDMSub,
addSub, exportUDMSub,
delSub, getUDMSub,
importSubData, importUDMSub,
exportSub, listUDMSub,
batchAddSub, resetUDMSub,
batchDelSub, updateUDMSub,
} from '@/api/neUser/sub'; } from '@/api/neData/udm_sub';
import useNeInfoStore from '@/store/modules/neinfo'; import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -381,7 +381,7 @@ function fnModalVisibleByEdit(imsi?: string) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true; modalState.confirmLoading = true;
const neID = queryParams.neId || '-'; const neID = queryParams.neId || '-';
getSub(neID, imsi) getUDMSub(neID, imsi)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
transformFormData(res.data.smData); transformFormData(res.data.smData);
@@ -607,8 +607,8 @@ function fnModalOk() {
.map((item: number) => `${item}`.padStart(2, '0')) .map((item: number) => `${item}`.padStart(2, '0'))
.join(''); .join('');
const neID = queryParams.neId || '-'; from.neId = queryParams.neId || '-';
const result = from.id ? updateSub(neID, from) : addSub(neID, from); const result = from.id ? updateUDMSub(from) : addUDMSub(from);
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
result result
.then(res => { .then(res => {
@@ -695,11 +695,10 @@ function fnBatchModalOk() {
.map((item: number) => `${item}`.padStart(2, '0')) .map((item: number) => `${item}`.padStart(2, '0'))
.join(''); .join('');
const neID = queryParams.neId || '-';
from.neID = neID;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
batchAddSub(from) from.neId = queryParams.neId || '-';
.then(res => { batchAddUDMSub(from, from.num).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success({
content: t('common.msgSuccess', { msg: modalState.title }), content: t('common.msgSuccess', { msg: modalState.title }),
@@ -748,10 +747,9 @@ function fnBatchDelModalOk() {
.then(e => { .then(e => {
modalState.confirmLoading = true; modalState.confirmLoading = true;
const from = toRaw(modalState.BatchDelForm); const from = toRaw(modalState.BatchDelForm);
from.neID = queryParams.neId || '-';
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
batchDelSub(from) const neId = queryParams.neId || '-';
.then(res => { batchDelUDMSub(neId, from.imsi, from.num).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success({
content: t('common.msgSuccess', { msg: modalState.title }), content: t('common.msgSuccess', { msg: modalState.title }),
@@ -872,7 +870,7 @@ function fnRecordDelete(imsi: string) {
onOk() { onOk() {
modalState.loadDataLoading = true; modalState.loadDataLoading = true;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
delSub(neID, imsi) delUDMSub(neID, imsi)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const msgContent = t('common.msgSuccess', { const msgContent = t('common.msgSuccess', {
@@ -953,7 +951,7 @@ function fnExportList(type: string) {
if (!neID) return; if (!neID) return;
const key = 'exportSub'; const key = 'exportSub';
message.loading({ content: t('common.loading'), key }); message.loading({ content: t('common.loading'), key });
exportSub({ exportUDMSub({
neId: neID, neId: neID,
type: type, type: type,
}).then(res => { }).then(res => {
@@ -982,7 +980,7 @@ function fnLoadData() {
tablePagination.total = 0; tablePagination.total = 0;
tableState.data = []; tableState.data = [];
tableState.loading = true; // 表格loading tableState.loading = true; // 表格loading
loadSub(neID).then(res => { resetUDMSub(neID).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const num = res.data; const num = res.data;
notification.success({ notification.success({
@@ -1019,7 +1017,7 @@ function fnGetList(pageNum?: number) {
const selectFrom = Object.assign({}, toRaw(queryParams)); const selectFrom = Object.assign({}, toRaw(queryParams));
listSub(selectFrom).then(res => { listUDMSub(selectFrom).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选 // 取消勾选
if (tableState.selectedRowKeys.length > 0) { if (tableState.selectedRowKeys.length > 0) {
@@ -1085,7 +1083,7 @@ function fnModalUploadImportUpload(file: File) {
formData.append('neId', neID); formData.append('neId', neID);
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
uploadImportState.loading = true; uploadImportState.loading = true;
importSubData(formData) importUDMSub(formData)
.then(res => { .then(res => {
uploadImportState.msg = res.msg; uploadImportState.msg = res.msg;
}) })
@@ -1412,7 +1410,7 @@ onMounted(() => {
</a-card> </a-card>
<!-- 新增框或修改框 --> <!-- 新增框或修改框 -->
<DraggableModal <ProModal
style="top: 0px" style="top: 0px"
width="800px" width="800px"
:body-style="{ maxHeight: '650px', 'overflow-y': 'auto' }" :body-style="{ maxHeight: '650px', 'overflow-y': 'auto' }"
@@ -1927,10 +1925,10 @@ onMounted(() => {
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
</a-form> </a-form>
</DraggableModal> </ProModal>
<!-- 批量增加框 --> <!-- 批量增加框 -->
<DraggableModal <ProModal
style="top: 0px" style="top: 0px"
width="800px" width="800px"
:body-style="{ maxHeight: '650px', 'overflow-y': 'auto' }" :body-style="{ maxHeight: '650px', 'overflow-y': 'auto' }"
@@ -2468,10 +2466,10 @@ onMounted(() => {
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
</a-form> </a-form>
</DraggableModal> </ProModal>
<!-- 批量删除框 --> <!-- 批量删除框 -->
<DraggableModal <ProModal
style="top: 0px" style="top: 0px"
width="500px" width="500px"
:keyboard="false" :keyboard="false"
@@ -2527,7 +2525,7 @@ onMounted(() => {
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</DraggableModal> </ProModal>
<!-- 上传导入表格数据文件框 --> <!-- 上传导入表格数据文件框 -->
<UploadModal <UploadModal

View File

@@ -419,7 +419,7 @@ onMounted(() => {
</a-card> </a-card>
<!-- 详情框 --> <!-- 详情框 -->
<DraggableModal <ProModal
width="800px" width="800px"
:visible="modalState.visibleByView" :visible="modalState.visibleByView"
:title="modalState.title" :title="modalState.title"
@@ -476,7 +476,7 @@ onMounted(() => {
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
</a-form> </a-form>
</DraggableModal> </ProModal>
</PageContainer> </PageContainer>
</template> </template>