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