增加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

@@ -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">