Commit 150d513c7b0b7c7740b02b39795f27ca7bb9eaa1

Authored by Min
1 parent 0960448f

1.处理下拉表格再某些条件下,显示错位异常bug

src/components/Common/CommonComponent/index.js
... ... @@ -982,44 +982,46 @@ export default class CommonComponent extends Component {
982 982 });
983 983  
984 984 return (
985   - <Option key="" className="select-table-option">
986   - <div
987   - style={{ width: scrollX + 8, maxWidth: "calc(100vw - 16px)", minWidth: "100%" }}
988   - ref={ref => {
989   - this.selectTableRef1 = ref;
  985 + <div
  986 + className="select-table-option ant-dropdown-menu ant-dropdown-menu-vertical"
  987 + // className="select-table-option"
  988 + style={{
  989 + width: scrollX + 8,
  990 + maxWidth: "calc(100vw - 16px)",
  991 + minWidth: "100%",
  992 + }}
  993 + ref={ref => { this.selectTableRef1 = ref; }}
  994 + >
  995 + <Table
  996 + size="small"
  997 + className="select-table"
  998 + rowClassName={(_, index) => {
  999 + return selectTableIndex === index ? "selected-record-row" : "";
990 1000 }}
991   - >
992   - <Table
993   - size="small"
994   - className="select-table"
995   - rowClassName={(_, index) => {
996   - return selectTableIndex === index ? "selected-record-row" : "";
997   - }}
998   - rowKey="sId"
999   - onRow={(record, index) => {
1000   - return {
1001   - index,
1002   - onMouseEnter: () => {
1003   - this.setState({
1004   - selectTableIndex: index,
1005   - });
1006   - },
1007   - onClick: () => {
1008   - this.setState({ tempCurrentPage: null, bDropDownOpen: false, bNotFirstEnter: true });
1009   - this.handleSelectOptionEvent(record.sSlaveId || record.sId);
1010   - },
1011   - };
1012   - }}
1013   - pagination={false}
1014   - scroll={{
1015   - y: 256 - 10 - 29 - 32,
1016   - x: scrollX,
1017   - }}
1018   - dataSource={selectTableData}
1019   - columns={columns}
1020   - />
1021   - </div>
1022   - </Option>
  1001 + rowKey="sId"
  1002 + onRow={(record, index) => {
  1003 + return {
  1004 + index,
  1005 + onMouseEnter: () => {
  1006 + this.setState({
  1007 + selectTableIndex: index,
  1008 + });
  1009 + },
  1010 + onClick: () => {
  1011 + this.setState({ tempCurrentPage: null, bDropDownOpen: false, bNotFirstEnter: true });
  1012 + this.handleSelectOptionEvent(record.sSlaveId || record.sId);
  1013 + },
  1014 + };
  1015 + }}
  1016 + pagination={false}
  1017 + scroll={{
  1018 + y: 256 - 10 - 29 - 32,
  1019 + x: scrollX,
  1020 + }}
  1021 + dataSource={selectTableData}
  1022 + columns={columns}
  1023 + />
  1024 + </div>
1023 1025 );
1024 1026 };
1025 1027  
... ... @@ -1263,7 +1265,7 @@ export default class CommonComponent extends Component {
1263 1265 </>
1264 1266 );
1265 1267 }
1266   - const removeExtension = (filename) => {
  1268 + const removeExtension = (filename) => {
1267 1269 const lastDotIndex = filename.lastIndexOf('.');
1268 1270 if (lastDotIndex === -1) {
1269 1271 // 如果字符串中没有点,则返回原字符串
... ...
src/default.less
... ... @@ -7,6 +7,8 @@
7 7 .select-table-option {
8 8 max-width: 100wh;
9 9 overflow: hidden;
  10 + background-color: #ff4d4f;
  11 + padding: 8px;
10 12  
11 13 .select-table {
12 14 td {
... ... @@ -16,6 +18,9 @@
16 18 white-space: nowrap;
17 19 }
18 20 }
  21 + .ant-table-body{
  22 + overflow-x: hidden!important;
  23 + }
19 24 }
20 25  
21 26 .select-search {
... ... @@ -756,10 +761,10 @@ tbody {
756 761 .ant-tabs:not(.noXlyTabs) {
757 762 .ant-tabs-nav-wrap {
758 763 background: #fff;
759   -
  764 +
760 765 .ant-tabs-nav-list {
761 766 background: #fff;
762   -
  767 +
763 768 .ant-tabs-tab {
764 769 border: 1px solid #d9d9d9;
765 770 border-right: 0;
... ... @@ -768,17 +773,17 @@ tbody {
768 773 line-height: 30px;
769 774 margin-left: 0;
770 775 background: #fafafa;
771   -
  776 +
772 777 &:nth-last-of-type(2) {
773 778 border-right: 1px solid #d9d9d9;
774 779 }
775 780 }
776   -
  781 +
777 782 .ant-tabs-tab-active {
778 783 border-bottom: 1px solid transparent;
779 784 background: #fff;
780 785 }
781   -
  786 +
782 787 .ant-tabs-ink-bar {
783 788 top: 0;
784 789 bottom: unset;
... ... @@ -1248,4 +1253,4 @@ tbody {
1248 1253 .ant-tooltip-arrow {
1249 1254 display: block;
1250 1255 }
1251   -}
1252 1256 \ No newline at end of file
  1257 +}
... ...
src/utils/config.js
... ... @@ -9,10 +9,11 @@ const API = process.env.API;
9 9 const bHttps = localStorage.ipAddress ? false : location.protocol === 'https:';
10 10 export const webSite = {
11 11 faceAddress: isDev ? '//km5cjx.gnway.cc:36867/xlyFace' : '//' + location.host + '/xlyFace',
  12 + // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
12 13 ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
13 14  
14 15 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//118.178.19.35:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
15   - // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  16 + // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:37845/xlyEntry/' : '//' + location.host + '/xlyEntry/',
16 17 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
17 18 interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
18 19 fileAddress: isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/', // 接口地址
... ...