agilebuilder-ui 1.0.90-tmp1 → 1.0.90-tmp10
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/lib/super-ui.css +1 -1
- package/lib/super-ui.js +56 -64
- package/lib/super-ui.umd.cjs +2 -2
- package/package.json +1 -1
- package/packages/super-grid/src/apis.js +16 -9
- package/packages/super-grid/src/dynamic-input.vue +12 -19
- package/packages/super-grid/src/normal-column-content.vue +23 -20
- package/packages/super-grid/src/normal-column.vue +3 -6
package/package.json
CHANGED
|
@@ -1453,14 +1453,15 @@ const apis = {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
]
|
|
1455
1455
|
*/
|
|
1456
|
-
dynamicControlTableEdit(pageContext, customRules){
|
|
1457
|
-
|
|
1456
|
+
dynamicControlTableEdit(pageContext, customRules, listCode){
|
|
1457
|
+
const gridParams = store.get(listCode)
|
|
1458
|
+
console.log('dynamicControlTableEdit----customRules-----', customRules, gridParams.options.customRules)
|
|
1458
1459
|
if(!customRules){
|
|
1459
1460
|
return
|
|
1460
1461
|
}
|
|
1461
1462
|
let gridCustomRules = {}
|
|
1462
|
-
if(
|
|
1463
|
-
gridCustomRules = JSON.parse(JSON.stringify(
|
|
1463
|
+
if(gridParams.options.customRules){
|
|
1464
|
+
gridCustomRules = JSON.parse(JSON.stringify(gridParams.options.customRules))
|
|
1464
1465
|
}
|
|
1465
1466
|
customRules.forEach(item=>{
|
|
1466
1467
|
const copyItem = JSON.parse(JSON.stringify(item))
|
|
@@ -1469,10 +1470,11 @@ const apis = {
|
|
|
1469
1470
|
let columnRules
|
|
1470
1471
|
if(!gridCustomRules[prop]){
|
|
1471
1472
|
gridCustomRules[prop] = {}
|
|
1472
|
-
} else {
|
|
1473
|
-
// 获得当前列已有的自定义规则集合
|
|
1474
|
-
columnRules = gridCustomRules[prop].rules
|
|
1475
1473
|
}
|
|
1474
|
+
console.log('dynamicControlTableEdit----gridCustomRules111-----', gridCustomRules)
|
|
1475
|
+
// 获得当前列已有的自定义规则集合
|
|
1476
|
+
columnRules = gridCustomRules[prop].rules
|
|
1477
|
+
|
|
1476
1478
|
if(copyItem.rules){
|
|
1477
1479
|
if(!columnRules){
|
|
1478
1480
|
columnRules = []
|
|
@@ -1482,9 +1484,14 @@ const apis = {
|
|
|
1482
1484
|
}
|
|
1483
1485
|
// 当前列总的自定义规则更新
|
|
1484
1486
|
copyItem.rules = columnRules
|
|
1485
|
-
this.options.customRules[prop] = copyItem
|
|
1487
|
+
// this.options.customRules[prop] = copyItem
|
|
1488
|
+
if(!gridParams.options.customRules){
|
|
1489
|
+
gridParams.options.customRules = {}
|
|
1490
|
+
}
|
|
1491
|
+
console.log('dynamicControlTableEdit----gridParams.options.customRules222-----', gridParams.options.customRules)
|
|
1492
|
+
gridParams.options.customRules[prop] = copyItem
|
|
1486
1493
|
})
|
|
1487
|
-
console.log('dynamicControlTableEdit----
|
|
1494
|
+
console.log('dynamicControlTableEdit----gridParams.options.customRules333-----', gridParams.options.customRules)
|
|
1488
1495
|
}
|
|
1489
1496
|
}
|
|
1490
1497
|
export default apis
|
|
@@ -441,8 +441,6 @@ import { $emit } from '../../utils/gogocodeTransfer'
|
|
|
441
441
|
import eventBus from './eventBus'
|
|
442
442
|
import { isMobileBrowser } from '../../../src/utils/common-util'
|
|
443
443
|
import { analysisScanValue, setScanAnalysisValue } from './scan-util.ts'
|
|
444
|
-
import restfulInterfaceVue from '../../../../agilebuilder-private-lib/packages/restful-interface/src/restful-interface.vue'
|
|
445
|
-
|
|
446
444
|
export default {
|
|
447
445
|
name: 'DynamicInput',
|
|
448
446
|
components: {
|
|
@@ -745,17 +743,17 @@ export default {
|
|
|
745
743
|
if(!this.gridOptions.customRules){
|
|
746
744
|
this.gridOptions.customRules = {}
|
|
747
745
|
}
|
|
748
|
-
this
|
|
746
|
+
this.$watch('gridOptions.customRules.'+this.column.prop,
|
|
749
747
|
(newVal, oldVal)=> {
|
|
750
|
-
this.packageCustomRules()
|
|
748
|
+
this.packageCustomRules(newVal)
|
|
751
749
|
},
|
|
752
750
|
{
|
|
753
751
|
immediate: true,
|
|
754
752
|
deep: true,
|
|
755
753
|
})
|
|
756
|
-
this
|
|
754
|
+
this.$watch('gridOptions.customRules._all_fields',
|
|
757
755
|
(newVal, oldVal)=> {
|
|
758
|
-
this.packageCustomRules()
|
|
756
|
+
this.packageCustomRules(newVal)
|
|
759
757
|
},
|
|
760
758
|
{
|
|
761
759
|
immediate: true,
|
|
@@ -1817,21 +1815,16 @@ export default {
|
|
|
1817
1815
|
this.innerValue = value
|
|
1818
1816
|
this.blurEvent()
|
|
1819
1817
|
},
|
|
1820
|
-
packageCustomRules() {
|
|
1821
|
-
|
|
1818
|
+
packageCustomRules(columnRule) {
|
|
1819
|
+
console.log('packageCustomRules---columnRule=', columnRule)
|
|
1820
|
+
if(!columnRule){
|
|
1822
1821
|
return
|
|
1823
1822
|
}
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
this.$emit('change-disabled', columnRule.disabled)
|
|
1830
|
-
}
|
|
1831
|
-
if(columnRule.required !== undefined){
|
|
1832
|
-
this.$emit('change-required', columnRule.required)
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1823
|
+
if(columnRule.disabled !== undefined){
|
|
1824
|
+
this.$emit('change-disabled', columnRule.disabled)
|
|
1825
|
+
}
|
|
1826
|
+
if(columnRule.required !== undefined){
|
|
1827
|
+
this.$emit('change-required', columnRule.required)
|
|
1835
1828
|
}
|
|
1836
1829
|
}
|
|
1837
1830
|
}
|
|
@@ -457,16 +457,12 @@ export default {
|
|
|
457
457
|
isShowForm: {
|
|
458
458
|
type: Boolean,
|
|
459
459
|
default: false
|
|
460
|
-
},
|
|
461
|
-
// 列表配置信息
|
|
462
|
-
options: {
|
|
463
|
-
type: Object,
|
|
464
|
-
default: null
|
|
465
460
|
}
|
|
466
461
|
},
|
|
467
462
|
data() {
|
|
468
463
|
let parentFormData
|
|
469
464
|
const gridParams = store.get(this.listCode)
|
|
465
|
+
const options = gridParams.options
|
|
470
466
|
if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
|
|
471
467
|
parentFormData = gridParams.options.extraParam.entityMap
|
|
472
468
|
}
|
|
@@ -481,7 +477,10 @@ export default {
|
|
|
481
477
|
scanEnable = true
|
|
482
478
|
}
|
|
483
479
|
const componentId = this.listCode + '_' + this.column.prop
|
|
484
|
-
|
|
480
|
+
let lineEdit
|
|
481
|
+
if (gridParams.lineEdit !== null && gridParams.lineEdit !== undefined) {
|
|
482
|
+
lineEdit = gridParams.lineEdit
|
|
483
|
+
}
|
|
485
484
|
return {
|
|
486
485
|
selectRow: null,
|
|
487
486
|
that: this,
|
|
@@ -511,22 +510,24 @@ export default {
|
|
|
511
510
|
componentId,
|
|
512
511
|
controlConfig,
|
|
513
512
|
rowLinkConfigMapping: {},
|
|
514
|
-
requiredClass
|
|
513
|
+
requiredClass: '',
|
|
514
|
+
lineEdit,
|
|
515
|
+
options
|
|
515
516
|
}
|
|
516
517
|
},
|
|
517
518
|
computed: {
|
|
518
|
-
lineEdit() {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
},
|
|
519
|
+
// lineEdit() {
|
|
520
|
+
// let isLineEdit = false
|
|
521
|
+
// if (this.listCode) {
|
|
522
|
+
// const gridParams = store.get(this.listCode)
|
|
523
|
+
// if (gridParams.lineEdit !== null && gridParams.lineEdit !== undefined) {
|
|
524
|
+
// isLineEdit = gridParams.lineEdit
|
|
525
|
+
// } else {
|
|
526
|
+
// isLineEdit = false
|
|
527
|
+
// }
|
|
528
|
+
// }
|
|
529
|
+
// return isLineEdit
|
|
530
|
+
// },
|
|
530
531
|
|
|
531
532
|
...mapGetters(['preventReclick'])
|
|
532
533
|
},
|
|
@@ -612,6 +613,7 @@ export default {
|
|
|
612
613
|
}
|
|
613
614
|
}
|
|
614
615
|
this.setScanRuleSets()
|
|
616
|
+
this.requiredClass = this.isRequired(this.row.$editing) ? 'm-requried' : ''
|
|
615
617
|
},
|
|
616
618
|
mounted() {
|
|
617
619
|
// 监听保存时点击按钮事件线触发
|
|
@@ -971,7 +973,8 @@ export default {
|
|
|
971
973
|
}
|
|
972
974
|
},
|
|
973
975
|
isRequired(editing) {
|
|
974
|
-
|
|
976
|
+
console.log('isRequired---this.lineEdit=', this.lineEdit)
|
|
977
|
+
if (!this.isFormSubTable && this.lineEdit && this.lineEdit.editable && this.isEditable && editing && this.column.validations) {
|
|
975
978
|
if (this.column.validations.indexOf('"required":true') > 0) {
|
|
976
979
|
return true
|
|
977
980
|
}
|
|
@@ -146,16 +146,12 @@ export default {
|
|
|
146
146
|
listToolbarFormData: {
|
|
147
147
|
type: Object,
|
|
148
148
|
default: null
|
|
149
|
-
},
|
|
150
|
-
// 列表配置信息
|
|
151
|
-
options: {
|
|
152
|
-
type: Object,
|
|
153
|
-
default: null
|
|
154
149
|
}
|
|
155
150
|
},
|
|
156
151
|
data() {
|
|
157
152
|
let parentFormData
|
|
158
153
|
const gridParams = store.get(this.listCode)
|
|
154
|
+
const options = gridParams.options
|
|
159
155
|
if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
|
|
160
156
|
parentFormData = gridParams.options.extraParam.entityMap
|
|
161
157
|
}
|
|
@@ -169,7 +165,8 @@ export default {
|
|
|
169
165
|
subTableCanAdd: true, // 表单子表时是否有新增权限
|
|
170
166
|
isShowAdd: false, // 是否显示表头的新增按钮
|
|
171
167
|
cellWidth: null,
|
|
172
|
-
parentFormData
|
|
168
|
+
parentFormData,
|
|
169
|
+
options
|
|
173
170
|
}
|
|
174
171
|
},
|
|
175
172
|
computed: {
|