{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\DelegationEdit.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\flow\\DelegationEdit.vue","mtime":1675071991756},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport flow from \"@/api/flow.js\";\nconst eipUserSelector = () => import(\"@/components/selector/EipUserSelector.vue\");\nconst eipFlowDialog = () => import(\"@/components/dialog/EipFlowDialog.vue\");\nexport default {\n  components:{\n    eipUserSelector,\n    eipFlowDialog\n  },\n  props:[\"editData\"],\n  data(){\n    return {\n      initData:{\n        type:1,\n        isEnabled:\"Y\"\n      },\n      data:{\n        authName:\"\",\n        type:1,\n        subject:\"\",\n        startData:\"\",\n        endData:\"\",\n        isEnabled:\"Y\",\n        agent:\"\",\n      },\n      dialogVisible:false,\n      saveUrl:window.context.bpmModel+\"/flow/agent/v1/save\",\n      defList:[],\n      isSubmit:false\n    }\n  },\n  methods:{\n    beforeClose(){\n      this.dialogVisible = false;\n    },\n    handleOpen(){\n      this.dialogVisible = true;\n      this.$nextTick(()=>{\n        if (!this.editData.subject){\n          this.data = {...this.initData};\n        }else{\n          this.data = this.editData;\n          this.defList = this.editData.defList;\n        }\n      });\n    },\n    close(){\n      this.dialogVisible = false;\n    },\n    afterSaveData(){\n      this.close();\n      this.$emit(\"after-save\",{});\n    },\n    showDialog(){\n      this.$refs.eipFlowDialog.showDialog();\n    },\n    dialogOnConfirm(data){\n      for (let i=0;i<data.length;i++){\n        this.defList.push({flowKey:data[i].defKey,flowName:data[i].name});\n      }\n      this.defList = this.defList.unique(\"flowKey\");\n    },\n    deleteRow(index, rows) {\n      rows.splice(index, 1);\n    },\n    beforeSaveData(){\n      this.isSubmit = true;\n      if (this.defList.length<=0 && this.data.type===2){\n        this.isSubmit = false;\n        this.$message({type:'warning',message:'部分委托流程不能为空'});\n        return;\n      }\n      if (Date.parse(this.data.startDate)>Date.parse(this.data.endDate)){\n        this.isSubmit = false;\n        this.$message({type:'warning',message:'开始日期不可大于结束日期'});\n        return;\n      }\n      if (!this.data.startDate){\n        this.isSubmit = false;\n        this.$message({type:'warning',message:'请添加开始时间'});\n        return;\n      }\n      if (!this.data.endDate){\n        this.isSubmit = false;\n        this.$message({type:'warning',message:'请添加结束时间'});\n        return;\n      }\n      if (this.data.agent===this.data.authName){\n        this.isSubmit = false;\n        this.$message({type:'warning',message:'委托人与别委托人不能相同'});\n        return;\n      }\n      this.data.defList = this.defList;\n    }\n  }\n}\n",null]}