@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.cjs.js CHANGED
@@ -22800,11 +22800,36 @@ const reload = async _ref2 => {
22800
22800
  elementPlus.ElMessage(result.code === 0 ? '数据已重载' : '数据重载错误');
22801
22801
  };
22802
22802
 
22803
- // 获取页面数据附加
22804
- const getPgData = async _ref3 => {
22803
+ // 页记录数改变
22804
+ const pageSizeChange = async _ref3 => {
22805
22805
  let {
22806
+ pageSize,
22806
22807
  scopeThis
22807
22808
  } = _ref3;
22809
+ scopeThis.query.pageSize = pageSize;
22810
+ scopeThis.query.currentPage = 1;
22811
+ await reload({
22812
+ scopeThis
22813
+ });
22814
+ };
22815
+
22816
+ // 当前页码改变
22817
+ const currentPageChange = async _ref4 => {
22818
+ let {
22819
+ currentPage,
22820
+ scopeThis
22821
+ } = _ref4;
22822
+ scopeThis.query.currentPage = currentPage;
22823
+ await reload({
22824
+ scopeThis
22825
+ });
22826
+ };
22827
+
22828
+ // 获取页面数据附加
22829
+ const getPgData = async _ref5 => {
22830
+ let {
22831
+ scopeThis
22832
+ } = _ref5;
22808
22833
  const result = await ly0request$1.storpro({
22809
22834
  storproName: scopeThis.storpro.getPgData,
22810
22835
  data: scopeThis.pgData && scopeThis.pgData.query ? scopeThis.pgData.query : null
@@ -22820,10 +22845,12 @@ const getPgData = async _ref3 => {
22820
22845
  };
22821
22846
 
22822
22847
  // 初始化
22823
- const init = async _ref4 => {
22848
+ const init = async _ref6 => {
22824
22849
  let {
22825
22850
  scopeThis
22826
- } = _ref4;
22851
+ } = _ref6;
22852
+ scopeThis.tableProps.table.hdlPageSizeChanged = pageSizeChange;
22853
+ scopeThis.tableProps.table.hdlCurrentPageChanged = currentPageChange;
22827
22854
  if (scopeThis.pgData) {
22828
22855
  await getPgData({
22829
22856
  scopeThis
@@ -22835,10 +22862,10 @@ const init = async _ref4 => {
22835
22862
  };
22836
22863
 
22837
22864
  // 弹出 - 查询
22838
- const popupFind = async _ref5 => {
22865
+ const popupFind = async _ref7 => {
22839
22866
  let {
22840
22867
  scopeThis
22841
- } = _ref5;
22868
+ } = _ref7;
22842
22869
  unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.query.formData);
22843
22870
  scopeThis.tableData.sort = JSON.parse(JSON.stringify(scopeThis.query.sort));
22844
22871
  scopeThis.tableData.pageSize = scopeThis.query.pageSize;
@@ -22851,10 +22878,10 @@ const popupFind = async _ref5 => {
22851
22878
  };
22852
22879
 
22853
22880
  // 弹出 - 新增一条记录
22854
- const popupInsertOne = async _ref6 => {
22881
+ const popupInsertOne = async _ref8 => {
22855
22882
  let {
22856
22883
  scopeThis
22857
- } = _ref6;
22884
+ } = _ref8;
22858
22885
  unclassified.deepClone.replaceObject(scopeThis.formData, scopeThis.insertOne.formData);
22859
22886
  unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.insertOne.formProps);
22860
22887
  // 弹出窗口
@@ -22864,11 +22891,11 @@ const popupInsertOne = async _ref6 => {
22864
22891
  };
22865
22892
 
22866
22893
  // 弹出 - 修改一条记录
22867
- const popupUpdateOne = async _ref7 => {
22894
+ const popupUpdateOne = async _ref9 => {
22868
22895
  let {
22869
22896
  scopeThis,
22870
22897
  row
22871
- } = _ref7;
22898
+ } = _ref9;
22872
22899
  unclassified.deepClone.replaceObject(scopeThis.formData, row); // 继承行记录的值
22873
22900
  unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.updateOne.formProps);
22874
22901
  // 弹出窗口
@@ -22878,11 +22905,11 @@ const popupUpdateOne = async _ref7 => {
22878
22905
  };
22879
22906
 
22880
22907
  // 弹出 - 详细信息
22881
- const popupDoc = async _ref8 => {
22908
+ const popupDoc = async _ref0 => {
22882
22909
  let {
22883
22910
  scopeThis,
22884
22911
  row
22885
- } = _ref8;
22912
+ } = _ref0;
22886
22913
  unclassified.deepClone.replaceObject(scopeThis.formData, row); // 继承行记录的值
22887
22914
  unclassified.deepClone.replaceObject(scopeThis.formProps, scopeThis.doc.formProps);
22888
22915
  // 弹出窗口
@@ -22892,10 +22919,10 @@ const popupDoc = async _ref8 => {
22892
22919
  };
22893
22920
 
22894
22921
  // 提交 - 查询
22895
- const submitFind = async _ref9 => {
22922
+ const submitFind = async _ref1 => {
22896
22923
  let {
22897
22924
  scopeThis
22898
- } = _ref9;
22925
+ } = _ref1;
22899
22926
  unclassified.deepClone.replaceObject(scopeThis.query.formData, scopeThis.formData);
22900
22927
  scopeThis.query.sort = JSON.parse(JSON.stringify(scopeThis.tableData.sort));
22901
22928
  scopeThis.query.pageSize = scopeThis.tableData.pageSize;
@@ -22913,10 +22940,10 @@ const submitFind = async _ref9 => {
22913
22940
  };
22914
22941
 
22915
22942
  // 提交 - 新增一条记录
22916
- const submitInsertOne = async _ref0 => {
22943
+ const submitInsertOne = async _ref10 => {
22917
22944
  let {
22918
22945
  scopeThis
22919
- } = _ref0;
22946
+ } = _ref10;
22920
22947
  try {
22921
22948
  await elementPlus.ElMessageBox.confirm('新增一条记录, 提交?', '提示', {
22922
22949
  confirmButtonText: '确认',
@@ -22952,10 +22979,10 @@ const submitInsertOne = async _ref0 => {
22952
22979
  };
22953
22980
 
22954
22981
  // 提交 - 修改一条记录
22955
- const submitUpdateOne = async _ref1 => {
22982
+ const submitUpdateOne = async _ref11 => {
22956
22983
  let {
22957
22984
  scopeThis
22958
- } = _ref1;
22985
+ } = _ref11;
22959
22986
  try {
22960
22987
  await elementPlus.ElMessageBox.confirm('修改一条记录, 提交?', '提示', {
22961
22988
  confirmButtonText: '确认',
@@ -22987,11 +23014,11 @@ const submitUpdateOne = async _ref1 => {
22987
23014
  };
22988
23015
 
22989
23016
  // 提交 - 删除一条记录
22990
- const submitDeleteOne = async _ref10 => {
23017
+ const submitDeleteOne = async _ref12 => {
22991
23018
  let {
22992
23019
  scopeThis,
22993
23020
  row
22994
- } = _ref10;
23021
+ } = _ref12;
22995
23022
  try {
22996
23023
  await elementPlus.ElMessageBox.confirm('删除一条记录, 提交?', '警告', {
22997
23024
  confirmButtonText: '确认',
@@ -23023,6 +23050,8 @@ const submitDeleteOne = async _ref10 => {
23023
23050
  var withTable = {
23024
23051
  refresh,
23025
23052
  reload,
23053
+ pageSizeChange,
23054
+ currentPageChange,
23026
23055
  getPgData,
23027
23056
  init,
23028
23057
  popupFind,
@@ -42045,13 +42074,19 @@ const hdl = {
42045
42074
  }
42046
42075
  },
42047
42076
  pageSizeChange(pageSize) {
42048
- // 重新分页
42077
+ // 页记录数改变
42049
42078
  tableData_box.pageSize = pageSize;
42050
42079
  tableData_box.currentPage = 1;
42080
+ if(tableProps_box.table.hdlPageSizeChange){
42081
+ tableProps_box.table.hdlPageSizeChange({pageSize, scopeThis: scopeThis_box});
42082
+ }
42051
42083
  },
42052
42084
  currentPageChange(currentPage) {
42053
- // 修改当前页号
42085
+ // 当前页码改变
42054
42086
  tableData_box.currentPage = currentPage;
42087
+ if(tableProps_box.table.hdlCurrentPageChange){
42088
+ tableProps_box.table.hdlCurrentPageChange({currentPage, scopeThis: scopeThis_box});
42089
+ }
42055
42090
  }
42056
42091
  };
42057
42092