lepu-test-platform-web/dist/static/js/8.c7f198a2c9568ef42d9e.js

2 lines
27 KiB
JavaScript
Raw Normal View History

webpackJsonp([8],{"0Xag":function(e,t){},Iah3:function(e,t){},Pc8e:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={data:function(){return{itemOptions:[],editForm:{afterChange:""},addForm:{envCheckList:[],operator:""},queryAppId:"",queryInfo:{appId:"",env:"test",beforeChange:"",afterChange:"",ownerName:"",envCheckList:[],operator:"",comments:""},itemList:[],checkList:[],envOptions:[{id:1,name:"test"},{id:2,name:"test2"},{id:3,name:"pressure"}],orgOptions:[{orgId:"t1_develop",orgName:"研发一部"},{orgId:"t2_develop",orgName:"研发二部"},{orgId:"t3_develop",orgName:"研发三部"},{orgId:"t4_develop",orgName:"研发四部"}],timeout:null,editDialogVisible:!1,addDialogVisible:!1,editFormRules:{beforeChange:[{required:!1,message:"请输入变更前内容",trigger:"blur"}],afterChange:[{required:!0,message:"请输入变更后内容",trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:255,message:"长度在 0 到 255 个字符",trigger:"blur"}]},addFormRules:{orgName:[{required:!0,message:"请选择部门",trigger:"blur"}],appId:[{required:!0,message:"请输入AppId",trigger:"blur"}],name:[{required:!0,message:"请输入应用名称",trigger:"blur"}],envCheckList:[{type:"array",required:!0,message:"请至少选择一个环境",trigger:"change"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:255,message:"长度在 0 到 255 个字符",trigger:"blur"}]},originEnvCheckList:[],currentEnvCheckList:[],envCheckList:[],allTestEnvList:["test","test2","pressure"],leftNum:"",rightNum:""}},mounted:function(){},created:function(){this.getItemList()},watch:{editForm:function(e){var t=this;setTimeout(function(){t.handleLeftTextareaInput({target:{value:e.beforeChange}});var o=document.getElementById("rightNum"),a=document.getElementById("rightTextarea");t.lineTextareaScroll(o,a);var l=document.getElementById("leftNum"),i=document.getElementById("leftTextarea");t.lineTextareaScroll(l,i)},2e3)},deep:!0},methods:{addApolloApp:function(){console.log(this.queryInfo.env),this.addForm.envCheckList.push(this.queryInfo.env),this.addDialogVisible=!0},addApolloConfigInfo:function(){var e=this;this.$refs.addFormRef.validate(function(t){t&&(console.log(e.addForm.envCheckList),e.addForm.operator=JSON.parse(localStorage.getItem("userInfo")).nick,e.$api.apollo.addApolloItem(e.addForm).then(function(t){200==t.data.code&&e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.$refs.addFormRef.resetFields(),e.getItemList()}))})},editApolloConfigInfo:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(e.queryInfo.afterChange=e.editForm.afterChange,e.queryInfo.envCheckList=e.envCheckList,e.queryInfo.ownerName=e.itemList[0].ownerName,e.queryInfo.operator=JSON.parse(localStorage.getItem("userInfo")).nick,e.queryInfo.beforeChange=e.editForm.beforeChange,console.log("修改功能,左侧窗口内容:",e.editForm.beforeChange),console.log("修改功能,右侧窗口内容:",e.editForm.afterChange),e.queryInfo.comments=e.editForm.comments,e.$api.apollo.editApolloItem(e.queryInfo).then(function(t){200==t.data.code&&e.$notify({message:t.data.msg,type:"success"}),e.cancelEditDialogVisible()}))})},deleteApolloConfigInfo:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(e.queryInfo.afterChange=e.editForm.afterChange,e.queryInfo.envCheckList=e.envCheckList,e.queryInfo.ownerName=e.itemList[0].ownerName,e.queryInfo.operator=JSON.parse(localStorage.getItem("userInfo")).nick,e.queryInfo.beforeChange=e.editForm.beforeChange,e.queryInfo.comments=e.editForm.comments,console.log("删除功能,左侧窗口内容:",e.editForm.beforeChange),console.log("删除功能,右侧窗口内容:",e.editForm.afterChange),e.$api.apollo.deleteApolloItem(e.queryInfo).then(function(t){200==t.data.code&&(e.$notify({message:t.data.msg,type:"success"}),e.editForm.afterChange="")}))})},lineTextareaScroll:function(e,t){var o=void 0,a=void 0,l=function(e){!o&&t.removeEventListener("scroll",i),t.scrollTo(e.target.scrollLeft,e.tar
//# sourceMappingURL=8.c7f198a2c9568ef42d9e.js.map