@zscreate/zhxy-app-component 1.0.384 → 1.0.385-test.2
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.
|
@@ -489,6 +489,15 @@ export default {
|
|
|
489
489
|
this.$set(this.suggestType, this.verifyNode, this.models[this.verifyNode].operation)
|
|
490
490
|
this.fillVerifySignSeal(item)
|
|
491
491
|
}
|
|
492
|
+
if (item
|
|
493
|
+
&& !this.models[this.verifyNode].operation
|
|
494
|
+
&& item.options.confirmOperationChooseFirst) {
|
|
495
|
+
this.models[this.verifyNode].operation = this.suggest[0]
|
|
496
|
+
? this.suggest[0].value
|
|
497
|
+
: "";
|
|
498
|
+
this.$set(this.suggestType, this.verifyNode, this.models[this.verifyNode].operation)
|
|
499
|
+
this.fillVerifySignSeal(item)
|
|
500
|
+
}
|
|
492
501
|
},
|
|
493
502
|
tableData: {
|
|
494
503
|
handler(val) {
|
|
@@ -1230,7 +1239,7 @@ export default {
|
|
|
1230
1239
|
})
|
|
1231
1240
|
},
|
|
1232
1241
|
/***初始化models***/
|
|
1233
|
-
generateModle(genList) {
|
|
1242
|
+
async generateModle(genList) {
|
|
1234
1243
|
if (!genList || genList.length === 0) return;
|
|
1235
1244
|
this.handleLinkAge()
|
|
1236
1245
|
for (let i = 0; i < genList.length; i++) {
|
|
@@ -1324,11 +1333,10 @@ export default {
|
|
|
1324
1333
|
this.$set(this.selectShow, genList[i].model, false)
|
|
1325
1334
|
if (genList[i].options.isConfirmComponent && !this.warpVerifyDisable(genList[i])) {
|
|
1326
1335
|
const dictName = genList[i].options.dictName
|
|
1327
|
-
if (dictName) cacheHttp.get( `/sys/dict/getDictItems/${dictName}`)
|
|
1336
|
+
if (dictName) var res = await cacheHttp.get( `/sys/dict/getDictItems/${dictName}`)
|
|
1328
1337
|
if (res.success) {
|
|
1329
1338
|
this.$set(this.selectList ,genList[i].model, res.result?.map(item => ({ label: item.title, value: item.value, description: item.value})))
|
|
1330
1339
|
}
|
|
1331
|
-
})
|
|
1332
1340
|
const userInfo = uni.getStorageSync('userinfo')
|
|
1333
1341
|
this.$set(
|
|
1334
1342
|
this.models,
|
|
@@ -1342,6 +1350,16 @@ export default {
|
|
|
1342
1350
|
userSign: ''
|
|
1343
1351
|
}
|
|
1344
1352
|
)
|
|
1353
|
+
// 确认组件==确认操作默认选中第一项
|
|
1354
|
+
if (genList[i]
|
|
1355
|
+
&& !this.models[genList[i].model].operation
|
|
1356
|
+
&& genList[i].options.confirmOperationChooseFirst) {
|
|
1357
|
+
this.models[genList[i].model].operation = this.selectList[genList[i].model][0]
|
|
1358
|
+
? this.selectList[genList[i].model][0].value
|
|
1359
|
+
: "";
|
|
1360
|
+
this.$set(this.suggestType, genList[i].model, this.models[genList[i].model].operation)
|
|
1361
|
+
this.fillVerifySignSeal(genList[i])
|
|
1362
|
+
}
|
|
1345
1363
|
}
|
|
1346
1364
|
} else if (genList[i].type === "blank") {
|
|
1347
1365
|
this.$set(
|
|
@@ -1462,12 +1480,12 @@ export default {
|
|
|
1462
1480
|
}
|
|
1463
1481
|
})
|
|
1464
1482
|
// 子表单有必填校验 判断有没有添加行, 没有添加行需要手动添加行, 让它触发校验
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1483
|
+
tables.forEach(table => {
|
|
1484
|
+
const model = this.models[table.model]
|
|
1485
|
+
if ( !model || ( Array.isArray(model) && model.length === 0 )) {
|
|
1486
|
+
this.addToTableData(table, table.model, 'addModel')
|
|
1487
|
+
}
|
|
1488
|
+
})
|
|
1471
1489
|
},
|
|
1472
1490
|
/**
|
|
1473
1491
|
* @param {回调函数} fn 成功的回调函数
|
|
@@ -1541,7 +1559,7 @@ export default {
|
|
|
1541
1559
|
item = this.models[widget.model]
|
|
1542
1560
|
if (item && widget) {
|
|
1543
1561
|
let rules = {
|
|
1544
|
-
comments: widget.type === 'hnkj-confirm' ? [ { required: widget.options.required , message: widget.options.placeholder }] : [{ required: widget.options.opinionRequire, message: '请输入审批意见' }],
|
|
1562
|
+
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: '请输入审批意见' }],
|
|
1545
1563
|
operation: widget.type === 'hnkj-confirm' ? [ { required: widget.options.required , message: `请选择${widget.options.operation}` }] : []
|
|
1546
1564
|
}
|
|
1547
1565
|
utils.validateField(item, rules , Object.keys(rules), (success, errors) => {
|