浏览代码

support 换

Xiaopeng Zhang 6 月之前
父节点
当前提交
bf2b22962f
共有 8 个文件被更改,包括 308 次插入53 次删除
  1. 2 0
      README
  2. 205 34
      front/src/App2.js
  3. 60 12
      front/src/Qingdan.js
  4. 26 6
      front/src/Service.js
  5. 5 0
      front/src/editor.js
  6. 2 1
      front/src/utils.js
  7. 5 0
      main.py
  8. 3 0
      subdir/service.py

+ 2 - 0
README

@@ -0,0 +1,2 @@
+JD_PeiBiF 表很有用,它可以用来找一个材料的组成。
+举个例子,810078NT3 是陶粒混凝土CL20,他是由中沙,水泥,陶粒组成,这个关系在JD_PeiBiF立面可以查到·

+ 205 - 34
front/src/App2.js

@@ -3,6 +3,10 @@ import Box from "@mui/material/Box";
 import 'handsontable/dist/handsontable.full.min.css';
 //import 'handsontable/styles/ht-theme-main.min.css';
 import { styled, alpha } from '@mui/material/styles';
+import Paper from '@mui/material/Paper';
+import TextField from '@mui/material/TextField';
+import InputAdornment from '@mui/material/InputAdornment';
+import CancelIcon from '@mui/icons-material/Cancel';
 
 import { HandsonTable } from 'handsontable/base';
 import {HotTable} from "@handsontable/react";
@@ -35,6 +39,23 @@ import { DataGrid } from '@mui/x-data-grid';
 import Backdrop from '@mui/material/Backdrop';
 import CircularProgress from '@mui/material/CircularProgress';
 import { TreeItem, treeItemClasses } from '@mui/x-tree-view/TreeItem';
+import Dialog from '@mui/material/Dialog';
+import DialogTitle from '@mui/material/DialogTitle';
+import DialogContent from '@mui/material/DialogContent';
+import DialogActions from '@mui/material/DialogActions';
+import IconButton from '@mui/material/IconButton';
+import CloseIcon from '@mui/icons-material/Close';
+import SearchIcon from '@mui/icons-material/Search';
+
+import {
+  Toolbar,
+  ToolbarButton,
+  QuickFilter,
+  QuickFilterControl,
+  QuickFilterClear,
+  QuickFilterTrigger,
+} from '@mui/x-data-grid';
+import Tooltip from '@mui/material/Tooltip';
 
 registerAllModules();
 const MUI_X_PRODUCTS = [
@@ -96,7 +117,88 @@ const MUI_X_PRODUCTS = [
    
   }));
 
+  const StyledToolbarButton = styled(ToolbarButton)(({ theme, ownerState }) => ({
+    gridArea: '1 / 1',
+    width: 'min-content',
+    height: 'min-content',
+    zIndex: 1,
+    opacity: ownerState.expanded ? 0 : 1,
+    pointerEvents: ownerState.expanded ? 'none' : 'auto',
+    transition: theme.transitions.create(['opacity']),
+  }));
 
