Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
8ef90099
提交
8ef90099
authored
9月 27, 2021
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
拆分代码
上级
ae872145
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
142 行增加
和
246 行删除
+142
-246
staticInfo.jsx
one_stop_public/tableCompon/Split_Index/staticInfo.jsx
+3
-4
index.jsx
one_stop_public/tableCompon/index.jsx
+139
-242
没有找到文件。
one_stop_public/tableCompon/Split_Index/staticInfo.jsx
浏览文件 @
8ef90099
...
...
@@ -44,9 +44,8 @@ export function getBase64(value) {
return
value
?
base64
.
encode
(
new
Buffer
(
value
))
:
null
;
}
const
excludeKeys
=
[
'defaultValues'
,
''
];
const
equal
=
(
obj1
,
obj2
,
json
,
sqlContent
,
depth
,
props
)
=>
{
const
equal
=
(
obj1
,
obj2
,
json
,
sqlContent
,
depth
,
props
,
excludeKeys
)
=>
{
if
(
obj1
==
null
&&
obj2
!=
null
)
{
return
false
;
}
...
...
@@ -135,7 +134,7 @@ const equal = (obj1, obj2, json, sqlContent, depth, props) => {
var
xx
=
true
;
for
(
var
i
=
0
;
i
<
obj1
[
key
].
length
;
i
++
)
{
if
(
!
equal
(
obj1
[
key
][
i
],
obj2
[
key
][
i
],
json
,
sqlContent
,
depth
+
1
))
{
if
(
!
equal
(
obj1
[
key
][
i
],
obj2
[
key
][
i
],
json
,
sqlContent
,
depth
+
1
,
props
,
excludeKeys
))
{
xx
=
false
;
break
;
}
...
...
@@ -147,7 +146,7 @@ const equal = (obj1, obj2, json, sqlContent, depth, props) => {
}
}
}
else
if
(
obj1
[
key
]
instanceof
Object
)
{
const
x
=
equal
(
obj1
[
key
],
obj2
[
key
],
json
,
sqlContent
,
depth
+
1
);
const
x
=
equal
(
obj1
[
key
],
obj2
[
key
],
json
,
sqlContent
,
depth
+
1
,
props
,
excludeKeys
);
if
(
!
x
)
{
res
=
false
;
...
...
one_stop_public/tableCompon/index.jsx
浏览文件 @
8ef90099
...
...
@@ -57,13 +57,14 @@ import { formulaList } from '../excelInitFuc/functionList';
import
FilePreview
from
'../filePreview'
;
import
DraftEditorCom
from
'../App/DraftEditorCom'
;
import
MobileItem
from
'./MobileItem'
;
import
MobileCascader
from
'./CascaderDiy/MobileCascader'
;
import
MobileCascader
from
"./CascaderDiy/MobileCascader"
;
import
{
errorHandler
,
getBase64
,
equal
,
getRender
,
isJSON
}
from
'./Split_Index/staticInfo'
;
const
{
TextArea
}
=
Input
;
const
{
Option
}
=
Select
;
const
{
RangePicker
}
=
DatePicker
;
@
connect
(({
DataColumn
,
SqlManageEntity
,
formList
,
loading
})
=>
({
DataColumn
,
SqlManageEntity
,
...
...
@@ -96,6 +97,7 @@ export default class tableCom extends Component {
pagination
:
false
,
},
};
this
.
excludeKeys
=
[
'defaultValues'
,
''
];
}
closeModal
=
(
fk
,
callback
)
=>
{
...
...
@@ -108,7 +110,6 @@ export default class tableCom extends Component {
callback
:
callback
,
});
};
showModal
=
(
fk
,
title
,
data
,
modalProps
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
x
=
this
.
props
.
DataColumn
.
isShowModal
;
...
...
@@ -134,7 +135,7 @@ export default class tableCom extends Component {
file
=
{
name
:
'file'
,
action
:
queryApiActionPath
()
+
'/upload'
,
onChange
:
info
=>
{
onChange
:
(
info
)
=>
{
if
(
info
.
file
.
status
!==
'uploading'
)
{
this
.
setState
({
img
:
info
.
file
.
response
,
...
...
@@ -155,7 +156,7 @@ export default class tableCom extends Component {
this
.
setState
({
searchText
:
selectedKeys
[
0
]
});
};
handleReset
=
clearFilters
=>
{
handleReset
=
(
clearFilters
)
=>
{
clearFilters
();
this
.
resetSearchText
();
};
...
...
@@ -170,12 +171,12 @@ export default class tableCom extends Component {
filterDropdown
:
({
setSelectedKeys
,
selectedKeys
,
confirm
,
clearFilters
})
=>
(
<
div
style=
{
{
padding
:
8
}
}
>
<
Input
ref=
{
node
=>
{
ref=
{
(
node
)
=>
{
this
.
searchInput
=
node
;
}
}
placeholder=
{
`请输入${title}`
}
value=
{
selectedKeys
[
0
]
}
onChange=
{
e
=>
setSelectedKeys
(
e
.
target
.
value
?
[
e
.
target
.
value
]
:
[])
}
onChange=
{
(
e
)
=>
setSelectedKeys
(
e
.
target
.
value
?
[
e
.
target
.
value
]
:
[])
}
onPressEnter=
{
()
=>
this
.
handleSearch
(
selectedKeys
,
confirm
)
}
style=
{
{
width
:
188
,
marginBottom
:
8
,
display
:
'block'
}
}
/>
...
...
@@ -185,21 +186,21 @@ export default class tableCom extends Component {
icon=
"search"
loading=
{
this
.
props
.
loading
}
size=
"small"
style=
{
{
width
:
90
,
marginRight
:
8
}
}
>
style=
{
{
width
:
90
,
marginRight
:
8
}
}
>
搜索
</
Button
>
<
Button
loading=
{
this
.
props
.
loading
}
onClick=
{
()
=>
this
.
handleReset
(
clearFilters
)
}
size=
"small"
style=
{
{
width
:
90
}
}
>
style=
{
{
width
:
90
}
}
>
重置
</
Button
>
</
div
>
),
filterIcon
:
filtered
=>
<
Icon
type=
"search"
style=
{
{
color
:
filtered
?
'#1890ff'
:
'red'
}
}
/>,
filterIcon
:
(
filtered
)
=>
(
<
Icon
type=
"search"
style=
{
{
color
:
filtered
?
'#1890ff'
:
'red'
}
}
/>
),
onFilter
:
(
value
,
record
)
=>
record
[
dataIndex
]
?
record
[
dataIndex
]
...
...
@@ -207,12 +208,12 @@ export default class tableCom extends Component {
.
toLowerCase
()
.
includes
(
value
.
toLowerCase
())
:
''
,
onFilterDropdownVisibleChange
:
visible
=>
{
onFilterDropdownVisibleChange
:
(
visible
)
=>
{
if
(
visible
)
{
setTimeout
(()
=>
this
.
searchInput
.
select
());
}
},
render
:
text
=>
{
render
:
(
text
)
=>
{
if
(
text
!=
null
)
{
return
(
<
Highlighter
...
...
@@ -260,14 +261,14 @@ export default class tableCom extends Component {
return
;
}
const
obj2
=
props
.
form
.
getFieldsValue
();
const
bb
=
equal
(
this
.
obj
,
obj2
,
json
,
this
.
state
.
sqlContent
,
1
,
this
.
props
);
const
bb
=
equal
(
this
.
obj
,
obj2
,
json
,
this
.
state
.
sqlContent
,
1
,
this
.
props
,
this
.
excludeKeys
);
let
bb2
=
true
;
let
childObj2
=
{};
if
(
props
.
fatherCode
)
{
if
(
obj2
!=
null
&&
obj2
[
props
.
fatherCode
])
{
childObj2
=
obj2
[
props
.
fatherCode
][
props
.
index
];
bb2
=
equal
(
this
.
childObj
,
childObj2
,
json
,
this
.
state
.
sqlContent
,
1
,
this
.
props
);
bb2
=
equal
(
this
.
childObj
,
childObj2
,
json
,
this
.
state
.
sqlContent
,
1
,
this
.
props
,
this
.
excludeKeys
);
}
}
...
...
@@ -352,13 +353,13 @@ export default class tableCom extends Component {
dispatch
({
type
:
'SqlManageEntity/find'
,
payload
:
{
sqlKey
:
sqlKey
},
callback
:
sqlModel
=>
{
callback
:
(
sqlModel
)
=>
{
this
.
setState
({
sqlModel
});
if
(
sqlModel
.
dataObjId
)
{
dispatch
({
type
:
'formList/getHead'
,
payload
:
{
dataObjId
:
sqlModel
.
dataObjId
},
callback
:
datas
=>
{
callback
:
(
datas
)
=>
{
if
(
datas
)
{
const
columns
=
[];
for
(
var
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
...
...
@@ -369,7 +370,7 @@ export default class tableCom extends Component {
if
(
[
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
)
)
{
column
.
render
=
val
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
column
.
render
=
(
val
)
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
columns
.
push
(
column
);
}
else
{
...
...
@@ -403,7 +404,7 @@ export default class tableCom extends Component {
break
;
}
column
.
render
=
val
=>
moment
(
parseInt
(
val
)).
format
(
ff
);
column
.
render
=
(
val
)
=>
moment
(
parseInt
(
val
)).
format
(
ff
);
}
if
(
cll
[
k
].
isQuery
)
{
column
=
{
...
...
@@ -420,7 +421,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getSqlData'
,
payload
:
{
sqlKey
,
allValues
},
callback
:
list
=>
{
callback
:
(
list
)
=>
{
const
x
=
{
list
:
list
,
pagination
:
false
,
...
...
@@ -435,7 +436,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'formList/getHead'
,
payload
:
{
dataObjId
:
dataColumn
.
referenceObjId
},
callback
:
datas
=>
{
callback
:
(
datas
)
=>
{
if
(
datas
)
{
const
columns
=
[];
for
(
var
i
=
0
;
i
<
datas
.
length
;
i
++
)
{
...
...
@@ -444,7 +445,7 @@ export default class tableCom extends Component {
column
.
title
=
datas
[
i
].
title
;
column
.
dataIndex
=
datas
[
i
].
name
;
if
([
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
))
{
column
.
render
=
val
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
column
.
render
=
(
val
)
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
columns
.
push
(
column
);
}
else
{
...
...
@@ -629,16 +630,8 @@ export default class tableCom extends Component {
if
(
json
.
optionType
&&
json
.
optionType
==
'func'
)
{
const
res
=
callback
(
data
);
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
)
// && res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
// console.table(res);
this
.
setState
({
options
:
res
,
selectDis
:
false
,
},
()
=>
{
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
))
{
this
.
setState
({
options
:
res
,
selectDis
:
false
},
()
=>
{
if
(
orgCallback
)
orgCallback
();
});
}
...
...
@@ -712,28 +705,20 @@ export default class tableCom extends Component {
data
:
requestParams
,
method
:
method
,
requestType
:
'form'
,
}).
then
(
data
=>
{
}).
then
(
(
data
)
=>
{
// if (!data || !Array.isArray(data)) {
// data = [];
// }
const
{
reqUrls
}
=
this
.
state
;
if
(
reqUrls
&&
reqUrls
[
url
])
{
if
(
reqUrls
&&
reqUrls
[
url
])
{
reqUrls
[
url
].
data
=
data
;
}
this
.
setState
({
res
:
data
,
reqUrls
},
()
=>
{
if
(
callback
)
{
if
(
json
.
optionType
&&
json
.
optionType
==
'func'
)
{
const
res
=
callback
(
data
);
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
)
//&& res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
// console.table(res);
this
.
setState
({
options
:
res
,
selectDis
:
false
,
},
()
=>
{
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
))
{
this
.
setState
({
options
:
res
,
selectDis
:
false
},
()
=>
{
if
(
orgCallback
)
orgCallback
();
});
}
...
...
@@ -781,32 +766,30 @@ export default class tableCom extends Component {
}
});
});
return
'norefeshxxxxxxxxxxxxxxxxxxxx'
;
};
sqlUtil
=
(
base52
,
json
,
orgCallback
,
sqlKey
,
params
,
callback
,
options
=
{})
=>
{
//查缓存
var
isChange
=
false
;
const
{
sqlKeys
}
=
this
.
state
;
if
(
sqlKeys
[
sqlKey
]
!=
null
)
{
const
ps
=
sqlKeys
[
sqlKey
].
params
;
// []
const
ps
=
sqlKeys
[
sqlKey
].
params
;
if
(
params
.
length
!==
ps
.
length
)
{
// 长度不想等 直接更新
if
(
params
.
length
!=
ps
.
length
)
{
isChange
=
true
;
}
else
{
for
(
var
i
=
0
;
i
<
params
.
length
;
i
++
)
{
if
(
params
[
i
]
!=
ps
[
i
])
{
// 某一个不相等 直接更新
isChange
=
true
;
break
;
}
}
}
if
(
!
isChange
)
{
const
os
=
sqlKeys
[
sqlKey
].
options
;
// {}
if
(
Object
.
keys
(
options
).
length
!==
Object
.
keys
(
os
).
length
)
{
// {}
const
os
=
sqlKeys
[
sqlKey
].
options
;
if
(
Object
.
keys
(
options
).
length
!=
Object
.
keys
(
os
).
length
)
{
isChange
=
true
;
}
else
{
for
(
var
k
in
options
)
{
...
...
@@ -818,32 +801,20 @@ export default class tableCom extends Component {
}
}
}
else
{
sqlKeys
[
sqlKey
]
=
{
params
,
options
};
sqlKeys
[
sqlKey
]
=
{
params
:
params
,
options
:
options
};
isChange
=
true
;
}
if
(
!
isChange
)
{
if
(
callback
)
{
const
data
=
sqlKeys
[
sqlKey
].
data
;
// Array[8]; options
if
(
json
.
optionType
&&
json
.
optionType
==
=
'func'
)
{
const
data
=
sqlKeys
[
sqlKey
].
data
;
if
(
json
.
optionType
&&
json
.
optionType
==
'func'
)
{
const
res
=
callback
(
data
);
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
)
// && res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
// console.log(res);
this
.
setState
(
{
options
:
res
,
selectDis
:
false
,
},
()
=>
{
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
))
{
this
.
setState
({
options
:
res
,
selectDis
:
false
},
()
=>
{
if
(
orgCallback
)
orgCallback
();
},
);
});
}
}
else
if
(
json
.
comName
==
=
'Button'
)
{
}
else
if
(
json
.
comName
==
'Button'
)
{
try
{
callback
(
data
);
}
catch
(
e
)
{
...
...
@@ -853,7 +824,11 @@ export default class tableCom extends Component {
e
,
);
}
}
else
if
([
'Echart'
,
'QRCode'
,
'Graph'
].
includes
(
json
.
comName
))
{
}
else
if
(
json
.
comName
==
'Echart'
||
json
.
comName
==
'QRCode'
||
json
.
comName
==
'Graph'
)
{
try
{
const
x
=
callback
(
data
);
if
(
x
!=
null
)
{
...
...
@@ -906,7 +881,7 @@ export default class tableCom extends Component {
data
:
pp
,
method
:
'POST'
,
requestType
:
'form'
,
}).
then
(
data
=>
{
}).
then
(
(
data
)
=>
{
const
{
sqlKeys
}
=
this
.
state
;
sqlKeys
[
sqlKey
].
data
=
data
;
this
.
setState
({
sqlKeys
});
...
...
@@ -917,14 +892,9 @@ export default class tableCom extends Component {
if
(
callback
)
{
if
(
json
.
optionType
&&
json
.
optionType
==
'func'
)
{
const
res
=
callback
(
data
);
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
)
// && res !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
// console.log(res);
this
.
setState
({
options
:
res
,
selectDis
:
false
,
},
()
=>
{
if
(
res
!=
null
&&
!
(
typeof
res
===
'function'
))
{
this
.
setState
({
options
:
res
,
selectDis
:
false
},
()
=>
{
if
(
orgCallback
)
orgCallback
();
});
}
...
...
@@ -972,6 +942,7 @@ export default class tableCom extends Component {
}
});
});
return
'norefeshxxxxxxxxxxxxxxxxxxxx'
;
};
...
...
@@ -984,8 +955,8 @@ export default class tableCom extends Component {
* 动态生成表单配置函数所使用
*/
let
functionObj
=
{};
formulaList
.
map
(
item
=>
{
item
.
children
.
map
(
arr
=>
{
formulaList
.
map
(
(
item
)
=>
{
item
.
children
.
map
(
(
arr
)
=>
{
functionObj
[
arr
.
callKey
]
=
arr
.
function
;
});
});
...
...
@@ -1059,26 +1030,19 @@ export default class tableCom extends Component {
this
.
props
.
concealModel
,
);
if
(
base52
)
{
if
(
value
===
'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{}
else
{
if
(
value
!=
null
&&
value
==
'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
}
else
{
/**
* 会出现重复调用2次,然后NAN造成无限循环
*/
if
(
isNaN
(
value
))
{
return
;
}
if
(
json
.
comName
==
=
'Button'
)
{
if
(
json
.
comName
==
'Button'
)
{
return
value
;
}
else
if
(
json
.
optionType
&&
json
.
optionType
===
'func'
)
{
if
(
value
!=
null
&&
!
(
typeof
value
===
'function'
)
// && value !== 'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
// console.log(value);
this
.
setState
({
options
:
value
,
selectDis
:
false
,
},
()
=>
{
}
else
if
(
json
.
optionType
&&
json
.
optionType
==
'func'
)
{
if
(
value
!=
null
&&
!
(
typeof
value
===
'function'
))
{
this
.
setState
({
options
:
value
,
selectDis
:
false
},
()
=>
{
if
(
callback
)
callback
();
});
}
...
...
@@ -1087,9 +1051,7 @@ export default class tableCom extends Component {
json
.
comName
==
'QRCode'
||
json
.
comName
==
'Graph'
)
{
this
.
setState
({
option
:
value
,
});
this
.
setState
({
option
:
value
});
}
else
{
try
{
this
.
props
.
form
.
setFieldsValue
({
[
base52
]:
value
});
...
...
@@ -1122,7 +1084,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'SqlManageEntity/find'
,
payload
:
{
sqlKey
:
json
.
sqlKey
},
callback
:
res
=>
{
callback
:
(
res
)
=>
{
this
.
setState
({
sqlContent
:
res
.
sql
});
},
});
...
...
@@ -1163,7 +1125,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getSqlOptions'
,
payload
:
{
sqlKey
,
allValues
},
callback
:
options
=>
{
callback
:
(
options
)
=>
{
const
optionsx
=
[];
let
base52
=
dataColumn
.
base52
;
let
vl
=
this
.
props
.
form
.
getFieldsValue
()[
base52
];
...
...
@@ -1181,10 +1143,7 @@ export default class tableCom extends Component {
if
(
!
isExist
&&
vl
!=
null
&&
options
.
length
>
0
)
{
this
.
props
.
form
.
setFieldsValue
({
[
base52
]:
null
});
}
// console.log(optionsx);
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
});
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
});
},
});
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
...
...
@@ -1197,11 +1156,8 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getSqlLabels'
,
payload
:
{
sqlKey
,
values
:
obj
[
base52
],
labelName
,
valueName
,
allValues
},
callback
:
labels
=>
{
this
.
setState
({
labels
,
selectDis
:
false
,
});
callback
:
(
labels
)
=>
{
this
.
setState
({
labels
,
selectDis
:
false
});
},
});
}
...
...
@@ -1209,7 +1165,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getSqlOptions'
,
payload
:
{
sqlKey
,
allValues
},
callback
:
options
=>
{
callback
:
(
options
)
=>
{
let
base52
=
dataColumn
.
base52
;
let
vl
=
this
.
props
.
form
.
getFieldsValue
()[
base52
];
const
optionsx
=
[];
...
...
@@ -1228,11 +1184,8 @@ export default class tableCom extends Component {
//console.log("isExist",optionsx,vl,isExist)
this
.
props
.
form
.
setFieldsValue
({
[
base52
]:
null
});
}
// console.log(optionsx);
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
,
});
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
});
},
});
}
...
...
@@ -1259,15 +1212,9 @@ export default class tableCom extends Component {
}
}
this
.
setState
({
labels
,
selectDis
:
false
,
});
this
.
setState
({
labels
:
labels
,
selectDis
:
false
});
}
else
{
// console.log(options);
this
.
setState
({
options
,
selectDis
:
false
});
this
.
setState
({
options
:
options
,
selectDis
:
false
});
}
};
fetchData
=
(
obj
,
dataColumn
,
init
,
filterSql
,
allValues
)
=>
{
...
...
@@ -1277,7 +1224,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getOptions'
,
payload
:
{
id
:
dataColumn
.
id
,
filterSql
,
allValues
},
callback
:
options
=>
{
callback
:
(
options
)
=>
{
const
optionsx
=
[];
for
(
var
i
=
0
;
i
<
options
.
length
;
i
++
)
{
optionsx
.
push
({
...
...
@@ -1285,11 +1232,7 @@ export default class tableCom extends Component {
value
:
options
[
i
][
dataColumn
.
referenceCodeName
],
});
}
// console.log(optionsx);
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
,
});
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
});
},
});
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
...
...
@@ -1297,11 +1240,8 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getLabels'
,
payload
:
{
id
:
dataColumn
.
id
,
values
:
obj
[
dataColumn
.
base52
],
filterSql
,
allValues
},
callback
:
labels
=>
{
this
.
setState
({
labels
,
selectDis
:
false
,
});
callback
:
(
labels
)
=>
{
this
.
setState
({
labels
,
selectDis
:
false
});
},
});
}
...
...
@@ -1309,7 +1249,7 @@ export default class tableCom extends Component {
dispatch
({
type
:
'DataColumn/getOptions'
,
payload
:
{
id
:
dataColumn
.
id
,
filterSql
,
allValues
},
callback
:
options
=>
{
callback
:
(
options
)
=>
{
const
optionsx
=
[];
for
(
var
i
=
0
;
i
<
options
.
length
;
i
++
)
{
optionsx
.
push
({
...
...
@@ -1317,16 +1257,12 @@ export default class tableCom extends Component {
value
:
options
[
i
][
dataColumn
.
referenceCodeName
],
});
}
// console.log(optionsx);
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
,
});
this
.
setState
({
options
:
optionsx
,
selectDis
:
false
});
},
});
}
};
getColumn
=
key
=>
{
getColumn
=
(
key
)
=>
{
let
{
mapData
,
json
}
=
this
.
props
;
const
columnIds
=
json
.
columnIds
;
...
...
@@ -1480,8 +1416,7 @@ export default class tableCom extends Component {
fontWeight
:
get
==
'mobile'
?
'bold'
:
''
,
marginRight
:
get
==
'mobile'
?
12
:
''
,
}
}
{
...
json
.
props
}
>
{
...
json
.
props
}
>
{
obj
[
this
.
props
.
uuid
]
||
json
.
initialValue
}
</
span
>
</>
...
...
@@ -1497,8 +1432,7 @@ export default class tableCom extends Component {
fontWeight
:
get
==
'mobile'
?
'bold'
:
''
,
marginRight
:
get
==
'mobile'
?
12
:
''
,
}
}
{
...
json
.
props
}
>
{
...
json
.
props
}
>
{
this
.
props
.
form
.
getFieldsValue
()[
uid
]
}
</
span
>
</>
...
...
@@ -1652,8 +1586,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -1664,8 +1597,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
{
cm
}
</
MobileItem
>
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
...
...
@@ -1697,8 +1629,7 @@ export default class tableCom extends Component {
style=
{
{
minHeight
:
40
,
lineHeight
:
'40px'
,
}
}
>
}
}
>
<
Col
className=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
styles
.
row_col_div
:
''
}
span=
{
json
.
labelSpan
}
...
...
@@ -1709,8 +1640,7 @@ export default class tableCom extends Component {
overflow
:
'hidden'
,
fontSize
:
14
,
color
:
'rgba(0,0,0,0.85)'
,
}
}
>
}
}
>
{
json
.
label
?
(
<>
{
json
.
label
}
...
...
@@ -1719,8 +1649,7 @@ export default class tableCom extends Component {
position
:
'relative'
,
top
:
'-0.5px'
,
margin
:
'0 8px 0 2px'
,
}
}
>
}
}
>
:
</
span
>
</>
...
...
@@ -1732,8 +1661,7 @@ export default class tableCom extends Component {
position
:
'relative'
,
top
:
'-0.5px'
,
margin
:
'0 8px 0 2px'
,
}
}
>
}
}
>
:
</
span
>
</>
...
...
@@ -1748,8 +1676,7 @@ export default class tableCom extends Component {
lineHeight
:
'40px'
,
zoom
:
1
,
fontSize
:
14
,
}
}
>
}
}
>
{
cm
}
</
Col
>
</
Row
>
...
...
@@ -1759,8 +1686,7 @@ export default class tableCom extends Component {
<
Form
.
Item
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
{
cm
}
</
Form
.
Item
>
);
...
...
@@ -1771,8 +1697,7 @@ export default class tableCom extends Component {
<
Form
.
Item
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
label=
{
json
.
label
?
json
.
label
:
sqlData
[
key
]
?
sqlData
[
key
].
title
:
''
}
>
{
cm
}
</
Form
.
Item
>
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
...
...
@@ -1875,8 +1800,7 @@ export default class tableCom extends Component {
<
span
style=
{
{
wordBreak
:
'break-all'
,
}
}
>
}
}
>
{
obj
[
dataColumn
.
base52
]
}
</
span
>
);
...
...
@@ -1890,8 +1814,7 @@ export default class tableCom extends Component {
<
span
style=
{
{
wordBreak
:
'break-all'
,
}
}
>
}
}
>
{
obj
[
dataColumn
.
base52
]
}
</
span
>
);
...
...
@@ -1920,7 +1843,8 @@ export default class tableCom extends Component {
cm
=
(
<
span
>
{
labels
!=
null
?
labels
.
map
((
r
,
i
)
=>
?
labels
.
map
(
(
r
,
i
)
=>
i
==
0
?
(
typeof
r
==
'string'
?
(
<
span
>
{
r
}
</
span
>
...
...
@@ -2097,8 +2021,7 @@ export default class tableCom extends Component {
<
a
target=
"_blank"
key=
{
f
.
filePath
}
href=
{
queryApiActionPath
()
+
f
.
filePath
}
>
href=
{
queryApiActionPath
()
+
f
.
filePath
}
>
{
f
.
fileName
}
</
a
>
</
li
>
...
...
@@ -2369,8 +2292,7 @@ export default class tableCom extends Component {
<
Form
.
Item
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
Form
.
Item
>
);
...
...
@@ -2411,15 +2333,14 @@ export default class tableCom extends Component {
: [
{
required
:
required
,
message
:
'请选择'
+
title
}
],
})}
disabled=
{
disabled
}
onClick=
{
checked
=>
{
onClick=
{
(
checked
)
=>
{
// set new value
this
.
props
.
form
.
setFieldsValue
({
[
dataColumn
.
base52
]:
checked
,
});
}
}
/
>
}
>
}
>
{
(
json
.
isMobileLabel
!=
null
&&
json
.
isMobileLabel
)
||
(
json
.
isMobileLabel
==
null
&&
json
.
isLabel
)
?
title
...
...
@@ -2476,8 +2397,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2518,8 +2438,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2550,8 +2469,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2586,8 +2504,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2606,8 +2523,6 @@ export default class tableCom extends Component {
break
;
case
'Select'
:
// console.table(selectDis, disabled);
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
rules
:
...
...
@@ -2634,7 +2549,7 @@ export default class tableCom extends Component {
?
setTimeout
(()
=>
{
if
(
document
.
querySelectorAll
(
`.ant-select-search__field`
).
length
>
0
)
{
let
ary
=
[...
document
.
querySelectorAll
(
`.ant-select-search__field`
)];
ary
.
map
(
item
=>
{
ary
.
map
((
item
)
=>
{
item
.
setAttribute
(
'readonly'
,
'readonly'
);
// setTimeout(() =>
{
// ary.map(arr =>
{
...
...
@@ -2650,10 +2565,9 @@ export default class tableCom extends Component {
option
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
:
false
}
>
}
>
{
options
&&
options
instanceof
Array
?
options
.
map
(
r
=>
(
?
options
.
map
(
(
r
)
=>
(
<
Option
key=
{
r
.
value
}
value=
{
r
.
value
}
>
{
r
.
label
}
</
Option
>
...
...
@@ -2672,8 +2586,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2708,14 +2621,20 @@ export default class tableCom extends Component {
style=
{
{
width
:
json
.
width
}
}
/>,
);
if
(
get
===
'mobile'
)
{
if
(
get
===
'mobile'
)
{
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
rules
:
json
.
vlds
&&
json
.
vlds
.
length
>
0
?
json
.
vlds
:
[{
required
:
required
,
message
:
'请选择'
+
dataColumn
.
title
}],
})(<
MobileCascader
options=
{
options
}
label=
{
title
}
disabled=
{
disabled
}
json=
{
json
}
/>);
})(
<
MobileCascader
options=
{
options
}
label=
{
title
}
disabled=
{
disabled
}
json=
{
json
}
/>);
}
if
(
...
...
@@ -2729,8 +2648,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2786,8 +2704,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2836,8 +2753,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2909,8 +2825,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2924,6 +2839,7 @@ export default class tableCom extends Component {
files
=
initValue
.
files
;
}
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
{
files
:
files
},
rules
:
[
...
...
@@ -2940,8 +2856,7 @@ export default class tableCom extends Component {
},
],
})(
<
UploadCom
isMultiple=
{
json
.
isMultiple
}
<
UploadCom
isMultiple=
{
json
.
isMultiple
}
accept=
{
json
.
accept
}
btnName=
{
json
.
btnName
}
disabled=
{
disabled
||
isPreview
}
...
...
@@ -2958,8 +2873,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -2984,8 +2898,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -3028,14 +2941,14 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
}
break
;
case
'ChildForm'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
||
{}
})(
<
ChildForm
taskId=
{
this
.
props
.
taskId
}
...
...
@@ -3075,8 +2988,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -3101,8 +3013,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -3127,8 +3038,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -3162,8 +3072,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
...
...
@@ -3207,8 +3116,7 @@ export default class tableCom extends Component {
{
...
modalProps
}
visible=
{
this
.
props
.
DataColumn
.
isShowModal
[
modalCode
]
}
handleCancel=
{
this
.
closeModal
.
bind
(
this
,
modalCode
)
}
title=
{
modalTitle
}
>
title=
{
modalTitle
}
>
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
taskAssignee=
{
taskAssignee
}
...
...
@@ -3245,8 +3153,7 @@ export default class tableCom extends Component {
style=
{
{
minHeight
:
40
,
lineHeight
:
'40px'
,
}
}
>
}
}
>
<
Col
className=
{
title
?
styles
.
row_col_div
:
''
}
span=
{
json
.
labelSpan
}
...
...
@@ -3257,8 +3164,7 @@ export default class tableCom extends Component {
overflow
:
'hidden'
,
fontSize
:
14
,
color
:
'rgba(0,0,0,0.85)'
,
}
}
>
}
}
>
{
title
}
{
title
&&
(
<
span
...
...
@@ -3266,8 +3172,7 @@ export default class tableCom extends Component {
position
:
'relative'
,
top
:
'-0.5px'
,
margin
:
'0 8px 0 2px'
,
}
}
>
}
}
>
:
</
span
>
)
}
...
...
@@ -3279,8 +3184,7 @@ export default class tableCom extends Component {
lineHeight
:
'40px'
,
zoom
:
1
,
fontSize
:
14
,
}
}
>
}
}
>
{
cm
}
</
Col
>
{
modalCode
?
(
...
...
@@ -3288,8 +3192,7 @@ export default class tableCom extends Component {
{
...
modalProps
}
visible=
{
this
.
props
.
DataColumn
.
isShowModal
[
modalCode
]
}
handleCancel=
{
this
.
closeModal
.
bind
(
this
,
modalCode
)
}
title=
{
modalTitle
}
>
title=
{
modalTitle
}
>
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
taskAssignee=
{
taskAssignee
}
...
...
@@ -3324,8 +3227,7 @@ export default class tableCom extends Component {
{
...
modalProps
}
visible=
{
this
.
props
.
DataColumn
.
isShowModal
[
modalCode
]
}
handleCancel=
{
this
.
closeModal
.
bind
(
this
,
modalCode
)
}
title=
{
modalTitle
}
>
title=
{
modalTitle
}
>
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
taskAssignee=
{
taskAssignee
}
...
...
@@ -3353,8 +3255,7 @@ export default class tableCom extends Component {
<
Form
.
Item
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
Form
.
Item
>
</>
...
...
@@ -3368,8 +3269,7 @@ export default class tableCom extends Component {
{
...
modalProps
}
visible=
{
this
.
props
.
DataColumn
.
isShowModal
[
modalCode
]
}
handleCancel=
{
this
.
closeModal
.
bind
(
this
,
modalCode
)
}
title=
{
modalTitle
}
>
title=
{
modalTitle
}
>
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
taskAssignee=
{
taskAssignee
}
...
...
@@ -3406,8 +3306,7 @@ export default class tableCom extends Component {
{
...
modalProps
}
visible=
{
this
.
props
.
DataColumn
.
isShowModal
[
modalCode
]
}
handleCancel=
{
this
.
closeModal
.
bind
(
this
,
modalCode
)
}
title=
{
modalTitle
}
>
title=
{
modalTitle
}
>
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
taskAssignee=
{
taskAssignee
}
...
...
@@ -3437,8 +3336,7 @@ export default class tableCom extends Component {
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
MobileItem
>
)
:
isEdit
&&
get
==
'web'
?
(
...
...
@@ -3446,8 +3344,7 @@ export default class tableCom extends Component {
<
Form
.
Item
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
label=
{
title
}
>
{
cm
}
</
Form
.
Item
>
)
:
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论