27 lines
603 B
TypeScript
27 lines
603 B
TypeScript
import { getNeConfigData } from '@/api/ne/neConfig';
|
|
import { ref } from 'vue';
|
|
|
|
export default function useSMFOptions() {
|
|
/**upfId可选择 */
|
|
const optionsUPFIds = ref<{ value: string; label: string }[]>([]);
|
|
|
|
/**初始加载upfId */
|
|
function initUPFIds() {
|
|
getNeConfigData({
|
|
neType: 'SMF',
|
|
neId: '001',
|
|
paramName: 'upfConfig',
|
|
}).then(res => {
|
|
optionsUPFIds.value = [];
|
|
for (const s of res.data) {
|
|
optionsUPFIds.value.push({
|
|
value: s.id,
|
|
label: s.id,
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
return { initUPFIds, optionsUPFIds };
|
|
}
|