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