Blame view

src/api/workflow/ygdjFlow.js 1.19 KB
1 2 3 4 5
/*
 * @Description: 
 * @Autor: renchao
 * @LastEditTime: 2023-05-17 10:32:37
 */
6
import request from '@/utils/request'
7
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
8
// 初始化内容
任超 committed
9 10 11 12
export function Init (data) {
  let apiUrl = "";
  switch (data.get("djlx")) {
    case "100":
13
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/fristInit";
任超 committed
14 15
      break;
    case "200":
16
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/transferInit";
任超 committed
17 18
      break;
    case "300":
19
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/changeInit";
任超 committed
20 21
      break;
    case "400":
22
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/logoutInit";
任超 committed
23 24
      break;
    case "500":
25
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/riviseInit";
任超 committed
26 27
      break;
    case "901":
28
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/renewalInit";
任超 committed
29 30
      break;
    case "902":
31
      apiUrl = SERVER.SERVERAPI + "/rest/ywbl/ygmmdj/replaceInit";
任超 committed
32 33 34 35 36 37 38
      break;
  }
  return request({
    url: apiUrl,
    method: 'post',
    data
  })
39 40 41 42
}
// 初始化内容
export function saveData (data) {
  return request({
43
    url: SERVER.SERVERAPI + '/rest/ywbl/ygmmdj/saveData',
44 45 46 47
    method: 'post',
    data
  })
}
48

49