@qqt-product/system 0.0.2 → 0.0.17

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.
Files changed (179) hide show
  1. package/dist/index.es.js +53481 -10448
  2. package/dist/index.umd.js +94 -22
  3. package/dist/lib/components/QAccountList/src/QAccountCreate.vue.d.ts +2881 -0
  4. package/dist/lib/components/QAccountList/src/QAccountDetail.vue.d.ts +2874 -0
  5. package/dist/lib/components/QAccountList/src/QAccountEdit.vue.d.ts +2882 -0
  6. package/dist/lib/components/QAccountList/src/QAccountList.vue.d.ts +23 -4
  7. package/dist/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue.d.ts +9 -4
  8. package/dist/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue.d.ts +9 -4
  9. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue.d.ts +2867 -0
  10. package/dist/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue.d.ts +2 -3
  11. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue.d.ts +2867 -0
  12. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue.d.ts +2879 -0
  13. package/dist/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue.d.ts +38 -14
  14. package/dist/lib/components/QI18nList/src/QI18nList.vue.d.ts +2 -6
  15. package/dist/lib/components/QImChatGroupList/src/QImChatGroupList.vue.d.ts +5 -8
  16. package/dist/lib/components/QMqRecordList/src/QMqRecordList.vue.d.ts +9 -4
  17. package/dist/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue.d.ts +387 -3
  18. package/dist/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue.d.ts +2875 -0
  19. package/dist/lib/components/QPermissionDataList/src/QPermissionDataList.vue.d.ts +126 -0
  20. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue.d.ts +2867 -0
  21. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue.d.ts +2890 -0
  22. package/dist/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue.d.ts +25 -5
  23. package/dist/lib/components/QPurchaseNoticeList/src/use-field-select-modal-hook.d.ts +7 -0
  24. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue.d.ts +222 -28
  25. package/dist/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateModal.vue.d.ts +45 -0
  26. package/dist/lib/components/QQuartzJobList/src/QQuartzJobList.vue.d.ts +24 -5
  27. package/dist/lib/components/QRoleList/src/QRoleList.vue.d.ts +32 -7
  28. package/dist/lib/components/QRoleList/src/components/userAuthorization/index.d.ts +4 -4
  29. package/dist/lib/components/QRoleList/src/useConfigData.d.ts +1 -11
  30. package/dist/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue.d.ts +25 -4
  31. package/dist/lib/components/QSupplierAccountList/src/useConfigData.d.ts +9 -0
  32. package/dist/lib/components/QUsageList/src/QUsageList.vue.d.ts +15 -35
  33. package/dist/lib/components/QUsageList/src/useConfigData.d.ts +111 -10
  34. package/dist/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue.d.ts +25 -0
  35. package/dist/lib/components/QcustomConfigEdit/component/regexComponent.d.ts +9 -10
  36. package/dist/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue.d.ts +1208 -0
  37. package/dist/lib/components/QcustomConfigEdit/src/useConfigData.d.ts +1 -1
  38. package/dist/lib/components/QcustomConfigList/src/QcustomConfigList.vue.d.ts +8 -7
  39. package/dist/lib/components/QsysConfigList/src/QsysConfigList.vue.d.ts +2 -3
  40. package/dist/lib/components/index.d.ts +2 -2
  41. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue.d.ts +2866 -0
  42. package/dist/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue.d.ts +2875 -0
  43. package/dist/lib/components/integratedNodesList/src/index.vue.d.ts +8 -11
  44. package/dist/lib/components/integratedReportSearchList/src/index.vue.d.ts +16 -10
  45. package/dist/lib/components/loginAbnormalLogList/src/index.vue.d.ts +2 -9
  46. package/dist/lib/components/loginLogList/src/index.vue.d.ts +2 -8
  47. package/dist/lib/components/loginSupplierLogList/src/index.vue.d.ts +2 -12
  48. package/dist/lib/components/operateLogList/src/index.vue.d.ts +2 -13
  49. package/dist/style.css +1 -1
  50. package/dist/vite-env.d.ts +13 -13
  51. package/package.json +24 -11
  52. package/.eslintignore +0 -4
  53. package/.eslintrc.cjs +0 -22
  54. package/.prettierignore +0 -4
  55. package/.prettierrc.cjs +0 -41
  56. package/.vscode/extensions.json +0 -3
  57. package/dist/lib/components/QCompanyermissionList/src/form.vue.d.ts +0 -80
  58. package/dist/lib/components/QCompanyermissionList/src/types.d.ts +0 -44
  59. package/dist/lib/components/integratedReportList/src/index.vue.d.ts +0 -70
  60. package/dist/vite.svg +0 -1
  61. package/index.html +0 -13
  62. package/public/vite.svg +0 -1
  63. package/src/App.vue +0 -8
  64. package/src/lib/components/QAccountList/index.ts +0 -6
  65. package/src/lib/components/QAccountList/src/QAccountDetail.vue +0 -191
  66. package/src/lib/components/QAccountList/src/QAccountEdit.vue +0 -241
  67. package/src/lib/components/QAccountList/src/QAccountList.vue +0 -530
  68. package/src/lib/components/QAccountList/src/useConfigData.ts +0 -53
  69. package/src/lib/components/QBackgroundFileTaskList/index.ts +0 -6
  70. package/src/lib/components/QBackgroundFileTaskList/src/QBackgroundFileTaskList.vue +0 -137
  71. package/src/lib/components/QBackgroundFileTaskList/src/useConfigData.ts +0 -20
  72. package/src/lib/components/QCompanyermissionList/src/editTree.vue +0 -291
  73. package/src/lib/components/QCompanyermissionList/src/form.vue +0 -238
  74. package/src/lib/components/QCompanyermissionList/src/index.vue +0 -309
  75. package/src/lib/components/QCompanyermissionList/src/types.ts +0 -44
  76. package/src/lib/components/QElsEmailSendLogList/index.ts +0 -6
  77. package/src/lib/components/QElsEmailSendLogList/src/QElsEmailSendLogList.vue +0 -166
  78. package/src/lib/components/QElsEmailSendLogList/src/useConfigData.ts +0 -19
  79. package/src/lib/components/QElsMsgRecordList/index.ts +0 -6
  80. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordDetail.vue +0 -148
  81. package/src/lib/components/QElsMsgRecordList/src/QElsMsgRecordList.vue +0 -124
  82. package/src/lib/components/QElsMsgRecordList/src/useConfigData.ts +0 -22
  83. package/src/lib/components/QElsTenantPortalNewsList/index.ts +0 -6
  84. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsDetail.vue +0 -139
  85. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsEdit.vue +0 -196
  86. package/src/lib/components/QElsTenantPortalNewsList/src/QElsTenantPortalNewsList.vue +0 -122
  87. package/src/lib/components/QElsTenantPortalNewsList/src/useConfigData.ts +0 -20
  88. package/src/lib/components/QI18nList/index.ts +0 -6
  89. package/src/lib/components/QI18nList/src/QI18nForm.vue +0 -141
  90. package/src/lib/components/QI18nList/src/QI18nList.vue +0 -361
  91. package/src/lib/components/QI18nList/src/useConfigData.ts +0 -37
  92. package/src/lib/components/QImChatGroupList/index.ts +0 -6
  93. package/src/lib/components/QImChatGroupList/src/QImChatGroupList.vue +0 -94
  94. package/src/lib/components/QImChatGroupList/src/useConfigData.ts +0 -17
  95. package/src/lib/components/QMqRecordList/index.ts +0 -6
  96. package/src/lib/components/QMqRecordList/src/QMqRecordList.vue +0 -105
  97. package/src/lib/components/QMqRecordList/src/useConfigData.ts +0 -18
  98. package/src/lib/components/QPasswordSecurityPolicy/index.ts +0 -6
  99. package/src/lib/components/QPasswordSecurityPolicy/src/QPasswordSecurityPolicy.vue +0 -266
  100. package/src/lib/components/QPermissionDataList/index.ts +0 -6
  101. package/src/lib/components/QPermissionDataList/src/QPermissionDataAuth.vue +0 -3
  102. package/src/lib/components/QPermissionDataList/src/QPermissionDataEdit.vue +0 -221
  103. package/src/lib/components/QPermissionDataList/src/QPermissionDataList.vue +0 -117
  104. package/src/lib/components/QPermissionDataList/src/form.vue +0 -109
  105. package/src/lib/components/QPurchaseNoticeList/index.ts +0 -6
  106. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeDetail.vue +0 -147
  107. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeEdit.vue +0 -244
  108. package/src/lib/components/QPurchaseNoticeList/src/QPurchaseNoticeList.vue +0 -163
  109. package/src/lib/components/QPurchaseNoticeList/src/useConfigData.ts +0 -22
  110. package/src/lib/components/QPurchaseNoticeTemplateList/index.ts +0 -6
  111. package/src/lib/components/QPurchaseNoticeTemplateList/src/QPurchaseNoticeTemplateList.vue +0 -85
  112. package/src/lib/components/QPurchaseNoticeTemplateList/src/useConfigData.ts +0 -18
  113. package/src/lib/components/QQuartzJobList/index.ts +0 -6
  114. package/src/lib/components/QQuartzJobList/src/QQuartzJobList.vue +0 -263
  115. package/src/lib/components/QQuartzJobList/src/components/JCron.vue +0 -82
  116. package/src/lib/components/QQuartzJobList/src/components/JCronModal.vue +0 -985
  117. package/src/lib/components/QQuartzJobList/src/components/QuartzJobModal.vue +0 -176
  118. package/src/lib/components/QQuartzJobList/src/useConfigData.ts +0 -26
  119. package/src/lib/components/QRoleList/index.ts +0 -6
  120. package/src/lib/components/QRoleList/src/QRoleList.vue +0 -288
  121. package/src/lib/components/QRoleList/src/components/content-header/contentHeader.less +0 -31
  122. package/src/lib/components/QRoleList/src/components/content-header/index.tsx +0 -42
  123. package/src/lib/components/QRoleList/src/components/userAuthorization/index.tsx +0 -690
  124. package/src/lib/components/QRoleList/src/components/userAuthorization/userAuthorization.less +0 -97
  125. package/src/lib/components/QRoleList/src/useConfigData.ts +0 -33
  126. package/src/lib/components/QSupplierAccountList/index.ts +0 -6
  127. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountForm.vue +0 -187
  128. package/src/lib/components/QSupplierAccountList/src/QSupplierAccountList.vue +0 -302
  129. package/src/lib/components/QSupplierAccountList/src/useConfigData.ts +0 -29
  130. package/src/lib/components/QUsageList/index.ts +0 -6
  131. package/src/lib/components/QUsageList/src/QUsageList.vue +0 -82
  132. package/src/lib/components/QUsageList/src/useConfigData.ts +0 -20
  133. package/src/lib/components/QcustomConfigEdit/component/AddDictCodeModal.vue +0 -140
  134. package/src/lib/components/QcustomConfigEdit/component/TempalePreviewModal.vue +0 -100
  135. package/src/lib/components/QcustomConfigEdit/component/dataFormatComponent.tsx +0 -100
  136. package/src/lib/components/QcustomConfigEdit/component/regexComponent.tsx +0 -71
  137. package/src/lib/components/QcustomConfigEdit/index.ts +0 -6
  138. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigEdit.vue +0 -1807
  139. package/src/lib/components/QcustomConfigEdit/src/QcustomConfigRender.tsx +0 -242
  140. package/src/lib/components/QcustomConfigEdit/src/types.ts +0 -71
  141. package/src/lib/components/QcustomConfigEdit/src/useConfigComputed.ts +0 -75
  142. package/src/lib/components/QcustomConfigEdit/src/useConfigData.ts +0 -123
  143. package/src/lib/components/QcustomConfigEdit/src/useConfigMethods.ts +0 -117
  144. package/src/lib/components/QcustomConfigEdit/src/useConstant.ts +0 -301
  145. package/src/lib/components/QcustomConfigEdit/style/index.less +0 -41
  146. package/src/lib/components/QcustomConfigList/component/ImportJsonCustomConfig.vue +0 -135
  147. package/src/lib/components/QcustomConfigList/index.ts +0 -6
  148. package/src/lib/components/QcustomConfigList/src/QcustomConfigList.vue +0 -268
  149. package/src/lib/components/QcustomConfigList/src/types.ts +0 -1
  150. package/src/lib/components/QcustomConfigList/src/useConfigData.ts +0 -23
  151. package/src/lib/components/QcustomConfigList/src/useMethods.ts +0 -36
  152. package/src/lib/components/QcustomConfigList/style/index.less +0 -3
  153. package/src/lib/components/QsysConfigList/index.ts +0 -6
  154. package/src/lib/components/QsysConfigList/src/QsysConfigList.vue +0 -125
  155. package/src/lib/components/QsysConfigList/src/types.ts +0 -1
  156. package/src/lib/components/QsysConfigList/src/useConfigData.ts +0 -17
  157. package/src/lib/components/QsysConfigList/src/useMethods.ts +0 -11
  158. package/src/lib/components/QsysConfigList/style/index.less +0 -3
  159. package/src/lib/components/index.ts +0 -78
  160. package/src/lib/components/integratedNodesList/src/QIntegratedNodesDetail.vue +0 -49
  161. package/src/lib/components/integratedNodesList/src/QIntegratedNodesEdit.vue +0 -143
  162. package/src/lib/components/integratedNodesList/src/index.vue +0 -136
  163. package/src/lib/components/integratedReportList/src/index.vue +0 -86
  164. package/src/lib/components/integratedReportSearchList/src/index.vue +0 -66
  165. package/src/lib/components/loginAbnormalLogList/src/index.vue +0 -50
  166. package/src/lib/components/loginLogList/src/index.vue +0 -57
  167. package/src/lib/components/loginSupplierLogList/src/index.vue +0 -63
  168. package/src/lib/components/operateLogList/src/index.vue +0 -57
  169. package/src/lib/index.ts +0 -15
  170. package/src/lib/utils/constant.ts +0 -1
  171. package/src/lib/utils/global.hook.ts +0 -337
  172. package/src/lib/utils/global.types.ts +0 -49
  173. package/src/lib/utils/regexp.ts +0 -143
  174. package/src/main.ts +0 -11
  175. package/src/vite-env.d.ts +0 -13
  176. package/tsconfig.json +0 -24
  177. package/tsconfig.node.json +0 -9
  178. package/vite.config.ts +0 -61
  179. /package/dist/{index.es.d.ts → index.d.ts} +0 -0
