webpackJsonp([19],{"2OQO":function(e,t){},eWk3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i("mvHQ"),l=i.n(a),o={data:function(){return{itemOptions:[],dictOptions:[],detailForm:{},editForm:{},editJiraForm:{},queryInfo:{moduleName:"",itemName:"",dictName:"",jiraItemKey:"",pageNum:1,pageSize:10},itemlist:[],multipleSelection:[],currpage:1,total:0,addDialogVisible:!1,editDialogVisible:!1,detailDialogVisible:!1,syncDialogVisible:!1,editJiraVisible:!1,syncJiraVisible:!1,addModulesDialogVisible:!1,addForm:{moduleName:"",comments:"",itemId:"",dictId:""},syncJiraForm:{project:"AIGO",description:"",leadUserName:"",name:"",assigneeType:"COMPONENT_LEAD"},syncModu:{},syncFormRules:{itemName:[{required:!0,message:"请选择项目名称",trigger:"blur"}],moduleName:[{required:!0,message:"请输入模块名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}]},addJiraModuleForm:{project:"AIGO",description:"",leadUserName:"",name:"",assigneeType:"COMPONENT_LEAD"},addFormRules:{itemName:[{required:!0,message:"请选择项目名称",trigger:"blur"}],moduleName:[{required:!0,message:"请输入模块名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]}}},mounted:function(){this.getItemNameList(),this.getdictNameList()},created:function(){this.getmoduleList()},methods:{onSearch:function(){this.queryInfo.pageNum=1,this.getmoduleList()},getmoduleList:function(){var e=this;this.$api.modules.queryAllmodule(l()(this.queryInfo)).then(function(t){e.loading=!1,localStorage.setItem("active",0),e.itemlist=t.data.data,e.total=t.data.count,console.log(t.data)}).catch(function(){e.loading=!1})},selectModuleList:function(){this.queryInfo.pageNum=1,this.total=0,this.getmoduleList()},getItemNameList:function(){var e=this;this.$api.item.queryAllItemIdAndItemName(this.queryInfo.itemName).then(function(t){e.loading=!1,localStorage.setItem("active",0),e.itemOptions=t.data.data,console.log(t.data.data)}).catch(function(){e.loading=!1})},getdictNameList:function(){var e=this;this.$api.dict.queryAllSubDataDictByFatherId("responsiblePerson").then(function(t){e.loading=!1,localStorage.setItem("active",0),e.dictOptions=t.data.data,console.log(t.data.data)}).catch(function(){e.loading=!1})},cimsInputClick:function(){window.open("https:/jira.lepudigital.com/secure/CreateIssue.jspa","_blank")},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getmoduleList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getmoduleList()},addDialogClose:function(){this.$refs.addFormRef.resetFields()},syncJiraModuleClose:function(){this.$refs.syncJiraFormref.resetFields()},addItem:function(){var e=this;this.$refs.addFormRef.validate(function(t){t&&e.$api.modules.addmodule(l()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.$refs.addFormRef.resetFields(),e.getmoduleList()}).catch(function(){e.loading=!1})})},editDialogClose:function(){this.$refs.editFormRef.resetFields()},showEditDialog:function(e){var t=this;this.editDialogVisible=!0,this.$api.modules.querymoduleById(e).then(function(e){t.loading=!1,t.editForm=e.data.data}).catch(function(){t.loading=!1})},showSyncJiraDialog:function(e){var t=this;this.syncJiraVisible=!0,this.$api.modules.querymoduleById(e).then(function(e){t.loading=!1,console.log(e.data.data),t.editJiraForm=e.data.data,t.syncJiraForm.name=e.data.data.moduleName,t.syncJiraForm.project=e.data.data.jiraItemKey}).catch(function(){t.loading=!1})},syncJiraModule:function(){var e=this;this.$refs.syncJiraFormref.validate(function(t){if(t){var i=l()(e.syncJiraForm);e.syncModu.moduleJson=i,e.$api.modules.createJiraModule(e.syncModu).then(function(t){alert("res = "+t),e.$notify({message:t.data.msg,type:"success"}),e.syncDialogVisible=!1,e.$refs.syncJiraFormref.resetFields(),e.getmoduleList(),console.syncJiraModule}).catch(function(){e.loading=!1})}})},addJiraModule:function(){var e=this;this.$refs.editJiraFormref.validate(function(t){t&&e.$api.modules.createJiraModule(l()(e.addJiraModuleForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.$refs.addFormRef.resetFields(),e.getmoduleList(),console.addJiraModule}).catch(function(){e.loading=!1})})},addJiraModuleClose:function(){this.$refs.editJiraFormref.resetFields()},editItem:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(alert(l()(e.editForm)),e.$api.modules.updatemodule(l()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.getmoduleList()}).catch(function(){e.loading=!1}))})},showDetailDialog:function(e){var t=this;this.detailDialogVisible=!0,this.$api.modules.querymoduleById(e).then(function(e){t.loading=!1,t.detailForm=e.data.data}).catch(function(){t.loading=!1})},handleSelectionChange:function(e){this.multipleSelection=e},batchAddModToJira:function(){var e=this;if(0==this.multipleSelection.length)this.$notify({type:"warning",message:"请选择需要添加到jira的模块"});else{var t=this.multipleSelection;this.loading=!0,this.$confirm("确定将这些模块添加到jira吗","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning "}).then(function(){alert(l()(t));var i,a=[];t.forEach(function(e){var t={};t.project=e.jiraItemKey,t.description="",t.leadUserName="",t.name=e.moduleName,t.assigneeType="COMPONENT_LEAD",a.push(t)}),i={moduleJson:l()(a)},alert(l()(i)),e.$api.modules.batchAddModToJira(l()(i)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.selectModuleList()}).catch(function(){e.loading=!1}).catch(function(){e.loading=!1})})}},delItem:function(e){var t=this;this.$confirm("确定删除该模块吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.modules.deletemodule(e).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.getmoduleList(),t.getmoduleNameList()}).catch(function(){t.loading=!1})}).catch(function(){})}}},r={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"box"},[i("el-form",{staticClass:"item-form-inline",attrs:{inline:!0}},[i("el-form-item",{attrs:{label:"模块名称"}},[i("el-input",{attrs:{placeholder:"请输入关键字",clearable:""},model:{value:e.queryInfo.moduleName,callback:function(t){e.$set(e.queryInfo,"moduleName",t)},expression:"queryInfo.moduleName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"项目名称"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.itemId,callback:function(t){e.$set(e.queryInfo,"itemId",t)},expression:"queryInfo.itemId"}},e._l(e.itemOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")])],1)],1),e._v(" "),i("el-row",{staticClass:"add_button"},[i("el-col",{attrs:{span:2}},[i("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addDialogVisible=!0}}},[e._v("添加")])],1),e._v(" "),i("el-col",{attrs:{span:3}},[i("el-button",{attrs:{type:"primary"},on:{click:e.batchAddModToJira}},[e._v("一键同步jira")])],1)],1),e._v(" "),i("el-table",{attrs:{data:e.itemlist,border:"",fit:!0},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection",width:"60","reserve-selection":!0,align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),e._v(" "),i("el-table-column",{attrs:{label:"模块名称",prop:"moduleName",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"项目名称",prop:"itemName",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"经办人",prop:"dictValue",align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"创建时间",prop:"createTime",align:"center",width:"170"}}),e._v(" "),i("el-table-column",{attrs:{label:"更新时间",prop:"updateTime",align:"center",width:"170"}}),e._v(" "),i("el-table-column",{attrs:{label:"操作",fixed:"right",align:"center",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.showDetailDialog(t.row.id)}}},[e._v("查看")]),e._v(" "),i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.showEditDialog(t.row.id)}}},[e._v("编辑")]),e._v(" "),i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.showSyncJiraDialog(t.row.id)}}},[e._v("同步到jira")]),e._v(" "),i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.delItem(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),i("el-pagination",{attrs:{"current-page":e.queryInfo.pageNum,"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"prev, pager, next, sizes, total, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){return e.$set(e.queryInfo,"pageNum",t)},"update:current-page":function(t){return e.$set(e.queryInfo,"pageNum",t)}}}),e._v(" "),i("el-dialog",{attrs:{title:"添加",visible:e.addDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.addDialogClose}},[i("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.addFormRules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.addForm.itemId,callback:function(t){e.$set(e.addForm,"itemId",t)},expression:"addForm.itemId"}},e._l(e.itemOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"模块名称",prop:"moduleName"}},[i("el-input",{model:{value:e.addForm.moduleName,callback:function(t){e.$set(e.addForm,"moduleName",t)},expression:"addForm.moduleName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"经办人",prop:"developId"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.addForm.dictId,callback:function(t){e.$set(e.addForm,"dictId",t)},expression:"addForm.dictId"}},e._l(e.dictOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.id}})}),1)],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.addDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.addItem}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"添加模块",visible:e.addModulesDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.addModulesDialogVisible=t},close:e.editDialogClose}},[i("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.itemId,callback:function(t){e.$set(e.editForm,"itemId",t)},expression:"editForm.itemId"}},e._l(e.itemOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1)],1),e._v(" "),i("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"版本",prop:"itemId"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.itemId,callback:function(t){e.$set(e.editForm,"itemId",t)},expression:"editForm.itemId"}},e._l(e.itemOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.editDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.editItem}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"修改",visible:e.editDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:e.editDialogClose}},[i("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.itemId,callback:function(t){e.$set(e.editForm,"itemId",t)},expression:"editForm.itemId"}},e._l(e.itemOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"模块名称",prop:"moduleName"}},[i("el-input",{model:{value:e.editForm.moduleName,callback:function(t){e.$set(e.editForm,"moduleName",t)},expression:"editForm.moduleName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"经办人",prop:"dictId"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.editForm.dictId,callback:function(t){e.$set(e.editForm,"dictId",t)},expression:"editForm.dictId"}},e._l(e.dictOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"comments"}},[i("el-input",{attrs:{type:"textarea"},model:{value:e.editForm.comments,callback:function(t){e.$set(e.editForm,"comments",t)},expression:"editForm.comments"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.editDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.editItem}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"同步到jira",visible:e.syncJiraVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.syncJiraVisible=t},close:e.syncJiraModuleClose}},[i("el-form",{ref:"syncJiraFormref",attrs:{model:e.editJiraForm,rules:e.syncFormRules,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editJiraForm.itemId,callback:function(t){e.$set(e.editJiraForm,"itemId",t)},expression:"editJiraForm.itemId"}},e._l(e.itemOptions,function(e){return i("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"模块名称",prop:"moduleName"}},[i("el-input",{model:{value:e.editJiraForm.moduleName,callback:function(t){e.$set(e.editJiraForm,"moduleName",t)},expression:"editJiraForm.moduleName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"comments"}},[i("el-input",{attrs:{type:"textarea"},model:{value:e.editJiraForm.comment,callback:function(t){e.$set(e.editJiraForm,"comment",t)},expression:"editJiraForm.comment"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.syncJiraVisible=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.syncJiraModule}},[e._v("确 定")])],1)],1),e._v(" "),i("el-dialog",{attrs:{title:"查看",visible:e.detailDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.detailDialogVisible=t}}},[i("el-form",{attrs:{model:e.detailForm,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"项目名称",prop:"itemName"}},[i("el-input",{attrs:{disabled:""},model:{value:e.detailForm.itemName,callback:function(t){e.$set(e.detailForm,"itemName",t)},expression:"detailForm.itemName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"模块名称",prop:"moduleName"}},[i("el-input",{attrs:{disabled:""},model:{value:e.detailForm.moduleName,callback:function(t){e.$set(e.detailForm,"moduleName",t)},expression:"detailForm.moduleName"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"备注",prop:"comments"}},[i("el-input",{attrs:{type:"textarea",disabled:""},model:{value:e.detailForm.comments,callback:function(t){e.$set(e.detailForm,"comments",t)},expression:"detailForm.comments"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.detailDialogVisible=!1}}},[e._v("取 消")])],1)],1)],1)},staticRenderFns:[]};var n=i("VU/8")(o,r,!1,function(e){i("2OQO")},"data-v-330e6b22",null);t.default=n.exports}}); //# sourceMappingURL=19.2e953de49700e6d3e0a4.js.map