Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
9ff5a504
提交
9ff5a504
authored
2月 17, 2023
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化代码
上级
3d131ce3
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
140 行增加
和
132 行删除
+140
-132
CheckRecord.js
FormInsertDiy/ExportComponent/CheckRecord.js
+0
-1
splitDetailSplit.js
one_stop_public/DetailForAudit/splitDetailSplit.js
+4
-1
prepareShow.js
one_stop_public/Table/prepareShow.js
+1
-1
ChildForm.jsx
one_stop_public/libs/ChildForm.jsx
+1
-1
EditDrawer.js
zyd_public/components/lowCodeEdit/EditDrawer.js
+134
-128
没有找到文件。
FormInsertDiy/ExportComponent/CheckRecord.js
浏览文件 @
9ff5a504
...
...
@@ -15,7 +15,6 @@ function OtherCheckRecord({ workId, ...otherProps }) {
const
id
=
workId
||
getOneStopConfig
(
pathname
);
useEffect
(()
=>
{
setData
(
undefined
);
console
.
log
(
id
);
fetchTemplateById
(
id
).
then
(
res
=>
{
if
(
res
)
setData
({
...
res
,
content
:
'{}'
});
});
...
...
one_stop_public/DetailForAudit/splitDetailSplit.js
浏览文件 @
9ff5a504
...
...
@@ -44,6 +44,9 @@ const checkNeedWriteAuditInfo = ({ btns, btnValue }) => {
return
needWrite
;
};
/**
* 流程审批 提交数据
* */
const
submitValues
=
({
values
,
isCloseFlowPath
,
...
...
@@ -166,7 +169,7 @@ const submitValues = ({
return
false
;
}
if
(
res
&&
res
.
content
&&
isJSON
(
res
.
content
))
{
payload
.
taskForm
=
res
.
content
;
payload
.
taskForm
=
res
.
content
;
// 替换表单数据
}
beforeAuditSubmitFunc
(
payload
);
// 提交数据到审批接口
});
...
...
one_stop_public/Table/prepareShow.js
浏览文件 @
9ff5a504
...
...
@@ -30,7 +30,7 @@ export default function prepareShow(postData = {}, content = '', otherParams = {
window
.
Modal
=
Modal
;
window
.
moment
=
moment
;
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
agg
?.
unifiedServicePatternModel
?.
id
);
// 表单id;
//
console.log(agg?.unifiedServicePatternModel?.id); // 表单id;
if
(
agg
?.
unifiedServicePatternModel
?.
id
&&
(
test
||
getUserInfo
().
stuNo
===
'admin'
))
{
const
SystemConfig
=
window
.
specialImportantSystemConfig
||
{};
console
.
log
(
'%c'
+
`
${
SystemConfig
?.
gateWayPort
}
/onestop/
#
/
admin
/
processServices
/
modelConfig
/
templateDetail
/
designById
?
id
=
$
{
agg
.
unifiedServicePatternModel
.
id
}
&
token
=
$
{
getToken
()}
`, 'color: green;background: white;font-size: 14px');
...
...
one_stop_public/libs/ChildForm.jsx
浏览文件 @
9ff5a504
...
...
@@ -137,7 +137,7 @@ export default class ChildForm extends React.Component {
if
(
!
objs
)
{
return
null
;
}
console
.
log
(
this
.
props
.
form
.
getFieldsValue
());
//
console.log(this.props.form.getFieldsValue());
if
(
isMobile
)
{
return
(
// 2022年11月24日 姚新国说的 把干掉两翼留白 解决北电科工作情况考核 移动端样式的问题
...
...
zyd_public/components/lowCodeEdit/EditDrawer.js
浏览文件 @
9ff5a504
...
...
@@ -9,144 +9,150 @@ import { getUserInfo } from '@/webPublic/one_stop_public/utils/token';
const
{
TextArea
}
=
Input
;
function
EditDrawer
(
props
)
{
const
{
dispatch
,
templateData
,
TEMPLATE
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
showEdit
,
setShowEdit
]
=
useState
(
process
.
env
.
NODE_ENV
===
'development'
);
const
saveTimeOut
=
useRef
();
const
[
lowCodeEdit
,
setLowCodeEdit
]
=
useState
({});
const
{
dispatch
,
templateData
,
TEMPLATE
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
showEdit
,
setShowEdit
]
=
useState
(
process
.
env
.
NODE_ENV
===
'development'
);
const
saveTimeOut
=
useRef
();
const
[
lowCodeEdit
,
setLowCodeEdit
]
=
useState
({});
useEffect
(
()
=>
{
if
(
templateData
)
{
setLowCodeEdit
({
...
templateData
});
}
},
[
templateData
],
);
useEffect
(
()
=>
{
if
(
templateData
)
{
setLowCodeEdit
({
...
templateData
});
}
},
[
templateData
],
);
const
onClose
=
()
=>
{
setShowEdit
(
!
showEdit
);
};
const
onClose
=
()
=>
{
setShowEdit
(
!
showEdit
);
};
const
handleSaveTemplate
=
()
=>
{
lowCodeEdit
.
updateTime
=
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
);
const
content
=
JSON
.
stringify
(
lowCodeEdit
);
message
.
info
(
'正在保存数据,请耐心等待'
);
setLoading
(
true
);
dispatch
({
type
:
'lowCode_design/saveTemplateApi'
,
payload
:
{
name
:
lowCodeEdit
.
name
,
content
,
TEMPLATE
,
},
callback
:
()
=>
{
saveTimeOut
.
current
=
null
;
setLoading
(
false
);
},
});
};
const
changeKey
=
(
value
,
key
)
=>
{
let
newCodeEdit
=
lowCodeEdit
;
newCodeEdit
[
key
]
=
value
;
setLowCodeEdit
(
newCodeEdit
);
};
const
handleSaveTemplate
=
()
=>
{
lowCodeEdit
.
updateTime
=
moment
().
format
(
'YYYY-MM-DD HH:mm:ss'
);
const
content
=
JSON
.
stringify
(
lowCodeEdit
);
message
.
info
(
'正在保存数据,请耐心等待'
);
setLoading
(
true
);
dispatch
({
type
:
'lowCode_design/saveTemplateApi'
,
payload
:
{
name
:
lowCodeEdit
.
name
,
content
,
TEMPLATE
,
},
callback
:
()
=>
{
saveTimeOut
.
current
=
null
;
setLoading
(
false
);
},
});
};
const
changeKey
=
(
value
,
key
)
=>
{
let
newCodeEdit
=
lowCodeEdit
;
newCodeEdit
[
key
]
=
value
;
setLowCodeEdit
(
newCodeEdit
);
};
// TODO localStorage 事件中获取的state 不是最新的.
// TODO localStorage 事件中获取的state 不是最新的.
const
handleLocalStorageSave
=
(
e
)
=>
{
if
(
e
.
key
===
'save-low-code-local'
)
{
const
newV
=
e
.
newValue
;
if
(
newV
&&
newV
.
length
>
20
)
{
changeKey
(
newV
,
'beforeShow'
);
if
(
!
saveTimeOut
.
current
)
{
saveTimeOut
.
current
=
window
.
setTimeout
(()
=>
{
message
.
info
(
'正在保存'
);
handleSaveTemplate
();
},
500
);
}
}
}
};
const
handleLocalStorageSave
=
(
e
)
=>
{
if
(
e
.
key
===
'save-low-code-local'
)
{
const
newV
=
e
.
newValue
;
if
(
newV
&&
newV
.
length
>
20
)
{
changeKey
(
newV
,
'beforeShow'
);
if
(
!
saveTimeOut
.
current
)
{
saveTimeOut
.
current
=
window
.
setTimeout
(()
=>
{
message
.
info
(
'正在保存'
);
handleSaveTemplate
();
},
500
);
}
}
}
};
useEffect
(
()
=>
{
if
(
lowCodeEdit
?.
beforeShow
)
{
window
.
addEventListener
(
'storage'
,
handleLocalStorageSave
);
}
return
()
=>
{
window
.
removeEventListener
(
'storage'
,
handleLocalStorageSave
);
};
},
[
lowCodeEdit
.
beforeShow
],
);
useEffect
(
()
=>
{
if
(
lowCodeEdit
?.
beforeShow
)
{
window
.
addEventListener
(
'storage'
,
handleLocalStorageSave
);
}
return
()
=>
{
window
.
removeEventListener
(
'storage'
,
handleLocalStorageSave
);
};
},
[
lowCodeEdit
.
beforeShow
],
);
const
editFullScreen
=
()
=>
{
localStorage
.
setItem
(
'edit-low-code-local'
,
JSON
.
stringify
(
lowCodeEdit
));
if
(
process
.
env
.
NODE_ENV
===
'development'
){
window
.
open
(
'http://scjoyedu.eicp.net:51352/wisdomSchool/#/quanPingBianji?id='
+
lowCodeEdit
.
TEMPLATE
);
}
window
.
open
(
window
.
location
.
origin
+
'/wisdomSchool/#/quanPingBianji?id='
+
lowCodeEdit
.
TEMPLATE
);
};
const
editFullScreen
=
()
=>
{
localStorage
.
setItem
(
'edit-low-code-local'
,
JSON
.
stringify
(
lowCodeEdit
));
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
window
.
open
(
'http://scjoyedu.eicp.net:51352/wisdomSchool/#/quanPingBianji?id='
+
lowCodeEdit
.
TEMPLATE
,
);
}
window
.
open
(
window
.
location
.
origin
+
'/wisdomSchool/#/quanPingBianji?id='
+
lowCodeEdit
.
TEMPLATE
,
);
};
return
(
<>
<
Drawer
title
=
"编辑"
placement
=
"right"
onClose
=
{
onClose
}
visible
=
{
showEdit
}
width
=
{
700
}
maskClosable
=
{
false
}
>
<
TextArea
autoSize
=
{{
minRows
:
5
,
maxRows
:
10
,
}}
value
=
{
JSON
.
stringify
(
templateData
,
null
,
'
\
t'
)}
disabled
=
{
true
}
style
=
{{
marginBottom
:
'20px'
}}
/
>
return
(
<>
<
Drawer
title
=
"编辑"
placement
=
"right"
onClose
=
{
onClose
}
visible
=
{
showEdit
}
width
=
{
700
}
maskClosable
=
{
false
}
>
<
TextArea
autoSize
=
{{
minRows
:
5
,
maxRows
:
10
,
}}
value
=
{
JSON
.
stringify
(
templateData
,
null
,
'
\
t'
)}
disabled
=
{
true
}
style
=
{{
marginBottom
:
'20px'
}}
/
>
{
loading
?
'正在保存中请勿编辑'
:
<>
挂载前执行
<
ButtonDiy
name
=
{
'全屏编辑'
}
handleClick
=
{
editFullScreen
}
type
=
{
'danger'
}
/
>
<
TextArea
autoSize
=
{{
minRows
:
10
,
maxRows
:
15
,
}}
defaultValue
=
{
lowCodeEdit
?.
beforeShow
||
''
}
onChange
=
{(
e
)
=>
{
changeKey
(
e
.
target
.
value
,
'beforeShow'
);
}}
// readOnly={true}
style
=
{{
marginBottom
:
'20px'
}}
/
>
<
Button
onClick
=
{
handleSaveTemplate
}
type
=
{
'primary'
}
>
保存
<
/Button
>
<
/
>
}
<
/Drawer
>
<
div
data
-
edit
-
point
=
{
'EditDrawer'
}
className
=
{
styles
.
editPoint
}
style
=
{{
display
:
getUserInfo
().
stuNo
===
'admin'
?
'block'
:
'none'
,
}}
onClick
=
{()
=>
{
setShowEdit
(
!
showEdit
);
}}
>
模板编辑
<
/div
>
<
/
>
);
{
loading
?
(
'正在保存中请勿编辑'
)
:
(
<>
挂载前执行
<
ButtonDiy
name
=
{
'全屏编辑'
}
handleClick
=
{
editFullScreen
}
type
=
{
'danger'
}
/
>
<
TextArea
autoSize
=
{{
minRows
:
10
,
maxRows
:
15
,
}}
defaultValue
=
{
lowCodeEdit
?.
beforeShow
||
''
}
onChange
=
{(
e
)
=>
{
changeKey
(
e
.
target
.
value
,
'beforeShow'
);
}}
// readOnly={true}
style
=
{{
marginBottom
:
'20px'
}}
/
>
<
Button
onClick
=
{
handleSaveTemplate
}
type
=
{
'primary'
}
>
保存
<
/Button
>
<
/
>
)}
<
/Drawer
>
<
div
data
-
edit
-
point
=
{
'EditDrawer'
}
className
=
{
styles
.
editPoint
}
style
=
{{
display
:
getUserInfo
().
stuNo
===
'admin'
?
'block'
:
'none'
,
}}
onClick
=
{()
=>
{
setShowEdit
(
!
showEdit
);
}}
>
模板编辑
<
/div
>
<
/
>
);
}
export
default
connect
(({
lowCode_design
})
=>
{
return
{
templateData
:
lowCode_design
.
templateData
,
};
return
{
templateData
:
lowCode_design
.
templateData
,
};
})(
EditDrawer
);
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论