Compare commits
	
		
			No commits in common. "76726e75bad75c06a46c608c5954730dd10e4b2e" and "9fb0524c6b197215cdec70b6987ebdaa3e705341" have entirely different histories.
		
	
	
		
			76726e75ba
			...
			9fb0524c6b
		
	
		|  | @ -1,6 +1,5 @@ | |||
| <template> | ||||
|   <node :title="config.name" :show-error="showError" :select-user="selectUser" :content="content" | ||||
|         :error-info="errorInfo" :show-avatar="true" :user-info="config.props.assignedUser" | ||||
|   <node :title="config.name" :show-error="showError" :select-user="selectUser" :content="content" :error-info="errorInfo" :show-avatar="true" :user-info="config.props.assignedUser" | ||||
|         @selected="$emit('selected')" @delNode="$emit('delNode')" @insertNode="type => $emit('insertNode', type)" | ||||
|         placeholder="请设置抄送人" :header-bgc="headerBgc" header-icon="el-icon-s-promotion"/> | ||||
| </template> | ||||
|  | @ -10,8 +9,8 @@ import Node from './Node' | |||
| 
 | ||||
| export default { | ||||
|   name: "CcNode", | ||||
|   props: { | ||||
|     config: { | ||||
|   props:{ | ||||
|     config:{ | ||||
|       type: Object, | ||||
|       default: () => { | ||||
|         return {} | ||||
|  | @ -25,30 +24,30 @@ export default { | |||
|       errorInfo: '', | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     selectUser() { | ||||
|   computed:{ | ||||
|     selectUser(){ | ||||
|       return { | ||||
|         show: this.config.props.assignedType !== 'ASSIGN_USER', | ||||
|         multiple: true | ||||
|       }; | ||||
|     }, | ||||
|     viewer() { | ||||
|     viewer(){ | ||||
|       return this.$store.state.diagramMode === 'viewer' | ||||
|     }, | ||||
|     preview() { | ||||
|     preview(){ | ||||
|       return this.$store.state.preview; | ||||
|     }, | ||||
|     headerBgc() { | ||||
|       if (this.preview || !this.viewer) { | ||||
|       if (this.preview || !this.viewer){ | ||||
|         return '#3296fa' | ||||
|       } else { | ||||
|       }else { | ||||
|         return this.config.props.headerBgc | ||||
|       } | ||||
|     }, | ||||
|     content() { | ||||
|       if (this.config.props.shouldAdd) { | ||||
|       if (this.config.props.shouldAdd){ | ||||
|         return '由发起人指定' | ||||
|       } else if (this.config.props.assignedUser.length > 0) { | ||||
|       }else if (this.config.props.assignedUser.length > 0) { | ||||
|         let texts = [] | ||||
|         this.config.props.assignedUser.forEach(org => texts.push(org.name)) | ||||
|         return String(texts).replaceAll(',', '、') | ||||
|  | @ -59,15 +58,15 @@ export default { | |||
|   }, | ||||
|   methods: { | ||||
|     //校验数据配置的合法性 | ||||
|     validate(err) { | ||||
|     validate(err){ | ||||
|       this.showError = false | ||||
|       if (this.config.props.shouldAdd) { | ||||
|       if(this.config.props.shouldAdd){ | ||||
|         this.showError = false | ||||
|       } else if (this.config.props.assignedUser.length === 0) { | ||||
|       }else if(this.config.props.assignedUser.length === 0){ | ||||
|         this.showError = true | ||||
|         this.errorInfo = '请选择需要抄送的人员' | ||||
|       } | ||||
|       if (this.showError) { | ||||
|       if (this.showError){ | ||||
|         err.push(`抄送节点 ${this.config.name} 未设置抄送人`) | ||||
|       } | ||||
|       return !this.showError | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue