Commit a3bf4073 authored by Maofei94's avatar Maofei94

perf: api修改

parent c0901f32
...@@ -67,7 +67,7 @@ const CurrentSolution = () => { ...@@ -67,7 +67,7 @@ const CurrentSolution = () => {
<Col span={2} className={styles.divbox}> <Col span={2} className={styles.divbox}>
<div>切换解决方案:</div> <div>切换解决方案:</div>
</Col> </Col>
<Col span={21}> <Col span={22}>
{currentData && ( {currentData && (
<Select <Select
style={{ width: '100%' }} style={{ width: '100%' }}
...@@ -87,33 +87,36 @@ const CurrentSolution = () => { ...@@ -87,33 +87,36 @@ const CurrentSolution = () => {
)} )}
</Col> </Col>
</Row> </Row>
<div className={styles.btnBox}>
<Button type="primary" onClick={() => submit()}>
提交
</Button>
</div>
</Spin>
<div className={styles.textBox}> <div className={styles.textBox}>
<p> <p>
<strong>友情提示:</strong> <strong>友情提示:</strong>
</p> </p>
<p> <p>
熊猫智慧水务应用解决方案的管理,集成了数据库管理、用户权限管理、基础平台管理、应用中心管理、系统日志管理等核心模块; 熊猫智慧水务应用解决方案的管理,集成了数据库管理、用户权限管理、基础平台管理、应用中心管理、系统日志管理等核心模块;
</p> </p>
<p> <p>
主要为客户项目经理在实施应用部署的过程中提供可视化配置系统,一站式交付用户需求的熊猫智慧水务相关产品;数据库支持SQL 主要为客户项目经理在实施应用部署的过程中提供可视化配置系统,一站式交付用户需求的熊猫智慧水务相关产品;
Server、Oracle、MongoDB、MySQL四大类常见数据库; </p>
<p>
数据库支持SQL Server、Oracle、MongoDB、MySQL四大类常见数据库;
</p> </p>
<p> <p>
平台中心涵盖GIS平台、物联网平台、业务平台、消息平台等基础平台,2021年会推出数字孪生平台、数据治理平台、AI平台等进阶平台; 平台中心涵盖GIS平台、物联网平台、业务平台、消息平台等基础平台,2021年会推出数字孪生平台、数据治理平台、AI平台等进阶平台;
</p> </p>
{/* 无线App端、微信小程序端 */}
<p> <p>
应用中心主要把客户应用按端分离,分为PCWeb端、无线App端、微信小程序端,结合应用界面与菜单权限配置完成; 应用中心主要把客户应用按端分离,分为PCWeb端、移动应用端,结合应用界面与菜单权限配置完成;
</p> </p>
<p> <p>
用户中心负责管理用户与平台的关系、用户与端的关系、用户与功能菜单的关系、用户与设备的关系。 用户中心负责管理用户与平台的关系、用户与端的关系、用户与功能菜单的关系、用户与设备的关系。
</p> </p>
</div> </div>
<div className={styles.btnBox}>
<Button type="primary" onClick={() => submit()}>
提交
</Button>
</div>
</Spin>
</Card> </Card>
</PageContainer> </PageContainer>
); );
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
min-height: calc(100vh - 72px); min-height: calc(100vh - 72px);
} }
.btnBox{ .btnBox{
margin-top: 40px; margin-top: 20px;
display: flex!important; display: flex!important;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -17,10 +17,14 @@ ...@@ -17,10 +17,14 @@
} }
.textBox{ .textBox{
// margin-left: 20px; // margin-left: 20px;
margin-top: 20px; margin-top: 30px;
background-color: #f8f8f8;
padding: 10px;
border-radius: 8px;
p{ p{
margin: 5px; margin: 5px;
color:gray; color:gray;
font-size: 16px; font-size: 16px;
word-spacing: 5px;
} }
} }
\ No newline at end of file
...@@ -179,7 +179,7 @@ const MobileConfigPage = props => { ...@@ -179,7 +179,7 @@ const MobileConfigPage = props => {
{activeKey === tabArr[1].key && tabArr[1].component} {activeKey === tabArr[1].key && tabArr[1].component}
</TabPane> </TabPane>
)} )}
{showConfig && ( {showConfig && subType !== 'add' && (
<TabPane tab="其他配置" key="tab3"> <TabPane tab="其他配置" key="tab3">
<SevenParams /> <SevenParams />
<VersionPublish /> <VersionPublish />
......
...@@ -400,6 +400,7 @@ const MiniMenu = props => { ...@@ -400,6 +400,7 @@ const MiniMenu = props => {
console.log(findNum(newTreeList, dragKey, getArrList), 'aa'); console.log(findNum(newTreeList, dragKey, getArrList), 'aa');
let obj = findNum(newTreeList, dragKey, getArrList); let obj = findNum(newTreeList, dragKey, getArrList);
console.log(obj, 'obj');
let arrList = []; let arrList = [];
if (dragPos.length !== dropPos.length) { if (dragPos.length !== dropPos.length) {
notification.warning({ notification.warning({
...@@ -432,8 +433,6 @@ const MiniMenu = props => { ...@@ -432,8 +433,6 @@ const MiniMenu = props => {
} else if (dropPosition === 1) { } else if (dropPosition === 1) {
arrList.splice(Number(dropPos[dropPos.length - 1]) + 1, 0, obj.id); arrList.splice(Number(dropPos[dropPos.length - 1]) + 1, 0, obj.id);
} }
console.log(arrList);
console.log(arrList, 'console.log(arrList);', obj.menuID); console.log(arrList, 'console.log(arrList);', obj.menuID);
dragMenu({ dragMenu({
menuID: obj.id, menuID: obj.id,
...@@ -457,13 +456,18 @@ const MiniMenu = props => { ...@@ -457,13 +456,18 @@ const MiniMenu = props => {
const findNum = (array, id, callback, parentId = '') => { const findNum = (array, id, callback, parentId = '') => {
let ptId = parentId; let ptId = parentId;
let arr = []; let arr = [];
let arrFlag = true;
array.map((item, index) => { array.map((item, index) => {
if (item.menuID === id) { if (item.menuID === id) {
return (arr = callback(array, id, parentId, index)); arr = callback(array, id, parentId, index);
arrFlag = false;
return arr;
} }
if (item.children && item.children.length > 0) { console.log(arr, 'arr');
if (arrFlag && item.children && item.children.length > 0) {
ptId = item.menuID; ptId = item.menuID;
return (arr = findNum(item.children, id, callback, ptId)); arr = findNum(item.children, id, callback, ptId);
return arr;
} }
}); });
return arr; return arr;
...@@ -521,7 +525,7 @@ const MiniMenu = props => { ...@@ -521,7 +525,7 @@ const MiniMenu = props => {
draggable draggable
autoExpandParent autoExpandParent
onDrop={handleDrop} onDrop={handleDrop}
onDragEnter={handleDragEnter} // onDragEnter={handleDragEnter}
selectedKeys={[menuID]} selectedKeys={[menuID]}
expandedKeys={[menuID]} expandedKeys={[menuID]}
/> />
......
...@@ -18,6 +18,8 @@ import { ...@@ -18,6 +18,8 @@ import {
DoubleRightOutlined, DoubleRightOutlined,
BarsOutlined, BarsOutlined,
UserOutlined, UserOutlined,
DesktopOutlined,
MobileOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { import {
setMenuToRole, setMenuToRole,
...@@ -189,14 +191,15 @@ const SiteManage = () => { ...@@ -189,14 +191,15 @@ const SiteManage = () => {
}); });
} }
console.log(iconStyles); console.log(iconStyles);
if (item.visibleTitle === '手持系统') { // if (item.visibleTitle === '手持系统') {
item.icon = <span className="iconfont iconanzhuo1" />; // item.icon = <span className="iconfont iconanzhuo1" />;
// newArr[0] = item;
// }
if (item.visibleTitle === '小程序') {
item.icon = <MobileOutlined />;
newArr[0] = item; newArr[0] = item;
} else if (item.visibleTitle === '小程序') {
item.icon = <span className="iconfont iconxiaochengxu" />;
newArr[1] = item;
} else { } else {
item.icon = <span className="iconfont iconliulanqi" />; item.icon = <DesktopOutlined />;
} }
return ( return (
item.visibleTitle !== '其它角色' && item.visibleTitle !== '其它角色' &&
...@@ -207,6 +210,9 @@ const SiteManage = () => { ...@@ -207,6 +210,9 @@ const SiteManage = () => {
}); });
arr2 = arr2.concat(newArr); arr2 = arr2.concat(newArr);
let arr3 = arr2.map(item => { let arr3 = arr2.map(item => {
if (item.visibleTitle === '小程序') {
item.visibleTitle = '移动应用';
}
item.title = item.visibleTitle || ''; item.title = item.visibleTitle || '';
item.key = item.visibleValue || ''; item.key = item.visibleValue || '';
if (item.roleList && item.roleList.length > 0) { if (item.roleList && item.roleList.length > 0) {
......
import { get, post } from '@/services/index'; import { get, post, CITY_SERVICE } from '@/services/index';
/** ***网站配置*** */ /** ***网站配置*** */
// 七参数初始化 // 七参数初始化
export const getSevenParams = () => export const getSevenParams = () =>
get(`/Cityinterface/rest/services/OMS.svc/M_GetSevenParams`, { get(`${CITY_SERVICE}/OMS.svc/M_GetSevenParams`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
}); });
// 根据转换类型获取七参数 // 根据转换类型获取七参数
export const getSevenParamsByTransType = value => export const getSevenParamsByTransType = value =>
get(`/Cityinterface/rest/services/OMS.svc/M_GetSevenParamsByTransType`, { get(`${CITY_SERVICE}/OMS.svc/M_GetSevenParamsByTransType`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
transType: value, transType: value,
}); });
// 提交七参数 // 提交七参数
export const postSevenParams = sevenFormData => export const postSevenParams = sevenFormData =>
post( post(`${CITY_SERVICE}/OMS.svc/M_SetSevenParams?_version=9999`, sevenFormData);
`/Cityinterface/rest/services/OMS.svc/M_SetSevenParams?_version=9999`,
sevenFormData,
);
/** ***菜单管理*** */ /** ***菜单管理*** */
// 获取菜单树 // 获取菜单树
export const getTree = () => export const getTree = () =>
get(`/Cityinterface/rest/services/OMS.svc/MiniAppSiteTree`, { get(`${CITY_SERVICE}/OMS.svc/MiniAppSiteTree`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
node: -2, node: -2,
...@@ -42,7 +39,7 @@ export const addMenuApi = ( ...@@ -42,7 +39,7 @@ export const addMenuApi = (
pageUrl, pageUrl,
funParam, funParam,
) => ) =>
get(`/Cityinterface/rest/services/OMS.svc/MiniApp_AddMenu`, { get(`${CITY_SERVICE}/OMS.svc/MiniApp_AddMenu`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
parentID: menuID, parentID: menuID,
...@@ -63,7 +60,7 @@ export const addMenuGroupApi = ( ...@@ -63,7 +60,7 @@ export const addMenuGroupApi = (
offlineImgUrl, offlineImgUrl,
funParam, funParam,
) => ) =>
get(`/Cityinterface/rest/services/OMS.svc/MiniApp_AddMenu`, { get(`${CITY_SERVICE}/OMS.svc/MiniApp_AddMenu`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
// 根目录添加,parentID 为-1 // 根目录添加,parentID 为-1
...@@ -78,24 +75,24 @@ export const addMenuGroupApi = ( ...@@ -78,24 +75,24 @@ export const addMenuGroupApi = (
}); });
// 获取角色列表 // 获取角色列表
export const getRoleList = () => export const getRoleList = () =>
get(`/Cityinterface/rest/services/OMS.svc/P_GetRoleListPlain`, { get(`${CITY_SERVICE}/OMS.svc/P_GetRoleListPlain`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
subSystemValue: 'miniapp', subSystemValue: 'miniapp',
}); });
// 编辑-获取菜单 // 编辑-获取菜单
export const getMenuInfo = id => export const getMenuInfo = id =>
get(`/Cityinterface/rest/services/OMS.svc/Mini_GetMenuInfo`, { get(`${CITY_SERVICE}/OMS.svc/Mini_GetMenuInfo`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
menuID: id, menuID: id,
}); });
// 编辑-提交菜单 // 编辑-提交菜单
export const submitMenuInfo = params => export const submitMenuInfo = params =>
get(`/Cityinterface/rest/services/OMS.svc/MiniApp_EditMenu`, params); get(`${CITY_SERVICE}/OMS.svc/MiniApp_EditMenu`, params);
// 删除菜单 // 删除菜单
export const deleteMenuApi = id => export const deleteMenuApi = id =>
get(`/Cityinterface/rest/services/OMS.svc/MiniApp_DeleteMenu`, { get(`${CITY_SERVICE}/OMS.svc/MiniApp_DeleteMenu`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
menuID: id, menuID: id,
......
import { get, post, PUBLISH_SERVICE } from '@/services/index'; import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
/** /**
* @数据库初始化 * @数据库初始化
...@@ -19,48 +19,48 @@ export const connectionTest = params => ...@@ -19,48 +19,48 @@ export const connectionTest = params =>
// 获取数据库配置信息 // 获取数据库配置信息
export const getDataBaseConfig = params => export const getDataBaseConfig = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetDataBaseConfig', params); get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseConfig`, params);
// 获取数据库连接记录 // 获取数据库连接记录
export const getConnRecord = params => export const getConnRecord = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetConnRecord', params); get(`${CITY_SERVICE}/OMS.svc/S_GetConnRecord`, params);
// 测试连接 // 测试连接
export const getConnectionTest = params => export const getConnectionTest = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetConnectionTest', params); get(`${CITY_SERVICE}/OMS.svc/S_GetConnectionTest`, params);
// 保存数据库连接 // 保存数据库连接
export const saveConnection = params => export const saveConnection = params =>
get('/Cityinterface/rest/services/OMS.svc/S_SaveConnection', params); get(`${CITY_SERVICE}/OMS.svc/S_SaveConnection`, params);
// 获取数据库列表 // 获取数据库列表
export const getDataBaseList = params => export const getDataBaseList = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetDataBaseList', params); get(`${CITY_SERVICE}/OMS.svc/S_GetDataBaseList`, params);
// 数据库初始化 // 数据库初始化
export const initDBv4 = params => export const initDBv4 = params =>
get('/Cityinterface/rest/services/OMS.svc/S_InitDBv4', params); get(`${CITY_SERVICE}/OMS.svc/S_InitDBv4`, params);
// 更新描述 // 更新描述
export const updateConnDesc = params => export const updateConnDesc = params =>
get('/Cityinterface/rest/services/OMS.svc/S_UpdateConnDesc', params); get(`${CITY_SERVICE}/OMS.svc/S_UpdateConnDesc`, params);
// 获取日志 // 获取日志
export const getInitDBLog = params => export const getInitDBLog = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetInitDBLog', params); get(`${CITY_SERVICE}/OMS.svc/S_GetInitDBLog`, params);
// 删除初始化日志 // 删除初始化日志
export const deleteInitDBLog = params => export const deleteInitDBLog = params =>
get('/Cityinterface/rest/services/OMS.svc/S_DeleteInitDBLog', params); get(`${CITY_SERVICE}/OMS.svc/S_DeleteInitDBLog`, params);
// 修改产品解决方案 // 修改产品解决方案
export const setTableSQLDirName = params => export const setTableSQLDirName = params =>
get('/Cityinterface/rest/services/OMS.svc/S_SetTableSQLDirName', params); get(`${CITY_SERVICE}/OMS.svc/S_SetTableSQLDirName`, params);
// 删除数据库连接记录 // 删除数据库连接记录
export const deleteConn = params => export const deleteConn = params =>
get('/Cityinterface/rest/services/OMS.svc/S_DeleteConn', params); get(`${CITY_SERVICE}/OMS.svc/S_DeleteConn`, params);
/** /**
* *
...@@ -68,11 +68,11 @@ export const deleteConn = params => ...@@ -68,11 +68,11 @@ export const deleteConn = params =>
*/ */
// 切换解决方案配置 // 切换解决方案配置
export const getSolutionList = params => export const getSolutionList = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_GetSolutionList', params); get(`${CITY_SERVICE}/OMS.svc/W4_GetSolutionList`, params);
// 切换解决方案 // 切换解决方案
export const changeSolution = params => export const changeSolution = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_ChangeSolution', params); get(`${CITY_SERVICE}/OMS.svc/W4_ChangeSolution`, params);
/** /**
* *
...@@ -80,80 +80,69 @@ export const changeSolution = params => ...@@ -80,80 +80,69 @@ export const changeSolution = params =>
*/ */
// 检查数据库表 // 检查数据库表
export const tableCheck = params => export const tableCheck = params =>
get(`/Cityinterface/rest/services/OMS.svc/TableCheck`, params); get(`${CITY_SERVICE}/OMS.svc/TableCheck`, params);
// 获取数据库升级记录 // 获取数据库升级记录
export const databaseStandardGetLog = params => export const databaseStandardGetLog = params =>
get('/Cityinterface/rest/services/OMS.svc/DatabaseStandard_GetLog', params); get(`${CITY_SERVICE}/OMS.svc/DatabaseStandard_GetLog`, params);
// 更新 // 更新
export const updateDateBase = params => export const updateDateBase = params =>
get( get(`${CITY_SERVICE}/OMS.svc/DatabaseStandard_UpdateDateBase`, params);
'/Cityinterface/rest/services/OMS.svc/DatabaseStandard_UpdateDateBase',
params,
);
/** /**
* @数据库连接配置 * @数据库连接配置
*/ */
// 删除数据库连接 // 删除数据库连接
export const deleteConnString = params => export const deleteConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_DeleteConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_DeleteConnString`, params);
// SQL数据库连接 // SQL数据库连接
export const getSQLServerConnString = params => export const getSQLServerConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetSQLServerConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_GetSQLServerConnString`, params);
// 新增SQLServer数据库连接 // 新增SQLServer数据库连接
export const addSQLServerConnString = params => export const addSQLServerConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_AddSQLServerConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_AddSQLServerConnString`, params);
// 删除SQL连接 // 删除SQL连接
export const editSQLServerConnString = params => export const editSQLServerConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_EditSQLServerConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_EditSQLServerConnString`, params);
// SQL数据库测试连接 // SQL数据库测试连接
export const getSQLServerConnectionTest = params => export const getSQLServerConnectionTest = params =>
get( get(`${CITY_SERVICE}/OMS.svc/S_GetSQLServerConnectionTest`, params, {
'/Cityinterface/rest/services/OMS.svc/S_GetSQLServerConnectionTest',
params,
{
timeout: 30000, timeout: 30000,
}, });
);
/** /**
* @Oracle数据库 * @Oracle数据库
*/ */
// Oracle连接记录 // Oracle连接记录
export const getOracleConnString = params => export const getOracleConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetOracleConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_GetOracleConnString`, params);
// 新增Oracle连接 // 新增Oracle连接
export const addOracleConnString = params => export const addOracleConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_AddOracleConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_AddOracleConnString`, params);
// 编辑Oracle连接 // 编辑Oracle连接
export const editOracleConnString = params => export const editOracleConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_EditOracleConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_EditOracleConnString`, params);
// 测试连接 // 测试连接
export const getOracleConnectionTest = params => export const getOracleConnectionTest = params =>
get( get(`${CITY_SERVICE}/OMS.svc/S_GetOracleConnectionTest`, params, {
'/Cityinterface/rest/services/OMS.svc/S_GetOracleConnectionTest',
params,
{
timeout: 30000, timeout: 30000,
}, });
);
/** /**
* @MongoDB连接 * @MongoDB连接
*/ */
// MongoDB连接记录 // MongoDB连接记录
export const getMongoDBConnString = params => export const getMongoDBConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetMongoDBConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_GetMongoDBConnString`, params);
// 新增连接配置 // 新增连接配置
export const addMongoDBConnString = params => export const addMongoDBConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_AddMongoDBConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_AddMongoDBConnString`, params);
// 编辑分享 // 编辑分享
export const editMongoDBConnString = params => export const editMongoDBConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_EditMongoDBConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_EditMongoDBConnString`, params);
// 测试连接 // 测试连接
export const getMongoDBConnectionTest = params => export const getMongoDBConnectionTest = params =>
get('/Cityinterface/rest/services/OMS.svc/S_MongoDBConnectionTest', params, { get(`${CITY_SERVICE}/OMS.svc/S_MongoDBConnectionTest`, params, {
timeout: 30000, timeout: 30000,
}); });
/** /**
...@@ -161,15 +150,15 @@ export const getMongoDBConnectionTest = params => ...@@ -161,15 +150,15 @@ export const getMongoDBConnectionTest = params =>
*/ */
// MySQL连接记录 // MySQL连接记录
export const getMySQLConnString = params => export const getMySQLConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetMySQLConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_GetMySQLConnString`, params);
// 新增配置连接 // 新增配置连接
export const addMySQLConnString = params => export const addMySQLConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_AddMySQLConnString', params); get(`${CITY_SERVICE}/OMS.svc/S_AddMySQLConnString`, params);
// 测试连接 // 测试连接
export const getMySQLConnectionTest = params => export const getMySQLConnectionTest = params =>
get('/Cityinterface/rest/services/OMS.svc/S_GetMySQLConnectionTest', params); get(`${CITY_SERVICE}/OMS.svc/S_GetMySQLConnectionTest`, params);
// 编辑 // 编辑
export const editMySQLConnString = params => export const editMySQLConnString = params =>
get('/Cityinterface/rest/services/OMS.svc/S_EditMySQLConnString', params, { get(`${CITY_SERVICE}/OMS.svc/S_EditMySQLConnString`, params, {
timeout: 300000, timeout: 300000,
}); });
import { request } from '../utils/request'; import { request } from '../utils/request';
export const CITY_SERVICE = '/Cityinterface/rest/services'; export const CITY_SERVICE = '/Cityinterface/rest/services';
export const PUBLISH_SERVICE = '/Publish/OMS'; export const PUBLISH_SERVICE = '/Publish/OMS';
// export const CITY_SERVICE = '/Publish/GateWay/CityServer';
const get = async (url, params, options = {}) => const get = async (url, params, options = {}) =>
request({ request({
......
import { get, post, PUBLISH_SERVICE } from '@/services/index'; import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
import qs from 'qs'; import qs from 'qs';
/** /**
* @param {*} params * @param {*} params
*/ */
export const miniAppSiteTree = params => export const miniAppSiteTree = params =>
get('/Cityinterface/rest/services/OMS.svc/MiniAppSiteTree', params); get(`${CITY_SERVICE}/OMS.svc/MiniAppSiteTree`, params);
/** /**
* 获取网站配置 * 获取网站配置
...@@ -13,7 +13,7 @@ export const miniAppSiteTree = params => ...@@ -13,7 +13,7 @@ export const miniAppSiteTree = params =>
* title:'名称' * title:'名称'
*/ */
export const getWebsite = params => export const getWebsite = params =>
get('/Cityinterface/rest/services/OMS.svc/MiniApp_GetWebsite', params); get(`${CITY_SERVICE}/OMS.svc/MiniApp_GetWebsite`, params);
/** /**
* *
* @param {*} params * @param {*} params
...@@ -32,7 +32,7 @@ export const editWebsite = (params, options) => { ...@@ -32,7 +32,7 @@ export const editWebsite = (params, options) => {
let strParams = JSON.stringify(params); let strParams = JSON.stringify(params);
let qsParams = qs.stringify({ config: strParams }); let qsParams = qs.stringify({ config: strParams });
return post( return post(
'/Cityinterface/rest/services/OMS.svc/MiniApp_EditWebsite?_version=9999', `${CITY_SERVICE}/OMS.svc/MiniApp_EditWebsite?_version=9999`,
qsParams, qsParams,
options, options,
); );
...@@ -65,7 +65,7 @@ export const getMiniAppModuleTree = params => ...@@ -65,7 +65,7 @@ export const getMiniAppModuleTree = params =>
} }
*/ */
export const addMenu = params => export const addMenu = params =>
get('/Cityinterface/rest/services/OMS.svc/MiniApp_AddMenu', params); get(`${CITY_SERVICE}/OMS.svc/MiniApp_AddMenu`, params);
// 获取菜单详情 // 获取菜单详情
/** /**
...@@ -74,29 +74,29 @@ export const addMenu = params => ...@@ -74,29 +74,29 @@ export const addMenu = params =>
* } * }
*/ */
export const getMenuInfo = params => export const getMenuInfo = params =>
get('/Cityinterface/rest/services/OMS.svc/Mini_GetMenuInfo', params); get(`${CITY_SERVICE}/OMS.svc/Mini_GetMenuInfo`, params);
// 编辑菜单 // 编辑菜单
export const editMenu = params => export const editMenu = params =>
get('/Cityinterface/rest/services/OMS.svc/MiniApp_EditMenu', params); get(`${CITY_SERVICE}/OMS.svc/MiniApp_EditMenu`, params);
// 删除菜单 // 删除菜单
export const deleteMenu = params => export const deleteMenu = params =>
get('/Cityinterface/rest/services/OMS.svc/MiniApp_DeleteMenu', params); get(`${CITY_SERVICE}/OMS.svc/MiniApp_DeleteMenu`, params);
// 获取角色列表 // 获取角色列表
export const getRoleListPlain = params => export const getRoleListPlain = params =>
get('/Cityinterface/rest/services/OMS.svc/P_GetRoleListPlain', params); get(`${CITY_SERVICE}/OMS.svc/P_GetRoleListPlain`, params);
// 删除小程序 // 删除小程序
export const deleteWebsite = params => export const deleteWebsite = params =>
get('/Cityinterface/rest/services/OMS.svc/MiniApp_DeleteWebsite', params); get(`${CITY_SERVICE}/OMS.svc/MiniApp_DeleteWebsite`, params);
// 新增小程序 // 新增小程序
export const addWebsite = (params, options) => { export const addWebsite = (params, options) => {
let strParams = JSON.stringify(params); let strParams = JSON.stringify(params);
let qsParams = qs.stringify({ config: strParams }); let qsParams = qs.stringify({ config: strParams });
return post( return post(
'/Cityinterface/rest/services/OMS.svc/MiniApp_AddWebsite?_version=9999', `${CITY_SERVICE}/OMS.svc/MiniApp_AddWebsite?_version=9999`,
qsParams, qsParams,
options, options,
); );
...@@ -104,4 +104,4 @@ export const addWebsite = (params, options) => { ...@@ -104,4 +104,4 @@ export const addWebsite = (params, options) => {
// 菜单拖拽 // 菜单拖拽
export const dragMenu = params => export const dragMenu = params =>
get('/Cityinterface/rest/services/OMS.svc/P_DragMenu', params); get(`${CITY_SERVICE}/OMS.svc/P_DragMenu`, params);
import { get, post } from '../index'; import { get, post, CITY_SERVICE } from '../index';
export const orgTest = params => export const orgTest = params =>
get( get(
'/Cityinterface/rest/services/OMS.svc/W4_GetMenuByRoleWithLevel?roleID=6&subSystemValue=city&subSystemName=city&_version=9999&_dc=1604051878230', `${CITY_SERVICE}/OMS.svc/W4_GetMenuByRoleWithLevel?roleID=6&subSystemValue=city&subSystemName=city&_version=9999&_dc=1604051878230`,
params, params,
); );
// 获取组织结构树 // 获取组织结构树
export const orgGet = params => export const orgGet = params =>
get( get(
'/Cityinterface/rest/services/OMS.svc/U_GetOUTree?_version=9999&_dc=1604304482575&node=-1', `${CITY_SERVICE}/OMS.svc/U_GetOUTree?_version=9999&_dc=1604304482575&node=-1`,
params, params,
); );
import { get, post, PUBLISH_SERVICE } from '@/services/index'; import { get, post, PUBLISH_SERVICE, CITY_SERVICE } from '@/services/index';
// 新增站点 // 新增站点
export const addStation = params => export const addStation = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_AddStation', params); get(`${CITY_SERVICE}/OMS.svc/W4_AddStation`, params);
// 删除站点 // 删除站点
export const deleteStation = params => export const deleteStation = params =>
get('/Cityinterface/rest/services/OMS.svc/P_DeleteStation', params); get(`${CITY_SERVICE}/OMS.svc/P_DeleteStation`, params);
// 编辑站点 // 编辑站点
export const editStation = params => export const editStation = params =>
get('/Cityinterface/rest/services/OMS.svc/P_EditStation', params); get(`${CITY_SERVICE}/OMS.svc/P_EditStation`, params);
// 保存站点选择人员 // 保存站点选择人员
export const chooseUserToStation = (params, options) => export const chooseUserToStation = (params, options) =>
post( post(
'/Cityinterface/rest/services/OMS.svc/P_ChooseUserToStation?_version=9999', `${CITY_SERVICE}/OMS.svc/P_ChooseUserToStation?_version=9999`,
params, params,
options, options,
); );
// 获取所有角色信息 // 获取所有角色信息
export const getUserRelationList = params => export const getUserRelationList = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_GetUserRelationList', params); get(`${CITY_SERVICE}/OMS.svc/W4_GetUserRelationList`, params);
// 角色管理保存选择 // 角色管理保存选择
export const setMenuToRole = (params, options) => export const setMenuToRole = (params, options) =>
post( post(
'/Cityinterface/rest/services/OMS.svc/P_SetMenuToRole?_version: 9999', `${CITY_SERVICE}/OMS.svc/P_SetMenuToRole?_version: 9999`,
params, params,
options, options,
); );
...@@ -39,24 +39,24 @@ export const getRoleGroupList = params => ...@@ -39,24 +39,24 @@ export const getRoleGroupList = params =>
// 新增角色 // 新增角色
export const addRole = params => export const addRole = params =>
get(`/Cityinterface/rest/services/OMS.svc/P_AddRole`, params); get(`${CITY_SERVICE}/OMS.svc/P_AddRole`, params);
// 获取分组列表 // 获取分组列表
export const getRoleGroup = params => export const getRoleGroup = params =>
get(`/Cityinterface/rest/services/OMS.svc/P_GetRoleGroup`, params); get(`${CITY_SERVICE}/OMS.svc/P_GetRoleGroup`, params);
// 编辑角色 // 编辑角色
export const editRole = params => export const editRole = params =>
get('/Cityinterface/rest/services/OMS.svc/P_EditRole', params); get(`${CITY_SERVICE}/OMS.svc/P_EditRole`, params);
// 删除角色 // 删除角色
export const deleteRole = params => export const deleteRole = params =>
get('/Cityinterface/rest/services/OMS.svc/P_DeleteRole', params); get(`${CITY_SERVICE}/OMS.svc/P_DeleteRole`, params);
// 编辑分组名称 // 编辑分组名称
export const setRoleGroupName = params => export const setRoleGroupName = params =>
get('/Cityinterface/rest/services/OMS.svc/P_SetRoleGroupName', params); get(`${CITY_SERVICE}/OMS.svc/P_SetRoleGroupName`, params);
// 保存选择的功能 // 保存选择的功能
export const getMenuByRoleWithLevel = params => export const getMenuByRoleWithLevel = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_GetMenuByRoleWithLevel', params); get(`${CITY_SERVICE}/OMS.svc/W4_GetMenuByRoleWithLevel`, params);
// 获取角色类别 // 获取角色类别
export const getWebConfigTypes = params => export const getWebConfigTypes = params =>
......
import { get, post } from '@/services/index'; import { get, post, CITY_SERVICE } from '@/services/index';
/* /*
** params ** params
*/ */
// 获取机构树 // 获取机构树
export const getOUTree = params => export const getOUTree = params =>
get( get(`${CITY_SERVICE}/OMS.svc/U_GetOUTree?_version=9999&node=-1`, params);
'/Cityinterface/rest/services/OMS.svc/U_GetOUTree?_version=9999&node=-1',
params,
);
// 获取站点信息 // 获取站点信息
export const getWebModuleTree = params => export const getWebModuleTree = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_GetWeb4ModuleTree', params); get(`${CITY_SERVICE}/OMS.svc/W4_GetWeb4ModuleTree`, params);
// 新增站点 // 新增站点
export const addStation = params => export const addStation = params =>
get('/Cityinterface/rest/services/OMS.svc/W4_AddStation', params); get(`${CITY_SERVICE}/OMS.svc/W4_AddStation`, params);
// 删除站点 // 删除站点
export const deleteStation = params => export const deleteStation = params =>
get('/Cityinterface/rest/services/OMS.svc/P_DeleteStation', params); get(`${CITY_SERVICE}/OMS.svc/P_DeleteStation`, params);
// 编辑站点 // 编辑站点
export const editStation = params => export const editStation = params =>
get('/Cityinterface/rest/services/OMS.svc/P_EditStation', params); get(`${CITY_SERVICE}/OMS.svc/P_EditStation`, params);
// 保存站点选择人员 // 保存站点选择人员
export const chooseUserToStation = (params, options) => export const chooseUserToStation = (params, options) =>
post( post(
'/Cityinterface/rest/services/OMS.svc/P_ChooseUserToStation?_version=9999', `${CITY_SERVICE}/OMS.svc/P_ChooseUserToStation?_version=9999`,
params, params,
options, options,
); );
// 获取人员 // 获取人员
export const getUserByStation = params => export const getUserByStation = params =>
get('/Cityinterface/rest/services/OMS.svc/P_GetUserByStation', params); get(`${CITY_SERVICE}/OMS.svc/P_GetUserByStation`, params);
...@@ -3,7 +3,7 @@ import qs from 'qs'; ...@@ -3,7 +3,7 @@ import qs from 'qs';
import { CITY_SERVICE, get, post, PUBLISH_SERVICE } from '@/services/index'; import { CITY_SERVICE, get, post, PUBLISH_SERVICE } from '@/services/index';
export const getUserTree = (selectOU, node) => export const getUserTree = (selectOU, node) =>
get(`/Cityinterface/rest/services/OMS.svc/U_GetOUTree`, { get(`${CITY_SERVICE}/OMS.svc/U_GetOUTree`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
selectOU, selectOU,
...@@ -11,7 +11,7 @@ export const getUserTree = (selectOU, node) => ...@@ -11,7 +11,7 @@ export const getUserTree = (selectOU, node) =>
}); });
// export const getOneOUUserListNew = OUID => // export const getOneOUUserListNew = OUID =>
// get(`/Cityinterface/rest/services/OMS.svc/U_GetOneOUUserListNew`, { // get(`${CITY_SERVICE}/OMS.svc/U_GetOneOUUserListNew`, {
// _version: 9999, // _version: 9999,
// _dc: new Date().getTime(), // _dc: new Date().getTime(),
// OUID, // OUID,
...@@ -29,7 +29,7 @@ export const getOneOUUserListNew = OUID => ...@@ -29,7 +29,7 @@ export const getOneOUUserListNew = OUID =>
* @param {*} key * @param {*} key
*/ */
export const getUserByKey = key => export const getUserByKey = key =>
get(`/Cityinterface/rest/services/OMS.svc/U_GetUserByKey`, { get(`${CITY_SERVICE}/OMS.svc/U_GetUserByKey`, {
_version: 9999, _version: 9999,
_dc: new Date().getTime(), _dc: new Date().getTime(),
key, key,
...@@ -47,7 +47,7 @@ export const addUser = ({ ...@@ -47,7 +47,7 @@ export const addUser = ({
phone, phone,
email, email,
}) => }) =>
get(`/Cityinterface/rest/services/OMS.svc/U_AddUser`, { get(`${CITY_SERVICE}/OMS.svc/U_AddUser`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
OUID, OUID,
...@@ -59,7 +59,7 @@ export const addUser = ({ ...@@ -59,7 +59,7 @@ export const addUser = ({
}); });
export const submitAddOrg = (orgID, OUName, description, comment) => export const submitAddOrg = (orgID, OUName, description, comment) =>
get(`/Cityinterface/rest/services/OMS.svc/U_AddOU`, { get(`${CITY_SERVICE}/OMS.svc/U_AddOU`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
pid: orgID, pid: orgID,
...@@ -69,7 +69,7 @@ export const submitAddOrg = (orgID, OUName, description, comment) => ...@@ -69,7 +69,7 @@ export const submitAddOrg = (orgID, OUName, description, comment) =>
}); });
export const editOrgInfo = (orgID, OUName, description, comment) => export const editOrgInfo = (orgID, OUName, description, comment) =>
get(`/Cityinterface/rest/services/OMS.svc/U_EditOneOUInfo`, { get(`${CITY_SERVICE}/OMS.svc/U_EditOneOUInfo`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
OUID: orgID, OUID: orgID,
...@@ -79,21 +79,21 @@ export const editOrgInfo = (orgID, OUName, description, comment) => ...@@ -79,21 +79,21 @@ export const editOrgInfo = (orgID, OUName, description, comment) =>
}); });
export const deleteOrg = orgID => export const deleteOrg = orgID =>
get(`/Cityinterface/rest/services/OMS.svc/U_DeleteOU`, { get(`${CITY_SERVICE}/OMS.svc/U_DeleteOU`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
OUID: orgID, OUID: orgID,
}); });
export const getUserRelationList = userID => export const getUserRelationList = userID =>
get(`/Cityinterface/rest/services/OMS.svc/W4_GetUserRelationList`, { get(`${CITY_SERVICE}/OMS.svc/W4_GetUserRelationList`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
userID: `${userID}`, userID: `${userID}`,
}); });
export const addToOrg = (userID, orgID, newOrgID) => export const addToOrg = (userID, orgID, newOrgID) =>
get(`/Cityinterface/rest/services/OMS.svc/U_JumpToAnotherOU`, { get(`${CITY_SERVICE}/OMS.svc/U_JumpToAnotherOU`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
userID, userID,
...@@ -116,7 +116,7 @@ export const updateUserPassword = ( ...@@ -116,7 +116,7 @@ export const updateUserPassword = (
newPassword, newPassword,
passwordConfirm, passwordConfirm,
) => ) =>
get(`/Cityinterface/rest/services/OMS.svc/U_UpdatePassword`, { get(`${CITY_SERVICE}/OMS.svc/U_UpdatePassword`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
userID, userID,
...@@ -126,7 +126,7 @@ export const updateUserPassword = ( ...@@ -126,7 +126,7 @@ export const updateUserPassword = (
}); });
export const editUser = (userID, loginName, userName, phone, email) => export const editUser = (userID, loginName, userName, phone, email) =>
get(`/Cityinterface/rest/services/OMS.svc/U_EditUser`, { get(`${CITY_SERVICE}/OMS.svc/U_EditUser`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
userID, userID,
...@@ -137,7 +137,7 @@ export const editUser = (userID, loginName, userName, phone, email) => ...@@ -137,7 +137,7 @@ export const editUser = (userID, loginName, userName, phone, email) =>
}); });
export const setUserState = (OUID, state) => export const setUserState = (OUID, state) =>
get(`/Cityinterface/rest/services/OMS.svc/U_UserStateOU`, { get(`${CITY_SERVICE}/OMS.svc/U_UserStateOU`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
OUID, OUID,
...@@ -145,7 +145,7 @@ export const setUserState = (OUID, state) => ...@@ -145,7 +145,7 @@ export const setUserState = (OUID, state) =>
}); });
export const deleteUser = userID => export const deleteUser = userID =>
get(`/Cityinterface/rest/services/OMS.svc/U_DeleteUser`, { get(`${CITY_SERVICE}/OMS.svc/U_DeleteUser`, {
_version: 9999, _version: 9999,
_dc: Date.now(), _dc: Date.now(),
userID, userID,
...@@ -160,7 +160,7 @@ export const multiDeleteUsers = userIDs => ...@@ -160,7 +160,7 @@ export const multiDeleteUsers = userIDs =>
export const setUserRelation = (userID, roleList = [], stationList) => export const setUserRelation = (userID, roleList = [], stationList) =>
post( post(
`/Cityinterface/rest/services/OMS.svc/U_SetUserRelationList?_version=9999`, `${CITY_SERVICE}/OMS.svc/U_SetUserRelationList?_version=9999`,
qs.stringify({ qs.stringify({
userID, userID,
roleList: roleList.length ? `${roleList.join(',')},` : '', roleList: roleList.length ? `${roleList.join(',')},` : '',
......
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