--新增签约用户

This commit is contained in:
lai
2023-09-23 18:05:25 +08:00
parent 6593419fb7
commit 619920c104
2 changed files with 348 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
import { request } from '@/plugins/http-fetch';
import { toRaw } from 'vue';
/**
* 签约列表导出
@@ -86,6 +87,27 @@ export function updateSub(data: Record<string, any>) {
* @returns object
*/
export function addSub(neID: string, data: Record<string, any>) {
console.log(data);
let ardArr = [0, 0, 0, 0, 0, 0, 0, 0];
let hplmnArr = [0, 0, 0, 0, 0, 0, 0, 0];
let odbArr = [0, 0, 0, 0, 0, 0, 0, 0];
data.ard.forEach((item: any) => {
ardArr[item] = 1;
});
data.hplmnOdb.forEach((item: any) => {
hplmnArr[item] = 1;
});
data.epsOdb.forEach((item: any) => {
odbArr[item] = 1;
});
data.epsOdb = '' + parseInt(odbArr.join(''), 2);
data.hplmnOdb = '' + parseInt(hplmnArr.join(''), 2);
data.ard = '' + parseInt(ardArr.join(''), 2);
data.cn = '3';
return request({
url: `/udmUserManage/v1/sub/${neID}`,
method: 'post',