增加imsi匹配搜索框

This commit is contained in:
lai
2024-07-04 16:19:04 +08:00
parent 361fdf6959
commit ebd8821e64
2 changed files with 80 additions and 20 deletions

View File

@@ -46,6 +46,8 @@ let queryParams = reactive({
neId: undefined,
/**移动编号 */
imsi: '',
/**imsi匹配方式 */
imsiMatch: 'full',
/**租户名 */
tenantName: '',
/**移动号 */
@@ -64,6 +66,7 @@ let queryParams = reactive({
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
imsi: '',
imsiMatch: 'full',
msisdn: '',
tenantName: '',
sortField: 'imsi',
@@ -1087,7 +1090,23 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
tablePagination.current = pageNum;
}
listUDMSub(toRaw(queryParams)).then(res => {
const imsiMatchRule: any = {
prefix: queryParams.imsi ? `${queryParams.imsi}%` : '',
full: queryParams.imsi ? `%${queryParams.imsi}%` : '',
};
const toBack: any = {
imsi: imsiMatchRule[queryParams.imsiMatch] || '',
msisdn: queryParams.msisdn,
tenantName: queryParams.tenantName,
sortField: queryParams.sortField,
sortOrder: queryParams.sortOrder,
pageNum: queryParams.pageNum,
pageSize: queryParams.pageSize,
};
listUDMSub(toBack).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
@@ -1300,6 +1319,19 @@ onMounted(() => {
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24" v-show="queryParams.imsi">
<a-form-item label="IMSI Match Mode" name="imsiMatch">
<a-select
:label="t('views.neUser.sub.imsiMode')"
style="width: 100%"
v-model:value="queryParams.imsiMatch"
:options="[
{ label: 'Prefix', value: 'prefix' },
{ label: 'Full', value: 'full' },
]"
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi">
<a-input
@@ -1309,6 +1341,7 @@ onMounted(() => {
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="MSISDN" name="msisdn">
<a-input
@@ -1318,6 +1351,18 @@ onMounted(() => {
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.neUser.sub.tenantName')"
name="tenantName"
>
<a-auto-complete
v-model:value="queryParams.tenantName"
:options="modalStateFromOption.tenantName"
:filter-option="filterOption"
></a-auto-complete>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
@@ -1337,20 +1382,6 @@ onMounted(() => {
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.neUser.sub.tenantName')"
name="tenantName "
>
<a-auto-complete
v-model:value="queryParams.tenantName"
:options="modalStateFromOption.tenantName"
:filter-option="filterOption"
></a-auto-complete>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-card>

View File

@@ -36,6 +36,8 @@ let queryParams = reactive({
neId: undefined,
/**移动编号 */
imsi: '',
/**imsi匹配方式 */
imsiMatch: 'full',
/**移动号 */
msisdn: '',
/**排序字段 */
@@ -53,6 +55,7 @@ function fnQueryReset() {
queryParams = Object.assign(queryParams, {
imsi: '',
msisdn: '',
imsiMatch: 'full',
sortField: 'imsi',
sortOrder: 'asc',
pageNum: 1,
@@ -695,10 +698,10 @@ function fnBatchModalOk() {
.map((item: number) => `${item}`.padStart(2, '0'))
.join('');
const hide = message.loading(t('common.loading'), 0);
from.neId = queryParams.neId || '-';
batchAddUDMSub(from, from.num).then(res => {
batchAddUDMSub(from, from.num)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),
@@ -749,7 +752,8 @@ function fnBatchDelModalOk() {
const from = toRaw(modalState.BatchDelForm);
const hide = message.loading(t('common.loading'), 0);
const neId = queryParams.neId || '-';
batchDelUDMSub(neId, from.imsi, from.num).then(res => {
batchDelUDMSub(neId, from.imsi, from.num)
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),
@@ -1015,9 +1019,21 @@ function fnGetList(pageNum?: number) {
tablePagination.current = pageNum;
}
const selectFrom = Object.assign({}, toRaw(queryParams));
const imsiMatchRule: any = {
prefix: queryParams.imsi ? `${queryParams.imsi}%` : '',
full: queryParams.imsi ? `%${queryParams.imsi}%` : '',
};
listUDMSub(selectFrom).then(res => {
const toBack: any = {
imsi: imsiMatchRule[queryParams.imsiMatch] || '',
msisdn: queryParams.msisdn,
sortField: queryParams.sortField,
sortOrder: queryParams.sortOrder,
pageNum: queryParams.pageNum,
pageSize: queryParams.pageSize,
};
listUDMSub(toBack).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
@@ -1192,6 +1208,19 @@ onMounted(() => {
<a-input v-model:value="queryParams.msisdn" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24" v-show="queryParams.imsi">
<a-form-item label="IMSI Match Mode" name="imsiMatch">
<a-select
:label="t('views.neUser.sub.imsiMode')"
style="width: 100%"
v-model:value="queryParams.imsiMatch"
:options="[
{ label: 'Prefix', value: 'prefix' },
{ label: 'Full', value: 'full' },
]"
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">