diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx
index 7f30edd..9256bfc 100644
--- a/src/components/QuickQuote/index.jsx
+++ b/src/components/QuickQuote/index.jsx
@@ -1300,15 +1300,21 @@ const BoxComponent = props => {
const upViewProps20 = getUpViewPropsByITag(20);
const { sBackProcessData = [] } = slaveRowData;
+
+ const [downAbleConfigsNew, setDownAbleConfigsNew] = useState([]);
+ useEffect(() => {
+ setDownAbleConfigsNew(downAbleConfigs);
+ }, [selectedNode.showName, boxModel]);
+
// 获取sType为2的
const downViewProps = {
...props,
- viewConfigs: downAbleConfigs.filter(item => item.sPartsName === boxModel || !item.sPartsName),
- tableConfig: { ...slaveConfig, gdsconfigformslave: downAbleConfigs },
+ viewConfigs: downAbleConfigsNew.filter(item => item.sPartsName === boxModel || !item.sPartsName),
+ tableConfig: { ...slaveConfig, gdsconfigformslave: downAbleConfigsNew },
iColValueView: 24,
viewRow: slaveRowData,
getViewRow: config => {
- return sBackProcessData.find(item => item[config.sName]) || {};
+ return sBackProcessData.find(item => item[config.sName0 || config.sName]) || {};
},
tableName: `slaveDown${boxModel}`,
getSqlDropDownData: (...args) => {
@@ -1384,6 +1390,51 @@ const BoxComponent = props => {
""
);
},
+ extraContent2: child => {
+ return (
+
+ {!child.sParentName ? (
+ }
+ type="link"
+ onClick={() => {
+ setDownAbleConfigsNew(pre => {
+ const iIndex = pre.findIndex(item => item.sId === child.sId);
+ const childLen = pre.filter(item => item.sParentName === child.showName).length;
+ const newSId = commonUtils.createSid();
+ const newConfig = {
+ ...child,
+ sId: newSId,
+ sParentName: child.showName,
+ sName: `${child.sName}_${newSId}`,
+ };
+ return [...pre.slice(0, iIndex + childLen + 1), newConfig, ...pre.slice(iIndex + childLen + 1)];
+ });
+ }}
+ />
+ ) : (
+ }
+ type="link"
+ onClick={() => {
+ setDownAbleConfigsNew(pre => {
+ const iIndex = pre.findIndex(item => item.sId === child.sId);
+ return [...pre.slice(0, iIndex), ...pre.slice(iIndex + 1)];
+ });
+
+ const slaveRowIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId);
+ props.setState(pre => {
+ const { sBackProcessData = [] } = slaveData[slaveRowIndex];
+ const iIndex = sBackProcessData.findIndex(item => item[child.sName]);
+ slaveData[slaveRowIndex].sBackProcessData.splice(iIndex, 1);
+ return { ...pre, slaveData };
+ });
+ }}
+ />
+ )}
+
+ );
+ },
};
// 获取sType为3的
@@ -1737,7 +1788,7 @@ const BoxComponent = props => {
<>
{/* 后道参数 */}
-
diff --git a/src/components/QuickQuote/index.less b/src/components/QuickQuote/index.less
index 10a5636..0b7615f 100644
--- a/src/components/QuickQuote/index.less
+++ b/src/components/QuickQuote/index.less
@@ -144,6 +144,14 @@
}
}
+ .viewTableDownView {
+ :global {
+ .viewStyle {
+ padding-right: 14px;
+ }
+ }
+ }
+
.viewTable1 {
padding: 0 20px 0 0;
}
@@ -413,4 +421,25 @@
width: calc(100% - 200px);
height: 100%;
}
+}
+
+.downOperations {
+ position: absolute;
+ top: -4px;
+ right: -14px;
+ display: flex;
+ flex-direction: column;
+ z-index: 1000;
+
+ :global {
+ button {
+ padding: 0;
+ width: 16px;
+ height: 16px;
+
+ >span {
+ font-size: 10px;
+ }
+ }
+ }
}
\ No newline at end of file