Commit 952a0615 authored by 田翔's avatar 田翔

fix: 防止接口被框架合并参数加时间戳

parent ca6ce6d2
{
"name": "panda-xform",
"version": "5.9.5",
"description": "5.9.5 新增控件转化功能",
"version": "5.9.6",
"description": "5.9.6 防止接口被框架合并参数加时间戳",
"keywords": [
"panda-xform"
],
......
......@@ -147,12 +147,12 @@ export function getGroupAndRole() {
}
//人员选择器获取(三种形态)
export function getUserSelector(role, userID) {
export function getUserSelector(role, userID, time) {
return request({
// headers: {
// 'Civ-Site': window?.globalConfig?.userInfo?.site
// },
url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetUserSelector?${role ? 'role=' + role : ''}${userID ? '&userID=' + userID : ''}`,
url: `/PandaWorkFlow/WorkFlow/WorkFlow/GetUserSelector?time=${time}&${role ? 'role=' + role : ''}${userID ? '&userID=' + userID : ''}`,
method: 'get',
});
}
......
......@@ -99,7 +99,6 @@ const XRender = (props, ref) => {
displayType: schemaForm.displayType === 'column' ? 'column' : 'row',//未知原因出现存储'左右'/'上下'
properties: parentObj
}
console.log('json', json)
setInitField(array)
return json
}, [formJson, values, disabledFields, disabled])
......
......@@ -140,7 +140,8 @@ const UserGroup = (props) => {
const getData = async () => {
setLoading(true)
const { code, data, msg } = await getUserSelector(role, isMySite ? userID : false)
let time = new Date().getTime() + Math.random()
const { code, data, msg } = await getUserSelector(role, isMySite ? userID : false, time)
if (code === 0) {
if (Array.isArray(data.groupList)) {
setGroupPerson(data.groupList)
......
......@@ -18,7 +18,8 @@ const UserSelect = (props) => {
}, [value, isMultiple])
const selectFocus = async () => {
const { code, data, msg } = await getUserSelector(role, isMySite ? userID : false)
let time = new Date().getTime() + Math.random()
const { code, data, msg } = await getUserSelector(role, isMySite ? userID : false, time)
if (code === 0) {
if (data) {
setPullDown(data.dropdownList.map(v => { return { label: v.userName, value: v[property] } }))
......
......@@ -88,7 +88,8 @@ const UserTree = (props) => {
}
const getData = async () => {
const { code, data, msg } = await getUserSelector(role, isMySite ? userID : false)
let time = new Date().getTime() + Math.random()
const { code, data, msg } = await getUserSelector(role, isMySite ? userID : false, time)
if (code === 0) {
setTreeData(data.treeList)
setSelectKeys(value ? value.split(',') : [])
......
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