@@ -1,301 +0,0 @@
1
- // ########### 表头 ###################
2
- // ############## PC绑定函数: ####################
3
- const bindFunctionHead =
4
- `// editlayout 字段类型:下拉 示列
5
- function callback(parentRef, pageData, groupData, value, opt, oldVal, form) {
6
-
7
- let setDisabledByProp = (prop, flag) => {
8
- for (let group of pageData.groups) {
9
- if (group.type) continue;
10
- let formFields = group.custom.formFields || [];
11
- for (let sub of formFields) {
12
- if (sub.fieldName === prop) {
13
- sub.disabled = flag;
14
- break;
15
- };
16
- };
17
- };
18
- };
19
-
20
- let flag = (value === '0' || form.ebiddingMethod !== '0');
21
- let disabledFlag = (value === '0' || value === '1' || form.ebiddingMethod !== '0');
22
- setDisabledByProp('beforeEndMinute', flag);
23
- setDisabledByProp('delayMinute', flag);
24
- setDisabledByProp('delayCount', disabledFlag);
25
-
26
- let setValidateRuleByProp = (prop, flag) => {
27
- let index = -1;
28
- let fieldLabel;
29
- let rule = {};
30
- for (let group of pageData.groups) {
31
- if (group.type) continue;
32
- let formFields = group.custom.formFields || [];
33
- for (let sub of formFields) {
34
- if (sub.fieldName === prop) {
35
- sub.required = flag ? '1' : '0';
36
- fieldLabel = sub.fieldLabel;
37
- index = pageData.groups.indexOf(group);
38
- break;
39
- };
40
- };
41
- };
42
-
43
- rule[prop] = [{
44
- required: flag,
45
- message: \`` +
46
- '${fieldLabel}' +
47
- `必填\`
48
- }];
49
- if (index !== -1) {
50
- pageData.groups[index].custom.validateRules = Object.assign({}, pageData.groups[index].custom.validateRules, rule);
51
- };
52
- };
53
-
54
- let validateFlag = (value === '1' || value === '2') && form.ebiddingMethod === '0';
55
- let delayCountValidateFlag = (value === '2' && form.ebiddingMethod === '0');
56
-
57
- setValidateRuleByProp('beforeEndMinute', validateFlag);
58
- setValidateRuleByProp('delayMinute', validateFlag);
59
- setValidateRuleByProp('delayCount', delayCountValidateFlag);
60
- }`
61
-
62
- // ############## M端绑定函数: ####################
63
- const initFunctionHead =
64
- `/**
65
- * 业务规则
66
- * 延期规则, prop: 'delayRule', 0 不允许延期,1 不限制延期次数, 2 有限制次数延期
67
- * 结束前多少分钟, prop: 'beforeEndMinute'
68
- * 延期多少分钟, prop: 'delayMinute'
69
- * 可以延期次数, prop: 'delayCount'
70
- *
71
- * @param {Object} Vue 整个实例
72
- * @param {Object} _pageData 页面原所有数据,包括 分组 groups + formFields itemColumns
73
- * @param {Object} _form 当前表单对象(表头状态时才有)
74
- * @param {Object} _row 当前表格行所有对象(表行状态时才有)
75
- * @param {String} _value 当前所选值
76
- * @param {object} _cacheAllData 页面当前所有实时数据
77
- * @param {Array} _data 弹窗选择行勾选数据
78
- */
79
- function initFunction(Vue, { _pageData, _form, _row, _value, _cacheAllData, _data }) {
80
-
81
- let setDisabledByProp = (targetProp, flag) => {
82
- for (let group of _pageData.groups) {
83
- if (group.type || group.type === 'item') continue;
84
- let formFields = group.custom.formFields || [];
85
- for (let sub of formFields) {
86
- if (sub.fieldName === targetProp) {
87
- sub.disabled = flag;
88
- break;
89
- };
90
- };
91
- };
92
- };
93
-
94
- let flag = (_value === '0' || _form.ebiddingMethod !== '0');
95
- let disabledFlag = (_value === '0' || _value === '1' || _form.ebiddingMethod !== '0');
96
- setDisabledByProp('beforeEndMinute', flag);
97
- setDisabledByProp('delayMinute', flag);
98
- setDisabledByProp('delayCount', disabledFlag);
99
-
100
- let setValidateRuleByProp = (targetProp, flag) => {
101
- let index = -1;
102
- let fieldLabel;
103
- let rule = {};
104
- for (let group of _pageData.groups) {
105
- if (group.type || group.type === 'item') continue;
106
- let formFields = group.custom.formFields || [];
107
- for (let sub of formFields) {
108
- if (sub.fieldName === targetProp) {
109
- sub.required = flag ? '1' : '0';
110
- fieldLabel = sub.fieldLabel;
111
- index = _pageData.groups.indexOf(group);
112
- break
113
- };
114
- };
115
- };
116
-
117
- rule[targetProp] = [{
118
- required: flag,
119
- message: \`请输入` +
120
- '${fieldLabel}' +
121
- `\`,
122
- trigger: ["change", "blur"],
123
- }];
124
- if (index !== -1) {
125
- _pageData.groups[index].custom.validateRules = Object.assign({}, _pageData.groups[index].custom.validateRules, rule);
126
- };
127
- };
128
-
129
- let validateFlag = (_value === '1' || _value === '2') && _form.ebiddingMethod === '0';
130
- let delayCountValidateFlag = (_value === '2' && _form.ebiddingMethod === '0');
131
-
132
- setValidateRuleByProp('beforeEndMinute', validateFlag);
133
- setValidateRuleByProp('delayMinute', validateFlag);
134
- setValidateRuleByProp('delayCount', delayCountValidateFlag);
135
- }`
136
-
137
- // ############## 拓展: ####################
138
- const extendHead = `/* extend 原设计是对字段自定义配置,也是对绑定函数callback 的补充
139
- * 以下是结合弹窗组件的示列
140
- */
141
- {
142
- modalColumns: [{
143
- field: 'toElsAccount',
144
- fieldLabelI18nKey: 'i18n_title_supplierAccount',
145
- title: '供应商ELS账号',
146
- with: 150,
147
- },
148
- {
149
- field: 'supplierCode',
150
- fieldLabelI18nKey: 'i18n_title_supplierCode',
151
- title: '供应商编码',
152
- with: 150,
153
- },
154
- {
155
- field: 'supplierName',
156
- fieldLabelI18nKey: 'i18n_title_supplierName',
157
- title: '供应商名称',
158
- with: 150,
159
- }
160
- ],
161
- modalUrl: '/supplier/supplierMaster/list',
162
- modalParams: {},
163
- beforeCheckedCallBack: function (parentRef, pageData, groupData, form) {
164
- return new Promise((resolve, rejec) => {
165
- let orderStatus = form.orderStatus || '';
166
- console.log("orderStatus", orderStatus);
167
- return orderStatus === '0' ? resolve('success') : rejec('只允许操作新建状态单据');
168
- })
169
- }
170
- }`
171
-
172
- // ############## 自定义校验方法: ####################
173
- const fieldValidatorHead = `/* 增强表单校验,表单配置的校验除了必填和正则表达式,增加验证方法,应付复杂的表单验证
174
- * 示列
175
- */
176
- {
177
- validateMethod: function (taht, form, currentField, rule, value, callback) {
178
- let startTime = new Date(form.checkStartDate).getTime()
179
- let endTime = new Date(form.checkEndDate).getTime()
180
- if (startTime > endTime) {
181
- callback(new Error('开始时间不能大于结束时间'))
182
- } else {
183
- callback()
184
- }
185
- },
186
- trigger: 'change'
187
- }`
188
-
189
- // ############## 计算公式: ####################`
190
- const formulaHead = '${ MaterialCost }+${ scrapRate } +${ ManufactExpenses }'
191
-
192
- // ########### 表行 ###################
193
- // ############## PC绑定函数: ####################
194
- const bindFunctionRow = `// editlayout 字段类型:弹窗 示列
195
- function callback(row, data, _self) {
196
- row.orderProgressTemplateNumber = data[0].progressTemplateNumber
197
- row.orderProgressTemplateName = data[0].progressTemplateName
198
- row.orderProgressTemplateId = data[0].id
199
- }`
200
-
201
- // ############## M端绑定函数: ####################
202
- const initFunctionRow = `/*
203
- * @param {Object} Vue 整个实例
204
- * @param {Object} _pageData 页面原所有数据,包括 分组 groups + formFields itemColumns
205
- * @param {Object} _form 当前表单对象(表头状态时才有)
206
- * @param {Object} _row 当前表格行所有对象(表行状态时才有)
207
- * @param {String} _value 当前所选值
208
- * @param {object} _cacheAllData 页面当前所有实时数据
209
- * @param {Array} _data 弹窗选择行勾选数据
210
- */
211
- function initFunction(Vue, { _pageData, _form, _row, _value, _cacheAllData, _data }) {
212
- let { taxCode = '', taxRate = '' } = _data[0] || {};
213
- _row.taxCode = taxCode;
214
- _row.taxRate = taxRate;
215
- }`
216
-
217
- // ############## 拓展: ####################
218
- const extendRow = `/* extend 原设计是对字段自定义配置,也是对绑定函数callback 的补充
219
- * 以下是结合弹窗组件的示列
220
- */
221
- {
222
- modalColumns: [{
223
- field: 'taxCode',
224
- title: '税码',
225
- fieldLabelI18nKey: 'i18n_field_taxCode',
226
- with: 150,
227
- }, {
228
- field: 'taxRate',
229
- title: '税率(%)',
230
- fieldLabelI18nKey: 'i18n_field_taxRate',
231
- with: 150,
232
- }, {
233
- field: 'taxName',
234
- title: '税码名称',
235
- fieldLabelI18nKey: 'i18n_field_taxName',
236
- with: 150,
237
- }, {
238
- field: 'remark',
239
- title: '备注',
240
- fieldLabelI18nKey: 'i18n_field_remark',
241
- with: 150,
242
- }],
243
- modalUrl: '/base/tax/list',
244
- modalParams: {},
245
- // 表行弹窗清除按钮回调
246
- afterRowClearCallBack:function(Vue,row){
247
- row.taxCode = ''
248
- row.taxRate = ''
249
- }
250
- }`
251
-
252
- // ############## 自定义校验方法: ####################
253
- const fieldValidatorRow = `/* 增强表单校验,表单配置的校验除了必填和正则表达式,增加验证方法,应付复杂的表单验证
254
- * 示列
255
- */
256
- /**
257
- * @param {*} _this
258
- * @param {*} item
259
- * @param {*} rule 规则
260
- * @param {*} value 当前值
261
- * @param {*} row 编辑态当前行
262
- * @param {*} column 编辑列
263
- *
264
- **/
265
- {
266
- validateMethod: function (that, item, rule, value, row, column) {
267
- //编辑态下,that可以获取当前页面所有值
268
- debugger
269
- if (row.effectiveDate && row.expiryDate) {
270
- let effectiveDate = new Date(row.effectiveDate).getTime()
271
- let expiryDate = new Date(row.expiryDate).getTime()
272
- if (effectiveDate > expiryDate) {
273
- return new Error('生效日期不能大于失效日期')
274
- }
275
- }
276
- },
277
- trigger: 'change'//blur,change,manual
278
- }`
279
-
280
- // ############## 计算公式: ####################
281
- const formulaRow = '${MaterialCost}+${scrapRate}+${ManufactExpenses}'
282
-
283
- export const EditSample = {
284
- bindFunctionHead,
285
- initFunctionHead,
286
- extendHead,
287
- fieldValidatorHead,
288
- formulaHead,
289
- bindFunctionRow,
290
- initFunctionRow,
291
- extendRow,
292
- fieldValidatorRow,
293
- formulaRow,
294
- }
295
-
296
- export const url = {
297
- add: '/template/templateHead/add',
298
- edit: '/template/templateHead/edit',
299
- detail: '/template/templateHead/queryById',
300
- publish: '/template/templateHead/generateConfig',
301
- }
@@ -1,41 +0,0 @@
1
- .page-container {
2
- .ant-btn {
3
- & + .ant-btn {
4
- margin-left: 8px;
5
- }
6
- }
7
- :deep(.ant-select-selection) {
8
- position: relative;
9
- z-index: 1;
10
- }
11
- .business-tips {
12
- width: 64.6%;
13
- margin: 0 auto;
14
- margin-bottom: 10px;
15
- }
16
- :deep(.ant-input-affix-wrapper .ant-input-suffix) {
17
- z-index: 1;
18
- }
19
- .skeleton-wrap {
20
- margin-top: 100px;
21
- text-align: center;
22
- line-height: 100px;
23
- }
24
- }
25
- .switch-config .switch-config-item {
26
- display: flex;
27
- justify-content: space-between;
28
- border-bottom: 1px dashed #eee;
29
- padding: 10px 0;
30
- }
31
- .switch-config > div:first-child {
32
- padding-top: 0;
33
- }
34
- .verify-config {
35
- margin-bottom: 20px;
36
- .tab-clo-left {
37
- padding-right: 10px;
38
- text-align: right;
39
- line-height: 32px;
40
- }
41
- }
@@ -1,135 +0,0 @@
1
- <template>
2
- <vxe-modal title="导入数据" :width="720" v-model="visible" :confirmLoading="confirmLoading" show-footer @confirm="ok" @close="close">
3
- <a-spin :spinning="confirmLoading">
4
- <div class="steps-content">
5
- <div v-if="current === 0" v-show="!isLoading" class="step-2">
6
- <div class="import-desc">
7
- <h3>导入说明:</h3>
8
- <ul>
9
- <li>请先导出业务模板配置的数据再进行导入</li>
10
- <li>文件大小不能超过20M;</li>
11
- <li>仅支持 *.json 格式文件;</li>
12
- </ul>
13
- </div>
14
- <a-upload-dragger name="file" :headers="uploadHeader" :accept="accept" :action="importUrl" @change="imortChangeEvent" :showUploadList="false" :beforeUpload="beforeUpload">
15
- <p class="ant-upload-drag-icon">
16
- <a-icon type="inbox" />
17
- </p>
18
- <p class="ant-upload-text">点击或把文件拖拽到这个区域上传</p>
19
- </a-upload-dragger>
20
- </div>
21
- <div v-if="isLoading" class="step-3">
22
- <a-result status="success" title="导入成功"></a-result>
23
- </div>
24
- </div>
25
- </a-spin>
26
- </vxe-modal>
27
- </template>
28
- <script lang="ts">
29
- import { defineComponent } from 'vue'
30
- import { message } from '@qqt-product/ui'
31
- //ts
32
- import { MapObjectNoneType } from '../../../utils/global.types'
33
- // import { Steps, Result } from 'ant-design-vue'
34
- export default defineComponent({
35
- name: 'ImportJsonCustomConfig',
36
- emits: ['close'],
37
- components: {
38
- // ASteps: Steps,
39
- // AStep: Steps.Step,
40
- // AResult: Result,
41
- },
42
- props: {
43
- userToken: {
44
- type: String,
45
- defalut: '',
46
- },
47
- isShow: {
48
- type: Boolean,
49
- defalut: false,
50
- },
51
- },
52
-
53
- data() {
54
- return {
55
- visible: false,
56
- current: 0,
57
- confirmLoading: false,
58
- accept: '.json',
59
- uploadHeader: { 'X-Access-Token': this.userToken },
60
- isPreview: 0,
61
- tableColumns: [],
62
- tableData: [],
63
- dataKey: '',
64
- isLoading: false,
65
- percent: 0,
66
- importUrl: '/els/template/templateHead/importJson',
67
- }
68
- },
69
- computed: {
70
- lastStepIndex() {
71
- let current = this.isPreview === 1 ? 2 : 1
72
- return current
73
- },
74
- },
75
- methods: {
76
- open() {
77
- this.isLoading = false
78
- this.visible = true
79
- },
80
- ok() {
81
- this.visible = false
82
- this.$emit('close')
83
- },
84
- close() {
85
- this.visible = false
86
- this.$emit('close')
87
- if (this.isLoading) {
88
- this.isLoading = false
89
- // 刷新列表
90
- // this.$parent.$refs.listPage.loadData()
91
- }
92
- },
93
- onChange(current: number) {
94
- this.current = current
95
- },
96
- // 导入响应事件(上传中、完成、失败都会调用这个函数)
97
- imortChangeEvent(info: MapObjectNoneType) {
98
- // 服务端响应返回信息
99
- const res = info.file.response
100
- if (res && res.success) {
101
- this.isLoading = true
102
- // this.$parent.$refs.listPage.loadData()
103
- } else if (res && !res.success) {
104
- message.error('文件导入失败' + ':' + res.message)
105
- }
106
- },
107
- // 上传之前文件校验
108
- beforeUpload(file: MapObjectNoneType) {
109
- const suffix = file.name.substr(file.name.lastIndexOf('.'))
110
- if (suffix !== '.json') {
111
- message.warning('请上传Json文件')
112
- return false
113
- }
114
- if (file.size > 20 * 1024 * 1024) {
115
- message.warning('超过最大文件限制!')
116
- return false
117
- }
118
- },
119
- },
120
- watch: {
121
- isShow: function (nw) {
122
- console.log('nw', nw)
123
- if (nw) {
124
- this.visible = nw
125
- this.isLoading = false
126
- }
127
- },
128
- },
129
- })
130
- </script>
131
- <style lang="less" scoped>
132
- .progress {
133
- text-align: center;
134
- }
135
- </style>
@@ -1,6 +0,0 @@
1
- import QcustomConfigList from './src/QcustomConfigList.vue'
2
- import qqtUtils from '@qqt-product/utils'
3
-
4
- export default qqtUtils.withInstall(QcustomConfigList)
5
-
6
- export { QcustomConfigList }