init
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
export interface IncidentListParams {
|
||||
dict_id?: string;
|
||||
item_value?: string;
|
||||
pageSize?: number;
|
||||
pageNum?: number;
|
||||
}
|
||||
|
||||
export interface accidentParams {
|
||||
ticket_id?: string;
|
||||
vin?: string;
|
||||
carline?: string;
|
||||
model?: string;
|
||||
labels?: string;
|
||||
accident_level?: string;
|
||||
bmbs_name?: string;
|
||||
rdca_reporter?: string;
|
||||
software_version?: string;
|
||||
affects_versions?: string;
|
||||
components?: string;
|
||||
fix_versions?: string;
|
||||
case_description?: string;
|
||||
fo_solution?: string;
|
||||
assignee_name?: string;
|
||||
occur_datetime?: string;
|
||||
subtasks?: string;
|
||||
linked_work_items?: string;
|
||||
}
|
||||
|
||||
export async function getDictDataApi(params: IncidentListParams) {
|
||||
return usePost('/accident/item-list', params)
|
||||
}
|
||||
|
||||
|
||||
export async function getAllDictCodeApi() {
|
||||
return useGet('/accident/all_dict_code')
|
||||
}
|
||||
|
||||
|
||||
export async function insertDictTypetApi(params: IncidentListParams) {
|
||||
return usePost('/accident/insert-dict', params)
|
||||
}
|
||||
|
||||
|
||||
export async function insertAccidentApi(params: accidentParams) {
|
||||
return usePost('/accident/insert-accident', params)
|
||||
}
|
||||
|
||||
|
||||
export async function getAccidentRecordApi(params: any) {
|
||||
return usePost('/accident/get-accident-record', params)
|
||||
}
|
||||
|
||||
|
||||
export async function getAccidentByIdApi(params: number) {
|
||||
return usePost('/accident/get-accident-by-id', params)
|
||||
}
|
||||
|
||||
|
||||
export async function updataItemByIdApi(params: any) {
|
||||
return usePost('/accident/update-item', params)
|
||||
}
|
||||
|
||||
|
||||
export async function bingImageApi(params: any) {
|
||||
return usePost('/file_uploads/bind-image', params)
|
||||
}
|
||||
|
||||
|
||||
export function getImagesApi(case_id: number) {
|
||||
return useGet(`/file_uploads/get-images/${case_id}`)
|
||||
}
|
||||
|
||||
|
||||
export async function getSecretKey() {
|
||||
return useGet('/user/get_record')
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
export interface LoginParams {
|
||||
username: string
|
||||
password: string
|
||||
type?: 'account'
|
||||
}
|
||||
|
||||
export interface LoginMobileParams {
|
||||
mobile: string
|
||||
code: string
|
||||
type: 'mobile'
|
||||
}
|
||||
|
||||
export interface LoginResultModel {
|
||||
token: string
|
||||
}
|
||||
|
||||
export function loginApi(params: LoginParams | LoginMobileParams) {
|
||||
return usePost<LoginResultModel, LoginParams | LoginMobileParams>('/user/login', params, {
|
||||
// 设置为false的时候不会携带token
|
||||
token: false,
|
||||
// 开发模式下使用自定义的接口
|
||||
customDev: true,
|
||||
// 是否开启全局请求loading
|
||||
loading: true,
|
||||
})
|
||||
}
|
||||
|
||||
// export function loginApi(params: any) {
|
||||
// return usePost('/user/login', params, {
|
||||
// token: false,
|
||||
// loading: true,
|
||||
// })
|
||||
// }
|
||||
|
||||
export function logoutApi() {
|
||||
return useGet('/logout')
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { MenuData } from '~@/layouts/basic-layout/typing'
|
||||
|
||||
export function getRouteMenusApi() {
|
||||
return useGet<MenuData>('/menu')
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export interface UserInfo {
|
||||
id: number | string
|
||||
username: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
roles?: (string | number)[]
|
||||
}
|
||||
|
||||
export function getUserInfoApi() {
|
||||
return useGet<UserInfo>('/user/info')
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
export interface ListResultModel {
|
||||
id: number
|
||||
title: string
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
|
||||
export type ListResultParams = Partial<Omit<ListResultModel, 'id' | 'password'>>
|
||||
|
||||
export async function getListApi(params?: ListResultParams) {
|
||||
return usePost<ListResultModel[]>('/list', params)
|
||||
}
|
||||
|
||||
export type CreateListParams = Partial<Omit<ListResultModel, 'id'>>
|
||||
|
||||
export async function createListApi(params: CreateListParams) {
|
||||
return usePost('/list/create', params)
|
||||
}
|
||||
|
||||
export async function editListApi(params: ListResultModel) {
|
||||
return usePut('/list', params)
|
||||
}
|
||||
|
||||
export async function delListApi(id: string | number) {
|
||||
return useDelete(`/list/${id}`)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface ListResultModel {
|
||||
id: number
|
||||
title: string
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
|
||||
export type ListResultParams = Partial<Omit<ListResultModel, 'id' | 'password'>>
|
||||
|
||||
export async function getListApi(params?: ListResultParams) {
|
||||
return usePost<ListResultModel[]>('/list/basic-list', params)
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
interface CrudTableModel {
|
||||
id?: number
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
value: string
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
remark?: string
|
||||
}
|
||||
|
||||
type CrudTableParams = Partial<Omit<CrudTableModel, 'id'>>
|
||||
|
||||
export async function getListApi(params?: CrudTableParams) {
|
||||
return usePost<CrudTableModel[]>('/list/crud-table', params)
|
||||
}
|
||||
|
||||
export async function deleteApi(id: string | number) {
|
||||
return useDelete(`/list/${id}`)
|
||||
}
|
||||
|
||||
export type {
|
||||
CrudTableModel,
|
||||
CrudTableParams,
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import type { STATUS } from '~@/utils/constant'
|
||||
|
||||
interface ConsultTableModel {
|
||||
id: number
|
||||
/**
|
||||
* 服务名称
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* 服务调用次数
|
||||
*/
|
||||
callNo: 805
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
desc: string
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
status: STATUS
|
||||
/**
|
||||
* 上次调用时间
|
||||
*/
|
||||
updatedAt: string
|
||||
|
||||
// 分页
|
||||
current?: number
|
||||
// size
|
||||
pageSize?: number
|
||||
}
|
||||
|
||||
type ConsultTableParams = Partial<Omit<ConsultTableModel, 'id'>>
|
||||
|
||||
export async function getListApi(params?: ConsultTableParams) {
|
||||
return usePost<ConsultTableModel[]>('/list/consult-list', params)
|
||||
}
|
||||
|
||||
export async function deleteApi(id: string | number) {
|
||||
return useDelete(`/list/${id}`)
|
||||
}
|
||||
|
||||
export type {
|
||||
ConsultTableModel,
|
||||
ConsultTableParams,
|
||||
STATUS,
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export function oauthLoginApi() {
|
||||
return useGet('/login')
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
export interface IncidentListParams {
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
pageSize?: number;
|
||||
pageNum?: number;
|
||||
oneid?: string;
|
||||
incident_time?: object;
|
||||
}
|
||||
|
||||
|
||||
export async function getIncidentListApi(params: IncidentListParams) {
|
||||
return usePost('/incident/list', params, { timeout: 600000 })
|
||||
}
|
||||
|
||||
|
||||
export async function getGen6IncidentListApi(params: IncidentListParams,code:string) {
|
||||
return usePost('/gen6/list', params, { timeout: 600000 ,headers:{'X-Encrypted-Timestamp':code}}) //,headers:{'X-Encrypted-Timestamp':code}
|
||||
}
|
||||
|
||||
|
||||
export async function getGen5IncidentListApi(params: IncidentListParams,code:string) {
|
||||
return usePost('/gen5/list', params, { timeout: 600000, headers:{'X-Encrypted-Timestamp':code} })
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
export function test200() {
|
||||
return useGet('/')
|
||||
}
|
||||
|
||||
export function test401() {
|
||||
return useGet('/401')
|
||||
}
|
||||
|
||||
export function test500() {
|
||||
return useGet('/500')
|
||||
}
|
||||
|
||||
export function testPut() {
|
||||
return usePut('/test')
|
||||
}
|
||||
|
||||
export function testPost() {
|
||||
return usePost('/test')
|
||||
}
|
||||
|
||||
export function testDelete() {
|
||||
return useDelete('/test')
|
||||
}
|
||||
Reference in New Issue
Block a user