Commit 19bf3e21 authored by 田翔's avatar 田翔

fix: 接口中统一添加Civ-Site

parent 6cfa0f8e
{
"name": "panda-xform",
"version": "5.3.0",
"description": "5.3.0 台站列表标题显示单位",
"version": "5.3.1",
"description": "5.3.1 接口中统一添加Civ-Site",
"keywords": [
"panda-xform"
],
......
......@@ -8,15 +8,29 @@ const BASE = '/PandaWorkFlow/WorkFlow';
const BASEURL = '/PandaWorkFlow/WorkFlow/AccountManage';
const YOURSELFER_SERVER = 'http://127.0.0.1:8181';
const url = (REACT_APP_ENV || 'dev') !== 'dev' ? `${YOURSELFER_SERVER}/${BASEURL}` : `${window.location.origin}${BASEURL}`;// 新版的链接
export const uploadFileUrl = `${BASEURL}/UploaderFiles`; // 上传文件链接
export const downloadFileUrl = `${BASEURL}/DownloadFiles`; // 下载/播放文件链接
/** @End */
/** @Tips: 增加空值检测 */
const NOTHING = [undefined, '', null, void 0]; // void 0 === void 1
/** @End */
const headers = {
'Civ-Site': window?.globalConfig?.userInfo?.site
};
console.log('headers', headers)
// 获取字典的接口
export function getSelectName(nodeName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetSelectItemList?nodeName=${nodeName}`,
method: 'get',
});
......@@ -25,6 +39,9 @@ export function getSelectName(nodeName) {
//字段校验
export function getFormFieldHideDtos(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/BPM/CaseManage/GetFormFieldHideDtos`,
method: 'post',
data
......@@ -34,6 +51,9 @@ export function getFormFieldHideDtos(data) {
//关联表单显示隐藏控制规则
export function ruleValidation(ruleContent) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaOMS/OMS/WorkFlow/RuleValidation${ruleContent ? `?ruleContent=${ruleContent}` : ''}`,
method: 'get',
});
......@@ -41,6 +61,9 @@ export function ruleValidation(ruleContent) {
export function getTableNumberList(tableName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaOMS/OMS/CaseManage/GetTableNumberList${tableName ? `?tableName=${tableName}` : ''}`,
method: 'get',
});
......@@ -49,6 +72,9 @@ export function getTableNumberList(tableName) {
// 选择器选项的子节点查询
export function getSelectChildName(nodeName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/WorkChildFlow`,
method: 'get',
});
......@@ -57,6 +83,9 @@ export function getSelectChildName(nodeName) {
//站点选择器查询(带ID)
export function getStationIDListByUserID(id, isAll) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetStationIDListByUserID?userID=${id}${'&isAll=' + isAll}`,
method: 'get',
});
......@@ -65,6 +94,9 @@ export function getStationIDListByUserID(id, isAll) {
// 站点选择器查询
export function getStationListByUserID(id, isAll) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetStationListByUserID?userID=${id}${'&isAll=' + isAll}`,
method: 'get',
});
......@@ -73,6 +105,9 @@ export function getStationListByUserID(id, isAll) {
//自动计算字符串转化
export function getFormFieldAnalysisDtos(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/BPM/CaseManage/GetFormFieldAnalysisDtos`,
method: 'post',
data
......@@ -82,6 +117,9 @@ export function getFormFieldAnalysisDtos(data) {
//表单字段自动计算
export function formAutomaticComputation(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/BPM/CaseManage/FormAutomaticComputation`,
method: 'post',
data
......@@ -91,6 +129,9 @@ export function formAutomaticComputation(data) {
//表单字段隐藏计算
export function formFieldHideComputation(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/BPM/CaseManage/FormFieldHideComputation`,
method: 'post',
data
......@@ -99,6 +140,9 @@ export function formFieldHideComputation(data) {
export function getGroupAndRole() {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/GetGroupAndRole`,
method: 'get',
})
......@@ -107,6 +151,9 @@ export function getGroupAndRole() {
//人员选择器获取(三种形态)
export function getUserSelector(role, userID) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetUserSelector?${role ? 'role=' + role : ''}${userID ? '&userID=' + userID : ''}`,
method: 'get',
});
......@@ -115,6 +162,9 @@ export function getUserSelector(role, userID) {
// 人员选择器查询
export function getUserListForRole(params) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetUserListForRole${params.roleName ? `?roleName=${params.roleName}` : ''}`,
method: 'get',
});
......@@ -124,6 +174,9 @@ export function getUserListForRole(params) {
export const getMenTreeByRole = (paramas) => {
const { role, userID } = paramas
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASE}/WorkFlow/GetMenTreeByRole?userID=${userID}&role=${role}`,
method: 'get',
})
......@@ -132,6 +185,9 @@ export const getMenTreeByRole = (paramas) => {
//部门选择器
export const getDeptList = (params) => {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetDeptList`,
method: 'post',
})
......@@ -140,6 +196,9 @@ export const getDeptList = (params) => {
// 台账的配置查询
export function GetAccountConfigInfo(accountName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetAccountConfigInfo?accountName=${accountName}`,
method: 'get',
});
......@@ -148,6 +207,9 @@ export function GetAccountConfigInfo(accountName) {
// 台账的表查询
export function GetAccountPageList(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetAccountPageList`,
method: 'post',
data,
......@@ -156,6 +218,9 @@ export function GetAccountPageList(data) {
export function GetTableGroupMeta(accountName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetTableGroupMeta?accountName=${accountName}`,
method: 'get'
});
......@@ -164,6 +229,9 @@ export function GetTableGroupMeta(accountName) {
// NEXT需要增加分页
export function GetFieldValueFromTable(accountName, fieldName, filter) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetFieldValueFromTable?tableName=${accountName}&fieldName=${fieldName}${filter ? '&filter=' + filter : ''}`,
method: 'get',
});
......@@ -172,6 +240,9 @@ export function GetFieldValueFromTable(accountName, fieldName, filter) {
// 台账表单的提交
export function SubmitAccountData(tableName, key, value, data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/EditTableData?tableName=${tableName}&key=${key}&id=${value}`,
method: 'post',
data: data,
......@@ -181,6 +252,9 @@ export function SubmitAccountData(tableName, key, value, data) {
// 台账的新增
export function AddNewAccountData(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/`,
method: 'post',
data,
......@@ -191,6 +265,9 @@ export function AddNewAccountData(data) {
// 上传文件
export function UploadFileReturnUrl(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${url}/UploaderFiles`,
method: 'post',
data,
......@@ -202,14 +279,12 @@ export function downloadFile(str) {
url: `${url}/DownloadFiles?filePath=${str}`,
method: 'get',
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site,
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
},
responseType: 'blob'
});
}
export const uploadFileUrl = `${BASEURL}/UploaderFiles`; // 上传文件链接
export const downloadFileUrl = `${BASEURL}/DownloadFiles`; // 下载/播放文件链接
/** @End */
/**
......@@ -221,6 +296,9 @@ export const downloadFileUrl = `${BASEURL}/DownloadFiles`; // 下载/播放文
export function GetTableDataInfo({ accountName, id }) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/GetTableDataInfo?accountName=${accountName}&id=${id}`,
method: 'GET',
});
......@@ -235,6 +313,9 @@ export function GetTableDataInfo({ accountName, id }) {
export function SaveTableDataInfo(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/SaveTableDataInfo`,
method: 'post',
data,
......@@ -250,6 +331,9 @@ export function SaveTableDataInfo(data) {
export function EditTableDataInfo(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/EditTableDataInfo`,
method: 'post',
data,
......@@ -258,6 +342,9 @@ export function EditTableDataInfo(data) {
export function BatchEditTableDataInfo(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/BatchEditTableDataInfo`,
method: 'post',
data,
......@@ -266,6 +353,9 @@ export function BatchEditTableDataInfo(data) {
export function DeleteTableDataInfo(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `${BASEURL}/DeleteTableDataInfo`,
method: 'post',
data,
......@@ -289,6 +379,7 @@ export function ExportAccountData({ accountName, ids, exportAll }) {
url: `${BASEURL}/ExportAccountData?accountName=${accountName}&ids=${ids}&exportAll=${exportAll}`,
method: 'get',
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site,
'Content-Type': 'application/json; charset=UTF-8',
},
responseType: 'blob'
......@@ -301,6 +392,7 @@ export function ExportAccountModel({ accountName, exportAll }) {
url: `${BASEURL}/ExportAccountModel?accountName=${accountName}&exportAll=${exportAll}`,
method: 'get',
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site,
'Content-Type': 'application/json; charset=UTF-8',
},
responseType: 'blob'
......@@ -310,6 +402,9 @@ export function ExportAccountModel({ accountName, exportAll }) {
//获取数据字典
export function GetDataDictionaryList(params) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaOMS/OMS/DataManger/GetDataDictionaryList${params.nodeID ? `?nodeID=${params.nodeID}` : ''}`,
method: 'get',
})
......@@ -318,6 +413,9 @@ export function GetDataDictionaryList(params) {
//获取数据字典子项
export function GetSelectItemList({ nodeName }) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaWorkFlow/WorkFlow/AccountManage/GetSelectItemList${nodeName ? `?nodeName=${nodeName}` : ''}`,
method: 'get',
})
......@@ -326,6 +424,9 @@ export function GetSelectItemList({ nodeName }) {
//获取所有表
export function LoadTableV2() {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/LoadTableV2`,
method: 'get'
})
......@@ -334,6 +435,9 @@ export function LoadTableV2() {
//获取台账表
export function LoadLedgers() {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/WorkOrderCenter/GetCM_Ledger_LoadLedgers`,
method: 'get'
})
......@@ -342,6 +446,9 @@ export function LoadLedgers() {
//通过台账名称获取字段
export function QueryFields(accountName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/WorkOrderCenter/GetCMLedger_QueryFields${accountName ? `?accountName=${accountName}` : ''}`,
method: 'get'
})
......@@ -350,6 +457,9 @@ export function QueryFields(accountName) {
//获取台账添加字段
export function QueryAddFields(accountName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaOMS/OMS/WorkOrderCenter/GetCMLedger_QueryAddFields${accountName ? `?accountName=${accountName}` : ''}`,
method: 'get'
})
......@@ -358,6 +468,9 @@ export function QueryAddFields(accountName) {
//根据坐标点获取地名
export function getLocation(location) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/pandagis/mapserver/Tool/PlaceAround?key=6e0b74fa6de65506b360e2e801f8582f&location=${location}`,
method: 'get'
})
......@@ -366,6 +479,9 @@ export function getLocation(location) {
//模糊搜索地名
export function searchAdress({ keywords, region }) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/pandagis/mapserver/Tool/PlaceAroundV2?key=6e0b74fa6de65506b360e2e801f8582f&keywords=${keywords}&region=${region}`,
method: 'get'
})
......@@ -374,6 +490,9 @@ export function searchAdress({ keywords, region }) {
//获取表字段
export function LoadTableFields(paramas) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/LoadTableFields?tableName=${paramas.tableName}`,
method: 'get'
})
......@@ -383,6 +502,9 @@ export function LoadTableFields(paramas) {
//获取地图方案
export function getMaplayerByTerminalType() {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaGIS/MapServer/Maplayer/GetMaplayerByTerminalType?terminalType=scheme&isBaseMap=false&v=1691659617`,
method: 'get'
})
......@@ -391,6 +513,9 @@ export function getMaplayerByTerminalType() {
//通过方案获取获图层
export function GetLayerList(serviceName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaGIS/MapServer/MetaData/D_GetLayerList?serviceName=${serviceName}`,
method: 'get'
})
......@@ -399,6 +524,9 @@ export function GetLayerList(serviceName) {
//通过图层获取字段
export function GetLayerFields({ mapServer, layerName }) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaGIS/MapServer/MetaData/GetLayerFields?mapServer=${mapServer}&layerName=${layerName}`,
method: 'get'
})
......@@ -407,6 +535,9 @@ export function GetLayerFields({ mapServer, layerName }) {
//获取表字段(无附加表)
export function ReloadTableFields(paramas) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/ReloadTableFields?tableName=${paramas.tableName}`,
method: 'get'
})
......@@ -415,6 +546,9 @@ export function ReloadTableFields(paramas) {
//获取所有表
export function LoadUnattachedTables() {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/LoadUnattachedTables`,
method: 'get'
})
......@@ -423,6 +557,9 @@ export function LoadUnattachedTables() {
//获取附加表信息中的JSON配置
export function GetTableConfigJson(paramas) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/GetTableConfigJson?tableName=${paramas.tableName}`,
method: 'get'
})
......@@ -431,6 +568,9 @@ export function GetTableConfigJson(paramas) {
//获取台账的json
export function GetTableJson(accountName) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `/PandaOMS/OMS/CaseManage/GetAccountTableJson?accountName=${accountName}`,
method: 'get',
})
......@@ -439,6 +579,9 @@ export function GetTableJson(accountName) {
//保存附加表信息,支持台账6.0
export function saveTableConfig(data) {
return request({
headers: {
'Civ-Site': window?.globalConfig?.userInfo?.site
},
url: `PandaOMS/OMS/CaseManage/SaveTableConfig `,
method: 'post',
data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment