| 对比新文件 | 
|  |  |  | 
|---|
|  |  |  | import request from '../../utils/request' | 
|---|
|  |  |  | import { encryptData } from '@/utils/request/decryption.js' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 鏌ヨ | 
|---|
|  |  |  | export function fetchList (data) { | 
|---|
|  |  |  | return request.post('/business/category/page', encryptData(data), { | 
|---|
|  |  |  | trim: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function allList (data) { | 
|---|
|  |  |  | return request.post('/business/category/list', encryptData(data), { | 
|---|
|  |  |  | trim: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function treeList (data) { | 
|---|
|  |  |  | return request.post('/business/category/tree', encryptData(data), { | 
|---|
|  |  |  | trim: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 瀵煎嚭Excel | 
|---|
|  |  |  | export function exportExcel (data) { | 
|---|
|  |  |  | return request.post('/business/category/exportExcel', encryptData(data), { | 
|---|
|  |  |  | trim: true, | 
|---|
|  |  |  | download: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function importDcaExcel (data) { | 
|---|
|  |  |  | return request.post('/business/category/importDcaExcel', data) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | export function exportDcaExcel (data) { | 
|---|
|  |  |  | return request.post('/business/category/exportDcaExcel', encryptData(data), { | 
|---|
|  |  |  | trim: true, | 
|---|
|  |  |  | download: true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 鍒涘缓 | 
|---|
|  |  |  | export function create (data) { | 
|---|
|  |  |  | return request.post('/business/category/create', encryptData(data)) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 淇敼 | 
|---|
|  |  |  | export function updateById (data) { | 
|---|
|  |  |  | return request.post('/business/category/updateById', encryptData(data)) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 鍒犻櫎 | 
|---|
|  |  |  | export function deleteById (id) { | 
|---|
|  |  |  | return request.get(`/business/category/delete/${id}`) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 鎵归噺鍒犻櫎 | 
|---|
|  |  |  | export function deleteByIdInBatch (ids) { | 
|---|
|  |  |  | return request.get('/business/category/delete/batch', { | 
|---|
|  |  |  | params: { | 
|---|
|  |  |  | ids | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|