|
@@ -192,6 +192,15 @@ export default function AI() {
|
|
|
|
|
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ const tjcolumns = React.useMemo(
|
|
|
|
|
+ () => [
|
|
|
|
|
+ { field: '组价定额', headerName: '组价定额', width : 250 , sortable: false, renderCell: RenderDe},
|
|
|
|
|
+ { field: '定额名称', headerName: '定额名称', width : 250, sortable: false, renderCell: RenderDemc },
|
|
|
|
|
+ { field: '综合单价', headerName: '综合单价', },
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
);
|
|
);
|
|
|
const Style = {
|
|
const Style = {
|
|
|
position: "absolute",
|
|
position: "absolute",
|
|
@@ -219,11 +228,13 @@ export default function AI() {
|
|
|
const [frequency, setFrequency] = React.useState([]);
|
|
const [frequency, setFrequency] = React.useState([]);
|
|
|
const [qddetail, setQddetail] = React.useState([]);
|
|
const [qddetail, setQddetail] = React.useState([]);
|
|
|
const [zjdetail, setZjdetail] = React.useState([]);
|
|
const [zjdetail, setZjdetail] = React.useState([]);
|
|
|
|
|
+ const [tjdetail, setTjdetail] = React.useState([]);
|
|
|
const [open, setOpen] = React.useState(false);
|
|
const [open, setOpen] = React.useState(false);
|
|
|
const [dopen, setDopen] = React.useState(false);
|
|
const [dopen, setDopen] = React.useState(false);
|
|
|
const [bopen, setBopen] = React.useState(false);
|
|
const [bopen, setBopen] = React.useState(false);
|
|
|
const [type, setType] = React.useState();
|
|
const [type, setType] = React.useState();
|
|
|
const [zjloading, setZjloading] = React.useState(false);
|
|
const [zjloading, setZjloading] = React.useState(false);
|
|
|
|
|
+ const [tjloading, setTjloading] = React.useState(false);
|
|
|
const [cjloading, setCjloading] = React.useState(false);
|
|
const [cjloading, setCjloading] = React.useState(false);
|
|
|
const [gploading, setGploading] = React.useState(false);
|
|
const [gploading, setGploading] = React.useState(false);
|
|
|
const [zhuanye, setZhuanye] = React.useState(10);
|
|
const [zhuanye, setZhuanye] = React.useState(10);
|
|
@@ -341,8 +352,9 @@ export default function AI() {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const onSelect = (selectedKeys, info) => {
|
|
const onSelect = (selectedKeys, info) => {
|
|
|
- setZjloading(true);
|
|
|
|
|
|
|
+
|
|
|
if (!selectedKeys.hasOwnProperty("children") || selectedKeys['children'].length == 0) {
|
|
if (!selectedKeys.hasOwnProperty("children") || selectedKeys['children'].length == 0) {
|
|
|
|
|
+ setZjloading(true);
|
|
|
console.log(selectedKeys['id']);
|
|
console.log(selectedKeys['id']);
|
|
|
AIService.qingdan(selectedKeys['title']).then(x=>{
|
|
AIService.qingdan(selectedKeys['title']).then(x=>{
|
|
|
setQddetail(x);
|
|
setQddetail(x);
|
|
@@ -449,6 +461,9 @@ export default function AI() {
|
|
|
setZhuanye(event.target.value);
|
|
setZhuanye(event.target.value);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const minHeight = 100;
|
|
|
|
|
+const maxHeight = 400;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<Box sx={{ display: 'flex' }}>
|
|
<Box sx={{ display: 'flex' }}>
|
|
@@ -652,6 +667,14 @@ export default function AI() {
|
|
|
localeText={zh_CN.components.MuiDataGrid.defaultProps.localeText}
|
|
localeText={zh_CN.components.MuiDataGrid.defaultProps.localeText}
|
|
|
/>
|
|
/>
|
|
|
<Title>历史组价</Title>
|
|
<Title>历史组价</Title>
|
|
|
|
|
+ <div
|
|
|
|
|
+ style={{
|
|
|
|
|
+ minHeight,
|
|
|
|
|
+ maxHeight,
|
|
|
|
|
+
|
|
|
|
|
+ "overflow-y": "scroll"
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
<DataGrid autoHeight hideFooter={true}
|
|
<DataGrid autoHeight hideFooter={true}
|
|
|
getRowHeight={() => 'auto'}
|
|
getRowHeight={() => 'auto'}
|
|
|
rows={zjdetail} columns={zjcolumns}
|
|
rows={zjdetail} columns={zjcolumns}
|
|
@@ -659,6 +682,26 @@ export default function AI() {
|
|
|
loading={zjloading}
|
|
loading={zjloading}
|
|
|
localeText={zh_CN.components.MuiDataGrid.defaultProps.localeText}
|
|
localeText={zh_CN.components.MuiDataGrid.defaultProps.localeText}
|
|
|
/>
|
|
/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <Title>AI推荐</Title>
|
|
|
|
|
+ <div
|
|
|
|
|
+ style={{
|
|
|
|
|
+
|
|
|
|
|
+ "overflow-y": "scroll",
|
|
|
|
|
+
|
|
|
|
|
+ minHeight,
|
|
|
|
|
+ maxHeight
|
|
|
|
|
+
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ <DataGrid autoHeight hideFooter={true}
|
|
|
|
|
+ getRowHeight={() => 'auto'}
|
|
|
|
|
+ rows={tjdetail} columns={tjcolumns}
|
|
|
|
|
+ disableColumnMenu={true}
|
|
|
|
|
+ loading={tjloading}
|
|
|
|
|
+ localeText={zh_CN.components.MuiDataGrid.defaultProps.localeText}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</Paper>
|
|
</Paper>
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|