|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div :style="{width: formData.config && formData.config.width}" class="fm-form"
|
|
|
+ <div :style="{width: formData.config && formData.config.width}" class="fm-form"
|
|
|
:class="{
|
|
|
['fm-'+formStyleKey]: true,
|
|
|
'is-print': printRead
|
|
|
@@ -13,9 +13,9 @@
|
|
|
'no-label-form': formData.config && (formData.config.labelWidth == 0)
|
|
|
}"
|
|
|
:size="formSize"
|
|
|
- :model="models"
|
|
|
- :rules="rules"
|
|
|
- :label-position="formData.config && formData.config.labelPosition"
|
|
|
+ :model="models"
|
|
|
+ :rules="rules"
|
|
|
+ :label-position="formData.config && formData.config.labelPosition"
|
|
|
:disabled="!edit"
|
|
|
:label-width="formData.config && formData.config.labelWidth + 'px'"
|
|
|
:label-suffix="formData.config?.labelSuffix ? ' : ' : ' '"
|
|
|
@@ -312,7 +312,7 @@ export default {
|
|
|
},
|
|
|
platform: {
|
|
|
type: String,
|
|
|
- default: 'pc'
|
|
|
+ default: 'mobile'
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
|
@@ -424,7 +424,7 @@ export default {
|
|
|
this.formShow = true
|
|
|
|
|
|
if (this.formData.config && this.formData.config.styleSheets) {
|
|
|
-
|
|
|
+
|
|
|
let head = '.fm-' + this.formStyleKey + ' '
|
|
|
|
|
|
console.log('----head', head)
|
|
|
@@ -617,7 +617,7 @@ export default {
|
|
|
sourceValue.value = data
|
|
|
} else {
|
|
|
this.dataSourceValue.push({
|
|
|
- key: curKey,
|
|
|
+ key: curKey,
|
|
|
args: curArgs,
|
|
|
value: data
|
|
|
})
|
|
|
@@ -633,7 +633,7 @@ export default {
|
|
|
sourceValue.value = data
|
|
|
} else {
|
|
|
this.dynamicValueData.push({
|
|
|
- key: curKey,
|
|
|
+ key: curKey,
|
|
|
args: curArgs,
|
|
|
value: data
|
|
|
})
|
|
|
@@ -738,7 +738,7 @@ export default {
|
|
|
sourceValue.value = data
|
|
|
} else {
|
|
|
this.dataSourceValue.push({
|
|
|
- key: curKey,
|
|
|
+ key: curKey,
|
|
|
value: data
|
|
|
})
|
|
|
}
|
|
|
@@ -800,7 +800,7 @@ export default {
|
|
|
})
|
|
|
|
|
|
Object.keys(optionsHeaders).length && (options['headers'] = optionsHeaders)
|
|
|
-
|
|
|
+
|
|
|
let optionsParams = {}
|
|
|
currentDataSource.params && Object.keys(currentDataSource.params).forEach(key => {
|
|
|
if (isExpression(currentDataSource.params[key])) {
|
|
|
@@ -1112,7 +1112,7 @@ export default {
|
|
|
} else {
|
|
|
if (Object.keys(this.formValue).indexOf(genList[i].model) >= 0) {
|
|
|
this.models[genList[i].model] = this.formValue[genList[i].model]
|
|
|
-
|
|
|
+
|
|
|
this.displayFields[genList[i].model] = !genList[i].options.hidden
|
|
|
|
|
|
if (genList[i].type === 'blank') {
|
|
|
@@ -1125,7 +1125,7 @@ export default {
|
|
|
if (genList[i].type === 'blank') {
|
|
|
// bound the default value
|
|
|
this.models[genList[i].model] = genList[i].options.defaultType === 'String' ? '' : (genList[i].options.defaultType === 'Object' ? {} : [])
|
|
|
-
|
|
|
+
|
|
|
this.displayFields[genList[i].model] = !genList[i].options.hidden
|
|
|
|
|
|
this.blanks.push({
|
|
|
@@ -1139,7 +1139,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
if ((Object.keys(genList[i].options).indexOf('dataBind') < 0 || genList[i].options.dataBind) && genList[i].key && genList[i].model) {
|
|
|
-
|
|
|
+
|
|
|
if (['subform', 'table', 'dialog', 'group'].includes(genList[i].type)) {
|
|
|
this.dataBindFields[genList[i].model] = {}
|
|
|
} else {
|
|
|
@@ -1176,7 +1176,7 @@ export default {
|
|
|
// 处理子表单中的DataSource
|
|
|
this._generateDataSource(item, `${genList[i].model}.${item.model}`)
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
this._generateRules(genList[i].model, genList[i].rules)
|
|
|
|
|
|
// 处理DataSource
|
|
|
@@ -1221,7 +1221,7 @@ export default {
|
|
|
}) : [])
|
|
|
]
|
|
|
} else {
|
|
|
-
|
|
|
+
|
|
|
this.rules[model] = [
|
|
|
...(rules ? rules.map(im => {
|
|
|
if (im.pattern) {
|
|
|
@@ -1389,7 +1389,7 @@ export default {
|
|
|
|
|
|
let newFields = [...fields]
|
|
|
newFields.splice(0, 1)
|
|
|
-
|
|
|
+
|
|
|
if (genList[i].type === 'table') {
|
|
|
this._setSubOptions(genList[i].tableColumns, newFields, opts)
|
|
|
}
|
|
|
@@ -1477,7 +1477,7 @@ export default {
|
|
|
|
|
|
let newFields = [...fields]
|
|
|
newFields.splice(0, 1)
|
|
|
-
|
|
|
+
|
|
|
if (genList[i].type === 'table') {
|
|
|
const options = this._getSubOptions(genList[i].tableColumns, newFields)
|
|
|
if(options) return options
|
|
|
@@ -1803,7 +1803,7 @@ export default {
|
|
|
|
|
|
if (dialogComponent) {
|
|
|
dialogComponent.close()
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
getDynamicValue (key) {
|
|
|
return this.dynamicValueData.find(item => item.key == key)
|