提交 54cfb4c0 authored 作者: w's avatar w

上传代码

上级 25b63d90
.environment[data-v-b7e104ac],.sqlLink[data-v-b7e104ac]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box}.environment[data-v-b7e104ac]{box-shadow:0 .010417rem .0625rem 0 rgb(0 0 0/10%)}.flex[data-v-b7e104ac]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-b7e104ac]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-b7e104ac] .el-input{width:80%}.table[data-v-b7e104ac]{width:100%;max-height:calc(100% - .52083rem)}.table[data-v-b7e104ac] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-b7e104ac] .el-table__body-wrapper{height:calc(100% - .25rem);overflow-y:auto;cursor:pointer}.kv_item[data-v-b7e104ac]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem}.kv_item>i[data-v-b7e104ac]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}
\ No newline at end of file
.httpParam[data-v-1ecce398]{width:100%}.header_item[data-v-1ecce398]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.052083rem}.header_item>i[data-v-1ecce398]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParam[data-v-1ecce398] .el-tabs__content{padding:.052083rem .104167rem;box-sizing:border-box}.requestBody[data-v-1ecce398]{text-align:left}.request_item[data-v-1ecce398]{width:100%;padding:.104167rem;box-sizing:border-box}.request_none[data-v-1ecce398]{text-align:center}.fileUpload[data-v-1ecce398]{width:.208333rem;border:.005208rem solid #ccc}.el-dropdown-link[data-v-1ecce398]{cursor:pointer;color:#0265db}.el-icon-arrow-down[data-v-1ecce398]{font-size:.083333rem}.request_binary[data-v-1ecce398]{width:40%}.editorHeight[data-v-1ecce398]{height:1.041667rem}.addDynamicParams[data-v-7259ca1a]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box;overflow-y:auto}.breadcrumb[data-v-7259ca1a]{margin-bottom:.052083rem}.breadcrumb[data-v-7259ca1a] .el-breadcrumb__inner{font-size:.09375rem}.form[data-v-7259ca1a] .el-form-item__label{font-size:.083333rem}.kv_item[data-v-7259ca1a]{width:80%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem;margin-left:4.16667%;padding-left:80px}.kv_item>i[data-v-7259ca1a]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParamDiv[data-v-7259ca1a]{border:.005208rem solid #ccc;padding:.026042rem;box-sizing:border-box;border-radius:.026042rem}.editorHeight[data-v-7259ca1a]{height:1.041667rem;border:.005208rem solid #f0f0f0}
\ No newline at end of file
.httpParam[data-v-1ecce398]{width:100%}.header_item[data-v-1ecce398]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.052083rem}.header_item>i[data-v-1ecce398]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParam[data-v-1ecce398] .el-tabs__content{padding:.052083rem .104167rem;box-sizing:border-box}.requestBody[data-v-1ecce398]{text-align:left}.request_item[data-v-1ecce398]{width:100%;padding:.104167rem;box-sizing:border-box}.request_none[data-v-1ecce398]{text-align:center}.fileUpload[data-v-1ecce398]{width:.208333rem;border:.005208rem solid #ccc}.el-dropdown-link[data-v-1ecce398]{cursor:pointer;color:#0265db}.el-icon-arrow-down[data-v-1ecce398]{font-size:.083333rem}.request_binary[data-v-1ecce398]{width:40%}.editorHeight[data-v-1ecce398]{height:1.041667rem}.addDynamicParams[data-v-24eff9c6]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box;overflow-y:auto}.breadcrumb[data-v-24eff9c6]{margin-bottom:.052083rem}.breadcrumb[data-v-24eff9c6] .el-breadcrumb__inner{font-size:.09375rem}.form[data-v-24eff9c6] .el-form-item__label{font-size:.083333rem}.kv_item[data-v-24eff9c6]{width:80%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem;margin-left:4.16667%;padding-left:80px}.kv_item>i[data-v-24eff9c6]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParamDiv[data-v-24eff9c6]{border:.005208rem solid #ccc;padding:.026042rem;box-sizing:border-box;border-radius:.026042rem}.activion[data-v-24eff9c6]{width:100%;padding:0 .104167rem .104167rem;box-sizing:border-box;display:flex;justify-content:center}.activion_pie[data-v-24eff9c6]{width:80%}.editorHeight[data-v-24eff9c6]{height:1.041667rem;border:.005208rem solid #f0f0f0}
\ No newline at end of file
.environment[data-v-4b94df0a]{width:100%;height:100%}.flex[data-v-4b94df0a]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-4b94df0a]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-4b94df0a] .el-input{width:75%}.table[data-v-4b94df0a]{width:100%;max-height:calc(100% - .52083rem)}.table[data-v-4b94df0a] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-4b94df0a]{height:calc(100% - .25rem)}.kv_item[data-v-4b94df0a]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem}.kv_item>i[data-v-4b94df0a]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.table[data-v-4b94df0a] .el-table__body-wrapper{height:calc(100% - .25rem);overflow-y:auto;cursor:pointer}
\ No newline at end of file
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>keystone自动化测试平台</title><link href="css/chunk-06d05c38.697046f1.css" rel="prefetch"><link href="css/chunk-0f6a3514.808d612a.css" rel="prefetch"><link href="css/chunk-13ac8476.5789cbf4.css" rel="prefetch"><link href="css/chunk-1422af70.f01fed2a.css" rel="prefetch"><link href="css/chunk-21e2c124.361b3a0e.css" rel="prefetch"><link href="css/chunk-28edb6c0.1372ffaf.css" rel="prefetch"><link href="css/chunk-29d62752.9ddb146b.css" rel="prefetch"><link href="css/chunk-2f943e56.037c29ae.css" rel="prefetch"><link href="css/chunk-41220412.41c27296.css" rel="prefetch"><link href="css/chunk-53477b49.3efb3eb4.css" rel="prefetch"><link href="css/chunk-5e64d548.5f27b71f.css" rel="prefetch"><link href="css/chunk-6b67aa43.dcd9ade0.css" rel="prefetch"><link href="css/chunk-7d5da0ec.98710663.css" rel="prefetch"><link href="css/chunk-8d3fb520.5abc22e5.css" rel="prefetch"><link href="css/chunk-ab107db4.c18fddcf.css" rel="prefetch"><link href="js/chunk-06d05c38.68d3ac05.js" rel="prefetch"><link href="js/chunk-0f6a3514.fd1addad.js" rel="prefetch"><link href="js/chunk-13ac8476.a4fbaf6f.js" rel="prefetch"><link href="js/chunk-1422af70.ff151d74.js" rel="prefetch"><link href="js/chunk-21e2c124.7ec8ba6c.js" rel="prefetch"><link href="js/chunk-28edb6c0.5a15dfb2.js" rel="prefetch"><link href="js/chunk-29d62752.236fecc9.js" rel="prefetch"><link href="js/chunk-2d0b6c33.fe39f8dd.js" rel="prefetch"><link href="js/chunk-2d0f0f44.422cd409.js" rel="prefetch"><link href="js/chunk-2f943e56.14eee39f.js" rel="prefetch"><link href="js/chunk-41220412.63b75f12.js" rel="prefetch"><link href="js/chunk-53477b49.1804c2c8.js" rel="prefetch"><link href="js/chunk-5e64d548.c4050c8f.js" rel="prefetch"><link href="js/chunk-6b67aa43.fa544636.js" rel="prefetch"><link href="js/chunk-7d5da0ec.ca7e743e.js" rel="prefetch"><link href="js/chunk-8d3fb520.646db3af.js" rel="prefetch"><link href="js/chunk-ab107db4.830f6d2b.js" rel="prefetch"><link href="css/app.407df8db.css" rel="preload" as="style"><link href="css/chunk-vendors.b7d549ec.css" rel="preload" as="style"><link href="js/app.cfbfb935.js" rel="preload" as="script"><link href="js/chunk-vendors.f09da9e9.js" rel="preload" as="script"><link href="css/chunk-vendors.b7d549ec.css" rel="stylesheet"><link href="css/app.407df8db.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but communication doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.f09da9e9.js"></script><script src="js/app.cfbfb935.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>keystone自动化测试平台</title><link href="css/chunk-06d05c38.697046f1.css" rel="prefetch"><link href="css/chunk-0f6a3514.808d612a.css" rel="prefetch"><link href="css/chunk-1e16b292.8e4db54c.css" rel="prefetch"><link href="css/chunk-21e2c124.361b3a0e.css" rel="prefetch"><link href="css/chunk-3897e74c.ec0b1c8b.css" rel="prefetch"><link href="css/chunk-3e2cd87e.2d1d97e3.css" rel="prefetch"><link href="css/chunk-41f9a6ef.c6c94e90.css" rel="prefetch"><link href="css/chunk-443190c1.d0df370d.css" rel="prefetch"><link href="css/chunk-55b69215.3efb3eb4.css" rel="prefetch"><link href="css/chunk-6ab6551a.d05ce6f0.css" rel="prefetch"><link href="css/chunk-aa827f1a.309b46cb.css" rel="prefetch"><link href="css/chunk-ac07f788.653740ca.css" rel="prefetch"><link href="css/chunk-d8a207e4.0a10552c.css" rel="prefetch"><link href="css/chunk-e47eabe0.22719440.css" rel="prefetch"><link href="css/chunk-ecc7eb14.44766bb5.css" rel="prefetch"><link href="js/chunk-06d05c38.a9a5dc1a.js" rel="prefetch"><link href="js/chunk-0f6a3514.b3a5b40d.js" rel="prefetch"><link href="js/chunk-1e16b292.7e6bc23e.js" rel="prefetch"><link href="js/chunk-21e2c124.1388a373.js" rel="prefetch"><link href="js/chunk-2d0b6c33.b29e4326.js" rel="prefetch"><link href="js/chunk-2d0f0f44.1b56ae1e.js" rel="prefetch"><link href="js/chunk-3897e74c.ec55c50d.js" rel="prefetch"><link href="js/chunk-3e2cd87e.99eca555.js" rel="prefetch"><link href="js/chunk-41f9a6ef.a47a6af8.js" rel="prefetch"><link href="js/chunk-443190c1.965ecc93.js" rel="prefetch"><link href="js/chunk-55b69215.0d068b75.js" rel="prefetch"><link href="js/chunk-6ab6551a.30a98964.js" rel="prefetch"><link href="js/chunk-aa827f1a.b52627a0.js" rel="prefetch"><link href="js/chunk-ac07f788.c0c1d234.js" rel="prefetch"><link href="js/chunk-d8a207e4.fce4bf05.js" rel="prefetch"><link href="js/chunk-e47eabe0.8247bcd6.js" rel="prefetch"><link href="js/chunk-ecc7eb14.baf3fbab.js" rel="prefetch"><link href="css/app.407df8db.css" rel="preload" as="style"><link href="css/chunk-vendors.b7d549ec.css" rel="preload" as="style"><link href="js/app.09c4f852.js" rel="preload" as="script"><link href="js/chunk-vendors.f09da9e9.js" rel="preload" as="script"><link href="css/chunk-vendors.b7d549ec.css" rel="stylesheet"><link href="css/app.407df8db.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but communication doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.f09da9e9.js"></script><script src="js/app.09c4f852.js"></script></body></html>
\ No newline at end of file
(function(e){function t(t){for(var a,c,i=t[0],u=t[1],s=t[2],d=0,h=[];d<i.length;d++)c=i[d],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&h.push(o[c][0]),o[c]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(e[a]=u[a]);m&&m(t);while(h.length)h.shift()();return r.push.apply(r,s||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,c=1;c<n.length;c++){var i=n[c];0!==o[i]&&(a=!1)}a&&(r.splice(t--,1),e=u(u.s=n[0]))}return e}var a={},c={app:0},o={app:0},r=[];function i(e){return u.p+"js/"+({}[e]||e)+"."+{"chunk-06d05c38":"a9a5dc1a","chunk-0f6a3514":"b3a5b40d","chunk-1e16b292":"7e6bc23e","chunk-21e2c124":"1388a373","chunk-2d0b6c33":"b29e4326","chunk-2d0f0f44":"1b56ae1e","chunk-3e2cd87e":"99eca555","chunk-41f9a6ef":"a47a6af8","chunk-443190c1":"965ecc93","chunk-55b69215":"0d068b75","chunk-3897e74c":"ec55c50d","chunk-aa827f1a":"b52627a0","chunk-ac07f788":"c0c1d234","chunk-ecc7eb14":"baf3fbab","chunk-6ab6551a":"30a98964","chunk-d8a207e4":"fce4bf05","chunk-e47eabe0":"8247bcd6"}[e]+".js"}function u(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.e=function(e){var t=[],n={"chunk-06d05c38":1,"chunk-0f6a3514":1,"chunk-1e16b292":1,"chunk-21e2c124":1,"chunk-3e2cd87e":1,"chunk-41f9a6ef":1,"chunk-443190c1":1,"chunk-55b69215":1,"chunk-3897e74c":1,"chunk-aa827f1a":1,"chunk-ac07f788":1,"chunk-ecc7eb14":1,"chunk-6ab6551a":1,"chunk-d8a207e4":1,"chunk-e47eabe0":1};c[e]?t.push(c[e]):0!==c[e]&&n[e]&&t.push(c[e]=new Promise((function(t,n){for(var a="css/"+({}[e]||e)+"."+{"chunk-06d05c38":"697046f1","chunk-0f6a3514":"808d612a","chunk-1e16b292":"8e4db54c","chunk-21e2c124":"361b3a0e","chunk-2d0b6c33":"31d6cfe0","chunk-2d0f0f44":"31d6cfe0","chunk-3e2cd87e":"2d1d97e3","chunk-41f9a6ef":"c6c94e90","chunk-443190c1":"d0df370d","chunk-55b69215":"3efb3eb4","chunk-3897e74c":"ec0b1c8b","chunk-aa827f1a":"309b46cb","chunk-ac07f788":"653740ca","chunk-ecc7eb14":"44766bb5","chunk-6ab6551a":"d05ce6f0","chunk-d8a207e4":"0a10552c","chunk-e47eabe0":"22719440"}[e]+".css",o=u.p+a,r=document.getElementsByTagName("link"),i=0;i<r.length;i++){var s=r[i],d=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(d===a||d===o))return t()}var h=document.getElementsByTagName("style");for(i=0;i<h.length;i++){s=h[i],d=s.getAttribute("data-href");if(d===a||d===o)return t()}var m=document.createElement("link");m.rel="stylesheet",m.type="text/css",m.onload=t,m.onerror=function(t){var a=t&&t.target&&t.target.src||o,r=new Error("Loading CSS chunk "+e+" failed.\n("+a+")");r.code="CSS_CHUNK_LOAD_FAILED",r.request=a,delete c[e],m.parentNode.removeChild(m),n(r)},m.href=o;var l=document.getElementsByTagName("head")[0];l.appendChild(m)})).then((function(){c[e]=0})));var a=o[e];if(0!==a)if(a)t.push(a[2]);else{var r=new Promise((function(t,n){a=o[e]=[t,n]}));t.push(a[2]=r);var s,d=document.createElement("script");d.charset="utf-8",d.timeout=120,u.nc&&d.setAttribute("nonce",u.nc),d.src=i(e);var h=new Error;s=function(t){d.onerror=d.onload=null,clearTimeout(m);var n=o[e];if(0!==n){if(n){var a=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;h.message="Loading chunk "+e+" failed.\n("+a+": "+c+")",h.name="ChunkLoadError",h.type=a,h.request=c,n[1](h)}o[e]=void 0}};var m=setTimeout((function(){s({type:"timeout",target:d})}),12e4);d.onerror=d.onload=s,document.head.appendChild(d)}return Promise.all(t)},u.m=e,u.c=a,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},u.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,t){if(1&t&&(e=u(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)u.d(n,a,function(t){return e[t]}.bind(null,a));return n},u.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="",u.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],d=s.push.bind(s);s.push=t,s=s.slice();for(var h=0;h<s.length;h++)t(s[h]);var m=d;r.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"034f":function(e,t,n){"use strict";n("85ec")},"56d7":function(e,t,n){"use strict";n.r(t);var a=n("5530"),c=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("d3b7"),n("2b0e")),o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},r=[],i=(n("034f"),n("2877")),u={},s=Object(i["a"])(u,o,r,!1,null,null,null),d=s.exports,h=(n("3ca3"),n("ddb0"),n("8c4f"));c["default"].use(h["a"]);var m=[{path:"*",redirect:"/"},{name:"login",path:"/login",component:function(){return n.e("chunk-0f6a3514").then(n.bind(null,"dc3f"))}},{name:"",path:"/",component:function(){return n.e("chunk-6ab6551a").then(n.bind(null,"fcfc"))},redirect:"/home",children:[{name:"home",path:"/home",component:function(){return n.e("chunk-3e2cd87e").then(n.bind(null,"77b8"))},meta:{title:"首页"},redirect:"/case",children:[{name:"addDynamicParams",path:"/addDynamicParams",component:function(){return Promise.all([n.e("chunk-55b69215"),n.e("chunk-aa827f1a")]).then(n.bind(null,"c7fa"))},meta:{title:"新增动参"}},{name:"addBehavior",path:"/addBehavior",component:function(){return Promise.all([n.e("chunk-55b69215"),n.e("chunk-ac07f788")]).then(n.bind(null,"c67f"))},meta:{title:"新增行为"}},{name:"taskBar",path:"/taskBar",redirect:"/addCase",component:function(){return n.e("chunk-21e2c124").then(n.bind(null,"8e3b"))},children:[{name:"addCase",path:"/addCase",component:function(){return Promise.all([n.e("chunk-55b69215"),n.e("chunk-ecc7eb14")]).then(n.bind(null,"4d4d"))},meta:{title:"新增接口"}}]},{name:"dynamicParam",path:"/dynamicParam",component:function(){return n.e("chunk-1e16b292").then(n.bind(null,"e306"))},meta:{title:"动参列表"}},{name:"behavior",path:"/behavior",component:function(){return n.e("chunk-d8a207e4").then(n.bind(null,"2b56"))},meta:{title:"行为列表"}},{name:"case",path:"/case",component:function(){return n.e("chunk-06d05c38").then(n.bind(null,"d479"))},meta:{title:"接口列表"}},{name:"environment",path:"/environment",component:function(){return n.e("chunk-e47eabe0").then(n.bind(null,"f8b9"))},meta:{title:"环境列表"}},{name:"actuator",path:"/actuator",component:function(){return Promise.all([n.e("chunk-55b69215"),n.e("chunk-3897e74c")]).then(n.bind(null,"e774"))},meta:{title:"保存测试接口"}},{name:"actuatorList",path:"/actuatorList",component:function(){return n.e("chunk-443190c1").then(n.bind(null,"1797"))},meta:{title:"执行器列表"}},{name:"statisticalAnalysis",path:"/statisticalAnalysis",component:function(){return n.e("chunk-2d0b6c33").then(n.bind(null,"1f19"))},meta:{title:"统计分析"}},{name:"timingPlan",path:"/timingPlan",component:function(){return n.e("chunk-2d0f0f44").then(n.bind(null,"9f23"))},meta:{title:"定时计划"}},{name:"sqlLink",path:"/sqlLink",component:function(){return n.e("chunk-41f9a6ef").then(n.bind(null,"dbaa"))},meta:{title:"数据库链接"}}]}]}],l=new h["a"]({routes:m}),f=h["a"].prototype.push;h["a"].prototype.push=function(e){return f.call(this,e).catch((function(e){return e}))},l.beforeEach((function(e,t,n){if("/login"===e.path)return n();var a=window.sessionStorage.getItem("token");if(!a)return n("/login");n()}));var g=l,p=n("2f62");c["default"].use(p["a"]);var b=new p["a"].Store({state:{projectId:{},envHint:{},shrinkDiv:null,homePageShrink:!1,selectCaseData:"",newCaseName:"",deleteCase:0,addCaseId:0,allSaveData:{},editData:{},editId:{},allData:{},selectPieStatus:{num:0},selectData:{},addCaseStatus:{num:0},allCaseData:[],addCaseData:{},NowSelectId:null,homeSelectValue:[],homeSelectPath:"",homeToBehaviorData:null,homeToDynamicParamData:null,homeToEnvironmentData:null,homeToSqlLinkData:null,homeToCctuatorListData:null,actuatorListSelectHomeItem:null,actuatorSaveBtnData:{},deleteActuatorBar:{},addCalseNameToList:{}},mutations:{changeProjectId:function(e,t){e.projectId=t},changeEnvHint:function(e,t){e.envHint=t},changeShrinkDiv:function(e,t){e.shrinkDiv=t},changeHomePageShrink:function(e,t){e.homePageShrink=t},changeSelectCaseData:function(e,t){e.selectCaseData=t},changeNewCaseName:function(e,t){e.newCaseName=t},changeDeleteCase:function(e,t){e.deleteCase=t},changeAddCaseId:function(e,t){e.addCaseId=t},changeAllSaveData:function(e,t){e.allSaveData=t},changeEditData:function(e,t){e.editData=t},changeEditId:function(e,t){e.editId=t},changeSelectPieStatus:function(e,t){e.selectPieStatus=t},changeAllData:function(e,t){e.allData=t},changeSelectData:function(e,t){e.selectData=t},changeAddCaseStatus:function(e,t){e.addCaseStatus=t},changeAllCaseData:function(e,t){e.allCaseData=t},changeAddCaseData:function(e,t){e.addCaseData=t},changeNowSelectId:function(e,t){e.NowSelectId=t},changehomeSelectValue:function(e,t){e.homeSelectValue=t},changehomeSelectPath:function(e,t){e.homeSelectPath=t},changehomeToBehaviorData:function(e,t){e.homeToBehaviorData=t},changehomeToDynamicParamData:function(e,t){e.homeToDynamicParamData=t},changehomeToEnvironmentData:function(e,t){e.homeToEnvironmentData=t},changehomeToSqlLinkData:function(e,t){e.homeToSqlLinkData=t},changehomeToCctuatorListData:function(e,t){e.homeToCctuatorListData=t},changeactuatorListSelectHomeItem:function(e,t){e.actuatorListSelectHomeItem=t},changeactuatorSaveBtnData:function(e,t){e.actuatorSaveBtnData=t},changedeleteActuatorBar:function(e,t){e.deleteActuatorBar=t},changeaddCalseNameToList:function(e,t){e.addCalseNameToList=t}},actions:{changeProjectIdAct:function(e,t){e.commit("changeProjectId",t)},changeEnvHintAct:function(e,t){e.commit("changeEnvHint",t)},changeShrinkDivAct:function(e,t){e.commit("changeShrinkDiv",t)},changeHomePageShrinkAct:function(e,t){e.commit("changeHomePageShrink",t)},changeSelectCaseDataAct:function(e,t){e.commit("changeSelectCaseData",t)},changeNewCaseNameAct:function(e,t){e.commit("changeNewCaseName",t)},changeDeleteCaseAct:function(e,t){e.commit("changeDeleteCase",t)},changeAddCaseIdAct:function(e,t){e.commit("changeAddCaseId",t)},changeAllSaveDataAct:function(e,t){e.commit("changeAllSaveData",t)},changeEditDataAct:function(e,t){e.commit("changeEditData",t)},changeEditIdAct:function(e,t){e.commit("changeEditId",t)},changeSelectPieStatusAct:function(e,t){e.commit("changeSelectPieStatus",t)},changeAllDataAct:function(e,t){e.commit("changeAllData",t)},changeSelectDataAct:function(e,t){e.commit("changeSelectData",t)},changeAddCaseStatusAct:function(e,t){e.commit("changeAddCaseStatus",t)},changeAllCaseDataAct:function(e,t){e.commit("changeAllCaseData",t)},changeAddCaseDataAct:function(e,t){e.commit("changeAddCaseData",t)},changeNowSelectIdAct:function(e,t){e.commit("changeNowSelectId",t)},changehomeSelectValueAct:function(e,t){e.commit("changehomeSelectValue",t)},changehomeSelectPathAct:function(e,t){e.commit("changehomeSelectPath",t)},changehomeToBehaviorDataAct:function(e,t){e.commit("changehomeToBehaviorData",t)},changehomeToDynamicParamDataAct:function(e,t){e.commit("changehomeToDynamicParamData",t)},changehomeToEnvironmentDataAct:function(e,t){e.commit("changehomeToEnvironmentData",t)},changehomeToSqlLinkDataAct:function(e,t){e.commit("changehomeToSqlLinkData",t)},changehomeToCctuatorListDataAct:function(e,t){e.commit("changehomeToCctuatorListData",t)},changeactuatorListSelectHomeItemAct:function(e,t){e.commit("changeactuatorListSelectHomeItem",t)},changeactuatorSaveBtnDataAct:function(e,t){e.commit("changeactuatorSaveBtnData",t)},changeDeleteActuatorBarAct:function(e,t){e.commit("changedeleteActuatorBar",t)},changeaddCalseNameToListAct:function(e,t){e.commit("changeaddCalseNameToList",t)}},modules:{}}),v=(n("5cfb"),n("5c96")),k=n.n(v),D=(n("0fae"),n("bc3a")),y=n.n(D),C=n("a1bc"),S=function(e){return Object(v["Message"])(Object(a["a"])(Object(a["a"])({},e),{},{offset:100}))};["success","warning","info","error"].forEach((function(e){S[e]=function(t){return"string"===typeof t&&(t={message:t,offset:100}),t.type=e,Object(v["Message"])(t)}}));var A=S;y.a.interceptors.request.use((function(e){return e}),(function(e){return Promise.reject(e)})),y.a.interceptors.response.use((function(e){return e}),(function(e){return 0!=e.response.data.indexOf("0 您查询的页码已经超出范围")&&A.error(e.response.data),Promise.reject(e)}));var j=function(e,t){var n=t.method,a=void 0===n?"get":n,c=t.timeout,o=void 0===c?6e4:c,r=t.data,i=void 0===r?{}:r,u=t.params,s=void 0===u?{}:u,d=t.headers,h=void 0===d?{"Content-Type":"application/json"}:d,m=t.dataType,l=void 0===m?"json":m,f={method:a,timeout:o,url:e,baseURL:C["a"].http,data:i,params:s,headers:h,dataType:l};return y()(f)},T={userLogin:function(e){return j("/user/login",{method:"post",data:e})},queryAllProject:function(){return j("/projects",{method:"get"})},changeProjectName:function(e){return j("/projects",{method:"put",data:e})},addProjcet:function(e){return j("/projects",{method:"post",data:e})},deleteProject:function(e){return j("/projects/".concat(e),{method:"delete"})},queryAllActivion:function(e,t){return j("/moves/page",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryMovesCondition:function(e,t){return j("/moves/condition",{method:"get",params:Object(a["a"])({projectId:e},t)})},deleteActivion:function(e){return j("/moves/".concat(e),{method:"delete"})},editActivion:function(e){return j("/moves",{method:"put",data:e})},getActivion:function(e){return j("/moves/".concat(e),{method:"get"})},addActivion:function(e){return j("/moves",{method:"post",data:e})},queryAllEnvironments:function(e,t){return j("/environments/page",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryEnvironmentsCondition:function(e,t){return j("/environments/condition",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryEnvironments:function(e){return j("/environments/".concat(e),{method:"get"})},addEnvironments:function(e){return j("/environments",{method:"post",data:e})},deleteEnvironments:function(e){return j("/environments/".concat(e),{method:"delete"})},editEnvironments:function(e){return j("/environments",{method:"put",data:e})},queryAllConnects:function(e){return j("/connects/page",{method:"get",params:e})},queryConnectsCondition:function(e){return j("/connects/condition",{method:"get",params:e})},queryConnects:function(e){return j("/connects",{method:"post",data:e})},addConnects:function(e){return j("/connects",{method:"post",data:e})},editConnects:function(e){return j("/connects",{method:"put",data:e})},deleteConnects:function(e){return j("/connects/".concat(e),{method:"delete"})},testConnects:function(e){return j("/connects/test",{method:"post",data:e})},queryAllTestCases:function(e,t){return j("/testCases/page",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryTestCasesCondition:function(e,t){return j("/testCases/condition",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryTestCases:function(e){return j("/testCases",{method:"post",data:e})},addTestCases:function(e){return j("/testCases",{method:"post",data:e})},editTestCases:function(e){return j("/testCases",{method:"post",data:e})},getCaseById:function(e){return j("/testCases/".concat(e),{method:"get"})},deleteTestCases:function(e){return j("/testCases/".concat(e),{method:"delete"})},queryAllDynamicVariables:function(e,t){return j("/dynamicVariables/page",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryDynamicVariablesCondition:function(e,t){return j("/dynamicVariables/condition",{method:"get",params:Object(a["a"])({projectId:e},t)})},queryDynamicVariables:function(e){return j("/dynamicVariables",{method:"post",data:e})},addDynamicVariables:function(e){return j("/dynamicVariables",{method:"post",data:e})},editDynamicVariables:function(e){return j("/dynamicVariables",{method:"put",data:e})},deleteDynamicVariables:function(e){return j("/dynamicVariables/".concat(e),{method:"delete"})},getVariableByProjectId:function(e){return j("/hints/dynamicVariableName/".concat(e),{method:"get"})},getVariableByEnv:function(e){return j("/hints/variable/".concat(e),{method:"get"})},getDBHints:function(e){return j("/db/hints",{method:"get",params:e})},selectSql:function(e){return j("/db/sql",{method:"get",params:e})},selectRunSql:function(e){return j("/db/runSql",{method:"post",data:e})},sqlTableNames:function(e){return j("/db/tableNames",{method:"get"})},getSwagger:function(e){return j("/swaggers",{method:"get",params:e})},getExecutionHistory:function(e){return j("/executionHistory/executionHistory",{method:"get",params:e})},getExecutionHistoryDetail:function(e){return j("/executionHistory/executionHistoryDetail",{method:"get",params:e})},getLastExecution:function(e){return j("/executionHistory/lastExecution",{method:"get",params:e})},getExecutionRecordsList:function(e){return j("/executionRecords/list",{method:"get",params:e})},getTestJob:function(e){return j("/testJob/page",{method:"get",params:e})},addTestJob:function(e){return j("/testJob",{method:"post",data:e})},changeTestJob:function(e){return j("/testJob",{method:"put",data:e})},deleteTestJob:function(e){return j("/testJob/".concat(e),{method:"delete"})},executionRecordsTree:function(e){return j("/executionRecords/tree",{method:"get",params:e})},testCasesListVo:function(e){return j("/testCases/listVo",{method:"get",params:e})}},P=T;n("b059"),n("77ed");c["default"].prototype.$http=P,c["default"].use(k.a),c["default"].config.productionTip=!1;var E=function(e){return Object(v["Message"])(Object(a["a"])(Object(a["a"])({},e),{},{offset:100}))};["success","warning","info","error"].forEach((function(e){E[e]=function(t){return"string"===typeof t&&(t={message:t,offset:100}),t.type=e,Object(v["Message"])(t)}})),c["default"].prototype.$message=E,new c["default"]({router:g,store:b,render:function(e){return e(d)}}).$mount("#app")},"85ec":function(e,t,n){},a1bc:function(e,t,n){"use strict";var a="192.168.101.18:8765";a="localhost:8765";var c={http:"http://"+a,ws:"ws://"+a};t["a"]=c},b059:function(e,t,n){}});
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41f9a6ef"],{"326e":function(e,t,a){},"3b61":function(e,t,a){"use strict";a("326e")},b0c0:function(e,t,a){var r=a("83ab"),n=a("5e77").EXISTS,s=a("e330"),o=a("9bf2").f,i=Function.prototype,l=s(i.toString),c=/^\s*function ([^ (]*)/,u=s(c.exec),d="name";r&&!n&&o(i,d,{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(e){return""}}})},dbaa:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sqlLink"},[a("div",{staticClass:"environment"},[a("div",{staticClass:"top_search"},[a("el-row",[a("el-col",{staticClass:"flex",attrs:{span:6}},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",clearable:""},nativeOn:{keyup:function(t){return e.keyDown(t)}},model:{value:e.searchData.name,callback:function(t){e.$set(e.searchData,"name",t)},expression:"searchData.name"}}),a("el-button",{staticStyle:{margin:"10px"},attrs:{type:"primary"},on:{click:e.addEnv}},[e._v("新增")])],1)],1)],1),a("div",{staticClass:"table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData},on:{"row-click":e.tabRowClick}},[a("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"}}),a("el-table-column",{attrs:{prop:"username",label:"账号",align:"center"}}),a("el-table-column",{attrs:{prop:"password",label:"密码",align:"center"}},[[a("span",[e._v("********")])]],2),a("el-table-column",{attrs:{prop:"url",label:"URL",align:"center"}}),a("el-table-column",{attrs:{prop:"driver",label:"所用驱动",align:"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return a.stopPropagation(),e.showEditDialog(t.row)}}},[e._v("编辑 ")]),a("el-button",{attrs:{type:"success",size:"mini"},on:{click:function(a){return a.stopPropagation(),e.testLink(t.row)}}},[e._v("测试链接 ")]),a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(a){return a.stopPropagation(),e.deleteTable(t.row.id)}}},[e._v("删除 ")])]}}])})],1),a("el-pagination",{staticStyle:{"text-align":"right","margin-top":"10px"},attrs:{layout:"prev, pager, next",total:e.pageTotal},on:{"current-change":e.currentChange}})],1),a("el-dialog",{attrs:{title:"",visible:e.dialogVisible,width:"60%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"URL",prop:"url"}},[a("el-input",{model:{value:e.form.url,callback:function(t){e.$set(e.form,"url",t)},expression:"form.url"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"账号",prop:"username"}},[a("el-input",{model:{value:e.form.username,callback:function(t){e.$set(e.form,"username",t)},expression:"form.username"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"密码",prop:"password"}},[a("el-input",{attrs:{"show-password":""},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"所用驱动",prop:"driver"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.form.driver,callback:function(t){e.$set(e.form,"driver",t)},expression:"form.driver"}},[a("el-option",{attrs:{label:"com.mysql.cj.jdbc.Driver",value:"com.mysql.cj.jdbc.Driver"}})],1)],1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.comfirmAdd}},[e._v("确 定")]),a("el-button",{attrs:{type:"success"},on:{click:e.testLink}},[e._v("测试链接")]),a("el-button",{on:{click:e.handleClose}},[e._v("取 消")])],1)],1)],1)])},n=[],s=a("5530"),o=(a("b0c0"),a("e9c4"),{name:"sqlLink",data:function(){return{pageTotal:0,search:{},form:{},dialogVisible:!1,tableData:[],rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],url:[{required:!0,message:"请输入url",trigger:"blur"}],username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}],driver:[{required:!0,message:"请选择所用驱动",trigger:"change"}]},editOrAdd:"",searchData:{pageNum:1,pageSize:10}}},mounted:function(){this.$store.state.projectId.id&&this.queryAllConnects()},watch:{"$store.state.projectId":function(e){this.queryAllConnects()},"$store.state.homeToSqlLinkData":function(e){this.showEditDialog(e)}},methods:{keyDown:function(e){console.log(e),"Enter"==e.code&&this.searchTable()},searchTable:function(){this.searchData.pageNum=1,this.queryAllConnects()},queryAllConnects:function(){var e=this;this.searchData.name?this.$http.queryConnectsCondition(Object(s["a"])({projectId:this.$store.state.projectId.id},this.searchData)).then((function(t){var a=t.data.data.records;e.pageTotal=t.data.data.total,e.tableData=a,e.$store.dispatch("changehomeSelectValueAct",e.tableData),e.$store.dispatch("changehomeSelectPathAct","./sqlLink")})).catch((function(t){0==t.response.data.indexOf("0 您查询的页码已经超出范围")&&(e.searchData.pageNum=e.searchData.pageNum-1),e.queryAllConnects()})):this.$http.queryAllConnects(Object(s["a"])({projectId:this.$store.state.projectId.id},this.searchData)).then((function(t){var a=t.data.data.records;e.pageTotal=t.data.data.total,e.tableData=a,e.$store.dispatch("changehomeSelectValueAct",e.tableData),e.$store.dispatch("changehomeSelectPathAct","./sqlLink")})).catch((function(t){0==t.response.data.indexOf("0 您查询的页码已经超出范围")&&(e.searchData.pageNum=e.searchData.pageNum-1),e.queryAllConnects()}))},currentChange:function(e){this.searchData.pageNum=e,this.queryAllConnects()},handleClose:function(){this.$refs.form.resetFields(),this.dialogVisible=!1,this.form={}},showEditDialog:function(e){this.editOrAdd="edit",this.form=JSON.parse(JSON.stringify(e)),this.dialogVisible=!0},tabRowClick:function(e,t,a){this.showEditDialog(e)},deleteTable:function(e){var t=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$http.deleteConnects(e).then((function(e){t.queryAllConnects(),t.$message({type:"success",message:"删除成功!"})})).catch((function(e){}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},comfirmAdd:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return console.log("error submit!!"),!1;var a=function(){e.dialogVisible=!1,e.form={},e.kvItem=[{}],e.$message.success("edit"==e.editOrAdd?"编辑成功":"保存成功"),e.queryAllConnects()},r=Object(s["a"])(Object(s["a"])({},e.form),{},{projectId:e.$store.state.projectId.id});"edit"==e.editOrAdd?(r.updateTime=void 0,e.$http.editConnects(r).then((function(e){a()}))):e.$http.addConnects(r).then((function(e){a()}))}))},addEnv:function(){this.editOrAdd="add",this.dialogVisible=!0},testLink:function(e){var t=this;if(e.id){var a={driver:e.driver,name:e.name,password:e.password,url:e.url,username:e.username};this.$http.testConnects(a).then((function(e){t.$message.success(e.data)}))}else this.$refs.form.validate((function(e){if(!e)return console.log("error submit!!"),!1;var a={driver:t.form.driver,name:t.form.name,password:t.form.password,url:t.form.url,username:t.form.username};t.$http.testConnects(a).then((function(e){t.$message.success(e.data)}))}))}}}),i=o,l=(a("3b61"),a("2877")),c=Object(l["a"])(i,r,n,!1,null,"b7e104ac",null);t["default"]=c.exports},e9c4:function(e,t,a){var r=a("23e7"),n=a("da84"),s=a("d066"),o=a("2ba4"),i=a("e330"),l=a("d039"),c=n.Array,u=s("JSON","stringify"),d=i(/./.exec),f=i("".charAt),m=i("".charCodeAt),p=i("".replace),h=i(1..toString),g=/[\uD800-\uDFFF]/g,b=/^[\uD800-\uDBFF]$/,v=/^[\uDC00-\uDFFF]$/,w=function(e,t,a){var r=f(a,t-1),n=f(a,t+1);return d(b,e)&&!d(v,n)||d(v,e)&&!d(b,r)?"\\u"+h(m(e,0),16):e},y=l((function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}));u&&r({target:"JSON",stat:!0,forced:y},{stringify:function(e,t,a){for(var r=0,n=arguments.length,s=c(n);r<n;r++)s[r]=arguments[r];var i=o(u,null,s);return"string"==typeof i?p(i,g,w):i}})}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-aa827f1a"],{"0aa3":function(e,t,a){"use strict";a("3f7d")},"3f7d":function(e,t,a){},5578:function(e,t,a){"use strict";var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"httpParam"},[e.haveURL?a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入URL"},model:{value:e.form.url,callback:function(t){e.$set(e.form,"url",t)},expression:"form.url"}},[a("el-select",{staticStyle:{width:"80px"},attrs:{slot:"prepend",placeholder:"请选择"},slot:"prepend",model:{value:e.form.method,callback:function(t){e.$set(e.form,"method",t)},expression:"form.method"}},[a("el-option",{attrs:{label:"GET",value:"GET"}}),a("el-option",{attrs:{label:"POST",value:"POST"}}),a("el-option",{attrs:{label:"PUT",value:"PUT"}}),a("el-option",{attrs:{label:"DELETE",value:"DELETE"}})],1)],1):e._e(),a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"请求头",name:"1"}},e._l(e.headerItem,(function(t,l){return a("div",{key:l,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==l?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addHeaderItem(l)}}}):e._e(),0!==l?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteHeaderItem(l)}}}):e._e()],1)})),0),a("el-tab-pane",{attrs:{label:"QUERY参数",name:"2"}},e._l(e.queryItem,(function(t,l){return a("div",{key:l,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==l?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addQueryItem(l)}}}):e._e(),0!==l?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteQueryItem(l)}}}):e._e()],1)})),0),a("el-tab-pane",{attrs:{label:"PATH参数",name:"4"}},e._l(e.pathItem,(function(t,l){return a("div",{key:l,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==l?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addPathItem(l)}}}):e._e(),0!==l?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deletePathItem(l)}}}):e._e()],1)})),0),a("el-tab-pane",{attrs:{label:"请求体",name:"3"}},[a("div",{staticClass:"requestBody"},[a("el-radio-group",{model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[a("el-radio",{attrs:{label:"NONE"}},[e._v(" none ")]),a("el-radio",{attrs:{label:"FORM_DATA"}},[e._v(" form-data ")]),a("el-radio",{attrs:{label:"X_WWW_FORM_URLENCODED"}},[e._v(" x-www-form-urlencoded ")]),a("el-radio",{attrs:{label:"RAW"}},[e._v(" raw ")]),a("el-radio",{attrs:{label:"BINARY"}},[e._v(" binary ")]),"RAW"==e.radio?a("el-dropdown",{on:{command:e.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[e._v(" "+e._s(e.selectType)+" "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"text"}},[e._v("text")]),a("el-dropdown-item",{attrs:{command:"xml"}},[e._v("xml")]),a("el-dropdown-item",{attrs:{command:"javascript"}},[e._v("javascript")]),a("el-dropdown-item",{attrs:{command:"json"}},[e._v("json")]),a("el-dropdown-item",{attrs:{command:"html"}},[e._v("html")])],1)],1):e._e()],1),a("div",{staticClass:"request_item"},["NONE"==e.radio?a("div",{staticClass:"request_none"},[e._v(" 该请求没有请求体 ")]):e._e(),"FORM_DATA"==e.radio?a("div",{staticClass:"request_form-data"},e._l(e.form_dataItem,(function(t,l){return a("div",{key:l,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==l?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addForm_dataItem(l)}}}):e._e(),0!==l?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteForm_dataItem(l)}}}):e._e()],1)})),0):e._e(),"X_WWW_FORM_URLENCODED"==e.radio?a("div",{staticClass:"request_form-data"},e._l(e.x_formItem,(function(t,l){return a("div",{key:l,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==l?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addX_formItem(l)}}}):e._e(),0!==l?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteX_formItem(l)}}}):e._e()],1)})),0):e._e(),"RAW"==e.radio?a("div",{staticClass:"request_raw"},[e.reset?a("MyEditor",{staticClass:"editorHeight",attrs:{language:e.language,title:"dockerfile",content:e.httpData.stringValue},on:{change:e.getEditValue},model:{value:e.code,callback:function(t){e.code=t},expression:"code"}}):e._e()],1):e._e(),"BINARY"==e.radio?a("div",{staticClass:"request_binary"},[a("el-upload",{staticClass:"upload-demo",attrs:{action:"https://jsonplaceholder.typicode.com/posts/","on-preview":e.handlePreview,"on-remove":e.handleRemove,"before-remove":e.beforeRemove,multiple:"",limit:3,"on-exceed":e.handleExceed,"file-list":e.fileList}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")])],1)],1):e._e()])],1)])],1)],1)},s=[],r=a("5530"),i=(a("d81d"),a("a434"),a("99af"),a("b0c0"),a("abc3")),o={name:"httpParam",props:{haveURL:{type:Boolean,default:!1},httpData:{type:Object,default:function(){return{}}}},components:{MyEditor:i["a"]},data:function(){return{activeName:"1",form:{},headerItem:[{}],form_dataItem:[{}],x_formItem:[{}],queryItem:[{}],pathItem:[{}],radio:"NONE",selectType:"json ",code:"",reset:!0,language:"json",fileList:[],editValue:""}},mounted:function(){this.setValue()},methods:{setValue:function(){var e=[],t=[],a=[],l=[],s=[];this.form={url:this.httpData.url,method:this.httpData.method},this.httpData.stringValue&&(this.activeName="3",this.language=this.httpData.requestType,this.selectType=this.httpData.requestType,this.editValue=this.httpData.stringValue,this.radio="RAW"),this.httpData.headers.length>0&&this.mapArr(this.httpData.headers,e,!1),"QUERY"==this.httpData.requestType?(this.mapArr(this.httpData.requestBodies,t,!1),this.activeName="2"):"PATH"==this.httpData.requestType?(this.mapArr(this.httpData.requestBodies,a,!1),this.activeName="4"):"FORM_DATA"==this.httpData.requestType?(this.activeName="3",this.radio="FORM_DATA",this.mapArr(this.httpData.requestBodies,l,!1)):"X_WWW_FORM_URLENCODED"==this.httpData.requestType?(this.activeName="3",this.radio="X_WWW_FORM_URLENCODED",this.mapArr(this.httpData.requestBodies,s,!1)):"NONE"==this.httpData.requestType&&(this.activeName="3",this.radio="NONE"),e.length>0&&(this.headerItem=e),t.length>0&&(this.queryItem=t),a.length>0&&(this.pathItem=a),l.length>0&&(this.form_dataItem=l),s.length>0&&(this.x_formItem=s)},mapArr:function(e,t,a){e.map((function(e){e.key&&t.push({key:e.key,value:e.value,type:a?"TEXT":void 0,des:e.des})}))},getValue:function(){var e={},t=[],a=[],l="";return this.mapArr(this.headerItem,t,!1),2==this.activeName?(e.requestType="QUERY",this.mapArr(this.queryItem,a,!0)):4==this.activeName?(e.requestType="PATH",this.mapArr(this.pathItem,a,!0)):3==this.activeName&&"RAW"!=this.radio?("FORM_DATA"==this.radio?(this.mapArr(this.form_dataItem,a,!0),e.requestType="FORM_DATA"):"X_WWW_FORM_URLENCODED"==this.radio&&(this.mapArr(this.x_formItem,a,!0),e.requestType="X_WWW_FORM_URLENCODED"),e.requestType=this.radio):"RAW"==this.radio&&(e.requestType=this.language,l=this.editValue),e=Object(r["a"])(Object(r["a"])({},e),{},{url:this.form.url?this.form.url:void 0,method:this.form.method?this.form.method:void 0,headers:t,requestBodies:a,stringValue:l}),e},getEditValue:function(e){this.editValue=e},handleClick:function(e){},addHeaderItem:function(){this.headerItem.push({})},deleteHeaderItem:function(e){this.headerItem.splice(e,1)},addQueryItem:function(){this.queryItem.push({})},deleteQueryItem:function(e){this.queryItem.splice(e,1)},addPathItem:function(){this.pathItem.push({})},deletePathItem:function(e){this.pathItem.splice(e,1)},addForm_dataItem:function(){this.form_dataItem.push({})},deleteForm_dataItem:function(e){this.form_dataItem.splice(e,1)},addX_formItem:function(){this.x_formItem.push({})},deleteX_formItem:function(e){this.x_formItem.splice(e,1)},handleCommand:function(e){var t=this;this.selectType=e,this.language=e,this.reset=!1,this.$nextTick((function(){t.reset=!0}))},handleRemove:function(e,t){console.log(e,t)},handlePreview:function(e){console.log(e)},handleExceed:function(e,t){this.$message.warning("当前限制选择 3 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},beforeRemove:function(e,t){return this.$confirm("确定移除 ".concat(e.name,"?"))}}},n=o,c=(a("0aa3"),a("2877")),d=Object(c["a"])(n,l,s,!1,null,"1ecce398",null);t["a"]=d.exports},"6d20":function(e,t,a){},"762f":function(e,t,a){"use strict";a("6d20")},c7fa:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"addDynamicParams"},[a("div",{staticClass:"form"},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"90px"}},[a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"所属项目"}},[a("el-input",{attrs:{disabled:""},model:{value:e.projectName,callback:function(t){e.projectName=t},expression:"projectName"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"取用字段",prop:"takenField"}},[a("el-input",{model:{value:e.form.takenField,callback:function(t){e.$set(e.form,"takenField",t)},expression:"form.takenField"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:"类型",prop:"type"}},[a("el-radio-group",{on:{change:e.changeRadio},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[a("el-radio",{attrs:{label:"CONSTANT_VARIABLE"}},[e._v("KV")]),a("el-radio",{attrs:{label:"SQL_VARIABLE"}},[e._v("SQL")]),a("el-radio",{attrs:{label:"HTTP_VARIABLE"}},[e._v("HTTP")]),a("el-radio",{attrs:{label:"CASE_VARIABLE"}},[e._v("CASE")])],1)],1)],1)],1),"CONSTANT_VARIABLE"==e.form.type?a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:""}},[a("el-input",{attrs:{placeholder:"value"},model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1)],1)],1):e._e(),"SQL_VARIABLE"==e.form.type?a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"数据库",prop:"poolId",rules:[{required:!0,message:"请选择数据库id",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择数据库"},on:{change:e.getDBHints},model:{value:e.form.poolId,callback:function(t){e.$set(e.form,"poolId",t)},expression:"form.poolId"}},e._l(e.connectsList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1),a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:"SQL语句",prop:"sqlExp",rules:[{required:!0,message:"请输入SQL语句",trigger:"blur"}]}},[a("el-input",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],model:{value:e.form.sqlExp,callback:function(t){e.$set(e.form,"sqlExp",t)},expression:"form.sqlExp"}}),a("myEditor",{ref:"editor",staticClass:"editorHeight",attrs:{language:"sql",title:"dockerfile",content:e.form.sqlExp},on:{change:e.getEditValue},model:{value:e.form.sqlExp,callback:function(t){e.$set(e.form,"sqlExp",t)},expression:"form.sqlExp"}})],1)],1),a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:""}},[a("el-button",{staticStyle:{color:"#FFF","background-color":"#32CCBC","border-color":"initial"},attrs:{type:"success"},on:{click:e.querySql}},[e._v(" 查询 ")])],1)],1),a("el-col",{attrs:{span:24}},[0!=e.sqlTabData.length?a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.sqlTabData}},[a("el-table-column",{attrs:{label:"id",align:"center",prop:"id"}}),a("el-table-column",{attrs:{label:"名称",align:"center",prop:"name"}}),a("el-table-column",{attrs:{label:"用例描述",align:"center",prop:"des"}}),a("el-table-column",{attrs:{label:"标签",align:"center",prop:"tag"}}),a("el-table-column",{attrs:{label:"环境",align:"center",prop:"default_env"}}),a("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"create_time"}}),a("el-table-column",{attrs:{label:"更新时间",align:"center",prop:"update_time"}})],1):e._e()],1)],1):e._e(),"CASE_VARIABLE"==e.form.type?a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"用例"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择用例"},model:{value:e.form.case,callback:function(t){e.$set(e.form,"case",t)},expression:"form.case"}},e._l(e.testCaseList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1):e._e(),"HTTP_VARIABLE"==e.form.type?a("el-row",[a("el-col",{staticStyle:{"padding-left":"80px"},attrs:{span:23}},[a("div",{staticClass:"httpParamDiv"},[a("httpParam",{ref:"httpParam",attrs:{haveURL:!0,httpData:e.form.httpData}})],1)])],1):e._e(),a("el-form-item",{staticStyle:{"margin-top":"20px"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.confirmAdd}},[e._v("保存")]),a("el-button",{on:{click:function(t){return e.$router.push({path:"./dynamicParam"})}}},[e._v("取消")])],1)],1)],1)])},s=[],r=(a("b0c0"),a("e9c4"),a("d81d"),a("a9e3"),a("a434"),a("5578")),i=a("abc3"),o={name:"addDynamicParams",components:{httpParam:r["a"],myEditor:i["a"]},data:function(){return{form:{},sqlTabData:[],connectsList:[],environmentList:[],rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],takenField:[{required:!0,message:"请输入字段",trigger:"blur"}],type:[{required:!0,message:"请选择类型",trigger:"change"}]},projectName:"",testCaseList:[]}},beforeDestroy:function(){localStorage.removeItem("dbHint")},created:function(){this.echoData()},mounted:function(){this.projectName=this.$store.state.projectId.name,this.$store.state.projectId.id&&(this.getAllTestCases(),this.getAllMove(),this.queryAllConnects(),this.getAllEnvironments())},watch:{"$store.state.projectId":{handler:function(e){this.getAllTestCases(),this.getAllMove(),this.queryAllConnects(),this.getAllEnvironments()},deep:!0},"$store.state.homeToDynamicParamData":{handler:function(e){this.echoData(e)},deep:!0}},methods:{getDBHints:function(e){this.$http.getDBHints({connectId:e}).then((function(e){var t=e.data;localStorage.setItem("dbHint",JSON.stringify(t))}))},getAllEnvironments:function(){var e=this;this.$http.queryAllEnvironments(this.$store.state.projectId.id,{pageNum:1,pageSize:9999}).then((function(t){var a=t.data.data.records;e.environmentList=a})).catch((function(e){}))},querySql:function(){var e=this;if(this.form.poolId)if(this.form.sqlExp){var t={connectId:4,projectId:this.$store.state.projectId.id,sql:this.form.sqlExp};this.$http.selectRunSql(t).then((function(t){console.log(t);var a=t.data;a.map((function(t){e.environmentList.map((function(e){e.id==t.default_env&&(t.default_env=e.name)}))})),e.sqlTabData=a}))}else this.$message.error("请输入sql语句");else this.$message.error("请选择数据库")},getEditValue:function(e){this.$refs.form.clearValidate("sqlExp"),this.form.sqlExp=e},getAllTestCases:function(){var e=this;this.$http.queryAllTestCases(this.$store.state.projectId.id,{pageNum:1,pageSize:9999}).then((function(t){var a=t.data.data.records;e.testCaseList=a})).catch((function(e){}))},echoData:function(e){var t={};if(t=e||this.$route.query,this.form=JSON.parse(JSON.stringify(t)),"CONSTANT_VARIABLE"==t.type)this.form.value=t.detail;else if("SQL_VARIABLE"==t.type){var a=JSON.parse(t.detail);this.getDBHints(a.poolId),this.$set(this.form,"poolId",a.poolId),this.$set(this.form,"sqlExp",a.sqlExp)}else if("HTTP_VARIABLE"==t.type){var l=JSON.parse(t.detail);this.form.httpData=l}else"CASE_VARIABLE"==t.type&&this.$set(this.form,"case",Number(t.detail))},queryAllConnects:function(){var e=this;this.$store.state.projectId.id&&this.$http.queryAllConnects({projectId:this.$store.state.projectId.id,pageNum:1,pageSize:9999}).then((function(t){var a=t.data.data.records;e.connectsList=a})).catch((function(e){console.log(e)}))},getAllMove:function(){var e=this;this.$http.queryAllActivion(this.$store.state.projectId.id).then((function(t){e.movesList=t.data.data})).catch((function(e){console.log(e)}))},confirmAdd:function(){var e=this;this.$refs.form.validate((function(t){if(t){var a=JSON.parse(JSON.stringify(e.form));if("CONSTANT_VARIABLE"==a.type)a.detail=a.value;else if("SQL_VARIABLE"==a.type)a.detail=JSON.stringify({poolId:a.poolId,sqlExp:a.sqlExp});else if("HTTP_VARIABLE"==a.type){if(console.log(e.$refs.httpParam),"error"==e.$refs.httpParam.getValue())return;a.detail=JSON.stringify(e.$refs.httpParam.getValue())}else"CASE_VARIABLE"==a.type&&(a.detail=e.form.case);a.projectId=e.$store.state.projectId.id;var l=function(t){"add"==t?e.$message.success("新建成功"):e.$message.success("编辑成功"),e.$http.queryAllDynamicVariables(e.$store.state.projectId.id).then((function(e){console.log(e);var t=[];e.data.data.records.map((function(e){t.push({name:e.name,remark:e.remark})})),localStorage.setItem("projectHint",JSON.stringify(t)),console.log(e)})),e.$router.push({path:"./dynamicParam",query:{name:"动参"}})};e.$route.query.id?(a.updateTime=void 0,e.$http.editDynamicVariables(a).then((function(e){return l("edit")}))):e.$http.addDynamicVariables(a).then((function(e){return l("add")}))}}))},addKVItem:function(e){this.kvItem.push({})},deleteKVItem:function(e){this.kvItem.splice(e,1)}}},n=o,c=(a("762f"),a("2877")),d=Object(c["a"])(n,l,s,!1,null,"7259ca1a",null);t["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ac07f788"],{"0aa3":function(e,t,a){"use strict";a("3f7d")},"0cf4":function(e,t,a){"use strict";a("2fff")},"2fff":function(e,t,a){},"3f7d":function(e,t,a){},5578:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"httpParam"},[e.haveURL?a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入URL"},model:{value:e.form.url,callback:function(t){e.$set(e.form,"url",t)},expression:"form.url"}},[a("el-select",{staticStyle:{width:"80px"},attrs:{slot:"prepend",placeholder:"请选择"},slot:"prepend",model:{value:e.form.method,callback:function(t){e.$set(e.form,"method",t)},expression:"form.method"}},[a("el-option",{attrs:{label:"GET",value:"GET"}}),a("el-option",{attrs:{label:"POST",value:"POST"}}),a("el-option",{attrs:{label:"PUT",value:"PUT"}}),a("el-option",{attrs:{label:"DELETE",value:"DELETE"}})],1)],1):e._e(),a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"请求头",name:"1"}},e._l(e.headerItem,(function(t,i){return a("div",{key:i,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==i?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addHeaderItem(i)}}}):e._e(),0!==i?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteHeaderItem(i)}}}):e._e()],1)})),0),a("el-tab-pane",{attrs:{label:"QUERY参数",name:"2"}},e._l(e.queryItem,(function(t,i){return a("div",{key:i,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==i?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addQueryItem(i)}}}):e._e(),0!==i?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteQueryItem(i)}}}):e._e()],1)})),0),a("el-tab-pane",{attrs:{label:"PATH参数",name:"4"}},e._l(e.pathItem,(function(t,i){return a("div",{key:i,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==i?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addPathItem(i)}}}):e._e(),0!==i?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deletePathItem(i)}}}):e._e()],1)})),0),a("el-tab-pane",{attrs:{label:"请求体",name:"3"}},[a("div",{staticClass:"requestBody"},[a("el-radio-group",{model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[a("el-radio",{attrs:{label:"NONE"}},[e._v(" none ")]),a("el-radio",{attrs:{label:"FORM_DATA"}},[e._v(" form-data ")]),a("el-radio",{attrs:{label:"X_WWW_FORM_URLENCODED"}},[e._v(" x-www-form-urlencoded ")]),a("el-radio",{attrs:{label:"RAW"}},[e._v(" raw ")]),a("el-radio",{attrs:{label:"BINARY"}},[e._v(" binary ")]),"RAW"==e.radio?a("el-dropdown",{on:{command:e.handleCommand}},[a("span",{staticClass:"el-dropdown-link"},[e._v(" "+e._s(e.selectType)+" "),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"text"}},[e._v("text")]),a("el-dropdown-item",{attrs:{command:"xml"}},[e._v("xml")]),a("el-dropdown-item",{attrs:{command:"javascript"}},[e._v("javascript")]),a("el-dropdown-item",{attrs:{command:"json"}},[e._v("json")]),a("el-dropdown-item",{attrs:{command:"html"}},[e._v("html")])],1)],1):e._e()],1),a("div",{staticClass:"request_item"},["NONE"==e.radio?a("div",{staticClass:"request_none"},[e._v(" 该请求没有请求体 ")]):e._e(),"FORM_DATA"==e.radio?a("div",{staticClass:"request_form-data"},e._l(e.form_dataItem,(function(t,i){return a("div",{key:i,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==i?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addForm_dataItem(i)}}}):e._e(),0!==i?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteForm_dataItem(i)}}}):e._e()],1)})),0):e._e(),"X_WWW_FORM_URLENCODED"==e.radio?a("div",{staticClass:"request_form-data"},e._l(e.x_formItem,(function(t,i){return a("div",{key:i,staticClass:"header_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"des"},model:{value:t.des,callback:function(a){e.$set(t,"des",a)},expression:"v.des"}}),0==i?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addX_formItem(i)}}}):e._e(),0!==i?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteX_formItem(i)}}}):e._e()],1)})),0):e._e(),"RAW"==e.radio?a("div",{staticClass:"request_raw"},[e.reset?a("MyEditor",{staticClass:"editorHeight",attrs:{language:e.language,title:"dockerfile",content:e.httpData.stringValue},on:{change:e.getEditValue},model:{value:e.code,callback:function(t){e.code=t},expression:"code"}}):e._e()],1):e._e(),"BINARY"==e.radio?a("div",{staticClass:"request_binary"},[a("el-upload",{staticClass:"upload-demo",attrs:{action:"https://jsonplaceholder.typicode.com/posts/","on-preview":e.handlePreview,"on-remove":e.handleRemove,"before-remove":e.beforeRemove,multiple:"",limit:3,"on-exceed":e.handleExceed,"file-list":e.fileList}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")])],1)],1):e._e()])],1)])],1)],1)},s=[],l=a("5530"),r=(a("d81d"),a("a434"),a("99af"),a("b0c0"),a("abc3")),o={name:"httpParam",props:{haveURL:{type:Boolean,default:!1},httpData:{type:Object,default:function(){return{}}}},components:{MyEditor:r["a"]},data:function(){return{activeName:"1",form:{},headerItem:[{}],form_dataItem:[{}],x_formItem:[{}],queryItem:[{}],pathItem:[{}],radio:"NONE",selectType:"json ",code:"",reset:!0,language:"json",fileList:[],editValue:""}},mounted:function(){this.setValue()},methods:{setValue:function(){var e=[],t=[],a=[],i=[],s=[];this.form={url:this.httpData.url,method:this.httpData.method},this.httpData.stringValue&&(this.activeName="3",this.language=this.httpData.requestType,this.selectType=this.httpData.requestType,this.editValue=this.httpData.stringValue,this.radio="RAW"),this.httpData.headers.length>0&&this.mapArr(this.httpData.headers,e,!1),"QUERY"==this.httpData.requestType?(this.mapArr(this.httpData.requestBodies,t,!1),this.activeName="2"):"PATH"==this.httpData.requestType?(this.mapArr(this.httpData.requestBodies,a,!1),this.activeName="4"):"FORM_DATA"==this.httpData.requestType?(this.activeName="3",this.radio="FORM_DATA",this.mapArr(this.httpData.requestBodies,i,!1)):"X_WWW_FORM_URLENCODED"==this.httpData.requestType?(this.activeName="3",this.radio="X_WWW_FORM_URLENCODED",this.mapArr(this.httpData.requestBodies,s,!1)):"NONE"==this.httpData.requestType&&(this.activeName="3",this.radio="NONE"),e.length>0&&(this.headerItem=e),t.length>0&&(this.queryItem=t),a.length>0&&(this.pathItem=a),i.length>0&&(this.form_dataItem=i),s.length>0&&(this.x_formItem=s)},mapArr:function(e,t,a){e.map((function(e){e.key&&t.push({key:e.key,value:e.value,type:a?"TEXT":void 0,des:e.des})}))},getValue:function(){var e={},t=[],a=[],i="";return this.mapArr(this.headerItem,t,!1),2==this.activeName?(e.requestType="QUERY",this.mapArr(this.queryItem,a,!0)):4==this.activeName?(e.requestType="PATH",this.mapArr(this.pathItem,a,!0)):3==this.activeName&&"RAW"!=this.radio?("FORM_DATA"==this.radio?(this.mapArr(this.form_dataItem,a,!0),e.requestType="FORM_DATA"):"X_WWW_FORM_URLENCODED"==this.radio&&(this.mapArr(this.x_formItem,a,!0),e.requestType="X_WWW_FORM_URLENCODED"),e.requestType=this.radio):"RAW"==this.radio&&(e.requestType=this.language,i=this.editValue),e=Object(l["a"])(Object(l["a"])({},e),{},{url:this.form.url?this.form.url:void 0,method:this.form.method?this.form.method:void 0,headers:t,requestBodies:a,stringValue:i}),e},getEditValue:function(e){this.editValue=e},handleClick:function(e){},addHeaderItem:function(){this.headerItem.push({})},deleteHeaderItem:function(e){this.headerItem.splice(e,1)},addQueryItem:function(){this.queryItem.push({})},deleteQueryItem:function(e){this.queryItem.splice(e,1)},addPathItem:function(){this.pathItem.push({})},deletePathItem:function(e){this.pathItem.splice(e,1)},addForm_dataItem:function(){this.form_dataItem.push({})},deleteForm_dataItem:function(e){this.form_dataItem.splice(e,1)},addX_formItem:function(){this.x_formItem.push({})},deleteX_formItem:function(e){this.x_formItem.splice(e,1)},handleCommand:function(e){var t=this;this.selectType=e,this.language=e,this.reset=!1,this.$nextTick((function(){t.reset=!0}))},handleRemove:function(e,t){console.log(e,t)},handlePreview:function(e){console.log(e)},handleExceed:function(e,t){this.$message.warning("当前限制选择 3 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},beforeRemove:function(e,t){return this.$confirm("确定移除 ".concat(e.name,"?"))}}},n=o,c=(a("0aa3"),a("2877")),d=Object(c["a"])(n,i,s,!1,null,"1ecce398",null);t["a"]=d.exports},c67f:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"addDynamicParams"},[a("div",{staticClass:"breadcrumb"}),a("div",{staticClass:"form"},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"90px"}},[a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"所属项目"}},[a("el-input",{attrs:{disabled:""},model:{value:e.projectName,callback:function(t){e.projectName=t},expression:"projectName"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"行为类型",prop:"moveType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择行为类型"},model:{value:e.form.moveType,callback:function(t){e.$set(e.form,"moveType",t)},expression:"form.moveType"}},e._l([{label:"其它类型",value:0},{label:"登录类型",value:1}],(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1),a("el-divider",{attrs:{"content-position":"left"}},[e._v("动作")]),a("el-form-item",{staticStyle:{"margin-top":"20px"}},[a("el-row",{staticStyle:{"text-align":"left"},attrs:{type:"flex",justify:"space-between"}},[a("el-button",{on:{click:e.addActivion}},[e._v("新建动作")]),a("div",[a("el-button",{attrs:{type:"primary"},on:{click:e.comfirmAdd}},[e._v("保存")])],1)],1)],1),a("div",{staticClass:"activion"},[a("div",{staticClass:"activion_pie"},[a("el-collapse",{attrs:{accordion:""},on:{change:e.changeCollapse}},e._l(e.form.pei_form,(function(t,i){return a("el-collapse-item",{key:i,attrs:{name:i}},[a("template",{slot:"title"},[a("span",[e._v(e._s(t.name?"动作:"+t.name:"新动作"))]),a("i",{staticClass:"el-icon-delete-solid",staticStyle:{"margin-left":"30px"},on:{click:function(t){return e.deleteActivion(i)}}})]),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"动作名称",prop:"pei_form."+i+".name",rules:[{required:!0,message:"请输入名称",trigger:"blur"}]}},[a("el-input",{model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"v.name"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"所属环境",prop:"pei_form."+i+".envId",rules:[{required:!0,message:"请选择所属环境",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择所属环境"},on:{change:function(t){return e.getVariable(t,i)}},model:{value:t.envId,callback:function(a){e.$set(t,"envId",a)},expression:"v.envId"}},e._l(e.environmentList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"所属行为"}},[a("el-input",{attrs:{disabled:""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"所属项目"}},[a("el-input",{attrs:{disabled:""},model:{value:e.projectName,callback:function(t){e.projectName=t},expression:"projectName"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.remark,callback:function(a){e.$set(t,"remark",a)},expression:"v.remark"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{staticStyle:{"text-align":"left"},attrs:{label:"类型"}},[a("el-radio-group",{on:{change:function(a){return e.changeRadio(t)}},model:{value:t.radio,callback:function(a){e.$set(t,"radio",a)},expression:"v.radio"}},[a("el-radio",{attrs:{label:"SQL_ACTION"}},[e._v("SQL")]),a("el-radio",{attrs:{label:"HTTP_ACTION"}},[e._v("HTTP")]),a("el-radio",{attrs:{label:"CASE_ACTION"}},[e._v("用例")]),a("el-radio",{attrs:{label:"WAIT_ACTION"}},[e._v("等待时间")])],1)],1)],1)],1),"SQL_ACTION"==t.radio?a("el-row",[a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"数据库",prop:"pei_form."+i+".poolId",rules:[{required:!0,message:"请选择数据库id",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择数据库"},on:{change:function(t){return e.getDBHints(t,i)}},model:{value:t.poolId,callback:function(a){e.$set(t,"poolId",a)},expression:"v.poolId"}},e._l(e.connectsList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:"SQL语句",prop:"pei_form."+i+".sqlExp",rules:[{required:!0,message:"请输入SQL语句",trigger:"blur"}]}},[a("el-input",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],model:{value:t.sqlExp,callback:function(a){e.$set(t,"sqlExp",a)},expression:"v.sqlExp"}}),a("myEditor",{ref:"editor",refInFor:!0,staticClass:"editorHeight",attrs:{language:"sql",title:"dockerfile",content:t.sqlExp},on:{change:function(t){return e.getEditValue(t,i,"pei_form."+i+".sqlExp")}},model:{value:t.sqlExp,callback:function(a){e.$set(t,"sqlExp",a)},expression:"v.sqlExp"}})],1)],1),a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:""}},[a("el-button",{staticStyle:{color:"#FFF","background-color":"#32CCBC","border-color":"initial"},attrs:{type:"success"},on:{click:function(t){return e.querySql(i)}}},[e._v(" 查询 ")])],1)],1),a("el-col",{attrs:{span:24}},[0!=e.sqlTabData.length?a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.sqlTabData}},[a("el-table-column",{attrs:{label:"id",align:"center",prop:"id"}}),a("el-table-column",{attrs:{label:"名称",align:"center",prop:"name"}}),a("el-table-column",{attrs:{label:"用例描述",align:"center",prop:"des"}}),a("el-table-column",{attrs:{label:"标签",align:"center",prop:"tag"}}),a("el-table-column",{attrs:{label:"环境",align:"center",prop:"default_env"}}),a("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"create_time"}}),a("el-table-column",{attrs:{label:"更新时间",align:"center",prop:"update_time"}})],1):e._e()],1)],1)],1):e._e(),"HTTP_ACTION"==t.radio?a("el-row",[a("div",{staticClass:"httpParamDiv"},[a("httpParam",{ref:"httpParam",refInFor:!0,attrs:{httpData:t.httpData,haveURL:!0}})],1)]):e._e(),"CASE_ACTION"==t.radio?a("el-row",[a("div",[a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"数据组ID",prop:"pei_form."+i+".case",rules:[{required:!0,message:"请选择数据组ID",trigger:"change"}]}},[a("el-cascader",{attrs:{filterable:"",clearable:"",options:e.cascaderData},model:{value:t.case,callback:function(a){e.$set(t,"case",a)},expression:"v.case"}})],1)],1)],1)],1)]):e._e(),"WAIT_ACTION"==t.radio?a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"等待时间",prop:"pei_form."+i+".timer",rules:[{required:!0,message:"请输入等待时间",trigger:"blur"}]}},[a("el-input",{attrs:{placeholder:"请输入内容"},model:{value:t.timer,callback:function(a){e.$set(t,"timer",a)},expression:"v.timer"}},[a("template",{slot:"append"},[e._v("ms")])],2)],1)],1)],1):e._e()],2)})),1)],1)])],1)],1)])},s=[],l=a("5530"),r=(a("b0c0"),a("d81d"),a("e9c4"),a("a9e3"),a("a434"),a("abc3")),o=a("5578"),n={name:"addBehavior",components:{httpParam:o["a"],myEditor:r["a"]},data:function(){return{nowOpenCollapse:0,sqlTabData:[],cascaderData:[],code:"",projectName:"",form:{moveType:0,pei_form:[]},rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],moveType:[{required:!0,message:"请选择行为类型",trigger:"blur"}]},editData:{},environmentList:[],connectsList:[],testCaseList:[],newFatherData:0}},mounted:function(){var e=this;this.projectName=this.$store.state.projectId.name,this.$store.state.projectId.id&&(this.getAllEnvironments(),this.getAllTestCases(),this.getTestCasesListVo(),this.queryAllConnects()),this.$route.query.id&&this.$http.getActivion(this.$route.query.id).then((function(t){e.editData=t.data.data,e.echoData()})).catch((function(e){}))},watch:{"$store.state.projectId":{handler:function(e){this.getTestCasesListVo(),this.getAllEnvironments(),this.getAllTestCases(),this.queryAllConnects()},deep:!0},"$store.state.homeToBehaviorData":{handler:function(e){var t=this;e.id&&this.$http.getActivion(e.id).then((function(e){t.editData=e.data.data,t.echoData()})).catch((function(e){}))},deep:!0}},beforeDestroy:function(){localStorage.removeItem("envHint"),localStorage.removeItem("dbHint")},methods:{changeCollapse:function(e){this.sqlTabData=[],this.nowOpenCollapse=e,this.form.pei_form[e].envId&&this.getVariable(this.form.pei_form[e].envId),this.form.pei_form[e].poolId&&this.getDBHints(this.form.pei_form[e].poolId)},querySql:function(e){var t=this;if(this.form.pei_form[e].envId)if(this.form.pei_form[e].poolId)if(this.form.pei_form[e].sqlExp){var a={connectId:this.form.pei_form[e].poolId,envId:this.form.pei_form[e].envId,projectId:this.$store.state.projectId.id,sql:this.form.pei_form[e].sqlExp};this.$http.selectRunSql(a).then((function(e){var a=e.data;a.map((function(e){t.environmentList.map((function(t){t.id==e.default_env&&(e.default_env=t.name)}))})),t.sqlTabData=a}))}else this.$message.error("请输入sql语句");else this.$message.error("请选择数据库");else this.$message.error("请选择所属环境")},getAllTestCases:function(){var e=this;this.$http.queryAllTestCases(this.$store.state.projectId.id,{pageNum:1,pageSize:9999}).then((function(t){var a=t.data.data.records;e.testCaseList=a})).catch((function(e){}))},getTestCasesListVo:function(){var e=this;this.$http.testCasesListVo({projectId:this.$store.state.projectId.id}).then((function(t){var a=t.data.data,i=[];a.map((function(e,t){var a={value:e.testCase.id,label:e.testCase.name},s=[];e.testData.map((function(e){s.push({value:e.id,label:e.name})})),i.push(Object(l["a"])(Object(l["a"])({},a),{},{children:s}))})),e.cascaderData=i,e.form.pei_form.map((function(t){e.paramData(t.case),t.case=[e.newFatherData,t.case]}))})).catch((function(e){}))},paramData:function(e){var t=this;this.cascaderData.map((function(a){a.children.map((function(i){i.value==e&&(t.newFatherData=a.value)}))}))},echoData:function(){var e=this;this.form={name:this.editData.move.name,remark:this.editData.move.remark,pei_form:this.editData.action,moveType:this.editData.move.moveType},this.form.pei_form.map((function(t,a){var i=JSON.parse(t.detail);e.$set(e.form.pei_form[a],"radio",t.type),"SQL_ACTION"==t.type?(e.$set(e.form.pei_form[a],"poolId",i.poolId),e.$set(e.form.pei_form[a],"sqlExp",i.sqlExp)):"HTTP_ACTION"==t.type?t.httpData=i:"CASE_ACTION"==t.type?t.case=i:"WAIT_ACTION"==t.type&&(t.timer=i)}))},getEditValue:function(e,t,a){this.$refs.form.clearValidate(a),this.form.pei_form[t].sqlExp=e},queryAllConnects:function(){var e=this;this.$store.state.projectId.id&&this.$http.queryAllConnects({projectId:this.$store.state.projectId.id,pageNum:1,pageSize:9999}).then((function(t){var a=t.data.data.records;e.connectsList=a})).catch((function(e){console.log(e)}))},addActivion:function(){this.form.pei_form.push({radio:"SQL_ACTION"})},comfirmAdd:function(){var e=this;this.$refs.form.validate((function(t){if(t){var a=[];if(e.form.pei_form.length>0){var i=JSON.parse(JSON.stringify(e.form.pei_form));i.map((function(t){var i="";if("SQL_ACTION"==t.radio)i=JSON.stringify({poolId:t.poolId,sqlExp:t.sqlExp});else if("HTTP_ACTION"==t.radio){if("error"==e.$refs.httpParam[0].getValue())return;i=JSON.stringify(e.$refs.httpParam[0].getValue())}else"CASE_ACTION"==t.radio?i=t.case[1]:"WAIT_ACTION"==t.radio&&(i=t.timer);a.push(Object(l["a"])(Object(l["a"])({},t),{},{type:t.radio,projectId:e.$store.state.projectId.id,detail:i}))}))}var s={};s={action:a,move:Object(l["a"])(Object(l["a"])({},e.form),{},{projectId:e.$store.state.projectId.id,id:e.$route.query.id?Number(e.$route.query.id):void 0})};var r=function(t){"add"==t?e.$message.success("新建成功"):e.$message.success("编辑成功"),e.$router.push({path:"./behavior",query:{name:"行为"}})};if(e.$route.query.id){for(var o in s.action)s.action[o].updateTime=void 0;for(var n in s.move.pei_form)s.move.pei_form[n].updateTime=void 0;s.move.updateTime=void 0,e.$http.editActivion(s).then((function(e){return r("edit")}))}else e.$http.addActivion(s).then((function(e){return r("add")}))}}))},getVariable:function(e,t){var a=this;this.$http.getVariableByEnv(e).then((function(e){var t=e.data.data;localStorage.setItem("envHint",JSON.stringify(t)),a.$store.dispatch("changeEnvHintAct",t)}))},getDBHints:function(e,t){this.$http.getDBHints({connectId:e}).then((function(e){var t=e.data;localStorage.setItem("dbHint",JSON.stringify(t))}))},getAllEnvironments:function(){var e=this;this.$http.queryAllEnvironments(this.$store.state.projectId.id,{pageNum:1,pageSize:9999}).then((function(t){var a=t.data.data.records;e.environmentList=a})).catch((function(e){}))},deleteActivion:function(e){this.form.pei_form.splice(e,1)},changeRadio:function(e){},toBack:function(){this.$router.push({path:"./behavior"})}}},c=n,d=(a("0cf4"),a("2877")),m=Object(d["a"])(c,i,s,!1,null,"24eff9c6",null);t["default"]=m.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e47eabe0"],{3683:function(e,t,a){},a434:function(e,t,a){"use strict";var n=a("23e7"),r=a("da84"),i=a("23cb"),o=a("5926"),s=a("07fa"),l=a("7b0b"),c=a("65f0"),u=a("8418"),m=a("1dde"),d=m("splice"),p=r.TypeError,f=Math.max,h=Math.min,g=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!d},{splice:function(e,t){var a,n,r,m,d,b,k=l(this),y=s(k),$=i(e,y),w=arguments.length;if(0===w?a=n=0:1===w?(a=0,n=y-$):(a=w-2,n=h(f(o(t),0),y-$)),y+a-n>g)throw p(v);for(r=c(k,n),m=0;m<n;m++)d=$+m,d in k&&u(r,m,k[d]);if(r.length=n,a<n){for(m=$;m<y-n;m++)d=m+n,b=m+a,d in k?k[b]=k[d]:delete k[b];for(m=y;m>y-n+a;m--)delete k[m-1]}else if(a>n)for(m=y-n;m>$;m--)d=m+n-1,b=m+a-1,d in k?k[b]=k[d]:delete k[b];for(m=0;m<a;m++)k[m+$]=arguments[m+2];return k.length=y-n+a,r}})},b0c0:function(e,t,a){var n=a("83ab"),r=a("5e77").EXISTS,i=a("e330"),o=a("9bf2").f,s=Function.prototype,l=i(s.toString),c=/^\s*function ([^ (]*)/,u=i(c.exec),m="name";n&&!r&&o(s,m,{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(e){return""}}})},d2de:function(e,t,a){"use strict";a("3683")},e9c4:function(e,t,a){var n=a("23e7"),r=a("da84"),i=a("d066"),o=a("2ba4"),s=a("e330"),l=a("d039"),c=r.Array,u=i("JSON","stringify"),m=s(/./.exec),d=s("".charAt),p=s("".charCodeAt),f=s("".replace),h=s(1..toString),g=/[\uD800-\uDFFF]/g,v=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,k=function(e,t,a){var n=d(a,t-1),r=d(a,t+1);return m(v,e)&&!m(b,r)||m(b,e)&&!m(v,n)?"\\u"+h(p(e,0),16):e},y=l((function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}));u&&n({target:"JSON",stat:!0,forced:y},{stringify:function(e,t,a){for(var n=0,r=arguments.length,i=c(r);n<r;n++)i[n]=arguments[n];var s=o(u,null,i);return"string"==typeof s?f(s,g,k):s}})},f8b9:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"environment"},[a("div",{staticClass:"top_search"},[a("el-row",[a("el-col",{staticClass:"flex",attrs:{span:6}},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",clearable:""},nativeOn:{keyup:function(t){return e.keyDown(t)}},model:{value:e.searchData.name,callback:function(t){e.$set(e.searchData,"name",t)},expression:"searchData.name"}}),a("el-button",{staticStyle:{margin:"10px"},attrs:{type:"primary"},on:{click:e.addEnv}},[e._v("新增")])],1)],1)],1),a("div",{staticClass:"table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,"header-align":"center"},on:{"row-click":e.tabRowClick}},[a("el-table-column",{attrs:{prop:"name",label:"实例名称",align:"center"}}),a("el-table-column",{attrs:{prop:"parameterName",label:"参数名",align:"center"}}),a("el-table-column",{attrs:{prop:"ip",label:"ip",align:"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return a.stopPropagation(),e.showEditDialog(t.row)}}},[e._v("编辑 ")]),a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(a){return a.stopPropagation(),e.deleteTable(t.row.id)}}},[e._v("删除 ")])]}}])})],1),a("el-pagination",{staticStyle:{"text-align":"right","margin-top":"10px"},attrs:{layout:"prev, pager, next",total:e.pageTotal},on:{"current-change":e.currentChange}})],1),a("el-dialog",{attrs:{title:"",visible:e.dialogVisible,width:"60%","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"实例名称",prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"别名",prop:"parameterName"}},[a("el-input",{model:{value:e.form.parameterName,callback:function(t){e.$set(e.form,"parameterName",t)},expression:"form.parameterName"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:10,offset:1}},[a("el-form-item",{attrs:{label:"所属项目"}},[a("el-input",{attrs:{disabled:""},model:{value:e.projectName,callback:function(t){e.projectName=t},expression:"projectName"}})],1)],1),a("el-col",{attrs:{span:10,offset:2}},[a("el-form-item",{attrs:{label:"ip地址",prop:"ip"}},[a("el-input",{model:{value:e.form.ip,callback:function(t){e.$set(e.form,"ip",t)},expression:"form.ip"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:22,offset:1}},[a("el-form-item",{attrs:{label:"静态变量"}},e._l(e.kvItem,(function(t,n){return a("div",{key:n,staticClass:"kv_item"},[a("el-input",{attrs:{placeholder:"key"},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"v.key"}}),a("el-input",{staticStyle:{"margin-left":"20px"},attrs:{placeholder:"value"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"v.value"}}),0==n?a("i",{staticClass:"el-icon-plus",on:{click:function(t){return e.addKVItem(n)}}}):e._e(),0!==n?a("i",{staticClass:"el-icon-delete",on:{click:function(t){return e.deleteKVItem(n)}}}):e._e()],1)})),0)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleClose}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.comfirmAdd}},[e._v("确 定")])],1)],1)],1)},r=[],i=a("5530"),o=(a("b0c0"),a("a434"),a("e9c4"),{name:"environment",data:function(){return{form:{ip:"http://"},dialogVisible:!1,kvItem:[{}],rules:{name:[{required:!0,message:"请输入实例名称",trigger:"blur"}],parameterName:[{required:!0,message:"请输入参数名",trigger:"blur"}],ip:[{required:!0,message:"请输入ip",trigger:"blur"},{pattern:/^(https|http|ftp):\/\/?(([\w_!~*'()\.&=+$%-]+: )?[\w_!~*'()\.&=+$%-]+@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|(localhost)|([\w_!~*'()-]+\.)*\w+\.[a-zA-Z]{1,6}):[0-9]{1,5}?((\/?)|(\/[\w_!~*'()\.;?:@&=+$,%#-]+)+\/?)$/,message:"请输入正确的ip如 http://127.0.0.1:8080",trigger:"blur"}]},tableData:[],projectName:"",editOrAdd:"",searchData:{pageNum:1,pageSize:10},pageTotal:0}},mounted:function(){this.projectName=this.$store.state.projectId.name,this.$store.state.projectId.id&&this.getAllEnvironments()},watch:{"$store.state.projectId":function(e){this.projectName=this.$store.state.projectId.name,this.getAllEnvironments()},"$store.state.homeToEnvironmentData":function(e){this.showEditDialog(e)}},methods:{keyDown:function(e){console.log(e),"Enter"==e.code&&this.searchTable()},searchTable:function(){this.searchData.pageNum=1,this.getAllEnvironments()},currentChange:function(e){this.searchData.pageNum=e,this.getAllEnvironments()},handleClose:function(){this.$refs.form.resetFields(),this.dialogVisible=!1,this.form={ip:"http://"},this.kvItem=[{}]},addEnv:function(){this.editOrAdd="add",this.dialogVisible=!0},addKVItem:function(e){this.kvItem.push({})},deleteKVItem:function(e){this.kvItem.splice(e,1)},getAllEnvironments:function(){var e=this;this.searchData.name?this.$http.queryEnvironmentsCondition(this.$store.state.projectId.id,this.searchData).then((function(t){var a=t.data.data.records;e.pageTotal=t.data.data.total,e.tableData=a,e.$store.dispatch("changehomeSelectValueAct",e.tableData),e.$store.dispatch("changehomeSelectPathAct","./environment")})).catch((function(t){0==t.response.data.indexOf("0 您查询的页码已经超出范围")&&(e.searchData.pageNum=e.searchData.pageNum-1),e.getAllEnvironments()})):this.$http.queryAllEnvironments(this.$store.state.projectId.id,this.searchData).then((function(t){var a=t.data.data.records;e.pageTotal=t.data.data.total,e.tableData=a,e.$store.dispatch("changehomeSelectValueAct",e.tableData),e.$store.dispatch("changehomeSelectPathAct","./environment")})).catch((function(t){0==t.response.data.indexOf("0 您查询的页码已经超出范围")&&(e.searchData.pageNum=e.searchData.pageNum-1,e.getAllEnvironments())}))},showEditDialog:function(e){this.editOrAdd="edit";var t=JSON.parse(JSON.stringify(e));this.form=JSON.parse(JSON.stringify(t));var a=t.variable,n=[];for(var r in a)n.push({key:r,value:a[r]});n.length>0&&(this.kvItem=n),this.form.id=e.id,this.dialogVisible=!0},comfirmAdd:function(){var e=this;this.$refs.form.validate((function(t){if(!t)return console.log("error submit!!"),!1;for(var a={},n=0;n<e.kvItem.length;n++)if(e.kvItem[n].key&&e.kvItem[n].value)a[e.kvItem[n].key]=e.kvItem[n].value;else{if(!e.kvItem[n].key&&e.kvItem[n].value)return void e.$message.warning("请输入key");e.kvItem[n].key&&!e.kvItem[n].value&&(a[e.kvItem[n].key]="")}var r=Object(i["a"])(Object(i["a"])({},e.form),{},{projectId:e.$store.state.projectId.id,variable:a}),o=function(){e.dialogVisible=!1,e.form={ip:"http://"},e.kvItem=[{}],e.$message.success("编辑成功"),e.getAllEnvironments()};"edit"==e.editOrAdd?(r.updateTime=void 0,e.$http.editEnvironments(r).then((function(e){o()}))):e.$http.addEnvironments(r).then((function(e){o()}))}))},tabRowClick:function(e,t,a){this.showEditDialog(e)},deleteTable:function(e){var t=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$http.deleteEnvironments(e).then((function(e){t.getAllEnvironments(),t.$message({type:"success",message:"删除成功!"})})).catch((function(e){}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))}}}),s=o,l=(a("d2de"),a("2877")),c=Object(l["a"])(s,n,r,!1,null,"4b94df0a",null);t["default"]=c.exports}}]);
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论