| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import { httpGet } from '@/utils/http'
- import { getEnvBaseUrl } from '@/utils/index'
- /**
- * 设备查询:列表
- */
- export const getEquipContainerList = (params: any) => {
- return httpGet('/pressure/equip-container/page', params)
- }
- /**
- * 设备查询:详情
- */
- export const getEquipContainerById = (params: any) => {
- return httpGet('/pressure/equip-container/get', params)
- }
- /**
- * 部门列表
- */
- export const getDeptListApi = (params: any) => {
- return httpGet('/system/dept/list', params)
- }
- /**
- * 单位查询:列表
- */
- export const getSystemClientUnitList = (params: any) => {
- return httpGet('/system/client-unit/page', params)
- }
- /**
- * 单位查询:详情
- */
- export const getSystemClientUnitById = (params: any) => {
- return httpGet('/system/client-unit/get', params)
- }
- /**
- * 体系文件:列表
- */
- export const getStandardDocList = (params: any) => {
- return httpGet('/system/standard-doc/page', params)
- }
- /**
- * 体系文件:详情
- */
- export const getStandardDocFileByUploadId = (params: any) => {
- return httpGet('/system/standard-doc/file', params)
- }
- export const getStandardTemplate = (params: any) => {
- return httpGet('/pressure2/standard-template/v2/get', params)
- }
- export const getReportTemplateDetail = (params: any) => {
- return httpGet('/pressure/report-template/get', params)
- }
- export const getPressure2ReportTemplateDetail = (params: any) => {
- return httpGet('/pressure2/report-template/get', params)
- }
- export const getReportTemplateList = (params: any) => {
- return httpGet('/pressure/report-template/page', params)
- }
- export const uploadFile = (data: FormData) => {
- let requestUrl = '/infra/file/upload'
- if (JSON.parse(import.meta.env.VITE_APP_PROXY) && import.meta.env.MODE === 'development') {
- requestUrl = import.meta.env.VITE_APP_PROXY_PREFIX + requestUrl
- } else {
- requestUrl = getEnvBaseUrl() + requestUrl
- }
- const token = uni.getStorageSync('APP_ACCESS_TOKEN')
- const headers: Record<string, string> = {}
- if (token) {
- headers.Authorization = `Bearer ${token}`
- }
- return fetch(requestUrl, {
- method: 'POST',
- headers,
- body: data,
- }).then(res => res.json())
- }
|