提交 83cf1570 authored 作者: mry's avatar mry

fix(base): 修改了报告名称,添加了前端页面

上级 bf3be1f7
......@@ -60,4 +60,7 @@ public class TestCase extends BaseEntity {
@ApiModelProperty("详细参数")
private String detail;
@ApiModelProperty("用例描述")
private String des;
}
......@@ -20,8 +20,8 @@ import java.util.*;
public class ExtentTestNgReporterListener implements IReporter {
private static final String OUTPUT_FOLDER = "/reportNg/reports/";
private static final String FILE_NAME =
UUID.randomUUID().toString().replace("-", "") + ".html";
private static final String FILE_NAME = "testNg.html";
// UUID.randomUUID().toString().replace("-", "") + ".html";
private ExtentReports extent;
......@@ -100,6 +100,7 @@ public class ExtentTestNgReporterListener implements IReporter {
if (!reportDir.exists() && !reportDir.isDirectory()) {
reportDir.mkdir();
}
System.out.println(FILE_NAME);
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(OUTPUT_FOLDER + FILE_NAME);
// 设置静态文件的DNS
htmlReporter.config().setResourceCDN(ResourceCDN.EXTENTREPORTS);
......
......@@ -8,7 +8,7 @@ spring:
datasource:
master: #增加默认数据源
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.248:3306/key_stone?useUnicode=true&characterEncoding=utf-8&useSSL=false
url: jdbc:mysql://192.168.100.248:3306/key_stone?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
username: root
password: root
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Pigeon Api测试" parallel="false">
<test name="xxx-xxx-service">
<parameter name="sql" value="select id from test_case"/>
<parameter name="envId" value="1"/>
<parameter name="projectId" value="1"/>
<classes>
<class name="org.matrix.testNg.TestPigeon"/>
</classes>
</test>
<listeners>
<listener class-name="org.matrix.testNg.extentsreport.ExtentTestNgReporterListener"/>
</listeners>
</suite>
\ No newline at end of file
spring:
application:
name: keystone
datasource:
dynamic:
primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
datasource:
master: #增加默认数据源
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.100.248:3306/key_stone?useUnicode=true&characterEncoding=utf-8&useSSL=false
username: root
password: root
mybatis-plus:
type-enums-package: org.matrix.enums
\ No newline at end of file
//a跟b进行比较,对象类型分为以下几种:基础类型、数组、普通对象
function equal(a, b) {
var aType = Object.prototype.toString.call(a);
var bType = Object.prototype.toString.call(b);
switch (aType) {
case "[object Array]":
//数组类型
switch (bType) {
case "[object Array]":
return JSON.stringify(a) === JSON.stringify(b);
default:
for (var i = 0; i < a.length; i++) {
if (JSON.stringify(a[i]) !== JSON.stringify(b)) {
return false;
}
}
return true;
}
break
default:
//基础类型和对象类型
switch (bType) {
case "[object Array]":
return equal(b, a);
default:
return JSON.stringify(a) === JSON.stringify(b)
}
}
return JSON.stringify(a) === JSON.stringify(b)
}
function contains(sourceValue, compareValue) {
var sourceValueType = Object.prototype.toString.call(sourceValue);
var compareValueType = Object.prototype.toString.call(compareValue);
if (sourceValueType === "[object Object]") {
for (var i = 0; i < Object.keys(sourceValue).length; i++) {
var souceKey = Object.keys(sourceValue)[i];
if (equal(sourceValue[souceKey], compareValue)) {
return true;
};
}
return false;
} else if (sourceValueType == "[object Array]") {
switch (compareValueType) {
//如果数组包含的话,需要a种全包含b种的参数,例如: [1,2,3]比[1,2]为true , [1,2,3]比[1,2,3,4]为false
case "[object Array]":
//如果compareValue的长度 大于 sourceValue 则一定不包含
if (sourceValue.length < compareValue.length) {
return false;
}
for (var i = 0; i < compareValue.length; i++) {
var innerFlag = false;
for (var j = 0; j < sourceValue.length; j++) {
if (JSON.stringify(compareValue[i]) == JSON.stringify(sourceValue[j])) {
innerFlag = true;
break;
}
}
if (!innerFlag) {
return false;
}
}
return true;
case "[object Object]":
for (var i = 0; i < sourceValue.length; i++) {
if (JSON.stringify(sourceValue[i]) == JSON.stringify(compareValue) ) {
return true;
}
}
return false;
default:
return sourceValue.indexOf(compareValue)> -1 ? true : false;
}
return false;
} else {
return JSON.stringify(sourceValue).indexOf(JSON.stringify(compareValue)) > -1 ? true : false
}
}
function BaseEntity(value) {
this.type = Object.prototype.toString.call(value);
if (this.type != '[object Object]' && this.type != '[object Array]') {
try {
this.value = JSON.parse(value);
this.type = Object.prototype.toString.call(this.value);
} catch (error) {
this.value = value;
}
} else {
this.value = value;
}
}
BaseEntity.prototype.get = function (key) {
return this.value[key]
}
BaseEntity.prototype.length = function (key) {
return this.value.length
}
BaseEntity.prototype.contains = function (key) {
if(key instanceof BaseEntity){
return contains(this.value,key.value)
}else{
return contains(this.value,key)
}
}
BaseEntity.prototype.equal = function (key) {
if(key instanceof BaseEntity){
return equal(this.value,key.value)
}else{
return equal(this.value,key)
}
}
var a = new BaseEntity('{"name":1,"age":2}');
var b = new BaseEntity('{"name":1,"age":3}');
#app{width:100%;height:100%;font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;font-weight:400;vertical-align:baseline}body,html{width:100%;height:100%}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}li,ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}td,th{vertical-align:middle}a{color:#16418a;text-decoration:none;-webkit-backface-visibility:hidden}a,a:focus{outline:none}input:focus,select:focus,textarea:focus{outline:0 auto -webkit-focus-ring-color}
\ No newline at end of file
.addDynamicParams[data-v-2865a3c0]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box;overflow-y:auto}.breadcrumb[data-v-2865a3c0]{margin-bottom:.052083rem}.breadcrumb[data-v-2865a3c0] .el-breadcrumb__inner,.form[data-v-2865a3c0] .el-form-item__label{font-size:.09375rem}.kv_item[data-v-2865a3c0]{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-2865a3c0]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParamDiv[data-v-2865a3c0]{border:.005208rem solid #ccc;padding:.026042rem;box-sizing:border-box;border-radius:.026042rem}
\ No newline at end of file
.home[data-v-2770f298]{width:100%;height:100%;display:flex}.left[data-v-2770f298]{width:1.5625rem;height:100%;padding:.104167rem 0;box-sizing:border-box;box-shadow:.041667rem .010417rem .0625rem 0 rgb(0 0 0/10%)}.left_title[data-v-2770f298]{display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem}.left_title span[data-v-2770f298]{font-size:.125rem;font-weight:700;user-select:none}.left_title i[data-v-2770f298]{cursor:pointer}.left_title img[data-v-2770f298]{width:.125rem;cursor:pointer}.active[data-v-2770f298]{background-color:#409eff;color:#fff}.project_item[data-v-2770f298]{width:100%;padding:.083333rem;box-sizing:border-box;cursor:pointer}.project_item>div[data-v-2770f298]{height:.114583rem;display:flex;align-items:center;justify-content:center}.project_item span[data-v-2770f298]{font-size:.114583rem;user-select:none;margin-right:.052083rem}.project_item i[data-v-2770f298]{font-size:.125rem;cursor:pointer;margin-right:.052083rem}.project_item input[data-v-2770f298]{border-radius:.026042rem;width:60%;margin-right:.052083rem}.left_content[data-v-2770f298]{height:calc(100% - .1875rem);overflow:auto}.right[data-v-2770f298]{height:calc(100% - .26042rem);width:calc(100% - 1.82292rem);margin:.130208rem;box-shadow:0 .010417rem .0625rem 0 rgb(0 0 0/10%)}
\ No newline at end of file
.echart-pie-wrap[data-v-39d52ea6]{width:100%;height:1.041667rem}.myEditorTop[data-v-39d52ea6]{height:.234375rem;display:flex;align-items:center;background-color:#333;padding-left:.260417rem;color:#f1ee08;font-weight:700}.httpParam[data-v-d205e22a]{width:100%}.header_item[data-v-d205e22a]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.052083rem}.header_item>i[data-v-d205e22a]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParam[data-v-d205e22a] .el-tabs__content{padding:.052083rem .104167rem;box-sizing:border-box}.requestBody[data-v-d205e22a]{text-align:left}.request_item[data-v-d205e22a]{width:100%;padding:.104167rem;box-sizing:border-box}.request_none[data-v-d205e22a]{text-align:center}.fileUpload[data-v-d205e22a]{width:.208333rem;border:1p}.el-dropdown-link[data-v-d205e22a]{cursor:pointer;color:#0265db}.el-icon-arrow-down[data-v-d205e22a]{font-size:.083333rem}.request_binary[data-v-d205e22a]{width:40%}
\ No newline at end of file
.addDynamicParams[data-v-c5a25208]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box;overflow-y:auto}.breadcrumb[data-v-c5a25208]{margin-bottom:.052083rem}.breadcrumb[data-v-c5a25208] .el-breadcrumb__inner,.form[data-v-c5a25208] .el-form-item__label{font-size:.09375rem}.kv_item[data-v-c5a25208]{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-c5a25208]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParamDiv[data-v-c5a25208]{border:.005208rem solid #ccc;padding:.026042rem;box-sizing:border-box;border-radius:.026042rem}.activion[data-v-c5a25208]{width:100%;padding:0 .104167rem .104167rem;box-sizing:border-box;display:flex;justify-content:center}.activion_pie[data-v-c5a25208]{width:80%}
\ No newline at end of file
.navPage[data-v-281a2145]{width:100%;height:100%}.header[data-v-281a2145]{width:100%;height:.3125rem;display:flex;align-items:center;padding:0 .15625rem;box-sizing:border-box;box-shadow:0 .010417rem .0625rem 0 rgb(0 0 0/10%)}.logo[data-v-281a2145]{margin-right:.104167rem;user-select:none;cursor:pointer}.main[data-v-281a2145]{width:100%;height:calc(100% - .3125rem)}.header[data-v-281a2145] .el-menu.el-menu--horizontal{border-bottom:none}.header[data-v-281a2145] .el-menu--horizontal>.el-menu-item{font-size:.09375rem}
\ No newline at end of file
.case[data-v-27980ba4]{width:100%;height:100%}.flex[data-v-27980ba4]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-27980ba4]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-27980ba4] .el-input{width:80%}.table[data-v-27980ba4]{width:100%;height:calc(100% - .52083rem)}.table[data-v-27980ba4] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-27980ba4] .el-table__body-wrapper{height:calc(100% - .25rem)}.behavior[data-v-9d7cdcb0]{width:100%;height:100%}.flex[data-v-9d7cdcb0]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-9d7cdcb0]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-9d7cdcb0] .el-input{width:75%}.table[data-v-9d7cdcb0]{width:100%;height:calc(100% - .52083rem)}.table[data-v-9d7cdcb0] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-9d7cdcb0] .el-table__body-wrapper{height:calc(100% - .25rem)}.dynamicParam[data-v-e239b576]{width:100%;height:100%}.flex[data-v-e239b576]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-e239b576]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-e239b576] .el-input{width:80%}.table[data-v-e239b576]{width:100%;height:calc(100% - .52083rem)}.table[data-v-e239b576] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-e239b576] .el-table__body-wrapper{height:calc(100% - .25rem)}.environment[data-v-1d98090e]{width:100%;height:100%}.flex[data-v-1d98090e]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-1d98090e]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-1d98090e] .el-input{width:75%}.table[data-v-1d98090e]{width:100%;height:calc(100% - .52083rem)}.table[data-v-1d98090e] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-1d98090e] .el-table__body-wrapper{height:calc(100% - .25rem)}.kv_item[data-v-1d98090e]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem}.kv_item>i[data-v-1d98090e]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.projectList[data-v-41f99470]{width:100%;height:100%}.projectList[data-v-41f99470] .el-tabs--border-card{height:100%;width:100%;border:none;box-shadow:none}.projectList[data-v-41f99470] .el-tabs__content{width:100%;height:calc(100% - .20313rem);box-sizing:border-box}.projectList[data-v-41f99470] .el-tab-pane{width:100%;height:100%}.projectList[data-v-41f99470] .el-tabs--border-card>.el-tabs__header .el-tabs__item{font-size:.09375rem}
\ No newline at end of file
.environment[data-v-12cd6859],.sqlLink[data-v-12cd6859]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box}.environment[data-v-12cd6859]{box-shadow:0 .010417rem .0625rem 0 rgb(0 0 0/10%)}.flex[data-v-12cd6859]{display:flex;justify-content:flex-start;align-items:center;margin-bottom:.052083rem}.flex span[data-v-12cd6859]{margin-right:.052083rem;font-size:.09375rem}.flex[data-v-12cd6859] .el-input{width:80%}.table[data-v-12cd6859]{width:100%;height:calc(100% - .52083rem)}.table[data-v-12cd6859] .el-table{width:100%;height:calc(100% - .16667rem)}.table[data-v-12cd6859] .el-table__body-wrapper{height:calc(100% - .25rem)}.kv_item[data-v-12cd6859]{width:100%;display:flex;justify-content:space-around;align-items:center;margin-bottom:.104167rem}.kv_item>i[data-v-12cd6859]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}
\ No newline at end of file
.addDynamicParams[data-v-61ab43da]{width:100%;height:100%;padding:.104167rem;box-sizing:border-box;overflow-y:auto}.breadcrumb[data-v-61ab43da]{margin-bottom:.052083rem}.breadcrumb[data-v-61ab43da] .el-breadcrumb__inner,.form[data-v-61ab43da] .el-form-item__label{font-size:.09375rem}.kv_item[data-v-61ab43da]{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-61ab43da]{padding:.026042rem;border:.005208rem solid #333;border-radius:50%;font-size:.09375rem;cursor:pointer;margin-left:.104167rem}.httpParamDiv[data-v-61ab43da]{border:.005208rem solid #ccc;padding:.026042rem;box-sizing:border-box;border-radius:.026042rem;margin-bottom:.104167rem;margin-left:4.56667%}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!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>communication</title><link href="css/chunk-0106327a.9feb13bf.css" rel="prefetch"><link href="css/chunk-34e6cb70.2a2f3925.css" rel="prefetch"><link href="css/chunk-392d3720.b1672692.css" rel="prefetch"><link href="css/chunk-4f0dfe3e.16762e88.css" rel="prefetch"><link href="css/chunk-57cdbc65.d686bfcd.css" rel="prefetch"><link href="css/chunk-5ee89e41.b52638c6.css" rel="prefetch"><link href="css/chunk-742e5b8f.1023d938.css" rel="prefetch"><link href="css/chunk-bab27134.7170d462.css" rel="prefetch"><link href="js/chunk-0106327a.05d8bc17.js" rel="prefetch"><link href="js/chunk-34e6cb70.f4222f15.js" rel="prefetch"><link href="js/chunk-392d3720.990e01f7.js" rel="prefetch"><link href="js/chunk-4f0dfe3e.df71c809.js" rel="prefetch"><link href="js/chunk-57cdbc65.b50b23fd.js" rel="prefetch"><link href="js/chunk-5ee89e41.7753bd4e.js" rel="prefetch"><link href="js/chunk-742e5b8f.b396cea2.js" rel="prefetch"><link href="js/chunk-bab27134.ae0cb8c6.js" rel="prefetch"><link href="js/chunk-f12e9c0a.58c6c19b.js" rel="prefetch"><link href="css/app.5dde5477.css" rel="preload" as="style"><link href="css/chunk-vendors.0738a271.css" rel="preload" as="style"><link href="js/app.4e45e7c6.js" rel="preload" as="script"><link href="js/chunk-vendors.48deb0ae.js" rel="preload" as="script"><link href="css/chunk-vendors.0738a271.css" rel="stylesheet"><link href="css/app.5dde5477.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.48deb0ae.js"></script><script src="js/app.4e45e7c6.js"></script></body></html>
\ No newline at end of file
(function(e){function t(t){for(var r,o,u=t[0],i=t[1],d=t[2],s=0,f=[];s<u.length;s++)o=u[s],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);l&&l(t);while(f.length)f.shift()();return a.push.apply(a,d||[]),n()}function n(){for(var e,t=0;t<a.length;t++){for(var n=a[t],r=!0,o=1;o<n.length;o++){var u=n[o];0!==c[u]&&(r=!1)}r&&(a.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={app:0},c={app:0},a=[];function u(e){return i.p+"js/"+({}[e]||e)+"."+{"chunk-34e6cb70":"f4222f15","chunk-57cdbc65":"b50b23fd","chunk-742e5b8f":"b396cea2","chunk-f12e9c0a":"58c6c19b","chunk-392d3720":"990e01f7","chunk-0106327a":"05d8bc17","chunk-4f0dfe3e":"df71c809","chunk-bab27134":"ae0cb8c6","chunk-5ee89e41":"7753bd4e"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-34e6cb70":1,"chunk-57cdbc65":1,"chunk-742e5b8f":1,"chunk-392d3720":1,"chunk-0106327a":1,"chunk-4f0dfe3e":1,"chunk-bab27134":1,"chunk-5ee89e41":1};o[e]?t.push(o[e]):0!==o[e]&&n[e]&&t.push(o[e]=new Promise((function(t,n){for(var r="css/"+({}[e]||e)+"."+{"chunk-34e6cb70":"2a2f3925","chunk-57cdbc65":"d686bfcd","chunk-742e5b8f":"1023d938","chunk-f12e9c0a":"31d6cfe0","chunk-392d3720":"b1672692","chunk-0106327a":"9feb13bf","chunk-4f0dfe3e":"16762e88","chunk-bab27134":"7170d462","chunk-5ee89e41":"b52638c6"}[e]+".css",c=i.p+r,a=document.getElementsByTagName("link"),u=0;u<a.length;u++){var d=a[u],s=d.getAttribute("data-href")||d.getAttribute("href");if("stylesheet"===d.rel&&(s===r||s===c))return t()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){d=f[u],s=d.getAttribute("data-href");if(s===r||s===c)return t()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=t,l.onerror=function(t){var r=t&&t.target&&t.target.src||c,a=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");a.code="CSS_CHUNK_LOAD_FAILED",a.request=r,delete o[e],l.parentNode.removeChild(l),n(a)},l.href=c;var h=document.getElementsByTagName("head")[0];h.appendChild(l)})).then((function(){o[e]=0})));var r=c[e];if(0!==r)if(r)t.push(r[2]);else{var a=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=a);var d,s=document.createElement("script");s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.src=u(e);var f=new Error;d=function(t){s.onerror=s.onload=null,clearTimeout(l);var n=c[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",f.name="ChunkLoadError",f.type=r,f.request=o,n[1](f)}c[e]=void 0}};var l=setTimeout((function(){d({type:"timeout",target:s})}),12e4);s.onerror=s.onload=d,document.head.appendChild(s)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i.oe=function(e){throw console.error(e),e};var d=window["webpackJsonp"]=window["webpackJsonp"]||[],s=d.push.bind(d);d.push=t,d=d.slice();for(var f=0;f<d.length;f++)t(d[f]);var l=s;a.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);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=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)},c=[],a=(n("034f"),n("2877")),u={},i=Object(a["a"])(u,o,c,!1,null,null,null),d=i.exports,s=(n("d3b7"),n("3ca3"),n("ddb0"),n("8c4f"));r["default"].use(s["a"]);var f=[{path:"*",redirect:"/"},{name:"",path:"/",component:function(){return n.e("chunk-57cdbc65").then(n.bind(null,"fcfc"))},redirect:"/home",children:[{name:"home",path:"/home",component:function(){return n.e("chunk-34e6cb70").then(n.bind(null,"77b8"))},redirect:"/projectList",children:[{name:"projectList",path:"/projectList",component:function(){return Promise.all([n.e("chunk-f12e9c0a"),n.e("chunk-5ee89e41")]).then(n.bind(null,"3227"))}},{name:"addDynamicParams",path:"/addDynamicParams",component:function(){return Promise.all([n.e("chunk-f12e9c0a"),n.e("chunk-392d3720"),n.e("chunk-0106327a")]).then(n.bind(null,"c7fa"))}},{name:"addBehavior",path:"/addBehavior",component:function(){return Promise.all([n.e("chunk-f12e9c0a"),n.e("chunk-392d3720"),n.e("chunk-4f0dfe3e")]).then(n.bind(null,"c67f"))}},{name:"addCase",path:"/addCase",component:function(){return Promise.all([n.e("chunk-f12e9c0a"),n.e("chunk-392d3720"),n.e("chunk-bab27134")]).then(n.bind(null,"4d4d"))}}]},{name:"sqlLink",path:"/sqlLink",component:function(){return n.e("chunk-742e5b8f").then(n.bind(null,"dbaa"))}}]}],l=new s["a"]({routes:f}),h=l,m=n("2f62");r["default"].use(m["a"]);var p=new m["a"].Store({state:{projectId:{},envHint:{}},mutations:{changeProjectId:function(e,t){e.projectId=t},changeEnvHint:function(e,t){e.envHint=t}},actions:{changeProjectIdAct:function(e,t){e.commit("changeProjectId",t)},changeEnvHintAct:function(e,t){e.commit("changeEnvHint",t)}},modules:{}}),b=(n("5cfb"),n("5c96")),v=n.n(b),y=(n("0fae"),n("bc3a")),g=n.n(y),k="http://localhost",j={URL_CNODEJS:k+":8765"},C=j;g.a.interceptors.request.use((function(e){return e}),(function(e){return Promise.reject(e)})),g.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var P=function(e,t){var n=t.method,r=void 0===n?"get":n,o=t.timeout,c=void 0===o?6e4:o,a=t.data,u=void 0===a?{}:a,i=t.params,d=void 0===i?{}:i,s=t.headers,f=void 0===s?{"Content-Type":"application/json"}:s,l=t.dataType,h=void 0===l?"json":l,m={method:r,timeout:c,url:e,baseURL:C.URL_CNODEJS,data:u,params:d,headers:f,dataType:h};return g()(m)},E={queryAllProject:function(){return P("/projects",{method:"get"})},changeProjectName:function(e){return P("/projects",{method:"put",data:e})},addProjcet:function(e){return P("/projects",{method:"post",data:e})},deleteProject:function(e){return P("/projects/".concat(e),{method:"delete"})},queryAllActivion:function(e){return P("/moves/project/".concat(e),{method:"get"})},deleteActivion:function(e){return P("/moves/".concat(e),{method:"delete"})},editActivion:function(e){return P("/moves",{method:"put",data:e})},getActivion:function(e){return P("/moves/".concat(e),{method:"get"})},addActivion:function(e){return P("/moves",{method:"post",data:e})},queryAllEnvironments:function(e){return P("/environments/project/".concat(e),{method:"get"})},queryEnvironments:function(e){return P("/environments/".concat(e),{method:"get"})},addEnvironments:function(e){return P("/environments",{method:"post",data:e})},deleteEnvironments:function(e){return P("/environments/".concat(e),{method:"delete"})},editEnvironments:function(e){return P("/environments",{method:"put",data:e})},queryAllConnects:function(e){return P("/connects",{method:"get",params:e})},queryConnects:function(e){return P("/connects",{method:"post",data:e})},addConnects:function(e){return P("/connects",{method:"post",data:e})},editConnects:function(e){return P("/connects",{method:"put",data:e})},deleteConnects:function(e){return P("/connects/".concat(e),{method:"delete"})},queryAllTestCases:function(e){return P("/testCases/project/".concat(e),{method:"get"})},queryTestCases:function(e){return P("/testCases",{method:"post",data:e})},addTestCases:function(e){return P("/testCases",{method:"post",data:e})},editTestCases:function(e){return P("/testCases",{method:"put",data:e})},deleteTestCases:function(e){return P("/testCases/".concat(e),{method:"delete"})},queryAllDynamicVariables:function(e){return P("/dynamicVariables/project/".concat(e),{method:"get"})},queryDynamicVariables:function(e){return P("/dynamicVariables",{method:"post",data:e})},addDynamicVariables:function(e){return P("/dynamicVariables",{method:"post",data:e})},editDynamicVariables:function(e){return P("/dynamicVariables",{method:"put",data:e})},deleteDynamicVariables:function(e){return P("/dynamicVariables/".concat(e),{method:"delete"})},getVariableByProjectId:function(e){return P("/hints/dynamicVariableName/".concat(e),{method:"get"})},getVariableByEnv:function(e){return P("/hints/variable/".concat(e),{method:"get"})}},w=E;n("b059");r["default"].prototype.$http=w,r["default"].use(v.a),r["default"].config.productionTip=!1,new r["default"]({router:h,store:p,render:function(e){return e(d)}}).$mount("#app")},"85ec":function(e,t,n){},b059:function(e,t,n){}});
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0106327a"],{3134:function(e,t,a){},7270:function(e,t,a){"use strict";a("3134")},c7fa: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:"addDynamicParams"},[a("div",{staticClass:"breadcrumb"},[a("el-breadcrumb",{attrs:{separator:"/"}},[a("el-breadcrumb-item",{attrs:{to:{path:"/",query:{name:"动参"}}}},[e._v("动参")]),a("el-breadcrumb-item",[e._v("新增动参")])],1)],1),a("div",{staticClass:"form"},[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:"所属项目:"}},[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:"数据库id:",prop:"poolId",rules:[{required:!0,message:"请选择数据库id",trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择数据库"},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",{attrs:{type:"textarea"},model:{value:e.form.sqlExp,callback:function(t){e.$set(e.form,"sqlExp",t)},expression:"form.sqlExp"}})],1)],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:{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",[e._v("取消")])],1)],1)],1)])},s=[],l=(a("b0c0"),a("e9c4"),a("a434"),a("5578")),o={name:"addDynamicParams",components:{httpParam:l["a"]},data:function(){return{form:{},connectsList:[],rules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],takenField:[{required:!0,message:"请输入字段",trigger:"blur"}],type:[{required:!0,message:"请选择类型",trigger:"change"}]},projectName:"",testCaseList:[]}},created:function(){this.echoData()},mounted:function(){this.projectName=this.$store.state.projectId.name,this.queryAllConnects(),this.getAllMove(),this.getAllTestCases()},methods:{getAllTestCases:function(){var e=this;this.$http.queryAllTestCases(this.$store.state.projectId.id).then((function(t){var a=t.data.data;e.testCaseList=a})).catch((function(e){}))},echoData:function(){var e=this.$route.query;if(this.form=JSON.parse(JSON.stringify(e)),"CONSTANT_VARIABLE"==e.type)this.form.value=e.detail;else if("SQL_VARIABLE"==e.type){var t=JSON.parse(e.detail);this.form.poolId=t.poolId,this.form.sqlExp=t.sqlExp}else if("HTTP_VARIABLE"==e.type){var a=JSON.parse(e.detail);this.form.httpData=a}else"CASE_VARIABLE"==e.type&&(this.form.case=e.case)},queryAllConnects:function(){var e=this;this.$http.queryAllConnects().then((function(t){var a=t.data.data;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("error"==e.$refs.httpParam[0].getValue())return;a.detail=JSON.stringify(e.$refs.httpParam[0].getValue())}else a.type;a.projectId=e.$store.state.projectId.id;var r=function(t){"add"==t?e.$message.success("新建成功"):e.$message.success("编辑成功"),e.$router.push({path:"./projectList",query:{name:"动参"}})};e.$route.query.id?e.$http.editDynamicVariables(a).then((function(e){return r("edit")})):e.$http.addDynamicVariables(a).then((function(e){return r("add")}))}}))},addKVItem:function(e){this.kvItem.push({})},deleteKVItem:function(e){this.kvItem.splice(e,1)}}},i=o,n=(a("7270"),a("2877")),c=Object(n["a"])(i,r,s,!1,null,"2865a3c0",null);t["default"]=c.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34e6cb70"],{"0b42":function(t,e,i){var o=i("da84"),n=i("e8b5"),c=i("68ee"),r=i("861d"),s=i("b622"),a=s("species"),l=o.Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,c(e)&&(e===l||n(e.prototype))?e=void 0:r(e)&&(e=e[a],null===e&&(e=void 0))),void 0===e?l:e}},"1dde":function(t,e,i){var o=i("d039"),n=i("b622"),c=i("2d00"),r=n("species");t.exports=function(t){return c>=51||!o((function(){var e=[],i=e.constructor={};return i[r]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"60a7":function(t,e,i){},"65f0":function(t,e,i){var o=i("0b42");t.exports=function(t,e){return new(o(t))(0===e?0:e)}},"77b8":function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"home"},[i("div",{staticClass:"left"},[i("div",{staticClass:"left_title"},[i("span",[t._v("项目列表")]),i("div",[i("i",{staticClass:"el-icon-circle-plus-outline",on:{click:function(e){t.openAddProjectDialog=!0}}}),i("i",{staticClass:"el-icon-edit",staticStyle:{"margin-left":"10px"},on:{click:t.showEditAll}})])]),i("div",{staticClass:"left_content"},t._l(t.projectList,(function(e,o){return i("div",{key:o,class:{project_item:!0,active:e.showDelect},on:{click:function(e){return e.stopPropagation(),t.selectItem(o)}}},[e.showIpt?i("div",{staticStyle:{width:"100%"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.editName,expression:"editName"}],attrs:{type:"text"},domProps:{value:t.editName},on:{input:function(e){e.target.composing||(t.editName=e.target.value)}}}),i("i",{staticClass:"el-icon-success",on:{click:function(i){return t.editProject(e.id)}}}),i("i",{staticClass:"el-icon-error",on:{click:function(e){t.projectList[o].showIpt=!1}}})]):i("div",[i("span",[t._v(t._s(e.name))]),t.showDetail?i("i",{staticClass:"el-icon-edit-outline",on:{click:function(e){return t.editBtn(o)}}}):t._e(),t.showDetail?i("i",{staticClass:"el-icon-circle-close",on:{click:function(i){return t.deleteProject(e.id)}}}):t._e()])])})),0)]),i("div",{staticClass:"right"},[i("router-view")],1),i("el-dialog",{attrs:{title:"新增项目",visible:t.openAddProjectDialog,width:"30%","before-close":t.closeDialog},on:{"update:visible":function(e){t.openAddProjectDialog=e}}},[i("el-input",{model:{value:t.projectName,callback:function(e){t.projectName=e},expression:"projectName"}}),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:t.closeDialog}},[t._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:t.addProjcet}},[t._v("确 定")])],1)],1)],1)},c=[],r=(o("b0c0"),o("d81d"),o("e9c4"),{data:function(){return{openAddProjectDialog:!1,showDetail:!1,editName:"",projectName:"",projectList:[]}},mounted:function(){this.getAllProject()},methods:{closeDialog:function(){this.openAddProjectDialog=!1,this.projectName=""},selectItem:function(t){this.$router.push({path:"./projectList"}),this.$store.dispatch("changeProjectIdAct",{id:this.projectList[t].id,name:this.projectList[t].name}),this.projectList.map((function(t){t.showDelect=!1})),this.projectList[t].showDelect=!0},editBtn:function(t){this.projectList[t].showIpt=!0,this.editName=this.projectList[t].name},getVariableByProjectId:function(){this.$http.queryAllDynamicVariables(this.$store.state.projectId.id).then((function(t){var e=[];t.data.data.map((function(t){e.push({name:t.name,remark:t.remark})})),localStorage.setItem("projectHint",JSON.stringify(e)),console.log(t)}))},getAllProject:function(){var t=this;this.$http.queryAllProject().then((function(e){var i=e.data.data;i.map((function(t){t.showIpt=!1,t.showDelect=!1})),t.projectList=i,t.selectItem(0),t.getVariableByProjectId()}))},deleteProject:function(t){var e=this;this.$http.deleteProject(t).then((function(t){e.$message.success("删除"),e.getAllProject(),e.projectList[i].showIpt=!1})).catch((function(t){}))},editProject:function(t){var e=this;this.$http.changeProjectName({name:this.editName,id:t}).then((function(t){e.$message.success("修改成功"),e.getAllProject()}))},addProjcet:function(){var t=this;this.$http.addProjcet({name:this.projectName}).then((function(e){t.$message.success("新增成功"),t.openAddProjectDialog=!1,t.getAllProject(),t.projectName=""})).catch((function(t){}))},showEditAll:function(){this.showDetail=!this.showDetail,this.projectList.map((function(t){t.showIpt=!1}))}}}),s=r,a=(o("eff2"),o("2877")),l=Object(a["a"])(s,n,c,!1,null,"2770f298",null);e["default"]=l.exports},b0c0:function(t,e,i){var o=i("83ab"),n=i("5e77").EXISTS,c=i("e330"),r=i("9bf2").f,s=Function.prototype,a=c(s.toString),l=/^\s*function ([^ (]*)/,u=c(l.exec),d="name";o&&!n&&r(s,d,{configurable:!0,get:function(){try{return u(l,a(this))[1]}catch(t){return""}}})},b727:function(t,e,i){var o=i("0366"),n=i("e330"),c=i("44ad"),r=i("7b0b"),s=i("07fa"),a=i("65f0"),l=n([].push),u=function(t){var e=1==t,i=2==t,n=3==t,u=4==t,d=6==t,f=7==t,p=5==t||d;return function(h,m,v,j){for(var g,b,w=r(h),P=c(w),y=o(m,v),D=s(P),A=0,N=j||a,k=e?N(h,D):i||f?N(h,0):void 0;D>A;A++)if((p||A in P)&&(g=P[A],b=y(g,A,w),t))if(e)k[A]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return A;case 2:l(k,g)}else switch(t){case 4:return!1;case 7:l(k,g)}return d?-1:n||u?u:k}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},d81d:function(t,e,i){"use strict";var o=i("23e7"),n=i("b727").map,c=i("1dde"),r=c("map");o({target:"Array",proto:!0,forced:!r},{map:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},e8b5:function(t,e,i){var o=i("c6b6");t.exports=Array.isArray||function(t){return"Array"==o(t)}},e9c4:function(t,e,i){var o=i("23e7"),n=i("da84"),c=i("d066"),r=i("2ba4"),s=i("e330"),a=i("d039"),l=n.Array,u=c("JSON","stringify"),d=s(/./.exec),f=s("".charAt),p=s("".charCodeAt),h=s("".replace),m=s(1..toString),v=/[\uD800-\uDFFF]/g,j=/^[\uD800-\uDBFF]$/,g=/^[\uDC00-\uDFFF]$/,b=function(t,e,i){var o=f(i,e-1),n=f(i,e+1);return d(j,t)&&!d(g,n)||d(g,t)&&!d(j,o)?"\\u"+m(p(t,0),16):t},w=a((function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}));u&&o({target:"JSON",stat:!0,forced:w},{stringify:function(t,e,i){for(var o=0,n=arguments.length,c=l(n);o<n;o++)c[o]=arguments[o];var s=r(u,null,c);return"string"==typeof s?h(s,v,b):s}})},eff2:function(t,e,i){"use strict";i("60a7")}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论