@fmdeui/fmui 1.0.101 → 1.0.102

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.
@@ -25,4 +25,5 @@ export declare function getFormItemLabel(field: string, defaultValue: string): s
25
25
  * @returns 表格字段是否显示
26
26
  */
27
27
  export declare function showTabelColumn(field: string): boolean;
28
- export declare function getSubFormFields(packName: string): any;
28
+ export declare function getSubFormFields(flag: string): any;
29
+ export declare function getShowColumn(flag: string, field: string): boolean;
package/es/index.mjs CHANGED
@@ -30,7 +30,7 @@ export { flowLoading } from './packages/utils/flowLoading.mjs';
30
30
  export { formatAxis, formatDate, formatPast, getWeek } from './packages/utils/formatTime.mjs';
31
31
  export { gcj02ToBd09, wgs84ToBd09, wgs84ToGcj02 } from './packages/utils/gpsConvertor.mjs';
32
32
  export { getFileUrl, showFileUrl } from './packages/utils/uploadfileurl.mjs';
33
- export { getFormItemLabel, getFormItemProp, getRules, getSubFormFields, getlimit, showTabelColumn } from './packages/hooks/limitsFunction.mjs';
33
+ export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getSubFormFields, getlimit, showTabelColumn } from './packages/hooks/limitsFunction.mjs';
34
34
  export { getpower, powerAuthDel } from './packages/hooks/powerFunction.mjs';
35
35
  export { judgementIdCard, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl } from './packages/utils/toolsValidate.mjs';
36
36
  export { loadSysInfo, updateFavicon } from './packages/hooks/sysInfo.mjs';
@@ -32,7 +32,7 @@ function authDirective(app) {
32
32
  var _a, _b, _c, _d;
33
33
  const stores = useUserInfo();
34
34
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
35
- const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
35
+ const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
36
36
  if (itemField && itemField.isTable == 0) el.parentNode.removeChild(el);
37
37
  }
38
38
  });
@@ -41,7 +41,7 @@ function authDirective(app) {
41
41
  var _a, _b, _c, _d;
42
42
  const stores = useUserInfo();
43
43
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
44
- const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
44
+ const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
45
45
  if (itemField && itemField.isQuery == 0) el.parentNode.removeChild(el);
46
46
  }
47
47
  });
@@ -50,7 +50,7 @@ function authDirective(app) {
50
50
  var _a, _b, _c, _d;
51
51
  const stores = useUserInfo();
52
52
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
53
- const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
53
+ const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
54
54
  if (itemField && itemField.isAddUpdate == 0) el.parentNode.removeChild(el);
55
55
  }
56
56
  });
