Commit 9be79da3 authored by 晓彤's avatar 晓彤

修改样式

parent ca4cddfe
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-button type="success" plain @click="AddHeaderListRow()" style="margin-top:10px" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddHeaderListRow()" style="margin-top:10px" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 请求参数 --> <!-- 请求参数 -->
<el-collapse-item name="2" title="请求参数"> <el-collapse-item name="2" title="请求参数">
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-button type="success" plain @click="AddRequestParamsListRow()" style="margin-top:10px" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddRequestParamsListRow()" style="margin-top:10px" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 响应解析列表 --> <!-- 响应解析列表 -->
<el-collapse-item name="3" title="响应提取"> <el-collapse-item name="3" title="响应提取">
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-button type="success" plain @click="AddResponseListRow()" style="mragin-top:10px" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddResponseListRow()" style="mragin-top:10px" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 断言 --> <!-- 断言 -->
<el-collapse-item name="4" title="结果断言"> <el-collapse-item name="4" title="结果断言">
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button type="success" plain @click="AddAssertionListRow()" style="mragin-top:10px" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddAssertionListRow()" style="mragin-top:10px" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
<div style="margin-left:800px;margin-top:20px"> <div style="margin-left:800px;margin-top:20px">
......
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="headerDelete(scope.$index)">删除</el-button> <el-button type="danger" size="mini" icon="el-icon-delete" @click="headerDelete(scope.$index)" >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button type="success" plain class="el-icon-circle-plus" style="margin-top:10px" @click="AddHeaderListRow()">添加行</el-button> <el-button type="primary" size="mini" plain class="el-icon-circle-plus" style="margin-top:10px" @click="AddHeaderListRow()">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 参数添加 --> <!-- 参数添加 -->
<el-collapse-item title="请求参数" name="3"> <el-collapse-item title="请求参数" name="3">
...@@ -100,11 +100,11 @@ ...@@ -100,11 +100,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="paramsDelete(scope.$index)">删除</el-button> <el-button type="danger" size="mini" icon="el-icon-delete" @click="paramsDelete(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button type="success" plain class="el-icon-circle-plus" style="margin-top:10px" @click="AddParamsListRow()">添加行</el-button> <el-button type="primary" size="mini" plain class="el-icon-circle-plus" style="margin-top:10px" @click="AddParamsListRow()">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 响应参数添加 --> <!-- 响应参数添加 -->
<el-collapse-item title="响应参数" name="4"> <el-collapse-item title="响应参数" name="4">
...@@ -133,11 +133,11 @@ ...@@ -133,11 +133,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="responseDelete(scope.$index)">删除</el-button> <el-button type="danger" size="mini" icon="el-icon-delete" @click="responseDelete(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button type="success" plain class="el-icon-circle-plus" style="mragin-top:10px" @click="AddResponseListRow()">添加行</el-button> <el-button type="primary" size="mini" plain class="el-icon-circle-plus" style="mragin-top:10px" @click="AddResponseListRow()">添加行</el-button>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
</el-form> </el-form>
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
<el-button type="success" size="mini" plain @click="AddPreActiveListRow()" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddPreActiveListRow()" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- Headers --> <!-- Headers -->
<el-collapse-item name="2" title="请求头"> <el-collapse-item name="2" title="请求头">
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-button type="success" plain @click="AddHeaderListRow()" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddHeaderListRow()" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 请求参数 --> <!-- 请求参数 -->
<el-collapse-item name="3" title="请求参数"> <el-collapse-item name="3" title="请求参数">
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-button type="success" plain @click="AddRequestParamsListRow()" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddRequestParamsListRow()" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 响应解析列表 --> <!-- 响应解析列表 -->
<el-collapse-item name="4" title="响应提取"> <el-collapse-item name="4" title="响应提取">
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-button type="success" plain @click="AddResponseListRow()" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddResponseListRow()" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
<!-- 断言 --> <!-- 断言 -->
<el-collapse-item name="5" title="结果断言"> <el-collapse-item name="5" title="结果断言">
...@@ -249,12 +249,12 @@ ...@@ -249,12 +249,12 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button type="success" plain @click="AddAssertionListRow()" class="el-icon-circle-plus">添加行</el-button> <el-button type="primary" size="mini" plain @click="AddAssertionListRow()" class="el-icon-circle-plus">添加行</el-button>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
<div style="margin-top:20px;margin-left:600px"> <div style="margin-top:20px;margin-left:600px">
<el-button @click="cancelCaseFrom">取 消</el-button> <el-button @click="cancelCaseFrom">取 消</el-button>
<el-button type="primary" @click="addCaseFrom">确 定</el-button> <el-button type="primary" @click="addCaseFrom">确 定</el-button>
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<el-row> <el-row>
<el-col :span="2" class="colStyle">断 言</el-col> <el-col :span="2" class="colStyle">断 言</el-col>
<el-col :span="22"> <el-col :span="22">
<el-table v-if="isShowTable" :data="validateList" border style="width: 60%" :header-cell-style="{background:'#E6F3F7',color:'#606266','text-align':'center'}" :cell-style="{'text-align':'center',background:'#E3EDEB',color:'#606266'}"> <el-table v-if="isShowTable" :data="props.row.validate" border style="width: 60%" :header-cell-style="{background:'#E6F3F7',color:'#606266','text-align':'center'}" :cell-style="{'text-align':'center',background:'#E3EDEB',color:'#606266'}">
<el-table-column prop="check" label="检查值" width="250px"></el-table-column> <el-table-column prop="check" label="检查值" width="250px"></el-table-column>
<el-table-column prop="comparator" label="比较符" width="250px"></el-table-column> <el-table-column prop="comparator" label="比较符" width="250px"></el-table-column>
<el-table-column prop="expect" label="预期结果"></el-table-column> <el-table-column prop="expect" label="预期结果"></el-table-column>
...@@ -188,21 +188,7 @@ export default { ...@@ -188,21 +188,7 @@ export default {
this.totalElapsedTime = resp.data.data.totalElapsedTime / 1000 this.totalElapsedTime = resp.data.data.totalElapsedTime / 1000
this.totalPass = resp.data.data.pass this.totalPass = resp.data.data.pass
this.totalFail = resp.data.data.fail this.totalFail = resp.data.data.fail
this.reportDetailList.forEach((item) => { // 图表赋值
// item['headers'] = JSON.parse(item['headers'])
// item['parameters'] = JSON.parse(item['parameters'])
// item['response'] = JSON.parse(item['response'])
item['headers'] = item['headers']
item['parameters'] = item['parameters']
item['response'] = item['response']
item['elapsedTime'] = item['elapsedTime'] / 1000
if (item['validate'] !== '[]') {
this.validateList = JSON.parse(item['validate'])
this.isShowTable = true
}
})
this.opinionData.push( this.opinionData.push(
{ {
value: resp.data.data.pass, value: resp.data.data.pass,
...@@ -216,6 +202,15 @@ export default { ...@@ -216,6 +202,15 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.drawPieChart('chartPie') this.drawPieChart('chartPie')
}) })
// 列表展示
this.reportDetailList.forEach((item) => {
item['elapsedTime'] = item['elapsedTime'] / 1000
item['headers'] = JSON.parse(item['headers'])
item['parameters'] = JSON.parse(item['parameters'])
item['response'] = JSON.parse(item['response'])
item['validate'] = JSON.parse(item['validate'])
this.isShowTable = true
})
}) })
} }
} }
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<el-table-column label="操作"> <el-table-column label="操作">
<slot slot-scope="scope"> <slot slot-scope="scope">
<el-button type="success" size="medium" icon="el-icon-link" @click="executeSceneFrom(scope.row)" style="width:80px;margin-left:1px">执行</el-button> <el-button type="success" size="medium" icon="el-icon-link" @click="executeSceneFrom(scope.row)" style="width:80px;margin-left:1px">执行</el-button>
<el-button type="warning" size="medium" icon="el-icon-edit-outline" @click="editeSceneCaseFrom(scope.row)" style="width:135px;margin-left:1px">编辑场景用例</el-button>
<el-button type="warning" size="medium" icon="el-icon-edit" @click="editeSceneFrom(scope.row)" style="width:110px;margin-left:1px">编辑场景</el-button> <el-button type="warning" size="medium" icon="el-icon-edit" @click="editeSceneFrom(scope.row)" style="width:110px;margin-left:1px">编辑场景</el-button>
<el-button type="warning" size="medium" icon="el-icon-edit" @click="editeSceneCaseFrom(scope.row)" style="width:135px;margin-left:1px">编辑场景用例</el-button>
<el-button type="primary" size="medium" icon="el-icon-circle-check" @click="checkReport(scope.row)" style="width:110px;margin-left:1px">查看报告</el-button> <el-button type="primary" size="medium" icon="el-icon-circle-check" @click="checkReport(scope.row)" style="width:110px;margin-left:1px">查看报告</el-button>
<!-- <el-button type="danger" icon="el-icon-delete" @click="deleSceneFrom(scope.row)">删除</el-button> --> <!-- <el-button type="danger" icon="el-icon-delete" @click="deleSceneFrom(scope.row)">删除</el-button> -->
</slot> </slot>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment