vue2-client 1.9.74 → 1.9.76
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/package.json
CHANGED
|
@@ -105,7 +105,7 @@ import { mapState } from 'vuex'
|
|
|
105
105
|
import { addOrModify, getConfigByName, getConfigByNameAsync, runLogic } from '@vue2-client/services/api/common'
|
|
106
106
|
import { checkIdNumber, REG_EMAIL, REG_LANDLINE, REG_PHONE } from '@vue2-client/utils/reg'
|
|
107
107
|
import moment from 'moment/moment'
|
|
108
|
-
import { executeStrFunction } from '@vue2-client/utils/runEvalFunction'
|
|
108
|
+
import { executeStrFunction, executeStrFunctionByContext } from '@vue2-client/utils/runEvalFunction'
|
|
109
109
|
|
|
110
110
|
export default {
|
|
111
111
|
name: 'XAddNativeForm',
|
|
@@ -565,7 +565,7 @@ export default {
|
|
|
565
565
|
},
|
|
566
566
|
customJsValidate (rule, value, callback, item) {
|
|
567
567
|
if (item.rule.customValidatorFunc) {
|
|
568
|
-
|
|
568
|
+
executeStrFunctionByContext(this, item.rule.customValidatorFunc, [rule, value, callback, this.form, item, this.util, runLogic, getConfigByNameAsync])
|
|
569
569
|
} else {
|
|
570
570
|
callback()
|
|
571
571
|
}
|
|
@@ -85,13 +85,13 @@ export default {
|
|
|
85
85
|
* @param businessType 新增还是修改
|
|
86
86
|
*/
|
|
87
87
|
init ({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
groups,
|
|
89
|
+
modifyModelData = {},
|
|
90
|
+
serviceName = process.env.VUE_APP_SYSTEM_NAME,
|
|
91
|
+
env = 'prod',
|
|
92
|
+
showLeftTab = false,
|
|
93
|
+
businessType = '新增'
|
|
94
|
+
}) {
|
|
95
95
|
Object.assign(this, { groups, modifyModelData, serviceName, env, showLeftTab, businessType })
|
|
96
96
|
this.initView()
|
|
97
97
|
this.$nextTick(() => {
|
|
@@ -170,8 +170,15 @@ export default {
|
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
// xfromitem 一路传递上来的事件
|
|
173
|
-
emitFunc (func, data) {
|
|
174
|
-
|
|
173
|
+
emitFunc (func, data, index) {
|
|
174
|
+
let value = null
|
|
175
|
+
try {
|
|
176
|
+
if (data && data.model && this.$refs[`nativeForm-${index}`]) {
|
|
177
|
+
value = this.$refs[`nativeForm-${index}`]?.form[data.model]
|
|
178
|
+
}
|
|
179
|
+
this.$emit(func, data, value)
|
|
180
|
+
} catch (error) { console.error(error) }
|
|
181
|
+
this.$emit('x-form-item-emit-func', func, data, value)
|
|
175
182
|
},
|
|
176
183
|
// 提交表单
|
|
177
184
|
asyncSubmit () {
|