zhou zhou
18 小时以前 0a1d91e42e6c5af96e1108e9ebcc37e99eb3b22c
rsf-design/src/api/system-manage.js
@@ -24,6 +24,161 @@
  }
}
export function buildOperationRecordPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.namespace !== undefined ? { namespace: params.namespace } : {}),
    ...(params.url !== undefined ? { url: params.url } : {}),
    ...(params.appkey !== undefined ? { appkey: params.appkey } : {}),
    ...(params.clientIp !== undefined ? { clientIp: params.clientIp } : {}),
    ...(params.request !== undefined ? { request: params.request } : {}),
    ...(params.response !== undefined ? { response: params.response } : {}),
    ...(params.spendTime !== undefined ? { spendTime: params.spendTime } : {}),
    ...(params.result !== undefined ? { result: params.result } : {}),
    ...(params.userId !== undefined ? { userId: params.userId } : {}),
    ...(params.timeStart !== undefined ? { timeStart: params.timeStart } : {}),
    ...(params.timeEnd !== undefined ? { timeEnd: params.timeEnd } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildConfigPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.uuid !== undefined ? { uuid: params.uuid } : {}),
    ...(params.name !== undefined ? { name: params.name } : {}),
    ...(params.flag !== undefined ? { flag: params.flag } : {}),
    ...(params.type !== undefined ? { type: params.type } : {}),
    ...(params.val !== undefined ? { val: params.val } : {}),
    ...(params.content !== undefined ? { content: params.content } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.timeStart !== undefined ? { timeStart: params.timeStart } : {}),
    ...(params.timeEnd !== undefined ? { timeEnd: params.timeEnd } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildSerialRulePageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.code !== undefined ? { code: params.code } : {}),
    ...(params.name !== undefined ? { name: params.name } : {}),
    ...(params.delimit !== undefined ? { delimit: params.delimit } : {}),
    ...(params.reset !== undefined ? { reset: params.reset } : {}),
    ...(params.resetDep !== undefined ? { resetDep: params.resetDep } : {}),
    ...(params.currValue !== undefined ? { currValue: params.currValue } : {}),
    ...(params.lastCode !== undefined ? { lastCode: params.lastCode } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.timeStart !== undefined ? { timeStart: params.timeStart } : {}),
    ...(params.timeEnd !== undefined ? { timeEnd: params.timeEnd } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildDictTypePageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.code !== undefined ? { code: params.code } : {}),
    ...(params.name !== undefined ? { name: params.name } : {}),
    ...(params.description !== undefined ? { description: params.description } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.timeStart !== undefined ? { timeStart: params.timeStart } : {}),
    ...(params.timeEnd !== undefined ? { timeEnd: params.timeEnd } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildDictDataPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.dictTypeId !== undefined ? { dictTypeId: params.dictTypeId } : {}),
    ...(params.dictTypeCode !== undefined ? { dictTypeCode: params.dictTypeCode } : {}),
    ...(params.value !== undefined ? { value: params.value } : {}),
    ...(params.label !== undefined ? { label: params.label } : {}),
    ...(params.sort !== undefined ? { sort: params.sort } : {}),
    ...(params.group !== undefined ? { group: params.group } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildWaveRulePageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.code !== undefined ? { code: params.code } : {}),
    ...(params.type !== undefined ? { type: params.type } : {}),
    ...(params.name !== undefined ? { name: params.name } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.timeStart !== undefined ? { timeStart: params.timeStart } : {}),
    ...(params.timeEnd !== undefined ? { timeEnd: params.timeEnd } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildFieldsPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.fields !== undefined ? { fields: params.fields } : {}),
    ...(params.fieldsAlise !== undefined ? { fieldsAlise: params.fieldsAlise } : {}),
    ...(params.unique !== undefined ? { unique: params.unique } : {}),
    ...(params.flagEnable !== undefined ? { flagEnable: params.flagEnable } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildFieldsItemPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.uuid !== undefined ? { uuid: params.uuid } : {}),
    ...(params.fieldsId !== undefined ? { fieldsId: params.fieldsId } : {}),
    ...(params.value !== undefined ? { value: params.value } : {}),
    ...(params.matnrId !== undefined ? { matnrId: params.matnrId } : {}),
    ...(params.shiperId !== undefined ? { shiperId: params.shiperId } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildTenantPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.name !== undefined ? { name: params.name } : {}),
    ...(params.flag !== undefined ? { flag: params.flag } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
export function buildHostPageParams(params = {}) {
  return {
    current: params.current || 1,
    pageSize: params.pageSize || params.size || 20,
    ...(params.condition !== undefined ? { condition: params.condition } : {}),
    ...(params.name !== undefined ? { name: params.name } : {}),
    ...(params.status !== undefined ? { status: params.status } : {}),
    ...(params.memo !== undefined ? { memo: params.memo } : {})
  }
}
function fetchGetUserList(params) {
  return request.post({ url: '/user/page', params: buildUserListParams(params) })
}
@@ -55,6 +210,211 @@
function fetchGetRoleList(params) {
  return request.post({ url: '/role/page', params: buildRoleListParams(params) })
}
function fetchOperationRecordPage(params = {}) {
  return request.post({
    url: '/operationRecord/page',
    params: buildOperationRecordPageParams(params)
  })
}
function fetchConfigPage(params = {}) {
  return request.post({ url: '/config/page', params: buildConfigPageParams(params) })
}
function fetchSerialRulePage(params = {}) {
  return request.post({ url: '/serialRule/page', params: buildSerialRulePageParams(params) })
}
function fetchDictTypePage(params = {}) {
  return request.post({ url: '/dictType/page', params: buildDictTypePageParams(params) })
}
function fetchDictDataPage(params = {}) {
  return request.post({ url: '/dictData/page', params: buildDictDataPageParams(params) })
}
function fetchGetDictTypeDetail(id) {
  return request.get({ url: `/dictType/${id}` })
}
function fetchSaveDictType(params) {
  return request.post({ url: '/dictType/save', params })
}
function fetchUpdateDictType(params) {
  return request.post({ url: '/dictType/update', params })
}
function fetchDeleteDictType(id) {
  return request.post({ url: `/dictType/remove/${id}` })
}
function fetchWaveRulePage(params = {}) {
  return request.post({ url: '/waveRule/page', params: buildWaveRulePageParams(params) })
}
function fetchGetWaveRuleDetail(id) {
  return request.get({ url: `/waveRule/${id}` })
}
function fetchSaveWaveRule(params) {
  return request.post({ url: '/waveRule/save', params })
}
function fetchUpdateWaveRule(params) {
  return request.post({ url: '/waveRule/update', params })
}
function fetchDeleteWaveRule(id) {
  return request.post({ url: `/waveRule/remove/${id}` })
}
function fetchFieldsPage(params = {}) {
  return request.post({ url: '/fields/page', params: buildFieldsPageParams(params) })
}
function fetchGetFieldsDetail(id) {
  return request.get({ url: `/fields/${id}` })
}
function fetchSaveFields(params) {
  return request.post({ url: '/fields/save', params })
}
function fetchUpdateFields(params) {
  return request.post({ url: '/fields/update', params })
}
function fetchDeleteFields(id) {
  return request.post({ url: `/fields/remove/${id}` })
}
function fetchFieldsItemPage(params = {}) {
  return request.post({ url: '/fieldsItem/page', params: buildFieldsItemPageParams(params) })
}
function fetchGetFieldsItemDetail(id) {
  return request.get({ url: `/fieldsItem/${id}` })
}
function fetchSaveFieldsItem(params) {
  return request.post({ url: '/fieldsItem/save', params })
}
function fetchUpdateFieldsItem(params) {
  return request.post({ url: '/fieldsItem/update', params })
}
function fetchDeleteFieldsItem(id) {
  return request.post({ url: `/fieldsItem/remove/${id}` })
}
function fetchTenantPage(params = {}) {
  return request.post({ url: '/tenant/page', params: buildTenantPageParams(params) })
}
function fetchGetTenantDetail(id) {
  return request.get({ url: `/tenant/${id}` })
}
function fetchInitTenant(params) {
  return request.post({ url: '/tenant/init', params })
}
function fetchUpdateTenant(params) {
  return request.post({ url: '/tenant/update', params })
}
function fetchDeleteTenant(id) {
  return request.post({ url: `/tenant/remove/${id}` })
}
function fetchHostPage(params = {}) {
  return request.post({ url: '/host/page', params: buildHostPageParams(params) })
}
function fetchGetHostDetail(id) {
  return request.get({ url: `/host/${id}` })
}
function fetchSaveHost(params) {
  return request.post({ url: '/host/save', params })
}
function fetchUpdateHost(params) {
  return request.post({ url: '/host/update', params })
}
function fetchDeleteHost(id) {
  return request.post({ url: `/host/remove/${id}` })
}
function fetchGetSerialRuleDetail(id) {
  return request.get({ url: `/serialRule/${id}` })
}
function fetchSaveSerialRule(params) {
  return request.post({ url: '/serialRule/save', params })
}
function fetchUpdateSerialRule(params) {
  return request.post({ url: '/serialRule/update', params })
}
function fetchDeleteSerialRule(id) {
  return request.post({ url: `/serialRule/remove/${id}` })
}
function fetchGetConfigDetail(id) {
  return request.get({ url: `/config/${id}` })
}
function fetchSaveConfig(params) {
  return request.post({ url: '/config/save', params })
}
function fetchUpdateConfig(params) {
  return request.post({ url: '/config/update', params })
}
function fetchDeleteConfig(id) {
  return request.post({ url: `/config/remove/${id}` })
}
function fetchGetOperationRecordDetail(id) {
  return request.get({ url: `/operationRecord/${id}` })
}
function fetchDeleteOperationRecord(id) {
  return request.post({ url: `/operationRecord/remove/${id}` })
}
function normalizeOperationRecordManyIds(ids) {
  if (Array.isArray(ids)) {
    return ids
      .map((id) => normalizeLegacyId(id))
      .filter((id) => id !== '')
      .join(',')
  }
  return normalizeLegacyId(ids)
}
function fetchGetOperationRecordMany(ids) {
  const normalizedIds = normalizeOperationRecordManyIds(ids)
  return request.post({ url: `/operationRecord/many/${normalizedIds}` })
}
async function fetchExportOperationRecordReport(payload = {}, options = {}) {
  return fetch(`${import.meta.env.VITE_API_URL}/operationRecord/export`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      ...(options.headers || {})
    },
    body: JSON.stringify(payload)
  })
}
function fetchSaveRole(params) {
@@ -121,6 +481,22 @@
  return request.post({ url: '/dept/tree', params })
}
function fetchGetDeptDetail(id) {
  return request.get({ url: `/dept/${id}` })
}
function fetchSaveDept(params) {
  return request.post({ url: '/dept/save', params })
}
function fetchUpdateDept(params) {
  return request.post({ url: '/dept/update', params })
}
function fetchDeleteDept(id) {
  return request.post({ url: `/dept/remove/${id}` })
}
function fetchGetMenuTree(params = {}) {
  return request.post({ url: '/menu/tree', params })
}
@@ -135,6 +511,22 @@
function fetchDeleteMenu(id) {
  return request.post({ url: `/menu/remove/${id}` })
}
function fetchGetMenuPdaTree(params = {}) {
  return request.post({ url: '/menuPda/tree', params })
}
function fetchSaveMenuPda(params) {
  return request.post({ url: '/menuPda/save', params })
}
function fetchUpdateMenuPda(params) {
  return request.post({ url: '/menuPda/update', params })
}
function fetchDeleteMenuPda(id) {
  return request.post({ url: `/menuPda/remove/${id}` })
}
function assertAdminPasswordUpdatePayload(params) {
@@ -222,7 +614,9 @@
}
function fetchGetMenuList(params = {}) {
  return request.post({ url: '/menu/list', params }).then((menuList) => adaptLegacyMenuTree(buildLegacyMenuTree(menuList)))
  return request
    .post({ url: '/menu/list', params })
    .then((menuList) => adaptLegacyMenuTree(buildLegacyMenuTree(menuList)))
}
function adaptLegacyMenuTree(menuTree) {
@@ -230,9 +624,7 @@
    return []
  }
  return menuTree
    .map((node) => adaptLegacyMenuNode(node))
    .filter(Boolean)
  return menuTree.map((node) => adaptLegacyMenuNode(node)).filter(Boolean)
}
function buildLegacyMenuTree(menuList) {
@@ -381,11 +773,12 @@
}
function buildLegacyMenuPath(node) {
  const rawPath = typeof node.route === 'string' && node.route.trim()
    ? node.route
    : typeof node.path === 'string'
      ? node.path
      : ''
  const rawPath =
    typeof node.route === 'string' && node.route.trim()
      ? node.route
      : typeof node.path === 'string'
        ? node.path
        : ''
  return normalizeLegacyPath(rawPath)
}
@@ -468,6 +861,52 @@
  fetchUpdateUserStatus,
  fetchGetUserDetail,
  fetchGetRoleList,
  fetchOperationRecordPage,
  fetchGetOperationRecordDetail,
  fetchDeleteOperationRecord,
  fetchGetOperationRecordMany,
  fetchExportOperationRecordReport,
  fetchConfigPage,
  fetchGetConfigDetail,
  fetchSaveConfig,
  fetchUpdateConfig,
  fetchDeleteConfig,
  fetchSerialRulePage,
  fetchGetSerialRuleDetail,
  fetchSaveSerialRule,
  fetchUpdateSerialRule,
  fetchDeleteSerialRule,
  fetchDictTypePage,
  fetchGetDictTypeDetail,
  fetchSaveDictType,
  fetchUpdateDictType,
  fetchDeleteDictType,
  fetchDictDataPage,
  fetchWaveRulePage,
  fetchGetWaveRuleDetail,
  fetchSaveWaveRule,
  fetchUpdateWaveRule,
  fetchDeleteWaveRule,
  fetchFieldsPage,
  fetchGetFieldsDetail,
  fetchSaveFields,
  fetchUpdateFields,
  fetchDeleteFields,
  fetchFieldsItemPage,
  fetchGetFieldsItemDetail,
  fetchSaveFieldsItem,
  fetchUpdateFieldsItem,
  fetchDeleteFieldsItem,
  fetchTenantPage,
  fetchGetTenantDetail,
  fetchInitTenant,
  fetchUpdateTenant,
  fetchDeleteTenant,
  fetchHostPage,
  fetchGetHostDetail,
  fetchSaveHost,
  fetchUpdateHost,
  fetchDeleteHost,
  fetchSaveRole,
  fetchUpdateRole,
  fetchDeleteRole,
@@ -477,10 +916,18 @@
  fetchExportRoleReport,
  fetchGetRoleMany,
  fetchGetDeptTree,
  fetchGetDeptDetail,
  fetchSaveDept,
  fetchUpdateDept,
  fetchDeleteDept,
  fetchGetMenuTree,
  fetchGetMenuPdaTree,
  fetchSaveMenu,
  fetchSaveMenuPda,
  fetchUpdateMenu,
  fetchUpdateMenuPda,
  fetchDeleteMenu,
  fetchDeleteMenuPda,
  fetchGetRoleScopeList,
  fetchGetRoleScopeTree,
  fetchUpdateRoleScope,