Blame view

src/api/workflow/cfdjFlow.js 1.84 KB
1
/*
yuanbo committed
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-05-17 10:25:58
5
 */
6
import request from '@/utils/request'
7
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
8

9 10 11 12 13
/**
 * @description: 批量初始化
 * @param {*} data
 * @author: renchao
 */
任超 committed
14
export function BatchInit (data) {
蔡俊立 committed
15 16 17
    let apiUrl = "";
    switch (data.get("djlx")) {
        case "300":
18
            apiUrl = SERVER.SERVERAPI + "/rest/ywbl/cfdj/changeBatchInit";
蔡俊立 committed
19 20
            break;
        case "400":
21
            apiUrl = SERVER.SERVERAPI + "/rest/ywbl/cfdj/logoutBatchInit";
蔡俊立 committed
22 23
            break;
        case "800":
24 25 26 27 28 29 30 31 32 33
            apiUrl = SERVER.SERVERAPI + "/rest/ywbl/cfdj/seizeBatchInit";
            break;
    }
    return request({
        url: apiUrl,
        method: 'post',
        data
    })
}

yuanbo committed
34 35 36 37 38
/**
 * @description: 初始化
 * @param {*} data
 * @author: renchao
 */
39 40 41 42 43 44 45 46 47 48 49
export function Init (data) {
    let apiUrl = "";
    switch (data.get("djlx")) {
        case "300":
            apiUrl = SERVER.SERVERAPI + "/rest/ywbl/cfdj/changeInit";
            break;
        case "400":
            apiUrl = SERVER.SERVERAPI + "/rest/ywbl/cfdj/logoutInit";
            break;
        case "800":
            apiUrl = SERVER.SERVERAPI + "/rest/ywbl/cfdj/seizeInit";
蔡俊立 committed
50 51
            break;
    }
蔡俊立 committed
52
    return request({
蔡俊立 committed
53
        url: apiUrl,
54 55 56 57 58
        method: 'post',
        data
    })
}

59 60 61 62 63
/**
 * @description: 数据保存
 * @param {*} data
 * @author: renchao
 */
蔡俊立 committed
64
export function saveData (data) {
65
    return request({
任超 committed
66
        url: SERVER.SERVERAPI + '/rest/ywbl/cfdj/saveData',
67 68 69 70
        method: 'post',
        data
    })
}
蔡俊立 committed
71

72 73 74 75 76
/**
 * @description: 批量数据保存
 * @param {*} data
 * @author: renchao
 */
蔡俊立 committed
77 78
export function batchSaveData (data) {
    return request({
任超 committed
79
        url: SERVER.SERVERAPI + '/rest/ywbl/cfdj/batchSaveData',
蔡俊立 committed
80 81 82 83
        method: 'post',
        data
    })
}