|  |  | @ -11,6 +11,7 @@ | 
			
		
	
		
			
				
					|  |  |  |                 v-model="addOrUpdateForm[item.fieldName]" | 
			
		
	
		
			
				
					|  |  |  |                 :options="item.options" | 
			
		
	
		
			
				
					|  |  |  |                 :normalizer="normalizer" | 
			
		
	
		
			
				
					|  |  |  |                 :clearable="false" | 
			
		
	
		
			
				
					|  |  |  |                 placeholder="" | 
			
		
	
		
			
				
					|  |  |  |                 :style="{ width: item.editLength+'px'}" | 
			
		
	
		
			
				
					|  |  |  |                 :disabled="isDisabled" | 
			
		
	
	
		
			
				
					|  |  | @ -134,15 +135,18 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     parentsId: function(newValue, oldValue) { | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   mounted() { | 
			
		
	
		
			
				
					|  |  |  |   created() { | 
			
		
	
		
			
				
					|  |  |  |     this.editFormRow() | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   mounted() { | 
			
		
	
		
			
				
					|  |  |  |     this.FetchNoFormatField() | 
			
		
	
		
			
				
					|  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |   methods: { | 
			
		
	
		
			
				
					|  |  |  |     getAuto() { | 
			
		
	
		
			
				
					|  |  |  |     // 自动生成 | 
			
		
	
		
			
				
					|  |  |  |     handleAuto() { | 
			
		
	
		
			
				
					|  |  |  |       let string = '' | 
			
		
	
		
			
				
					|  |  |  |       this.autoMatic.forEach(val => { | 
			
		
	
		
			
				
					|  |  |  |         if (this.addOrUpdateForm[val.fieldName] === '' || this.addOrUpdateForm[val.fieldName] === null) { | 
			
		
	
		
			
				
					|  |  |  |         if (!this.addOrUpdateForm[val.fieldName]) { | 
			
		
	
		
			
				
					|  |  |  |           string += '' | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           string += '' + this.addOrUpdateForm[val.fieldName] + val.connector | 
			
		
	
	
		
			
				
					|  |  | @ -154,10 +158,11 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 获取档号组成项 | 
			
		
	
		
			
				
					|  |  |  |     FetchNoFormatField() { | 
			
		
	
		
			
				
					|  |  |  |       getNoFormatField({ categoryId: this.selectedCategory.id }).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         this.autoMatic = res | 
			
		
	
		
			
				
					|  |  |  |         this.getAuto() | 
			
		
	
		
			
				
					|  |  |  |         this.handleAuto() | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // 获取对应字典子集数据 | 
			
		
	
	
		
			
				
					|  |  | @ -176,7 +181,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     handlerIsRepeat(params, item) { | 
			
		
	
		
			
				
					|  |  |  |       FetchDoeditIsRepeat(params).then(res => { | 
			
		
	
		
			
				
					|  |  |  |         if (res) { | 
			
		
	
		
			
				
					|  |  |  |           this.$message.error(item.fieldCnName + '字段不可重复,请重新输入或选择') | 
			
		
	
		
			
				
					|  |  |  |           this.$message.error(item.fieldCnName + '不可重复') | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |       }) | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
	
		
			
				
					|  |  | @ -193,7 +198,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         this.handlerIsRepeat(params, item) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       if (!item.isAutomatic) { | 
			
		
	
		
			
				
					|  |  |  |         this.getAuto() | 
			
		
	
		
			
				
					|  |  |  |         this.handleAuto() | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // tree - open | 
			
		
	
	
		
			
				
					|  |  | @ -205,6 +210,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     // tree - select | 
			
		
	
		
			
				
					|  |  |  |     selectTree(val) { | 
			
		
	
		
			
				
					|  |  |  |       this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName | 
			
		
	
		
			
				
					|  |  |  |       this.treeName = val.dicName | 
			
		
	
		
			
				
					|  |  |  |       // 自动重复字段 - 是否重复 - treeSelect方式 | 
			
		
	
		
			
				
					|  |  |  |       if (this.treeCurrentFiled.isRepeat) { | 
			
		
	
		
			
				
					|  |  |  |         const params = { | 
			
		
	
	
		
			
				
					|  |  | @ -215,8 +221,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.handlerIsRepeat(params, this.treeCurrentFiled) | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       console.log(val) | 
			
		
	
		
			
				
					|  |  |  |       this.getAuto() | 
			
		
	
		
			
				
					|  |  |  |       this.handleAuto() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // popover - table 单选 | 
			
		
	
		
			
				
					|  |  |  |     clickRowHandler(row) { | 
			
		
	
	
		
			
				
					|  |  | @ -230,7 +235,7 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |       this.$refs.popoverTable.clearSelection() | 
			
		
	
		
			
				
					|  |  |  |       this.popoverVisible = false | 
			
		
	
		
			
				
					|  |  |  |       this.getAuto() | 
			
		
	
		
			
				
					|  |  |  |       this.handleAuto() | 
			
		
	
		
			
				
					|  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |     // popover - 当前选中得 | 
			
		
	
		
			
				
					|  |  |  |     handleCurrentFieldName(item) { | 
			
		
	
	
		
			
				
					|  |  | @ -242,14 +247,18 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     editFormRow() { | 
			
		
	
		
			
				
					|  |  |  |       this.rules = {} | 
			
		
	
		
			
				
					|  |  |  |       this.formPreviewData.map(item => { | 
			
		
	
		
			
				
					|  |  |  |         if (item.isInputClass === 'select') { | 
			
		
	
		
			
				
					|  |  |  |           this.$set(item, 'options', []) | 
			
		
	
		
			
				
					|  |  |  |           this.$set(this.addOrUpdateForm, item.fieldName, null) // 防止unkonwn | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         if (item.isDefaultValue !== '') { | 
			
		
	
		
			
				
					|  |  |  |           this.$set(this.addOrUpdateForm, item.fieldName, item.isDefaultValue) | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |           this.$set(this.addOrUpdateForm, item.fieldName, '') | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |           if (item.isInputClass === 'select') { | 
			
		
	
		
			
				
					|  |  |  |             this.$set(this.addOrUpdateForm, item.fieldName, null) // 防止unkonwn | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         this.rules[item.fieldName] = [ | 
			
		
	
		
			
				
					|  |  |  |           { | 
			
		
	
		
			
				
					|  |  |  |             required: !!item.isRequired, | 
			
		
	
	
		
			
				
					|  |  | @ -306,14 +315,10 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |             'parentsId': this.setParentsId, | 
			
		
	
		
			
				
					|  |  |  |             'jsonString': JSON.stringify(this.addOrUpdateForm) | 
			
		
	
		
			
				
					|  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |           console.log(params) | 
			
		
	
		
			
				
					|  |  |  |           // console.log(this.addOrUpdateForm) | 
			
		
	
		
			
				
					|  |  |  |           edit(params).then(res => { | 
			
		
	
		
			
				
					|  |  |  |             if (res) { | 
			
		
	
		
			
				
					|  |  |  |               this.$notify({ | 
			
		
	
		
			
				
					|  |  |  |                 title: res, | 
			
		
	
		
			
				
					|  |  |  |                 type: 'success', | 
			
		
	
		
			
				
					|  |  |  |                 duration: 2500 | 
			
		
	
		
			
				
					|  |  |  |               }) | 
			
		
	
		
			
				
					|  |  |  |               this.$message.success(res) | 
			
		
	
		
			
				
					|  |  |  |               this.$emit('emitTableList') | 
			
		
	
		
			
				
					|  |  |  |               this.crud.refresh() | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
	
		
			
				
					|  |  | @ -330,11 +335,11 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | // addOrUpdateForm[item.fieldName] = item.isDefaultValue | 
			
		
	
		
			
				
					|  |  |  | </script> | 
			
		
	
		
			
				
					|  |  |  | <style rel="stylesheet/scss" lang="scss" scoped> | 
			
		
	
		
			
				
					|  |  |  | .preview-content { | 
			
		
	
		
			
				
					|  |  |  |   // width: 640px !important; | 
			
		
	
		
			
				
					|  |  |  |   // height: calc(100vh - 312px); | 
			
		
	
		
			
				
					|  |  |  |   padding: 20px 0 0 0 !important; | 
			
		
	
		
			
				
					|  |  |  |   margin-top: 0 !important; | 
			
		
	
		
			
				
					|  |  |  |   border-radius: 4px; | 
			
		
	
	
		
			
				
					|  |  | 
 |