@yoooloo42/joker 1.0.215 → 1.0.216

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -22796,11 +22796,36 @@ const reload = async _ref2 => {
22796
22796
  ElMessage(result.code === 0 ? '数据已重载' : '数据重载错误');
22797
22797
  };
22798
22798
 
22799
- // 获取页面数据附加
22800
- const getPgData = async _ref3 => {
22799
+ // 页记录数改变
22800
+ const pageSizeChange = async _ref3 => {
22801
22801
  let {
22802
+ pageSize,
22802
22803
  scopeThis
22803
22804
  } = _ref3;
22805
+ scopeThis.query.pageSize = pageSize;
22806
+ scopeThis.query.currentPage = 1;
22807
+ await reload({
22808
+ scopeThis
22809
+ });
22810
+ };
22811
+
22812
+ // 当前页码改变
22813
+ const currentPageChange = async _ref4 => {
22814
+ let {
22815
+ currentPage,
22816
+ scopeThis
22817
+ } = _ref4;
22818
+ scopeThis.query.currentPage = currentPage;
22819
+ await reload({
22820
+ scopeThis
22821
+ });
22822
+ };
22823
+
22824
+ // 获取页面数据附加
22825
+ const getPgData = async _ref5 => {
22826
+ let {
22827
+ scopeThis
22828
+ } = _ref5;
22804
22829
  const result = await ly0request.storpro({
22805
22830
  storproName: scopeThis.storpro.getPgData,
22806
22831
  data: scopeThis.pgData && scopeThis.pgData.query ? scopeThis.pgData.query : null
@@ -22816,10 +22841,12 @@ const getPgData = async _ref3 => {
22816
22841
  };
22817
22842
 
22818
22843
  // 初始化
22819
- const init = async _ref4 => {
22844
+ const init = async _ref6 => {
22820
22845
  let {
22821
22846
  scopeThis
22822
- } = _ref4;
22847
+ } = _ref6;
22848
+ scopeThis.tableProps.table.hdlPageSizeChanged = pageSizeChange;
22849
+ scopeThis.tableProps.table.hdlCurrentPageChanged = currentPageChange;
22823
22850
  if (scopeThis.pgData) {
22824
22851
  await getPgData({
22825
22852
  scopeThis
@@ -22831,10 +22858,10 @@ const init = async _ref4 => {
22831
22858
  };
22832
22859
 
22833
22860
  // 弹出 - 查询
22834
- const popupFind = async _ref5 => {
22861
+ const popupFind = async _ref7 => {
22835
22862
  let {
22836
22863
  scopeThis
22837
- } = _ref5;
22864
+ } = _ref7;
22838
22865
  unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.query.formData);
22839
22866
  scopeThis.tableData.sort = JSON.parse(JSON.stringify(scopeThis.query.sort));
22840
22867
  scopeThis.tableData.pageSize = scopeThis.query.pageSize;
@@ -22847,10 +22874,10 @@ const popupFind = async _ref5 => {
22847
22874
  };
22848
22875
 
22849
22876
  // 弹出 - 新增一条记录
22850
- const popupInsertOne = async _ref6 => {
22877
+ const popupInsertOne = async _ref8 => {
22851
22878
  let {
22852
22879
  scopeThis
22853
- } = _ref6;
22880
+ } = _ref8;
22854
22881
  unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.insertOne.formData);
22855
22882
  unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.insertOne.formProps);
22856
22883
  // 弹出窗口
@@ -22860,11 +22887,11 @@ const popupInsertOne = async _ref6 => {
22860
22887
  };
22861
22888
 
22862
22889
  // 弹出 - 修改一条记录
22863
- const popupUpdateOne = async _ref7 => {
22890
+ const popupUpdateOne = async _ref9 => {
22864
22891
  let {
22865
22892
  scopeThis,
22866
22893
  row
22867
- } = _ref7;
22894
+ } = _ref9;
22868
22895
  unclassified.deepClone.replaceObject(scopeThis.formData, row); // 继承行记录的值
22869
22896
  unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.updateOne.formProps);
22870
22897
  // 弹出窗口
@@ -22874,11 +22901,11 @@ const popupUpdateOne = async _ref7 => {
22874
22901
  };
22875
22902
 
22876
22903
  // 弹出 - 详细信息
22877
- const popupDoc = async _ref8 => {
22904
+ const popupDoc = async _ref0 => {
22878
22905
  let {
22879
22906
  scopeThis,
22880
22907
  row
22881
- } = _ref8;
22908
+ } = _ref0;
22882
22909
  unclassified.deepClone.replaceObject(scopeThis.formData, row); // 继承行记录的值
22883
22910
  unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.doc.formProps);
22884
22911
  // 弹出窗口
@@ -22888,10 +22915,10 @@ const popupDoc = async _ref8 => {
22888
22915
  };
22889
22916
 
22890
22917
  // 提交 - 查询
22891
- const submitFind = async _ref9 => {
22918
+ const submitFind = async _ref1 => {
22892
22919
  let {
22893
22920
  scopeThis
22894
- } = _ref9;
22921
+ } = _ref1;
22895
22922
  unclassified.deepClone.replaceObject(scopeThis.query.formData, scopeThis.formData);
22896
22923
  scopeThis.query.sort = JSON.parse(JSON.stringify(scopeThis.tableData.sort));
22897
22924
  scopeThis.query.pageSize = scopeThis.tableData.pageSize;
@@ -22909,10 +22936,10 @@ const submitFind = async _ref9 => {
22909
22936
  };
22910
22937
 
22911
22938
  // 提交 - 新增一条记录
22912
- const submitInsertOne = async _ref0 => {
22939
+ const submitInsertOne = async _ref10 => {
22913
22940
  let {
22914
22941
  scopeThis
22915
- } = _ref0;
22942
+ } = _ref10;
22916
22943
  try {
22917
22944
  await ElMessageBox.confirm('新增一条记录, 提交?', '提示', {
22918
22945
  confirmButtonText: '确认',
@@ -22948,10 +22975,10 @@ const submitInsertOne = async _ref0 => {
22948
22975
  };
22949
22976
 
22950
22977
  // 提交 - 修改一条记录
22951
- const submitUpdateOne = async _ref1 => {
22978
+ const submitUpdateOne = async _ref11 => {
22952
22979
  let {
22953
22980
  scopeThis
22954
- } = _ref1;
22981
+ } = _ref11;
22955
22982
  try {
22956
22983
  await ElMessageBox.confirm('修改一条记录, 提交?', '提示', {
22957
22984
  confirmButtonText: '确认',
@@ -22983,11 +23010,11 @@ const submitUpdateOne = async _ref1 => {
22983
23010
  };
22984
23011
 
22985
23012
  // 提交 - 删除一条记录
22986
- const submitDeleteOne = async _ref10 => {
23013
+ const submitDeleteOne = async _ref12 => {
22987
23014
  let {
22988
23015
  scopeThis,
22989
23016
  row
22990
- } = _ref10;
23017
+ } = _ref12;
22991
23018
  try {
22992
23019
  await ElMessageBox.confirm('删除一条记录, 提交?', '警告', {
22993
23020
  confirmButtonText: '确认',
@@ -23019,6 +23046,8 @@ const submitDeleteOne = async _ref10 => {
23019
23046
  var withTable = {
23020
23047
  refresh,
23021
23048
  reload,
23049
+ pageSizeChange,
23050
+ currentPageChange,
23022
23051
  getPgData,
23023
23052
  init,
23024
23053
  popupFind,
@@ -42041,13 +42070,19 @@ const hdl = {
42041
42070
  }
42042
42071
  },
42043
42072
  pageSizeChange(pageSize) {
42044
- // 重新分页
42073
+ // 页记录数改变
42045
42074
  tableData_box.pageSize = pageSize;
42046
42075
  tableData_box.currentPage = 1;
42076
+ if(tableProps_box.table.hdlPageSizeChange){
42077
+ tableProps_box.table.hdlPageSizeChange({pageSize, scopeThis: scopeThis_box});
42078
+ }
42047
42079
  },
42048
42080
  currentPageChange(currentPage) {
42049
- // 修改当前页号
42081
+ // 当前页码改变
42050
42082
  tableData_box.currentPage = currentPage;
42083
+ if(tableProps_box.table.hdlCurrentPageChange){
42084
+ tableProps_box.table.hdlCurrentPageChange({currentPage, scopeThis: scopeThis_box});
42085
+ }
42051
42086
  }
42052
42087
  };
42053
42088