Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
66bce468
提交
66bce468
authored
3月 10, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
24935 请假申请后流程状态没有显示出来
上级
bd12276d
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
137 行增加
和
74 行删除
+137
-74
index.js
FormInsertDiy/AffairPage/AuditPage/index.js
+1
-1
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+2
-1
Services.js
Services.js
+131
-71
affairModels.js
one_stop_public/models/affairModels.js
+2
-1
queryConfig.js
one_stop_public/utils/queryConfig.js
+1
-0
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/index.js
浏览文件 @
66bce468
...
...
@@ -32,7 +32,7 @@ export default class Index extends React.Component {
addCondition
:
[],
addFields
:
[],
// 新增时填写的字段。
tableInfo
:
{},
// 表格配置属性
allConfigSetInfo
:
{},
//
getFormDetail
返回的数据
allConfigSetInfo
:
{},
// 返回的数据
};
window
.
callbackSubmitInfoZhiYong
=
undefined
;
}
...
...
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
66bce468
...
...
@@ -7,6 +7,7 @@
import
{
apiRequest
}
from
'../request'
;
import
{
getOneStopConfig
,
isJSON
}
from
'@/baseComponent/utils'
;
import
{
getHistoryFormDetail
}
from
'@/webPublic/Services'
;
const
giveValue
=
(
x
)
=>
{
if
(
x
&&
x
.
rows
)
{
...
...
@@ -157,7 +158,7 @@ const getApplyPage = (info) => {
* */
const
getDetailInfo
=
(
id
)
=>
{
return
apiRequest
(
'/UnifiedAppFormApi/getFormDetail'
,
{
id
}).
then
((
x
)
=>
{
return
getHistoryFormDetail
({
id
}).
then
((
x
)
=>
{
if
(
x
)
{
return
x
;
}
else
{
...
...
Services.js
浏览文件 @
66bce468
...
...
@@ -7,10 +7,10 @@
import
{
uaaRequest
}
from
'./one_stop_public/utils/request'
;
import
config
from
'@/config/config'
;
import
{
message
}
from
'antd'
;
import
{
setOneStopActiveMenusConfig
,
setOneStopConfig
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getOneStopConfigList
}
from
'@/webPublic/one_stop_public/publicServices'
;
import
prepareShow
from
'@/webPublic/one_stop_public/Table/prepareShow'
;
import
{
queryApiVersion
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
// 根据模板code查询模板数据
// 查询表格中某条数据
...
...
@@ -24,14 +24,16 @@ import prepareShow from '@/webPublic/one_stop_public/Table/prepareShow';
* @param {String} code 模板的code
*/
export
const
fetchTemplateByCode
=
(
code
)
=>
uaaRequest
(
'/UnifiedServicePatternApi/getDetail'
,
{
code
});
uaaRequest
(
'/UnifiedServicePatternApi/getDetail'
,
{
code
});
export
const
fetchTemplateById
=
(
id
)
=>
uaaRequest
(
'/UnifiedAppApi/getDetail'
,
{
id
}).
then
((
res
)
=>
{
return
prepareShow
(
res
).
then
((
x
)
=>
{
return
res
;
});
});
uaaRequest
(
'/UnifiedAppApi/getDetail'
,
{
id
})
.
then
((
res
)
=>
{
return
prepareShow
(
res
)
.
then
((
x
)
=>
{
return
res
;
});
});
/**
* 查询表格中某条数据
...
...
@@ -40,8 +42,18 @@ export const fetchTemplateById = (id) =>
* @param{String} value 元数据表格中键对应的值
* @param{Bool} isBase key是否base加密过,默认传true
*/
export
const
fetchTableItem
=
({
dataObjId
,
key
,
value
,
isBase
=
true
})
=>
{
return
uaaRequest
(
'/DataObjApi/getFormData'
,
{
dataObjId
,
key
,
value
,
isBase
});
export
const
fetchTableItem
=
({
dataObjId
,
key
,
value
,
isBase
=
true
,
})
=>
{
return
uaaRequest
(
'/DataObjApi/getFormData'
,
{
dataObjId
,
key
,
value
,
isBase
,
});
};
/**
...
...
@@ -51,14 +63,20 @@ export const fetchTableItem = ({ dataObjId, key, value, isBase = true }) => {
* @param {Number} pageSize
* @param {Number} pageNo
*/
export
const
fetchTableData
=
({
dataObjId
,
query
,
pageSize
,
pageNo
,
...
other
})
=>
{
return
uaaRequest
(
'/DataObjApi/getFormDataPage'
,
{
dataObjId
,
query
:
JSON
.
stringify
(
query
),
pageNo
,
pageSize
,
...
other
,
});
export
const
fetchTableData
=
({
dataObjId
,
query
,
pageSize
,
pageNo
,
...
other
})
=>
{
return
uaaRequest
(
'/DataObjApi/getFormDataPage'
,
{
dataObjId
,
query
:
JSON
.
stringify
(
query
),
pageNo
,
pageSize
,
...
other
,
});
};
/**
...
...
@@ -66,7 +84,7 @@ export const fetchTableData = ({ dataObjId, query, pageSize, pageNo, ...other })
* @param {String} objId 元数据id
*/
export
const
fetchTableHeader
=
(
objId
)
=>
uaaRequest
(
'/DataColumnApi/getHeaderList'
,
{
dataObjId
:
objId
});
uaaRequest
(
'/DataColumnApi/getHeaderList'
,
{
dataObjId
:
objId
});
/**
* 删除元数据中的数据
...
...
@@ -75,11 +93,11 @@ export const fetchTableHeader = (objId) =>
* @param {String} value 主键对应的值,删除多条数据时传数组
*/
export
const
deleteTableItem
=
(
objId
,
primaryKey
,
value
)
=>
{
const
copyValue
=
Array
.
isArray
(
value
)
?
value
.
join
(
','
)
:
value
;
return
uaaRequest
(
'/DataObjApi/deleteFormData'
,
{
objId
,
keys
:
JSON
.
stringify
({
[
primaryKey
]:
copyValue
}),
});
const
copyValue
=
Array
.
isArray
(
value
)
?
value
.
join
(
','
)
:
value
;
return
uaaRequest
(
'/DataObjApi/deleteFormData'
,
{
objId
,
keys
:
JSON
.
stringify
({
[
primaryKey
]:
copyValue
}),
});
};
/**
...
...
@@ -89,13 +107,18 @@ export const deleteTableItem = (objId, primaryKey, value) => {
* @param {Bool} isAdd true是新增,false是编辑
* @param {Bool} isBase 数据是否编码过,从模板中出来的数据是编码过,默认true
*/
export
const
addOrEditTableItem
=
({
objId
,
data
,
isAdd
,
isBase
=
true
})
=>
{
return
uaaRequest
(
'/DataObjApi/addFormData'
,
{
data
:
JSON
.
stringify
(
data
),
isAdd
,
objId
,
isBase
,
});
export
const
addOrEditTableItem
=
({
objId
,
data
,
isAdd
,
isBase
=
true
,
})
=>
{
return
uaaRequest
(
'/DataObjApi/addFormData'
,
{
data
:
JSON
.
stringify
(
data
),
isAdd
,
objId
,
isBase
,
});
};
/**
...
...
@@ -103,12 +126,45 @@ export const addOrEditTableItem = ({ objId, data, isAdd, isBase = true }) => {
* @param {String} id 申报数据的id
* @param {String} code 申报数据的code
*/
export
const
getHistoryFormDetail
=
({
id
,
code
})
=>
{
return
uaaRequest
(
'/UnifiedAppFormApi/getFormDetail'
,
{
id
,
code
});
export
const
getHistoryFormDetail
=
(
params
=
{})
=>
{
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
)
=>
{
return
uaaRequest
(
'/UnifiedAppFormApi/getTaskDefinition'
,
data
);
return
uaaRequest
(
'/UnifiedAppFormApi/getTaskDefinition'
,
data
);
};
/**
...
...
@@ -116,7 +172,7 @@ export const getTaskDefinition = (data) => {
* 用于授权
*/
export
const
getAppList
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UnifiedAppApi/getListByTree'
,
params
);
return
uaaRequest
(
'/UnifiedAppApi/getListByTree'
,
params
);
};
/**
...
...
@@ -124,7 +180,7 @@ export const getAppList = (params = {}) => {
* 用于一站式 应用分类列表 tree
*/
export
const
getAppTypeList
=
()
=>
{
return
uaaRequest
(
'/UnifiedAppGroupApi/getList'
,
{});
return
uaaRequest
(
'/UnifiedAppGroupApi/getList'
,
{});
};
/**
...
...
@@ -132,49 +188,53 @@ export const getAppTypeList = () => {
* 用于一站式 应用树形列表 tree
*/
export
const
getListByTreeList
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UnifiedAppApi/getListByTree'
,
params
);
return
uaaRequest
(
'/UnifiedAppApi/getListByTree'
,
params
);
};
export
const
getOneStopMyInfo
=
(
params
=
{})
=>
{
return
uaaRequest
(
'/UserApi/getMy'
,
params
);
return
uaaRequest
(
'/UserApi/getMy'
,
params
);
};
export
function
getOneStopActiveMenus
(
key
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setOneStopActiveMenusConfig
(
''
);
resolve
(
true
);
});
return
new
Promise
((
resolve
,
reject
)
=>
{
setOneStopActiveMenusConfig
(
''
);
resolve
(
true
);
});
}
export
function
getOnestopKey
(
key
=
''
,
formKey
=
'key_list'
,
formValue
=
'value_list'
)
{
getOneStopActiveMenus
().
then
((
res
)
=>
{});
getOneStopMyInfo
({}).
then
((
res
)
=>
{
if
(
res
)
{
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
res
));
}
});
return
fetchTableData
({
dataObjId
:
config
.
onestopConfigDataObjId
||
'1248169933162938368'
,
pageNo
:
1
,
pageSize
:
5000
,
}).
then
((
x
)
=>
{
if
(
x
&&
x
.
rows
&&
x
.
rows
.
length
)
{
const
onestopConfigList
=
{};
for
(
const
item
of
x
.
rows
)
{
onestopConfigList
[
item
[
formKey
]]
=
item
[
formValue
];
}
setOneStopConfig
(
onestopConfigList
);
getOneStopConfigList
();
if
(
key
)
{
return
onestopConfigList
[
key
];
}
}
else
{
console
.
error
(
'没有配置一站式相关服务,无法使用部分功能'
);
return
false
;
}
});
getOneStopActiveMenus
()
.
then
((
res
)
=>
{
});
getOneStopMyInfo
({})
.
then
((
res
)
=>
{
if
(
res
)
{
localStorage
.
setItem
(
'user'
,
JSON
.
stringify
(
res
));
}
});
return
fetchTableData
({
dataObjId
:
config
.
onestopConfigDataObjId
||
'1248169933162938368'
,
pageNo
:
1
,
pageSize
:
5000
,
})
.
then
((
x
)
=>
{
if
(
x
&&
x
.
rows
&&
x
.
rows
.
length
)
{
const
onestopConfigList
=
{};
for
(
const
item
of
x
.
rows
)
{
onestopConfigList
[
item
[
formKey
]]
=
item
[
formValue
];
}
setOneStopConfig
(
onestopConfigList
);
getOneStopConfigList
();
if
(
key
)
{
return
onestopConfigList
[
key
];
}
}
else
{
console
.
error
(
'没有配置一站式相关服务,无法使用部分功能'
);
return
false
;
}
});
}
one_stop_public/models/affairModels.js
浏览文件 @
66bce468
...
...
@@ -6,6 +6,7 @@
import
{
uaaRequest
}
from
'../utils/request'
;
import
prepareShow
from
"@/webPublic/one_stop_public/Table/prepareShow"
;
import
{
deepCopy
}
from
"@/webPublic/one_stop_public/utils/myutils"
;
import
{
getHistoryFormDetail
}
from
'@/webPublic/Services'
;
const
api
=
'/UnifiedAppFormApi'
;
const
myCollect
=
{
...
...
@@ -141,7 +142,7 @@ const myCollect = {
* @param {id} 表单id
*/
*
getIdFormDetail
({
payload
,
callback
},
{
call
,
put
})
{
const
response
=
yield
call
(
uaaRequest
,
`
${
api
}
/getFormDetail`
,
{
const
response
=
yield
call
(
getHistoryFormDetail
,
{
...
payload
,
});
if
(
response
==
null
)
{
...
...
one_stop_public/utils/queryConfig.js
浏览文件 @
66bce468
...
...
@@ -133,5 +133,6 @@ export const queryCheckPath = () => queryConfig('CHECK_PATH');
* @description 获取配置项路由是否需要权限控制
* */
export
const
queryLoginRedirect
=
()
=>
queryConfig
(
'LOGIN_REDIRECT'
);
export
const
queryApiVersion
=
()
=>
queryConfig
(
'apiVersion'
);
export
default
queryConfig
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论