|
|
|
|
import { HttpClient } from '@angular/common/http'
|
|
|
|
|
import { Injectable } from '@angular/core'
|
|
|
|
|
import { JwResponse } from 'app/types'
|
|
|
|
|
import { Utils } from 'app/utils'
|
|
|
|
|
import { map, of, tap } from 'rxjs'
|
|
|
|
|
import { AuthDTO } from './api.dto'
|
|
|
|
|
import { PermissionService } from 'app/shared/permission/permission.service'
|
|
|
|
|
import { NzSafeAny } from 'ng-zorro-antd/core/types'
|
|
|
|
|
|
|
|
|
|
export interface UserGroupTreeItem {
|
|
|
|
|
name: string
|
|
|
|
|
id: string
|
|
|
|
|
parentId: string
|
|
|
|
|
children: UserGroupTreeItem[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root',
|
|
|
|
|
})
|
|
|
|
|
export class ApiService {
|
|
|
|
|
constructor(
|
|
|
|
|
private http: HttpClient,
|
|
|
|
|
private permission: PermissionService,
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
AUTH_KEY_NAME = 'auth'
|
|
|
|
|
|
|
|
|
|
get authInfo(): AuthDTO | null {
|
|
|
|
|
let authInfo: AuthDTO | null = null
|
|
|
|
|
try {
|
|
|
|
|
const strData = localStorage.getItem(this.AUTH_KEY_NAME)
|
|
|
|
|
if (strData) {
|
|
|
|
|
authInfo = JSON.parse(strData)
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {}
|
|
|
|
|
return authInfo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getAuthInfo() {
|
|
|
|
|
return of(Boolean(this.authInfo))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
removeAuthData() {
|
|
|
|
|
localStorage.removeItem(this.AUTH_KEY_NAME)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
upload(data: FormData) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/common/upload', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_displayConfig: any
|
|
|
|
|
|
|
|
|
|
setSysDisplayConfig(d: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/sysConfig/update/displaySettings`, d)
|
|
|
|
|
}
|
|
|
|
|
getSysDisplayConfig(force: boolean = false) {
|
|
|
|
|
if (force || !this._displayConfig) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/sysConfig/query/displaySettings`, null).pipe(
|
|
|
|
|
map((i) => i.body),
|
|
|
|
|
tap((res) => {
|
|
|
|
|
this._displayConfig = res.body
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return of(this._displayConfig)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getLicenseInfo() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/license/info', null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uploadLicenseInfo(formData: FormData) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/license/update', formData)
|
|
|
|
|
}
|
|
|
|
|
importFlowFormByExcel(formData: FormData) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/sysFormTemp/importByExcel', formData)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uploadFormTpl = (formData: FormData) => {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/upload`, formData)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
login(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/oauth/login', data).pipe(
|
|
|
|
|
tap((res) => {
|
|
|
|
|
localStorage.setItem(this.AUTH_KEY_NAME, JSON.stringify(res.body))
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
logout() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/oauth/logout', null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getHomeTodocountData() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/flowable/task/todoListCount', null)
|
|
|
|
|
}
|
|
|
|
|
getHomeData() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/home/data', null)
|
|
|
|
|
}
|
|
|
|
|
getOrgTree() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsOrganization/tree', null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
saveOrg(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.organizationId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsOrganization/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsOrganization/update', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteOrg(id: number) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsOrganization/delete', [id])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getUserPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsUser/list', data)
|
|
|
|
|
}
|
|
|
|
|
getUserDetail(id: number) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/umsUser/query?userId=${id}`, null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteUser(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/umsUser/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
saveSelfAccount(data: NzSafeAny) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsUser/update/selfInfo', data)
|
|
|
|
|
}
|
|
|
|
|
savePassword(data: NzSafeAny) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsUser/update/selfPassword', data)
|
|
|
|
|
}
|
|
|
|
|
saveUser(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.userId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsUser/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsUser/update', data)
|
|
|
|
|
}
|
|
|
|
|
getMenus() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsMenu/listAll', null)
|
|
|
|
|
}
|
|
|
|
|
getRolePage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsRole/list', data)
|
|
|
|
|
}
|
|
|
|
|
getRoleDetail(id: number) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/umsRole/query?roleId=${id}`, null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteRole(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/umsRole/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
saveRole(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.roleId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsRole/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/umsRole/update', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBasicFinancialCategory(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicFinancialCategory/all', data)
|
|
|
|
|
}
|
|
|
|
|
getAssetPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/list', data)
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* r入库/退库
|
|
|
|
|
* @param data
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
getAeamBusinessStorageList(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessStorage/warehouse/list', data)
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 领用/调拨/出库
|
|
|
|
|
* @param data
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
getAssetStroagePage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warehouse/list', data)
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 没有库存的
|
|
|
|
|
* @param ids
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
getAssetListByIds(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/queryByIds', ids)
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 有库存的
|
|
|
|
|
* @param ids
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
getAssetStorageListByIds(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warehouse/listByIds', ids)
|
|
|
|
|
}
|
|
|
|
|
getAssetLog(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAssetLog/list', data).pipe(
|
|
|
|
|
map((res) => {
|
|
|
|
|
return {
|
|
|
|
|
...res,
|
|
|
|
|
body: {
|
|
|
|
|
...res.body,
|
|
|
|
|
|
|
|
|
|
rows: res.body.rows
|
|
|
|
|
.sort((a: any, b: any) => {
|
|
|
|
|
return a.id - b.id
|
|
|
|
|
})
|
|
|
|
|
.map((i: any, idx: number) => {
|
|
|
|
|
return {
|
|
|
|
|
idx: idx + 1,
|
|
|
|
|
...i,
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
getAssetRepairLog(data: {}, id: number) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamAsset/repair/list?id=${id}`, data)
|
|
|
|
|
}
|
|
|
|
|
copyAsset(num: number, id: number) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamAsset/copyByNum?num=${num}&id=${id}`, null)
|
|
|
|
|
}
|
|
|
|
|
deleteAsset(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/delete', ids)
|
|
|
|
|
}
|
|
|
|
|
uploadAsset(data: FormData) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/importData', data)
|
|
|
|
|
}
|
|
|
|
|
confirmAsset(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/confirm', ids)
|
|
|
|
|
}
|
|
|
|
|
assetQrcode(id: number) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/qr/generate?id=${id}`, null, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
downloadAssetTemplate(categoryId?: string) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamAsset/importTemplate`, null, {
|
|
|
|
|
params: categoryId ? { categoryId } : {},
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
exportAsset(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamAsset/export`, ids, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
saveAsset(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.assetId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/update', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getAlertBorrow(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warning/borrow', data)
|
|
|
|
|
}
|
|
|
|
|
getAlertMaintenance(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warning/maintenance', data)
|
|
|
|
|
}
|
|
|
|
|
getAlertSafety(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warning/safety', data)
|
|
|
|
|
}
|
|
|
|
|
getAlertSafetyUp(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warning/up', data)
|
|
|
|
|
}
|
|
|
|
|
getAlertSafetyDown(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAsset/warning/down', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBasicPositionPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicPosition/list', data)
|
|
|
|
|
}
|
|
|
|
|
getBasicPositionTree() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicPosition/tree', null)
|
|
|
|
|
}
|
|
|
|
|
saveBasicPosition(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.positionId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicPosition/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicPosition/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBasicPosition(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBasicPosition/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBasicMaintenanceVendorPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicMaintenanceVendor/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBasicMaintenanceVendor(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.maintenanceVendorId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicMaintenanceVendor/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicMaintenanceVendor/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBasicMaintenanceVendor(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBasicMaintenanceVendor/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBasicManufacturersVendorPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicManufacturersVendor/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBasicManufacturersVendor(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.manufacturersVendorId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicManufacturersVendor/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicManufacturersVendor/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBasicManufacturersVendor(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBasicManufacturersVendor/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBasicSupplierVendorPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicSupplierVendor/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBasicSupplierVendor(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.supplierVendorId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicSupplierVendor/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicSupplierVendor/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBasicSupplierVendor(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBasicSupplierVendor/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBasicWarehousePage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicWarehouse/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBasicWarehouse(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.warehouseId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicWarehouse/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicWarehouse/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBasicWarehouse(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBasicWarehouse/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
categoryTree: NzSafeAny[] = []
|
|
|
|
|
|
|
|
|
|
getBasicCategoryTree(force?: boolean) {
|
|
|
|
|
if (this.categoryTree.length > 0 && !force) {
|
|
|
|
|
return of({
|
|
|
|
|
body: this.categoryTree,
|
|
|
|
|
} as JwResponse)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicCategory/tree', null).pipe(
|
|
|
|
|
tap((res) => {
|
|
|
|
|
this.categoryTree = res.body
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
addBasicCategoryTree(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicCategory/add', data)
|
|
|
|
|
}
|
|
|
|
|
updateBasicCategoryTree(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicCategory/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBasicCategory(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBasicCategory/delete', ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getStocktakingPlanPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingPlan/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveStocktakingPlan(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.stocktakingPlanId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingPlan/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingPlan/update', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteStocktakingPlan(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingPlan/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
createStocktakingJobByPlan(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingPlan/job`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getStocktakingJobDetailPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingDetails/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveStocktakingJobDetail(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingDetails/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingDetails/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteStocktakingDetail(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingDetails/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
startStocktakingJob(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingDetails/update`, data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getStocktakingJobPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingJob/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveStocktakingJob(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.stocktakingJobId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingJob/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamStocktakingJob/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteStocktakingJob(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingJob/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
beginStocktakingJob(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingJob/start`, ids)
|
|
|
|
|
}
|
|
|
|
|
stopStocktakingJob(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamStocktakingJob/complete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assetAddByFlow(val: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/eamManager/add', val)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessStoragePage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessStorage/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessStorage(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
Reflect.deleteProperty(data, 'id')
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessStorage/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessStorage/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessStorage(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessStorage/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessStorage(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessStorage/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessCollectionPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessCollection/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessCollection(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessCollection/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessCollection/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessCollection(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessCollection/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessCollection(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessCollection/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessRetirementPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessRetirement/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessRetirement(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessRetirement/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessRetirement/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessRetirement(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessRetirement/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessRetirement(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessRetirement/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
cleanBusinessRetirement(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessRetirement/clean`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessReturnInventoryPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessReturnInventory/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessReturnInventory(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessReturnInventory/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessReturnInventory/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessReturnInventory(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessReturnInventory/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessReturnInventory(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessReturnInventory/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
getBusinessBorrowPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessBorrow/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessBorrow(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessBorrow/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessBorrow/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessBorrow(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessBorrow/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessBorrow(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessBorrow/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessRevertPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessReturn/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessRevert(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessReturn/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessReturn/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessRevert(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessReturn/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessRevert(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessReturn/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessAllocatePage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessAllocate/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessAllocate(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessAllocate/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessAllocate/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessAllocate(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessAllocate/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessAllocate(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessAllocate/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getBusinessTransferPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessTransfer/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveBusinessTransfer(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessTransfer/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamBusinessTransfer/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteBusinessTransfer(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessTransfer/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
confirmBusinessTransfer(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamBusinessTransfer/confirm`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getRepairTypePage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepairType/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveRepairType(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.repairTypeId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepairType/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepairType/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteRepairType(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamRepairType/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getRepairPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepair/list', data)
|
|
|
|
|
}
|
|
|
|
|
getRepairDetail(id: string) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepair/query', null, { params: { id } })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDeviceOnOffPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/device/list', data)
|
|
|
|
|
}
|
|
|
|
|
onOffDevice(ids: NzSafeAny[], type: number) {
|
|
|
|
|
return this.http.post<JwResponse>(type === 1 ? '/api/v2/device/on' : '/api/v2/device/off', ids)
|
|
|
|
|
}
|
|
|
|
|
saveRepair(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.id)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepair/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepair/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteRepair(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamRepair/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getRepairFaultPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepairFault/list', data)
|
|
|
|
|
}
|
|
|
|
|
saveRepairFault(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.faultId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepairFault/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamRepairFault/update', data)
|
|
|
|
|
}
|
|
|
|
|
deleteRepairFault(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/eamRepairFault/delete`, ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// flow
|
|
|
|
|
|
|
|
|
|
getFlowForms(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flForm/all`, data)
|
|
|
|
|
}
|
|
|
|
|
getFlowRecord(deployId: string, procInsId: string) {
|
|
|
|
|
return this.http.get<JwResponse>(`/api/flowable/task/flowRecord?deployId=${deployId}&procInsId=${procInsId}`)
|
|
|
|
|
}
|
|
|
|
|
setFlowFormsAssignee(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flForm/assignee`, null, {
|
|
|
|
|
params: data,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
getMyApplyAssetFlow(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/myProcess`, data)
|
|
|
|
|
}
|
|
|
|
|
deleteAssetFlow(data: {}) {
|
|
|
|
|
return this.http.delete<JwResponse>(`/api/flowable/task/delete`, { body: data })
|
|
|
|
|
}
|
|
|
|
|
getMyTodoAssetFlow(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/todoList`, data)
|
|
|
|
|
}
|
|
|
|
|
getMyFinishedAssetFlow(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/finishedList`, data)
|
|
|
|
|
}
|
|
|
|
|
revokeProcessFlow(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/revokeProcess`, data)
|
|
|
|
|
}
|
|
|
|
|
rejectProcessFlow(data: {}) {
|
|
|
|
|
// 驳回
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/reject`, data)
|
|
|
|
|
}
|
|
|
|
|
completeProcessFlow(data: {}) {
|
|
|
|
|
// 通过 & 重新发起?
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/complete`, data)
|
|
|
|
|
}
|
|
|
|
|
handleTaskAssetItem(data: {}, taskId: string) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/flowable/device/update/${taskId}`, { variables: data })
|
|
|
|
|
}
|
|
|
|
|
cancelFlow(data: {}) {
|
|
|
|
|
// return this.http.post<JwResponse>(`/api/flowable/task/stopProcess`, data)
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/revokeProcess`, data)
|
|
|
|
|
}
|
|
|
|
|
startFlow(json: {}, form_key: string) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/definition/start/${form_key}`, json)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//v2
|
|
|
|
|
|
|
|
|
|
getFlowFormsList(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/list`, data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uploadFlowFormTpl = (data: FormData) => {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/importData`, data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getFlowFormsTpl() {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/importTemplate`, null, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
downloadTpl() {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/formTemplate`, null, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addFlowForm(data: NzSafeAny) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/add`, data)
|
|
|
|
|
}
|
|
|
|
|
updateFlowForm(data: NzSafeAny) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/update`, data)
|
|
|
|
|
}
|
|
|
|
|
confirmFlowForm(data: NzSafeAny) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/confirm`, data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteFlowForm(idList: NzSafeAny) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/delete`, idList)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getFlowFormDetail(id: string) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/query`, null, {
|
|
|
|
|
params: {
|
|
|
|
|
id,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
getFlowFormList() {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/all`, null)
|
|
|
|
|
}
|
|
|
|
|
// getAssetManagerPage(data: {}) {
|
|
|
|
|
// return this.http.post<JwResponse>(`/api/v2/eamManager/list`, data)
|
|
|
|
|
// }
|
|
|
|
|
getAssetManagerPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/eamManager/query`, data)
|
|
|
|
|
}
|
|
|
|
|
getAssetTeamPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/eamBasicTeam/list`, data)
|
|
|
|
|
}
|
|
|
|
|
getAssetTeamAll() {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/eamBasicTeam/all`, null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
saveUserTeam(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.teamId)) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/eamBasicTeam/add', data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/eamBasicTeam/update', data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
deleteUserTeam(ids: number[]) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/eamBasicTeam/delete', ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getTaskPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/flowable/device/list`, data)
|
|
|
|
|
}
|
|
|
|
|
getPlanPage(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/plan/list`, data)
|
|
|
|
|
}
|
|
|
|
|
savePlan(data: NzSafeAny) {
|
|
|
|
|
if (Utils.isEmpty(data.jobId)) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/plan/add`, data)
|
|
|
|
|
}
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/plan/update', data)
|
|
|
|
|
}
|
|
|
|
|
deletePlan(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/plan/delete`, data)
|
|
|
|
|
}
|
|
|
|
|
changePlanStatus(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/plan/changeStatus`, data)
|
|
|
|
|
}
|
|
|
|
|
createRapairTask(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/flowable/device/start/repair`, data)
|
|
|
|
|
}
|
|
|
|
|
createTask(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/flowable/device/start`, data)
|
|
|
|
|
}
|
|
|
|
|
takeTask(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/claim`, data)
|
|
|
|
|
}
|
|
|
|
|
assignTask(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flowable/task/assignTask`, data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getSysLog(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/sysLog/list', data)
|
|
|
|
|
}
|
|
|
|
|
getAlarmMsg(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/v2/alarm/list', data)
|
|
|
|
|
}
|
|
|
|
|
getFlowMsg(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/flowable/task/todoListMSG', data)
|
|
|
|
|
}
|
|
|
|
|
getCalendarData(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/flFormItem/calendar', data)
|
|
|
|
|
}
|
|
|
|
|
getFlowHomeData() {
|
|
|
|
|
return this.http.post<JwResponse>('/api/flFormItem/home', null)
|
|
|
|
|
}
|
|
|
|
|
flowFormUpdate(d: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/flForm/update', d)
|
|
|
|
|
}
|
|
|
|
|
deviceLog(d: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/eamAssetLog/list/device', d).pipe(
|
|
|
|
|
map((res) => {
|
|
|
|
|
return {
|
|
|
|
|
...res,
|
|
|
|
|
body: {
|
|
|
|
|
...res.body,
|
|
|
|
|
|
|
|
|
|
rows: res.body.rows
|
|
|
|
|
.sort((a: any, b: any) => {
|
|
|
|
|
return a.id - b.id
|
|
|
|
|
})
|
|
|
|
|
.map((i: any, idx: number) => {
|
|
|
|
|
return {
|
|
|
|
|
idx: idx + 1,
|
|
|
|
|
...i,
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
assetFlowRecord(d: {}) {
|
|
|
|
|
return this.http.post<JwResponse>('/api/flowable/task/flowRecord', d)
|
|
|
|
|
}
|
|
|
|
|
operationalStatistics(d: {}) {
|
|
|
|
|
return this.http.get<JwResponse>('/api/eamAsset/operationalStatistics', {
|
|
|
|
|
params: d,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
downloadTaskReport(id: string) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/flowable/device/export/${id}`, null, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
exportFlowForm(idList: string[]) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/exportExcel`, idList, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onOffRecord(q: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/device/record`, null, {
|
|
|
|
|
params: q,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
getReportData(data: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flFormItem/workReport`, data)
|
|
|
|
|
}
|
|
|
|
|
saveReport(content: string) {
|
|
|
|
|
return this.http.post<JwResponse>(
|
|
|
|
|
`/api/flFormItem/h5str2word`,
|
|
|
|
|
{ content },
|
|
|
|
|
{
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
downloadWord(content: {}) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/flFormItem/downloadWord`, content, {
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
preview(id: string) {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/v2/sysFormTemp/preview`, null, {
|
|
|
|
|
params: { id },
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
exportPlanReport(id: string) {
|
|
|
|
|
return this.http.post<JwResponse>(
|
|
|
|
|
`/api/v2/plan/export`,
|
|
|
|
|
{
|
|
|
|
|
idList: [id],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
observe: 'response',
|
|
|
|
|
responseType: 'blob' as 'json',
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
bigScreen() {
|
|
|
|
|
return this.http.post<JwResponse>(`/api/home/bigScreen`, null)
|
|
|
|
|
}
|
|
|
|
|
}
|