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

24935 请假申请后流程状态没有显示出来

上级 bd12276d
...@@ -32,7 +32,7 @@ export default class Index extends React.Component { ...@@ -32,7 +32,7 @@ export default class Index extends React.Component {
addCondition: [], addCondition: [],
addFields: [], // 新增时填写的字段。 addFields: [], // 新增时填写的字段。
tableInfo: {}, // 表格配置属性 tableInfo: {}, // 表格配置属性
allConfigSetInfo: {}, // getFormDetail 返回的数据 allConfigSetInfo: {}, // 返回的数据
}; };
window.callbackSubmitInfoZhiYong = undefined; window.callbackSubmitInfoZhiYong = undefined;
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
import { apiRequest } from '../request'; import { apiRequest } from '../request';
import { getOneStopConfig, isJSON } from '@/baseComponent/utils'; import { getOneStopConfig, isJSON } from '@/baseComponent/utils';
import { getHistoryFormDetail } from '@/webPublic/Services';
const giveValue = (x) => { const giveValue = (x) => {
if (x && x.rows) { if (x && x.rows) {
...@@ -157,7 +158,7 @@ const getApplyPage = (info) => { ...@@ -157,7 +158,7 @@ const getApplyPage = (info) => {
* */ * */
const getDetailInfo = (id) => { const getDetailInfo = (id) => {
return apiRequest('/UnifiedAppFormApi/getFormDetail', { id }).then((x) => { return getHistoryFormDetail({id}).then((x) => {
if (x) { if (x) {
return x; return x;
} else { } else {
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
import { uaaRequest } from './one_stop_public/utils/request'; import { uaaRequest } from './one_stop_public/utils/request';
import config from '@/config/config'; import config from '@/config/config';
import { message } from 'antd';
import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_public/utils/utils'; import { setOneStopActiveMenusConfig, setOneStopConfig } from '@/webPublic/zyd_public/utils/utils';
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';
// 根据模板code查询模板数据 // 根据模板code查询模板数据
// 查询表格中某条数据 // 查询表格中某条数据
...@@ -27,8 +27,10 @@ export const fetchTemplateByCode = (code) => ...@@ -27,8 +27,10 @@ export const fetchTemplateByCode = (code) =>
uaaRequest('/UnifiedServicePatternApi/getDetail', { code }); uaaRequest('/UnifiedServicePatternApi/getDetail', { code });
export const fetchTemplateById = (id) => export const fetchTemplateById = (id) =>
uaaRequest('/UnifiedAppApi/getDetail', { id }).then((res) => { uaaRequest('/UnifiedAppApi/getDetail', { id })
return prepareShow(res).then((x) => { .then((res) => {
return prepareShow(res)
.then((x) => {
return res; return res;
}); });
}); });
...@@ -40,8 +42,18 @@ export const fetchTemplateById = (id) => ...@@ -40,8 +42,18 @@ export const fetchTemplateById = (id) =>
* @param{String} value 元数据表格中键对应的值 * @param{String} value 元数据表格中键对应的值
* @param{Bool} isBase key是否base加密过,默认传true * @param{Bool} isBase key是否base加密过,默认传true
*/ */
export const fetchTableItem = ({ dataObjId, key, value, isBase = true }) => { export const fetchTableItem = ({
return uaaRequest('/DataObjApi/getFormData', { dataObjId, key, value, isBase }); dataObjId,
key,
value,
isBase = true,
}) => {
return uaaRequest('/DataObjApi/getFormData', {
dataObjId,
key,
value,
isBase,
});
}; };
/** /**
...@@ -51,7 +63,13 @@ export const fetchTableItem = ({ dataObjId, key, value, isBase = true }) => { ...@@ -51,7 +63,13 @@ export const fetchTableItem = ({ dataObjId, key, value, isBase = true }) => {
* @param {Number} pageSize * @param {Number} pageSize
* @param {Number} pageNo * @param {Number} pageNo
*/ */
export const fetchTableData = ({ dataObjId, query, pageSize, pageNo, ...other }) => { export const fetchTableData = ({
dataObjId,
query,
pageSize,
pageNo,
...other
}) => {
return uaaRequest('/DataObjApi/getFormDataPage', { return uaaRequest('/DataObjApi/getFormDataPage', {
dataObjId, dataObjId,
query: JSON.stringify(query), query: JSON.stringify(query),
...@@ -89,7 +107,12 @@ export const deleteTableItem = (objId, primaryKey, value) => { ...@@ -89,7 +107,12 @@ export const deleteTableItem = (objId, primaryKey, value) => {
* @param {Bool} isAdd true是新增,false是编辑 * @param {Bool} isAdd true是新增,false是编辑
* @param {Bool} isBase 数据是否编码过,从模板中出来的数据是编码过,默认true * @param {Bool} isBase 数据是否编码过,从模板中出来的数据是编码过,默认true
*/ */
export const addOrEditTableItem = ({ objId, data, isAdd, isBase = true }) => { export const addOrEditTableItem = ({
objId,
data,
isAdd,
isBase = true,
}) => {
return uaaRequest('/DataObjApi/addFormData', { return uaaRequest('/DataObjApi/addFormData', {
data: JSON.stringify(data), data: JSON.stringify(data),
isAdd, isAdd,
...@@ -103,10 +126,43 @@ export const addOrEditTableItem = ({ objId, data, isAdd, isBase = true }) => { ...@@ -103,10 +126,43 @@ export const addOrEditTableItem = ({ objId, data, isAdd, isBase = true }) => {
* @param {String} id 申报数据的id * @param {String} id 申报数据的id
* @param {String} code 申报数据的code * @param {String} code 申报数据的code
*/ */
export const getHistoryFormDetail = ({ id, code }) => { export const getHistoryFormDetail = (params = {}) => {
return uaaRequest('/UnifiedAppFormApi/getFormDetail', { id, code }); return uaaRequest('/UnifiedAppFormApi/getFormDetail', params)
.then((res) => {
if (res) {
console.log(queryApiVersion());
if (queryApiVersion() === '2.0') { // 2.0的接口 流程日志单独获取
return api2_0_getTaskInfo(params)
.then((res2) => {
return {
...res,
...res2,
};
});
} else {
return res;
}
} else {
return null;
}
}).then((g) => {
console.log(g);
return g;
});
}; };
export const api2_0_getTaskInfo = (params = {}) => {
return uaaRequest('/UnifiedAppFormApi/getFormNextUser', params)
.then((res) => {
if (res) {
return res;
} else {
return {};
}
});
};
export const getTaskDefinition = (data) => { export const getTaskDefinition = (data) => {
return uaaRequest('/UnifiedAppFormApi/getTaskDefinition', data); return uaaRequest('/UnifiedAppFormApi/getTaskDefinition', data);
}; };
...@@ -147,9 +203,12 @@ export function getOneStopActiveMenus(key) { ...@@ -147,9 +203,12 @@ export function getOneStopActiveMenus(key) {
} }
export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value_list') { export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value_list') {
getOneStopActiveMenus().then((res) => {}); getOneStopActiveMenus()
.then((res) => {
});
getOneStopMyInfo({}).then((res) => { getOneStopMyInfo({})
.then((res) => {
if (res) { if (res) {
localStorage.setItem('user', JSON.stringify(res)); localStorage.setItem('user', JSON.stringify(res));
} }
...@@ -159,7 +218,8 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value ...@@ -159,7 +218,8 @@ export function getOnestopKey(key = '', formKey = 'key_list', formValue = 'value
dataObjId: config.onestopConfigDataObjId || '1248169933162938368', dataObjId: config.onestopConfigDataObjId || '1248169933162938368',
pageNo: 1, pageNo: 1,
pageSize: 5000, pageSize: 5000,
}).then((x) => { })
.then((x) => {
if (x && x.rows && x.rows.length) { if (x && x.rows && x.rows.length) {
const onestopConfigList = {}; const onestopConfigList = {};
for (const item of x.rows) { for (const item of x.rows) {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import { uaaRequest } from '../utils/request'; import { uaaRequest } from '../utils/request';
import prepareShow from "@/webPublic/one_stop_public/Table/prepareShow"; import prepareShow from "@/webPublic/one_stop_public/Table/prepareShow";
import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils"; import {deepCopy} from "@/webPublic/one_stop_public/utils/myutils";
import { getHistoryFormDetail } from '@/webPublic/Services';
const api = '/UnifiedAppFormApi'; const api = '/UnifiedAppFormApi';
const myCollect = { const myCollect = {
...@@ -141,7 +142,7 @@ const myCollect = { ...@@ -141,7 +142,7 @@ const myCollect = {
* @param {id} 表单id * @param {id} 表单id
*/ */
*getIdFormDetail({ payload, callback }, { call, put }) { *getIdFormDetail({ payload, callback }, { call, put }) {
const response = yield call(uaaRequest, `${api}/getFormDetail`, { const response = yield call(getHistoryFormDetail, {
...payload, ...payload,
}); });
if (response == null) { if (response == null) {
......
...@@ -133,5 +133,6 @@ export const queryCheckPath = () => queryConfig('CHECK_PATH'); ...@@ -133,5 +133,6 @@ export const queryCheckPath = () => queryConfig('CHECK_PATH');
* @description 获取配置项路由是否需要权限控制 * @description 获取配置项路由是否需要权限控制
* */ * */
export const queryLoginRedirect = () => queryConfig('LOGIN_REDIRECT'); export const queryLoginRedirect = () => queryConfig('LOGIN_REDIRECT');
export const queryApiVersion = () => queryConfig('apiVersion');
export default queryConfig; export default queryConfig;
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论