+  const StyledQuickFilter = styled(QuickFilter)({
+    display: 'grid',
+    alignItems: 'center',
+    marginLeft: 'auto',
+  });
+
+  const StyledTextField = styled(TextField)(({ theme, ownerState }) => ({
+    gridArea: '1 / 1',
+    overflowX: 'clip',
+    width: ownerState.expanded ? 260 : 'var(--trigger-width)',
+    opacity: ownerState.expanded ? 1 : 0,
+    transition: theme.transitions.create(['width', 'opacity']),
+  }));
+  
+
+  function CustomToolbar() {
+    return (
+      <Toolbar>
+        <StyledQuickFilter defaultExpanded>
+          <QuickFilterTrigger
+            render={(triggerProps, state) => (
+              <Tooltip title="搜索" enterDelay={0}>
+                <StyledToolbarButton
+                  {...triggerProps}
+                  ownerState={{ expanded: state.expanded }}
+                  color="default"
+                  aria-disabled={state.expanded}
+                >
+                  <SearchIcon fontSize="small" />
+                </StyledToolbarButton>
+              </Tooltip>
+            )}
+          />
+          <QuickFilterControl
+            render={({ ref, ...controlProps }, state) => (
+              <StyledTextField
+                {...controlProps}
+                ownerState={{ expanded: state.expanded }}
+                inputRef={ref}
+                aria-label="搜索"
+                placeholder="搜索"
+                size="small"
+                slotProps={{
+                  input: {
+                    startAdornment: (
+                      <InputAdornment position="start">
+                        <SearchIcon fontSize="small" />
+                      </InputAdornment>
+                    ),
+                    endAdornment: state.value ? (
+                      <InputAdornment position="end">
+                        <QuickFilterClear
+                          edge="end"
+                          size="small"
+                          aria-label="清除"
+                          material={{ sx: { marginRight: -0.75 } }}
+                        >
+                          <CancelIcon fontSize="small" />
+                        </QuickFilterClear>
+                      </InputAdornment>
+                    ) : null,
+                    ...controlProps.slotProps?.input,
+                  },
+                  ...controlProps.slotProps,
+                }}
+              />
+            )}
+          />
+        </StyledQuickFilter>
+      </Toolbar>
+    );
+  }
 
 
   export default function App2() {
@@ -130,7 +232,12 @@ const MUI_X_PRODUCTS = [
     const [clde, setClde] = React.useState(null);
     const [jxde, setJxde] = React.useState(null);
     const [open, setOpen] = React.useState(false);
+    const [dopen, setDopen] = React.useState(false);
+    
     const [dingeclick, setDingeclick] = React.useState(null);
+    const [tihuanClick, setTihuanClick] = React.useState(null);
+    const tihuanRowRef = React.useRef(null);
+
     const relation = React.useRef({});
     const columns =[
     
@@ -142,7 +249,7 @@ const MUI_X_PRODUCTS = [
     const columns2 =[
     
       {field: '编号', headerName: '定额编号'},
-      {field: '名称', headerName: '名称'}, 
+      {field: '名称', headerName: '名称', width: 200}, 
       {field: '单位', headerName: '单位'},
       {field: '单价', headerName: '单价'}
     ];
@@ -196,6 +303,16 @@ const MUI_X_PRODUCTS = [
       });
     };
 
+    const tihuanCallback = (row, col) => {
+        setDopen(true);
+        tihuanRowRef.current = row;
+    };
+
+    const handleClose = () => {
+      setDopen(false);
+    };
+  
+
     const clickCallback = (qdbm, debh) => {
       console.log('####################################zylb#####################'.concat(zylb.toString()));
        //console.log(debh);
@@ -406,6 +523,20 @@ const MUI_X_PRODUCTS = [
     };
 
 
+    const handleEvent = (A) => {
+      let state = {
+        'time': Date.now(),
+        'newBianhao': A.row['编号'],
+        'newName': A.row['名称'],
+        'newJia': A.row['单价'],
+        'old' : tihuanRowRef.current
+      };
+      setTihuanClick(JSON.stringify(state));
+      setDopen(false);
+      
+    };
+
+
      const handleChangeAccord = (panel) => (event, newExpanded) => {
           if (panel == 'qingdan') {
              setExpandedQd(newExpanded);
@@ -419,7 +550,7 @@ const MUI_X_PRODUCTS = [
     const handleItemSelectionTogglePbs = (event, itemId, isSelected) => {
       if (isSelected) {
         console.log(itemId);
-        if (["3", "4", "6", "7", "8", "9", "11", "12", "13", "15", "16", "18", "19", "20", "21"].includes(itemId)) {
+        if (["0", "3", "4", "6", "7", "8", "9", "11", "12", "13", "15", "16", "18", "19", "20", "21"].includes(itemId)) {
             Service.generatePeibiXilie(itemId).then(x=>{
                 let y = JSON.parse(x);
                 console.log(y);
@@ -731,38 +862,7 @@ const MUI_X_PRODUCTS = [
                    </Stack>
                    </AccordionDetails>
                  </Accordion>
-                <Accordion expanded={expandedPb} disableGutters
-                     onChange={handleChangeAccord('peibi')}>
-                   <AccordionSummary
-                     expandIcon={<ExpandMoreIcon />}
-                     aria-controls="panel1-content"
-                     id="panel1-header"
-                   >
-                     <Typography component="span">配合比</Typography>
-                   </AccordionSummary>
-                   <AccordionDetails>
-                   <Stack spacing={1}>
-                     <RichTreeView sx={{overflow: "scroll", maxHeight: "38vh"}}
-                             slots={{ item: CustomTreeItem }}
-
-                     onItemSelectionToggle={handleItemSelectionTogglePbs}
-                     items={peibishu}/>
-                    <div style={{ height: 350 }}>
-
-                    <DataGrid
-                      sx={{
-                        '& .MuiDataGrid-cell': {
-                          fontSize: '0.8rem', // Adjust font size for cells
-                        }}}
-                       getRowHeight={() => 'auto'}
-                      rows={pbXilie}
-                      columns={columns2}
-                      hideFooter={true}
-                     />
-                    </div>
-                   </Stack>
-                   </AccordionDetails>
-                 </Accordion>
+            
 
 
 
@@ -820,6 +920,8 @@ const MUI_X_PRODUCTS = [
                                 clickCallback={clickCallback}
                                 loadingCallback={loadingCallback}
                                 dingeclick={dingeclick}
+                                tihuanCallback={tihuanCallback}
+                                tihuanClick={tihuanClick}
                              />                     
                      </TabPanel>
                       )}
@@ -861,7 +963,76 @@ const MUI_X_PRODUCTS = [
           >
                 <CircularProgress color="inherit" />
          </Backdrop>
+         <Dialog
+           onClose={handleClose}
+           aria-labelledby="customized-dialog-title"
+           open={dopen}
+           fullWidth={true}
+           maxWidth="md"
+          >
+            <DialogTitle sx={{ m: 0, p: 2 }} id="customized-dialog-title">
+             替换
+            </DialogTitle>
+            <IconButton
+             aria-label="close"
+             onClick={handleClose}
+             sx={(theme) => ({
+               position: 'absolute',
+               right: 8,
+               top: 8,
+               color: theme.palette.grey[500],
+             })}
+            >
+             <CloseIcon />
+            </IconButton>
+            <DialogContent dividers>
+            <Stack  direction="row" spacing={2}>
+               
+               <RichTreeView sx={{
+                      overflow: "scroll", 
+                      maxHeight: "350px",
+                      minWidth: "250px"
+                  }}
+                             slots={{ item: CustomTreeItem }}
+
+                     onItemSelectionToggle={handleItemSelectionTogglePbs}
+                     items={peibishu}/>
+               
+              
+               <div style={{ height: 350 }}>
+
+                    <DataGrid disableColumnMenu
+                      sx={{
+                        '& .MuiDataGrid-cell': {
+                          fontSize: '0.8rem', // Adjust font size for cells
+                        }}}
+                       getRowHeight={() => 'auto'}
+                      rows={pbXilie}
+                      onRowDoubleClick={handleEvent}
+                      columns={columns2}
+                      hideFooter={false}
+                      disableColumnFilter
+                      disableColumnSelector
+                      disableDensitySelector
+                      showToolbar
+                      slots={{ toolbar: CustomToolbar }}
+                      localeText={{
+                        noRowsLabel: '无数据',
+                        paginationRowsPerPage: '每页行数',
+                        footerRowSelected: (count) => `共选中了${count.toLocaleString()}行`,
+                       
+                        
+                      }}
+                     />
+                    </div>
+              
+             
+              
+            </Stack>
+          
           
+           </DialogContent>
+         </Dialog>
             
         </Box>
     );

+ 60 - 12
front/src/Qingdan.js

@@ -4,7 +4,7 @@ import 'handsontable/dist/handsontable.full.min.css';
 //import 'handsontable/styles/ht-theme-main.min.css';
 import { HandsonTable } from 'handsontable/base';
 import { Table, ConfigProvider } from "antd";
-import {HotTable} from "@handsontable/react";
+import {HotTable} from "@handsontable/react-wrapper";
 import { registerAllModules } from 'handsontable/registry';
 import {RichTreeView } from "@mui/x-tree-view/RichTreeView";
 import { Grid } from '@mui/material';
@@ -20,12 +20,15 @@ import { textRenderer, registerRenderer } from 'handsontable/renderers';
 import Button from '@mui/material/Button';
 import ButtonGroup from '@mui/material/ButtonGroup';
 import {extractFuzhu} from './utils';
-import {shanchu, undo, redo, quanbushanchu, danxiangdinge, updateDercj, changguidinge, handleBeizhu} from './editor';
+import {shanchu, undo, redo, quanbushanchu, danxiangdinge, updateDercj, changguidinge, handleBeizhu, huan} from './editor';
 import { ConfigValueTooSmallError, HyperFormula } from 'hyperformula';
 import Backdrop from '@mui/material/Backdrop';
 import CircularProgress from '@mui/material/CircularProgress';
 import { DataGrid } from '@mui/x-data-grid';
-
+import { useHotEditor } from "@handsontable/react-wrapper";
+import Dialog from '@mui/material/Dialog';
+import DialogTitle from '@mui/material/DialogTitle';
+import DialogContent from '@mui/material/DialogContent';
 registerAllModules();
 
 
@@ -46,13 +49,11 @@ function copy(input) {
 
 
 
-export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuFK, clickCallback, loadingCallback, dingeclick}) {
+export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuFK, clickCallback, loadingCallback, dingeclick, tihuanCallback, tihuanClick}) {
 
 
      
 
-
-
      const hyperformulaInstance = HyperFormula.buildEmpty({
           // to use an external HyperFormula instance,
           // initialize it with the `'internal-use-in-handsontable'` license key
@@ -87,6 +88,9 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
          }
          
        });
+
+
+    const lastClickRef = React.useRef(null);
  
 
 
@@ -109,7 +113,7 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
         "综合人工工日" : null,
         "备注" : null}]
     );
-    const [value, setValue] = React.useState("1");
+    const [valueTab, setValueTab] = React.useState("1");
     const [rcjhl, setRcjhl] = React.useState([]);
     const [rcjhl2, setRcjhl2] = React.useState([]);
     const [fuzhu, setFuzhu] = React.useState([]);
@@ -214,6 +218,25 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
                
           }, [dingeclick]//常规添加定额
       );
+
+      React.useEffect(
+          () => {
+               //console.log(dingeclick);
+               if (selectedRowKeys.length > 0 ) {
+                    const data = huan(JSON.parse(tihuanClick), selectedRowKeys[0]);
+                    
+                    setDetail(data);
+                    detailRef.current = data;
+                         
+                    handleSelection(selectedRowKeys);
+                         
+
+                         //setExpandedRowKeys([...expandedRowKeys, selectedRowKeys[0]]);
+                    
+               }
+               
+          }, [tihuanClick]//替换定额人材机
+      );
     React.useEffect(
         () => {
           //console.log("rgde changed");
@@ -312,7 +335,7 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
 
 
       const handleChange = (event, newValue) => {
-        setValue(newValue);
+        setValueTab(newValue);
       };
 
       const afterChange = (changes, source) => {
@@ -332,6 +355,20 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
           }
         };
 
+        const afterOnCellMouseDown = (event, coord, TD) => {
+          
+          if (lastClickRef.current == null) {
+               lastClickRef.current = Date.now();
+          } else {
+               let origin = lastClickRef.current;
+               lastClickRef.current = Date.now();
+               let delta = lastClickRef.current - origin;
+               if (delta < 300 && coord.col == 1 && coord.row > 0 && !isQdrcj.current){//300 ms -> 换
+                   tihuanCallback(coord.row, coord.col);
+               }
+          }
+        };
+
       const afterUpdateData = (x, initial, source)=>{
           
               console.log(source);
@@ -532,6 +569,7 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
 
                   
                    </Stack>
+                   <Box sx={{minHeight: `calc(100vh - 340px)`}}>
                    <ConfigProvider
                    theme={{
                     components: {
@@ -570,7 +608,8 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
                             }
                     })}
                     scroll={{ x: 'max-content' , y : 'calc(100vh - 400px)'}}
-                    pagination={{ position: ['none', 'none'] }}
+                    //pagination={{ position: ['none', 'none'] }}
+                    pagination={false}
                     columns = {[
                          
                          { dataIndex: '操作',        title : '操作',        key : '操作'          , width : 30 , fixed: 'left'   },
@@ -603,10 +642,11 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
                    
                   />
                   </ConfigProvider>
+                  </Box>
                   </Box>
                    <Box >
                    
-                   <TabContext value={value}>
+                   <TabContext value={valueTab}>
                        <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
                          <TabList sx={{minHeight: '24px'}} onChange={handleChange} aria-label="lab API tabs example">
                            <Tab sx={{p: 0, minHeight: '24px'}} label="人材机含量" value="1" />
@@ -640,7 +680,7 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
                                         return { readOnly: true, renderer: "customStylesRenderer" };
                                    }
                            
-                                   return {renderer: "customStylesRenderer"};
+                                   return {renderer: "customStylesRenderer" };
                                  }}
                              fixedRowsTop={1}
                              selectionMode="single"
@@ -648,6 +688,7 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
                              autoWrapCol={false}
                              ref = {hotRcjRef}
                              afterChange={afterChange}
+                             afterOnCellMouseDown={afterOnCellMouseDown}
                              licenseKey="non-commercial-and-evaluation" // for non-commercial use only
                            >
                               
@@ -673,8 +714,15 @@ export default function Qingdan({name, bh, bt, rgde, jxde, clde, beizhu, beizhuF
 
                        </TabPanel>
                        <TabPanel sx={{p: 1}} value="3">
-                          <DataGrid 
+                          <DataGrid  disableColumnMenu
                           getRowHeight={(params) => "auto"}
+                          localeText={{
+                              noRowsLabel: '无数据',
+                              paginationRowsPerPage: '每页行数',
+                              footerRowSelected: (count) => `共选中了${count.toLocaleString()}行`,
+                             
+                              
+                            }}
                           columns={
                               [
                                    { field: '序号', headerName: '序号', },

+ 26 - 6
front/src/Service.js

@@ -988,7 +988,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
         let huan = false;//换
         let qd = this.cache.filter(x=>x["children"].filter(y=>y['key']==row).length > 0)[0];
         let de = qd["children"].filter(x=>x['key'] == row)[0];
-        if (de.hasOwnProperty("rcjdg")) {
+        if (de.hasOwnProperty("rcjdg")) {//新数据
             for (let i = 1; i < de['rcjdg'].length; i++) {
                 de['rcjdg'][i][5] = data[i][5];//更新单价
                 /****ToDo 更新其他字段 */
@@ -999,7 +999,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
                 }
             }
 
-            if (de['fuzhuEnable'] && de.hasOwnProperty('fuzhu')) {
+            if (de['fuzhuEnable'] && de.hasOwnProperty('fuzhu')) {//没强行改过含量
                 
                 for(let j = 1; j < de['rcjdg'].length; j++) {
                     let origin = Number(de['rcjdg'][j][10]);
@@ -1014,7 +1014,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
 
                             } else if (selected[2] == '含量') {
                                 origin = Number(selected[3]);
-                            } else if (selected['调整']) {
+                            } else if (selected[2] == '调整') {
                                 origin = origin + Number(selected[3]);
                             } else {
                                 throw new Error('无法处理的附注'.concat(selected[2]));
@@ -1025,6 +1025,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
 
                     }
                     de['dercj'][j][2] = data[j][2];//名称
+                    de['dercj'][j][1] = data[j][1];//编号
                     de['dercj'][j][5] = de['rcjdg'][j][5];
                     de['dercj'][j][10] =  origin;
                     de['dercj'][j][11] = Number(de['dercj'][j][5]) * origin;
@@ -1035,6 +1036,8 @@ async generateQingdanTuijian(name, bh, bt, bm) {
                     let origin = Number(de['rcjdg'][j][10]);
                     
                     de['dercj'][j][2] = data[j][2];//名称
+                    de['dercj'][j][1] = data[j][1];//编号
+
                     de['dercj'][j][5] = de['rcjdg'][j][5];
                     de['dercj'][j][10] =  origin;
                     de['dercj'][j][11] = Number(de['dercj'][j][5]) * origin;
@@ -1049,7 +1052,7 @@ async generateQingdanTuijian(name, bh, bt, bm) {
 
             
             data = de['dercj'];
-        } else {////单项定额没有底稿
+        } else {////单项定额没有底稿,老数据没底搞,无法判断换部换,暂时统一认为不换
             //强行改含量
             de['dercj'] = copy(data);
             data = de['dercj'];
@@ -1147,8 +1150,8 @@ async generateQingdanTuijian(name, bh, bt, bm) {
         let de = qd["children"].filter(x=>x['key'] == row)[0];
         if (de.hasOwnProperty("rcjdg")) {//底稿
 
-        } else {
-            de['rcjdg'] = copy(de['dercj']);
+        } else {///老数据不能有底稿,附注功能也不使能
+            //de['rcjdg'] = copy(de['dercj']);
 
         }
         de['fuzhu'] = copy(selected);
@@ -1167,6 +1170,23 @@ async generateQingdanTuijian(name, bh, bt, bm) {
         this.cache = copy(summarized);
         return [copy(this.cache), copy(de['dercj'])];
 
+    }
+
+    huan(old_index, new_bianhao, new_name, new_jia, row) {
+        let qd = this.cache.filter(x=>x["children"].filter(y=>y['key']==row).length > 0)[0];
+        let de = qd["children"].filter(x=>x['key'] == row)[0];
+        let rcj = copy(de['dercj']);
+        rcj[old_index][1] = new_bianhao;
+        rcj[old_index][2] = new_name;
+        rcj[old_index][5] = new_jia;
+
+        return this.updateDercj(row, rcj);
+
+
+
+
+
+
     }
 
 

+ 5 - 0
front/src/editor.js

@@ -48,6 +48,11 @@ export const updateDercj = (row, data) => {
 
 };
 
+export const huan = (replaceState, row) => {
+    return Service.huan(replaceState['old'],replaceState['newBianhao'],replaceState['newName'], replaceState['newJia'], row);
+
+};
+
 export const changguidinge = (dingeclick, selectedRow) => {
     return Service.changguidinge(dingeclick, selectedRow);
 

+ 2 - 1
front/src/utils.js

@@ -38,9 +38,10 @@ export const renameDingE = (oldname, xuhao, huan) => {
         raw = raw.concat("附注");
         raw = raw.concat(xuhao[i].toString());
     }
-    if (huan) {
+    if (huan && raw.indexOf('换') == -1) {
         raw = raw.concat('换');
     }
+    
     return raw;
 };
 

+ 5 - 0
main.py

@@ -6,6 +6,8 @@ import uuid
 import re
 import json
 from fastapi.middleware.cors import CORSMiddleware
+from fastapi.middleware.gzip import GZipMiddleware
+
 from pydantic import BaseModel
 from subdir import service
 from subdir import db
@@ -55,6 +57,8 @@ app.add_middleware(
     allow_methods=["*"],
     allow_headers=["*"],
 )
+app.add_middleware(GZipMiddleware, minimum_size=1000, compresslevel=5)
+
 app.mount("/static", StaticFiles(directory="front/dist"), name="static")
 manager = ConnectionManager()
 
@@ -387,6 +391,7 @@ async def read_des(r: DingeshuRequest):
 async def read_pbs(r: DingeshuRequest):
     result = service.getPbs(r.value)
     #print(result)
+    result.insert(0, {"id": "0", "label": "全部"})
     return result
 
 @app.post("/pbxl/")

+ 3 - 0
subdir/service.py

@@ -920,6 +920,9 @@ def getDeXilie(value, id):
     return filtered.to_json(force_ascii=False)
 
 def getPbxl(name):
+    if name == "0":
+        gj = pd.read_csv("de/tj/JD_PeiBi.csv")
+        return gj.to_json(force_ascii=False)
     shu = pd.read_csv("de/tj/JD_PeiBiFLB.csv")
     hit = shu[shu["ID"]==int(name)]
     print(hit)