Compare commits
	
		
			2 Commits
		
	
	
		
			62fbe6a7be
			...
			28a3204dbf
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 28a3204dbf | |
|  | bcfc5222bf | 
|  | @ -22,9 +22,9 @@ | |||
|       </div> | ||||
|     </div> | ||||
| 
 | ||||
|     <el-dialog title="请使用手机扫码预览" :visible.sync="viewCode" width="300px" :close-on-click-modal="false" center> | ||||
|       <img src="../../assets/image/code.png" width="250" height="250"> | ||||
|     </el-dialog> | ||||
| <!--    <el-dialog title="请使用手机扫码预览" :visible.sync="viewCode" width="300px" :close-on-click-modal="false" center>--> | ||||
| <!--      <img src="../../assets/image/code.png" width="250" height="250">--> | ||||
| <!--    </el-dialog>--> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| <template> | ||||
|   <node :title="config.name" :show-error="showError" :content="content" :node-id="config.id" | ||||
|   <node :title="config.name" :show-error="showError" :content="content" | ||||
|         :show-avatar="config.props.assignedType === 'ASSIGN_USER'" :user-info="assignedUser" | ||||
|         :error-info="errorInfo" | ||||
|         :select-user="selectUser" | ||||
|  | @ -109,9 +109,6 @@ export default { | |||
|           this.errorInfo = '审批人为空时, 转交给指定人员:【请指定一个具体的人】' | ||||
|           err.push('审批人为空时, 转交给指定人员:【请指定一个具体的人】') | ||||
|           this.showError = true | ||||
|         } else if (this.viewer) { | ||||
|           this.showError = !this.validate_ASSIGN_USER(err) | ||||
|           console.log(this.showError) | ||||
|         } | ||||
|         return this.showError | ||||
|       } catch (e) { | ||||
|  | @ -129,7 +126,16 @@ export default { | |||
|       } | ||||
|     }, | ||||
|     validate_SELF_SELECT(err) { | ||||
|       return true; | ||||
|       if (!this.viewer){ | ||||
|         return true | ||||
|       } | ||||
|       let userInfo = this.$store.state.selectUserMap.get(this.config.id); | ||||
|       if (undefined !== userInfo && Array.isArray(userInfo) && userInfo.length > 0) { | ||||
|           return true; | ||||
|       } | ||||
|       this.errorInfo = '请指定审批人员' | ||||
|       err.push(`${this.config.name} 未指定审批人员`) | ||||
|       return false; | ||||
|     }, | ||||
|     validate_LEADER_TOP(err) { | ||||
|       return true; | ||||
|  |  | |||
|  | @ -141,7 +141,6 @@ export default { | |||
|   }, | ||||
|   created() { | ||||
|     let userInfo = this.$store.state.selectUserMap.get(this.nodeId); | ||||
|     console.log(this.nodeId,"sadasdasd",userInfo,this._userInfo) | ||||
|     if (userInfo){ | ||||
|       let userInfoList = [] | ||||
|       for (let val of userInfo) { | ||||
|  |  | |||
|  | @ -98,7 +98,7 @@ | |||
|     </el-dialog> | ||||
| 
 | ||||
| 
 | ||||
|     <re-process :code="selectInstanceId" v-if="openItemDl" @submit="resubmit"/> | ||||
|     <re-process :code="selectInstanceId" v-if="openItemDl" @success="getList"/> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -162,10 +162,8 @@ export default { | |||
|         that.$store.state.refuseList = data.refuseList; | ||||
|         that.$store.state.passList = data.passList; | ||||
|         this.loading = false; | ||||
|         console.log(data, "获取到的结果数据") | ||||
|       }) | ||||
|     }, | ||||
| 
 | ||||
|     init() { | ||||
|       this.processInstanceData = { | ||||
|         userInfo: {}, | ||||
|  | @ -173,7 +171,6 @@ export default { | |||
|         formItems: [], | ||||
|         processList: [], | ||||
|       }; | ||||
| 
 | ||||
|       this.loading = true; | ||||
|       this.$store.state.design = this.taskData; | ||||
|       this.$store.state.runningList = []; | ||||
|  | @ -184,11 +181,6 @@ export default { | |||
|       this.$store.state.diagramMode = "viewer"; | ||||
|       this.$store.state.preview = false; | ||||
|     }, | ||||
|     resubmit(flag) { | ||||
|       if (flag) { | ||||
|         this.getList(); | ||||
|       } | ||||
|     }, | ||||
|     getList() { | ||||
|       getAboutInstanceList().then(res => { | ||||
|         let data = res.data | ||||
|  |  | |||
|  | @ -68,9 +68,16 @@ export default { | |||
|         this.$message.error(err); | ||||
|       }); | ||||
|     }, | ||||
|     validate(call) { | ||||
|       this.$refs.initiateForm.validate(call); | ||||
|       this.$refs.processDiagramViewer.validate(call); | ||||
|     validate() { | ||||
|       let formValidate | ||||
|       this.$refs.initiateForm.validate(formCall => { | ||||
|         formValidate = formCall; | ||||
|       }) | ||||
|       let proValidate = this.$refs.processDiagramViewer.validate() | ||||
|       if (!formValidate) { | ||||
|         return false; | ||||
|       } | ||||
|       return (Array.isArray(proValidate) && proValidate.length === 0); | ||||
|     } | ||||
|   } | ||||
| }; | ||||
|  |  | |||
|  | @ -96,7 +96,7 @@ | |||
|       <process-diagram-viewer v-if="processDiagramViewer"/> | ||||
|       <div style="height: 70px;"></div> | ||||
|     </el-dialog> | ||||
|     <re-process :code="selectInstanceId" v-if="openItemDl" @submit="resubmit"/> | ||||
|     <re-process :code="selectInstanceId" v-if="openItemDl" @success="getList()"/> | ||||
|   </div> | ||||
| </template> | ||||
| 
 | ||||
|  | @ -155,11 +155,6 @@ export default { | |||
|         this.loading = false; | ||||
|       }) | ||||
|     }, | ||||
|     resubmit(flag) { | ||||
|       if (flag) { | ||||
|         this.getList(); | ||||
|       } | ||||
|     }, | ||||
|     init() { | ||||
|       this.processInstanceData = { | ||||
|         userInfo: {}, | ||||
|  |  | |||
|  | @ -97,21 +97,27 @@ export default { | |||
|         formData: JSON.stringify(this.formData), | ||||
|         optionalUser: selectUserMap | ||||
|       } | ||||
|       this.validate(valid => { | ||||
|         if (valid) { | ||||
|           restartProcessInstance(paramsData).then(res => { | ||||
|             this.$emit("submit", true) | ||||
|             this.openItemDl = false | ||||
|             this.$message.success(res.msg) | ||||
|           }) | ||||
|         } else { | ||||
|           this.$message.warning("请完善表单😥") | ||||
|         } | ||||
|       }) | ||||
|       let valid = this.validate(() => {}) | ||||
|       if (valid) { | ||||
|         restartProcessInstance(paramsData).then(res => { | ||||
|           this.openItemDl = false | ||||
|           this.$message.success(res.msg) | ||||
|           this.$emit("success") | ||||
|         }) | ||||
|       } else { | ||||
|         this.$message.warning("请完善表单😥") | ||||
|       } | ||||
|     }, | ||||
|     validate(call) { | ||||
|       this.$refs.initiateForm.validate(call); | ||||
|       this.$refs.processDiagramViewer.validate(call); | ||||
|       let formValidate | ||||
|       this.$refs.initiateForm.validate(formCall => { | ||||
|         formValidate = formCall; | ||||
|       }) | ||||
|       let proValidate = this.$refs.processDiagramViewer.validate(call) | ||||
|       if (!formValidate) { | ||||
|         return false; | ||||
|       } | ||||
|       return (Array.isArray(proValidate) && proValidate.length === 0); | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  |  | |||
|  | @ -7,7 +7,8 @@ | |||
|       <el-tab-pane label="审批列表" name="approveList"> | ||||
|         <el-row style="margin-bottom: 20px"> | ||||
|           <el-col :xs="12" :sm="10" :md="8" :lg="6" :xl="4"> | ||||
|             <el-input size="medium" v-model="formList.inputs" placeholder="搜索表单" @keyup.enter.native="getGroups" clearable> | ||||
|             <el-input size="medium" v-model="formList.inputs" placeholder="搜索表单" @keyup.enter.native="getGroups" | ||||
|                       clearable> | ||||
|               <i slot="prefix" class="el-input__icon el-icon-search"></i> | ||||
|             </el-input> | ||||
|           </el-col> | ||||
|  | @ -44,15 +45,16 @@ | |||
|         <disposal-task v-if="active === 'disposalTask'" ref="disposalTask"/> | ||||
|       </el-tab-pane> | ||||
|       <el-tab-pane label="我发起的" name="initiated"> | ||||
|         <initiated-instance v-if="active === 'initiated'"  ref="InitiatedInstance"/> | ||||
|         <initiated-instance v-if="active === 'initiated'" ref="InitiatedInstance"/> | ||||
|       </el-tab-pane> | ||||
|       <el-tab-pane label="关于我的"  name="aboutMe"> | ||||
|         <about-instance v-if="active === 'aboutMe'"  ref="AboutInstance"/> | ||||
|       <el-tab-pane label="关于我的" name="aboutMe"> | ||||
|         <about-instance v-if="active === 'aboutMe'" ref="AboutInstance"/> | ||||
|       </el-tab-pane> | ||||
|     </el-tabs> | ||||
| 
 | ||||
|     <el-dialog title="发起审批" :visible.sync="openItemDl" :close-on-click-modal="true"> | ||||
|       <initiate-process ref="processInstance" :code="selectForm.processDefinitionKey" v-if="openItemDl"></initiate-process> | ||||
|       <initiate-process ref="processInstance" :code="selectForm.processDefinitionKey" | ||||
|                         v-if="openItemDl"></initiate-process> | ||||
|       <span slot="footer" class="dialog-footer"> | ||||
| 				<el-button size="mini" @click="openItemDl = false">取 消</el-button> | ||||
| 				<el-button size="mini" type="primary" @click="submitForm">提 交</el-button> | ||||
|  | @ -71,7 +73,7 @@ import AboutInstance from "./AboutInstance"; | |||
| 
 | ||||
| export default { | ||||
|   name: "workSpace", | ||||
|   components: {AboutInstance, InitiateProcess,DisposalTask,InitiatedInstance}, | ||||
|   components: {AboutInstance, InitiateProcess, DisposalTask, InitiatedInstance}, | ||||
|   data() { | ||||
|     return { | ||||
|       active: 'disposalTask', | ||||
|  | @ -95,16 +97,16 @@ export default { | |||
|   methods: { | ||||
|     getGroups() { | ||||
|       let groupItem = { | ||||
|         id:100, | ||||
|         name:"clay测试", | ||||
|         items:[] | ||||
|         id: 100, | ||||
|         name: "clay测试", | ||||
|         items: [] | ||||
|       } | ||||
|       let query = { | ||||
|         state: 1 | ||||
|       } | ||||
|       getProcessDefinitionList(query).then(res=>{ | ||||
|       getProcessDefinitionList(query).then(res => { | ||||
|         groupItem.items = res.data.rows | ||||
|         groupItem.items.forEach(item=>{ | ||||
|         groupItem.items.forEach(item => { | ||||
|           item.logo = JSON.parse(item.logo) | ||||
|         }) | ||||
|         this.actives.push(groupItem.name) | ||||
|  | @ -118,26 +120,29 @@ export default { | |||
|       this.openItemDl = true | ||||
|     }, | ||||
|     // todo 提交流程测试 | ||||
|     submitForm(){ | ||||
|     submitForm() { | ||||
|       let processInstance = this.$refs.processInstance; | ||||
|       let selectUserMap = {} | ||||
|       this.$store.state.selectUserMap.forEach(((value, key) => {selectUserMap[key]=value})) | ||||
|       this.$store.state.selectUserMap.forEach(((value, key) => { | ||||
|         selectUserMap[key] = value | ||||
|       })) | ||||
|       let paramsData = { | ||||
|         processDefinitionId: this.selectForm.processDefinitionId, | ||||
|         formData: JSON.stringify(processInstance.formData), | ||||
|         optionalUser: selectUserMap | ||||
|       } | ||||
|       processInstance.validate(valid => { | ||||
|         if (valid) { | ||||
|           startProcessInstance(paramsData).then(res=>{ | ||||
|             this.openItemDl = false | ||||
|             this.$message.success(res.msg) | ||||
|             this.$refs.disposalTask.getList() | ||||
|           }) | ||||
|         } else { | ||||
|           this.$message.warning("请完善表单😥") | ||||
|         } | ||||
|       let valid = processInstance.validate(() => { | ||||
|       }) | ||||
|       console.log(valid) | ||||
|       if (valid) { | ||||
|         startProcessInstance(paramsData).then(res => { | ||||
|           this.openItemDl = false | ||||
|           this.$message.success(res.msg) | ||||
|           this.$refs.disposalTask.getList() | ||||
|         }) | ||||
|       } else { | ||||
|         this.$message.warning("请完善表单😥") | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | @ -145,54 +150,63 @@ export default { | |||
| 
 | ||||
| <style lang="less" scoped> | ||||
| @media screen and (max-width: 1852px) { | ||||
|   /deep/.el-dialog { | ||||
|   /deep/ .el-dialog { | ||||
|     width: 70%; | ||||
|   } | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @media screen and (max-width: 1766px) { | ||||
|   /deep/.el-dialog { | ||||
|     width: 85%!important; | ||||
|   /deep/ .el-dialog { | ||||
|     width: 85% !important; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @media screen and (max-width: 1660px) { | ||||
|   /deep/.el-dialog { | ||||
|     width: 90%!important; | ||||
|   /deep/ .el-dialog { | ||||
|     width: 90% !important; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @media screen and (max-width: 1560px) { | ||||
|   /deep/.el-dialog { | ||||
|   /deep/ .el-dialog { | ||||
|     width: 65%; | ||||
|     //height: 1270px!important; | ||||
|   } | ||||
|   /deep/.el-main { | ||||
|     width: 100%!important; | ||||
| 
 | ||||
|   /deep/ .el-main { | ||||
|     width: 100% !important; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| @media screen and (max-width: 1360px) { | ||||
|   /deep/.el-dialog { | ||||
|   /deep/ .el-dialog { | ||||
|     min-width: 1072px; | ||||
|   } | ||||
| } | ||||
| /deep/.el-dialog { | ||||
| 
 | ||||
| /deep/ .el-dialog { | ||||
|   width: 80%; | ||||
|   //height: 830px; | ||||
|   margin-top: 4vh!important; | ||||
|   margin-top: 4vh !important; | ||||
| } | ||||
| /deep/.el-main { | ||||
|   height: 600px!important; | ||||
| 
 | ||||
| /deep/ .el-main { | ||||
|   height: 600px !important; | ||||
|   overflow: auto; | ||||
| } | ||||
| /deep/.el-main::-webkit-scrollbar{ | ||||
| 
 | ||||
| /deep/ .el-main::-webkit-scrollbar { | ||||
|   width: 6px; | ||||
|   height: 6px; | ||||
|   background-color: #f8f8f8; | ||||
| } | ||||
| /deep/.el-main::-webkit-scrollbar-thumb{ | ||||
| 
 | ||||
| /deep/ .el-main::-webkit-scrollbar-thumb { | ||||
|   width: 6px; | ||||
|   background-color: #adacac; | ||||
|   border-radius: 4px; | ||||
| } | ||||
| 
 | ||||
| .workspace { | ||||
|   padding: 50px 20px; | ||||
|   position: relative; | ||||
|  | @ -260,7 +274,7 @@ export default { | |||
|       height: 35px; | ||||
|       line-height: 35px; | ||||
| 
 | ||||
|       div{ | ||||
|       div { | ||||
|         display: inline-block; | ||||
|         margin-left: 10px; | ||||
|         width: 100px; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue