dev_tpm_ui
杨树明 5 years ago
parent c6edcb832a
commit fd465c376d

@ -164,7 +164,7 @@ export default class Shixuninformation extends Component {
axios.post(url, axios.post(url,
{ {
scope_partment: list, scope_partment:use_scope===0?undefined:list,
shixun: { shixun: {
can_copy: can_copy, can_copy: can_copy,
use_scope: use_scope, use_scope: use_scope,
@ -213,7 +213,6 @@ export default class Shixuninformation extends Component {
if(scope_partment.length>0){ if(scope_partment.length>0){
scope_partment.map((item, key) => { scope_partment.map((item, key) => {
if (item === e) { if (item === e) {
debugger
scopetype = true scopetype = true
} }
}) })
@ -222,7 +221,6 @@ export default class Shixuninformation extends Component {
if(oldscope_partment.length>0){ if(oldscope_partment.length>0){
oldscope_partment.map((item, key) => { oldscope_partment.map((item, key) => {
if (item === e) { if (item === e) {
debugger
scopetype = true scopetype = true
} }
}) })

@ -219,7 +219,6 @@ function JupyterTPI (props) {
title: '重置环境', title: '重置环境',
content: ( content: (
<p style={{ lineHeight: '24px' }}> <p style={{ lineHeight: '24px' }}>
你在本文件中修改的内容将丢失,<br />
是否确定重置环境 是否确定重置环境
</p> </p>
), ),
@ -277,20 +276,22 @@ function JupyterTPI (props) {
const firstDrawerWidth = ()=>{ const firstDrawerWidth = ()=>{
return 260 return 260
}; };
let newPage=false
// 分页处理 // 分页处理
const handleChangePage = (e) => { const handleChangePage = (e,page) => {
//滑动到底判断 //滑动到底判断
let newscrollTop=parseInt(e.currentTarget.scrollTop); let newscrollTop=parseInt(e.currentTarget.scrollTop);
let allclientHeight=e.currentTarget.clientHeight+newscrollTop; let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){ if(dataSets.length<total){
handlePageChange(pagination.page+1); if(e.currentTarget.scrollHeight-allclientHeight===0||e.currentTarget.scrollHeight-allclientHeight===1||e.currentTarget.scrollHeight-allclientHeight===-1){
handlePageChange(page+1);
}
} }
} }
// const listCtx = ; // const listCtx = ;
useEffect(() => { useEffect(() => {
if (dataSets.length > 0) { if (dataSets.length > 0) {
console.log('数据集的个数: ', dataSets.length); // console.log('数据集的个数: ', dataSets.length);
const oList = dataSets.map((item, i) => { const oList = dataSets.map((item, i) => {
return ( return (
<li className="jupyter_item" key={`key_${i}`}> <li className="jupyter_item" key={`key_${i}`}>
@ -314,7 +315,7 @@ function JupyterTPI (props) {
}); });
const oUl = ( const oUl = (
<ul className="jupyter_data_list" onScroll={(event)=>handleChangePage(event)} > <ul className="jupyter_data_list" onScroll={(event)=>handleChangePage(event,pagination.page)} >
{ oList } { oList }
</ul> </ul>
); );
@ -413,7 +414,7 @@ function JupyterTPI (props) {
<i className={"iconfont icon-base"}></i> <i className={"iconfont icon-base"}></i>
{/* <span className="iconfont icon-java jupyter_data_icon"></span>数据集 */} {/* <span className="iconfont icon-java jupyter_data_icon"></span>数据集 */}
</h2> </h2>
<h2 className="borbottom17212F jupyterfilepaths"> {dataSets&&dataSets.length===0?"":<h2 className="borbottom17212F jupyterfilepaths">
<span className={"ml50"}>文件路径</span> <span className={"ml50"}>文件路径</span>
<div className="sortinxdirection"> <div className="sortinxdirection">
<a className="jupyter_name ml50 maxnamewidth186JUPYTER lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a> <a className="jupyter_name ml50 maxnamewidth186JUPYTER lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a>
@ -423,7 +424,7 @@ function JupyterTPI (props) {
}}>复制地址</a> }}>复制地址</a>
</div> </div>
<input id="jupyter_folder_name" className={"file_path_input"} value={jupyter_folder_name}/> <input id="jupyter_folder_name" className={"file_path_input"} value={jupyter_folder_name}/>
</h2> </h2>}
{ renderCtx } { renderCtx }
{/*<div className='jupyter_pagination'>*/} {/*<div className='jupyter_pagination'>*/}
{/* {total<20?"":<Pagination*/} {/* {total<20?"":<Pagination*/}

@ -132,7 +132,7 @@
.jupyter_data_list{ .jupyter_data_list{
height:500px; height:500px;
overflow: auto; overflow-y: auto;
} }
.ant-pagination{ .ant-pagination{

Loading…
Cancel
Save