提交 be3b2400 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 45848021
......@@ -17,11 +17,12 @@
"@wangeditor/plugin-link-card": "^1.0.0",
"ahooks": "^3.8.0",
"ali-oss": "^6.20.0",
"antd": "^5.20.6",
"antd": "^5.21.6",
"axios": "^1.6.2",
"dayjs": "^1.11.11",
"easy-formula-editor": "^0.0.2-alpha.1",
"echarts": "^5.4.3",
"evit-gm-crypt": "^1.0.1",
"highlight.js": "^11.9.0",
"jquery": "^3.7.1",
"js-cookie": "^3.0.5",
......@@ -84,9 +85,9 @@
}
},
"node_modules/@ant-design/cssinjs-utils": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@ant-design/cssinjs-utils/-/cssinjs-utils-1.0.3.tgz",
"integrity": "sha512-BrztZZKuoYcJK8uEH40ylBemf/Mu/QPiDos56g2bv6eUoniQkgQHOCOvA3+pncoFO1TaS8xcUCIqGzDA0I+ZVQ==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@ant-design/cssinjs-utils/-/cssinjs-utils-1.1.1.tgz",
"integrity": "sha512-2HAiyGGGnM0es40SxdszeQAU5iWp41wBIInq+ONTCKjlSKOrzQfnw4JDtB8IBmqE6tQaEKwmzTP2LGdt5DSwYQ==",
"license": "MIT",
"dependencies": {
"@ant-design/cssinjs": "^1.21.0",
......@@ -111,9 +112,9 @@
}
},
"node_modules/@ant-design/icons": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-5.4.0.tgz",
"integrity": "sha512-QZbWC5xQYexCI5q4/fehSEkchJr5UGtvAJweT743qKUQQGs9IH2DehNLP49DJ3Ii9m9CijD2HN6fNy3WKhIFdA==",
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-5.5.1.tgz",
"integrity": "sha512-0UrM02MA2iDIgvLatWrj6YTCYe0F/cwXvVE0E2SqGrL7PZireQwgEKTKBisWpZyal5eXZLvuM98kju6YtYne8w==",
"license": "MIT",
"dependencies": {
"@ant-design/colors": "^7.0.0",
......@@ -949,6 +950,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@rc-component/context/-/context-1.4.0.tgz",
"integrity": "sha512-kFcNxg9oLRMoL3qki0OMxK+7g5mypjgaaJp/pkOis/6rVxma9nJBF/8kCIuTYHUQNr0ii7MxqE33wirPZLJQ2w==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
"rc-util": "^5.27.0"
......@@ -2025,57 +2027,57 @@
}
},
"node_modules/antd": {
"version": "5.20.6",
"resolved": "https://registry.npmjs.org/antd/-/antd-5.20.6.tgz",
"integrity": "sha512-TZFmNenHlh26DelHCJbkB+x1OVulIKsN1f/CnAd2NxZLysXqRvSuLUeHcgccqAnxTy7B03GZ6i1tocGxPCNjgA==",
"version": "5.21.6",
"resolved": "https://registry.npmjs.org/antd/-/antd-5.21.6.tgz",
"integrity": "sha512-EviOde/VEu+OsIKH5t6YXTMmmNeg9R85m0W5zXAo+Np8Latg9q10691JvAqOTMpnrRmbdeKUQL1Krp69Bzbe/g==",
"license": "MIT",
"dependencies": {
"@ant-design/colors": "^7.1.0",
"@ant-design/cssinjs": "^1.21.0",
"@ant-design/cssinjs-utils": "^1.0.3",
"@ant-design/icons": "^5.4.0",
"@ant-design/cssinjs": "^1.21.1",
"@ant-design/cssinjs-utils": "^1.1.1",
"@ant-design/icons": "^5.5.1",
"@ant-design/react-slick": "~1.1.2",
"@babel/runtime": "^7.24.8",
"@babel/runtime": "^7.25.6",
"@ctrl/tinycolor": "^3.6.1",
"@rc-component/color-picker": "~2.0.1",
"@rc-component/mutate-observer": "^1.1.0",
"@rc-component/qrcode": "~1.0.0",
"@rc-component/tour": "~1.15.1",
"@rc-component/trigger": "^2.2.2",
"@rc-component/trigger": "^2.2.3",
"classnames": "^2.5.1",
"copy-to-clipboard": "^3.3.3",
"dayjs": "^1.11.11",
"rc-cascader": "~3.28.1",
"rc-cascader": "~3.28.2",
"rc-checkbox": "~3.3.0",
"rc-collapse": "~3.7.3",
"rc-dialog": "~9.5.2",
"rc-collapse": "~3.8.0",
"rc-dialog": "~9.6.0",
"rc-drawer": "~7.2.0",
"rc-dropdown": "~4.2.0",
"rc-field-form": "~2.4.0",
"rc-image": "~7.9.0",
"rc-image": "~7.11.0",
"rc-input": "~1.6.3",
"rc-input-number": "~9.2.0",
"rc-mentions": "~2.15.0",
"rc-menu": "~9.14.1",
"rc-motion": "^2.9.2",
"rc-notification": "~5.6.0",
"rc-pagination": "~4.2.0",
"rc-picker": "~4.6.14",
"rc-mentions": "~2.16.1",
"rc-menu": "~9.15.1",
"rc-motion": "^2.9.3",
"rc-notification": "~5.6.2",
"rc-pagination": "~4.3.0",
"rc-picker": "~4.6.15",
"rc-progress": "~4.0.0",
"rc-rate": "~2.13.0",
"rc-resize-observer": "^1.4.0",
"rc-segmented": "~2.3.0",
"rc-segmented": "~2.5.0",
"rc-select": "~14.15.2",
"rc-slider": "~11.1.5",
"rc-slider": "~11.1.7",
"rc-steps": "~6.0.1",
"rc-switch": "~4.1.0",
"rc-table": "~7.45.7",
"rc-tabs": "~15.1.1",
"rc-textarea": "~1.8.1",
"rc-tooltip": "~6.2.0",
"rc-table": "~7.47.5",
"rc-tabs": "~15.3.0",
"rc-textarea": "~1.8.2",
"rc-tooltip": "~6.2.1",
"rc-tree": "~5.9.0",
"rc-tree-select": "~5.23.0",
"rc-upload": "~4.7.0",
"rc-upload": "~4.8.1",
"rc-util": "^5.43.0",
"scroll-into-view-if-needed": "^3.1.0",
"throttle-debounce": "^5.0.2"
......@@ -4059,6 +4061,15 @@
"node": ">=0.8.x"
}
},
"node_modules/evit-gm-crypt": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/evit-gm-crypt/-/evit-gm-crypt-1.0.1.tgz",
"integrity": "sha512-ilVevk9XfsUQZE8DeFsFc1QTm/GC9ZmmaZO/1LRGptiG1GqtuUINvtumh1bElSafWLQlZB/kI4q3tBArKzhF4g==",
"license": "MIT",
"dependencies": {
"base64-js": "^1.3.0"
}
},
"node_modules/evp_bytestokey": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
......@@ -6974,9 +6985,9 @@
}
},
"node_modules/rc-cascader": {
"version": "3.28.1",
"resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.28.1.tgz",
"integrity": "sha512-9+8oHIMWVLHxuaapDiqFNmD9KSyKN/P4bo9x/MBuDbyTqP8f2/POmmZxdXWBO3yq/uE3pKyQCXYNUxrNfHRv2A==",
"version": "3.28.2",
"resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-3.28.2.tgz",
"integrity": "sha512-8f+JgM83iLTvjgdkgU7GfI4qY8icXOBP0cGZjOdx2iJAkEe8ucobxDQAVE69UD/c3ehCxZlcgEHeD5hFmypbUw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.12.5",
......@@ -7006,9 +7017,10 @@
}
},
"node_modules/rc-collapse": {
"version": "3.7.3",
"resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.7.3.tgz",
"integrity": "sha512-60FJcdTRn0X5sELF18TANwtVi7FtModq649H11mYF1jh83DniMoM4MqY627sEKRCTm4+WXfGDcB7hY5oW6xhyw==",
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-3.8.0.tgz",
"integrity": "sha512-YVBkssrKPBG09TGfcWWGj8zJBYD9G3XuTy89t5iUmSXrIXEAnO1M+qjUxRW6b4Qi0+wNWG6MHJF/+US+nmIlzA==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
......@@ -7021,9 +7033,10 @@
}
},
"node_modules/rc-dialog": {
"version": "9.5.2",
"resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-9.5.2.tgz",
"integrity": "sha512-qVUjc8JukG+j/pNaHVSRa2GO2/KbV2thm7yO4hepQ902eGdYK913sGkwg/fh9yhKYV1ql3BKIN2xnud3rEXAPw==",
"version": "9.6.0",
"resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-9.6.0.tgz",
"integrity": "sha512-ApoVi9Z8PaCQg6FsUzS8yvBEQy0ZL2PkuvAgrmohPkN3okps5WZ5WQWPc1RNuiOKaAYv8B97ACdsFU5LizzCqg==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
"@rc-component/portal": "^1.0.0-8",
......@@ -7105,14 +7118,15 @@
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
},
"node_modules/rc-image": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/rc-image/-/rc-image-7.9.0.tgz",
"integrity": "sha512-l4zqO5E0quuLMCtdKfBgj4Suv8tIS011F5k1zBBlK25iMjjiNHxA0VeTzGFtUZERSA45gvpXDg8/P6qNLjR25g==",
"version": "7.11.0",
"resolved": "https://registry.npmjs.org/rc-image/-/rc-image-7.11.0.tgz",
"integrity": "sha512-aZkTEZXqeqfPZtnSdNUnKQA0N/3MbgR7nUnZ+/4MfSFWPFHZau4p5r5ShaI0KPEMnNjv4kijSCFq/9wtJpwykw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@rc-component/portal": "^1.0.2",
"classnames": "^2.2.6",
"rc-dialog": "~9.5.2",
"rc-dialog": "~9.6.0",
"rc-motion": "^2.6.2",
"rc-util": "^5.34.1"
},
......@@ -7154,16 +7168,16 @@
}
},
"node_modules/rc-mentions": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-2.15.0.tgz",
"integrity": "sha512-f5v5i7VdqvBDXbphoqcQWmXDif2Msd2arritVoWybrVDuHE6nQ7XCYsybHbV//WylooK52BFDouFvyaRDtXZEw==",
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-2.16.1.tgz",
"integrity": "sha512-GnhSTGP9Mtv6pqFFGQze44LlrtWOjHNrUUAcsdo9DnNAhN4pwVPEWy4z+2jpjkiGlJ3VoXdvMHcNDQdfI9fEaw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.22.5",
"@rc-component/trigger": "^2.0.0",
"classnames": "^2.2.6",
"rc-input": "~1.6.0",
"rc-menu": "~9.14.0",
"rc-menu": "~9.15.1",
"rc-textarea": "~1.8.0",
"rc-util": "^5.34.1"
},
......@@ -7173,9 +7187,9 @@
}
},
"node_modules/rc-menu": {
"version": "9.14.1",
"resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.14.1.tgz",
"integrity": "sha512-5wlRb3M8S4yGlWhSoEYJ7ZVRElyScdcpUHxgiLxkeig1tEdyKrnED3B2fhpN0Rrpdp9jyhnmZR/Lwq2fH5VvDQ==",
"version": "9.15.1",
"resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-9.15.1.tgz",
"integrity": "sha512-UKporqU6LPfHnpPmtP6hdEK4iO5Q+b7BRv/uRpxdIyDGplZy9jwUjsnpev5bs3PQKB0H0n34WAPDfjAfn3kAPA==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
......@@ -7191,9 +7205,9 @@
}
},
"node_modules/rc-motion": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.9.2.tgz",
"integrity": "sha512-fUAhHKLDdkAXIDLH0GYwof3raS58dtNUmzLF2MeiR8o6n4thNpSDQhOqQzWE4WfFZDCi9VEN8n7tiB7czREcyw==",
"version": "2.9.3",
"resolved": "https://registry.npmjs.org/rc-motion/-/rc-motion-2.9.3.tgz",
"integrity": "sha512-rkW47ABVkic7WEB0EKJqzySpvDqwl60/tdkY7hWP7dYnh5pm0SzJpo54oW3TDUGXV5wfxXFmMkxrzRRbotQ0+w==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.11.1",
......@@ -7206,9 +7220,10 @@
}
},
"node_modules/rc-notification": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-5.6.0.tgz",
"integrity": "sha512-TGQW5T7waOxLwgJG7fXcw8l7AQiFOjaZ7ISF5PrU526nunHRNcTMuzKihQHaF4E/h/KfOCDk3Mv8eqzbu2e28w==",
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-5.6.2.tgz",
"integrity": "sha512-Id4IYMoii3zzrG0lB0gD6dPgJx4Iu95Xu0BQrhHIbp7ZnAZbLqdqQ73aIWH0d0UFcElxwaKjnzNovTjo7kXz7g==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
"classnames": "2.x",
......@@ -7240,9 +7255,9 @@
}
},
"node_modules/rc-pagination": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-4.2.0.tgz",
"integrity": "sha512-V6qeANJsT6tmOcZ4XiUmj8JXjRLbkusuufpuoBw2GiAn94fIixYjFLmbruD1Sbhn8fPLDnWawPp4CN37zQorvw==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-4.3.0.tgz",
"integrity": "sha512-UubEWA0ShnroQ1tDa291Fzw6kj0iOeF26IsUObxYTpimgj4/qPCWVFl18RLZE+0Up1IZg0IK4pMn6nB3mjvB7g==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
......@@ -7255,9 +7270,9 @@
}
},
"node_modules/rc-picker": {
"version": "4.6.14",
"resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.6.14.tgz",
"integrity": "sha512-7DuTfUFdkxmsNpWQ0TWv6FPGna5e6KKC4nxtx3x9xhumLz7jb3fhlDdWQvqEL6tpt9DOb1+N5j+wB+lDOSS9kg==",
"version": "4.6.15",
"resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.6.15.tgz",
"integrity": "sha512-OWZ1yrMie+KN2uEUfYCfS4b2Vu6RC1FWwNI0s+qypsc3wRt7g+peuZKVIzXCTaJwyyZruo80+akPg2+GmyiJjw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.24.7",
......@@ -7340,9 +7355,10 @@
}
},
"node_modules/rc-segmented": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.3.0.tgz",
"integrity": "sha512-I3FtM5Smua/ESXutFfb8gJ8ZPcvFR+qUgeeGFQHBOvRiRKyAk4aBE5nfqrxXx+h8/vn60DQjOt6i4RNtrbOobg==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/rc-segmented/-/rc-segmented-2.5.0.tgz",
"integrity": "sha512-B28Fe3J9iUFOhFJET3RoXAPFJ2u47QvLSYcZWC4tFYNGPEjug5LAxEasZlA/PpAxhdOPqGWsGbSj7ftneukJnw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.11.1",
"classnames": "^2.2.1",
......@@ -7377,9 +7393,9 @@
}
},
"node_modules/rc-slider": {
"version": "11.1.5",
"resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-11.1.5.tgz",
"integrity": "sha512-b77H5PbjMKsvkYXAYIkn50QuFX6ICQmCTibDinI9q+BHx65/TV4TeU25+oadhSRzykxs0/vBWeKBwRyySOeWlg==",
"version": "11.1.7",
"resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-11.1.7.tgz",
"integrity": "sha512-ytYbZei81TX7otdC0QvoYD72XSlxvTihNth5OeZ6PMXyEDq/vHdWFulQmfDGyXK1NwKwSlKgpvINOa88uT5g2A==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
......@@ -7444,15 +7460,16 @@
}
},
"node_modules/rc-table": {
"version": "7.45.7",
"resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.45.7.tgz",
"integrity": "sha512-wi9LetBL1t1csxyGkMB2p3mCiMt+NDexMlPbXHvQFmBBAsMxrgNSAPwUci2zDLUq9m8QdWc1Nh8suvrpy9mXrg==",
"version": "7.47.5",
"resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.47.5.tgz",
"integrity": "sha512-fzq+V9j/atbPIcvs3emuclaEoXulwQpIiJA6/7ey52j8+9cJ4P8DGmp4YzfUVDrb3qhgedcVeD6eRgUrokwVEQ==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
"@rc-component/context": "^1.4.0",
"classnames": "^2.2.5",
"rc-resize-observer": "^1.1.0",
"rc-util": "^5.37.0",
"rc-util": "^5.41.0",
"rc-virtual-list": "^3.14.2"
},
"engines": {
......@@ -7464,15 +7481,15 @@
}
},
"node_modules/rc-tabs": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-15.1.1.tgz",
"integrity": "sha512-Tc7bJvpEdkWIVCUL7yQrMNBJY3j44NcyWS48jF/UKMXuUlzaXK+Z/pEL5LjGcTadtPvVmNqA40yv7hmr+tCOAw==",
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-15.3.0.tgz",
"integrity": "sha512-lzE18r+zppT/jZWOAWS6ntdkDUKHOLJzqMi5UAij1LeKwOaQaupupAoI9Srn73GRzVpmGznkECMRrzkRusC40A==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.11.2",
"classnames": "2.x",
"rc-dropdown": "~4.2.0",
"rc-menu": "~9.14.0",
"rc-menu": "~9.15.1",
"rc-motion": "^2.6.2",
"rc-resize-observer": "^1.0.0",
"rc-util": "^5.34.1"
......@@ -7486,9 +7503,9 @@
}
},
"node_modules/rc-textarea": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.8.1.tgz",
"integrity": "sha512-bm36N2ZqwZAP60ZQg2OY9mPdqWC+m6UTjHc+CqEZOxb3Ia29BGHazY/s5bI8M4113CkqTzhtFUDNA078ZiOx3Q==",
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.8.2.tgz",
"integrity": "sha512-UFAezAqltyR00a8Lf0IPAyTd29Jj9ee8wt8DqXyDMal7r/Cg/nDt3e1OOv3Th4W6mKaZijjgwuPXhAfVNTN8sw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.10.1",
......@@ -7503,9 +7520,10 @@
}
},
"node_modules/rc-tooltip": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-6.2.0.tgz",
"integrity": "sha512-iS/3iOAvtDh9GIx1ulY7EFUXUtktFccNLsARo3NPgLf0QW9oT0w3dA9cYWlhqAKmD+uriEwdWz1kH0Qs4zk2Aw==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-6.2.1.tgz",
"integrity": "sha512-rws0duD/3sHHsD905Nex7FvoUGy2UBQRhTkKxeEvr2FB+r21HsOxcDJI0TzyO8NHhnAA8ILr8pfbSBg5Jj5KBg==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.11.2",
"@rc-component/trigger": "^2.0.0",
......@@ -7554,9 +7572,9 @@
}
},
"node_modules/rc-upload": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.7.0.tgz",
"integrity": "sha512-eUwxYNHlsYe5vYhKFAUGrQG95JrnPzY+BmPi1Daq39fWNl/eOc7v4UODuWrVp2LFkQBuV3cMCG/I68iub6oBrg==",
"version": "4.8.1",
"resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.8.1.tgz",
"integrity": "sha512-toEAhwl4hjLAI1u8/CgKWt30BR06ulPa4iGQSMvSXoHzO88gPCslxqV/mnn4gJU7PDoltGIC9Eh+wkeudqgHyw==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.18.3",
......@@ -7588,9 +7606,10 @@
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="
},
"node_modules/rc-virtual-list": {
"version": "3.14.2",
"resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.14.2.tgz",
"integrity": "sha512-rA+W5xryhklJAcmswNyuKB3ZGeB855io+yOFQK5u/RXhjdshGblfKpNkQr4/9fBhZns0+uiL/0/s6IP2krtSmg==",
"version": "3.14.8",
"resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.14.8.tgz",
"integrity": "sha512-8D0KfzpRYi6YZvlOWIxiOm9BGt4Wf2hQyEaM6RXlDDiY2NhLheuYI+RA+7ZaZj1lq+XQqy3KHlaeeXQfzI5fGg==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.20.0",
"classnames": "^2.2.6",
......
......@@ -20,11 +20,12 @@
"@wangeditor/plugin-link-card": "^1.0.0",
"ahooks": "^3.8.0",
"ali-oss": "^6.20.0",
"antd": "^5.20.6",
"antd": "^5.21.6",
"axios": "^1.6.2",
"dayjs": "^1.11.11",
"easy-formula-editor": "^0.0.2-alpha.1",
"echarts": "^5.4.3",
"evit-gm-crypt": "^1.0.1",
"highlight.js": "^11.9.0",
"jquery": "^3.7.1",
"js-cookie": "^3.0.5",
......
......@@ -33,11 +33,13 @@ const ChapterItemModal = (props, ref) => {
}
}, [sectionInfo])
const bgColorChange = (value, hex) => {
const bgColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setBgColorValue(hex)
form.setFieldsValue({ bgColor: hex })
}
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setTextColor(hex)
form.setFieldsValue({ textColor: hex })
}
......@@ -130,7 +132,11 @@ const ChapterItemModal = (props, ref) => {
<Divider />
<div className="editor-content-form">
<Form layout="vertical" name="validate_other" form={form} onFinish={onFinish} initialValues={initValues}>
<Form.Item label="节头标题" name="title" rules={[{ required: true, message: '请输入节头标题' }]} extra="最多输入30字">
<Form.Item
label="节头标题"
name="title"
rules={[{ required: true, message: '请输入节头标题' }]}
extra="最多输入30字">
<Input maxLength={30} placeholder="" allowClear />
</Form.Item>
......@@ -146,7 +152,13 @@ const ChapterItemModal = (props, ref) => {
<Input maxLength={100} placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha format="hex" value={bgColorValue} defaultValue={bgColorValue} onChange={bgColorChange} />
<ColorPicker
disabledAlpha
format="hex"
value={bgColorValue}
defaultValue={bgColorValue}
onChange={bgColorChange}
/>
</Form.Item>
</div>
</Col>
......@@ -160,7 +172,13 @@ const ChapterItemModal = (props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha format="hex" value={textColor} defaultValue={textColor} onChange={textColorChange} />
<ColorPicker
disabledAlpha
format="hex"
value={textColor}
defaultValue={textColor}
onChange={textColorChange}
/>
</Form.Item>
</div>
</Col>
......@@ -201,7 +219,12 @@ const ChapterItemModal = (props, ref) => {
</Col>
<Col span={12}>
<Form.Item label="高度" name="height">
<InputNumber controls={false} placeholder="" style={{ width: '100%', textAlign: 'left' }} allowClear />
<InputNumber
controls={false}
placeholder=""
style={{ width: '100%', textAlign: 'left' }}
allowClear
/>
</Form.Item>
</Col>
<Col span={12}></Col>
......
import { useState, useEffect, forwardRef, useImperativeHandle } from 'react'
import { Divider, Upload, Input, Space, Button, Form, Spin, message, ColorPicker, Select, InputNumber, Row, Col } from 'antd'
import {
Divider,
Upload,
Input,
Space,
Button,
Form,
Spin,
message,
ColorPicker,
Select,
InputNumber,
Row,
Col
} from 'antd'
import { CloudUploadOutlined } from '@ant-design/icons'
import { SlateEditor, SlateTransforms, SlateElement } from '@wangeditor/editor'
import { fontFamilyList, fontSizeList } from '../utils/setting'
......@@ -53,11 +67,13 @@ const ImageModal = (props, ref) => {
}
})
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setTextColor(hex)
form.setFieldsValue({ textColor: hex })
}
const bgColorChange = (value, hex) => {
const bgColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setBgColorValue(hex)
form.setFieldsValue({ bgColor: hex })
}
......@@ -253,7 +269,13 @@ const ImageModal = (props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={bgColorValue} defaultValue={bgColorValue} format="hex" onChange={bgColorChange} />
<ColorPicker
disabledAlpha
value={bgColorValue}
defaultValue={bgColorValue}
format="hex"
onChange={bgColorChange}
/>
</Form.Item>
</div>
</Col>
......@@ -267,7 +289,13 @@ const ImageModal = (props, ref) => {
<Input maxLength={100} placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker value={textColor} defaultValue={textColor} disabledAlpha format="hex" onChange={textColorChange} />
<ColorPicker
value={textColor}
defaultValue={textColor}
disabledAlpha
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Col>
......@@ -308,7 +336,12 @@ const ImageModal = (props, ref) => {
</Col>
<Col span={12}>
<Form.Item label="高度" name="height">
<InputNumber controls={false} placeholder="" style={{ width: '100%', textAlign: 'left' }} allowClear />
<InputNumber
controls={false}
placeholder=""
style={{ width: '100%', textAlign: 'left' }}
allowClear
/>
</Form.Item>
</Col>
</Row>
......
......@@ -8,7 +8,16 @@ import './index.less'
import { addExpandRead, expandReadInfo } from '../utils/request'
const ExpandModal = forwardRef((props, ref) => {
const { editor, ossClient, bookId, chapterId, setExpandVisible, setExpandInfo, expandInfo, selectionSize = 18 } = props
const {
editor,
ossClient,
bookId,
chapterId,
setExpandVisible,
setExpandInfo,
expandInfo,
selectionSize = 18
} = props
const [form] = Form.useForm()
const flexValue = Form.useWatch('flex', form)
......@@ -42,7 +51,8 @@ const ExpandModal = forwardRef((props, ref) => {
setLoadLoading(false)
}
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setThemeValue(hex)
form.setFieldsValue({ theme: hex })
}
......@@ -248,7 +258,11 @@ const ExpandModal = forwardRef((props, ref) => {
<Select.Option value={2}>行内扩展</Select.Option>
</Select>
</Form.Item>
<Form.Item label="扩展名称" name="name" rules={[{ required: true, message: '请输入扩展名称' }]} extra="最多输入100字">
<Form.Item
label="扩展名称"
name="name"
rules={[{ required: true, message: '请输入扩展名称' }]}
extra="最多输入100字">
<Input maxLength={100} placeholder="" allowClear />
</Form.Item>
{flexValue === 1 && (
......@@ -278,7 +292,13 @@ const ExpandModal = forwardRef((props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={themeValue} defaultValue={themeValue} format="hex" onChange={textColorChange} />
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Form.Item>
......@@ -311,7 +331,13 @@ const ExpandModal = forwardRef((props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={themeValue} defaultValue={themeValue} format="hex" onChange={textColorChange} />
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Col>
......
......@@ -9,7 +9,16 @@ import GalleryFormItem from './galleryItem'
const randomOne = Math.random().toString(16).substring(2, 10)
const GalleryModal = props => {
const { editor, galleryInfo, bookId, chapterId, setGalleryVisible, setGalleryInfo, selectionSize = 18, isOnline = false } = props
const {
editor,
galleryInfo,
bookId,
chapterId,
setGalleryVisible,
setGalleryInfo,
selectionSize = 18,
isOnline = false
} = props
const [form] = Form.useForm()
const [loading, setLoading] = useState(false)
......@@ -38,7 +47,8 @@ const GalleryModal = props => {
form.setFieldsValue({ gallery: newGalleryList })
}, [contentValue])
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setThemeValue(hex)
form.setFieldsValue({ theme: hex })
}
......@@ -47,7 +57,15 @@ const GalleryModal = props => {
const initialItems = [
{
label: '图 1',
children: <GalleryFormItem form={form} galleryInfo={galleryInfo} activeKey={randomOne} setPicList={setPicList} isOnline={isOnline} />,
children: (
<GalleryFormItem
form={form}
galleryInfo={galleryInfo}
activeKey={randomOne}
setPicList={setPicList}
isOnline={isOnline}
/>
),
key: randomOne,
forceRender: true
}
......@@ -66,7 +84,15 @@ const GalleryModal = props => {
const newActiveKey = `${random}`
newPanes.push({
label: `图 ${index + 1}`,
children: <GalleryFormItem form={form} galleryInfo={galleryInfo} activeKey={newActiveKey} setPicList={setPicList} isOnline={isOnline} />,
children: (
<GalleryFormItem
form={form}
galleryInfo={galleryInfo}
activeKey={newActiveKey}
setPicList={setPicList}
isOnline={isOnline}
/>
),
key: newActiveKey,
forceRender: true
})
......@@ -331,7 +357,13 @@ const GalleryModal = props => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={themeValue} defaultValue={themeValue} format="hex" onChange={textColorChange} />
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Col>
......@@ -340,7 +372,11 @@ const GalleryModal = props => {
)}
{flexValue !== 2 && (
<Form.Item label="画廊标题" name="galleryTitle" rules={[{ required: true, message: '请输入画廊标题' }]} extra="最多输入100字">
<Form.Item
label="画廊标题"
name="galleryTitle"
rules={[{ required: true, message: '请输入画廊标题' }]}
extra="最多输入100字">
<Input maxLength={100} placeholder="" allowClear />
</Form.Item>
)}
......
......@@ -53,7 +53,8 @@ const LinkModal = (props, ref) => {
}
}, [linkInfo])
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setThemeValue(hex)
form.setFieldsValue({ theme: hex })
}
......@@ -153,7 +154,11 @@ const LinkModal = (props, ref) => {
</Form.Item>
{linktype === 1 && (
<>
<Form.Item label="链接标题" name="title" rules={[{ required: true, message: '请输入链接标题' }]} extra="最多输入100字">
<Form.Item
label="链接标题"
name="title"
rules={[{ required: true, message: '请输入链接标题' }]}
extra="最多输入100字">
<Input maxLength={100} placeholder="" allowClear />
</Form.Item>
<Form.Item
......@@ -171,7 +176,12 @@ const LinkModal = (props, ref) => {
{linktype === 2 && (
<>
<Form.Item label="子节" name="chapters" rules={[{ required: true, message: '请选择子节' }]}>
<Cascader options={gData} fieldNames={{ label: 'title', value: 'key', children: 'children' }} placeholder="请选择子节" allowClear />
<Cascader
options={gData}
fieldNames={{ label: 'title', value: 'key', children: 'children' }}
placeholder="请选择子节"
allowClear
/>
</Form.Item>
</>
)}
......@@ -204,7 +214,13 @@ const LinkModal = (props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={themeValue} defaultValue={themeValue} format="hex" onChange={textColorChange} />
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Col>
......
......@@ -22,7 +22,8 @@ const PracticeModal = (props, ref) => {
}
})
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setThemeValue(hex)
form.setFieldsValue({ theme: hex })
}
......@@ -88,7 +89,11 @@ const PracticeModal = (props, ref) => {
<Divider />
<div className="editor-content-form">
<Form layout="vertical" name="validate_other" form={form} onFinish={onFinish} initialValues={initValues}>
<Form.Item label="标题" name="practice" rules={[{ required: true, message: '请输入标题' }]} extra="最多输入100字">
<Form.Item
label="标题"
name="practice"
rules={[{ required: true, message: '请输入标题' }]}
extra="最多输入100字">
<Input maxLength={100} placeholder="" allowClear />
</Form.Item>
<Form.Item>
......@@ -104,7 +109,13 @@ const PracticeModal = (props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={themeValue} defaultValue={themeValue} format="hex" onChange={textColorChange} />
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Form.Item>
......
......@@ -26,7 +26,11 @@ const TooltipModal = (props, ref) => {
useEffect(() => {
if (Object.entries(tooltipInfo).length > 0) {
let obj = { ...tooltipInfo, tooltipType: parseInt(tooltipInfo.tooltipType), fontSize: parseInt(tooltipInfo.fontsize) }
let obj = {
...tooltipInfo,
tooltipType: parseInt(tooltipInfo.tooltipType),
fontSize: parseInt(tooltipInfo.fontsize)
}
setInitValue(obj)
form.setFieldsValue(obj)
setThemeValue(tooltipInfo.theme)
......@@ -36,7 +40,8 @@ const TooltipModal = (props, ref) => {
}
}, [tooltipInfo])
const textColorChange = (value, hex) => {
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setThemeValue(hex)
form.setFieldsValue({ theme: hex })
}
......@@ -65,7 +70,13 @@ const TooltipModal = (props, ref) => {
})
if (data) {
const props = { ...values, link: newLink, random: nowRandom, theme, fontsize: values.fontSize || selectionSize || fontsize }
const props = {
...values,
link: newLink,
random: nowRandom,
theme,
fontsize: values.fontSize || selectionSize || fontsize
}
const aPath = findNodeWithParent(editor.children, 'chapterTooltip', 'random', nowRandom)
SlateTransforms.setNodes(editor, props, { at: aPath.reverse() })
......@@ -199,7 +210,13 @@ const TooltipModal = (props, ref) => {
<Input placeholder="" allowClear />
</Form.Item>
<Form.Item label={` `}>
<ColorPicker disabledAlpha value={themeValue} defaultValue={themeValue} format="hex" onChange={textColorChange} />
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format="hex"
onChange={textColorChange}
/>
</Form.Item>
</div>
</Col>
......
......@@ -8,8 +8,8 @@ const actionMap = {
expand: { name: '扩写', prompt: '帮我在以下文字内容基础上进行扩写:' },
abbreviate: { name: '润色', prompt: '帮我润色以下文字内容:' },
summary: { name: '总结', prompt: '帮我总结以下文字内容:' },
punctuation: { name: '标点校对', prompt: '帮我校对以下文字内容中的标点符号' },
contentInspect: { name: '内容检查', prompt: '帮我检查以下文字内容中的敏感词和错别字' }
punctuation: { name: '标点校对', prompt: '帮我校对以下文字内容中的标点符号' },
contentInspect: { name: '内容检查', prompt: '帮我检查以下文字内容中的敏感词和错别字' }
}
export default function AIModal({ editor, docAction }) {
......@@ -38,7 +38,7 @@ export default function AIModal({ editor, docAction }) {
const handlePrimary = () => {
editor.restoreSelection()
editor.insertText(text)
editor.insertText(content)
setIsModalOpen(false)
}
......@@ -47,7 +47,11 @@ export default function AIModal({ editor, docAction }) {
title={`以下是AI${actionText}结果:`}
open={isModalOpen}
footer={null}
classNames={{ header: 'editor-header-customer', body: 'editor-body-customer', wrapper: 'editor-wrapper-customer' }}
classNames={{
header: 'editor-header-customer',
body: 'editor-body-customer',
wrapper: 'editor-wrapper-customer'
}}
onOk={handlePrimary}
onCancel={() => setIsModalOpen(false)}>
<Spin spinning={isLoading}>
......
import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import {
Modal,
Row,
Col,
Divider,
Upload,
Input,
Space,
Button,
Form,
Spin,
message,
ColorPicker,
} from 'antd';
import { CloseOutlined } from '@ant-design/icons';
import { setPracticeRandom } from '@/store/modules/editor';
import { DomEditor, SlateEditor, SlateTransforms, SlateElement } from '@wangeditor/editor';
import ListTopic from './components/list';
import CustomerTopic from './components/customer';
import InsertTopic from './components/insert';
import iconPractice from '@/assets/images/icon_practice.png';
import iconClose from '@/assets/images/icon_chapter_close.png';
import { getChapterTopic } from '../utils/request';
import { bookNameList } from './request';
import '../utils/iconfont';
import './index.less';
import React, { useState, useEffect, forwardRef, useImperativeHandle, useRef } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import { Modal, Row, Col, Divider, Upload, Input, Space, Button, Form, Spin, message, ColorPicker } from 'antd'
import { CloseOutlined } from '@ant-design/icons'
import { setPracticeRandom } from '@/store/modules/editor'
import { DomEditor, SlateEditor, SlateTransforms, SlateElement } from '@wangeditor/editor'
import ListTopic from './components/list'
import CustomerTopic from './components/customer'
import InsertTopic from './components/insert'
import iconPractice from '@/assets/images/icon_practice.png'
import iconClose from '@/assets/images/icon_chapter_close.png'
import { getChapterTopic } from '../utils/request'
import { bookNameList } from './request'
import '../utils/iconfont'
import './index.less'
const PracticeSettingModal = forwardRef((props, ref) => {
const { editor, chapterId, bookId, closePanel } = props;
const dispatch = useDispatch();
const { practiceRandom, practiceTitle, practiceTheme } = useSelector((state) => state.editor);
const [themeValue, setThemeValue] = useState(practiceTheme);
const { editor, chapterId, bookId, closePanel } = props
const dispatch = useDispatch()
const { practiceRandom, practiceTitle, practiceTheme } = useSelector(state => state.editor)
const [themeValue, setThemeValue] = useState(practiceTheme)
const listRef = useRef();
const customerTopicRef = useRef();
const listRef = useRef()
const customerTopicRef = useRef()
const [customerType, setCustomerType] = useState('');
const [practiceTitleVisible, setPracticeTitleVisible] = useState(false); // 是否显示可编辑
const [practiceTitleValue, setPracticeTitleValue] = useState(practiceTitle); // input 标题
const [practiceStatus, setPracticeStatus] = useState(false); // 手动还是自动
const [customerType, setCustomerType] = useState('')
const [practiceTitleVisible, setPracticeTitleVisible] = useState(false) // 是否显示可编辑
const [practiceTitleValue, setPracticeTitleValue] = useState(practiceTitle) // input 标题
const [practiceStatus, setPracticeStatus] = useState(false) // 手动还是自动
// 右边勾选的列表
const [chooseList, setChooseList] = useState([]);
const [chooseList, setChooseList] = useState([])
// 线上的题库
const [onlineList, setOnloneList] = useState([]);
const [onlineList, setOnloneList] = useState([])
// 左边插入的列表
const [insertList, setInsertList] = useState([]);
const [bookNameIdData, setbookNameIdData] = useState([]);
const [insertList, setInsertList] = useState([])
const [bookNameIdData, setbookNameIdData] = useState([])
const getbookNameList = async () => {
const res = await bookNameList({});
setbookNameIdData(res);
};
const res = await bookNameList({})
setbookNameIdData(res)
}
useEffect(() => {
getbookNameList();
}, []);
getbookNameList()
}, [])
const textColorChange = (value, hex) => {
setThemeValue(hex);
};
const textColorChange = value => {
const hex = typeof value === 'string' ? value : value?.toHexString()
setThemeValue(hex)
}
// 获取
const getTopicList = async () => {
const data = await getChapterTopic({
position: practiceRandom,
book_id: bookId,
chapter_id: chapterId,
});
chapter_id: chapterId
})
if (data && data.length > 0) {
let dataSource = [];
let dataSource = []
data.forEach((item, index) => {
dataSource.push({ ...item, choose_id: item.question_id });
});
setOnloneList(dataSource);
dataSource.push({ ...item, choose_id: item.question_id })
})
setOnloneList(dataSource)
if (insertList.length === 0) {
setInsertList(dataSource);
setInsertList(dataSource)
} else {
const tempChoose = [...insertList];
const ids = tempChoose.map((item) => parseInt(item.choose_id));
dataSource.forEach((item) => {
const tempChoose = [...insertList]
const ids = tempChoose.map(item => parseInt(item.choose_id))
dataSource.forEach(item => {
if (!ids.includes(parseInt(item.choose_id))) {
tempChoose.push(item);
tempChoose.push(item)
}
});
setInsertList(tempChoose);
})
setInsertList(tempChoose)
}
if (chooseList.length === 0) {
setChooseList(dataSource);
setChooseList(dataSource)
} else {
const tempChoose = [...chooseList];
const ids = tempChoose.map((item) => parseInt(item.choose_id));
dataSource.forEach((item) => {
const tempChoose = [...chooseList]
const ids = tempChoose.map(item => parseInt(item.choose_id))
dataSource.forEach(item => {
if (!ids.includes(parseInt(item.choose_id))) {
tempChoose.push(item);
tempChoose.push(item)
}
});
setChooseList(tempChoose);
})
setChooseList(tempChoose)
}
}
};
}
useEffect(() => {
if (bookId && chapterId && practiceRandom) {
getTopicList();
getTopicList()
}
}, [bookId, chapterId, practiceRandom]);
}, [bookId, chapterId, practiceRandom])
// 设置标题
const changePracticeTitle = () => {
setPracticeTitleValue(practiceTitle);
setPracticeTitleVisible(true);
};
setPracticeTitleValue(practiceTitle)
setPracticeTitleVisible(true)
}
const submitPracticeTitle = () => {
editor.restoreSelection();
editor.restoreSelection()
const nodeEntries = SlateEditor.nodes(editor, {
match: (node) => {
match: node => {
// JS syntax
if (SlateElement.isElement(node)) {
if (node.type === 'chapterPractice') {
return true; // 匹配 chapterHeader
return true // 匹配 chapterHeader
}
}
return false;
return false
},
universal: true,
});
universal: true
})
if (nodeEntries) {
for (let nodeEntry of nodeEntries) {
const [node, path] = nodeEntry;
const [node, path] = nodeEntry
// console.log('选中了 chapterHeader 节点', node);
// console.log('节点 path 是', path);
if (node.practiceNum === practiceRandom) {
SlateTransforms.setNodes(
editor,
{ ...node, title: practiceTitleValue, theme: themeValue },
{ at: path },
);
dispatch(
setPracticeRandom({ practiceNum: node.practiceNum, practiceTitle: practiceTitleValue }),
);
setPracticeTitleVisible(false);
return false;
SlateTransforms.setNodes(editor, { ...node, title: practiceTitleValue, theme: themeValue }, { at: path })
dispatch(setPracticeRandom({ practiceNum: node.practiceNum, practiceTitle: practiceTitleValue }))
setPracticeTitleVisible(false)
return false
}
}
}
return;
};
return
}
// 添加题目到左边
const addTopicList = () => {
if (chooseList.length === 0) {
message.error('您还没有勾选题目!');
return;
message.error('您还没有勾选题目!')
return
}
const tempChoose = [...insertList];
const ids = tempChoose.map((item) => parseInt(item.choose_id));
chooseList.forEach((item) => {
const tempChoose = [...insertList]
const ids = tempChoose.map(item => parseInt(item.choose_id))
chooseList.forEach(item => {
if (!ids.includes(parseInt(item.choose_id))) {
tempChoose.push(item);
tempChoose.push(item)
}
});
setInsertList(tempChoose);
};
})
setInsertList(tempChoose)
}
const getTopList = () => {
listRef.current.setPage(1);
listRef.current.getTopicTypeList();
};
listRef.current.setPage(1)
listRef.current.getTopicTypeList()
}
return (
<div>
<Row gutter='20' className='practice-topic-row'>
<Col span={12} className='common practice-left'>
<div className='practice-header'>
<div className='practice-l-img'>
<Row gutter="20" className="practice-topic-row">
<Col span={12} className="common practice-left">
<div className="practice-header">
<div className="practice-l-img">
{/* <img src={iconPractice} alt='' /> */}
<svg className='svg-icon' aria-hidden='true'>
<use xlinkHref='#icon-writing'></use>
<svg className="svg-icon" aria-hidden="true">
<use xlinkHref="#icon-writing"></use>
</svg>
</div>
<div className='practice-l-title'>
<div className="practice-l-title">
{!practiceTitleVisible && (
<h2 onClick={changePracticeTitle} className='title'>
<ColorPicker value={themeValue} defaultValue={themeValue} size='small' disabled />
<span className='titles'>{practiceTitle}</span>
<span className='click'>(可点击编辑)</span>
<h2 onClick={changePracticeTitle} className="title">
<ColorPicker value={themeValue} defaultValue={themeValue} size="small" disabled />
<span className="titles">{practiceTitle}</span>
<span className="click">(可点击编辑)</span>
</h2>
)}
{practiceTitleVisible && (
<div style={{ marginTop: 2 }}>
<Space>
<Input
value={practiceTitleValue}
onChange={(e) => setPracticeTitleValue(e.target.value)}
/>
<Input value={practiceTitleValue} onChange={e => setPracticeTitleValue(e.target.value)} />
<div style={{ marginTop: 2 }}>
<ColorPicker
disabledAlpha
value={themeValue}
defaultValue={themeValue}
format='hex'
format="hex"
onChange={textColorChange}
showText
/>
</div>
<Button type='primary' onClick={submitPracticeTitle}>
<Button type="primary" onClick={submitPracticeTitle}>
确定
</Button>
<Button type='default' onClick={() => setPracticeTitleVisible(false)}>
<Button type="default" onClick={() => setPracticeTitleVisible(false)}>
取消
</Button>
</Space>
......@@ -221,7 +199,7 @@ const PracticeSettingModal = forwardRef((props, ref) => {
)}
</div>
</div>
<div className='practice-topic-list'>
<div className="practice-topic-list">
<InsertTopic
insertList={insertList}
setInsertList={setInsertList}
......@@ -234,20 +212,16 @@ const PracticeSettingModal = forwardRef((props, ref) => {
/>
</div>
</Col>
<Col span={12} className='common practice-right'>
<div className='practice-header right'>
<Col span={12} className="common practice-right">
<div className="practice-header right">
<div style={{ marginTop: 5 }}>
<Button type='default' onClick={() => setPracticeStatus(!practiceStatus)}>
<Button type="default" onClick={() => setPracticeStatus(!practiceStatus)}>
{practiceStatus ? '自动添加' : '手动添加'}
</Button>
</div>
<Button
type='link'
icon={<CloseOutlined style={{ color: '#b83956' }} />}
onClick={closePanel}
></Button>
<Button type="link" icon={<CloseOutlined style={{ color: '#b83956' }} />} onClick={closePanel}></Button>
</div>
<div className='practice-topic-list'>
<div className="practice-topic-list">
{practiceStatus ? (
<CustomerTopic
ref={customerTopicRef}
......@@ -273,7 +247,7 @@ const PracticeSettingModal = forwardRef((props, ref) => {
</Col>
</Row>
</div>
);
});
)
})
export default PracticeSettingModal;
export default PracticeSettingModal
......@@ -2,7 +2,7 @@ import axios from 'axios'
import md5 from 'js-md5'
import qs from 'qs'
import { Modal, notification } from 'antd'
import Sm4js from 'sm4js'
import { sm4 as Sm4js } from 'evit-gm-crypt'
const sm4 = new Sm4js({
key: 'XDXDXU_ZIJING_01',
......
......@@ -5,7 +5,7 @@ import md5 from 'js-md5'
import { get } from 'lodash-es'
import { sortObjASCII } from '@/utils/common.js'
import qs from 'qs'
import Sm4js from 'sm4js'
import { sm4 as Sm4js } from 'evit-gm-crypt'
const sm4 = new Sm4js({
key: 'XDXDXU_ZIJING_01',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论