@zscreate/zhxy-app-component 1.0.390 → 1.0.393
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.
|
@@ -160,13 +160,13 @@ export default {
|
|
|
160
160
|
item.columns.forEach(el => {
|
|
161
161
|
if(el.list && el.list.length) {
|
|
162
162
|
el.list.forEach(el2 => {
|
|
163
|
-
if(['input', 'textarea', 'number', 'date', 'time'].includes(el2.type)) {
|
|
163
|
+
if(['input', 'textarea', 'number', 'date', 'time', 'select', 'radio', 'checkbox', 'cascaderSelect', 'cascader', 'deptSelector', 'userSelector', 'userSelectorByRole'].includes(el2.type)) {
|
|
164
164
|
this.formList.push(el2)
|
|
165
165
|
}
|
|
166
166
|
})
|
|
167
167
|
}
|
|
168
168
|
})
|
|
169
|
-
} else if (['input', 'textarea', 'number', 'date', 'time'].includes(item.type)) { //输入框
|
|
169
|
+
} else if (['input', 'textarea', 'number', 'date', 'time', 'select', 'radio', 'checkbox', 'cascaderSelect', 'cascader', 'deptSelector', 'userSelector', 'userSelectorByRole'].includes(item.type)) { //输入框
|
|
170
170
|
this.formList.push(item)
|
|
171
171
|
}
|
|
172
172
|
})
|
|
@@ -285,7 +285,9 @@ export default {
|
|
|
285
285
|
async recognizeField(field) {
|
|
286
286
|
const params = {
|
|
287
287
|
content: this.contentText.trim(),
|
|
288
|
-
|
|
288
|
+
name: field.name,
|
|
289
|
+
type: field.type,
|
|
290
|
+
options: field.options
|
|
289
291
|
};
|
|
290
292
|
|
|
291
293
|
try {
|
|
@@ -946,6 +946,9 @@ export default {
|
|
|
946
946
|
this.tableModel[tableModel]["options"]["defaultValue"] = this.models[
|
|
947
947
|
gen.model
|
|
948
948
|
];
|
|
949
|
+
if (gen.options.defaultAddRow && (!this.models[gen.model] || (Array.isArray(this.models[gen.model]) && this.models[gen.model].length === 0))) {
|
|
950
|
+
this.addToTableData(gen, gen.model, 'addModel')
|
|
951
|
+
}
|
|
949
952
|
this.tableInitByModel(tableModel);
|
|
950
953
|
}
|
|
951
954
|
},
|
|
@@ -1481,12 +1484,13 @@ export default {
|
|
|
1481
1484
|
}
|
|
1482
1485
|
})
|
|
1483
1486
|
// 子表单有必填校验 判断有没有添加行, 没有添加行需要手动添加行, 让它触发校验
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1487
|
+
tables.forEach(table => {
|
|
1488
|
+
if (!table.options.requiredAddDefaultRow) return
|
|
1489
|
+
const model = this.models[table.model]
|
|
1490
|
+
if ( !model || ( Array.isArray(model) && model.length === 0 )) {
|
|
1491
|
+
this.addToTableData(table, table.model, 'addModel')
|
|
1492
|
+
}
|
|
1493
|
+
})
|
|
1490
1494
|
},
|
|
1491
1495
|
/**
|
|
1492
1496
|
* @param {回调函数} fn 成功的回调函数
|
|
@@ -1560,7 +1564,7 @@ export default {
|
|
|
1560
1564
|
item = this.models[widget.model]
|
|
1561
1565
|
if (item && widget) {
|
|
1562
1566
|
let rules = {
|
|
1563
|
-
comments: widget.type === 'hnkj-confirm' ? widget.options.isConfirmComponent?[{ required: widget.options.confirmOpinionRequire, message: '请输入确认意见' }]:[ { required: widget.options.required , message: widget.options.placeholder }] : [{ required: widget.options.opinionRequire, message: '请输入审批意见' }],
|
|
1567
|
+
comments: widget.type === 'hnkj-confirm' ? (widget.options.isConfirmComponent?[{ required: widget.options.confirmOpinionRequire, message: '请输入确认意见' }]:[ { required: widget.options.required , message: widget.options.placeholder }]) : [{ required: widget.options.opinionRequire, message: '请输入审批意见' }],
|
|
1564
1568
|
operation: widget.type === 'hnkj-confirm' ? [ { required: widget.options.required , message: `请选择${widget.options.operation}` }] : []
|
|
1565
1569
|
}
|
|
1566
1570
|
utils.validateField(item, rules , Object.keys(rules), (success, errors) => {
|