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

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

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