|
@@ -437,6 +437,16 @@ function Detail(props) {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ console.log('0--------------', currentUser);
|
|
|
+
|
|
|
+ //是否展示psr表上面的按钮
|
|
|
+ const showPsrBtns = useMemo(() => {
|
|
|
+ let Id = version.template_node_id;
|
|
|
+ const node = flowDetail.nodes.find?.(item => item.Id == Id);
|
|
|
+ if (node?.node_type_psr >= 1 && node?.node_type_psr <= 4) return true;
|
|
|
+ return false;
|
|
|
+ }, [flowDetail, version]);
|
|
|
+
|
|
|
const getUser = newUser => {
|
|
|
try {
|
|
|
if (JSON.stringify(newUser) != JSON.stringify(userRef.current)) {
|
|
@@ -584,7 +594,7 @@ function Detail(props) {
|
|
|
onChange={e => exportExcl(e.target.files)}
|
|
|
/>
|
|
|
</div>
|
|
|
- <PsrControl sheetRef={sheetRef} />
|
|
|
+ {showPsrBtns && <PsrControl sheetRef={sheetRef} />}
|
|
|
<div style={{ display: 'flex' }}>
|
|
|
<div
|
|
|
className={styles.content}
|
|
@@ -610,6 +620,7 @@ function Detail(props) {
|
|
|
className={styles.sheet}
|
|
|
ref={sheetRef}
|
|
|
onClickCell={onClickCell}
|
|
|
+ permissions={currentUser.Permission}
|
|
|
version={version}
|
|
|
templateId={templateId}
|
|
|
getUser={getUser}
|