@@ -7,4 +7,4 @@ export { cmpId, depId, getOpOrg, groupId, hasPrivilege, hasRoleCode, isAdmin, is
7
7
  export { useDateTimeShortCust } from './dateTimeShortCust.mjs';
8
8
  export { destroyIdleTimeout, initIdleTimeout, updateIdleTimeout } from './idleTimeout.mjs';
9
9
  export { provideFormEvents, useFormEvents } from './composables/useDialogEvents.mjs';
10
- export { getFormItemLabel, getFormItemProp, getRules, getSubFormFields, getlimit, showTabelColumn } from './limitsFunction.mjs';
10
+ export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getSubFormFields, getlimit, showTabelColumn } from './limitsFunction.mjs';
@@ -12,7 +12,7 @@ function getRules(field, msg) {
12
12
  var _a, _b, _c, _d;
13
13
  const stores = useUserInfo();
14
14
  const route = useRoute();
15
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
15
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
16
16
  let rels = [];
17
17
  if (ItemField) {
18
18
  if (ItemField.isRequired == 1)
@@ -26,7 +26,7 @@ function getFormItemProp(field) {
26
26
  var _a, _b, _c, _d;
27
27
  const stores = useUserInfo();
28
28
  const route = useRoute();
29
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
29
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
30
30
  if (ItemField) {
31
31
  return ItemField.isRequired == 1 || ItemField.isFromValid > 0 ? field : "";
32
32
  }
@@ -36,7 +36,7 @@ function getFormItemLabel(field, defaultValue) {
36
36
  var _a, _b, _c, _d;
37
37
  const stores = useUserInfo();
38
38
  const route = useRoute();
39
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
39
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
40
40
  if (ItemField) {
41
41
  return ItemField.title && ItemField.title != "" ? ItemField.title : defaultValue;
42
42
  }
@@ -46,7 +46,7 @@ function showTabelColumn(field) {
46
46
  var _a, _b, _c, _d;
47
47
  const stores = useUserInfo();
48
48
  const route = useRoute();
49
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
49
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
50
50
  if (ItemField) {
51
51
  if (ItemField.isTable == 1)
52
52
  return true;
@@ -55,11 +55,24 @@ function showTabelColumn(field) {
55
55
  }
56
56
  return true;
57
57
  }
58
- function getSubFormFields(packName) {
58
+ function getSubFormFields(flag) {
59
59
  var _a, _b, _c;
60
60
  const stores = useUserInfo();
61
61
  const route = useRoute();
62
- return ((_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === packName)) == null ? void 0 : _c.formData.filter((item) => (item == null ? void 0 : item.isAddUpdate) === 1).map((item) => ({ field: item.field, width: typeof item.width === "number" ? item.width : 0 }))) || [];
62
+ return ((_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData.filter((item) => (item == null ? void 0 : item.isAddUpdate) === 1).map((item) => ({ field: item.field, width: typeof item.width === "number" ? item.width : 0 }))) || [];
63
+ }
64
+ function getShowColumn(flag, field) {
65
+ var _a, _b, _c, _d;
66
+ const stores = useUserInfo();
67
+ const route = useRoute();
68
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
69
+ if (ItemField) {
70
+ if (ItemField.isAddUpdate == 1)
71
+ return true;
72
+ else if (ItemField.isAddUpdate == 0)
73
+ return false;
74
+ }
75
+ return true;
63
76
  }
64
77
 
65
- export { getFormItemLabel, getFormItemProp, getRules, getSubFormFields, getlimit, showTabelColumn };
78
+ export { getFormItemLabel, getFormItemProp, getRules, getShowColumn, getSubFormFields, getlimit, showTabelColumn };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! fmdeui-fmui v1.0.101 */
1
+ /*! fmdeui-fmui v1.0.102 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('vue-router'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', 'vue-router', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
@@ -3958,7 +3958,7 @@
3958
3958
  var _a, _b, _c, _d;
3959
3959
  const stores = useUserInfo();
3960
3960
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
3961
- const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
3961
+ const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
3962
3962
  if (itemField && itemField.isTable == 0) el.parentNode.removeChild(el);
3963
3963
  }
3964
3964
  });
@@ -3967,7 +3967,7 @@
3967
3967
  var _a, _b, _c, _d;
3968
3968
  const stores = useUserInfo();
3969
3969
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
3970
- const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
3970
+ const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
3971
3971
  if (itemField && itemField.isQuery == 0) el.parentNode.removeChild(el);
3972
3972
  }
3973
3973
  });
@@ -3976,7 +3976,7 @@
3976
3976
  var _a, _b, _c, _d;
3977
3977
  const stores = useUserInfo();
3978
3978
  const config = typeof binding.value === "string" ? { path: binding.value, field: "" } : binding.value;
3979
- const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
3979
+ const itemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === config.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === config.field);
3980
3980
  if (itemField && itemField.isAddUpdate == 0) el.parentNode.removeChild(el);
3981
3981
  }
3982
3982
  });
@@ -20828,7 +20828,7 @@
20828
20828
  var _a, _b, _c, _d;
20829
20829
  const stores = useUserInfo();
20830
20830
  const route = vueRouter.useRoute();
20831
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20831
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20832
20832
  let rels = [];
20833
20833
  if (ItemField) {
20834
20834
  if (ItemField.isRequired == 1)
@@ -20842,7 +20842,7 @@
20842
20842
  var _a, _b, _c, _d;
20843
20843
  const stores = useUserInfo();
20844
20844
  const route = vueRouter.useRoute();
20845
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20845
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20846
20846
  if (ItemField) {
20847
20847
  return ItemField.isRequired == 1 || ItemField.isFromValid > 0 ? field : "";
20848
20848
  }
@@ -20852,7 +20852,7 @@
20852
20852
  var _a, _b, _c, _d;
20853
20853
  const stores = useUserInfo();
20854
20854
  const route = vueRouter.useRoute();
20855
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20855
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20856
20856
  if (ItemField) {
20857
20857
  return ItemField.title && ItemField.title != "" ? ItemField.title : defaultValue;
20858
20858
  }
@@ -20862,7 +20862,7 @@
20862
20862
  var _a, _b, _c, _d;
20863
20863
  const stores = useUserInfo();
20864
20864
  const route = vueRouter.useRoute();
20865
- const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20865
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === "main")) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20866
20866
  if (ItemField) {
20867
20867
  if (ItemField.isTable == 1)
20868
20868
  return true;
@@ -20871,11 +20871,24 @@
20871
20871
  }
20872
20872
  return true;
20873
20873
  }
20874
- function getSubFormFields(packName) {
20874
+ function getSubFormFields(flag) {
20875
20875
  var _a, _b, _c;
20876
20876
  const stores = useUserInfo();
20877
20877
  const route = vueRouter.useRoute();
20878
- return ((_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.packName === packName)) == null ? void 0 : _c.formData.filter((item) => (item == null ? void 0 : item.isAddUpdate) === 1).map((item) => ({ field: item.field, width: typeof item.width === "number" ? item.width : 0 }))) || [];
20878
+ return ((_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData.filter((item) => (item == null ? void 0 : item.isAddUpdate) === 1).map((item) => ({ field: item.field, width: typeof item.width === "number" ? item.width : 0 }))) || [];
20879
+ }
20880
+ function getShowColumn(flag, field) {
20881
+ var _a, _b, _c, _d;
20882
+ const stores = useUserInfo();
20883
+ const route = vueRouter.useRoute();
20884
+ const ItemField = (_d = (_c = (_b = (_a = (stores.userInfos.formDes || []).find((f) => f.path === route.path)) == null ? void 0 : _a.formData) == null ? void 0 : _b.find((pack) => pack.flag === flag)) == null ? void 0 : _c.formData) == null ? void 0 : _d.find((item) => (item == null ? void 0 : item.field) === field);
20885
+ if (ItemField) {
20886
+ if (ItemField.isAddUpdate == 1)
20887
+ return true;
20888
+ else if (ItemField.isAddUpdate == 0)
20889
+ return false;
20890
+ }
20891
+ return true;
20879
20892
  }
20880
20893
 
20881
20894
  const _hoisted_1$u = { key: 0 };
@@ -31987,6 +32000,7 @@
31987
32000
  exports.getJWTDate = getJWTDate;
31988
32001
  exports.getOpOrg = getOpOrg;
31989
32002
  exports.getRules = getRules;
32003
+ exports.getShowColumn = getShowColumn;
31990
32004
  exports.getSubFormFields = getSubFormFields;
31991
32005
  exports.getToken = getToken;
31992
32006
  exports.getWeek = getWeek;