Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
2e1f5e38
提交
2e1f5e38
authored
4月 14, 2021
作者:
tb53863844
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
开发
上级
285d96cd
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
134 行增加
和
48 行删除
+134
-48
index.jsx
one_stop_public/tableCompon/index.jsx
+133
-47
index2.js
zyd_private/DragAndPrint/ViewPrint/index2.js
+1
-1
没有找到文件。
one_stop_public/tableCompon/index.jsx
浏览文件 @
2e1f5e38
...
...
@@ -24,7 +24,7 @@ import {
Upload
,
Form
,
Table
,
notification
,
Cascader
,
}
from
'antd'
;
import
UUID
from
'react-native-uuid'
;
import
QRCode
from
'qrcode.react'
;
...
...
@@ -445,7 +445,20 @@ export default class tableCom extends Component {
}
},
});
searchJson
=
(
value
,
json
,
level
,
labs
)
=>
{
for
(
var
i
=
0
;
i
<
json
.
length
;
i
++
){
if
(
json
[
i
].
value
==
value
[
level
]){
labs
.
push
(
json
[
i
].
label
)
if
(
json
[
i
].
children
){
this
.
searchJson
(
value
,
json
[
i
].
children
,
level
+
1
,
labs
);
}
break
;
}
}
}
componentWillReceiveProps
(
props
)
{
const
{
json
,
mapData
,
obj
}
=
props
;
if
(
json
==
null
||
this
.
props
.
safe
)
{
...
...
@@ -547,9 +560,10 @@ export default class tableCom extends Component {
}
}
dataFilter
=
[
'Select'
,
'Radio'
,
'Checkbox'
];
dataFilter
=
[
'Select'
,
'Radio'
,
'Checkbox'
,
'Cascader'
];
getData
=
(
json
,
dataColumn
,
obj
,
init
)
=>
{
const
allValues
=
JSON
.
stringify
(
obj
);
if
(
json
.
comName
==
'TableSelect'
)
{
const
{
dispatch
}
=
this
.
props
;
...
...
@@ -663,8 +677,9 @@ export default class tableCom extends Component {
});
}
}
if
(
json
.
optionType
!=
null
&&
this
.
dataFilter
.
includes
(
json
.
comName
))
{
switch
(
json
.
optionType
)
{
case
'reference'
:
if
(
dataColumn
.
referenceObjId
!=
null
)
{
...
...
@@ -699,56 +714,86 @@ export default class tableCom extends Component {
break
;
case
'func'
:
if
(
json
.
funcs
!=
null
&&
json
.
funcs
!=
''
)
{
let
enu
;
try
{
this
.
getFunctionValue
(
json
.
funcs
,
{
base52
:
this
.
props
.
uuid
},
json
,
()
=>
{
if
(
init
!=
null
&&
Object
.
keys
(
init
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
;
let
vlu
=
this
.
props
.
form
.
getFieldValue
(
base52
);
if
(
vlu
instanceof
Array
)
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
))
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
if
(
json
.
comName
==
"Cascader"
){
try
{
this
.
getFunctionValue
(
json
.
funcs
,
{
base52
:
this
.
props
.
uuid
},
json
,
()
=>
{
if
(
init
!=
null
&&
Object
.
keys
(
init
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
;
let
vlu
=
this
.
props
.
form
.
getFieldValue
(
base52
);
const
labs
=
[];
this
.
searchJson
(
vlu
,
this
.
state
.
options
,
0
,
labs
)
this
.
setState
({
labels
:
labs
});
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
;
const
vlu
=
obj
[
base52
];
const
labs
=
[];
this
.
searchJson
(
vlu
,
this
.
state
.
options
,
0
,
labs
)
this
.
setState
({
labels
:
labs
});
}
});
}
catch
(
e
)
{
message
.
error
(
'公式选项配置存在问题'
);
}
}
else
{
try
{
this
.
getFunctionValue
(
json
.
funcs
,
{
base52
:
this
.
props
.
uuid
},
json
,
()
=>
{
if
(
init
!=
null
&&
Object
.
keys
(
init
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
;
let
vlu
=
this
.
props
.
form
.
getFieldValue
(
base52
);
const
labs
=
[];
if
(
vlu
instanceof
Array
)
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
))
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
}
}
}
else
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
==
this
.
state
.
options
[
i
].
value
)
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
break
;
}
}
}
}
else
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
==
this
.
state
.
options
[
i
].
value
)
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
break
;
this
.
setState
({
labels
:
labs
});
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
;
const
vlu
=
obj
[
base52
];
const
labs
=
[];
if
(
vlu
instanceof
Array
)
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
))
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
}
}
}
else
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
==
this
.
state
.
options
[
i
].
value
)
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
break
;
}
}
}
this
.
setState
({
labels
:
labs
});
}
});
}
catch
(
e
)
{
message
.
error
(
'公式选项配置存在问题'
);
}
}
this
.
setState
({
labels
:
labs
});
}
else
if
(
!
this
.
props
.
isEdit
&&
Object
.
keys
(
obj
).
length
>
0
)
{
let
base52
=
dataColumn
.
base52
;
const
vlu
=
obj
[
base52
];
const
labs
=
[];
if
(
vlu
instanceof
Array
)
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
.
includes
(
this
.
state
.
options
[
i
].
value
))
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
}
}
}
else
{
for
(
var
i
=
0
;
i
<
this
.
state
.
options
.
length
;
i
++
)
{
if
(
vlu
==
this
.
state
.
options
[
i
].
value
)
{
labs
.
push
(
this
.
state
.
options
[
i
].
label
);
break
;
}
}
}
this
.
setState
({
labels
:
labs
});
}
});
}
catch
(
e
)
{
message
.
error
(
'公式选项配置存在问题'
);
}
}
break
;
}
...
...
@@ -1195,7 +1240,6 @@ export default class tableCom extends Component {
this
.
props
.
messageData
,
this
.
props
.
concealModel
,
);
if
(
base52
)
{
if
(
value
!=
null
&&
value
==
'norefeshxxxxxxxxxxxxxxxxxxxx'
)
{
}
else
{
...
...
@@ -2042,6 +2086,13 @@ export default class tableCom extends Component {
cm
=
<
span
>
{
labels
!=
null
&&
labels
.
length
>
0
?
Object
.
values
(
labels
[
0
])
:
''
}
</
span
>;
break
;
case
'Cascader'
:
cm
=
<
span
>
{
labels
!=
null
?
labels
.
join
(
json
.
spliter
?
json
.
spliter
:
""
)
:
''
}
</
span
>
break
;
case
'TableSelect'
:
const
ds
=
obj
[
dataColumn
.
base52
]
&&
obj
[
dataColumn
.
base52
].
selects
...
...
@@ -2754,6 +2805,41 @@ export default class tableCom extends Component {
cm
=
<
div
>
{
cm
}
</
div
>;
}
break
;
case
'Cascader'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
rules
:
json
.
vlds
&&
json
.
vlds
.
length
>
0
?
json
.
vlds
:
[{
required
:
required
,
message
:
'请选择'
+
dataColumn
.
title
}],
})(<
Cascader
options=
{
options
}
allowClear
showSearch
disabled=
{
disabled
}
placeholder=
{
json
.
placeholder
}
style=
{
{
width
:
json
.
width
}
}
/>);
if
(
get
===
'mobile'
&&
((
json
.
isMobileLabel
!=
null
&&
json
.
isMobileLabel
)
||
(
json
.
isMobileLabel
==
null
&&
json
.
isLabel
))
&&
title
)
{
cm
=
(
<
MobileItem
isPreview=
{
isPreview
}
labelCol=
{
{
span
:
json
.
labelSpan
}
}
wrapperCol=
{
{
span
:
json
.
wrapperSpan
}
}
label=
{
title
}
>
{
cm
}
</
MobileItem
>
);
}
else
if
(
get
===
'mobile'
)
{
cm
=
<
div
>
{
cm
}
</
div
>;
}
break
;
case
'TableSelect'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
...
...
@@ -2973,7 +3059,7 @@ export default class tableCom extends Component {
}
break
;
case
'RichText'
:
debugger
;
//
debugger;
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
rules
:
...
...
zyd_private/DragAndPrint/ViewPrint/index2.js
浏览文件 @
2e1f5e38
...
...
@@ -256,7 +256,7 @@ export default class ViewPrint extends Component {
name
=
{
'打印设备选择'
}
handleClick
=
{()
=>
{
window
.
LODOP
.
SELECT_PRINTER
();
debugger
;
//
debugger;
this
.
setState
({
preaparePrint
:
true
,
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论