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

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

View File

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