提交 b0540125 authored 作者: 钟是志's avatar 钟是志

发起页面修改

上级 042ce18f
...@@ -11,6 +11,7 @@ import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_p ...@@ -11,6 +11,7 @@ import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_p
import { getOneStopConfigList } from '@/webPublic/one_stop_public/publicServices'; import { getOneStopConfigList } from '@/webPublic/one_stop_public/publicServices';
import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow'; import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow';
import { queryApiVersion } from '@/webPublic/one_stop_public/utils/queryConfig'; import { queryApiVersion } from '@/webPublic/one_stop_public/utils/queryConfig';
import { getOneStopMyInfo } from '@/webPublic/one_stop_public/utils/utils';
// 根据模板code查询模板数据 // 根据模板code查询模板数据
// 查询表格中某条数据 // 查询表格中某条数据
...@@ -132,7 +133,7 @@ export const getHistoryFormDetail = (params = {}) => { ...@@ -132,7 +133,7 @@ export const getHistoryFormDetail = (params = {}) => {
if (res) { if (res) {
// console.log(queryApiVersion()); // console.log(queryApiVersion());
if (queryApiVersion() === '2.0') { // 2.0的接口 流程日志单独获取 if (queryApiVersion() === '2.0') { // 2.0的接口 流程日志单独获取
return api2_0_getTaskInfo(params) return api2_0_getTaskInfo(params)
.then((res2) => { .then((res2) => {
return { return {
...res, ...res,
...@@ -145,7 +146,8 @@ export const getHistoryFormDetail = (params = {}) => { ...@@ -145,7 +146,8 @@ export const getHistoryFormDetail = (params = {}) => {
} else { } else {
return null; return null;
} }
}).then((g) => { })
.then((g) => {
// console.log(g); // console.log(g);
return g; return g;
}); });
...@@ -190,17 +192,7 @@ export const getAppTypeList = () => { ...@@ -190,17 +192,7 @@ export const getAppTypeList = () => {
export const getListByTreeList = (params = {}) => { export const getListByTreeList = (params = {}) => {
return uaaRequest('/UnifiedAppApi/getListByTree', params); return uaaRequest('/UnifiedAppApi/getListByTree', params);
}; };
export { getOneStopMyInfo };
export const getOneStopMyInfo = (params = {}) => {
return uaaRequest('/UserApi/getMy', params).then((res) => {
if (res) {
if(!res.groupsId){
res.groupsId = 'pub';
}
localStorage.setItem('user', JSON.stringify(res));
}
});
};
export function getOneStopActiveMenus(key) { export function getOneStopActiveMenus(key) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -213,7 +205,6 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value ...@@ -213,7 +205,6 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
getOneStopActiveMenus() getOneStopActiveMenus()
.then((res) => { .then((res) => {
}); });
getOneStopMyInfo({});
return fetchTableData({ return fetchTableData({
dataObjId: config.onestopConfigDataObjId || '1248169933162938368', dataObjId: config.onestopConfigDataObjId || '1248169933162938368',
pageNo: 1, pageNo: 1,
......
import React from 'react'; import React from 'react';
import { Modal, message } from 'antd';
import { isJSON } from '@/webPublic/one_stop_public/copy'; import { isJSON } from '@/webPublic/one_stop_public/copy';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request'; import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
import { deepCopy } from '@/webPublic/one_stop_public/utils/myutils'; import { deepCopy } from '@/webPublic/one_stop_public/utils/myutils';
import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils';
import moment from 'moment'; import moment from 'moment';
import { giveSmartFormGlobalProps } from '@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'; import { giveSmartFormGlobalProps } from '@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps';
import { getToken } from '@/webPublic/one_stop_public/utils/token'; import { getToken } from '@/webPublic/one_stop_public/utils/token';
const Modal = getModal();
const message = getMessage();
export default function prepareShow(postData = {}, content = '') { export default function prepareShow(postData = {}, content = '') {
// 模板挂载前执行的公式 // 模板挂载前执行的公式
......
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
* 通知提醒框二次封装 * 通知提醒框二次封装
*/ */
import React from 'react'; import React from 'react';
import { notification } from 'antd'; import { notification, Modal } from 'antd';
import { getModal } from '@/webPublic/one_stop_public/utils/utils';
const Modal = getModal();
/** /**
* *
......
...@@ -2,20 +2,21 @@ ...@@ -2,20 +2,21 @@
* 设置token * 设置token
* */ * */
import { isJSON } from '@/webPublic/one_stop_public/copy'; import { isJSON } from '@/webPublic/one_stop_public/copy';
import { getOneStopMyInfo } from '@/webPublic/one_stop_public/utils/utils';
export const setToken = (value, time) => { export function setToken(value, time){
if(getToken() !== value){ if(getToken() !== value){
localStorage.setItem('antd-pro-token-onestop', value); localStorage.setItem('antd-pro-token-onestop', value);
localStorage.setItem('antd-pro-token', value); localStorage.setItem('antd-pro-token', value);
localStorage.setItem('wisdom-school-token', value); localStorage.setItem('wisdom-school-token', value);
getOneStopMyInfo();
} }
} }
/** /**
* 获取token * 获取token
* */ * */
export const getToken = () => { export function getToken(){
const x = localStorage.getItem('antd-pro-token-onestop'); const x = localStorage.getItem('antd-pro-token-onestop');
if (x && x.length > 11) { if (x && x.length > 11) {
return x; return x;
...@@ -26,7 +27,7 @@ export const getToken = () => { ...@@ -26,7 +27,7 @@ export const getToken = () => {
} }
return null; return null;
}; }
/** /**
* 删除token * 删除token
...@@ -35,7 +36,7 @@ export const delToken = () => { ...@@ -35,7 +36,7 @@ export const delToken = () => {
localStorage.removeItem('antd-pro-token-onestop'); localStorage.removeItem('antd-pro-token-onestop');
localStorage.removeItem('antd-pro-token'); localStorage.removeItem('antd-pro-token');
localStorage.removeItem('wisdom-school-token'); localStorage.removeItem('wisdom-school-token');
} };
export const getUserInfo = () => { export const getUserInfo = () => {
let x = localStorage.getItem('user'); let x = localStorage.getItem('user');
...@@ -50,4 +51,4 @@ export const getUserInfo = () => { ...@@ -50,4 +51,4 @@ export const getUserInfo = () => {
groupsId: 'pub', groupsId: 'pub',
}; };
} }
} };
/* eslint no-useless-escape:0 import/prefer-default-export:0 */ /* eslint no-useless-escape:0 import/prefer-default-export:0 */
import { Modal, Popconfirm, message } from 'antd'; import { Modal, Popconfirm, message } from 'antd';
import { uaaRequest } from '@/webPublic/one_stop_public/utils/request';
const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
...@@ -54,3 +55,14 @@ export const getPopconfirm = () => { ...@@ -54,3 +55,14 @@ export const getPopconfirm = () => {
export const getMessage = () => { export const getMessage = () => {
return isFromIframe() ? window?.parent?.iframeParentComponent?.message : message; return isFromIframe() ? window?.parent?.iframeParentComponent?.message : message;
}; };
export const getOneStopMyInfo = (params = {}) => {
return uaaRequest('/UserApi/getMy', params).then((res) => {
if (res) {
if(!res.groupsId){
res.groupsId = 'pub';
}
localStorage.setItem('user', JSON.stringify(res));
}
});
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论