Merge branch 'clickCopyv1.4' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into clickCopyv1.4

This commit is contained in:
wangsongsole 2022-08-12 18:34:47 +08:00
commit 272b9dd921
2 changed files with 23 additions and 7 deletions

View File

@ -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,

View File

@ -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 (
<div className="key-container" id="dislist">
<TabPage tabs={tabList} style={{ paddingBottom: 0 }}>