2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
webpackJsonp([16],{CO08:function(e,t){},"bYW/":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i("mvHQ"),o=i.n(a),l={data:function(){return{itemOptions:[],detailForm:{},editForm:{},queryInfo:{itemName:"",pageNum:1,pageSize:10},jiraItemOptions:[],itemList:[],currpage:1,total:0,addDialogVisible:!1,editDialogVisible:!1,detailDialogVisible:!1,addForm:{itemName:"",comments:"",jiraItem:"",jiraItemKey:""},addFormRules:{itemName:[{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()},created:function(){this.getItemList()},methods:{addchangeJiraItem:function(e){var t=this;this.jiraItemOptions.forEach(function(i){i.pname==e&&(t.addForm.jiraItemKey=i.pkey)})},editchangeJiraItem:function(e){var t=this;this.jiraItemOptions.forEach(function(i){i.pname==e&&(t.editForm.jiraItemKey=i.pkey)})},placeOnFile:function(e){var t=this;this.$confirm("归档后,该项目中所有测试用例将无法展示,确认归档吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.item.placeOnFileItemById(e).then(function(e){t.getItemList()}).catch(function(){})}).catch(function(){})},placeOffFile:function(e){var t=this;this.$confirm("还原后,该项目中所有测试用例将被展示,确认还原吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.item.placeOffFileItemById(e).then(function(e){t.getItemList()}).catch(function(){})}).catch(function(){})},placeStatusFormat:function(e,t){return 1==e.placeStatus?"正常":"已归档"},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}).catch(function(){e.loading=!1})},selectItemList:function(){this.queryInfo.pageNum=1,this.total=0,this.getItemList()},getItemList:function(){var e=this;this.$api.item.queryAllItem(o()(this.queryInfo)).then(function(t){e.loading=!1,e.itemList=t.data.data,e.total=t.data.count,e.queryInfo.pageNum=1}).catch(function(){e.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getItemList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getItemList()},addDialogClose:function(){this.$refs.addFormRef.resetFields()},addItemDialog:function(){var e=this;this.addDialogVisible=!0,this.$api.jira.getProject().then(function(t){e.jiraItemOptions=t.data.data})},addItem:function(){var e=this;this.$refs.addFormRef.validate(function(t){t&&e.$api.item.addItem(o()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.getItemList(),e.getItemNameList()}).catch(function(){e.loading=!1})})},editDialogClose:function(){this.$refs.editFormRef.resetFields()},showEditDialog:function(e){var t=this;this.editDialogVisible=!0,this.$api.jira.getProject().then(function(e){t.jiraItemOptions=e.data.data}),this.$api.item.queryItemById(e).then(function(e){t.loading=!1,t.editForm=e.data.data}).catch(function(){t.loading=!1})},editItem:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&e.$api.item.updateItem(o()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.getItemList(),e.getItemNameList()}).catch(function(){e.loading=!1})})},showDetailDialog:function(e){var t=this;this.detailDialogVisible=!0,this.$api.item.queryItemById(e).then(function(e){t.loading=!1,t.detailForm=e.data.data}).catch(function(){t.loading=!1})},delItem:function(e){var t=this;this.$confirm("确定删除该项目吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.item.deleteItem(e).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.getItemList(),t.getItemNameList()}).catch(function(){
|
||
|
//# sourceMappingURL=16.bd793ea4631de0145283.js.map
|