表单配置
This commit is contained in:
		
							
								
								
									
										6
									
								
								packages/2.0.5/AppForm/components/Add.vue
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								packages/2.0.5/AppForm/components/Add.vue
									
									
									
									
										vendored
									
									
								
							| @@ -16,7 +16,7 @@ | ||||
|         </div> | ||||
|       </div> | ||||
|       <basic-info ref="basicInfo" v-model="basicInfo" v-show="currIndex === 0" :dict="dict" :instance="instance"></basic-info> | ||||
|       <form-layout :appType="basicInfo.appType" class="form-config__wrapper" v-model="tableInfos" ref="form" v-if="currIndex === 1" :dict="dict" :instance="instance"></form-layout> | ||||
|       <form-layout :appType="basicInfo.appType" :currIndex="currIndex" class="form-config__wrapper" v-model="tableInfos" ref="form" v-show="currIndex === 1" :dict="dict" :instance="instance"></form-layout> | ||||
|       <form-config | ||||
|         ref="config" | ||||
|         :showListFields="showListFields" | ||||
| @@ -121,7 +121,9 @@ | ||||
|               menuLevel1Name: res.data.menuLevel1Name, | ||||
|               menuLevel3Name: res.data.menuLevel3Name, | ||||
|               menuLevel2Name: res.data.menuLevel2Name, | ||||
|               appType: res.data.appType | ||||
|               appType: res.data.appType, | ||||
|               corpId: res.data.corpId, | ||||
|               corpName: res.data.corpName | ||||
|             } | ||||
|             this.fuzzyQueryFields = res.data.fuzzyQueryFields | ||||
|             this.tableInfos = res.data.tableInfos | ||||
|   | ||||
							
								
								
									
										14
									
								
								packages/2.0.5/AppForm/components/FormLayout.vue
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								packages/2.0.5/AppForm/components/FormLayout.vue
									
									
									
									
										vendored
									
									
								
							| @@ -374,7 +374,8 @@ | ||||
|       type: String, | ||||
|       areaId: String, | ||||
|       value: Array, | ||||
|       appType: String | ||||
|       appType: String, | ||||
|       currIndex: Number | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
| @@ -438,6 +439,12 @@ | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       currIndex (v, oldV) { | ||||
|         if (this.appType && !this.value.length && oldV === 0) { | ||||
|           this.getInitFileds() | ||||
|         } | ||||
|       }, | ||||
|  | ||||
|       activeIndex () { | ||||
|         if (this.activeIndex > -1 && this.groupIndex > -1 && !this.isGroup) { | ||||
|           const filed = this.targetList[this.groupIndex].column[this.activeIndex] | ||||
| @@ -497,9 +504,6 @@ | ||||
|     }, | ||||
|  | ||||
|     mounted () { | ||||
|       if (this.appType && !this.value.length) { | ||||
|         this.getInitFileds() | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
| @@ -584,7 +588,7 @@ | ||||
|               ...item, | ||||
|               groupIndex: i, | ||||
|               groupName: group.groupName, | ||||
|               fieldDbName: this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`, | ||||
|               fieldDbName: item.isInit === '1' ? item.fieldDbName : (this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`), | ||||
|               defaultValue: item.type === 'checkbox' && item.defaultValue ? item.defaultValue.join('`') : item.defaultValue, | ||||
|               selectValues: item.options ? item.options.map(v => v.label).join('`') : '' | ||||
|             }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user