diff --git a/src/pages/plan/add/plan-copy.js b/src/pages/plan/add/plan-copy.js index 55c68bb5..0bcc08bb 100644 --- a/src/pages/plan/add/plan-copy.js +++ b/src/pages/plan/add/plan-copy.js @@ -104,7 +104,7 @@ export default class add extends React.Component { */ getDetails(plan_id) { let copy_count_golod = sessionStorage.getItem("copy_count_golod"); - getDraftInfo(plan_id).then((res) => { + get_copy_data(plan_id).then((res) => { console.log("res 1=>", res); handelResponse( res, diff --git a/src/pages/plan/keyList/index.jsx b/src/pages/plan/keyList/index.jsx index cd4af2fb..d077ce81 100644 --- a/src/pages/plan/keyList/index.jsx +++ b/src/pages/plan/keyList/index.jsx @@ -270,7 +270,12 @@ const UseKeyList = (props, ref) => { */ const onQueryBtn = () => { dispatch({ type: "setHash", payload: "" }); - getTable({ hash: null }); + let data = { + page: 1, + limit: 10, + hash: null, + }; + getTable(data); }; /** @@ -280,6 +285,7 @@ const UseKeyList = (props, ref) => { setLodgingTable(false); setTableData([]); setDataCount(0); + dispatch({ type: "setHash", payload: "" }); }; /** @@ -409,6 +415,18 @@ const UseKeyList = (props, ref) => { tag = true; } } + // 如果用户勾选的数据 只导出 + if (selectTable.length > 0) { + let key_arr = []; + key_arr = selectTable.map((item) => { + return item.key; + }); + param = { + keys: key_arr.join(","), + }; + tag = true; + } + if (tag) { exportKey(param).then((res) => { if (res.type == "application/json") { @@ -433,6 +451,7 @@ const UseKeyList = (props, ref) => { }; const selectionFun = (data) => { + console.log("data select =>", data); if (data.length > 0) { setMultipleDisabledBtn(false); } else { @@ -531,20 +550,19 @@ const UseKeyList = (props, ref) => { const onPageChange = (e) => { dispatch({ type: "setPages", payload: { page: e } }); - getTable({ page: e }); + getTable({ page: e, hash: state.hash }); }; const onCountChange = (e) => { console.log("2", e); dispatch({ type: "setPages", payload: { page: 1, limit: e } }); - getTable({ page: 1, limit: e }); + getTable({ page: 1, limit: e, hash: state.hash }); }; const bachOnClose = () => { setBachUploadPop({ ...bachUploadPop, bachVisible: false }); }; const bachImportBtn = (data) => { - console.log("setHash =>", data); if (bachUploadPop.bachApiType === 1) { dispatch({ type: "setHash", payload: data }); getTable({ hash: data }); @@ -579,8 +597,6 @@ const UseKeyList = (props, ref) => { return; } }; - - const onSwitchChange = () => {}; return (